diff --git a/.devtools/transifex_download.bat b/.devtools/transifex_download.bat index aad23dac..ac3536ab 100644 --- a/.devtools/transifex_download.bat +++ b/.devtools/transifex_download.bat @@ -6,4 +6,5 @@ copy /Y localization\en\stock_transaction_types.po localization\en_GB\stock_tran copy /Y localization\en\component_translations.po localization\en_GB\component_translations.po copy /Y localization\en\chore_period_types.po localization\en_GB\chore_period_types.po copy /Y localization\en\chore_assignment_types.po localization\en_GB\chore_assignment_types.po +copy /Y localization\en\permissions.po localization\en_GB\permissions.po popd diff --git a/.tx/config b/.tx/config index 4f86a1be..ee8b0313 100644 --- a/.tx/config +++ b/.tx/config @@ -42,3 +42,9 @@ file_filter = localization//userfield_types.po source_file = localization/userfield_types.pot source_lang = en type = PO + +[grocy.permissions] +file_filter = localization//permissions.po +source_file = localization/permissions.pot +source_lang = en +type = PO diff --git a/services/LocalizationService.php b/services/LocalizationService.php index abbe93e0..2a052a6e 100644 --- a/services/LocalizationService.php +++ b/services/LocalizationService.php @@ -60,6 +60,7 @@ class LocalizationService $this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/stock_transaction_types.pot')); $this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/strings.pot')); $this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/userfield_types.pot')); + $this->Pot = $this->Pot->mergeWith(Translations::fromPoFile(__DIR__ . '/../localization/permissions.pot')); if (GROCY_MODE !== 'production') { @@ -91,6 +92,10 @@ class LocalizationService { $this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/userfield_types.po")); } + if (file_exists(__DIR__ . "/../localization/$culture/permissions.po")) + { + $this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/permissions.po")); + } if (GROCY_MODE !== 'production' && file_exists(__DIR__ . "/../localization/$culture/demo_data.po")) { $this->Po = $this->Po->mergeWith(Translations::fromPoFile(__DIR__ . "/../localization/$culture/demo_data.po"));