Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Italian language integration
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Nov 28, 2016
1 parent 754c2d8 commit aa8bb95
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 10 deletions.
4 changes: 2 additions & 2 deletions module/Application/language/Makefile.am
Expand Up @@ -10,8 +10,8 @@ update-po: $(PO)

update-all: webui.pot
@(echo 'Updating all *.po files ...';)
@(for i in de_DE en_EN fr_FR ru_RU; do msgmerge --backup=none -U $$i.po $< && touch $$i.po; done;)
@(for i in de_DE en_EN fr_FR it_IT ru_RU; do msgmerge --backup=none -U $$i.po $< && touch $$i.po; done;)

msgfmt-all: webui.pot
@(echo 'Generating all *.mo files ...';)
@(for i in de_DE en_EN fr_FR ru_RU; do msgfmt $$i.po --output-file=$$i.mo; done;)
@(for i in de_DE en_EN fr_FR it_IT ru_RU; do msgfmt $$i.po --output-file=$$i.mo; done;)
Binary file added module/Application/language/it_IT.mo
Binary file not shown.
19 changes: 13 additions & 6 deletions module/Auth/src/Auth/Form/LoginForm.php
Expand Up @@ -212,12 +212,6 @@ private function determineLanguage($default = "en_EN") {
}

switch($language) {
case 'de_DE':
$l['de_DE'] = 'German';
break;
case 'de':
$l['de_DE'] = 'German';
break;
case 'en_EN':
$l['en_EN'] = 'English';
break;
Expand All @@ -236,6 +230,18 @@ private function determineLanguage($default = "en_EN") {
case 'fr_FR':
$l['fr_FR'] = 'French';
break;
case 'de_DE':
$l['de_DE'] = 'German';
break;
case 'de':
$l['de_DE'] = 'German';
break;
case 'it':
$l['it_IT'] = 'Italian';
break;
case 'it_IT':
$l['it_IT'] = 'Italian';
break;
case 'ru_RU':
$l['ru_RU'] = 'Russian';
break;
Expand All @@ -256,6 +262,7 @@ private function getAvailableLocales()
$locales['en_EN'] = "English";
$locales['fr_FR'] = "French";
$locales['de_DE'] = "German";
$locales['it_IT'] = "Italian";
$locales['ru_RU'] = "Russian";

return $locales;
Expand Down
23 changes: 23 additions & 0 deletions public/js/dataTables/language/Italian.json
@@ -0,0 +1,23 @@
{
"sEmptyTable": "Nessun dato presente nella tabella",
"sInfo": "Vista da _START_ a _END_ di _TOTAL_ elementi",
"sInfoEmpty": "Vista da 0 a 0 di 0 elementi",
"sInfoFiltered": "(filtrati da _MAX_ elementi totali)",
"sInfoPostFix": "",
"sInfoThousands": ".",
"sLengthMenu": "Visualizza _MENU_ elementi",
"sLoadingRecords": "Caricamento...",
"sProcessing": "Elaborazione...",
"sSearch": "Cerca:",
"sZeroRecords": "La ricerca non ha portato alcun risultato.",
"oPaginate": {
"sFirst": "Inizio",
"sPrevious": "Precedente",
"sNext": "Successivo",
"sLast": "Fine"
},
"oAria": {
"sSortAscending": ": attiva per ordinare la colonna in ordine crescente",
"sSortDescending": ": attiva per ordinare la colonna in ordine decrescente"
}
}
8 changes: 8 additions & 0 deletions public/js/datatables.functions.js
Expand Up @@ -39,6 +39,10 @@ function setDtLocale(val) {
case 'de_DE':
dt_locale = 'de_DE';
break;
case 'it':
case 'it_IT':
dt_locale = 'it_IT';
break;
case 'ru':
case 'ru_RU':
dt_locale = 'ru_RU';
Expand Down Expand Up @@ -379,6 +383,10 @@ function getLocale(locale) {
case 'de_DE':
lang = 'German.json';
break;
case 'it':
case 'it_IT':
lang = 'Italian.json';
break;
case 'ru':
case 'ru_RU':
lang = 'Russian.json';
Expand Down
4 changes: 2 additions & 2 deletions public/js/locale/Makefile.am
Expand Up @@ -10,8 +10,8 @@ update-po: $(PO)

update-all: webui-datatables.pot
@(echo 'Updating all *.po files ...';)
@(for i in de_DE en_EN fr_FR ru_RU; do msgmerge --backup=none -U $$i/LC_MESSAGES/$$i.po $< && touch $$i/LC_MESSAGES/$$i.po; done;)
@(for i in de_DE en_EN fr_FR it_IT ru_RU; do msgmerge --backup=none -U $$i/LC_MESSAGES/$$i.po $< && touch $$i/LC_MESSAGES/$$i.po; done;)

msgfmt-all: webui-datatables.pot
@(echo 'Generating all *.mo files ...';)
@(for i in de_DE en_EN fr_FR ru_RU; do msgfmt $$i/LC_MESSAGES/$$i.po --output-file=$$i/LC_MESSAGES/$$i.mo; done;)
@(for i in de_DE en_EN fr_FR it_IT ru_RU; do msgfmt $$i/LC_MESSAGES/$$i.po --output-file=$$i/LC_MESSAGES/$$i.mo; done;)
Binary file added public/js/locale/it_IT/LC_MESSAGES/it_IT.mo
Binary file not shown.

0 comments on commit aa8bb95

Please sign in to comment.