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 @@
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 = [
"am",
"ar",
"bg",
"bn",
"ca",
"cs",
"da",
"de",
"el",
"ar-EG",
"bg-BG",
"ms-BN",
"ca-ES",
"cs-CZ",
"da-DK",
"de-DE",
"el-GR",
"en-GB",
"en-US",
"es",
"es-ES",
"es-419",
"et",
"fa",
"fi",
"et-EE",
"fa-IR",
"fi-FI",
"fil",
"fr",
"gu",
"he",
"hi",
"hr",
"hu",
"id",
"it",
"ja",
"kn",
"ko",
"lt",
"lv",
"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",
"ms",
"nl",
"nb",
"pl",
"mr-IN",
"ms-MY",
"nl-NL",
"nb-NO",
"pl-PL",
"pt-BR",
"pt-PT",
"ro",
"ru",
"sk",
"sl",
"sr",
"sv",
"sw",
"ta",
"te",
"th",
"tr",
"uk",
"vi",
"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",
]
# 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 = ""
foreach(lang, policy_templates_languages) {
# Note: The final , is filtered out by scripts. There's no string.join here...
......@@ -78,7 +139,9 @@ policy_templates_translation_json_path =
"$policy_templates_base_dir/translations/policy_templates_\${lang}.json"
policy_templates_translation_outputs = []
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.
......@@ -91,7 +154,9 @@ policy_templates_doc_path =
"$policy_templates_base_dir/common/html/\${lang}/chrome_policy_list.html"
policy_templates_common_outputs = []
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.
......@@ -105,24 +170,10 @@ policy_templates_plist_path =
policy_templates_plist_strings_path =
"$policy_templates_base_dir/mac/strings/\${lang}.lproj/Localizable.strings"
policy_templates_mac_outputs = [ policy_templates_plist_path ]
foreach(lang, policy_templates_languages) {
# Mac uses a slightly different naming convention for languages.
if (lang == "en-US") {
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" ]
foreach(lang, mac_policy_templates_languages) {
policy_templates_mac_outputs += [
"$policy_templates_base_dir/mac/strings/${lang}.lproj/Localizable.strings",
]
}
# 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