diff options
| author | 2022-01-08 08:00:26 -0500 | |
|---|---|---|
| committer | 2022-01-08 14:00:26 +0100 | |
| commit | 127b7f0a3aad7012055c058e8aba0d27192a8cbc (patch) | |
| tree | 8ec9a5948672e702c944c202f78294b81104582f /cli/i18n/I18nUsageValidator.php | |
| parent | ed19445f74c30854c60873cd1df1c38e15fc316b (diff) | |
Change i18n process (#4131)
Before, the ignore info were stored in a different file which was a bit cumbersome
for new comers. Now, this info is stored directly in the translation file as a
comment.
Before, there was no way of telling translators that a previously translated string
was in need of a new translation. Now, the dirty information is there to convey that
info.
Diffstat (limited to 'cli/i18n/I18nUsageValidator.php')
| -rw-r--r-- | cli/i18n/I18nUsageValidator.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cli/i18n/I18nUsageValidator.php b/cli/i18n/I18nUsageValidator.php index 8ab934971..2e402faf0 100644 --- a/cli/i18n/I18nUsageValidator.php +++ b/cli/i18n/I18nUsageValidator.php @@ -23,16 +23,13 @@ class I18nUsageValidator implements I18nValidatorInterface { return $this->result; } - public function validate($ignore) { + public function validate() { foreach ($this->reference as $file => $data) { foreach ($data as $key => $value) { $this->totalEntries++; if (preg_match('/\._$/', $key) && in_array(preg_replace('/\._$/', '', $key), $this->code)) { continue; } - if (is_array($ignore) && in_array($key, $ignore)) { - continue; - } if (!in_array($key, $this->code)) { $this->result .= sprintf('Unused key %s - %s', $key, $value) . PHP_EOL; $this->failedEntries++; |
