Update po-files via Makefile with gettext instead of using update.js .

Get rid of (mostly unmaintained) intltools.
Make gsettings schema translatable
merge-requests/218/head
Jens Lody 8 years ago
parent b6caa9491d
commit 4c98fe358f
  1. 1
      .gitignore
  2. 2
      README.md
  3. 5
      configure.ac
  4. 9
      data/Makefile.am
  5. 151
      data/org.gnome.shell.extensions.openweather.gschema.xml
  6. 150
      data/org.gnome.shell.extensions.openweather.gschema.xml.in
  7. 2
      gnome-shell-extension-openweather.spec
  8. 78
      po/Makevars
  9. 3
      po/POTFILES.in
  10. 480
      po/ar.po
  11. 516
      po/bg.po
  12. 540
      po/ca.po
  13. 511
      po/cs.po
  14. 504
      po/da.po
  15. 510
      po/de.po
  16. 515
      po/el.po
  17. 538
      po/es.po
  18. 504
      po/fi.po
  19. 539
      po/fr.po
  20. 10
      po/gnome-shell-extension-openweather.pot
  21. 517
      po/he.po
  22. 527
      po/hu.po
  23. 523
      po/id.po
  24. 549
      po/it.po
  25. 506
      po/ja.po
  26. 504
      po/lt.po
  27. 502
      po/nb.po
  28. 526
      po/nl.po
  29. 527
      po/pl.po
  30. 504
      po/pt.po
  31. 530
      po/pt_BR.po
  32. 519
      po/ro.po
  33. 536
      po/ru.po
  34. 527
      po/sk.po
  35. 519
      po/sr.po
  36. 519
      po/sr@latin.po
  37. 502
      po/sv.po
  38. 502
      po/uk.po
  39. 56
      po/update.js
  40. 504
      po/vi.po
  41. 527
      po/zh_CN.po
  42. 527
      po/zh_TW.po
  43. 2
      src/prefs.js

1
.gitignore vendored

@ -16,5 +16,4 @@ staging/
*~
*.gmo
metadata.json
*.gschema.xml
*.gschema.valid

@ -48,7 +48,7 @@ Make sure you have the following dependencies installed:
* *gnome-common*,
* *autoconf*,
* *automake*,
* *intltool*.
* *gettext-devel*.
* *gnome-tweak-tool*.
Run the following commands:

@ -15,7 +15,10 @@ GETTEXT_PACKAGE=gnome-shell-extension-openweather
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
IT_PROG_INTLTOOL(0.26)
# i18n
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18.2])
PKG_PROG_PKG_CONFIG([0.22])

