From de3df40f1a79b6181658e795fd7080d84b5fb172 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 06 2013 00:54:25 +0000 Subject: Update locale module's file structure. --- diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Asciidoc/asciidoc.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Asciidoc/asciidoc.sh index 2b7ca10..f546628 100755 --- a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Asciidoc/asciidoc.sh +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Asciidoc/asciidoc.sh @@ -18,11 +18,11 @@ function asciidoc { asciidoc_convertAsciidocToDocbook - locale_convertXmlToPot "${DOCBOOK_FILE}" "${POT_FILE}" + update_convertXmlToPot "${DOCBOOK_FILE}" "${POT_FILE}" # Verify, initialize or merge portable objects from portable # object templates. - locale_convertPotToPo "${POT_FILE}" "${PO_FILE}" + update_convertPotToPo "${POT_FILE}" "${PO_FILE}" done diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Sh/sh.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Sh/sh.sh index 5e8ea01..4035c57 100755 --- a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Sh/sh.sh +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Sh/sh.sh @@ -16,7 +16,7 @@ function sh { # Verify, initialize or update portable objects from portable # object templates. - locale_convertPotToPo "${POT_FILE}" "${PO_FILE}" + update_convertPotToPo "${POT_FILE}" "${PO_FILE}" # At this point some changes might be realized inside the PO file, # so we need to update the related MO file based on recently @@ -24,6 +24,6 @@ function sh { # print out the most up to date revision of localized messages. # Notice that this is required only if we were localizing shell # scripts. - locale_convertPoToMo + update_convertPoToMo } diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg.sh index c17e1a4..da8323f 100755 --- a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg.sh +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg.sh @@ -18,11 +18,11 @@ function svg { svg_createSvgInstance - locale_convertXmlToPot "${SVG_INSTANCE}" "${POT_FILE}" + update_convertXmlToPot "${SVG_INSTANCE}" "${POT_FILE}" # Verify, initialize or merge portable objects from portable # object templates. - locale_convertPotToPo "${POT_FILE}" "${PO_FILE}" + update_convertPotToPo "${POT_FILE}" "${PO_FILE}" done diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertPoToMo.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertPoToMo.sh new file mode 100755 index 0000000..c1898a6 --- /dev/null +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertPoToMo.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +function update_convertPoToMo { + + # Print action message. + tcar_printMessage "${MO_FILE}" --as-creating-line + + # Verify absolute path to machine object directory, if it doesn't + # exist create it. + if [[ ! -d $(dirname ${MO_FILE}) ]];then + mkdir -p $(dirname ${MO_FILE}) + fi + + # Create machine object from portable object. + msgfmt --check ${PO_FILE} --output-file=${MO_FILE} + +} diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertPotToPo.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertPotToPo.sh new file mode 100755 index 0000000..7d5a854 --- /dev/null +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertPotToPo.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +function update_convertPotToPo { + + local POT_FILE="${1}" + local PO_FILE="${2}" + + # Verify the portable object template. The portable object + # template is used to create the portable object. We cannot + # continue without it. + tcar_checkFiles -ef ${POT_FILE} + + # Create the PO's parent directory if it doesn't exist. + if [[ ! -d $(dirname ${PO_FILE}) ]];then + mkdir -p $(dirname ${PO_FILE}) + fi + + # Print action message. + tcar_printMessage "${PO_FILE}" --as-creating-line + + # Verify existence of portable object. The portable object is the + # file translators edit in order to make translation works. + if [[ -f ${PO_FILE} ]];then + + # Update portable object merging both portable object and + # portable object template. + msgmerge --output-file="${PO_FILE}" "${PO_FILE}" "${POT_FILE}" --quiet + + else + + # Initiate portable object using portable object template. + # Do not print msginit sterr output, use centos-art action + # message instead. + msginit -i ${POT_FILE} -o ${PO_FILE} --width=70 \ + --no-translator > /dev/null 2>&1 + + fi + + # Sanitate metadata inside the PO file. + update_setPoMetadata "${PO_FILE}" + +} diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertXmlToPot.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertXmlToPot.sh new file mode 100755 index 0000000..3ba0275 --- /dev/null +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_convertXmlToPot.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +function update_convertXmlToPot { + + local XML_FILE=${1} + local POT_FILE=${2} + + cat ${XML_FILE} | xml2po -a -l ${TCAR_SCRIPT_LANG_LC} - \ + | msgcat --output-file=${POT_FILE} --width=70 --no-location - + +} diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_getCountryName.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_getCountryName.sh new file mode 100755 index 0000000..b7a0609 --- /dev/null +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_getCountryName.sh @@ -0,0 +1,731 @@ +#!/bin/bash + +function update_getCountryName { + + local COUNTRYNAME="`gettext "Unknown"`" + + case ${CLI_LANG_CC} in + + 'AD' ) + COUNTRYNAME="`gettext "Andorra"`" + ;; + 'AE' ) + COUNTRYNAME="`gettext "United Arab Emirates"`" + ;; + 'AF' ) + COUNTRYNAME="`gettext "Afghanistan"`" + ;; + 'AG' ) + COUNTRYNAME="`gettext "Antigua and Barbuda"`" + ;; + 'AI' ) + COUNTRYNAME="`gettext "Anguilla"`" + ;; + 'AL' ) + COUNTRYNAME="`gettext "Albania"`" + ;; + 'AM' ) + COUNTRYNAME="`gettext "Armenia"`" + ;; + 'AN' ) + COUNTRYNAME="`gettext "Netherlands Antilles"`" + ;; + 'AO' ) + COUNTRYNAME="`gettext "Angola"`" + ;; + 'AQ' ) + COUNTRYNAME="`gettext "Antarctica"`" + ;; + 'AR' ) + COUNTRYNAME="`gettext "Argentina"`" + ;; + 'AS' ) + COUNTRYNAME="`gettext "Samoa (American)"`" + ;; + 'AT' ) + COUNTRYNAME="`gettext "Austria"`" + ;; + 'AU' ) + COUNTRYNAME="`gettext "Australia"`" + ;; + 'AW' ) + COUNTRYNAME="`gettext "Aruba"`" + ;; + 'AZ' ) + COUNTRYNAME="`gettext "Azerbaijan"`" + ;; + 'BA' ) + COUNTRYNAME="`gettext "Bosnia and Herzegovina"`" + ;; + 'BB' ) + COUNTRYNAME="`gettext "Barbados"`" + ;; + 'BD' ) + COUNTRYNAME="`gettext "Bangladesh"`" + ;; + 'BE' ) + COUNTRYNAME="`gettext "Belgium"`" + ;; + 'BF' ) + COUNTRYNAME="`gettext "Burkina Faso"`" + ;; + 'BG' ) + COUNTRYNAME="`gettext "Bulgaria"`" + ;; + 'BH' ) + COUNTRYNAME="`gettext "Bahrain"`" + ;; + 'BI' ) + COUNTRYNAME="`gettext "Burundi"`" + ;; + 'BJ' ) + COUNTRYNAME="`gettext "Benin"`" + ;; + 'BM' ) + COUNTRYNAME="`gettext "Bermuda"`" + ;; + 'BN' ) + COUNTRYNAME="`gettext "Brunei"`" + ;; + 'BO' ) + COUNTRYNAME="`gettext "Bolivia"`" + ;; + 'BR' ) + COUNTRYNAME="`gettext "Brazil"`" + ;; + 'BS' ) + COUNTRYNAME="`gettext "Bahamas"`" + ;; + 'BT' ) + COUNTRYNAME="`gettext "Bhutan"`" + ;; + 'BV' ) + COUNTRYNAME="`gettext "Bouvet Island"`" + ;; + 'BW' ) + COUNTRYNAME="`gettext "Botswana"`" + ;; + 'BY' ) + COUNTRYNAME="`gettext "Belarus"`" + ;; + 'BZ' ) + COUNTRYNAME="`gettext "Belize"`" + ;; + 'CA' ) + COUNTRYNAME="`gettext "Canada"`" + ;; + 'CC' ) + COUNTRYNAME="`gettext "Cocos (Keeling) Islands"`" + ;; + 'CD' ) + COUNTRYNAME="`gettext "Congo (Dem. Rep.)"`" + ;; + 'CF' ) + COUNTRYNAME="`gettext "Central African Rep."`" + ;; + 'CG' ) + COUNTRYNAME="`gettext "Congo (Rep.)"`" + ;; + 'CH' ) + COUNTRYNAME="`gettext "Switzerland"`" + ;; + 'CI' ) + COUNTRYNAME="`gettext "Co^te d'Ivoire"`" + ;; + 'CK' ) + COUNTRYNAME="`gettext "Cook Islands"`" + ;; + 'CL' ) + COUNTRYNAME="`gettext "Chile"`" + ;; + 'CM' ) + COUNTRYNAME="`gettext "Cameroon"`" + ;; + 'CN' ) + COUNTRYNAME="`gettext "China"`" + ;; + 'CO' ) + COUNTRYNAME="`gettext "Colombia"`" + ;; + 'CR' ) + COUNTRYNAME="`gettext "Costa Rica"`" + ;; + 'CS' ) + COUNTRYNAME="`gettext "Serbia and Montenegro"`" + ;; + 'CU' ) + COUNTRYNAME="`gettext "Cuba"`" + ;; + 'CV' ) + COUNTRYNAME="`gettext "Cape Verde"`" + ;; + 'CX' ) + COUNTRYNAME="`gettext "Christmas Island"`" + ;; + 'CY' ) + COUNTRYNAME="`gettext "Cyprus"`" + ;; + 'CZ' ) + COUNTRYNAME="`gettext "Czech Republic"`" + ;; + 'DE' ) + COUNTRYNAME="`gettext "Germany"`" + ;; + 'DJ' ) + COUNTRYNAME="`gettext "Djibouti"`" + ;; + 'DK' ) + COUNTRYNAME="`gettext "Denmark"`" + ;; + 'DM' ) + COUNTRYNAME="`gettext "Dominica"`" + ;; + 'DO' ) + COUNTRYNAME="`gettext "Dominican Republic"`" + ;; + 'DZ' ) + COUNTRYNAME="`gettext "Algeria"`" + ;; + 'EC' ) + COUNTRYNAME="`gettext "Ecuador"`" + ;; + 'EE' ) + COUNTRYNAME="`gettext "Estonia"`" + ;; + 'EG' ) + COUNTRYNAME="`gettext "Egypt"`" + ;; + 'EH' ) + COUNTRYNAME="`gettext "Western Sahara"`" + ;; + 'ER' ) + COUNTRYNAME="`gettext "Eritrea"`" + ;; + 'ES' ) + COUNTRYNAME="`gettext "Spain"`" + ;; + 'ET' ) + COUNTRYNAME="`gettext "Ethiopia"`" + ;; + 'FI' ) + COUNTRYNAME="`gettext "Finland"`" + ;; + 'FJ' ) + COUNTRYNAME="`gettext "Fiji"`" + ;; + 'FK' ) + COUNTRYNAME="`gettext "Falkland Islands"`" + ;; + 'FM' ) + COUNTRYNAME="`gettext "Micronesia"`" + ;; + 'FO' ) + COUNTRYNAME="`gettext "Faeroe Islands"`" + ;; + 'FR' ) + COUNTRYNAME="`gettext "France"`" + ;; + 'GA' ) + COUNTRYNAME="`gettext "Gabon"`" + ;; + 'GB' ) + COUNTRYNAME="`gettext "Britain (UK)"`" + ;; + 'GD' ) + COUNTRYNAME="`gettext "Grenada"`" + ;; + 'GE' ) + COUNTRYNAME="`gettext "Georgia"`" + ;; + 'GF' ) + COUNTRYNAME="`gettext "French Guiana"`" + ;; + 'GH' ) + COUNTRYNAME="`gettext "Ghana"`" + ;; + 'GI' ) + COUNTRYNAME="`gettext "Gibraltar"`" + ;; + 'GL' ) + COUNTRYNAME="`gettext "Greenland"`" + ;; + 'GM' ) + COUNTRYNAME="`gettext "Gambia"`" + ;; + 'GN' ) + COUNTRYNAME="`gettext "Guinea"`" + ;; + 'GP' ) + COUNTRYNAME="`gettext "Guadeloupe"`" + ;; + 'GQ' ) + COUNTRYNAME="`gettext "Equatorial Guinea"`" + ;; + 'GR' ) + COUNTRYNAME="`gettext "Greece"`" + ;; + 'GS' ) + COUNTRYNAME="`gettext "South Georgia and the South Sandwich Islands"`" + ;; + 'GT' ) + COUNTRYNAME="`gettext "Guatemala"`" + ;; + 'GU' ) + COUNTRYNAME="`gettext "Guam"`" + ;; + 'GW' ) + COUNTRYNAME="`gettext "Guinea-Bissau"`" + ;; + 'GY' ) + COUNTRYNAME="`gettext "Guyana"`" + ;; + 'HK' ) + COUNTRYNAME="`gettext "Hong Kong"`" + ;; + 'HM' ) + COUNTRYNAME="`gettext "Heard Island and McDonald Islands"`" + ;; + 'HN' ) + COUNTRYNAME="`gettext "Honduras"`" + ;; + 'HR' ) + COUNTRYNAME="`gettext "Croatia"`" + ;; + 'HT' ) + COUNTRYNAME="`gettext "Haiti"`" + ;; + 'HU' ) + COUNTRYNAME="`gettext "Hungary"`" + ;; + 'ID' ) + COUNTRYNAME="`gettext "Indonesia"`" + ;; + 'IE' ) + COUNTRYNAME="`gettext "Ireland"`" + ;; + 'IL' ) + COUNTRYNAME="`gettext "Israel"`" + ;; + 'IN' ) + COUNTRYNAME="`gettext "India"`" + ;; + 'IO' ) + COUNTRYNAME="`gettext "British Indian Ocean Territory"`" + ;; + 'IQ' ) + COUNTRYNAME="`gettext "Iraq"`" + ;; + 'IR' ) + COUNTRYNAME="`gettext "Iran"`" + ;; + 'IS' ) + COUNTRYNAME="`gettext "Iceland"`" + ;; + 'IT' ) + COUNTRYNAME="`gettext "Italy"`" + ;; + 'JM' ) + COUNTRYNAME="`gettext "Jamaica"`" + ;; + 'JO' ) + COUNTRYNAME="`gettext "Jordan"`" + ;; + 'JP' ) + COUNTRYNAME="`gettext "Japan"`" + ;; + 'KE' ) + COUNTRYNAME="`gettext "Kenya"`" + ;; + 'KG' ) + COUNTRYNAME="`gettext "Kyrgyzstan"`" + ;; + 'KH' ) + COUNTRYNAME="`gettext "Cambodia"`" + ;; + 'KI' ) + COUNTRYNAME="`gettext "Kiribati"`" + ;; + 'KM' ) + COUNTRYNAME="`gettext "Comoros"`" + ;; + 'KN' ) + COUNTRYNAME="`gettext "St Kitts and Nevis"`" + ;; + 'KP' ) + COUNTRYNAME="`gettext "Korea (North)"`" + ;; + 'KR' ) + COUNTRYNAME="`gettext "Korea (South)"`" + ;; + 'KW' ) + COUNTRYNAME="`gettext "Kuwait"`" + ;; + 'KY' ) + COUNTRYNAME="`gettext "Cayman Islands"`" + ;; + 'KZ' ) + COUNTRYNAME="`gettext "Kazakhstan"`" + ;; + 'LA' ) + COUNTRYNAME="`gettext "Laos"`" + ;; + 'LB' ) + COUNTRYNAME="`gettext "Lebanon"`" + ;; + 'LC' ) + COUNTRYNAME="`gettext "St Lucia"`" + ;; + 'LI' ) + COUNTRYNAME="`gettext "Liechtenstein"`" + ;; + 'LK' ) + COUNTRYNAME="`gettext "Sri Lanka"`" + ;; + 'LR' ) + COUNTRYNAME="`gettext "Liberia"`" + ;; + 'LS' ) + COUNTRYNAME="`gettext "Lesotho"`" + ;; + 'LT' ) + COUNTRYNAME="`gettext "Lithuania"`" + ;; + 'LU' ) + COUNTRYNAME="`gettext "Luxembourg"`" + ;; + 'LV' ) + COUNTRYNAME="`gettext "Latvia"`" + ;; + 'LY' ) + COUNTRYNAME="`gettext "Libya"`" + ;; + 'MA' ) + COUNTRYNAME="`gettext "Morocco"`" + ;; + 'MC' ) + COUNTRYNAME="`gettext "Monaco"`" + ;; + 'MD' ) + COUNTRYNAME="`gettext "Moldova"`" + ;; + 'MG' ) + COUNTRYNAME="`gettext "Madagascar"`" + ;; + 'MH' ) + COUNTRYNAME="`gettext "Marshall Islands"`" + ;; + 'MK' ) + COUNTRYNAME="`gettext "Macedonia"`" + ;; + 'ML' ) + COUNTRYNAME="`gettext "Mali"`" + ;; + 'MM' ) + COUNTRYNAME="`gettext "Myanmar (Burma)"`" + ;; + 'MN' ) + COUNTRYNAME="`gettext "Mongolia"`" + ;; + 'MO' ) + COUNTRYNAME="`gettext "Macao"`" + ;; + 'MP' ) + COUNTRYNAME="`gettext "Northern Mariana Islands"`" + ;; + 'MQ' ) + COUNTRYNAME="`gettext "Martinique"`" + ;; + 'MR' ) + COUNTRYNAME="`gettext "Mauritania"`" + ;; + 'MS' ) + COUNTRYNAME="`gettext "Montserrat"`" + ;; + 'MT' ) + COUNTRYNAME="`gettext "Malta"`" + ;; + 'MU' ) + COUNTRYNAME="`gettext "Mauritius"`" + ;; + 'MV' ) + COUNTRYNAME="`gettext "Maldives"`" + ;; + 'MW' ) + COUNTRYNAME="`gettext "Malawi"`" + ;; + 'MX' ) + COUNTRYNAME="`gettext "Mexico"`" + ;; + 'MY' ) + COUNTRYNAME="`gettext "Malaysia"`" + ;; + 'MZ' ) + COUNTRYNAME="`gettext "Mozambique"`" + ;; + 'NA' ) + COUNTRYNAME="`gettext "Namibia"`" + ;; + 'NC' ) + COUNTRYNAME="`gettext "New Caledonia"`" + ;; + 'NE' ) + COUNTRYNAME="`gettext "Niger"`" + ;; + 'NF' ) + COUNTRYNAME="`gettext "Norfolk Island"`" + ;; + 'NG' ) + COUNTRYNAME="`gettext "Nigeria"`" + ;; + 'NI' ) + COUNTRYNAME="`gettext "Nicaragua"`" + ;; + 'NL' ) + COUNTRYNAME="`gettext "Netherlands"`" + ;; + 'NO' ) + COUNTRYNAME="`gettext "Norway"`" + ;; + 'NP' ) + COUNTRYNAME="`gettext "Nepal"`" + ;; + 'NR' ) + COUNTRYNAME="`gettext "Nauru"`" + ;; + 'NU' ) + COUNTRYNAME="`gettext "Niue"`" + ;; + 'NZ' ) + COUNTRYNAME="`gettext "New Zealand"`" + ;; + 'OM' ) + COUNTRYNAME="`gettext "Oman"`" + ;; + 'PA' ) + COUNTRYNAME="`gettext "Panama"`" + ;; + 'PE' ) + COUNTRYNAME="`gettext "Peru"`" + ;; + 'PF' ) + COUNTRYNAME="`gettext "French Polynesia"`" + ;; + 'PG' ) + COUNTRYNAME="`gettext "Papua New Guinea"`" + ;; + 'PH' ) + COUNTRYNAME="`gettext "Philippines"`" + ;; + 'PK' ) + COUNTRYNAME="`gettext "Pakistan"`" + ;; + 'PL' ) + COUNTRYNAME="`gettext "Poland"`" + ;; + 'PM' ) + COUNTRYNAME="`gettext "St Pierre and Miquelon"`" + ;; + 'PN' ) + COUNTRYNAME="`gettext "Pitcairn"`" + ;; + 'PR' ) + COUNTRYNAME="`gettext "Puerto Rico"`" + ;; + 'PS' ) + COUNTRYNAME="`gettext "Palestine"`" + ;; + 'PT' ) + COUNTRYNAME="`gettext "Portugal"`" + ;; + 'PW' ) + COUNTRYNAME="`gettext "Palau"`" + ;; + 'PY' ) + COUNTRYNAME="`gettext "Paraguay"`" + ;; + 'QA' ) + COUNTRYNAME="`gettext "Qatar"`" + ;; + 'RE' ) + COUNTRYNAME="`gettext "Reunion"`" + ;; + 'RO' ) + COUNTRYNAME="`gettext "Romania"`" + ;; + 'RU' ) + COUNTRYNAME="`gettext "Russia"`" + ;; + 'RW' ) + COUNTRYNAME="`gettext "Rwanda"`" + ;; + 'SA' ) + COUNTRYNAME="`gettext "Saudi Arabia"`" + ;; + 'SB' ) + COUNTRYNAME="`gettext "Solomon Islands"`" + ;; + 'SC' ) + COUNTRYNAME="`gettext "Seychelles"`" + ;; + 'SD' ) + COUNTRYNAME="`gettext "Sudan"`" + ;; + 'SE' ) + COUNTRYNAME="`gettext "Sweden"`" + ;; + 'SG' ) + COUNTRYNAME="`gettext "Singapore"`" + ;; + 'SH' ) + COUNTRYNAME="`gettext "St Helena"`" + ;; + 'SI' ) + COUNTRYNAME="`gettext "Slovenia"`" + ;; + 'SJ' ) + COUNTRYNAME="`gettext "Svalbard and Jan Mayen"`" + ;; + 'SK' ) + COUNTRYNAME="`gettext "Slovakia"`" + ;; + 'SL' ) + COUNTRYNAME="`gettext "Sierra Leone"`" + ;; + 'SM' ) + COUNTRYNAME="`gettext "San Marino"`" + ;; + 'SN' ) + COUNTRYNAME="`gettext "Senegal"`" + ;; + 'SO' ) + COUNTRYNAME="`gettext "Somalia"`" + ;; + 'SR' ) + COUNTRYNAME="`gettext "Suriname"`" + ;; + 'ST' ) + COUNTRYNAME="`gettext "Sao Tome and Principe"`" + ;; + 'SV' ) + COUNTRYNAME="`gettext "El Salvador"`" + ;; + 'SY' ) + COUNTRYNAME="`gettext "Syria"`" + ;; + 'SZ' ) + COUNTRYNAME="`gettext "Swaziland"`" + ;; + 'TC' ) + COUNTRYNAME="`gettext "Turks and Caicos Islands"`" + ;; + 'TD' ) + COUNTRYNAME="`gettext "Chad"`" + ;; + 'TF' ) + COUNTRYNAME="`gettext "French Southern and Antarctic Lands"`" + ;; + 'TG' ) + COUNTRYNAME="`gettext "Togo"`" + ;; + 'TH' ) + COUNTRYNAME="`gettext "Thailand"`" + ;; + 'TJ' ) + COUNTRYNAME="`gettext "Tajikistan"`" + ;; + 'TK' ) + COUNTRYNAME="`gettext "Tokelau"`" + ;; + 'TL' ) + COUNTRYNAME="`gettext "Timor-Leste"`" + ;; + 'TM' ) + COUNTRYNAME="`gettext "Turkmenistan"`" + ;; + 'TN' ) + COUNTRYNAME="`gettext "Tunisia"`" + ;; + 'TO' ) + COUNTRYNAME="`gettext "Tonga"`" + ;; + 'TR' ) + COUNTRYNAME="`gettext "Turkey"`" + ;; + 'TT' ) + COUNTRYNAME="`gettext "Trinidad and Tobago"`" + ;; + 'TV' ) + COUNTRYNAME="`gettext "Tuvalu"`" + ;; + 'TW' ) + COUNTRYNAME="`gettext "Taiwan"`" + ;; + 'TZ' ) + COUNTRYNAME="`gettext "Tanzania"`" + ;; + 'UA' ) + COUNTRYNAME="`gettext "Ukraine"`" + ;; + 'UG' ) + COUNTRYNAME="`gettext "Uganda"`" + ;; + 'UM' ) + COUNTRYNAME="`gettext "US minor outlying islands"`" + ;; + 'US' ) + COUNTRYNAME="`gettext "United States"`" + ;; + 'UY' ) + COUNTRYNAME="`gettext "Uruguay"`" + ;; + 'UZ' ) + COUNTRYNAME="`gettext "Uzbekistan"`" + ;; + 'VA' ) + COUNTRYNAME="`gettext "Vatican City"`" + ;; + 'VC' ) + COUNTRYNAME="`gettext "St Vincent"`" + ;; + 'VE' ) + COUNTRYNAME="`gettext "Venezuela"`" + ;; + 'VG' ) + COUNTRYNAME="`gettext "Virgin Islands (UK)"`" + ;; + 'VI' ) + COUNTRYNAME="`gettext "Virgin Islands (US)"`" + ;; + 'VN' ) + COUNTRYNAME="`gettext "Vietnam"`" + ;; + 'VU' ) + COUNTRYNAME="`gettext "Vanuatu"`" + ;; + 'WF' ) + COUNTRYNAME="`gettext "Wallis and Futuna"`" + ;; + 'WS' ) + COUNTRYNAME="`gettext "Samoa (Western)"`" + ;; + 'YE' ) + COUNTRYNAME="`gettext "Yemen"`" + ;; + 'YT' ) + COUNTRYNAME="`gettext "Mayotte"`" + ;; + 'ZA' ) + COUNTRYNAME="`gettext "South Africa"`" + ;; + 'ZM' ) + COUNTRYNAME="`gettext "Zambia"`" + ;; + 'ZW' ) + COUNTRYNAME="`gettext "Zimbabwe"`" + ;; + + esac + + echo $COUNTRYNAME + +} diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_getLanguageName.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_getLanguageName.sh new file mode 100755 index 0000000..32879ab --- /dev/null +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_getLanguageName.sh @@ -0,0 +1,753 @@ +#!/bin/bash + +function update_getLanguageName { + + local LANGNAME="`gettext "Unknown"`" + + case ${TCAR_SCRIPT_LANG_LL} in + + 'aa' ) + LANGNAME="`gettext "Afar"`" + ;; + + 'ab' ) + LANGNAME="`gettext "Abkhazian"`" + ;; + + 'ae' ) + LANGNAME="`gettext "Avestan"`" + ;; + + 'af' ) + LANGNAME="`gettext "Afrikaans"`" + ;; + + 'ak' ) + LANGNAME="`gettext "Akan"`" + ;; + + 'am' ) + LANGNAME="`gettext "Amharic"`" + ;; + + 'an' ) + LANGNAME="`gettext "Aragonese"`" + ;; + + 'ar' ) + LANGNAME="`gettext "Arabic"`" + ;; + + 'as' ) + LANGNAME="`gettext "Assamese"`" + ;; + + 'av' ) + LANGNAME="`gettext "Avaric"`" + ;; + + 'ay' ) + LANGNAME="`gettext "Aymara"`" + ;; + + 'az' ) + LANGNAME="`gettext "Azerbaijani"`" + ;; + + 'ba' ) + LANGNAME="`gettext "Bashkir"`" + ;; + + 'be' ) + LANGNAME="`gettext "Byelorussian"`" + ;; + + 'bg' ) + LANGNAME="`gettext "Bulgarian"`" + ;; + + 'bh' ) + LANGNAME="`gettext "Bihari"`" + ;; + + 'bi' ) + LANGNAME="`gettext "Bislama"`" + ;; + + 'bm' ) + LANGNAME="`gettext "Bambara"`" + ;; + + 'bn' ) + LANGNAME="`gettext "Bengali"`" + ;; + + 'bo' ) + LANGNAME="`gettext "Tibetan"`" + ;; + + 'br' ) + LANGNAME="`gettext "Breton"`" + ;; + + 'bs' ) + LANGNAME="`gettext "Bosnian"`" + ;; + + 'ca' ) + LANGNAME="`gettext "Catalan"`" + ;; + + 'ce' ) + LANGNAME="`gettext "Chechen"`" + ;; + + 'ch' ) + LANGNAME="`gettext "Chamorro"`" + ;; + + 'co' ) + LANGNAME="`gettext "Corsican"`" + ;; + + 'cr' ) + LANGNAME="`gettext "Cree"`" + ;; + + 'cs' ) + LANGNAME="`gettext "Czech"`" + ;; + + 'cu' ) + LANGNAME="`gettext "Church Slavic"`" + ;; + + 'cv' ) + LANGNAME="`gettext "Chuvash"`" + ;; + + 'cy' ) + LANGNAME="`gettext "Welsh"`" + ;; + + 'da' ) + LANGNAME="`gettext "Danish"`" + ;; + + 'de' ) + LANGNAME="`gettext "German"`" + ;; + + 'dv' ) + LANGNAME="`gettext "Divehi"`" + ;; + + 'dz' ) + LANGNAME="`gettext "Dzongkha"`" + ;; + + 'ee' ) + LANGNAME="`gettext "E'we"`" + ;; + + 'el' ) + LANGNAME="`gettext "Greek"`" + ;; + + 'en' ) + LANGNAME="`gettext "English"`" + ;; + + 'eo' ) + LANGNAME="`gettext "Esperanto"`" + ;; + + 'es' ) + LANGNAME="`gettext "Spanish"`" + ;; + + 'et' ) + LANGNAME="`gettext "Estonian"`" + ;; + + 'eu' ) + LANGNAME="`gettext "Basque"`" + ;; + 'fa' ) + LANGNAME="`gettext "Persian"`" + ;; + + 'ff' ) + LANGNAME="`gettext "Fulah"`" + ;; + + 'fi' ) + LANGNAME="`gettext "Finnish"`" + ;; + + 'fj' ) + LANGNAME="`gettext "Fijian"`" + ;; + + 'fo' ) + LANGNAME="`gettext "Faroese"`" + ;; + + 'fr' ) + LANGNAME="`gettext "French"`" + ;; + + 'fy' ) + LANGNAME="`gettext "Frisian"`" + ;; + + 'ga' ) + LANGNAME="`gettext "Irish"`" + ;; + + 'gd' ) + LANGNAME="`gettext "Scots"`" + ;; + + 'gl' ) + LANGNAME="`gettext "Gallegan"`" + ;; + + 'gn' ) + LANGNAME="`gettext "Guarani"`" + ;; + + 'gu' ) + LANGNAME="`gettext "Gujarati"`" + ;; + + 'gv' ) + LANGNAME="`gettext "Manx"`" + ;; + + 'ha' ) + LANGNAME="`gettext "Hausa"`" + ;; + + 'he' ) + LANGNAME="`gettext "Hebrew"`" + ;; + + 'hi' ) + LANGNAME="`gettext "Hindi"`" + ;; + + 'ho' ) + LANGNAME="`gettext "Hiri Motu"`" + ;; + + 'hr' ) + LANGNAME="`gettext "Croatian"`" + ;; + + 'ht' ) + LANGNAME="`gettext "Haitian"`" + ;; + + 'hu' ) + LANGNAME="`gettext "Hungarian"`" + ;; + + 'hy' ) + LANGNAME="`gettext "Armenian"`" + ;; + + 'hz' ) + LANGNAME="`gettext "Herero"`" + ;; + + 'ia' ) + LANGNAME="`gettext "Interlingua"`" + ;; + + 'id' ) + LANGNAME="`gettext "Indonesian"`" + ;; + + 'ie' ) + LANGNAME="`gettext "Interlingue"`" + ;; + + 'ig' ) + LANGNAME="`gettext "Igbo"`" + ;; + + 'ii' ) + LANGNAME="`gettext "Sichuan Yi"`" + ;; + + 'ik' ) + LANGNAME="`gettext "Inupiak"`" + ;; + + 'io' ) + LANGNAME="`gettext "Ido"`" + ;; + + 'is' ) + LANGNAME="`gettext "Icelandic"`" + ;; + + 'it' ) + LANGNAME="`gettext "Italian"`" + ;; + + 'iu' ) + LANGNAME="`gettext "Inuktitut"`" + ;; + + 'ja' ) + LANGNAME="`gettext "Japanese"`" + ;; + + 'jv' ) + LANGNAME="`gettext "Javanese"`" + ;; + + 'ka' ) + LANGNAME="`gettext "Georgian"`" + ;; + + 'kg' ) + LANGNAME="`gettext "Kongo"`" + ;; + + 'ki' ) + LANGNAME="`gettext "Kikuyu"`" + ;; + + 'kj' ) + LANGNAME="`gettext "Kuanyama"`" + ;; + + 'kk' ) + LANGNAME="`gettext "Kazakh"`" + ;; + + 'kl' ) + LANGNAME="`gettext "Kalaallisut"`" + ;; + + 'km' ) + LANGNAME="`gettext "Khmer"`" + ;; + + 'kn' ) + LANGNAME="`gettext "Kannada"`" + ;; + + 'ko' ) + LANGNAME="`gettext "Korean"`" + ;; + + 'kr' ) + LANGNAME="`gettext "Kanuri"`" + ;; + + 'ks' ) + LANGNAME="`gettext "Kashmiri"`" + ;; + + 'ku' ) + LANGNAME="`gettext "Kurdish"`" + ;; + + 'kv' ) + LANGNAME="`gettext "Komi"`" + ;; + + 'kw' ) + LANGNAME="`gettext "Cornish"`" + ;; + + 'ky' ) + LANGNAME="`gettext "Kirghiz"`" + ;; + + 'la' ) + LANGNAME="`gettext "Latin"`" + ;; + + 'lb' ) + LANGNAME="`gettext "Letzeburgesch"`" + ;; + + 'lg' ) + LANGNAME="`gettext "Ganda"`" + ;; + + 'li' ) + LANGNAME="`gettext "Limburgish"`" + ;; + + 'ln' ) + LANGNAME="`gettext "Lingala"`" + ;; + + 'lo' ) + LANGNAME="`gettext "Lao"`" + ;; + + 'lt' ) + LANGNAME="`gettext "Lithuanian"`" + ;; + + 'lu' ) + LANGNAME="`gettext "Luba-Katanga"`" + ;; + + 'lv' ) + LANGNAME="`gettext "Latvian"`" + ;; + + 'mg' ) + LANGNAME="`gettext "Malagasy"`" + ;; + + 'mh' ) + LANGNAME="`gettext "Marshall"`" + ;; + + 'mi' ) + LANGNAME="`gettext "Maori"`" + ;; + + 'mk' ) + LANGNAME="`gettext "Macedonian"`" + ;; + + 'ml' ) + LANGNAME="`gettext "Malayalam"`" + ;; + + 'mn' ) + LANGNAME="`gettext "Mongolian"`" + ;; + + 'mo' ) + LANGNAME="`gettext "Moldavian"`" + ;; + + 'mr' ) + LANGNAME="`gettext "Marathi"`" + ;; + + 'ms' ) + LANGNAME="`gettext "Malay"`" + ;; + + 'mt' ) + LANGNAME="`gettext "Maltese"`" + ;; + + 'my' ) + LANGNAME="`gettext "Burmese"`" + ;; + + 'na' ) + LANGNAME="`gettext "Nauru"`" + ;; + + 'nb' ) + LANGNAME="`gettext "Norwegian Bokmaal"`" + ;; + + 'nd' ) + LANGNAME="`gettext "Ndebele, North"`" + ;; + + 'ne' ) + LANGNAME="`gettext "Nepali"`" + ;; + + 'ng' ) + LANGNAME="`gettext "Ndonga"`" + ;; + + 'nl' ) + LANGNAME="`gettext "Dutch"`" + ;; + + 'nn' ) + LANGNAME="`gettext "Norwegian Nynorsk"`" + ;; + + 'no' ) + LANGNAME="`gettext "Norwegian"`" + ;; + + 'nr' ) + LANGNAME="`gettext "Ndebele, South"`" + ;; + + 'nv' ) + LANGNAME="`gettext "Navajo"`" + ;; + + 'ny' ) + LANGNAME="`gettext "Chichewa"`" + ;; + + 'oc' ) + LANGNAME="`gettext "Occitan"`" + ;; + + 'oj' ) + LANGNAME="`gettext "Ojibwa"`" + ;; + + 'om' ) + LANGNAME="`gettext "(Afan) Oromo"`" + ;; + + 'or' ) + LANGNAME="`gettext "Oriya"`" + ;; + + 'os' ) + LANGNAME="`gettext "Ossetian; Ossetic"`" + ;; + + 'pa' ) + LANGNAME="`gettext "Panjabi; Punjabi"`" + ;; + + 'pi' ) + LANGNAME="`gettext "Pali"`" + ;; + + 'pl' ) + LANGNAME="`gettext "Polish"`" + ;; + + 'ps' ) + LANGNAME="`gettext "Pashto, Pushto"`" + ;; + + 'pt' ) + LANGNAME="`gettext "Portuguese"`" + ;; + + 'qu' ) + LANGNAME="`gettext "Quechua"`" + ;; + + 'rm' ) + LANGNAME="`gettext "Rhaeto-Romance"`" + ;; + + 'rn' ) + LANGNAME="`gettext "Rundi"`" + ;; + + 'ro' ) + LANGNAME="`gettext "Romanian"`" + ;; + + 'ru' ) + LANGNAME="`gettext "Russian"`" + ;; + + 'rw' ) + LANGNAME="`gettext "Kinyarwanda"`" + ;; + + 'sa' ) + LANGNAME="`gettext "Sanskrit"`" + ;; + + 'sc' ) + LANGNAME="`gettext "Sardinian"`" + ;; + + 'sd' ) + LANGNAME="`gettext "Sindhi"`" + ;; + + 'se' ) + LANGNAME="`gettext "Northern Sami"`" + ;; + + 'sg' ) + LANGNAME="`gettext "Sango; Sangro"`" + ;; + + 'si' ) + LANGNAME="`gettext "Sinhalese"`" + ;; + + 'sk' ) + LANGNAME="`gettext "Slovak"`" + ;; + + 'sl' ) + LANGNAME="`gettext "Slovenian"`" + ;; + + 'sm' ) + LANGNAME="`gettext "Samoan"`" + ;; + + 'sn' ) + LANGNAME="`gettext "Shona"`" + ;; + + 'so' ) + LANGNAME="`gettext "Somali"`" + ;; + + 'sq' ) + LANGNAME="`gettext "Albanian"`" + ;; + + 'sr' ) + LANGNAME="`gettext "Serbian"`" + ;; + + 'ss' ) + LANGNAME="`gettext "Swati; Siswati"`" + ;; + + 'st' ) + LANGNAME="`gettext "Sesotho; Sotho, Southern"`" + ;; + + 'su' ) + LANGNAME="`gettext "Sundanese"`" + ;; + + 'sv' ) + LANGNAME="`gettext "Swedish"`" + ;; + + 'sw' ) + LANGNAME="`gettext "Swahili"`" + ;; + + 'ta' ) + LANGNAME="`gettext "Tamil"`" + ;; + + 'te' ) + LANGNAME="`gettext "Telugu"`" + ;; + + 'tg' ) + LANGNAME="`gettext "Tajik"`" + ;; + + 'th' ) + LANGNAME="`gettext "Thai"`" + ;; + + 'ti' ) + LANGNAME="`gettext "Tigrinya"`" + ;; + + 'tk' ) + LANGNAME="`gettext "Turkmen"`" + ;; + + 'tl' ) + LANGNAME="`gettext "Tagalog"`" + ;; + + 'tn' ) + LANGNAME="`gettext "Tswana; Setswana"`" + ;; + + 'to' ) + LANGNAME="`gettext "Tonga (?)"`" + ;; + + 'tr' ) + LANGNAME="`gettext "Turkish"`" + ;; + + 'ts' ) + LANGNAME="`gettext "Tsonga"`" + ;; + + + 'tt' ) + LANGNAME="`gettext "Tatar"`" + ;; + + 'tw' ) + LANGNAME="`gettext "Twi"`" + ;; + + 'ty' ) + LANGNAME="`gettext "Tahitian"`" + ;; + + 'ug' ) + LANGNAME="`gettext "Uighur"`" + ;; + + 'uk' ) + LANGNAME="`gettext "Ukrainian"`" + ;; + + 'ur' ) + LANGNAME="`gettext "Urdu"`" + ;; + + 'uz' ) + LANGNAME="`gettext "Uzbek"`" + ;; + + 've' ) + LANGNAME="`gettext "Venda"`" + ;; + + 'vi' ) + LANGNAME="`gettext "Vietnamese"`" + ;; + + 'vo' ) + LANGNAME="`gettext "Volapuk; Volapuk"`" + ;; + + 'wa' ) + LANGNAME="`gettext "Walloon"`" + ;; + + 'wo' ) + LANGNAME="`gettext "Wolof"`" + ;; + + 'xh' ) + LANGNAME="`gettext "Xhosa"`" + ;; + + 'yi' ) + LANGNAME="`gettext "Yiddish (formerly ji)"`" + ;; + + 'yo' ) + LANGNAME="`gettext "Yoruba"`" + ;; + + 'za' ) + LANGNAME="`gettext "Zhuang"`" + ;; + + 'zh' ) + LANGNAME="`gettext "Chinese"`" + ;; + + 'zu' ) + LANGNAME="`gettext "Zulu"`" + ;; + + esac + + echo ${LANGNAME} + +} diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_setPoMetadata.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_setPoMetadata.sh new file mode 100755 index 0000000..3159f5c --- /dev/null +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/update_setPoMetadata.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +function update_setPoMetadata { + + local COUNT=0 + local -a SRC + local -a DST + + # Retrieve absolute path of portable object we'll work with. + local PO_FILE="${1}" + + # Check existence of file before work with it. + tcar_checkFiles -ef "${PO_FILE}" + + # Define pattern lines. The pattern lines are put inside portable + # objects through xgettext and xml2po commands. In the case of + # Last-Translators, be sure to remplace it only when it is empty + # or refer the Documentation SIG only. This way translators' names + # will survive metadata updates. We don't want they have to type + # their name each time they edit a file. + SRC[0]="\"Project-Id-Version: (.+)?" + SRC[1]="\"Last-Translator: (.+)?" + SRC[2]="\"Language-Team: (.+)?" + SRC[3]="\"PO-Revision-Date: (.+)?" + + # Define replacement lines for pattern line. + DST[0]="\"Project-Id-Version: ${TCAR_SCRIPT_NAME} ${TCAR_SCRIPT_VERSION}\\\n\"" + DST[1]="\"Last-Translator: Localization SIG \\\n\"" + DST[2]="\"Language-Team: $(update_getLanguageName)\\\n\"" + DST[3]="\"PO-Revision-Date: $(date "+%F %H:%M%z")\\\n\"" + + # Change pattern lines with their replacement lines. + while [[ ${COUNT} -lt ${#SRC[*]} ]];do + sed -i -r "/${SRC[${COUNT}]}/c${DST[${COUNT}]}" ${PO_FILE} + COUNT=$((${COUNT} + 1)) + done + + # Replace package information using gettext domain information. + sed -i -r "s/PACKAGE/${TCAR_SCRIPT_NAME}-${TCAR_SCRIPT_VERSION}/g" ${PO_FILE} + + # Remove absolute path to the working copy so it doesn't appear on + # comments related to locations. Remember that people can download + # their working copies in different locations and we don't want to + # version those changes each time a translation message be + # updated. To be consistent about this, show path information from + # first level on. Don't show the variable part of the path. + sed -i -r "s,${TCAR_BASEDIR}/,,g" ${PO_FILE} + + # Unset array variables to avoid undesired concatenations. + unset SRC + unset DST + +} diff --git a/Automation/Modules/Locale/locale_convertPoToMo.sh b/Automation/Modules/Locale/locale_convertPoToMo.sh deleted file mode 100755 index a9e8d42..0000000 --- a/Automation/Modules/Locale/locale_convertPoToMo.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -function locale_convertPoToMo { - - # Print action message. - tcar_printMessage "${MO_FILE}" --as-creating-line - - # Verify absolute path to machine object directory, if it doesn't - # exist create it. - if [[ ! -d $(dirname ${MO_FILE}) ]];then - mkdir -p $(dirname ${MO_FILE}) - fi - - # Create machine object from portable object. - msgfmt --check ${PO_FILE} --output-file=${MO_FILE} - -} diff --git a/Automation/Modules/Locale/locale_convertPotToPo.sh b/Automation/Modules/Locale/locale_convertPotToPo.sh deleted file mode 100755 index e428261..0000000 --- a/Automation/Modules/Locale/locale_convertPotToPo.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -function locale_convertPotToPo { - - local POT_FILE="${1}" - local PO_FILE="${2}" - - # Verify the portable object template. The portable object - # template is used to create the portable object. We cannot - # continue without it. - tcar_checkFiles -ef ${POT_FILE} - - # Create the PO's parent directory if it doesn't exist. - if [[ ! -d $(dirname ${PO_FILE}) ]];then - mkdir -p $(dirname ${PO_FILE}) - fi - - # Print action message. - tcar_printMessage "${PO_FILE}" --as-creating-line - - # Verify existence of portable object. The portable object is the - # file translators edit in order to make translation works. - if [[ -f ${PO_FILE} ]];then - - # Update portable object merging both portable object and - # portable object template. - msgmerge --output-file="${PO_FILE}" "${PO_FILE}" "${POT_FILE}" --quiet - - else - - # Initiate portable object using portable object template. - # Do not print msginit sterr output, use centos-art action - # message instead. - msginit -i ${POT_FILE} -o ${PO_FILE} --width=70 \ - --no-translator > /dev/null 2>&1 - - fi - - # Sanitate metadata inside the PO file. - locale_updatePoMetadata "${PO_FILE}" - -} diff --git a/Automation/Modules/Locale/locale_convertXmlToPot.sh b/Automation/Modules/Locale/locale_convertXmlToPot.sh deleted file mode 100755 index 67b5c7b..0000000 --- a/Automation/Modules/Locale/locale_convertXmlToPot.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -function locale_convertXmlToPot { - - local XML_FILE=${1} - local POT_FILE=${2} - - cat ${XML_FILE} | xml2po -a -l ${TCAR_SCRIPT_LANG_LC} - \ - | msgcat --output-file=${POT_FILE} --width=70 --no-location - - -} diff --git a/Automation/Modules/Locale/locale_getCountryName.sh b/Automation/Modules/Locale/locale_getCountryName.sh deleted file mode 100755 index 3795f70..0000000 --- a/Automation/Modules/Locale/locale_getCountryName.sh +++ /dev/null @@ -1,731 +0,0 @@ -#!/bin/bash - -function locale_getCountryName { - - local COUNTRYNAME="`gettext "Unknown"`" - - case ${CLI_LANG_CC} in - - 'AD' ) - COUNTRYNAME="`gettext "Andorra"`" - ;; - 'AE' ) - COUNTRYNAME="`gettext "United Arab Emirates"`" - ;; - 'AF' ) - COUNTRYNAME="`gettext "Afghanistan"`" - ;; - 'AG' ) - COUNTRYNAME="`gettext "Antigua and Barbuda"`" - ;; - 'AI' ) - COUNTRYNAME="`gettext "Anguilla"`" - ;; - 'AL' ) - COUNTRYNAME="`gettext "Albania"`" - ;; - 'AM' ) - COUNTRYNAME="`gettext "Armenia"`" - ;; - 'AN' ) - COUNTRYNAME="`gettext "Netherlands Antilles"`" - ;; - 'AO' ) - COUNTRYNAME="`gettext "Angola"`" - ;; - 'AQ' ) - COUNTRYNAME="`gettext "Antarctica"`" - ;; - 'AR' ) - COUNTRYNAME="`gettext "Argentina"`" - ;; - 'AS' ) - COUNTRYNAME="`gettext "Samoa (American)"`" - ;; - 'AT' ) - COUNTRYNAME="`gettext "Austria"`" - ;; - 'AU' ) - COUNTRYNAME="`gettext "Australia"`" - ;; - 'AW' ) - COUNTRYNAME="`gettext "Aruba"`" - ;; - 'AZ' ) - COUNTRYNAME="`gettext "Azerbaijan"`" - ;; - 'BA' ) - COUNTRYNAME="`gettext "Bosnia and Herzegovina"`" - ;; - 'BB' ) - COUNTRYNAME="`gettext "Barbados"`" - ;; - 'BD' ) - COUNTRYNAME="`gettext "Bangladesh"`" - ;; - 'BE' ) - COUNTRYNAME="`gettext "Belgium"`" - ;; - 'BF' ) - COUNTRYNAME="`gettext "Burkina Faso"`" - ;; - 'BG' ) - COUNTRYNAME="`gettext "Bulgaria"`" - ;; - 'BH' ) - COUNTRYNAME="`gettext "Bahrain"`" - ;; - 'BI' ) - COUNTRYNAME="`gettext "Burundi"`" - ;; - 'BJ' ) - COUNTRYNAME="`gettext "Benin"`" - ;; - 'BM' ) - COUNTRYNAME="`gettext "Bermuda"`" - ;; - 'BN' ) - COUNTRYNAME="`gettext "Brunei"`" - ;; - 'BO' ) - COUNTRYNAME="`gettext "Bolivia"`" - ;; - 'BR' ) - COUNTRYNAME="`gettext "Brazil"`" - ;; - 'BS' ) - COUNTRYNAME="`gettext "Bahamas"`" - ;; - 'BT' ) - COUNTRYNAME="`gettext "Bhutan"`" - ;; - 'BV' ) - COUNTRYNAME="`gettext "Bouvet Island"`" - ;; - 'BW' ) - COUNTRYNAME="`gettext "Botswana"`" - ;; - 'BY' ) - COUNTRYNAME="`gettext "Belarus"`" - ;; - 'BZ' ) - COUNTRYNAME="`gettext "Belize"`" - ;; - 'CA' ) - COUNTRYNAME="`gettext "Canada"`" - ;; - 'CC' ) - COUNTRYNAME="`gettext "Cocos (Keeling) Islands"`" - ;; - 'CD' ) - COUNTRYNAME="`gettext "Congo (Dem. Rep.)"`" - ;; - 'CF' ) - COUNTRYNAME="`gettext "Central African Rep."`" - ;; - 'CG' ) - COUNTRYNAME="`gettext "Congo (Rep.)"`" - ;; - 'CH' ) - COUNTRYNAME="`gettext "Switzerland"`" - ;; - 'CI' ) - COUNTRYNAME="`gettext "Co^te d'Ivoire"`" - ;; - 'CK' ) - COUNTRYNAME="`gettext "Cook Islands"`" - ;; - 'CL' ) - COUNTRYNAME="`gettext "Chile"`" - ;; - 'CM' ) - COUNTRYNAME="`gettext "Cameroon"`" - ;; - 'CN' ) - COUNTRYNAME="`gettext "China"`" - ;; - 'CO' ) - COUNTRYNAME="`gettext "Colombia"`" - ;; - 'CR' ) - COUNTRYNAME="`gettext "Costa Rica"`" - ;; - 'CS' ) - COUNTRYNAME="`gettext "Serbia and Montenegro"`" - ;; - 'CU' ) - COUNTRYNAME="`gettext "Cuba"`" - ;; - 'CV' ) - COUNTRYNAME="`gettext "Cape Verde"`" - ;; - 'CX' ) - COUNTRYNAME="`gettext "Christmas Island"`" - ;; - 'CY' ) - COUNTRYNAME="`gettext "Cyprus"`" - ;; - 'CZ' ) - COUNTRYNAME="`gettext "Czech Republic"`" - ;; - 'DE' ) - COUNTRYNAME="`gettext "Germany"`" - ;; - 'DJ' ) - COUNTRYNAME="`gettext "Djibouti"`" - ;; - 'DK' ) - COUNTRYNAME="`gettext "Denmark"`" - ;; - 'DM' ) - COUNTRYNAME="`gettext "Dominica"`" - ;; - 'DO' ) - COUNTRYNAME="`gettext "Dominican Republic"`" - ;; - 'DZ' ) - COUNTRYNAME="`gettext "Algeria"`" - ;; - 'EC' ) - COUNTRYNAME="`gettext "Ecuador"`" - ;; - 'EE' ) - COUNTRYNAME="`gettext "Estonia"`" - ;; - 'EG' ) - COUNTRYNAME="`gettext "Egypt"`" - ;; - 'EH' ) - COUNTRYNAME="`gettext "Western Sahara"`" - ;; - 'ER' ) - COUNTRYNAME="`gettext "Eritrea"`" - ;; - 'ES' ) - COUNTRYNAME="`gettext "Spain"`" - ;; - 'ET' ) - COUNTRYNAME="`gettext "Ethiopia"`" - ;; - 'FI' ) - COUNTRYNAME="`gettext "Finland"`" - ;; - 'FJ' ) - COUNTRYNAME="`gettext "Fiji"`" - ;; - 'FK' ) - COUNTRYNAME="`gettext "Falkland Islands"`" - ;; - 'FM' ) - COUNTRYNAME="`gettext "Micronesia"`" - ;; - 'FO' ) - COUNTRYNAME="`gettext "Faeroe Islands"`" - ;; - 'FR' ) - COUNTRYNAME="`gettext "France"`" - ;; - 'GA' ) - COUNTRYNAME="`gettext "Gabon"`" - ;; - 'GB' ) - COUNTRYNAME="`gettext "Britain (UK)"`" - ;; - 'GD' ) - COUNTRYNAME="`gettext "Grenada"`" - ;; - 'GE' ) - COUNTRYNAME="`gettext "Georgia"`" - ;; - 'GF' ) - COUNTRYNAME="`gettext "French Guiana"`" - ;; - 'GH' ) - COUNTRYNAME="`gettext "Ghana"`" - ;; - 'GI' ) - COUNTRYNAME="`gettext "Gibraltar"`" - ;; - 'GL' ) - COUNTRYNAME="`gettext "Greenland"`" - ;; - 'GM' ) - COUNTRYNAME="`gettext "Gambia"`" - ;; - 'GN' ) - COUNTRYNAME="`gettext "Guinea"`" - ;; - 'GP' ) - COUNTRYNAME="`gettext "Guadeloupe"`" - ;; - 'GQ' ) - COUNTRYNAME="`gettext "Equatorial Guinea"`" - ;; - 'GR' ) - COUNTRYNAME="`gettext "Greece"`" - ;; - 'GS' ) - COUNTRYNAME="`gettext "South Georgia and the South Sandwich Islands"`" - ;; - 'GT' ) - COUNTRYNAME="`gettext "Guatemala"`" - ;; - 'GU' ) - COUNTRYNAME="`gettext "Guam"`" - ;; - 'GW' ) - COUNTRYNAME="`gettext "Guinea-Bissau"`" - ;; - 'GY' ) - COUNTRYNAME="`gettext "Guyana"`" - ;; - 'HK' ) - COUNTRYNAME="`gettext "Hong Kong"`" - ;; - 'HM' ) - COUNTRYNAME="`gettext "Heard Island and McDonald Islands"`" - ;; - 'HN' ) - COUNTRYNAME="`gettext "Honduras"`" - ;; - 'HR' ) - COUNTRYNAME="`gettext "Croatia"`" - ;; - 'HT' ) - COUNTRYNAME="`gettext "Haiti"`" - ;; - 'HU' ) - COUNTRYNAME="`gettext "Hungary"`" - ;; - 'ID' ) - COUNTRYNAME="`gettext "Indonesia"`" - ;; - 'IE' ) - COUNTRYNAME="`gettext "Ireland"`" - ;; - 'IL' ) - COUNTRYNAME="`gettext "Israel"`" - ;; - 'IN' ) - COUNTRYNAME="`gettext "India"`" - ;; - 'IO' ) - COUNTRYNAME="`gettext "British Indian Ocean Territory"`" - ;; - 'IQ' ) - COUNTRYNAME="`gettext "Iraq"`" - ;; - 'IR' ) - COUNTRYNAME="`gettext "Iran"`" - ;; - 'IS' ) - COUNTRYNAME="`gettext "Iceland"`" - ;; - 'IT' ) - COUNTRYNAME="`gettext "Italy"`" - ;; - 'JM' ) - COUNTRYNAME="`gettext "Jamaica"`" - ;; - 'JO' ) - COUNTRYNAME="`gettext "Jordan"`" - ;; - 'JP' ) - COUNTRYNAME="`gettext "Japan"`" - ;; - 'KE' ) - COUNTRYNAME="`gettext "Kenya"`" - ;; - 'KG' ) - COUNTRYNAME="`gettext "Kyrgyzstan"`" - ;; - 'KH' ) - COUNTRYNAME="`gettext "Cambodia"`" - ;; - 'KI' ) - COUNTRYNAME="`gettext "Kiribati"`" - ;; - 'KM' ) - COUNTRYNAME="`gettext "Comoros"`" - ;; - 'KN' ) - COUNTRYNAME="`gettext "St Kitts and Nevis"`" - ;; - 'KP' ) - COUNTRYNAME="`gettext "Korea (North)"`" - ;; - 'KR' ) - COUNTRYNAME="`gettext "Korea (South)"`" - ;; - 'KW' ) - COUNTRYNAME="`gettext "Kuwait"`" - ;; - 'KY' ) - COUNTRYNAME="`gettext "Cayman Islands"`" - ;; - 'KZ' ) - COUNTRYNAME="`gettext "Kazakhstan"`" - ;; - 'LA' ) - COUNTRYNAME="`gettext "Laos"`" - ;; - 'LB' ) - COUNTRYNAME="`gettext "Lebanon"`" - ;; - 'LC' ) - COUNTRYNAME="`gettext "St Lucia"`" - ;; - 'LI' ) - COUNTRYNAME="`gettext "Liechtenstein"`" - ;; - 'LK' ) - COUNTRYNAME="`gettext "Sri Lanka"`" - ;; - 'LR' ) - COUNTRYNAME="`gettext "Liberia"`" - ;; - 'LS' ) - COUNTRYNAME="`gettext "Lesotho"`" - ;; - 'LT' ) - COUNTRYNAME="`gettext "Lithuania"`" - ;; - 'LU' ) - COUNTRYNAME="`gettext "Luxembourg"`" - ;; - 'LV' ) - COUNTRYNAME="`gettext "Latvia"`" - ;; - 'LY' ) - COUNTRYNAME="`gettext "Libya"`" - ;; - 'MA' ) - COUNTRYNAME="`gettext "Morocco"`" - ;; - 'MC' ) - COUNTRYNAME="`gettext "Monaco"`" - ;; - 'MD' ) - COUNTRYNAME="`gettext "Moldova"`" - ;; - 'MG' ) - COUNTRYNAME="`gettext "Madagascar"`" - ;; - 'MH' ) - COUNTRYNAME="`gettext "Marshall Islands"`" - ;; - 'MK' ) - COUNTRYNAME="`gettext "Macedonia"`" - ;; - 'ML' ) - COUNTRYNAME="`gettext "Mali"`" - ;; - 'MM' ) - COUNTRYNAME="`gettext "Myanmar (Burma)"`" - ;; - 'MN' ) - COUNTRYNAME="`gettext "Mongolia"`" - ;; - 'MO' ) - COUNTRYNAME="`gettext "Macao"`" - ;; - 'MP' ) - COUNTRYNAME="`gettext "Northern Mariana Islands"`" - ;; - 'MQ' ) - COUNTRYNAME="`gettext "Martinique"`" - ;; - 'MR' ) - COUNTRYNAME="`gettext "Mauritania"`" - ;; - 'MS' ) - COUNTRYNAME="`gettext "Montserrat"`" - ;; - 'MT' ) - COUNTRYNAME="`gettext "Malta"`" - ;; - 'MU' ) - COUNTRYNAME="`gettext "Mauritius"`" - ;; - 'MV' ) - COUNTRYNAME="`gettext "Maldives"`" - ;; - 'MW' ) - COUNTRYNAME="`gettext "Malawi"`" - ;; - 'MX' ) - COUNTRYNAME="`gettext "Mexico"`" - ;; - 'MY' ) - COUNTRYNAME="`gettext "Malaysia"`" - ;; - 'MZ' ) - COUNTRYNAME="`gettext "Mozambique"`" - ;; - 'NA' ) - COUNTRYNAME="`gettext "Namibia"`" - ;; - 'NC' ) - COUNTRYNAME="`gettext "New Caledonia"`" - ;; - 'NE' ) - COUNTRYNAME="`gettext "Niger"`" - ;; - 'NF' ) - COUNTRYNAME="`gettext "Norfolk Island"`" - ;; - 'NG' ) - COUNTRYNAME="`gettext "Nigeria"`" - ;; - 'NI' ) - COUNTRYNAME="`gettext "Nicaragua"`" - ;; - 'NL' ) - COUNTRYNAME="`gettext "Netherlands"`" - ;; - 'NO' ) - COUNTRYNAME="`gettext "Norway"`" - ;; - 'NP' ) - COUNTRYNAME="`gettext "Nepal"`" - ;; - 'NR' ) - COUNTRYNAME="`gettext "Nauru"`" - ;; - 'NU' ) - COUNTRYNAME="`gettext "Niue"`" - ;; - 'NZ' ) - COUNTRYNAME="`gettext "New Zealand"`" - ;; - 'OM' ) - COUNTRYNAME="`gettext "Oman"`" - ;; - 'PA' ) - COUNTRYNAME="`gettext "Panama"`" - ;; - 'PE' ) - COUNTRYNAME="`gettext "Peru"`" - ;; - 'PF' ) - COUNTRYNAME="`gettext "French Polynesia"`" - ;; - 'PG' ) - COUNTRYNAME="`gettext "Papua New Guinea"`" - ;; - 'PH' ) - COUNTRYNAME="`gettext "Philippines"`" - ;; - 'PK' ) - COUNTRYNAME="`gettext "Pakistan"`" - ;; - 'PL' ) - COUNTRYNAME="`gettext "Poland"`" - ;; - 'PM' ) - COUNTRYNAME="`gettext "St Pierre and Miquelon"`" - ;; - 'PN' ) - COUNTRYNAME="`gettext "Pitcairn"`" - ;; - 'PR' ) - COUNTRYNAME="`gettext "Puerto Rico"`" - ;; - 'PS' ) - COUNTRYNAME="`gettext "Palestine"`" - ;; - 'PT' ) - COUNTRYNAME="`gettext "Portugal"`" - ;; - 'PW' ) - COUNTRYNAME="`gettext "Palau"`" - ;; - 'PY' ) - COUNTRYNAME="`gettext "Paraguay"`" - ;; - 'QA' ) - COUNTRYNAME="`gettext "Qatar"`" - ;; - 'RE' ) - COUNTRYNAME="`gettext "Reunion"`" - ;; - 'RO' ) - COUNTRYNAME="`gettext "Romania"`" - ;; - 'RU' ) - COUNTRYNAME="`gettext "Russia"`" - ;; - 'RW' ) - COUNTRYNAME="`gettext "Rwanda"`" - ;; - 'SA' ) - COUNTRYNAME="`gettext "Saudi Arabia"`" - ;; - 'SB' ) - COUNTRYNAME="`gettext "Solomon Islands"`" - ;; - 'SC' ) - COUNTRYNAME="`gettext "Seychelles"`" - ;; - 'SD' ) - COUNTRYNAME="`gettext "Sudan"`" - ;; - 'SE' ) - COUNTRYNAME="`gettext "Sweden"`" - ;; - 'SG' ) - COUNTRYNAME="`gettext "Singapore"`" - ;; - 'SH' ) - COUNTRYNAME="`gettext "St Helena"`" - ;; - 'SI' ) - COUNTRYNAME="`gettext "Slovenia"`" - ;; - 'SJ' ) - COUNTRYNAME="`gettext "Svalbard and Jan Mayen"`" - ;; - 'SK' ) - COUNTRYNAME="`gettext "Slovakia"`" - ;; - 'SL' ) - COUNTRYNAME="`gettext "Sierra Leone"`" - ;; - 'SM' ) - COUNTRYNAME="`gettext "San Marino"`" - ;; - 'SN' ) - COUNTRYNAME="`gettext "Senegal"`" - ;; - 'SO' ) - COUNTRYNAME="`gettext "Somalia"`" - ;; - 'SR' ) - COUNTRYNAME="`gettext "Suriname"`" - ;; - 'ST' ) - COUNTRYNAME="`gettext "Sao Tome and Principe"`" - ;; - 'SV' ) - COUNTRYNAME="`gettext "El Salvador"`" - ;; - 'SY' ) - COUNTRYNAME="`gettext "Syria"`" - ;; - 'SZ' ) - COUNTRYNAME="`gettext "Swaziland"`" - ;; - 'TC' ) - COUNTRYNAME="`gettext "Turks and Caicos Islands"`" - ;; - 'TD' ) - COUNTRYNAME="`gettext "Chad"`" - ;; - 'TF' ) - COUNTRYNAME="`gettext "French Southern and Antarctic Lands"`" - ;; - 'TG' ) - COUNTRYNAME="`gettext "Togo"`" - ;; - 'TH' ) - COUNTRYNAME="`gettext "Thailand"`" - ;; - 'TJ' ) - COUNTRYNAME="`gettext "Tajikistan"`" - ;; - 'TK' ) - COUNTRYNAME="`gettext "Tokelau"`" - ;; - 'TL' ) - COUNTRYNAME="`gettext "Timor-Leste"`" - ;; - 'TM' ) - COUNTRYNAME="`gettext "Turkmenistan"`" - ;; - 'TN' ) - COUNTRYNAME="`gettext "Tunisia"`" - ;; - 'TO' ) - COUNTRYNAME="`gettext "Tonga"`" - ;; - 'TR' ) - COUNTRYNAME="`gettext "Turkey"`" - ;; - 'TT' ) - COUNTRYNAME="`gettext "Trinidad and Tobago"`" - ;; - 'TV' ) - COUNTRYNAME="`gettext "Tuvalu"`" - ;; - 'TW' ) - COUNTRYNAME="`gettext "Taiwan"`" - ;; - 'TZ' ) - COUNTRYNAME="`gettext "Tanzania"`" - ;; - 'UA' ) - COUNTRYNAME="`gettext "Ukraine"`" - ;; - 'UG' ) - COUNTRYNAME="`gettext "Uganda"`" - ;; - 'UM' ) - COUNTRYNAME="`gettext "US minor outlying islands"`" - ;; - 'US' ) - COUNTRYNAME="`gettext "United States"`" - ;; - 'UY' ) - COUNTRYNAME="`gettext "Uruguay"`" - ;; - 'UZ' ) - COUNTRYNAME="`gettext "Uzbekistan"`" - ;; - 'VA' ) - COUNTRYNAME="`gettext "Vatican City"`" - ;; - 'VC' ) - COUNTRYNAME="`gettext "St Vincent"`" - ;; - 'VE' ) - COUNTRYNAME="`gettext "Venezuela"`" - ;; - 'VG' ) - COUNTRYNAME="`gettext "Virgin Islands (UK)"`" - ;; - 'VI' ) - COUNTRYNAME="`gettext "Virgin Islands (US)"`" - ;; - 'VN' ) - COUNTRYNAME="`gettext "Vietnam"`" - ;; - 'VU' ) - COUNTRYNAME="`gettext "Vanuatu"`" - ;; - 'WF' ) - COUNTRYNAME="`gettext "Wallis and Futuna"`" - ;; - 'WS' ) - COUNTRYNAME="`gettext "Samoa (Western)"`" - ;; - 'YE' ) - COUNTRYNAME="`gettext "Yemen"`" - ;; - 'YT' ) - COUNTRYNAME="`gettext "Mayotte"`" - ;; - 'ZA' ) - COUNTRYNAME="`gettext "South Africa"`" - ;; - 'ZM' ) - COUNTRYNAME="`gettext "Zambia"`" - ;; - 'ZW' ) - COUNTRYNAME="`gettext "Zimbabwe"`" - ;; - - esac - - echo $COUNTRYNAME - -} diff --git a/Automation/Modules/Locale/locale_getLanguageName.sh b/Automation/Modules/Locale/locale_getLanguageName.sh deleted file mode 100755 index 42410ba..0000000 --- a/Automation/Modules/Locale/locale_getLanguageName.sh +++ /dev/null @@ -1,753 +0,0 @@ -#!/bin/bash - -function locale_getLanguageName { - - local LANGNAME="`gettext "Unknown"`" - - case ${TCAR_SCRIPT_LANG_LL} in - - 'aa' ) - LANGNAME="`gettext "Afar"`" - ;; - - 'ab' ) - LANGNAME="`gettext "Abkhazian"`" - ;; - - 'ae' ) - LANGNAME="`gettext "Avestan"`" - ;; - - 'af' ) - LANGNAME="`gettext "Afrikaans"`" - ;; - - 'ak' ) - LANGNAME="`gettext "Akan"`" - ;; - - 'am' ) - LANGNAME="`gettext "Amharic"`" - ;; - - 'an' ) - LANGNAME="`gettext "Aragonese"`" - ;; - - 'ar' ) - LANGNAME="`gettext "Arabic"`" - ;; - - 'as' ) - LANGNAME="`gettext "Assamese"`" - ;; - - 'av' ) - LANGNAME="`gettext "Avaric"`" - ;; - - 'ay' ) - LANGNAME="`gettext "Aymara"`" - ;; - - 'az' ) - LANGNAME="`gettext "Azerbaijani"`" - ;; - - 'ba' ) - LANGNAME="`gettext "Bashkir"`" - ;; - - 'be' ) - LANGNAME="`gettext "Byelorussian"`" - ;; - - 'bg' ) - LANGNAME="`gettext "Bulgarian"`" - ;; - - 'bh' ) - LANGNAME="`gettext "Bihari"`" - ;; - - 'bi' ) - LANGNAME="`gettext "Bislama"`" - ;; - - 'bm' ) - LANGNAME="`gettext "Bambara"`" - ;; - - 'bn' ) - LANGNAME="`gettext "Bengali"`" - ;; - - 'bo' ) - LANGNAME="`gettext "Tibetan"`" - ;; - - 'br' ) - LANGNAME="`gettext "Breton"`" - ;; - - 'bs' ) - LANGNAME="`gettext "Bosnian"`" - ;; - - 'ca' ) - LANGNAME="`gettext "Catalan"`" - ;; - - 'ce' ) - LANGNAME="`gettext "Chechen"`" - ;; - - 'ch' ) - LANGNAME="`gettext "Chamorro"`" - ;; - - 'co' ) - LANGNAME="`gettext "Corsican"`" - ;; - - 'cr' ) - LANGNAME="`gettext "Cree"`" - ;; - - 'cs' ) - LANGNAME="`gettext "Czech"`" - ;; - - 'cu' ) - LANGNAME="`gettext "Church Slavic"`" - ;; - - 'cv' ) - LANGNAME="`gettext "Chuvash"`" - ;; - - 'cy' ) - LANGNAME="`gettext "Welsh"`" - ;; - - 'da' ) - LANGNAME="`gettext "Danish"`" - ;; - - 'de' ) - LANGNAME="`gettext "German"`" - ;; - - 'dv' ) - LANGNAME="`gettext "Divehi"`" - ;; - - 'dz' ) - LANGNAME="`gettext "Dzongkha"`" - ;; - - 'ee' ) - LANGNAME="`gettext "E'we"`" - ;; - - 'el' ) - LANGNAME="`gettext "Greek"`" - ;; - - 'en' ) - LANGNAME="`gettext "English"`" - ;; - - 'eo' ) - LANGNAME="`gettext "Esperanto"`" - ;; - - 'es' ) - LANGNAME="`gettext "Spanish"`" - ;; - - 'et' ) - LANGNAME="`gettext "Estonian"`" - ;; - - 'eu' ) - LANGNAME="`gettext "Basque"`" - ;; - 'fa' ) - LANGNAME="`gettext "Persian"`" - ;; - - 'ff' ) - LANGNAME="`gettext "Fulah"`" - ;; - - 'fi' ) - LANGNAME="`gettext "Finnish"`" - ;; - - 'fj' ) - LANGNAME="`gettext "Fijian"`" - ;; - - 'fo' ) - LANGNAME="`gettext "Faroese"`" - ;; - - 'fr' ) - LANGNAME="`gettext "French"`" - ;; - - 'fy' ) - LANGNAME="`gettext "Frisian"`" - ;; - - 'ga' ) - LANGNAME="`gettext "Irish"`" - ;; - - 'gd' ) - LANGNAME="`gettext "Scots"`" - ;; - - 'gl' ) - LANGNAME="`gettext "Gallegan"`" - ;; - - 'gn' ) - LANGNAME="`gettext "Guarani"`" - ;; - - 'gu' ) - LANGNAME="`gettext "Gujarati"`" - ;; - - 'gv' ) - LANGNAME="`gettext "Manx"`" - ;; - - 'ha' ) - LANGNAME="`gettext "Hausa"`" - ;; - - 'he' ) - LANGNAME="`gettext "Hebrew"`" - ;; - - 'hi' ) - LANGNAME="`gettext "Hindi"`" - ;; - - 'ho' ) - LANGNAME="`gettext "Hiri Motu"`" - ;; - - 'hr' ) - LANGNAME="`gettext "Croatian"`" - ;; - - 'ht' ) - LANGNAME="`gettext "Haitian"`" - ;; - - 'hu' ) - LANGNAME="`gettext "Hungarian"`" - ;; - - 'hy' ) - LANGNAME="`gettext "Armenian"`" - ;; - - 'hz' ) - LANGNAME="`gettext "Herero"`" - ;; - - 'ia' ) - LANGNAME="`gettext "Interlingua"`" - ;; - - 'id' ) - LANGNAME="`gettext "Indonesian"`" - ;; - - 'ie' ) - LANGNAME="`gettext "Interlingue"`" - ;; - - 'ig' ) - LANGNAME="`gettext "Igbo"`" - ;; - - 'ii' ) - LANGNAME="`gettext "Sichuan Yi"`" - ;; - - 'ik' ) - LANGNAME="`gettext "Inupiak"`" - ;; - - 'io' ) - LANGNAME="`gettext "Ido"`" - ;; - - 'is' ) - LANGNAME="`gettext "Icelandic"`" - ;; - - 'it' ) - LANGNAME="`gettext "Italian"`" - ;; - - 'iu' ) - LANGNAME="`gettext "Inuktitut"`" - ;; - - 'ja' ) - LANGNAME="`gettext "Japanese"`" - ;; - - 'jv' ) - LANGNAME="`gettext "Javanese"`" - ;; - - 'ka' ) - LANGNAME="`gettext "Georgian"`" - ;; - - 'kg' ) - LANGNAME="`gettext "Kongo"`" - ;; - - 'ki' ) - LANGNAME="`gettext "Kikuyu"`" - ;; - - 'kj' ) - LANGNAME="`gettext "Kuanyama"`" - ;; - - 'kk' ) - LANGNAME="`gettext "Kazakh"`" - ;; - - 'kl' ) - LANGNAME="`gettext "Kalaallisut"`" - ;; - - 'km' ) - LANGNAME="`gettext "Khmer"`" - ;; - - 'kn' ) - LANGNAME="`gettext "Kannada"`" - ;; - - 'ko' ) - LANGNAME="`gettext "Korean"`" - ;; - - 'kr' ) - LANGNAME="`gettext "Kanuri"`" - ;; - - 'ks' ) - LANGNAME="`gettext "Kashmiri"`" - ;; - - 'ku' ) - LANGNAME="`gettext "Kurdish"`" - ;; - - 'kv' ) - LANGNAME="`gettext "Komi"`" - ;; - - 'kw' ) - LANGNAME="`gettext "Cornish"`" - ;; - - 'ky' ) - LANGNAME="`gettext "Kirghiz"`" - ;; - - 'la' ) - LANGNAME="`gettext "Latin"`" - ;; - - 'lb' ) - LANGNAME="`gettext "Letzeburgesch"`" - ;; - - 'lg' ) - LANGNAME="`gettext "Ganda"`" - ;; - - 'li' ) - LANGNAME="`gettext "Limburgish"`" - ;; - - 'ln' ) - LANGNAME="`gettext "Lingala"`" - ;; - - 'lo' ) - LANGNAME="`gettext "Lao"`" - ;; - - 'lt' ) - LANGNAME="`gettext "Lithuanian"`" - ;; - - 'lu' ) - LANGNAME="`gettext "Luba-Katanga"`" - ;; - - 'lv' ) - LANGNAME="`gettext "Latvian"`" - ;; - - 'mg' ) - LANGNAME="`gettext "Malagasy"`" - ;; - - 'mh' ) - LANGNAME="`gettext "Marshall"`" - ;; - - 'mi' ) - LANGNAME="`gettext "Maori"`" - ;; - - 'mk' ) - LANGNAME="`gettext "Macedonian"`" - ;; - - 'ml' ) - LANGNAME="`gettext "Malayalam"`" - ;; - - 'mn' ) - LANGNAME="`gettext "Mongolian"`" - ;; - - 'mo' ) - LANGNAME="`gettext "Moldavian"`" - ;; - - 'mr' ) - LANGNAME="`gettext "Marathi"`" - ;; - - 'ms' ) - LANGNAME="`gettext "Malay"`" - ;; - - 'mt' ) - LANGNAME="`gettext "Maltese"`" - ;; - - 'my' ) - LANGNAME="`gettext "Burmese"`" - ;; - - 'na' ) - LANGNAME="`gettext "Nauru"`" - ;; - - 'nb' ) - LANGNAME="`gettext "Norwegian Bokmaal"`" - ;; - - 'nd' ) - LANGNAME="`gettext "Ndebele, North"`" - ;; - - 'ne' ) - LANGNAME="`gettext "Nepali"`" - ;; - - 'ng' ) - LANGNAME="`gettext "Ndonga"`" - ;; - - 'nl' ) - LANGNAME="`gettext "Dutch"`" - ;; - - 'nn' ) - LANGNAME="`gettext "Norwegian Nynorsk"`" - ;; - - 'no' ) - LANGNAME="`gettext "Norwegian"`" - ;; - - 'nr' ) - LANGNAME="`gettext "Ndebele, South"`" - ;; - - 'nv' ) - LANGNAME="`gettext "Navajo"`" - ;; - - 'ny' ) - LANGNAME="`gettext "Chichewa"`" - ;; - - 'oc' ) - LANGNAME="`gettext "Occitan"`" - ;; - - 'oj' ) - LANGNAME="`gettext "Ojibwa"`" - ;; - - 'om' ) - LANGNAME="`gettext "(Afan) Oromo"`" - ;; - - 'or' ) - LANGNAME="`gettext "Oriya"`" - ;; - - 'os' ) - LANGNAME="`gettext "Ossetian; Ossetic"`" - ;; - - 'pa' ) - LANGNAME="`gettext "Panjabi; Punjabi"`" - ;; - - 'pi' ) - LANGNAME="`gettext "Pali"`" - ;; - - 'pl' ) - LANGNAME="`gettext "Polish"`" - ;; - - 'ps' ) - LANGNAME="`gettext "Pashto, Pushto"`" - ;; - - 'pt' ) - LANGNAME="`gettext "Portuguese"`" - ;; - - 'qu' ) - LANGNAME="`gettext "Quechua"`" - ;; - - 'rm' ) - LANGNAME="`gettext "Rhaeto-Romance"`" - ;; - - 'rn' ) - LANGNAME="`gettext "Rundi"`" - ;; - - 'ro' ) - LANGNAME="`gettext "Romanian"`" - ;; - - 'ru' ) - LANGNAME="`gettext "Russian"`" - ;; - - 'rw' ) - LANGNAME="`gettext "Kinyarwanda"`" - ;; - - 'sa' ) - LANGNAME="`gettext "Sanskrit"`" - ;; - - 'sc' ) - LANGNAME="`gettext "Sardinian"`" - ;; - - 'sd' ) - LANGNAME="`gettext "Sindhi"`" - ;; - - 'se' ) - LANGNAME="`gettext "Northern Sami"`" - ;; - - 'sg' ) - LANGNAME="`gettext "Sango; Sangro"`" - ;; - - 'si' ) - LANGNAME="`gettext "Sinhalese"`" - ;; - - 'sk' ) - LANGNAME="`gettext "Slovak"`" - ;; - - 'sl' ) - LANGNAME="`gettext "Slovenian"`" - ;; - - 'sm' ) - LANGNAME="`gettext "Samoan"`" - ;; - - 'sn' ) - LANGNAME="`gettext "Shona"`" - ;; - - 'so' ) - LANGNAME="`gettext "Somali"`" - ;; - - 'sq' ) - LANGNAME="`gettext "Albanian"`" - ;; - - 'sr' ) - LANGNAME="`gettext "Serbian"`" - ;; - - 'ss' ) - LANGNAME="`gettext "Swati; Siswati"`" - ;; - - 'st' ) - LANGNAME="`gettext "Sesotho; Sotho, Southern"`" - ;; - - 'su' ) - LANGNAME="`gettext "Sundanese"`" - ;; - - 'sv' ) - LANGNAME="`gettext "Swedish"`" - ;; - - 'sw' ) - LANGNAME="`gettext "Swahili"`" - ;; - - 'ta' ) - LANGNAME="`gettext "Tamil"`" - ;; - - 'te' ) - LANGNAME="`gettext "Telugu"`" - ;; - - 'tg' ) - LANGNAME="`gettext "Tajik"`" - ;; - - 'th' ) - LANGNAME="`gettext "Thai"`" - ;; - - 'ti' ) - LANGNAME="`gettext "Tigrinya"`" - ;; - - 'tk' ) - LANGNAME="`gettext "Turkmen"`" - ;; - - 'tl' ) - LANGNAME="`gettext "Tagalog"`" - ;; - - 'tn' ) - LANGNAME="`gettext "Tswana; Setswana"`" - ;; - - 'to' ) - LANGNAME="`gettext "Tonga (?)"`" - ;; - - 'tr' ) - LANGNAME="`gettext "Turkish"`" - ;; - - 'ts' ) - LANGNAME="`gettext "Tsonga"`" - ;; - - - 'tt' ) - LANGNAME="`gettext "Tatar"`" - ;; - - 'tw' ) - LANGNAME="`gettext "Twi"`" - ;; - - 'ty' ) - LANGNAME="`gettext "Tahitian"`" - ;; - - 'ug' ) - LANGNAME="`gettext "Uighur"`" - ;; - - 'uk' ) - LANGNAME="`gettext "Ukrainian"`" - ;; - - 'ur' ) - LANGNAME="`gettext "Urdu"`" - ;; - - 'uz' ) - LANGNAME="`gettext "Uzbek"`" - ;; - - 've' ) - LANGNAME="`gettext "Venda"`" - ;; - - 'vi' ) - LANGNAME="`gettext "Vietnamese"`" - ;; - - 'vo' ) - LANGNAME="`gettext "Volapuk; Volapuk"`" - ;; - - 'wa' ) - LANGNAME="`gettext "Walloon"`" - ;; - - 'wo' ) - LANGNAME="`gettext "Wolof"`" - ;; - - 'xh' ) - LANGNAME="`gettext "Xhosa"`" - ;; - - 'yi' ) - LANGNAME="`gettext "Yiddish (formerly ji)"`" - ;; - - 'yo' ) - LANGNAME="`gettext "Yoruba"`" - ;; - - 'za' ) - LANGNAME="`gettext "Zhuang"`" - ;; - - 'zh' ) - LANGNAME="`gettext "Chinese"`" - ;; - - 'zu' ) - LANGNAME="`gettext "Zulu"`" - ;; - - esac - - echo ${LANGNAME} - -} diff --git a/Automation/Modules/Locale/locale_updatePoMetadata.sh b/Automation/Modules/Locale/locale_updatePoMetadata.sh deleted file mode 100755 index 5115e54..0000000 --- a/Automation/Modules/Locale/locale_updatePoMetadata.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -function locale_updatePoMetadata { - - local COUNT=0 - local -a SRC - local -a DST - - # Retrieve absolute path of portable object we'll work with. - local PO_FILE="${1}" - - # Check existence of file before work with it. - tcar_checkFiles -ef "${PO_FILE}" - - # Define pattern lines. The pattern lines are put inside portable - # objects through xgettext and xml2po commands. In the case of - # Last-Translators, be sure to remplace it only when it is empty - # or refer the Documentation SIG only. This way translators' names - # will survive metadata updates. We don't want they have to type - # their name each time they edit a file. - SRC[0]="\"Project-Id-Version: (.+)?" - SRC[1]="\"Last-Translator: (.+)?" - SRC[2]="\"Language-Team: (.+)?" - SRC[3]="\"PO-Revision-Date: (.+)?" - - # Define replacement lines for pattern line. - DST[0]="\"Project-Id-Version: ${TCAR_SCRIPT_NAME} ${TCAR_SCRIPT_VERSION}\\\n\"" - DST[1]="\"Last-Translator: Localization SIG \\\n\"" - DST[2]="\"Language-Team: $(locale_getLanguageName)\\\n\"" - DST[3]="\"PO-Revision-Date: $(date "+%F %H:%M%z")\\\n\"" - - # Change pattern lines with their replacement lines. - while [[ ${COUNT} -lt ${#SRC[*]} ]];do - sed -i -r "/${SRC[${COUNT}]}/c${DST[${COUNT}]}" ${PO_FILE} - COUNT=$((${COUNT} + 1)) - done - - # Replace package information using gettext domain information. - sed -i -r "s/PACKAGE/${TCAR_SCRIPT_NAME}-${TCAR_SCRIPT_VERSION}/g" ${PO_FILE} - - # Remove absolute path to the working copy so it doesn't appear on - # comments related to locations. Remember that people can download - # their working copies in different locations and we don't want to - # version those changes each time a translation message be - # updated. To be consistent about this, show path information from - # first level on. Don't show the variable part of the path. - sed -i -r "s,${TCAR_BASEDIR}/,,g" ${PO_FILE} - - # Unset array variables to avoid undesired concatenations. - unset SRC - unset DST - -}