loleaflet/util/create-l10n-all-js.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 4b8cbc40920975bdfdc2de0d7cd4ca464414372e Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Thu Jul 9 15:55:03 2020 +0300 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Jul 9 23:53:51 2020 +0200 Fix create-l10n-all-js.pl for languages that include script and territory On Android and iOS, the window.LANG gets set to a value that uses hyphens as separators, not underscores. Also, the script is included for the Chinese variants. While at it, make the code more lenient: Accept either separator and with script or not. Change-Id: I5a5319572ec96892d22eb3b30586b5b8203bdee1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98434 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> (cherry picked from commit 8166a0edaf93ab030af68ddac52910d7a93a2e0a) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98450 Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/loleaflet/util/create-l10n-all-js.pl b/loleaflet/util/create-l10n-all-js.pl index eb88af715..4cb151fde 100644 --- a/loleaflet/util/create-l10n-all-js.pl +++ b/loleaflet/util/create-l10n-all-js.pl @@ -53,7 +53,7 @@ if (false) { window.LOCALIZATIONS = " . insert('de') . "; } else if (onlylang == 'el') { window.LOCALIZATIONS = " . insert('el') . "; -} else if (window.LANG == 'en_GB') { +} else if (window.LANG == 'en-GB' || window.LANG == 'en_GB') { window.LOCALIZATIONS = " . insert('en_GB') . "; } else if (onlylang == 'es') { window.LOCALIZATIONS = " . insert('es') . "; @@ -77,7 +77,7 @@ if (false) { window.LOCALIZATIONS = " . insert('nn') . "; } else if (onlylang == 'pl') { window.LOCALIZATIONS = " . insert('pl') . "; -} else if (window.LANG == 'pt_BR') { +} else if (window.LANG == 'pt-BR' || window.LANG == 'pt_BR') { window.LOCALIZATIONS = " . insert('pt_BR') . "; } else if (onlylang == 'pt') { window.LOCALIZATIONS = " . insert('pt') . "; @@ -91,7 +91,9 @@ if (false) { window.LOCALIZATIONS = " . insert('tr') . "; } else if (onlylang == 'uk') { window.LOCALIZATIONS = " . insert('uk') . "; -} else if (window.LANG == 'zh_TW') { +} else if (window.LANG == 'zh-CN' || window.LANG == 'zh-Hans-CN' || window.LANG == 'zh_CN' || window.LANG == 'zh_Hans_CN' ) { + window.LOCALIZATIONS = " . insert('zh_CN') . "; +} else if (window.LANG == 'zh-TW' || window.LANG == 'zh-Hant-TW' || window.LANG == 'zh_TW' || window.LANG == 'zh_Hant_TW') { window.LOCALIZATIONS = " . insert('zh_TW') . "; } else { window.LOCALIZATIONS = {}; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits