[clockPreferences] Fix translations

The preference dialog for the panel clock does not set its gettext
domain, so it's not translated even if though translations are
already available.
Fix by setting the domain in the GtkBuilder file and binding the
domain to the locale directory.

https://bugzilla.gnome.org/show_bug.cgi?id=618873
This commit is contained in:
Florian Müllner
2010-05-17 14:03:47 +02:00
parent 03a0809e39
commit 764f5b62f0
4 changed files with 11 additions and 2 deletions

View File

@ -7,6 +7,8 @@ const GConf = imports.gi.GConf;
const Lang = imports.lang;
const Signals = imports.signals;
const Gettext = imports.gettext;
const GCONF_DIR = '/desktop/gnome/shell/clock';
const FORMAT_KEY = GCONF_DIR + '/format';
const SHOW_DATE_KEY = GCONF_DIR + '/show_date';
@ -80,6 +82,9 @@ Signals.addSignalMethods(ClockPreferences.prototype);
function main(params) {
if ('progName' in params)
GLib.set_prgname(params['progName']);
if ('localeDir' in params)
Gettext.bindtextdomain('gnome-shell', params['localeDir']);
Gtk.init(null, null);
let clockPrefs = new ClockPreferences(params['uiFile']);