-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Mark a string as not for formatting #5776
base: main
Are you sure you want to change the base?
Conversation
The wikipedia instruction step 6 has a link in it. When translated, the translators replace the english version of the link with the local version. The links sometimes includes percent encoded characters which is being interpreted as a format string. To avoid the same, mark it as not formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ideally we should get translatewiki to comment on this though.
@Nikerabbit Could you kindly take a look at the changes and let us know if this is a fine way to mark a string as non-formatted? Are these properties carried forward to the strings in other languages? 🤔 |
Hi, I am a project liaison on translatewiki.net. Unfortunately, we do not support attributes/property retention. It something that we want to do (https://phabricator.wikimedia.org/T244494), but don't support currently. The property will remain in the source language if present, but will be remove from strings in other language. |
Thank you. Is there a specific way in which we could handle this situation where the translation string might contain some characters which Android misinterprets as a format string placeholder? Does translatewiki help us with this? 🤔 |
Would it be possible to add a post merge script on your end that adds the Also thinking of some of the other Android projects supported on the platform and wondering how they handle this case. For example, I see The other option is to develop a temporary solution on our end to define un-formatted strings in configuration and add the |
Description (required)
Fixes #5774
The wikipedia instruction step 6 has a link in it. When translated, the translators replace the english version of the link with the local version. The links sometimes includes percent encoded characters which is being interpreted as a format string.
To avoid the same, mark it as not formatted.
Tests performed (required)
I'm not sure what the reliable way to trigger the wikipedia step and hence could not yet verify the changes visually. But I suppose the warnings are now gone while building, though.
Let me know if there's a way to test the same visually.
Screenshots (for UI changes only)
N/A. See reason above