Code review comment for lp://staging/~ubuntu-sdk-team/ubuntu-ui-toolkit/i18nctag

Revision history for this message
Tim Peeters (tpeeters) wrote :

Below I copy&pasted parts of the IRC discussion that cleared up some issues for me:

<timp> in https://code.launchpad.net/~unity-team/music-app/infographics-translations/+merge/248251 why not use the string i18n.tr("Songs played today: ") + "<b>%1</b>"

<ahayzen> timp, RTL and LTR languages
<kalikiana> timp: never ever do string manipulation in context of localization, this is unrelated to tag, tr or plurals
<dpm> timp, as per the question: i18n.tr("Songs played today: ") + "<b>%1</b>" would for example break for RTL languages

-- and --

 <timp> why would i18n.dtr("metric", "Songs played today: %1") instead of i18n.tag("Songs played today: %1") not work?
<kalikiana> timp: because the string is displayed in the lockscreen and the language can be changed when the app isn't running
<timp> kalikiana: ah, so the string does not even exist in the list of translateable strings for the metrics?
<kalikiana> timp: the string is in the app's .mo files, and the domain is set in the metrics API
<timp> kalikiana: so the metrics somewhere call i18n.dtr("music-app", "Songs played today: %1")?
<kalikiana> timp: yes

review: Approve

« Back to merge proposal