]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
9 years agoxgettext: Support per-file options wip/ueno/xgettext-suboptions
Daiki Ueno [Wed, 2 Mar 2016 10:18:40 +0000 (19:18 +0900)] 
xgettext: Support per-file options

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add getsubopt.
* gettext-tools/src/xgettext.c: Include <fnmatch.h>.
(long_options): Add --options.
(main): Handle --options.  Factor out language guessing to...
(filename_to_language): ...here.
(usage): Mention --options.
(enum suboption_type): New enum.
(suboption_tokens): New variable.
(struct suboption_ty, struct suboption_list_ty,
struct suboption_list_list_ty): New struct.
(suboption_list_destroy, suboption_list_insert,
suboption_list_list_destroy, suboption_list_list_insert): New function.
(suboptions): New variable.

9 years agoxgettext: Add new check bullet-unicode
Daiki Ueno [Mon, 22 Feb 2016 07:43:16 +0000 (16:43 +0900)] 
xgettext: Add new check bullet-unicode

* gettext-tools/src/xgettext.c (main): Generalize --check option
handling.
* gettext-tools/src/message.h (enum syntax_check_type): New enum value
sc_bullet_unicode.
(NSYNTAXCHECKS): Increment.
* gettext-tools/src/message.c (syntax_check_name): Add name for
sc_bullet_unicode.
* gettext-tools/src/msgl-check.c (struct bullet_ty, struct
bullet_stack_ty): New struct.
(bullet_stack): New variable.
(syntax_check_bullet_unicode): New function.
(sc_funcs): Register syntax_check_bullet_unicode as a check function for
sc_bullet_unicode.
* gettext-tools/tests/xgettext-14: Add tests for --check=bullet-unicode

9 years agodoc: Mention the behavior stripping *.in
Daiki Ueno [Wed, 10 Feb 2016 06:50:39 +0000 (15:50 +0900)] 
doc: Mention the behavior stripping *.in

* gettext-tools/doc/gettext.texi (Preparing ITS Rules): Add footnote
explaining the matching behavior if the input file name has the .in
suffix.  Suggested by Jan Synacek.

9 years agojavascript: Support '%m$' in format strings
Daiki Ueno [Mon, 8 Feb 2016 03:30:03 +0000 (12:30 +0900)] 
javascript: Support '%m$' in format strings

Gjs has had support for numbered arguments in format strings since 1.40.
Recognize it as well in format-javascript, so msgfmt -c doesn't fail
when numbered arguments are in msgstr.  Reported by Sean Burke in:
https://lists.gnu.org/archive/html/bug-gettext/2015-10/msg00002.html
* gettext-tools/src/format-javascript.c (struct numbered_arg): New
struct.
(struct spec): Rename format_args_count to numbered_arg_count.  Add
NUMBERED field in place of FORMAT_ARGS.  All callers changed.
(numbered_arg_compare): New function.
(format_parse): Handle numbered arguments.  Based on format-awk.c.
(format_check): Add check for numbered arguments.
* gettext-tools/tests/format-javascript-1: Add tests for numbered
arguments.
* gettext-tools/tests/lang-javascript: Use numbered argument in format
strings.  Add check for Gjs version >= 1.40.

9 years agomoopp: Revert file modes accidentally set
Daiki Ueno [Mon, 8 Feb 2016 02:59:56 +0000 (11:59 +0900)] 
moopp: Revert file modes accidentally set

9 years agogettext-tools: Use a short name for DLLs on OS/2
KO Myung-Hun [Tue, 12 Jan 2016 02:35:50 +0000 (11:35 +0900)] 
gettext-tools: Use a short name for DLLs on OS/2

OS/2 does not support a DLL name longer than 8 characters.

* gettext-tools/configure.ac (OS2): Define on OS/2.
* gettext-tools/gnulib-lib/Makefile.am (libgettextlib_la_LDFLAGS):
Set a DLL name to gtlib on OS/2.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_LDFLAGS):
Set a DLL name to gtpo on OS/2.
* gettext-tools/src/Makefile.am (libgettextsrc_la_LDFLAGS): Set a DLL
name to gtsrc on OS/2.

9 years agolibasprintf: Build a shared library on OS/2
KO Myung-Hun [Tue, 12 Jan 2016 02:35:49 +0000 (11:35 +0900)] 
libasprintf: Build a shared library on OS/2

* gettext-runtime/libasprintf/configure.ac (LTNOUNDEF): Set to
-no-undefined on OS/2.

9 years agointl: Support UNIXROOT in BINDTEXTDOMAIN () on EMX
KO Myung-Hun [Tue, 12 Jan 2016 02:35:48 +0000 (11:35 +0900)] 
intl: Support UNIXROOT in BINDTEXTDOMAIN () on EMX

$UNIXROOT is a drive on which a root of FHS is.

* gettext-runtime/intl/bindtextdom.c (BINDTEXTDOMAIN): Prepend
$UNIXROOT to dirname if it is started '/' or it is an empty string.

9 years agomoop: Replace CR as well as LF with a space
KO Myung-Hun [Tue, 12 Jan 2016 02:35:47 +0000 (11:35 +0900)] 
moop: Replace CR as well as LF with a space

On OS/2, EOL marker is CR+LF.

* gnulib-local/bulid-aux/moopp (func_check_header_syntax):
Replace CR as well as LF with a space.

9 years agoChange msgfmt to produce little-endian .mo files by default.
Bruno Haible [Wed, 13 Jan 2016 08:31:48 +0000 (09:31 +0100)] 
Change msgfmt to produce little-endian .mo files by default.

* gettext-tools/src/msgfmt.c (main): Initialize 'byteswap' so as to
produce little-endian .mo files by default.
* gettext-tools/doc/gettext.texi: Update documentation.
* gettext-tools/doc/msgfmt.texi (--endianness): Likewise.

9 years agomaint: Revert copyright year changes in test data
Daiki Ueno [Wed, 13 Jan 2016 09:42:22 +0000 (18:42 +0900)] 
maint: Revert copyright year changes in test data

