-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Apple strings with integer placeholders %d and %i do not work properly #2818
Comments
Hello! Thanks for reaching out. This happens, because the %i and %d parameters are not converted to ICU, since they are not supported. https://docs.tolgee.io/platform/formats/apple_strings This means that the parameters are imported as they are. (With @Anty0 Do you have an idea, how to ensure that we import and export the same data for apple even in these cases? We cannot simply convert %d and %i to ICU Maybe we can keep the apple type for each imported parameter stored in custom data. |
Thank you %d is used in Swift because it is shorter - but you can use %lld instead in most cases. So replacing %d with %lld in all text is the best solution? It is just a bit longer. |
Hey!
Yes, I would recommend this. Even if we stored the information about source Apple placeholder, it might cause other issues like problems with updates to the placeholders and inconsistencies. So sticking to one specific placeholder is the best solution. |
This issue is stale because it has been open for 30 days with no activity. |
I will close this this one. If more users with similar issue will come and for who the workaround would not be enough, I am open to reopen it. 🚀 |
We decided to add option to not escape common patterns when exporting. |
Apple strings containing placeholders for integers (%d and %i) cannot be imported correctly. Additionally, the export is incorrect, as the % character is doubled.
It is possible to disable substitution for universal ICU placeholders during import and to turn off universal ICU placeholders in the project settings to ensure correct export behavior.
Reproduce
It can't be used for doubled %.
Expected export
Versions and environment
Additional context
Other placeholder as %e, %@, %f works properly.
The text was updated successfully, but these errors were encountered: