From baaef3d9f4bdc81224620ab2f6b92575dcf81a59 Mon Sep 17 00:00:00 2001 From: Ed Sandor <1273949+ewsandor@users.noreply.github.com> Date: Fri, 19 Jun 2020 14:59:27 -0600 Subject: 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 * Update app/i18n/en-us/admin.php Co-authored-by: Frans de Jonge * Update app/i18n/en-us/admin.php Co-authored-by: Frans de Jonge * 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 Co-authored-by: Frans de Jonge --- cli/manipulate.translation.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'cli/manipulate.translation.php') diff --git a/cli/manipulate.translation.php b/cli/manipulate.translation.php index b5c37d147..5ccbaa664 100644 --- a/cli/manipulate.translation.php +++ b/cli/manipulate.translation.php @@ -66,6 +66,14 @@ switch ($options['a']) { exit; } break; + case 'ignore_unmodified' : + if (array_key_exists('l', $options)) { + $i18nData->ignore_unmodified($options['l'], array_key_exists('r', $options)); + } else { + error('You need to specify a valid set of options.'); + exit; + } + break; default : help(); exit; @@ -133,8 +141,15 @@ Exemple 6: ignore a key. It adds the key in the ignore file to mark it as transl Exemple 7: revert ignore a key. It removes the key from the ignore file. php %1\$s -a ignore -r -k my_key -l my_lang -Exemple 8: check if a key exist. +Exemple 8: ignore all unmodified keys. It adds all modified keys in the ignore file to mark it as translated. + php %1\$s -a ignore_unmodified -l my_lang + +Exemple 9: revert ignore of all unmodified keys. It removes the unmodified keys from the ignore file. Warning, this will also revert keys added individually. + php %1\$s -a ignore_unmodified -r -l my_lang + +Exemple 10: check if a key exist. php %1\$s -a exist -k my_key\n\n + HELP; $file = str_replace(__DIR__ . '/', '', __FILE__); echo sprintf($help, $file); -- cgit v1.2.3