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

[Feat] do not assign empty string to missing translations #100

Open
wleivsco opened this issue Apr 20, 2023 · 3 comments
Open

[Feat] do not assign empty string to missing translations #100

wleivsco opened this issue Apr 20, 2023 · 3 comments
Assignees
Labels
Feature Request New functionality the app doesn't provide yet Size: Tiny Probably less than 1 day of work

Comments

@wleivsco
Copy link

wleivsco commented Apr 20, 2023

Problem Statement

For example, I have an English string "button_title" = "ok", but no translated string in Spanish

When I run the Normalizer, the app automatically puts a string "button_title" = "" in the Spanish .strings file. This is a problem, because the app will load the empty string onto the UI instead of using a fallback english text.

Suggested Solution

Add an additional option in Normalizer to not add new strings in other languages.

@Jeehut
Copy link
Member

Jeehut commented Apr 20, 2023

@wleivsco Thank you for requesting this feature.

If I understand you correctly, what you want is that RemafoX doesn't automatically add keys that exist in your source language, e.g. button_title in English, to the Spanish file and instead you want to simply ignore any differences in the set of keys that exist between different languages so that you can manually decide which keys you want to have in which language.

This is exactly what the "Harmonize with Source" option in the Normalizer configuration is for. If you turn it off, RemafoX will no longer do a comparison of keys between the source language and other languages and it should behave exactly like you described:

Bildschirmfoto 2023-04-20 um 23 31 51

Please let me know if this is what you were looking for.

By the way, if you configured the build script in Xcode, you should get warnings when building your app right within Xcode that point out the lines with empty translations:
Bildschirmfoto 2023-04-20 um 23 42 57

So if "accidentally forgetting to translate" to a specific language is your main concern, then fixing all warnings could help solve that. That's how the options "Harmonize with Source" and "Check for empty Values" were designed to work together to help you prevent empty Strings:
Bildschirmfoto 2023-04-20 um 23 38 24

But, of course, your development workflow may not work like that and you might want to disable "Harmonize with Source".

I hope this helps!

@Jeehut Jeehut added Feature Request New functionality the app doesn't provide yet Needs More Information A bug/feature which is unclear and removed Feature Request New functionality the app doesn't provide yet labels Apr 20, 2023
@wleivsco
Copy link
Author

Hi, I do want to keep "Harmonize with Source" checked because I do want to remove any strings from Spanish .strings file that are no longer in English. I just don't want to add new ones.

@Jeehut
Copy link
Member

Jeehut commented Apr 21, 2023

@wleivsco I understand now, so you want me to split the behavior of "Harmonize with Source" to an additive and destructive part and make them separately configurable. Sounds reasonable. I'll see what I can do in the next release.

Thank you for the clarification. 👍

@Jeehut Jeehut added Feature Request New functionality the app doesn't provide yet Size: Tiny Probably less than 1 day of work and removed Needs More Information A bug/feature which is unclear labels Apr 21, 2023
@Jeehut Jeehut assigned Jeehut and unassigned wleivsco Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New functionality the app doesn't provide yet Size: Tiny Probably less than 1 day of work
Projects
None yet
Development

No branches or pull requests

2 participants