Some test programs started failing after mass update of copyright notice
for year 2016 (commit 7fa0c277), because of embedded test data with
fixed copyright dates.  Revert the commit for those files.
Reported by Bruno Haible.
* .x-update-copyright: Exclude test programs embedding copyright date.
* gettext-tools/tests/msgcomm-22: Revert the last change.
* gettext-tools/tests/msgfilter-sr-latin-1: Likewise.
* gettext-tools/tests/msggrep-1: Likewise.
* gettext-tools/tests/msggrep-2: Likewise.
* gettext-tools/tests/msggrep-3: Likewise.
* gettext-tools/tests/msggrep-4: Likewise.
* gettext-tools/tests/msggrep-5: Likewise.
* gettext-tools/tests/msggrep-9: Likewise.
* gettext-tools/tests/msggrep-11: Likewise.
* gettext-tools/tests/msgmerge-14: Likewise.

9 years agoits: Recognize *.glade as a GtkBuilder file too
Daiki Ueno [Thu, 7 Jan 2016 03:00:43 +0000 (12:00 +0900)] 
its: Recognize *.glade as a GtkBuilder file too

9 years ago* PACKAGING: List version specific files
Santiago Vila [Tue, 5 Jan 2016 01:04:39 +0000 (10:04 +0900)] 
* PACKAGING: List version specific files

Copyright-paperwork-exempt: yes

9 years agomaint: Update copyright year
Daiki Ueno [Sat, 2 Jan 2016 09:58:05 +0000 (18:58 +0900)] 
maint: Update copyright year

9 years agoUpdate gnulib
Daiki Ueno [Sat, 2 Jan 2016 09:42:56 +0000 (18:42 +0900)] 
Update gnulib

9 years agomaint: Use maintainer-makefile from gnulib
Daiki Ueno [Sat, 2 Jan 2016 09:35:51 +0000 (18:35 +0900)] 
maint: Use maintainer-makefile from gnulib

* autogen.sh: Pull GNUmakefile, maint.mk, and dependency scripts in
build-aux.
* cfg.mk (update-copyright-env): Adjust for gettext.
* .x-update-copyright: New file.
* .gitignore: Ignore files brought in by gnulib-tool.

9 years agomaint: Update release-steps to current practice
Daiki Ueno [Mon, 28 Dec 2015 07:22:41 +0000 (16:22 +0900)] 
maint: Update release-steps to current practice

