Commit 7d8e3d29 authored by Lutz Justen's avatar Lutz Justen Committed by Commit Bot

Fix ADM/ADML folder names

ADMX files were not loaded into the GPO editor properly for most
languages because the directory names were bad, e.g. should be 'it-IT'
instead of 'it'. This CL fixes the directory names according to the doc
mentioned in the bug below.

For a few languages the mapping was not clear:
'am', 'fil', 'ml'  - Not in doc; kept the old directory names
'ar' -> 'ar-EG'    - Picked EG as the biggest of the ~15 Arabic countries
'bn' -> 'ms-BN'    - Is this correct? There's no bn-XX in the doc.
'sr' -> 'Cy-sr-SP' - Is this correct? Translations look cyrillic.

BUG=chromium:806577
TEST=Changed components/policy/BUILD.gn to build for all platforms, ran
     ninja -C out/Release -j 2000 policy_templates
     Loaded de-DE into GPO editor on Windows

Change-Id: I574f6241b152c64943ec39442e2e23f7cae636cf
Reviewed-on: https://chromium-review.googlesource.com/893567Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Lutz Justen <ljusten@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533231}
parent 707aac9c
...@@ -11,62 +11,123 @@ ...@@ -11,62 +11,123 @@
policy_templates_base_dir = "$root_gen_dir/chrome/app/policy" policy_templates_base_dir = "$root_gen_dir/chrome/app/policy"
# Languages we're going to process. # Languages we're going to process. Should match the XX-YY of the translated
# policy_templates_XX-YY.json files, see policy_templates.grd.
policy_templates_languages = [ policy_templates_languages = [
"am", "am",
"ar", "ar-EG",
"bg", "bg-BG",
"bn", "ms-BN",
"ca", "ca-ES",
"cs", "cs-CZ",
"da", "da-DK",
"de", "de-DE",
"el", "el-GR",
"en-GB", "en-GB",
"en-US", "en-US",
"es", "es-ES",
"es-419", "es-419",
"et", "et-EE",
"fa", "fa-IR",
"fi", "fi-FI",
"fil", "fil",
"fr", "fr-FR",
"gu", "gu-IN",
"he", "he-IL",
"hi", "hi-IN",
"hr", "hr-HR",
"hu", "hu-HU",
"id", "id-ID",
"it", "it-IT",
"ja", "ja-JP",
"kn", "kn-IN",
"ko", "ko-KR",
"lt", "lt-LT",
"lv", "lv-LV",
"ml", "ml",
"mr", "mr-IN",
"ms", "ms-MY",
"nl", "nl-NL",
"nb", "nb-NO",
"pl", "pl-PL",
"pt-BR", "pt-BR",
"pt-PT", "pt-PT",
"ro", "ro-RO",
"ru", "ru-RU",
"sk", "sk-SK",
"sl", "sl-SI",
"sr", "Cy-sr-SP",
"sv", "sv-SE",
"sw", "sw-KE",
"ta", "ta-IN",
"te", "te-IN",
"th", "th-TH",
"tr", "tr-TR",
"uk", "uk-UA",
"vi", "vi-VN",
"zh-CN", "zh-CN",
"zh-TW", "zh-TW",
] ]
# Macs use a slightly different naming convention:
# - '_' instead of '-'
# - 'en' instead of 'en-US'
mac_policy_templates_languages = [
"am",
"ar_EG",
"bg_BG",
"ms_BN",
"ca_ES",
"cs_CZ",
"da_DK",
"de_DE",
"el_GR",
"en_GB",
"en",
"es_ES",
"es_419",
"et_EE",
"fa_IR",
"fi_FI",
"fil",
"fr_FR",
"gu_IN",
"he_IL",
"hi_IN",
"hr_HR",
"hu_HU",
"id_ID",
"it_IT",
"ja_JP",
"kn_IN",
"ko_KR",
"lt_LT",
"lv_LV",
"ml",
"mr_IN",
"ms_MY",
"nl_NL",
"nb_NO",
"pl_PL",
"pt_BR",
"pt_PT",
"ro_RO",
"ru_RU",
"sk_SK",
"sl_SI",
"Cy_sr_SP",
"sv_SE",
"sw_KE",
"ta_IN",
"te_IN",
"th_TH",
"tr_TR",
"uk_UA",
"vi_VN",
"zh_CN",
"zh_TW",
]
policy_templates_languages_str = "" policy_templates_languages_str = ""
foreach(lang, policy_templates_languages) { foreach(lang, policy_templates_languages) {
# Note: The final , is filtered out by scripts. There's no string.join here... # Note: The final , is filtered out by scripts. There's no string.join here...
...@@ -78,7 +139,9 @@ policy_templates_translation_json_path = ...@@ -78,7 +139,9 @@ policy_templates_translation_json_path =
"$policy_templates_base_dir/translations/policy_templates_\${lang}.json" "$policy_templates_base_dir/translations/policy_templates_\${lang}.json"
policy_templates_translation_outputs = [] policy_templates_translation_outputs = []
foreach(lang, policy_templates_languages) { foreach(lang, policy_templates_languages) {
policy_templates_translation_outputs += [ "$policy_templates_base_dir/translations/policy_templates_${lang}.json" ] policy_templates_translation_outputs += [
"$policy_templates_base_dir/translations/policy_templates_${lang}.json",
]
} }
# Android outputs. # Android outputs.
...@@ -91,7 +154,9 @@ policy_templates_doc_path = ...@@ -91,7 +154,9 @@ policy_templates_doc_path =
"$policy_templates_base_dir/common/html/\${lang}/chrome_policy_list.html" "$policy_templates_base_dir/common/html/\${lang}/chrome_policy_list.html"
policy_templates_common_outputs = [] policy_templates_common_outputs = []
foreach(lang, policy_templates_languages) { foreach(lang, policy_templates_languages) {
policy_templates_common_outputs += [ "$policy_templates_base_dir/common/html/${lang}/chrome_policy_list.html" ] policy_templates_common_outputs += [
"$policy_templates_base_dir/common/html/${lang}/chrome_policy_list.html",
]
} }
# Linux outputs. # Linux outputs.
...@@ -105,24 +170,10 @@ policy_templates_plist_path = ...@@ -105,24 +170,10 @@ policy_templates_plist_path =
policy_templates_plist_strings_path = policy_templates_plist_strings_path =
"$policy_templates_base_dir/mac/strings/\${lang}.lproj/Localizable.strings" "$policy_templates_base_dir/mac/strings/\${lang}.lproj/Localizable.strings"
policy_templates_mac_outputs = [ policy_templates_plist_path ] policy_templates_mac_outputs = [ policy_templates_plist_path ]
foreach(lang, policy_templates_languages) { foreach(lang, mac_policy_templates_languages) {
# Mac uses a slightly different naming convention for languages. policy_templates_mac_outputs += [
if (lang == "en-US") { "$policy_templates_base_dir/mac/strings/${lang}.lproj/Localizable.strings",
lang = "en" ]
} else if (lang == "en-GB") {
lang = "en_GB"
} else if (lang == "es-419") {
lang = "es_419"
} else if (lang == "pt-BR") {
lang = "pt_BR"
} else if (lang == "pt-PT") {
lang = "pt_PT"
} else if (lang == "zh-CN") {
lang = "zh_CN"
} else if (lang == "zh-TW") {
lang = "zh_TW"
}
policy_templates_mac_outputs += [ "$policy_templates_base_dir/mac/strings/${lang}.lproj/Localizable.strings" ]
} }
# Windows outputs. # Windows outputs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment