diff --git a/data/clock-preferences.ui b/data/clock-preferences.ui index cc04f725e..2e22d9aa9 100644 --- a/data/clock-preferences.ui +++ b/data/clock-preferences.ui @@ -1,5 +1,5 @@ - + diff --git a/js/prefs/clockPreferences.js b/js/prefs/clockPreferences.js index 757eb7cf1..180358bad 100644 --- a/js/prefs/clockPreferences.js +++ b/js/prefs/clockPreferences.js @@ -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']); diff --git a/src/Makefile.am b/src/Makefile.am index 6200dc559..5ab98c351 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,6 +26,7 @@ EXTRA_DIST += gnome-shell.in gnome-shell-clock-preferences: gnome-shell-clock-preferences.in $(AM_V_GEN) sed -e "s|@pkgdatadir[@]|$(pkgdatadir)|" \ + -e "s|@localedir[@]|$(datadir)/locale|" \ -e "s|@GJS_CONSOLE[@]|$(GJS_CONSOLE)|" \ $< > $@ && chmod a+x $@ CLEANFILES += gnome-shell-clock-preferences diff --git a/src/gnome-shell-clock-preferences.in b/src/gnome-shell-clock-preferences.in index 419d0085d..9c471ab91 100644 --- a/src/gnome-shell-clock-preferences.in +++ b/src/gnome-shell-clock-preferences.in @@ -11,8 +11,11 @@ else fi progName="`basename $0`" +localeDir="@localedir@" uiFile="$uiDir/clock-preferences.ui" export GJS_PATH="$jsDir" @GJS_CONSOLE@ -c "const ClockPreferences = imports.prefs.clockPreferences; -ClockPreferences.main({ progName: '$progName', uiFile: '$uiFile' });" +ClockPreferences.main({ progName: '$progName', + uiFile: '$uiFile', + localeDir: '$localeDir' });"