* Admin/release-steps: Split document into two sections ('Making a
snapshot release' and 'Making an official release'), reorder some steps,
and remove mention of manual generation of PO/POT files.

9 years agoRelease 0.19.7 v0.19.7
Daiki Ueno [Sun, 27 Dec 2015 22:58:27 +0000 (07:58 +0900)] 
Release 0.19.7

9 years agoUpdate translations
Daiki Ueno [Sun, 27 Dec 2015 20:06:00 +0000 (05:06 +0900)] 
Update translations

* gettext-runtime/po/fr.po: Update from Stéphane Aulery <lkppo@free.fr>.
* gettext-runtime/po/nb.po: Update from Johnny A. Solbu <johnny@solbu.net>.
* gettext-runtime/po/pt_BR.po: Update from Rafael Ferreira <rffontenelle@gmail.com>.
* gettext-runtime/po/sr.po: Update from Мирослав Николић <miroslavnikolic@rocketmail.com>.
* gettext-runtime/po/zh_TW.po: Update from Wei-Lun Chao <bluebat@member.fsf.org>.
* gettext-tools/examples/po/fr.po: Update from Stéphane Aulery <lkppo@free.fr>.
* gettext-tools/examples/po/nb.po: Update from Johnny A. Solbu <johnny@solbu.net>.
* gettext-tools/examples/po/pt_BR.po: Update from Rafael Ferreira <rffontenelle@gmail.com>.
* gettext-tools/examples/po/sr.po: Update from Мирослав Николић <miroslavnikolic@rocketmail.com>.
* gettext-tools/examples/po/zh_TW.po: Update from Wei-Lun Chao <bluebat@member.fsf.org>.
* gettext-tools/po/bg.po: Update from Roumen Petrov <transl@roumenpetrov.info>.
* gettext-tools/po/es.po: Update from Antonio Ceballos <aceballos@gmail.com>.
* gettext-tools/po/fr.po: Update from Stéphane Aulery <lkppo@free.fr>.
* gettext-tools/po/ja.po: Update from Masahito Yamaga <ma@yama-ga.com>.
* gettext-tools/po/nl.po: Update from Benno Schulenberg <benno@vertaalt.nl>.
* gettext-tools/po/pt_BR.po: Update from Rafael Fontenelle <rffontenelle@gmail.com>.
* gettext-tools/po/sk.po: Update from Marcel Telka <marcel@telka.sk>.
* gettext-tools/po/sl.po: Update from Primoz PETERLIN <primozz.peterlin@gmail.com>.
* gettext-tools/po/sr.po: Update from Мирослав Николић <miroslavnikolic@rocketmail.com>.
* gettext-tools/po/uk.po: Update from Yuri Chornoivan <yurchor@ukr.net>.
* gettext-tools/po/vi.po: Update from Trần Ngọc Quân <vnwildman@gmail.com>.

9 years agoPrepare for 0.19.7
Daiki Ueno [Tue, 22 Dec 2015 08:15:01 +0000 (17:15 +0900)] 
Prepare for 0.19.7

9 years agodoc: Regenerate translation matrix
Daiki Ueno [Tue, 22 Dec 2015 08:10:41 +0000 (17:10 +0900)] 
doc: Regenerate translation matrix

* gettext-runtime/ABOUT-NLS: Regenerate for 0.19.7.
* gettext-runtime/doc/matrix.texi: Regenerate for 0.19.7.

9 years agoNEWS: Add 0.19.7 changes
Daiki Ueno [Mon, 21 Dec 2015 03:24:40 +0000 (12:24 +0900)] 
NEWS: Add 0.19.7 changes

9 years agoUpdate gnulib
Daiki Ueno [Sun, 27 Dec 2015 22:57:35 +0000 (07:57 +0900)] 
Update gnulib

9 years agoIgnore file brought by gnulib-tool
Daiki Ueno [Sun, 27 Dec 2015 20:38:53 +0000 (05:38 +0900)] 
Ignore file brought by gnulib-tool

* gettext-tools/gnulib-tests/.gitignore: Ignore file brought by
gnulib-tool.

9 years agoterm-ostream-tests: Add test data for FreeBSD 10.1
Daiki Ueno [Wed, 23 Dec 2015 07:10:15 +0000 (16:10 +0900)] 
term-ostream-tests: Add test data for FreeBSD 10.1

* gnulib-local/modules/term-ostream-tests: Add
test-term-ostream-xterm-freebsd101.out.
* gnulib-local/tests/test-term-ostream-xterm: Use new test data.
* gnulib-local/tests/test-term-ostream-xterm-freebsd101.out: New file.

9 years agocldr-plurals: Fix errors from clang-analyzer
Daiki Ueno [Mon, 21 Dec 2015 03:06:04 +0000 (12:06 +0900)] 
cldr-plurals: Fix errors from clang-analyzer

* gettext-tools/src/cldr-plurals.c (extract_rules): Add extra null
checks for NODE and BUFFER.  Don't add NUL byte to the end of buffer
manually.

9 years agopo: Prefer to use host tools when cross compiling
Daiki Ueno [Thu, 17 Dec 2015 08:11:25 +0000 (17:11 +0900)] 
po: Prefer to use host tools when cross compiling

* gettext-runtime/po/Makefile.in.in (CROSS_COMPILING): New substitute
variable.
(.nop.po-update): Don't prepend ../src to $PATH when cross compiling.
* gettext-runtime/po/Rules-quot (.insert-header.po-update-en): Likewise.

9 years agoits: Allow CDATA and comments in translatable node
Daiki Ueno [Thu, 17 Dec 2015 07:21:58 +0000 (16:21 +0900)] 
its: Allow CDATA and comments in translatable node

* gettext-tools/src/its.c (its_rule_list_is_translatable): Don't return
false on CDATA and comments.

9 years agoits: Fix typo in GSettings rule
Daiki Ueno [Thu, 17 Dec 2015 07:20:41 +0000 (16:20 +0900)] 
its: Fix typo in GSettings rule

* gettext-tools/its/gsettings.its: Fix typo in escape rule.

9 years agognulib-local: Fix link error due to symbol dupes
Daiki Ueno [Tue, 15 Dec 2015 03:20:46 +0000 (12:20 +0900)] 
gnulib-local: Fix link error due to symbol dupes

* gnulib-local/lib/libxml/trionan.c (minus_zerod): Mark as static.

9 years agognulib-local: Pull more functions for libxml
Daiki Ueno [Tue, 15 Dec 2015 03:12:37 +0000 (12:12 +0900)] 
gnulib-local: Pull more functions for libxml

* gettext-tools/gnulib-lib/.gitignore: Ignore files brought by
gnulib-tool.
* gettext-tools/gnulib-tests/.gitignore: Likewise.
* gnulib-local/modules/libxml (Depends-on): Add 'pow', 'log10', and
'fabs'.

9 years agognulib-local: Replace libxml2 trio with Gnulib
Daiki Ueno [Tue, 15 Dec 2015 02:58:53 +0000 (11:58 +0900)] 
gnulib-local: Replace libxml2 trio with Gnulib

* gettext-tools/gnulib-lib/.gitignore: Ignore files brought by
gnulib-tool.
* gettext-tools/gnulib-tests/.gitignore: Likewise.
* gnulib-local/lib/libxml/triodef.h: Remove.
* gnulib-local/lib/libxml/trionan.c: Replace it with Gnulib functions.
* gnulib-local/lib/libxml/trionan.h: Remove.
* gnulib-local/modules/libxml (Depends-on): Add 'isinf', 'isnan', and
'signbit'.

9 years agognulib-local: Update included libxml2 to 2.9.3
Daiki Ueno [Mon, 14 Dec 2015 03:02:32 +0000 (12:02 +0900)] 
gnulib-local: Update included libxml2 to 2.9.3

* gnulib-local/lib/libxml/*: Update from libxml2 2.9.3.  Add buf.[ch],
enc.h, save.h, triodef.h, trionan.[ch].  Enable XPath and XPointer
support.
* gnulib-local/modules/libxml (Files): Add new files from libxml2 2.9.3.

9 years agogettext-tools: Update POTFILES.in
Daiki Ueno [Thu, 10 Dec 2015 08:43:54 +0000 (17:43 +0900)] 
gettext-tools: Update POTFILES.in

* gettext-tools/po/POTFILES.in: Add newly added files.

9 years agognulib-local: Make markup.c translator friendly
Daiki Ueno [Thu, 10 Dec 2015 08:26:07 +0000 (17:26 +0900)] 
gnulib-local: Make markup.c translator friendly

* gnulib-local/lib/markup.c: Reuse strings.

9 years agoits: Mark some attributes as escape="no"
Daiki Ueno [Thu, 10 Dec 2015 07:47:36 +0000 (16:47 +0900)] 
its: Mark some attributes as escape="no"

* gettext-tools/its/glade2.its: Mark "comments" attribute as
escape="no".
* gettext-tools/its/gsettings.its: Mark "context" attribute as
escape="no".
* gettext-tools/its/gtkbuilder.its: Mark "comments" attribute as
escape="no".

9 years agoxgettext: Respect ITS escape rule for attributes
Daiki Ueno [Thu, 10 Dec 2015 07:34:52 +0000 (16:34 +0900)] 
xgettext: Respect ITS escape rule for attributes

* gettext-tools/src/its.c (its_rule_list_extract_text): Check for
"escape" value for an attribute node.
* gettext-tools/tests/xgettext-its-1: Add tests for gt:escapeRule.

9 years agointl: Fix name resolution failures on kLIBC
KO Myung-Hun [Sun, 8 Nov 2015 05:58:00 +0000 (14:58 +0900)] 
intl: Fix name resolution failures on kLIBC

kLIBC already has _nl_default_dirname and _nl_msg_cat_cntr in its own
gettext implmenetation.
* gettext-runtime/intl/dcigettext.c: Do not declare _nl_default_dirname
on kLIBC.
* gettext-runtime/intl/gettextP.h: Define _nl_msg_cat_cntr to
libintl_nl_msg_cat_cntr on kLIBC.

Copyright-paperwork-exempt: yes

9 years agobuild: Do not include os2compat.[ch]
KO Myung-Hun [Sun, 8 Nov 2015 05:57:59 +0000 (14:57 +0900)] 
build: Do not include os2compat.[ch]

kLIBC does not need os2compat.[ch]
* gettext-runtime/configure.ac (AH_BOTTOM): Do not include
intl/os2compat.h on kLIBC.
* gettext-runtime/intl/osdep.c: Do not include os2compat.c on kLIBC.
* gettext-tools/configure.ac (AH_BOTTOM): Do not include
intl/os2compat.h on kLIBC.

Copyright-paperwork-exempt: yes

9 years agotest-lock: Do not include sched.h on kLIBC
KO Myung-Hun [Sun, 8 Nov 2015 05:57:58 +0000 (14:57 +0900)] 
test-lock: Do not include sched.h on kLIBC

* gettext-runtime/tests/test-lock.c: Do not include sched.h on kLIBC,
since kLIBC does not have sched.h.

Copyright-paperwork-exempt: yes

9 years agokde: Fix KUIT error handling when libxml2 is used
Daiki Ueno [Thu, 10 Dec 2015 03:34:17 +0000 (12:34 +0900)] 
kde: Fix KUIT error handling when libxml2 is used

* gettext-tools/src/format-kde-kuit.c (format_parse): Return NULL if
xmlReadMemory returns NULL.

9 years agoxgettext: Add --its option for ease of testing
Daiki Ueno [Thu, 10 Dec 2015 03:10:44 +0000 (12:10 +0900)] 
xgettext: Add --its option for ease of testing

* gettext-tools/doc/xgettext.texi (Output details): Mention --its
option.
* gettext-tools/src/xgettext.c (long_options): Add --its option.
(main): Handle --its option.  Suggested by Sébastien Wilmet.

9 years agoxgettext: Improve error reporting when ITS is used
Daiki Ueno [Thu, 10 Dec 2015 02:21:36 +0000 (11:21 +0900)] 
xgettext: Improve error reporting when ITS is used

* gettext-tools/src/xgettext.c (main): Print error when an ITS file is
designated through a locating rule, but the file does not exist.

9 years agobuild: Update DEPENDENCIES
Daiki Ueno [Wed, 9 Dec 2015 19:37:55 +0000 (04:37 +0900)] 
build: Update DEPENDENCIES

* DEPENDENCIES: Remove duplicate entry for libxml2.

9 years agobuild: Remove expat dependency
Daiki Ueno [Wed, 9 Dec 2015 08:35:34 +0000 (17:35 +0900)] 
build: Remove expat dependency

* DEPENDENCIES: Suggest libxml2 instead of expat.
* gnulib-local/lib/markup.c: New file.
* gnulib-local/lib/markup.h: New file.
* gnulib-local/modules/markup: New file.
* autogen.sh (GNULIB_MODULES_LIBGETTEXTPO): Add markup module.
* gettext-tools/configure.ac: Remove checks for expat.
* gettext-tools/gnulib-lib/.gitignore: Ignore modules pulled by
gnulib-tool due to the markup module usage.
* gettext-tools/gnulib-tests/.gitignore: Likewise.
* gettext-tools/libgettextpo/.gitignore: Likewise.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES):
Remove ../src/libexpat-compat.c.
(libgettextpo_la_LDFLAGS): Remove @LTLIBEXPAT@.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Remove
libexpat-compat.h.
(libgettextsrc_la_SOURCES): Remove libexpat-compat.c.
(libgettextsrc_la_LDFLAGS): Remove @LTLIBEXPAT@.
* gettext-tools/src/format-kde-kuit.c: Use functions from markup.h, when
the file is being compiled as part of libgettextpo.  Otherwise use
libxml2.
* gettext-tools/src/libexpat-compat.c: Remove.
* gettext-tools/src/libexpat-compat.h: Remove.

9 years agobuild: Fix texi2html failure with perl 5.22
Daiki Ueno [Tue, 8 Dec 2015 10:18:10 +0000 (19:18 +0900)] 
build: Fix texi2html failure with perl 5.22

* gettext-runtime/libasprintf/texi2html (update_sec_num): Don't use
"defined" against an array ref.
* gettext-tools/doc/texi2html (update_sec_num): Likewise.

9 years agoUpdate gnulib
Daiki Ueno [Tue, 8 Dec 2015 09:41:11 +0000 (18:41 +0900)] 
Update gnulib

9 years agoxgettext: Ignore --from-code when XML mode
Daiki Ueno [Tue, 8 Dec 2015 09:28:51 +0000 (18:28 +0900)] 
xgettext: Ignore --from-code when XML mode

* gettext-tools/src/xgettext.c (extract_from_xml_file): Forcibly set
current source encoding to UTF-8, on XML mode.

9 years agobuild: Suppress compiler warning
Daiki Ueno [Tue, 8 Dec 2015 09:27:58 +0000 (18:27 +0900)] 
build: Suppress compiler warning

* gettext-tools/src/its.c (its_rule_list_extract_text): Remove unused
local variable "message".

9 years agomsgfmt: Support XML file merging
Daiki Ueno [Mon, 5 Oct 2015 08:18:41 +0000 (17:18 +0900)] 
msgfmt: Support XML file merging

* gettext-tools/src/Makefile.am (noinst_HEADERS): Add write-xml.h.
(msgfmt_SOURCES): Add write-xml.c.
* gettext-tools/src/its.c (its_merge_context_merge_node): New function.
(its_merge_context_merge): New function.
(its_merge_context_alloc): New function.
(its_merge_context_write): New function.
(its_merge_context_free): New function.
* gettext-tools/src/its.h (its_merge_context_ty): New type.
* gettext-tools/src/msgfmt.c: Include "its.h", "locating-rule.h", and
"write-xml.h".
(SIZEOF): New macro.
(xml_mode, xml_locale_name, xml_template_name, xml_base_directory,
xml_language, xml_its_rules): New variable.
(long_options): Add --language and --xml.
(main): Handle new options.
(usage): Document new options.
(msgfmt_xml_bulk): New function.
* gettext-tools/src/write-xml.c: New file.
* gettext-tools/src/write-xml.h: New file.
* gettext-tools/doc/gettext.texi: Mention XML file merging use-case.
* gettext-tools/doc/msgfmt.texi: Mention --xml option.
* gettext-tools/tests/msgfmt-xml-1: New file.
* gettext-tools/tests/msgfmt-xml-2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add new tests.

9 years agoxgettext: Rewrite Glade scanner in ITS
Daiki Ueno [Fri, 2 Oct 2015 03:44:04 +0000 (12:44 +0900)] 
xgettext: Rewrite Glade scanner in ITS

* gettext-tools/its/glade.loc: New file.
* gettext-tools/its/glade1.its: New file.
* gettext-tools/its/glade2.its: New file.
* gettext-tools/its/gtkbuilder.its: New file.
* gettext-tools/its/Makefile.am (dist_its_DATA): Add new files.
* gettext-tools/src/Makefile.am (xgettext_SOURCES): Remove x-glade.c.
* gettext-tools/src/x-glade.c: Remove.
* gettext-tools/src/x-glade.h (EXTENSIONS_GLADE): Set language field to
NULL.
(SCANNERS_GLADE): Set func field to NULL.
* gettext-tools/po/POTFILES.in: Remove x-glade.c

9 years agoxgettext: Rewrite GSettings scanner in ITS
Daiki Ueno [Fri, 2 Oct 2015 03:38:14 +0000 (12:38 +0900)] 
xgettext: Rewrite GSettings scanner in ITS

* gettext-tools/its/gsettings.its: New file.
* gettext-tools/its/gsettings.loc: New file.
* gettext-tools/its/Makefile.am (dist_its_DATA): Add new files.
* gettext-tools/src/Makefile.am (xgettext_SOURCES): Remove x-gsettings.c.
* gettext-tools/src/x-gsettings.c: Remove.
* gettext-tools/src/x-gsettings.h (EXTENSIONS_GSETTINGS): Set language
field to NULL.
(SCANNER_GSETTINGS): Set func field to NULL.

9 years agoxgettext: Rewrite AppData scanner in ITS
Daiki Ueno [Fri, 2 Oct 2015 02:38:29 +0000 (11:38 +0900)] 
xgettext: Rewrite AppData scanner in ITS

* gettext-tools/its/appdata.loc: New file.
* gettext-tools/its/appdata.its: New file.
* gettext-tools/its/Makefile.am (dist_its_DATA): Add new files.
* gettext-tools/src/Makefile.am (xgettext_SOURCES): Remove x-appdata.c.
* gettext-tools/src/x-appdata.c: Remove.
* gettext-tools/src/x-appdata.h (EXTENSIONS_APPDATA): Set language
field to NULL.
(SCANNERS_APPDATA): Set func field to NULL.

9 years agoxgettext: Add support for generic XML files
Daiki Ueno [Wed, 30 Sep 2015 06:40:26 +0000 (15:40 +0900)] 
xgettext: Add support for generic XML files

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add trim module.
* gettext-tools/src/locating-rule.h: New file.
* gettext-tools/src/locating-rule.c: New file.
* gettext-tools/src/its.h: New file.
* gettext-tools/src/its.c: New file.
* gettext-tools/src/xgettext.c: Include "locating-rule.h" and "its.h".
(its_locators): New variable.
(long_options): Add --itstool option.
(extract_from_xml_file): New function.
(main): Handle --itstool option.
(usage): Document --itstool option.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add locating-rule.h
and its.h.
(libgettextsrc_la_CPPFLAGS): Add $(INCXML).
(libgettextsrc_la_SOURCES): Add locating-rule.c and its.c.
* gettext-tools/Makefile.am (SUBDIRS): Add its directory.
* gettext-tools/configure.ac: Output its/Makefile.
* gettext-tools/doc/gettext.texi (Preparing ITS Rules): New section.
* gettext-tools/doc/xgettext.texi: Mention --itstool option.
* gettext-tools/tests/Makefile.am (TESTS): Add new tests.
* gettext-tools/tests/xgettext-its-1: New file
* gettext-tools/tests/init-env.in: Set GETTEXTDATADIR for ITS tests.

9 years agocldr-plurals: Add sanity checks for input
Daiki Ueno [Wed, 18 Nov 2015 01:17:40 +0000 (10:17 +0900)] 
cldr-plurals: Add sanity checks for input

* gettext-tools/src/cldr-plurals.c (extract_rules): Add null checks and
element type checks.

9 years agocldr-plurals: Rewrite XML handling using libxml2
Daiki Ueno [Tue, 17 Nov 2015 07:26:33 +0000 (16:26 +0900)] 
cldr-plurals: Rewrite XML handling using libxml2

* src/cldr-plurals.c: Include <libxml/tree.h> and
<libxml/parser.h>, instead of "libexpat-compat.h".
(extract_locale, extracted_rules, parser, logical_file_name)
(struct element_state, stack, stack_size, stack_depth)
(ensure_stack_size, start_element_handler, end_element_handler)
(character_data_handler): Remove.
(extract_rules): Rename from extract_rule and rewrite using DOM.
(main): Use extract_rules.
* src/Makefile.am (cldr_plurals_CFLAGS): Add $(INCXML).

9 years agocldr-plurals: Fix a trivial leak
Daiki Ueno [Tue, 17 Nov 2015 07:23:07 +0000 (16:23 +0900)] 
cldr-plurals: Fix a trivial leak

* src/cldr-plural.y (sample_range): Free unused operand value.

9 years agodoc: Fix typo in gettext_noop example
Phil Davis [Tue, 17 Nov 2015 01:57:18 +0000 (10:57 +0900)] 
doc: Fix typo in gettext_noop example

* doc/gettext.texi (Special cases): Add missing ')' to
a gettext_noop call.

Copyright-paperwork-exempt: yes

9 years agomaint: Ignore more generated ChangeLogs
Daiki Ueno [Thu, 29 Oct 2015 07:30:53 +0000 (16:30 +0900)] 
maint: Ignore more generated ChangeLogs

* .gitignore: Add gettext-runtime/intl/ChangeLog,
gettext-runtime/po/ChangeLog, and gettext-tools/po/ChangeLog.

9 years agom4: Fix typo in usage comment
Daiki Ueno [Thu, 29 Oct 2015 07:20:05 +0000 (16:20 +0900)] 
m4: Fix typo in usage comment

* gettext-runtime/m4/gettext.m4: Remove duplicate words.
* gettext-runtime/m4/intl.m4: Likewise.
* gettext-runtime/m4/intldir.m4: Likewise.
* gettext-runtime/m4/intlmacosx.m4: Likewise.
* gettext-runtime/m4/lcmessage.m4: Likewise.
* gettext-runtime/m4/nls.m4: Likewise.
* gettext-runtime/m4/po.m4: Likewise.
* gettext-runtime/m4/progtest.m4: Likewise.
Reported by Jakub Wilk in:
https://lists.gnu.org/archive/html/bug-gettext/2015-10/msg00026.html.

9 years agodoc: Fix typo in msgfmt invocation
Daiki Ueno [Thu, 29 Oct 2015 07:18:14 +0000 (16:18 +0900)] 
doc: Fix typo in msgfmt invocation

* gettext-tools/doc/msgfmt.texi: Fix the documentation of -d option,
used in the Desktop Entry mode.

9 years agobuild: Generate ChangeLogs for intl and po
Daiki Ueno [Thu, 15 Oct 2015 01:18:03 +0000 (10:18 +0900)] 
build: Generate ChangeLogs for intl and po

* autogen.sh: Create empty ChangeLog files under intl and po.
* Makefile.am (gen-ChangeLogs): Rename from gen-ChangeLog.  Generate
ChangeLog files for */intl and */po as well as top-level.
* gettext-runtime/intl/ChangeLog.0: Rename from ChangeLog.
* gettext-runtime/po/ChangeLog.0: Rename from ChangeLog.
* gettext-tools/po/ChangeLog.1: Rename from ChangeLog.

9 years agobuild: Distribute old ChangeLogs in tarball
Daiki Ueno [Thu, 15 Oct 2015 00:55:27 +0000 (09:55 +0900)] 
build: Distribute old ChangeLogs in tarball

* Makefile.am (changelog_etc): Remove non-existent ChangeLog files
under intl and po.
(EXTRA_DIST): Add $(changelog_etc).

9 years agotests: use check_PROGRAMS
Mike Frysinger [Mon, 12 Oct 2015 21:57:27 +0000 (17:57 -0400)] 
tests: use check_PROGRAMS

The noinst_xxx targets will be compiled all the time.  For test programs,
the check_xxx targets make more sense as they'll only be built when the
user runs `make check`.

* gettext-runtime/tests/Makefile.am (noinst_PROGRAMS): Rename to ...
(check_PROGRAMS): ... this.

9 years agointl/localename: control langinfo.h inclusion
Mike Frysinger [Mon, 12 Oct 2015 22:00:43 +0000 (18:00 -0400)] 
intl/localename: control langinfo.h inclusion

This header is only used to work around buggy behavior in old versions
of glibc, so do not include it all the time.  Otherwise we get build
failures on systems that do not provide langinfo.h.

* gettext-runtime/intl/localename.c: Wrap langinfo.h include with same
ifdefs used in the source later on.

9 years agobuild: Remove ChangeLogs
Daiki Ueno [Wed, 14 Oct 2015 01:20:34 +0000 (10:20 +0900)] 
build: Remove ChangeLogs

Generate ChangeLog files at "make dist" time, using
gitlog-to-changelog.  We still keep ChangeLog files under "po" and
"intl" directories, since those files are copied as part of gettext
infrastructure and it is still meaningful to have them there.
* .gitignore: Add ChangeLog files.
* Admin/release-steps: Remove mention of running update-changelog
script.
* Admin/update-changelog: Remove.
* Makefile.am (gen-ChangeLog): New rule.
* autogen.sh: Copy gitlog-to-changelog from gnulib.  Create empty
ChangeLog files to suppress Automake errors.
* gettext-tools/doc/Makefile.am (EXTRA_DIST): Remove ChangeLog.0.
* gettext-tools/man/Makefile.am (EXTRA_DIST): Remove ChangeLog.0.
* gettext-tools/src/Makefile.am (EXTRA_DIST): Remove ChangeLog.0.
* gettext-tools/tests/Makefile.am (EXTRA_DIST): Remove ChangeLog.0.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove ChangeLog files.
* */ChangeLog: Rename to ChangeLog.0 or ChangeLog.1.
* HACKING: Add brief guideline to submit patches.

9 years agohello-c-gnome3: Simplify the Desktop Entry rules
Daiki Ueno [Thu, 8 Oct 2015 05:49:30 +0000 (14:49 +0900)] 
hello-c-gnome3: Simplify the Desktop Entry rules

* hello-c-gnome3/Makefile.am (hello.desktop.in): Don't use a
temporary file.
(hello.desktop): Likewise.

9 years agodoc: Don't expose generated version
Daiki Ueno [Tue, 6 Oct 2015 07:27:40 +0000 (16:27 +0900)] 
doc: Don't expose generated version

* gettext-tools/doc/Makefile.am ($(srcdir)/stamp-vti): Set
ARCHIVE-VERSION, derived from $(ARCHIVE_VERSION) in version.texi.
* gettext-tools/doc/gettext.texi (Files under Version Control): Refer to
ARCHIVE-VERSION, instead of VERSION.
* gettext-tools/doc/autopoint.texi: Refer to ARCHIVE-VERSION, instead of VERSION.

9 years agomsgfmt: More refactoring on --desktop
Daiki Ueno [Tue, 6 Oct 2015 03:35:15 +0000 (12:35 +0900)] 
msgfmt: More refactoring on --desktop

* msgfmt.c (msgfmt_desktop_bulk): Distinguish the number of errors
and the exit status.
* write-desktop.c (msgdomain_write_desktop_bulk): Don't
immediately exit when fwriteerror() returns error.

9 years agomsgfmt: Refactor --desktop handling
Daiki Ueno [Mon, 5 Oct 2015 07:33:31 +0000 (16:33 +0900)] 
msgfmt: Refactor --desktop handling

* gettext-tools/src/msgfmt.c (get_languages): Avoid redundant memory
allocation.
(msgfmt_operand_list_init): New function.
(msgfmt_operand_list_destroy): New function.
(msgfmt_operand_list_append): New function.
(msgfmt_operand_list_add_directory): New function.
(msgfmt_desktop_bulk): Rewrite using msgfmt_operand_list_ty.
* gettext-tools/src/msgfmt.h (msgfmt_operand_ty,
msgfmt_operand_list_ty): New type.
* gettext-tools/src/write-desktop.c (msgdomain_write_desktop_bulk):
Simplify using msgfmt_operand_list_ty.
(msgdomain_write_desktop): Simplify using msgfmt_operand_list_ty.
* gettext-tools/src/write-desktop.h (msgdomain_write_desktop_bulk):
Take OPERANDS as the first argument, instead of LANGUAGES and MESSAGES.

9 years agosentence: Avoid compiler warnings
Daiki Ueno [Tue, 6 Oct 2015 00:59:32 +0000 (09:59 +0900)] 
sentence: Avoid compiler warnings

* gettext-tools/src/sentence.c (sentence_end): Assign initial values to
local variables to suppress compiler warnings with
-Wmaybe-uninitialized.  This shouldn't address any real bug.

9 years agobuild: Fix the last commit
Daiki Ueno [Thu, 1 Oct 2015 09:08:29 +0000 (18:08 +0900)] 
build: Fix the last commit

9 years agobuild: Fix the last commit
Daiki Ueno [Wed, 30 Sep 2015 09:09:42 +0000 (18:09 +0900)] 
build: Fix the last commit

9 years agobuild: Avoid file name length limitation of tar
Daiki Ueno [Wed, 30 Sep 2015 08:33:13 +0000 (17:33 +0900)] 
build: Avoid file name length limitation of tar

"csharpdoc" is a bit too long to accommodate long file names with
the version returned from git-version-gen:
  tar: gettext-0.19.6.4-1e74e4/.../csharpdoc/...: file name is too
    long (max 99); not dumped
* gettext-runtime/intl-csharp/doc: Rename from csharpdoc.
* gettext-runtime/intl-cshap/Makefile.am (doc, DOC_FILES): Adjust to the
directory name change.

9 years agobuild: Regenerate ABOUT-NLS
Daiki Ueno [Wed, 30 Sep 2015 06:36:48 +0000 (15:36 +0900)] 
build: Regenerate ABOUT-NLS

9 years agobuild: Fix ABOUT-NLS generation with newer Texinfo
Daiki Ueno [Wed, 30 Sep 2015 06:33:32 +0000 (15:33 +0900)] 
build: Fix ABOUT-NLS generation with newer Texinfo

9 years agoRelease 0.19.6 v0.19.6
Daiki Ueno [Fri, 11 Sep 2015 03:03:07 +0000 (12:03 +0900)] 
Release 0.19.6

9 years agoUpdate translations
Daiki Ueno [Fri, 11 Sep 2015 03:01:48 +0000 (12:01 +0900)] 
Update translations

9 years agoPrepare for 0.19.6
Daiki Ueno [Fri, 11 Sep 2015 01:27:41 +0000 (10:27 +0900)] 
Prepare for 0.19.6

9 years agodoc: Regenerate translation matrix
Daiki Ueno [Fri, 11 Sep 2015 01:18:26 +0000 (10:18 +0900)] 
doc: Regenerate translation matrix

* gettext-runtime/ABOUT-NLS: Regenerate for 0.19.6.
* gettext-runtime/doc/matrix.texi: Regenerate for 0.19.6.

9 years agogettext-tools: Remove ABOUT-NLS from repository
Daiki Ueno [Fri, 11 Sep 2015 01:42:49 +0000 (10:42 +0900)] 
gettext-tools: Remove ABOUT-NLS from repository

9 years agoUpdate gnulib
Daiki Ueno [Fri, 11 Sep 2015 00:56:08 +0000 (09:56 +0900)] 
Update gnulib

9 years agoRevert "xgettext: Allow multiple --copyright-holder"
Daiki Ueno [Thu, 10 Sep 2015 07:52:09 +0000 (16:52 +0900)] 
Revert "xgettext: Allow multiple --copyright-holder"

This reverts commit 15363cca838ff1d69f6e3bfbb47ecfe90c0f5000.

Now that po/Makefile.in.in supports custom header for POT files, it is
not meaningful to add a special case for multiple copyright holders.

9 years agoNEWS: Fix wording
Daiki Ueno [Wed, 2 Sep 2015 09:42:00 +0000 (18:42 +0900)] 
NEWS: Fix wording

9 years agoNEWS: Add 0.19.6 changes
Daiki Ueno [Tue, 1 Sep 2015 02:44:41 +0000 (11:44 +0900)] 
NEWS: Add 0.19.6 changes

9 years agopo: Support reading header comments from file
Daiki Ueno [Tue, 1 Sep 2015 02:18:17 +0000 (11:18 +0900)] 
po: Support reading header comments from file

* Makefile.in.in ($(DOMAIN).pot-update): Replace header comment
with the content of $(DOMAIN).pot-header, if exists.

9 years agointl: fix memory leak in _nl_load_domain
Paul Eggert [Wed, 26 Aug 2015 14:31:37 +0000 (07:31 -0700)] 
intl: fix memory leak in _nl_load_domain

* loadmsgcat.c (_nl_load_domain):
Free data after a read failure.  See:
https://sourceware.org/bugzilla/show_bug.cgi?id=18871

9 years agoxgettext: Replace PACKAGE placeholder if possible
Daiki Ueno [Mon, 24 Aug 2015 08:30:42 +0000 (17:30 +0900)] 
xgettext: Replace PACKAGE placeholder if possible

* xgettext.c (construct_header): Replace PACKAGE placeholder in
the header comment.

9 years agoxgettext: Add support for AppData XML files
Philip Withnall [Thu, 11 Jun 2015 18:11:42 +0000 (19:11 +0100)] 
xgettext: Add support for AppData XML files

AppData files are used to describe an application for package
management, and are described here:

http://people.freedesktop.org/~hughsient/appdata/

They may also currently be translated using intltool or itstool:

http://people.freedesktop.org/~hughsient/appdata/#translation

9 years agotests: Use check_PROGRAMS
Daiki Ueno [Fri, 21 Aug 2015 06:29:13 +0000 (15:29 +0900)] 
tests: Use check_PROGRAMS

* gettext-tools/tests/Makefile.am (check_PROGRAMS): Rename from
noinst_PROGRAMS, to defer the compilation until required.

9 years agoautopoint: Respect AM_GNU_GETTEXT_REQUIRE_VERSION
Daiki Ueno [Fri, 21 Aug 2015 06:19:21 +0000 (15:19 +0900)] 
autopoint: Respect AM_GNU_GETTEXT_REQUIRE_VERSION

* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT_REQUIRE_VERSION): New macro.
Bump serial to 67.
* gettext-tools/doc/autopoint.texi: Mention AM_GNU_GETTEXT_REQUIRE_VERSION.
* gettext-tools/misc/gettextize.in: Check if AM_GNU_GETTEXT_VERSION is
used.
* gettext-tools/misc/autopoint.in: Respect AM_GNU_GETTEXT_REQUIRE_VERSION.
* gettext-tools/tests/autopoint-2: Check AM_GNU_GETTEXT_REQUIRE_VERSION.

