Strings in the *mako templates are not translatable

Bug #538987 reported by Gabor Kelemen
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gwibber
Fix Released
Undecided
Ken VanDine
Ubuntu Translations
Fix Released
Medium
Unassigned
gwibber (Ubuntu)
Fix Released
Low
Ken VanDine

Bug Description

Binary package hint: gwibber

There are translatable strings in the ui/templates/*mako files. These are mixes of Python and HTML code - adding _() calls to the Python seems to work, but for HTML, it does not. I have no idea how these could be translated in a sensible way.

Tags: gwibber-i18n
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Confirmed there's a few strings there which are untranslated, this need to be looked by a gwibber developer, marking it as triaged, thanks.

Changed in gwibber (Ubuntu):
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Low
Changed in gwibber (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → nobody
David Planella (dpm)
tags: added: gwibber-i18n
David Planella (dpm)
Changed in ubuntu-translations:
importance: Low → Medium
Revision history for this message
Ryan Paul (segphault) wrote :

What strings in the Mako templates can't be translated? It should be possible to wrap _() around pretty much anything in there.

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Currently, nothing is marked for translation, and the files are not present in the POTFILES.in file.

I'll attach some patches to show them - but I was not joking when I said that _() does not work for the HTML parts :(.

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Here they are, some of these will show up translated, but not all.

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Running intltool-update results in this:

$ grep -A1 mako hu.po
#: ../ui/templates/base.mako:98
msgid "from"
--
#: ../ui/templates/base.mako:101
msgid "in reply to"
--
#: ../ui/templates/targetbar.mako:7
msgid "Replying to {0} as {1}"
--
#: ../ui/templates/targetbar.mako:8
msgid "Reposting from {0} as {1}"

The other strings were not extracted :(.

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Ok, this can be a lot better, if I don't mess it up :).

Turns out that only at the end of targetbar.mako are html parts, namely

          <div class="label">_("Send with:")</div>

<img class="icon" title="_("${account['protocol']} (${account['username']}) - Disabled")" src="${breakdance(account['protocol'])}" />

These are the only problematic parts.

Revision history for this message
Heikki Mäntysaari (heikki-mantysaari) wrote :

Translation deadline is quite soon (22.4.), is it possible to get this fixed (just apply the patch?) in time so that we can translate that highly visible string ("Send with:") before the deadline?

Changed in gwibber:
assignee: nobody → Ken VanDine (ken-vandine)
status: New → Confirmed
milestone: none → 2.30.0
Changed in gwibber (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
Changed in gwibber:
status: Confirmed → Fix Committed
Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Hey, thanks for the fix, but the strings I called problematic above, were really problematic - at least, I saw them appear literally on the ui, like: _("Send with:") - the other was even worse.
Could someone check if this is still the case? I only marked them for translation to highlight them, not because this worked.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Yeah, I committed a fix for that separately, thanks for the patch!

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Cool, and for the title=("${account['protocol']} (${account['username']}) - Disabled") one? :)

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Ah, missed that one. Just pushed a fix for that too, thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gwibber - 2.30.0-0ubuntu1

---------------
gwibber (2.30.0-0ubuntu1) lucid; urgency=low

  * New upstream release
    - gwibber crashed with KeyError in action() (LP: #520492)
    - Strings in the side panel are not translatable (LP: #538981)
    - Strings in the *mako templates are not translatable (LP: #538987)
    - gwibber crashed with AttributeError in action() (LP: #444654)
 -- Ken VanDine <email address hidden> Wed, 14 Apr 2010 16:22:09 -0400

Changed in gwibber (Ubuntu):
status: Triaged → Fix Released
Omer Akram (om26er)
Changed in gwibber:
status: Fix Committed → Fix Released
David Planella (dpm)
Changed in ubuntu-translations:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.