bug-libunistring
[Top][All Lists]
Advanced

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

Re: [bug-libunistring] libunistring: translating long names


From: Daiki Ueno
Subject: Re: [bug-libunistring] libunistring: translating long names
Date: Mon, 23 Feb 2015 14:55:19 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Daiki Ueno <address@hidden> writes:

> The attached is an experimental patch.  When building, it create the
> 'pot-gen' program which produces an intermidiate POT file.  And then it
> will be processed through the normal gettext po/ infrastructure.

I realized that the extra program wouldn't be necessary, if we could
mark all strings under lib/unictype/*:
https://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00124.html

Here is a patch for libunistring side.

Regards,
--
Daiki Ueno
>From d3c7d651fc248701b9771f3a1b9c236865d649d4 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <address@hidden>
Date: Wed, 18 Feb 2015 16:52:47 +0900
Subject: [PATCH] build: use gettext to translate long names

* Makefile.am (SUBDIRS): Add po.
* autogen.sh: Call 'autopoint --force'.
* configure.ac: Invoke AM_GNU_GETTEXT and AM_GNU_GETTEXT_VERSION.
* po/Makevars: New file.
* po/POTFILES.in: New file.
---
 ChangeLog      |  9 +++++++
 Makefile.am    |  2 +-
 autogen.sh     |  1 +
 configure.ac   |  4 +++
 po/Makevars    | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in |  6 +++++
 6 files changed, 99 insertions(+), 1 deletion(-)
 create mode 100644 po/Makevars
 create mode 100644 po/POTFILES.in

diff --git a/ChangeLog b/ChangeLog
index 08d992f..8c9a5f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-02-23  Daiki Ueno  <address@hidden>
+
+       build: use gettext to translate long names
+       * Makefile.am (SUBDIRS): Add po.
+       * autogen.sh: Call 'autopoint --force'.
+       * configure.ac: Invoke AM_GNU_GETTEXT and AM_GNU_GETTEXT_VERSION.
+       * po/Makevars: New file.
+       * po/POTFILES.in: New file.
+
 2015-02-16  Daiki Ueno  <address@hidden>
 
        * Version 0.9.5 released.
diff --git a/Makefile.am b/Makefile.am
index 91c0bf3..19db1b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
 ACLOCAL = build-aux/fixaclocal @ACLOCAL@
 ACLOCAL_AMFLAGS = -I m4 -I gnulib-m4
 
-SUBDIRS = doc gnulib-local lib tests
+SUBDIRS = doc gnulib-local lib po tests
 
 EXTRA_DIST = \
   version.sh BUGS DEPENDENCIES HACKING autogen.sh \
diff --git a/autogen.sh b/autogen.sh
index f558615..c29bded 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -456,6 +456,7 @@ if test $skip_gnulib = false; then
   fi
 fi
 
+autopoint --force
 build-aux/fixaclocal aclocal -I m4 -I gnulib-m4
 autoconf
 autoheader && touch config.h.in
diff --git a/configure.ac b/configure.ac
index 38fe5dd..13e21a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,6 +148,9 @@ AC_PATH_PROG([TEXI2DVI], [texi2dvi], 
[$ac_aux_dir_abs/missing texi2dvi])
 AC_PATH_PROG([DVIPS], [dvips], [$ac_aux_dir_abs/missing dvips])
 AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
 
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.4])
+
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([doc/Makefile])
 AC_CONFIG_FILES([gnulib-local/Makefile])
@@ -155,5 +158,6 @@ AC_CONFIG_FILES([lib/Makefile])
 AC_CONFIG_FILES([lib/exported.sh])
 AC_CONFIG_FILES([lib/unistring/version.h:lib/unistring/version.in.h])
 AC_CONFIG_FILES([lib/unistring/woe32dll.h:lib/unistring/woe32dll.in.h])
+AC_CONFIG_FILES([po/Makefile.in])
 AC_CONFIG_FILES([tests/Makefile])
 AC_OUTPUT
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..e280db2
--- /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 = --keyword=_UC_LONG_NAME:1c,2
+
+# 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 = Free Software Foundation, Inc.
+
+# 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 =
+
+# 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 =
+
+# 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 =
+
+# 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 = yes
+
+# 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
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..f7ff657
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,6 @@
+lib/unictype/blocks.h
+lib/unictype/scripts.h
+lib/unictype/bidi_longname.c
+lib/unictype/categ_longname.c
+lib/unictype/combiningclass_longname.c
+lib/unictype/joiningtype_longname.c
-- 
2.1.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]