summaryrefslogtreecommitdiffstats
path: root/gettext-tools
Commit message (Collapse)AuthorAgeFilesLines
* xgettext: avoid out-of-bounds read in literalsDaiki Ueno2015-06-242-0/+9
| | | | | | * gettext-tools/src/x-c.c (literalstring_parse): Check if the next character of a backslash is NUL. Reported by Hanno Boeck in: <http://savannah.gnu.org/bugs/?45391>.
* build: Export formatstring_kde_kuit to W32Daiki Ueno2015-06-242-0/+6
| | | | | * woe32dll/gettextsrc-exports.c: Export formatstring_kde_kuit. Reported by Vincent Torri.
* tests: Skip lang-bash test for Mac OS X's bashDaiki Ueno2015-06-242-0/+17
| | | | * lang-bash: Skip if "bash --help" isn't localized on Mac OS X.
* Fix reporter creditDaiki Ueno2015-06-241-1/+1
|
* autopoint: Update for 0.19.5Daiki Ueno2015-06-242-1/+5
| | | | * autopoint.in: Update for 0.19.5.
* tests: Don't rely on echo -nDaiki Ueno2015-06-242-1/+19
| | | | | | * gettext-tools/tests/msgfilter-8: Port the "echo -n" equivalent from gettext-2. Reported by paul zimmermann in: <https://lists.gnu.org/archive/html/bug-gettext/2015-06/msg00019.html>.
* tests: Skip CLDR tests when libexpat is missingDaiki Ueno2015-06-243-0/+18
| | | | | * gettext-tools/tests/cldr-plurals-1: Skip if XML is not supported. * gettext-tools/tests/msginit-4: Likewise.
* tests: Skip KUIT tests when libexpat is missingDaiki Ueno2015-06-243-2/+32
| | | | | | * format-kde-kuit-1: Skip if KDE KUIT format is not supported. * format-kde-kuit-2: Likewise. Suggested by Chusslove Illich.
* build: Fix error when expat is not availableDaiki Ueno2015-06-232-2/+6
| | | | | * cldr-plurals.c (main): Fix unmatched braces when !(DYNLOAD_LIBEXPAT || HAVE_LIBEXPAT).
* build: Fix build failure on SolarisDaiki Ueno2015-06-232-2/+9
| | | | | | | | * gettext-tools/src/cldr-plurals.c: Include "basename.h". (main): Place optind on the right hand side of the expression, to work around build failure on Solaris. Reported by Dagobert Michelsen in: <https://lists.gnu.org/archive/html/bug-gettext/2015-06/msg00015.html>.
* build: Clean leftover of "make uninstall"Daiki Ueno2015-06-232-0/+5
| | | | * Makefile.am (uninstall-local): Remove cldr-plurals.
* build: Fix test failure on VPATH buildDaiki Ueno2015-06-232-2/+6
| | | | | * msginit-4: Don't check Project-Id-Version: field, since we can't use the project-id script when $builddir != $srcdir.
* build: Add missing headers in distributionDaiki Ueno2015-06-232-1/+7
| | | | * Makefile.am (noinst_HEADERS): Add cldr-plural.h and cldr-plural-exp.h.
* m4, help2man: Update from gnulibDaiki Ueno2015-06-232-1/+5
| | | | | | | | | | | | | | | | | | | | | | * gettext-runtime/m4/codeset.m4: Update copyright year. * gettext-runtime/m4/gettext.m4: Likewise. * gettext-runtime/m4/iconv.m4: Likewise. * 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/extern-inline.m4: Likewise. Port the following change: 2015-04-29 Paul Eggert <eggert@cs.ucla.edu> extern-inline: no need for workaround in GCC 5.1 * doc/extern-inline.texi (extern inline): * m4/extern-inline.m4 (gl_EXTERN_INLINE): GCC bugs 54113 and 63877 are fixed in GCC 5.1, so don't work around these bugs in GCC 5.1 and later. Maybe in a decade or two we can remove these workarounds. * gettext-tools/man/help2man: Update copyright year.
* doc: Update gettext-tools/ABOUT-NLS tooDaiki Ueno2015-06-232-1066/+1198
|
* Prepare for 0.19.5Daiki Ueno2015-06-231-1/+1
|
* tests: Add test for msginit CLDR supportDaiki Ueno2015-06-234-2/+100
| | | | | | | * gettext-tools/tests/msginit-4: New file. * gettext-tools/tests/common/supplemental/plurals.xml: New data file. * gettext-tools/tests/Makefile.am (TESTS): Add new tests. (EXTRA_DIST): Add new data file.
* msginit: Guess plural rules from Unicode CLDRDaiki Ueno2015-06-2213-4/+2001
| | | | | | | | | | | | | | | | | | | | | * gettext-tools/src/Makefile.am (noinst_PROGRAMS): Add cldr-plurals. (install-exec-local): Install cldr-plurals. (BUILT_SOURCES): Add cldr-plural.c and cldr-plural.h. (cldr_plural_SOURCES): New variable. (cldr_plural_LDADD): New variable. * gettext-tools/src/cldr-plural-exp.h: New file. * gettext-tools/src/cldr-plural-exp.c: New file. * gettext-tools/src/cldr-plural.y: New file. * gettext-tools/src/cldr-plurals.c: New file. * gettext-tools/src/msginit.c (plural_forms): Call cldr-plurals program if the plural rule is not defined in the code. * gettext-tools/doc/msginit.texi: More explanations about "meta information". * gettext-tools/doc/gettext.texi (Plural forms): Mention Unicode CLDR support in msginit. * gettext-tools/tests/cldr-plurals-1: New file. * gettext-tools/tests/Makefile.am (TESTS): Add new tests. * NEWS: Mention msginit change.
* maint: Revert copyright year changes in test dataDaiki Ueno2015-06-0510-10/+10
|
* Update gnulibDaiki Ueno2015-06-052-4/+8
|
* maint: Update copyright yearDaiki Ueno2015-06-05291-295/+423
|
* awk: Recognize .twjr file extensionDaiki Ueno2015-06-014-1/+16
| | | | | | | | | * gettext-tools/src/x-awk.h (EXTENSIONS_AWK): Register file extensions ".gawk" and ".twjr". Suggested by Karl Berry in: <https://lists.gnu.org/archive/html/bug-gettext/2015-05/msg00032.html>. * gettext-tools/doc/gettext.texi (gawk): Mention new file extensions ".gawk" and ".twjr".
* doc: Update link to GNU helloDaiki Ueno2015-06-012-5/+10
| | | | | | * gettext.texi (Adjusting Files): Update link to GNU hello distribution. Suggested by Karl Berry in: <https://lists.gnu.org/archive/html/bug-gettext/2015-05/msg00031.html>.
* kde: Enable ki18n keywords by defaultЧаслав Илић (Chusslove Illich)2015-05-114-0/+112
| | | | | | | | | | | | | * gettext-tools/src/x-c.c (init_flag_table_kde): New function. (additional_keywords_kde): New variable. (activate_additional_keywords_kde): New function. (init_keywords): Optional addition of KDE-specific keywords. * gettext-tools/src/x-c.h (init_flag_table_kde): New function declaration. (activate_additional_keywords_kde): New function declaration. * gettext-tools/src/xgettext.c (main): Invoke addition of KDE-specific keywords when language is C++ with KDE. * NEWS: Mention --kde behavior change.
* doc: Update link to Python String FormattingMatt Behrens2015-05-082-5/+9
|
* po-mode: Add option to keep .mo when validatingManuel Uberti2015-04-242-5/+20
| | | | | * gettext-tools/misc/po-mode.el (po-keep-mo-file): New user option. (po-validate): Respect po-keep-mo-file. Fix comment indentation.
* kde-kuit: Use xmlns to avoid element name conflictDaiki Ueno2015-03-202-3/+14
| | | | | * format-kde-kuit.c (XML_NS): New macro. (format_parse): Add namespace qualifier to the <kuit> tag.
* doc: Fix a typo and a punctuation error.Benno Schulenberg2015-03-162-2/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build: Suppress dead assignment warningDaiki Ueno2015-03-123-5/+8
| | | | | | * gettext-tools/src/format-kde-kuit.c (format_parse): Remove dead assignment, spotted by clang-analyzer. * gettext-tools/src/x-c.c (phase5_get): Likewise.
* build: Fix VPATH buildDaiki Ueno2015-03-122-1/+6
|
* Typo and documentation fixesDaiki Ueno2015-03-124-16/+18
|
* msgunfmt: Check allocated size for static segmentDaiki Ueno2015-03-112-4/+15
| | | | | | | Reported by Max Lin in: http://lists.gnu.org/archive/html/bug-gettext/2015-03/msg00005.html * read-mo.c (get_sysdep_string): Check if the embedded segment size is valid, before adding it to the string length.
* po: Update POTFILES.in for gettext-toolsDaiki Ueno2015-03-092-0/+6
|
* format-kde: Recognize KUIT markupDaiki Ueno2015-03-0916-11/+613
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Chusslove Illich in: https://lists.gnu.org/archive/html/bug-gettext/2015-01/msg00017.html * gettext-tools/src/format.h (formatstring_kde_kuit): New variable declaration. * gettext-tools/src/format.c (formatstring_parsers): Register formatstring_kde_kuitas a format string parser. * gettext-tools/src/format-kde-kuit.c: New file. * gettext-tools/src/message.h (NFORMATS): Increment. (enum format_type): New enum value format_kde_kuit. * gettext-tools/src/xgettext.c (xgettext_record_flag): Handle format_kde_kuit. * gettext-tools/src/Makefile.am (xgettext_SOURCES): Move libexpat-compat.c to... (libgettextsrc_la_SOURCES): ...here. (xgettext_LDADD): Move @LTLIBEXPAT@ to... (libgettextsrc_la_LDFLAGS): ...here. (FORMAT_SOURCE): Add format-kde-kuit.c. * gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Add ../src/format-kde-kuit.c and ../src/libexpat-compat.c. (libgettextpo_la_LDFLAGS): Add @LTLIBEXPAT@. * gettext-tools/tests/format-kde-kuit-1: New file. * gettext-tools/tests/format-kde-kuit-2: New file. * gettext-tools/tests/Makefile.am (TESTS): Add new tests. * gettext-tools/doc/gettext.texi (kde-kuit-format): New subsection. * NEWS: Mention KUIT format string support.
* hello-c-gnome3: Simplify variable substitutionDaiki Ueno2015-03-072-3/+6
| | | | | * gettext-tools/examples/hello-c-gnome3/Makefile.am (hello.desktop): Remove unnecessary $srcdir check.
* hello-c-gnome3: Improve comment in Makefile.amDaiki Ueno2015-03-062-1/+10
| | | | | * hello-c-gnome3/Makefile.am: Suggest hello.desktop.in should be included in EXTRA_DIST.
* Update .gitignoreDaiki Ueno2015-03-042-21/+22
|
* Fix ChangeLog botchesDaiki Ueno2015-03-041-1/+0
|
* xgettext: Support message syntax checksDaiki Ueno2015-03-0324-12/+923
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, xgettext could report common syntactic problems in extracted strings. The current built-in checks are ellipsis-unicode, space-ellipsis, and quote-unicode. Those checks can be enabled with --check option of xgettext and disabled with special "xgettext:" comment in source files. Feature suggested by Philip Withnall in: https://savannah.gnu.org/bugs/?44098 * gettext-tools/src/message.h (enum syntax_check_type): New enum. (NSYNTAXCHECKS): New constant. (enum is_syntax_check): New enum. (struct message_ty): New field 'do_syntax_check'. (syntax_check_name): New variable declaration. * gettext-tools/src/message.c (syntax_check_name): New variable. * gettext-tools/src/msgl-cat.c (catenate_msgdomain_list): Propagate mp->do_syntax_check. * gettext-tools/src/msgmerge.c (message_merge): Propagate ref->do_syntax_check. * gettext-tools/src/msgl-check.h (syntax_check_message_list): New declaration. * gettext-tools/src/msgl-check.c (sentence_end): New function. (syntax_check_ellipsis_unicode): New function. (syntax_check_space_ellipsis): New function. (syntax_check_quote_unicode): New function. (syntax_check_message): New function. (syntax_check_message_list): New function. * gettext-tools/src/read-catalog-abstract.h (po_parse_comment_special): Adjust function declaration. * gettext-tools/src/read-catalog-abstract.c (po_parse_comment_special): Add new argument SCP for syntax checking; all callers changed. * gettext-tools/src/read-catalog.h (DEFAULT_CATALOG_READER_TY): New field 'do_syntax_check'. * gettext-tools/src/read-catalog.c (default_constructor): Initialize this->do_syntax_check. (default_copy_comment_state): Propagate this->do_syntax_check. * gettext-tools/src/xgettext.c (long_options): Add --check option. (main): Handle --check option. (usage): Document --check option. (remember_a_message): Propagate do_syntax_check value. * gettext-tools/tests/xgettext-14: New file. * gettext-tools/tests/sentence.c: New file. * gettext-tools/tests/Makefile.am (TESTS): Add new test. (noinst_PROGRAMS): Add 'sentence'. (sentence_SOURCES): New variable. (sentence_CPPFLAGS): New variable. (sentence_LDADD): New variable. * gettext-tools/doc/xgettext.texi: Document --check option.
* doc: Document plural forms for arb, tha, and indDaiki Ueno2015-02-102-0/+28
| | | | | | | * gettext.texi (Plural forms): Add Arabic, Bahasa Indonesian, and Thai. Reported by Maryam Aly in: <https://lists.gnu.org/archive/html/bug-gettext/2015-02/msg00012.html>.
* tests: Fix "broken pipe" error in msgfilter-7Daiki Ueno2015-02-062-1/+18
| | | | | | * msgfilter-7: Eat up filter input to avoid EPIPE in the parent msgfilter process, which was exposed on AIX 5. Reported by Michael Felt.
* tests: Improve comments in xgettext-13Alex Henrie2015-02-061-4/+4
|
* xgettext: Wrap location comments to 79 charactersAlex Henrie2015-02-056-15/+88
| | | | | | | | | | | | Previously, messages wre wrapped to 79 characters, but location comments were wrapped to 78 characters. * gettext-tools/src/write-po.c (message_print_comment_filepos): Fix off-by-one in calculating line-wrapping width of location comment. * gettext-tools/tests/xgettext-13: New file. * gettext-tools/tests/Makefile.am (TESTS): Add new test. * gettext-tools/tests/mm-viet.out: Adjust to the recent line-wrapping behavior change.
* doc: Fix markup error in msgexec/msgfilterDaiki Ueno2015-02-033-2/+7
| | | | | * msgexec.texi, msgfilter.texi: Fix markup error caused by commit 96dde0b8 and a4d132f7.
* msgfilter: Factor out quoted string handlingDaiki Ueno2015-02-034-149/+231
| | | | | | | | | | | For later use in xgettext, separate out the scanner part in filter-quote.c into a separate file. See: <https://savannah.gnu.org/bugs/?44098>. * quote.h: New file split from filter-quote.c. * filter-quote.c: Include "quote.h". (convert_quote_callback): New function. (convert_ascii_quote_to_unicode): Use scan_quoted from quote.h. * Makefile.am (libgettextsrc_la_SOURCES): Add quote.h.
* examples: Require gettext 0.19 in hello-c-gnome3Matthias Clasen2015-02-022-1/+6
| | | | | * gettext-tools/examples/hello-c-gnome3/configure.ac: Require gettext 0.19, for GSettings and Desktop files.
* msgexec: Add --newline optionDaiki Ueno2015-01-297-2/+196
| | | | | | | | | | | | | | See the commit 96dde0b for the rationale. * gettext-tools/src/msgexec.c (newline): New variable. (long_options): Add --newline option. (main): Handle --newline option. (usage): Document --newline option. (process_string): Handle --newline option. * gettext-tools/tests/msgexec-6: New file. * gettext-tools/tests/Makefile.am (TESTS): Add new test. * gettext-tools/doc/msgexec.texi: Document --newline option.
* msgfilter: Add --newline optionDaiki Ueno2015-01-297-9/+246
| | | | | | | | | | | | | | | | | | | | | | | | The filter program was supposed to handle translation without a newline character at the end of line. This was causing portability problems with standard text processing programs on some platforms (BSD sed, for instance) and not friendly towards POSIX, where a "text file" is required to have an ending newline. The new --newline option controls the behavior. If it is given, both filter input and output are assumed to end with a newline character. * gettext-tools/src/msgfilter.c (newline): New variable. (long_options): Add --newline option. (main): Handle --newline option. (usage): Document --newline option. (process_string_with_newline): New function which wraps process_string. (process_message): Use process_string_with_newline instead of process_string if --newline is specified. * gettext-tools/tests/msgfilter-8: New file. * gettext-tools/tests/Makefile.am (TESTS): Add new test. * gettext-tools/doc/msgfilter.texi: Document --newline option.
* xgettext, msgmerge: Avoid undefined non-null argument behaviorDaiki Ueno2015-01-243-3/+14
| | | | | | | | | * xgettext.c (remember_a_message): Building with gcc's -fsanitize=undefined and running tests triggered: xgettext.c:2425:17: runtime error: null pointer passed as argument \ 2, which is declared to never be null Adjust the argument of strncmp to never be null. * msgmerge.c (message_merge): Likewise for memcpy.
* build: Fix parallel build from git checkoutDaiki Ueno2015-01-232-0/+8
| | | | | | Since po-gram-gen2.h depends on po-gram-gen.h, an explicit dependency on the YACC rule is needed for parallel compilation. * Makefile.am (po-gram-gen.h): Depend on po-gram-gen.c.