dotnet / ResXResourceManager

Manage localization of all ResX-Based resources in one central place.
MIT License
1.32k stars 217 forks source link

Default value for all languages per key #608

Closed etherfield closed 10 months ago

etherfield commented 11 months ago

One of the use-cases I have on a commercial project is to fill out all language cells with a default text when a new key is created. Usually, I would copy-paste the text from Neutral locale to others, but the more languages we support the heavier the burden it becomes. I know falling back to default locale can be implemented instead, but it's just a rule on the project.

I suggest to add 'Default value' input to the 'Add new key' prompt. If simplicity of the interface matters, showing/hiding this field can be made configurable. I can provide a PR.

Untitled

tom-englert commented 10 months ago

Falling back to the neutral language is the default behavior of the System.Resources.ResourceManager if there is no value for the current language.

Also when filling out every field, you'll undermine the detection of missing entries, so this request is somewhat contra-dictionary to the current functionality.

If you need to support such anti-patterns, I would recommend to us the scripting module and write a script that populates empty fields.