-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Localisation updates from https://translatewiki.net. #2562
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2562 +/- ##
==========================================
Coverage 39.84% 39.84%
Complexity 31 31
==========================================
Files 286 286
Lines 7348 7348
Branches 899 899
==========================================
Hits 2928 2928
Misses 4114 4114
Partials 306 306 Continue to review full report at Codecov.
|
7331407
to
8a0320d
Compare
f1a487d
to
5297a0a
Compare
ae59f21
to
96a7622
Compare
@abdulwd Looks like we have the same problem as with the ndl PR here as well |
96a7622
to
4830c64
Compare
3725bd5
to
af1dd24
Compare
af1dd24
to
dad6810
Compare
@s-ayush2903 We seem to have a porblem with the
Here I read that the escaping character for So what is the right thing to do? |
Ah yes, that's the problem with translatewiki I don't know why they always tend to offend our staticAnalysis checks, I remember this correctly, Sean used to fix these un-necessary changes made by translatewiki on his own in their PRs, this problem looks very identical to me to the ones that sean used to fix. I'll attach a fix here that can be used to make staticAnalysis check green. Have a look at this commit or to be more clear, you may have a look at #2550, here, in the first commit pushed by the translation community, they introduced the needless change and it caused static check to fail, sean fixed it in the next commit. I believe the problem also here is very same as this one(reason: same error in the runs,
Also, if we consider the SO answer, I'm skeptical if it pleases our static checks as we have this check customized specifically for our project, and we shouldn't merge/approve any PR that fails staticAnalysis or does not meet our green build criteria, as on being merged in the |
@Nikerabbit @Abijeet Do we know why the TW version of the master string in English does not contain any backslash https://translatewiki.net/w/i.php?title=Kiwix:Android.ui.pref_text_zoom_summary/en&action=edit whereas source code has a backslash https://github.com/kiwix/kiwix-android/blob/develop/core/src/main/res/values/strings.xml#L257 ? |
dad6810
to
496c8a4
Compare
https://developer.android.com/guide/topics/resources/string-resource#FormattingAndStyling doesn't say anything about needing to escape %-signs. We convert character escapes to literals for translator convenience. Maybe we need to limit which ones to convert. |
The problem seems complex. The percentage character is obviously reserved (see explanation in the link given in previous comment) and needs somehow to be escaped. It seems we are not the only one with this problem, see miracle2k/android2po#26. |
@Nikerabit I believe this SO answer to be helpful: https://stackoverflow.com/a/4417333. Would TW be able to handle properly the XML attribute formatted="false"? |
@kelson42 I think that would be https://phabricator.wikimedia.org/T244494. I marked it as high priority, but it will take some time, so it won't be the immediate solution. What workarounds can we do in the meanwhile? Make sure that |
@Nikerabbit The only other solution reported in SO comment is to use |
I won't be happy with the SO answer, because even if we use it there ain't very high chances that it'll pass the staticAnalysis check, even if it passes and when we'll merge it, then it'll create a confusion between contributors regarding the discrepancies and the pattern we are following at some place and not following the same at others, and at the end of the day when this problem will be fixed in upstream then we'll have a PR that'll revert the changes introduced in this PR(only the ones that crept in via SO answer), that doesn't sound cool to me; because if we look on the other side, the problem we have in current PR is quite easy to fix manually, like the person working on this PR just needs to replace the occurrences of |
Yes, two times a week.... This is easy, but not substainable and we can not expect translators to but a backslash if there is none in the original English version. |
BTW I'm not even sure why I propose works as this string is used directly in the UI XML:
I don't know how to to avoid the Formatter there. |
@s-ayush2903 I have manually fixed the XML file, but now |
Just checked this is a problem with reactive-circus runners, they've fixed in the next version, using the new version should fix the problem. |
Doesn't look like it worked, I've pinged 'em, awaiting a response from their end. |
Tracked in #2587 |
0bbfe60
to
4a530cd
Compare
Translation updates