@ -21,11 +21,8 @@ metadata.json: metadata.json.in $(top_builddir)/config.status
CLEANFILES = metadata.json
gschemas_in = org.gnome.shell.extensions.openweather.gschema.xml.in
gsettings_SCHEMAS = org.gnome.shell.extensions.openweather.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml) @GSETTINGS_RULES@
EXTRA_DIST += $(gschemas_in)
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gsettings_SCHEMAS)

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="gnome-shell-extension-openweather">
<enum id="org.gnome.shell.extensions.openweather.weather-provider">
<value value="0" nick="openweathermap"/>
<value value="1" nick="forecast.io"/>
</enum>
<enum id="org.gnome.shell.extensions.openweather.geolocation-provider">
<value value="0" nick="openstreetmaps"/>
<value value="1" nick="geocode"/>
<value value="2" nick="mapquest"/>
</enum>
<enum id="org.gnome.shell.extensions.openweather.unit">
<value value="0" nick="celsius"/>
<value value="1" nick="fahrenheit"/>
<value value="2" nick="kelvin"/>
<value value="3" nick="rankine"/>
<value value="4" nick="reaumur"/>
<value value="5" nick="roemer"/>
<value value="6" nick="delisle"/>
<value value="7" nick="newton"/>
</enum>
<enum id="org.gnome.shell.extensions.openweather.pressure-unit">
<value value="0" nick="hPa"/>
<value value="1" nick="inHg"/>
<value value="2" nick="bar"/>
<value value="3" nick="Pa"/>
<value value="4" nick="kPa"/>
<value value="5" nick="atm"/>
<value value="6" nick="at"/>
<value value="7" nick="Torr"/>
<value value="8" nick="psi"/>
<value value="9" nick="mmHg"/>
</enum>
<enum id="org.gnome.shell.extensions.openweather.wind-speed-unit">
<value value="0" nick="kph"/>
<value value="1" nick="mph"/>
<value value="2" nick="m/s"/>
<value value="3" nick="knots"/>
<value value="4" nick="ft/s"/>
<value value="5" nick="Beaufort"/>
</enum>
<enum id="org.gnome.shell.extensions.openweather.wind-dir-indicators">
<value value="0" nick="arrows"/>
<value value="1" nick="letters"/>
</enum>
<enum id="org.gnome.shell.extensions.openweather.position">
<value value="0" nick="center"/>
<value value="1" nick="right"/>
<value value="2" nick="left"/>
</enum>
<schema path="/org/gnome/shell/extensions/openweather/" id="org.gnome.shell.extensions.openweather">
<key name="weather-provider" enum="org.gnome.shell.extensions.openweather.weather-provider">
<default>'openweathermap'</default>
<summary>Weather Provider</summary>
</key>
<key name="geolocation-provider" enum="org.gnome.shell.extensions.openweather.geolocation-provider">
<default>'openstreetmaps'</default>
<summary>Geolocation Provider</summary>
</key>
<key name="unit" enum="org.gnome.shell.extensions.openweather.unit">
<default>'fahrenheit'</default>
<summary>Temperature Unit</summary>
</key>
<key name="pressure-unit" enum="org.gnome.shell.extensions.openweather.pressure-unit">
<default>'inHg'</default>
<summary>Pressure Unit</summary>
</key>
<key name="wind-speed-unit" enum="org.gnome.shell.extensions.openweather.wind-speed-unit">
<default>'mph'</default>
<summary>Wind Speed Units</summary>
<description>Choose the units used for wind speed. Allowed values are 'kph', 'mph', 'm/s', 'knots', 'ft/s' or 'Beaufort'.</description>
</key>
<key type="b" name="wind-direction">
<default>true</default>
<summary>Wind Direction by Arrows</summary>
<description>Choose whether to display wind direction through arrows or letters.</description>
</key>
<key type="s" name="city">
<default>'-8.5211767,179.1976747>Vaiaku, Tuvalu>-1'</default>
<summary>City to be displayed</summary>
</key>
<key type="i" name="actual-city">
<default>0</default>
<summary>Actual City</summary>
</key>
<key type="b" name="translate-condition">
<default>true</default>
<summary>Translate Conditions</summary>
</key>
<key type="b" name="use-symbolic-icons">
<default>true</default>
<summary>Symbolic Icons</summary>
</key>
<key type="b" name="use-text-on-buttons">
<default>false</default>
<summary>Use text on buttons in menu</summary>
</key>
<key type="b" name="show-text-in-panel">
<default>true</default>
<summary>Temperature in Panel</summary>
</key>
<key type="b" name="show-comment-in-panel">
<default>false</default>
<summary>Conditions in Panel</summary>
</key>
<key type="b" name="show-comment-in-forecast">
<default>true</default>
<summary>Conditions in Forecast</summary>
</key>
<key name="position-in-panel" enum="org.gnome.shell.extensions.openweather.position">
<default>'center'</default>
<summary>Position in Panel</summary>
</key>
<key type="i" name="refresh-interval-current">
<default>600</default>
<summary>Refresh interval (actual weather)</summary>
</key>
<key type="i" name="refresh-interval-forecast">
<default>3600</default>
<summary>Refresh interval (forecast)</summary>
</key>
<key type="b" name="center-forecast">
<default>false</default>
<summary>Center forecastbox.</summary>
</key>
<key type="i" name="days-forecast">
<default>2</default>
<summary>Number of days in forecast</summary>
</key>
<key type="i" name="decimal-places">
<default>1</default>
<summary>Maximal number of digits after the decimal point</summary>
</key>
<key type="s" name="appid">
<default>''</default>
<summary>Your personal API key from openweathermap.org</summary>
</key>
<key type="b" name="use-default-owm-key">
<default>true</default>
<summary>Use the extensions default API key from openweathermap.org</summary>
</key>
<key type="s" name="appid-fc">
<default>''</default>
<summary>Your personal API key from forecast.io</summary>
</key>
<key type="s" name="geolocation-appid-mapquest">
<default>''</default>
<summary>Your personal AppKey from developer.geocode.farm</summary>
</key>
</schema>
</schemalist>