9 years agoxgettext: Allow multiple --copyright-holder
Daiki Ueno [Fri, 21 Aug 2015 05:43:30 +0000 (14:43 +0900)] 
xgettext: Allow multiple --copyright-holder

Feature requested by Francesco Poli in:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682580>.
* xgettext.c (default_copyright_holder): New constant, renamed
from copyright_holder.
(copyright_holder): Define as a variable.
(main): Allow multiple --copyright-holder options.
(construct_header): Support multiple --copyright-holder options.

9 years agointl: Pacify compilation with pre-C99 compilers
Daiki Ueno [Fri, 21 Aug 2015 01:22:01 +0000 (10:22 +0900)] 
intl: Pacify compilation with pre-C99 compilers

* loadmsgcat.c (_nl_load_domain): Move the call to
__libc_lock_define_initialized_recursive to the end of local
variable declarations to avoid extra ';' being expanded to an
empty statement.
Reported by pan7 in:
<http://savannah.gnu.org/support/?108864>.

9 years agocldr-plurals: Fix trivial resource leak
Daiki Ueno [Sat, 15 Aug 2015 01:19:45 +0000 (10:19 +0900)] 
cldr-plurals: Fix trivial resource leak

* cldr-plurals.c (main): Close FP after use.
Reported by Denis Denisov.

