Apps-android-commons: Translation updates on hold

Created on 4 Mar 2018  路  19Comments  路  Source: commons-app/apps-android-commons

Hi, I've paused translation updates due to unresolved parsing issue I commented in https://github.com/commons-app/apps-android-commons/commit/96173e26cf07ef0d3f23cb8bb9ca4b21820eddf5#r27787891

Let's try to find a quick way to solve this.

assigned bug good first issue high priority

All 19 comments

@Nikerabbit Do you think any of the solutions at https://stackoverflow.com/questions/10374847/is-there-a-way-to-store-a-string-with-markup-in-the-strings-xml would help? Or is it just the < and > that are causing problems, and we can replace those with the escape characters?

The issue is that I am using PHP's SimpleXML and when I am trying to read the text value of something that contains other tags it seems to return null.

Escaping < and > would work, both using CDATA and using entities. For exported translations they would be escaped as &lt;u&gt;.

Third way would be to fix our file format parser to understand u/i/b tags which are allowed by the spec as far as I know, but I don't know any straightforward way to do it using SimpleXML. Maybe something like https://stackoverflow.com/questions/4145424/getting-the-xml-content-of-a-simplexmlelement but have to be careful not to break other things.

Anyone, please feel free to submit a PR for this. Should be a fairly straightforward fix. :)

@misaochan I would like to work on this issue :blush:

I missed this for today's exports, but next one will be on Thursday.

Thanks @Nikerabbit !

I just noticed <string name="about_rate_us"><u>Rate Us</u></string> has the same problem by the way.

Lets reopen then.

@misaochan seems @madhurgupta10 's PR fixes it. I am in a dilemma for situations like this, when I made the PR Rate us was not added, it was added after it, and since by that time AFAIK strings.xml got updated leading to the particular branch I had on my local fork outdated, so instead of pushing commit in old branch, making a new branch would be ideal solution?

  • If not, how would you suggest to add changes so that merge conflicts doesn't occur.
  • And If I just added the missing string to outdated branch of local fork, and it gets merged, wouldn't the new commit would, sort of backdate strings.xml to a previous old state?

@Nikerabbit I just opened that issue #1303, I was not aware that it was under this issue.

@Nikerabbit @misaochan I would like to work on this issue!

This can be closed I hope?

Still multiple messages having an issue:

[26-Mar-2018 04:51:36 UTC] No source text for Commons-android-strings-about_privacy_policy (commons-android-strings)
[26-Mar-2018 04:51:36 UTC] No source text for Commons-android-strings-about_credits (commons-android-strings)
[26-Mar-2018 04:53:29 UTC] No source text for Commons-android-strings-about_rate_us (commons-android-strings)
[26-Mar-2018 04:53:34 UTC] No source text for Commons-android-strings-about_translate (commons-android-strings)

What happened here? I thought they were fixed? I see it was reverted in a984a302 by @madhurgupta10 .

Ah, snap.

As this is a fairly simple fix, I would recommend this to beginners looking for an issue to fix. :)

This task waits some beginners to fix it:)

I would like to work on this issue...please assign it to me!

@Mansi449 It's yours :-)

Please review my pull request

@Nikerabbit , the recent PR should have solved the problem. Please do let us know if there are any further issues, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Opsylac picture Opsylac  路  3Comments

nicolas-raoul picture nicolas-raoul  路  4Comments

nicolas-raoul picture nicolas-raoul  路  3Comments

madhurgupta10 picture madhurgupta10  路  3Comments

psh picture psh  路  4Comments