← Back to team overview

elementary-dev-community team mailing list archive

Re: Translatable launchers

 

After some research (and a lot of help from "Shnatsel"), I'm proposing
using gettext templates to translate launchers in Luna.  This approach
is much more manageable than embedding translations in .desktop files.
It allows users to contribute translations via LP which automates
translations significantly. I'll propose

1. Launcher changes with  X-GNOME-Gettext-Domain key (more generic)
and updated templates (.pot) to individual apps
2. Text for Dev Guide with details on how launchers should be made
translatable (.desktop and .pot instructions)
3. Some HIG text to clarify that GenericName/Comment keys in desktop
entries and names in shortcut groups/actions should be translatable

As an example, a modified launcher for Scratch would look like this:

[Desktop Entry]
Type=Application
Version=1.1
Name=Scratch
Comment=Edit text files
GenericName=Text Editor
Exec=scratch %U
Icon=scratch
Terminal=false
Categories=GNOME;GTK;Utility;TextEditor;
MimeType=text/plain;
StartupNotify=true
MimeType=text/plain;
X-GNOME-Gettext-Domain=scratch

...snip...

Translatable shortcut groups and actions should come with
https://bugs.launchpad.net/plank/+bug/1004089
https://bugs.launchpad.net/plank/+bug/1004034

Comments/suggestions welcome.

--ttosttos

On Wed, May 2, 2012 at 12:27 AM, Dema Siado <ttosttos@xxxxxxxxx> wrote:
> Noticed that some (all?) elementary apps don't have translatable launchers.
>  Is the intent to use localized keys (e.g. Comment[es]=...) or follow the
> approach used in Ubuntu (X-Ubuntu-Gettext-Domain key).  HIG should be
> updated to provide details.
>
> --ttosttos


References