ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #07672
Internationalizing scopes
Hi all,
As one of the first steps to make the new scopes translatable [1],
yesterday Michał Hruby, Rodney Dawes and I had a call to discuss how to add
internationalization support to scopes ini files. These contain the title,
one of the most visible parts of the scope in the UI, so it's also one of
the most important parts to localize.
In summary, we decided to:
- Add support for inline translations in the scopes' ini files, using the
same format as .desktop files [2]
- Create a cmake rule to generate the .pot file, based on [3] and add
another rule that calls intltool-merge to put the translations into the
final .ini file at build time
- Enable translation of the scopes upstream projects in Launchpad
- This means these translations will not be included in language packs, but
should be included in the final click package (or binary package, depending
on how scopes are ultimately shipped on the desktop)
In terms of the implementation, this is also related to how we load
translations from the .desktop files in the click scope (inline vs. MO
files), but I'll follow up with a separate e-mail on that one.
We think using this option (inline translations in the ini files vs reading
the translations from .mo files) is the best solution in terms of
performance when reading the list of scopes, but we'd like to hear other
comments/views too.
Thanks!
Cheers,
David.
[1] https://bugs.launchpad.net/unity-scopes-api/+bug/1297889
[2]
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#localized-keys
[3]
https://code.launchpad.net/~dobey/unity-scope-click/translated/+merge/214182
Follow ups