Need context variants of i18n.tr and i18n.dtr
Bug #1394904 reported by
Albert Astals Cid
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Medium
|
Albert Astals Cid | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
Sometimes you need to show a small string like "All" but you need to give it a context so translations can translate it differently than other "All" occurrences in the same domain.
Example, in the phone-app we have two occurrences of "All", one is about Contacts, the other about Calls, so in Spanish you need the first "All" translated as "Todos" and the second one as "Todas"
So you would write i18n.ctr("All Calls", "All") and i18n.ctr("All Contacts", "All") in the code so there would be the possibility of having different translations.
So we basically need https:/
Related branches
lp:~aacid/ubuntu-ui-toolkit/i18n_context_support
Rejected
for merging
into
lp:ubuntu-ui-toolkit/staging
- Cris Dywan: Disapprove
- PS Jenkins bot: Needs Fixing (continuous-integration)
-
Diff: 516 lines (+418/-8)7 files modifiedcomponents.api (+22/-0)
modules/Ubuntu/Components/plugin/gettext.h (+287/-0)
modules/Ubuntu/Components/plugin/i18n.cpp (+58/-4)
modules/Ubuntu/Components/plugin/i18n.h (+4/-0)
tests/unit/tst_i18n/po/en_US.po (+8/-0)
tests/unit/tst_i18n/src/LocalizedApp.qml (+15/-0)
tests/unit/tst_i18n/src/tst_i18n.cpp (+24/-4)
lp:~aacid/ubuntu-ui-toolkit/i18n_context_support_system_gettext
Rejected
for merging
into
lp:ubuntu-ui-toolkit/staging
- Cris Dywan: Disapprove
- PS Jenkins bot: Needs Fixing (continuous-integration)
-
Diff: 236 lines (+132/-8)7 files modifiedcomponents.api (+22/-0)
debian/control (+1/-0)
modules/Ubuntu/Components/plugin/i18n.cpp (+58/-4)
modules/Ubuntu/Components/plugin/i18n.h (+4/-0)
tests/unit/tst_i18n/po/en_US.po (+8/-0)
tests/unit/tst_i18n/src/LocalizedApp.qml (+15/-0)
tests/unit/tst_i18n/src/tst_i18n.cpp (+24/-4)
lp:~aacid/ubuntu-ui-toolkit/i18n_context_support_glib
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Approve
-
Diff: 170 lines (+84/-4)6 files modifiedcomponents.api (+9/-0)
modules/Ubuntu/Components/plugin/i18n.cpp (+26/-0)
modules/Ubuntu/Components/plugin/i18n.h (+2/-0)
tests/unit/tst_i18n/po/en_US.po (+8/-0)
tests/unit/tst_i18n/src/LocalizedApp.qml (+15/-0)
tests/unit/tst_i18n/src/tst_i18n.cpp (+24/-4)
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Albert Astals Cid (aacid) |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit: | |
importance: | Undecided → Medium |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Albert Astals Cid (aacid) |
importance: | Undecided → Medium |
status: | New → In Progress |
no longer affects: | ubuntu-ui-toolkit |
To post a comment you must log in.
This bug was fixed in the package ubuntu-ui-toolkit - 1.1.1347+ 15.04.20141126- 0ubuntu1
--------------- 15.04.20141126- 0ubuntu1) vivid; urgency=medium
ubuntu-ui-toolkit (1.1.1347+
[ Zsombor Egri ]
* Expose refresh() function in revision 1 (Ubuntu.Components 1.1).
Fixes LP: #1380559
* Alarm adaptation refactored to support change granular model
updates. Fixes LP: #1322558, LP: #1360359, LP: #1370649,
LP: #1380553
* Fix Header thin divider margins, restored to original no-margins.
Fixes LP: #1380766.
[ Tim Peeters ]
* Add ensure_visible() function to header AP helper.
Fixes LP: #1363591
[ Albert Astals Cid ]
* Add context support for i18n.tr calls. This allows to have strings
like "All" translated to two different strings in the translated
language if different contexts are given. Fixes LP: #1394904
-- Ubuntu daily release <email address hidden> Wed, 26 Nov 2014 08:33:25 +0000