Skip to content
New issue

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

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

Already on GitHub? # to your account

Config to remove key/value, if key=value #1036

Open
omid opened this issue Jul 31, 2024 · 0 comments · May be fixed by #1057
Open

Config to remove key/value, if key=value #1036

omid opened this issue Jul 31, 2024 · 0 comments · May be fixed by #1057

Comments

@omid
Copy link

omid commented Jul 31, 2024

🚀 Feature Proposal

A config to not add or remove a key/value from the translation files.

  1. First, there is a need to define a default language.
  2. Then in default, if key = value or value = "", then it can be removed from the translation file. (except plurals)

Basically the first point is not required, but I think it makes sense to limit users to have a structure to always have keys in one language, not different languages!
If the second option, is "false", then the library can add "key" as "value" by default. For example, if key is "Yes", instead of adding "Yes": "" it will either remove it or add it like "Yes": "Yes"

Motivation

In some cases, it doesn't make sense to have a diff key, and you have the "value" as the "key" (like gettext)
Some apps are loaded mostly with a default language, so there is no need to load a language file at all.

@Aryan-mor Aryan-mor linked a pull request Aug 15, 2024 that will close this issue
3 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant