diff --git a/Makefile.am b/Makefile.am index d83ad1b..dd70dcb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = src data +SUBDIRS = src data po uuid = "temperature@xtranophilist" diff --git a/configure.ac b/configure.ac index dfe4628..adf2313 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,12 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_PROG_SED +GETTEXT_PACKAGE=gnome-shell-extension-sensors +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", + [The prefix for our gettext translation domains.]) +IT_PROG_INTLTOOL(0.26) + PKG_PROG_PKG_CONFIG([0.22]) GLIB_GSETTINGS @@ -40,18 +46,28 @@ extensiontopdir=${datadir}/gnome-shell/extensions/weather@gnome-shell-extensions dnl This is beyond ugly. Suggestions accepted. if test "x${use_local_install}" == "xyes"; then AC_SUBST(gsettingsschemadir, [${extensiontopdir}/schemas]) + AC_SUBST(LOCALEDIR, [${extensiontopdir}/locale]) +else + AC_SUBST(LOCALEDIR, [${datadir}/locale]) fi dnl Please keep this sorted alphabetically. AC_CONFIG_FILES([ Makefile data/Makefile + po/Makefile.in src/Makefile ]) AC_OUTPUT +dnl 'Fugly hack' doesn't get close to describe this. I don't know how else +dnl to change the directory for translations. +if test "x${use_local_install}" == "xyes"; then + ${SED} -i -e "s%itlocaledir = .*%itlocaledir = ${extensiontopdir}/locale%g" po/Makefile +fi + if test "x$use_local_install" == "xyes"; then echo - echo "The schemas will be installed in subdirectories of the extension." + echo "The schemas and translations will be installed in subdirectories of the extension." echo fi diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 0000000..286cc10 --- /dev/null +++ b/po/.gitignore @@ -0,0 +1,4 @@ +stamp-it +POTFILES +Makefile.in.in +*.gmo diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..e91461b --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,3 @@ +src/extension.js +src/prefs.js +src/utilities.js diff --git a/po/gnome-shell-extension-sensors.pot b/po/gnome-shell-extension-sensors.pot new file mode 100644 index 0000000..637e0a7 --- /dev/null +++ b/po/gnome-shell-extension-sensors.pot @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-05-25 18:09+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Add average and maximum entries +#: ../src/extension.js:153 ../src/prefs.js:102 +msgid "Average" +msgstr "" + +#: ../src/extension.js:154 ../src/prefs.js:103 +msgid "Maximum" +msgstr "" + +#: ../src/extension.js:161 +#, c-format +msgid "%drpm" +msgstr "" + +#: ../src/extension.js:167 +#, c-format +msgid "%s%.2fV" +msgstr "" + +#: ../src/extension.js:170 +msgid "N/A" +msgstr "" + +#: ../src/extension.js:185 +msgid "Error" +msgstr "" + +#: ../src/extension.js:189 +msgid "Please run sensors-detect as root." +msgstr "" + +#: ../src/extension.js:190 +msgid "Please install lm_sensors." +msgstr "" + +#: ../src/extension.js:190 +msgid "If this doesn't help, click here to report with your sensors output!" +msgstr "" + +#: ../src/extension.js:204 +msgid "Sensors Settings" +msgstr "" + +#: ../src/prefs.js:33 +msgid "Poll sensors every (in seconds)" +msgstr "" + +#: ../src/prefs.js:41 +msgid "Temperature unit" +msgstr "" + +#: ../src/prefs.js:42 +msgid "Centigrade" +msgstr "" + +#: ../src/prefs.js:43 +msgid "Fahrenheit" +msgstr "" + +#: ../src/prefs.js:56 +msgid "Display temperature unit" +msgstr "" + +#: ../src/prefs.js:57 +msgid "Show temperature unit in panel and menu." +msgstr "" + +#: ../src/prefs.js:61 +msgid "Display decimal value" +msgstr "" + +#: ../src/prefs.js:62 +msgid "Show one digit after decimal." +msgstr "" + +#: ../src/prefs.js:66 +msgid "Display drive temperature" +msgstr "" + +#: ../src/prefs.js:70 +msgid "Display fan speed" +msgstr "" + +#: ../src/prefs.js:74 +msgid "Display power supply voltage" +msgstr "" + +#: ../src/prefs.js:129 +msgid "Sensor in panel" +msgstr "" + +#: ../src/prefs.js:133 +msgid "Display sensor label" +msgstr "" + +#: ../src/utilities.js:157 +#, c-format +msgid "Drive %s" +msgstr ""