@ -1,150 +0,0 @@
<schemalist gettext-domain="gnome-shell-extension-openweather">
<enum id="org.gnome.shell.extensions.openweather.weather-provider">
<value nick="openweathermap" value="0" />
<value nick="forecast.io" value="1" />
</enum>
<enum id="org.gnome.shell.extensions.openweather.geolocation-provider">
<value nick="openstreetmaps" value="0" />
<value nick="geocode" value="1" />
<value nick="mapquest" value="2" />
</enum>
<enum id="org.gnome.shell.extensions.openweather.unit">
<value nick="celsius" value="0" />
<value nick="fahrenheit" value="1" />
<value nick="kelvin" value="2" />
<value nick="rankine" value="3" />
<value nick="reaumur" value="4" />
<value nick="roemer" value="5" />
<value nick="delisle" value="6" />
<value nick="newton" value="7" />
</enum>
<enum id="org.gnome.shell.extensions.openweather.pressure-unit">
<value nick="hPa" value="0" />
<value nick="inHg" value="1" />
<value nick="bar" value="2" />
<value nick="Pa" value="3" />
<value nick="kPa" value="4" />
<value nick="atm" value="5" />
<value nick="at" value="6" />
<value nick="Torr" value="7" />
<value nick="psi" value="8" />
<value nick="mmHg" value="9" />
</enum>
<enum id="org.gnome.shell.extensions.openweather.wind-speed-unit">
<value nick="kph" value="0" />
<value nick="mph" value="1" />
<value nick="m/s" value="2" />
<value nick="knots" value="3" />
<value nick="ft/s" value="4" />
<value nick="Beaufort" value="5" />
</enum>
<enum id="org.gnome.shell.extensions.openweather.wind-dir-indicators">
<value nick="arrows" value="0" />
<value nick="letters" value="1" />
</enum>
<enum id="org.gnome.shell.extensions.openweather.position">
<value nick="center" value="0" />
<value nick="right" value="1" />
<value nick="left" value="2" />
</enum>
<schema id="org.gnome.shell.extensions.openweather" path="/org/gnome/shell/extensions/openweather/">
<key name="weather-provider" enum="org.gnome.shell.extensions.openweather.weather-provider">
<default>'openweathermap'</default>
<_summary>Weather Provider</_summary>
</key>
<key name="geolocation-provider" enum="org.gnome.shell.extensions.openweather.geolocation-provider">
<default>'openstreetmaps'</default>
<_summary>Geolocation Provider</_summary>
</key>
<key name="unit" enum="org.gnome.shell.extensions.openweather.unit">
<default>'fahrenheit'</default>
<_summary>Temperature Unit</_summary>
</key>
<key name="pressure-unit" enum="org.gnome.shell.extensions.openweather.pressure-unit">
<default>'inHg'</default>
<_summary>Pressure Unit</_summary>
</key>
<key name="wind-speed-unit" enum="org.gnome.shell.extensions.openweather.wind-speed-unit">
<default>'mph'</default>
<_summary>Wind Speed Units</_summary>
<_description>Choose the units used for wind speed. Allowed values are 'kph', 'mph', 'm/s', 'knots', 'ft/s' or 'Beaufort'.</_description>
</key>
<key name="wind-direction" type="b">
<default>true</default>
<_summary>Wind Direction by Arrows</_summary>
<_description>Choose whether to display wind direction through arrows or letters.</_description>
</key>
<key name="city" type="s">
<default>'-8.5211767,179.1976747>Vaiaku, Tuvalu>-1'</default>
<_summary>City to be displayed</_summary>
</key>
<key name="actual-city" type="i">
<default>0</default>
<_summary>Actual City</_summary>
</key>
<key name="translate-condition" type="b">
<default>true</default>
<_summary>Translate Conditions</_summary>
</key>
<key name="use-symbolic-icons" type="b">
<default>true</default>
<_summary>Symbolic Icons</_summary>
</key>
<key name="use-text-on-buttons" type="b">
<default>false</default>
<_summary>Use text on buttons in menu</_summary>
</key>
<key name="show-text-in-panel" type="b">
<default>true</default>
<_summary>Temperature in Panel</_summary>
</key>
<key name="show-comment-in-panel" type="b">
<default>false</default>
<_summary>Conditions in Panel</_summary>
</key>
<key name="show-comment-in-forecast" type="b">
<default>true</default>
<_summary>Conditions in Forecast</_summary>
</key>
<key name="position-in-panel" enum="org.gnome.shell.extensions.openweather.position">
<default>'center'</default>
<_summary>Position in Panel</_summary>
</key>
<key name="refresh-interval-current" type="i">
<default>600</default>
<_summary>Refresh interval (actual weather)</_summary>
</key>
<key name="refresh-interval-forecast" type="i">
<default>3600</default>
<_summary>Refresh interval (forecast)</_summary>
</key>
<key name="center-forecast" type="b">
<default>false</default>
<_summary>Center forecastbox.</_summary>
</key>
<key name="days-forecast" type="i">
<default>2</default>
<_summary>Number of days in forecast</_summary>
</key>
<key name="decimal-places" type="i">
<default>1</default>
<_summary>Maximal number of digits after the decimal point</_summary>
</key>
<key name="appid" type="s">
<default>''</default>
<_summary>Your personal API key from openweathermap.org</_summary>
</key>
<key name="use-default-owm-key" type="b">
<default>true</default>
<_summary>Use the extensions default API key from openweathermap.org</_summary>
</key>
<key name="appid-fc" type="s">
<default>''</default>
<_summary>Your personal API key from forecast.io</_summary>
</key>
<key name="geolocation-appid-mapquest" type="s">
<default>''</default>
<_summary>Your personal AppKey from developer.geocode.farm</_summary>
</key>
</schema>
</schemalist>

