Skip to content

Commit

Permalink
webui: polish localization integration
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Apr 2, 2019
1 parent 7141dfd commit 607d0c8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions webui/module/Auth/src/Auth/Form/LoginForm.php
Expand Up @@ -260,6 +260,12 @@ private function determineLanguage($default = "en_EN") {
case 'it_IT':
$l['it_IT'] = 'Italian';
break;
case 'pl':
$l['pl_PL'] = 'Polish';
break;
case 'pl_PL':
$l['pl_PL'] = 'Polish';
break;
case 'pt':
$l['pt_BR'] = 'Portuguese (BR)';
break;
Expand Down Expand Up @@ -312,6 +318,7 @@ private function getAvailableLocales()
$locales['de_DE'] = "German";
$locales['hu_HU'] = "Hungarian";
$locales['it_IT'] = "Italian";
$locales['pl_PL'] = "Polish";
$locales['pt_BR'] = "Portuguese (BR)";
$locales['ru_RU'] = "Russian";
$locales['sk_SK'] = "Slovak";
Expand Down
8 changes: 8 additions & 0 deletions webui/public/js/custom-functions.js
Expand Up @@ -58,6 +58,10 @@ function setDtLocale(val) {
case 'it_IT':
dt_locale = 'it_IT';
break;
case 'pl':
case 'pl_PL':
dt_locale = 'pl_PL';
break;
case 'pt':
case 'pt_BR':
dt_locale = 'pt_BR';
Expand Down Expand Up @@ -490,6 +494,10 @@ function getLocale(locale) {
case 'it_IT':
lang = 'Italian.json';
break;
case 'pl':
case 'pl_PL':
lang = 'Polish.json';
break;
case 'pt':
case 'pt_BR':
lang = 'Portuguese.json';
Expand Down
4 changes: 2 additions & 2 deletions webui/scripts/localization_update.sh
Expand Up @@ -13,9 +13,9 @@ find ../ -regextype posix-egrep -regex '.*(functions.js)$$' | xargs xgettext --k

echo 'Message merge ...'
cd $LOCDIR
for i in cn_CN cs_CZ de_DE en_EN es_ES fr_FR hu_HU it_IT nl_BE pt_BR ru_RU sk_SK tr_TR; do echo $i && msgmerge --backup=none -U $i.po webui.pot && touch $i.po; done;
for i in cn_CN cs_CZ de_DE en_EN es_ES fr_FR hu_HU it_IT nl_BE pl_PL pt_BR ru_RU sk_SK tr_TR; do echo $i && msgmerge --backup=none -U $i.po webui.pot && touch $i.po; done;

#echo 'Message format ...'
#for i in cn_CN cs_CZ de_DE en_EN es_ES fr_FR hu_HU it_IT nl_BE pt_BR ru_RU sk_SK tr_TR; do echo $i && msgfmt $i.po --output-file=$i.mo; done;
#for i in cn_CN cs_CZ de_DE en_EN es_ES fr_FR hu_HU it_IT nl_BE pl_PL pt_BR ru_RU sk_SK tr_TR; do echo $i && msgfmt $i.po --output-file=$i.mo; done;

echo 'Done'

0 comments on commit 607d0c8

Please sign in to comment.