Decide how to use gettext in our HTML5 UI

Bug #946561 reported by Jason Gerard DeRose
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Novacut
Triaged
High
Unassigned

Bug Description

So we of course want all the Novacut apps to be fully translated and localized. However, we've put this off for a while so we could see how our UI architecture would shake out.

Originally I took a template-heavy approach to the early Dmedia UI, and my thought was to handle the translations when the templates were executed (say during the build). But the templates were too big an obstacle for UI designers... we lost most of the potential benefit of our HTML5 approach. So I axed the templates, and now we can change the Novacut UI without even restarting the app.

Translating in templates also isn't a full solution. Importantly, it isn't a correct solution for plural forms. Honestly, I'm not sure what the best approach is giving the current capabilities of WebKit and WebKitGTK.

What I'd really like to see is for the gettext() and ngettext() functions to be callable from JavaScript in WebKitGTK. As it stands, we use very little user text inside our HTML... most of these strings are in our JavaScript, and so requiring all our string to be defined in JavaScript is a reasonable constraint for Novacut.

What do people think about this? The Ubuntu Software Center and the Ubuntu installer are two apps that use WebKitGTK, so I'm going to look at how they've approached translation.

But note that having ngettext() in JavaScript is the *only* way we can correctly do plural forms, as we will be displaying things we don't know the count of till run-time (stuff from CouchDB, etc).

Tags: gettext
Changed in novacut:
milestone: 12.04 → 12.05
Changed in novacut:
milestone: 12.05 → 12.06
Changed in novacut:
milestone: 12.06 → 12.07
Changed in novacut:
milestone: 12.07 → 12.08
Changed in novacut:
milestone: 12.08 → 12.09
Changed in novacut:
milestone: 12.09 → 12.10
Changed in novacut:
milestone: 12.10 → 12.11
Changed in novacut:
milestone: 12.11 → 12.12
Changed in novacut:
milestone: 12.12 → 13.01
Changed in novacut:
milestone: 13.01 → 13.02
Changed in novacut:
milestone: 13.02 → 13.03
Changed in novacut:
milestone: 13.03 → 13.04
Changed in novacut:
milestone: 13.04 → 13.05
Changed in novacut:
milestone: 13.05 → 13.06
Changed in novacut:
milestone: 13.06 → 13.07
Changed in novacut:
milestone: 13.07 → 13.08
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.