Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix manipulate.translation ignore behaviour #6041

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

kasimircash
Copy link
Contributor

Changes proposed in this pull request:

When using cli/manipulate.translation.php we would expect that cli/manipulate.translation.php -a ignore -l en -k install.auth.form would add an ignore note to the key install.auth.form and that cli/manipulate.translation.php -a ignore -l en -k install.auth.form -r would remove the ignore note from install.auth.form. Instead, this behaviour is reversed. This same reversed behaviour is present when using -a ignore_unmodified with cli/manipulate.translation as well.

This fix gives us the behaviour from cli/manipulate.translation.php that we would expect e.g. the reverse of current behaviour.

I've also modified the tests for ignore and ignore_unmodified in I18nDataTest.php as they were checking for the incorrect output.

How to test the feature manually:

  1. Use cli/manipulate.translation.php -a ignore -l en -k install.auth.form to ignore a key.

  2. Check the translation file (in this case FreshRSS/app/i18n/en/install.php) to confirm the key is ignored.
    image

  3. Use cli/manipulate.translation.php -a ignore -l en -k install.auth.form -r to remove the ignore note.

  4. Confirm the key has been unignored.
    image

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written

@Alkarex Alkarex added this to the 1.24.0 milestone Jan 15, 2024
@Alkarex Alkarex added I18n 🌍 Translations CLI Command line interfaces in ./cli labels Jan 15, 2024
@Alkarex Alkarex requested a review from aledeg January 15, 2024 12:36
@Alkarex
Copy link
Member

Alkarex commented Jan 15, 2024

Pinging @aledeg if you are around

@Alkarex Alkarex merged commit 9b1f971 into FreshRSS:edge Jan 17, 2024
2 checks passed
@kasimircash kasimircash deleted the fix-i18ndata-ignore branch January 17, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Command line interfaces in ./cli I18n 🌍 Translations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants