[gnome-calculator] Stop using intltool



commit 800ccb84cc9d2500204e22d42fd84d2462309f3d
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu May 25 14:46:44 2017 +1200

    Stop using intltool
    
    This will make the Meson migration easier

 configure.ac                             |    5 ++-
 data/Makefile.am                         |   11 +++-
 data/org.gnome.Calculator.appdata.xml.in |   28 +++++-----
 data/org.gnome.Calculator.desktop.in     |    7 ++-
 po/Makevars                              |   78 ++++++++++++++++++++++++++++++
 po/POTFILES.in                           |   21 ++++----
 6 files changed, 118 insertions(+), 32 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 39ce505..696822b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,8 @@ AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
 
 GLIB_GSETTINGS
 
+APPSTREAM_XML
+
 dnl ###########################################################################
 dnl Dependencies
 dnl ###########################################################################
@@ -57,7 +59,8 @@ dnl ###########################################################################
 dnl Internationalization
 dnl ###########################################################################
 
-IT_PROG_INTLTOOL([0.50])
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.8])
 AC_SUBST([GETTEXT_PACKAGE], [gnome-calculator])
 
 dnl ###########################################################################
diff --git a/data/Makefile.am b/data/Makefile.am
index 9ef6042..a9aca82 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -4,12 +4,17 @@ gsettings_SCHEMAS = org.gnome.calculator.gschema.xml
 desktopdir = $(datadir)/applications
 desktop_in_files = org.gnome.Calculator.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
 
-@INTLTOOL_XML_RULE@
+$(desktop_DATA): $(desktop_in_files)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
 appdatadir = $(datadir)/appdata
-appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+appdata_XML = $(appdata_in_files:.xml.in=.xml)
 appdata_in_files = org.gnome.Calculator.appdata.xml.in
+@APPSTREAM_XML_RULES@
+
+$(appstream_XML): $(appstream_in_files)
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 man1_MANS = gnome-calculator.1 gcalccmd.1
 
diff --git a/data/org.gnome.Calculator.appdata.xml.in b/data/org.gnome.Calculator.appdata.xml.in
index 896b430..8d7c06f 100644
--- a/data/org.gnome.Calculator.appdata.xml.in
+++ b/data/org.gnome.Calculator.appdata.xml.in
@@ -4,47 +4,47 @@
   <id>org.gnome.Calculator.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-3.0+</project_license>
-  <_name>GNOME Calculator</_name>
+  <name>GNOME Calculator</name>
   <description>
-    <_p>
+    <p>
       GNOME Calculator is an application that solves mathematical equations.
       Though it at first appears to be a simple calculator with only basic
       arithmetic operations, you can switch into Advanced, Financial, or
       Programming mode to find a surprising set of capabilities.
-    </_p>
-    <_p>
+    </p>
+    <p>
       The Advanced calculator supports many operations, including:
       logarithms, factorials, trigonometric and hyperbolic functions,
       modulus division, complex numbers, random number generation, prime
       factorization and unit conversions.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Financial mode supports several computations, including periodic interest
       rate, present and future value, double declining and straight line
       depreciation, and many others.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Programming mode supports conversion between common bases (binary, octal,
       decimal, and hexadecimal), boolean algebra, one’s and two’s complementation,
       character to character code conversion, and more.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot>
       <image>https://people.gnome.org/~mcatanzaro/gnome-calculator-basic-mode.png</image>
-      <_caption>GNOME Calculator in Basic Mode.</_caption>
+      <caption>GNOME Calculator in Basic Mode.</caption>
     </screenshot>
     <screenshot>
       <image>https://people.gnome.org/~mcatanzaro/gnome-calculator-advanced-mode.png</image>
-      <_caption>GNOME Calculator in Advanced Mode.</_caption>
+      <caption>GNOME Calculator in Advanced Mode.</caption>
     </screenshot>
     <screenshot>
       <image>https://people.gnome.org/~mcatanzaro/gnome-calculator-financial-mode.png</image>
-      <_caption>GNOME Calculator in Financial Mode.</_caption>
+      <caption>GNOME Calculator in Financial Mode.</caption>
     </screenshot>
     <screenshot type="default">
       <image>https://people.gnome.org/~mcatanzaro/gnome-calculator-programming-mode.png</image>
-      <_caption>GNOME Calculator in Programming Mode.</_caption>
+      <caption>GNOME Calculator in Programming Mode.</caption>
     </screenshot>
   </screenshots>
   <url type="homepage">https://wiki.gnome.org/Apps/Calculator</url>
@@ -58,7 +58,7 @@
     <kudo>SearchProvider</kudo>
     <kudo>UserDocs</kudo>
   </kudos>
-  <_developer_name>The GNOME Project</_developer_name>
+  <developer_name>The GNOME Project</developer_name>
   <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-calculator</url>
   <url type="donation">http://www.gnome.org/friends/</url>
   <url type="help">https://help.gnome.org/users/gnome-calculator/stable/</url>
diff --git a/data/org.gnome.Calculator.desktop.in b/data/org.gnome.Calculator.desktop.in
index aced995..75b65fc 100644
--- a/data/org.gnome.Calculator.desktop.in
+++ b/data/org.gnome.Calculator.desktop.in
@@ -1,8 +1,9 @@
 [Desktop Entry]
-_Name=Calculator
-_Comment=Perform arithmetic, scientific or financial calculations
-_Keywords=calculation;arithmetic;scientific;financial;
+Name=Calculator
+Comment=Perform arithmetic, scientific or financial calculations
+Keywords=calculation;arithmetic;scientific;financial;
 Exec=gnome-calculator
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=accessories-calculator
 Terminal=false
 Type=Application
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..f429a86
--- /dev/null
+++ b/po/Makevars
@@ -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 = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 
--keyword=g_dngettext:2,3 --add-comments
+
+# 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 = GNOME Calculator contributors
+
+# 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 = 
https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-calculator&keywords=I18N+L10N&component=I18N
+
+# 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 = yes
+
+# 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 =
+
+# 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 = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0039fdf..c20d113 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,18 +1,17 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
-[encoding: UTF-8]
-[type: gettext/glade]src/buttons-advanced.ui
-[type: gettext/glade]src/buttons-basic.ui
-[type: gettext/glade]src/buttons-financial.ui
-[type: gettext/glade]src/buttons-programming.ui
+src/buttons-advanced.ui
+src/buttons-basic.ui
+src/buttons-financial.ui
+src/buttons-programming.ui
 data/org.gnome.Calculator.appdata.xml.in
 data/org.gnome.Calculator.desktop.in
-[type: gettext/glade]src/math-converter.ui
-[type: gettext/glade]src/math-function-popover.ui
-[type: gettext/glade]src/math-variable-popover.ui
-[type: gettext/glade]src/math-window.ui
-[type: gettext/glade]src/math-shortcuts.ui
-[type: gettext/glade]src/menu.ui
+src/math-converter.ui
+src/math-function-popover.ui
+src/math-variable-popover.ui
+src/math-window.ui
+src/math-shortcuts.ui
+src/menu.ui
 data/org.gnome.calculator.gschema.xml
 lib/currency.vala
 lib/equation-lexer.vala


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]