Last modified: 2014-06-17 15:30:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49310, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47310 - Translate should not eat some tags inside message contents for AndroidFFS
Translate should not eat some tags inside message contents for AndroidFFS
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 66725
  Show dependency treegraph
 
Reported: 2013-04-17 07:53 UTC by Yuvi Panda
Modified: 2014-06-17 15:30 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yuvi Panda 2013-04-17 07:53:27 UTC
It seems to swallow HTML inside the messages, stripping them and their contents out. See message 'Commons-android-strings-about license' in the Android Commons app. Actual english content is 'Open Source software released under the <a href="https://github.com/wikimedia/android-commons/blob/master/COPYING">GNU GPLv2</a>' while content according to Extension:Translate is 'Open Source software released under the '
Comment 1 Niklas Laxström 2013-04-23 12:21:57 UTC
Need to use the same hack what I used in XliffFFS for this. /me wishes innerXml functionality from Santa.
Comment 2 Siebrand Mazeland 2013-12-19 19:46:17 UTC
Is this something that's easily done, Niklas?
Comment 3 Niklas Laxström 2013-12-19 19:49:58 UTC
Just need suitable 15 min slot I think.
Comment 4 Niklas Laxström 2014-01-15 09:59:51 UTC
According to docs unescaped html is not allowed inside strings, except for b i and u tags.
Comment 5 Niklas Laxström 2014-02-20 18:25:38 UTC
Removing easy per my last comment. This is either wontfix or an implementation which only supports those three tags, or I misread the docs <http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling>.
Comment 6 Nemo 2014-02-20 18:30:43 UTC
Yes, I was thinking of b i u tags; but we can instead align summary with comment 0 too.
Comment 7 Yuvi Panda 2014-02-20 18:37:02 UTC
You are misreading the docs. We are using those strings inside a webview - so we are actually making regular HTML out of them and putting them in. So no need to have it support only 3. You could make it a CData and add 'formatted=false' to fix any issues.
Comment 8 Yuvi Panda 2014-06-17 15:11:50 UTC
Ok, actually wrapping them in CData in the app fixes it.
Comment 9 Yuvi Panda 2014-06-17 15:19:50 UTC
Ok, wrapping them in CData fixes it for TWN, but not the app - the full HTML unparsed shows up as the text :(

I think, actual fix would be to just support <b>, <i>, <u> and <a> tags. (All of these are supported elements). Anything more complex would be used only in webviews, and CData can fix that.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links