10 years agobuild: Substitute archive version with configure
Daiki Ueno [Tue, 28 Jul 2015 05:32:43 +0000 (14:32 +0900)] 
build: Substitute archive version with configure

* gettext-tools/configure.ac (ARCHIVE_VERSION): New substituted
variable.
* gettext-tools/misc/gettextize.in (archive_version): New variable, set
to ARCHIVE_VERSION.  Use it as the argument of AM_GNU_GETTEXT_VERSION.
* gettext-tools/tests/init-env.in (ARCHIVE_VERSION): New substituted
variable.
* gettext-tools/tests/autopoint-2: Use ARCHIVE_VERSION, instead of the
hard-coded version string.
* gettext-tools/tests/autopoint-3: Likewise.

10 years agoNEWS: Fix typo
Daiki Ueno [Mon, 27 Jul 2015 08:36:01 +0000 (17:36 +0900)] 
NEWS: Fix typo

10 years agogettextize: Use a crafted version string
Daiki Ueno [Mon, 27 Jul 2015 06:08:43 +0000 (15:08 +0900)] 
gettextize: Use a crafted version string

Reported by Max Lin in:
<https://lists.gnu.org/archive/html/bug-gettext/2015-07/msg00024.html>.
* gettextize.in: Replace AM_GNU_GETTEXT_VERSION invocation with
"$gettext_version" rather than "$version".  This makes it easier
to maintain a minor release without being affected by the actual
version number generated by git-version-gen.
(gettext_version): New variable.

10 years agopo-mode: Fix to accept four-part msgfmt version number
Peter Eisentraut [Sat, 25 Jul 2015 00:23:32 +0000 (20:23 -0400)] 
po-mode: Fix to accept four-part msgfmt version number

10 years agocldr-plurals: Fix --enable-relocatable compilation
Václav Slavík [Tue, 21 Jul 2015 11:00:32 +0000 (13:00 +0200)] 
cldr-plurals: Fix --enable-relocatable compilation

Compilation of the cldr-plurals tool was broken in the relocatable case
because of missing CPPFLAGS/LDFLAGS.  Add the same flags used by other
tools to the makefile.
* gettext-tools/src/Makefile.am (cldr_plurals_CPPFLAGS)
(cldr_plurals_LDFLAGS): Adjust for --enable-relocatable
compilation.

10 years agomaint: Add more files to .gitignore v0.19.5.1
Daiki Ueno [Wed, 15 Jul 2015 01:29:48 +0000 (10:29 +0900)] 
maint: Add more files to .gitignore