@ -19,7 +19,7 @@ Source0: https://github.com/jenslody/gnome-shell-extension-openweather/ta
BuildArch: noarch
# The version of gnome-common in CentOS7 is only 3.7.4
BuildRequires: autoconf, automake, glib2-devel, gnome-common >= 3.7.4, intltool
BuildRequires: autoconf, automake, glib2-devel, gnome-common >= 3.7.4, gettext-devel
Requires: gnome-shell >= 3.8.0
%description

@ -0,0 +1,78 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = gnome-shell-extension-openweather
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=translatable
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Jens Lody
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = no
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT)
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no
# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS = --quiet
# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = no
# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = yes

@ -2,4 +2,5 @@ src/extension.js
src/forecast_io.js
src/openweathermap_org.js
src/prefs.js
[type: gettext/glade]data/weather-settings.ui
data/weather-settings.ui
data/org.gnome.shell.extensions.openweather.gschema.xml

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,13 +1,14 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Copyright (C) YEAR Jens Lody
# This file is distributed under the same license as the gnome-shell-extension-openweather package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"Project-Id-Version: gnome-shell-extension-openweather 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/jenslody/gnome-shell-extension-"
"openweather/issues\n"
"POT-Creation-Date: 2016-04-18 01:43+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@ -16,7 +17,6 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: ../src/extension.js:172
msgid "..."

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,56 +0,0 @@
#!/usr/bin/env seed
/*
*
* PO Updater for GNOME Shell Extension Weather
*
* Copyright (C) 2012 -2013
* Christian METZLER <neroth@xeked.com>
* Jens Lody <jens@jenslody.de>,
* Copyright (C) 2014 -2015
* Jens Lody <jens@jenslody.de>,
*
*
* This file is part of gnome-shell-extension-openweather.
*
* gnome-shell-extension-openweather is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gnome-shell-extension-openweather is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with gnome-shell-extension-openweather. If not, see <http://www.gnu.org/licenses/>.
*
*/
Gio = imports.gi.Gio;
print("Generate gnome-shell-extension-openweather.pot");
var xgettext = Seed.spawn("xgettext -o gnome-shell-extension-openweather.pot --from-code=utf-8 --keyword=_ --keyword=translatable -f POTFILES.in");
if (xgettext.stderr)
print(xgettext.stderr);
else {
var file = Gio.file_new_for_path(".");
var enumerator = file.enumerate_children("standard::name,standard::size");
var linguas = "";
var n = "";
var i = 0;
while (child = enumerator.next_file())
if (child.get_name().search(/.po$/) != -1) {
print("Generate " + child.get_name());
linguas += n + (child.get_name().split(".po")[0]);
Seed.spawn("msgmerge -U " + child.get_name() + " gnome-shell-extension-openweather.pot");
n = "\n";
i++;
}
print("Write LINGUAS file");
Gio.simple_write("LINGUAS", linguas);
print("Successfully generated " + i + " entry");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -5,7 +5,7 @@
* - Creates a widget to set the preferences of the weather extension
*
* Copyright (C) 2012 - 2013
* Canek Peláez <canek@ciencias.unam.mx>,
* Canek Pelaez <canek@ciencias.unam.mx>,
* Christian METZLER <neroth@xeked.com>,
* Jens Lody <jens@jenslody.de>,
* Copyright (C) 2014 -2015

Loading…
Cancel
Save