diff options
| author | 2020-06-19 14:59:27 -0600 | |
|---|---|---|
| committer | 2020-06-19 22:59:27 +0200 | |
| commit | baaef3d9f4bdc81224620ab2f6b92575dcf81a59 (patch) | |
| tree | 01a5d21ab64d4c058fa3f92a33441c07963ec3f5 /cli/i18n/I18nData.php | |
| parent | 9489cca1e3560e20614f73e5bfc570e8b6513b4a (diff) | |
3041 en us localization (#3060)
* Initial locaization from international english to United States English
examples:
favourite -> favorite
optimise -> optimize
occured -> occurred
labelled -> labelled
ok -> okay
* More spelling corrections
default English occured->occurred
cancelled -> canceled
labelled -> labeled
* Undo key spelling change
* i18n format and admin.php translating
* Translating admin.php
* more admin.php translating
* Translating conf.php
* Translating feedback.php and format command
* Translating gen.php
* Translating index.php
* Translating sub.php
* Translating user.php
* Translating install.php
* Fix 'there is no idle feed'
* FIx 'there is no feed to refresh"
* Add i18n manipulation option to ignore all unmodified translation keys
* Lint fixes
* Update keys newly add since original branch
* Revert unintenntional ru 'translation'
* Code review revisions
* Fix leading whitespace in ignore_unmodified api
* Update app/i18n/en-us/gen.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update app/i18n/en-us/admin.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update app/i18n/en-us/admin.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update error message for Make ignore-unmodified keys to use Make syntax.
(inline with 3062) Also rename ignore-unmodifed-key ->
ignore-unmodified-keys
* Replace makefile leading spaces with tabs
* Code review revisions
* Retab added php functions
* Missed tab replace
* Remove stray '-> todo'
Co-authored-by: root <root@x-freshrss.lan.ewsandor.com>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Diffstat (limited to 'cli/i18n/I18nData.php')
| -rw-r--r-- | cli/i18n/I18nData.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/i18n/I18nData.php b/cli/i18n/I18nData.php index 5071c9be9..73a731245 100644 --- a/cli/i18n/I18nData.php +++ b/cli/i18n/I18nData.php @@ -229,6 +229,25 @@ class I18nData { $this->ignore[$language][] = $key; } + /** + *Ignore all unmodified keys from a language, or reverse it. + * + * @param string $language + * @param boolean $reverse + */ + public function ignore_unmodified($language, $reverse = false) { + $my_language = $this->getLanguage($language); + foreach ($this->getReferenceLanguage() as $file => $ref_language) { + foreach ($ref_language as $key => $ref_value) { + if (array_key_exists($key, $my_language[$file])) { + if($ref_value == $my_language[$file][$key]) { + $this->ignore($key, $language, $reverse); + } + } + } + } + } + public function getLanguage($language) { return $this->data[$language]; } |
