aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli
diff options
context:
space:
mode:
authorKasimir Cash <kasimir.cash@outlook.com>2024-01-17 07:45:11 +0000
committerGitHub <noreply@github.com>2024-01-17 08:45:11 +0100
commit9b1f9713337bd9c1d1264688b7ac98be69d53c67 (patch)
treeabd64944a27f5113afa93f684195b0a82b269270 /cli
parent6d14813840d163c76f6dc25395b0007a88b42e9d (diff)
downloadfreshrss-9b1f9713337bd9c1d1264688b7ac98be69d53c67.tar.gz
freshrss-9b1f9713337bd9c1d1264688b7ac98be69d53c67.zip
Fixes reversed behaviour by ignore (#6041)
Diffstat (limited to 'cli')
-rw-r--r--cli/i18n/I18nData.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/i18n/I18nData.php b/cli/i18n/I18nData.php
index f6bc7fb5d..3bdff9aea 100644
--- a/cli/i18n/I18nData.php
+++ b/cli/i18n/I18nData.php
@@ -288,27 +288,27 @@ class I18nData {
}
/**
- * Ignore a key from a language, or reverse it.
+ * Ignore a key from a language, or revert an existing ignore on a key.
*/
- public function ignore(string $key, string $language, bool $reverse = false): void {
+ public function ignore(string $key, string $language, bool $revert = false): void {
$value = $this->data[$language][$this->getFilenamePrefix($key)][$key];
- if ($reverse) {
- $value->markAsIgnore();
- } else {
+ if ($revert) {
$value->unmarkAsIgnore();
+ } else {
+ $value->markAsIgnore();
}
}
/**
- * Ignore all unmodified keys from a language, or reverse it.
+ * Ignore all unmodified keys from a language, or revert all existing ignores on unmodified keys.
*/
- public function ignore_unmodified(string $language, bool $reverse = false): void {
+ public function ignore_unmodified(string $language, bool $revert = false): void {
$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->equal($my_language[$file][$key])) {
- $this->ignore($key, $language, $reverse);
+ $this->ignore($key, $language, $revert);
}
}
}