summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix location of valgrind suppression fileDaiki Ueno2016-05-311-1/+1
| | | | | * gettext-tools/tests/Makefile.am (CHECKER): Use $(abs_srcdir) instead of $(srcdir).
* tests: Turn sentence test into a shell scriptDaiki Ueno2016-05-311-5/+5
| | | | | | | | | | | | | | | | For consistency with other tests. Also it fixes a test failure when built with --disable-shared, since LOG_COMPILER set to $(SHELL) doesn't recognize binary executable. * gettext-tools/tests/Makefile.am (TESTS): Rename 'sentence' to 'sentence-1'. (check_PROGRAMS): Rename 'sentence' to 'sentence-1-prg'. (sentence_1_prg_SOURCES): Rename from 'sentence_SOURCES'. (sentence_1_prg_CPPFLAGS): Rename from 'sentence_CPPFLAGS'. (sentence_1_prg_LDADD): Rename from 'sentence_LDADD'. * gettext-tools/tests/sentence-1: New file. * gettext-tools/tests/sentence-1-prg.c: Rename from sentence.c, move the test data to sentence-1. * gettext-tools/tests/.gitignore: Ignore sentence-1-prg.
* tests: Add test for ITS search pathDaiki Ueno2016-05-201-1/+1
| | | | | * gettext-tools/tests/Makefile.am (TESTS): Add new test. * gettext-tools/tests/xgettext-its-2: New file.
* maint: Update copyright yearDaiki Ueno2016-01-021-2/+1
|
* msgfmt: Support XML file mergingDaiki Ueno2015-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* xgettext: Add support for generic XML filesDaiki Ueno2015-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* build: Remove ChangeLogsDaiki Ueno2015-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* xgettext: Add support for AppData XML filesPhilip Withnall2015-08-211-0/+1
| | | | | | | | | | | 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
* tests: Use check_PROGRAMSDaiki Ueno2015-08-211-1/+1
| | | | | * gettext-tools/tests/Makefile.am (check_PROGRAMS): Rename from noinst_PROGRAMS, to defer the compilation until required.
* xgettext: Make literal parser robust against NULDaiki Ueno2015-06-251-1/+2
| | | | | | | | | | | | | * gettext-tools/src/x-c.c (literalstring_parse): Add more NUL checks. Change the loop invariant so that C always points to the character previously pointed by P. Reported by Hanno Boeck in: <http://savannah.gnu.org/bugs/?45391>. * gettext-tools/tests/xg-c-21.c (main): New file. * gettext-tools/tests/xgettext-c-21 (result): New file. * gettext-tools/tests/Makefile.am (TESTS): Add new test. (EXTRA_DIST): Add xg-c-21.c.
* tests: Add test for msginit CLDR supportDaiki Ueno2015-06-231-2/+3
| | | | | | | * 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-221-1/+1
| | | | | | | | | | | | | | | | | | | | | * 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: Update copyright yearDaiki Ueno2015-06-051-1/+2
|
* build: Fix VPATH buildDaiki Ueno2015-03-121-1/+1
|
* format-kde: Recognize KUIT markupDaiki Ueno2015-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* xgettext: Support message syntax checksDaiki Ueno2015-03-031-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* xgettext: Wrap location comments to 79 charactersAlex Henrie2015-02-051-0/+1
| | | | | | | | | | | | 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.
* msgexec: Add --newline optionDaiki Ueno2015-01-291-1/+1
| | | | | | | | | | | | | | 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-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* tests: Test msgcat --sort-by-file optionDaiki Ueno2014-12-091-1/+1
| | | | | * msgcat-20: New file. * Makefile.am (TESTS): Add new test.
* tests: Add more tests for integer overflow when reading MO fileDaiki Ueno2014-12-051-1/+2
| | | | | | * msgunfmt-3: Check overflow-[1-6].mo. * Makefile.am (EXTRA_DIST): Add more test data for msgunfmt integer overflow.
* tests: Add test for C++11 string literalsDaiki Ueno2014-12-021-1/+1
| | | | | * xgettext-c-20: New file. * Makefile.am (TESTS): Add new test.
* tests: Add test for Unicode surrogate characters in C#Daiki Ueno2014-12-011-1/+1
| | | | | * xgettext-csharp-8: New file. * Makefile.am (TESTS): Add new test.
* tests: Add test for empty msgstr passed to msgfilterDaiki Ueno2014-11-281-1/+1
| | | | | * msgfilter-7: New file. * Makefile.am (TESTS): Add new test.
* tests: Add test for integer overflow when reading MO fileDaiki Ueno2014-11-231-2/+2
| | | | | | * msgunfmt-3: New file. * Makefile.am (TESTS): Add new test. (EXTRA_DIST): Add data file for msgunfmt-3.
* tests: Add test for same ARGNUM1/ARGNUM2 given to xgettext -kDaiki Ueno2014-10-281-1/+1
| | | | | * xgettext-12: New file. * Makefile.am (TESTS): Add new test.
* tests: Add test for msgfilter plural handlingDaiki Ueno2014-05-151-0/+1
|
* tests: Add test for msgexec plural handlingDaiki Ueno2014-05-151-1/+1
|
* msgfmt: Report error on accelerator mismatchDaiki Ueno2014-05-141-1/+1
| | | | | * msgl-check.c (check_pair): Increment error count on missing accelerator character or too many accelerators.
* tests: Improve test coverageDaiki Ueno2014-05-141-1/+1
|
* msgattrib: Add --empty optionGuido Flohr2014-05-101-1/+1
|
* c: Interpret string literals lazilyDaiki Ueno2014-05-091-1/+1
| | | | | | | | | | | | | | | | | | * x-c.c (P7_EOF, P7_STRING_END, P7_QUOTES, P7_QUOTE, P7_NEWLINE) (UNICODE, IS_UNICODE, UNICODE_VALUE): Remove. (phase7_get): Remove. (phase7_ungetc): Remove. (phase5_get): Use 'phase3_get' directly to extract string literals; use 'arglist_parser_remember_literal' instead of 'arglist_parser_remember'. (literalstring_parse): New function. (literalstring_c): New variable. (extract_parenthesized): Remove the 'xgettext_current_source_encoding' setting to prevent encoding conversion around 'arglist_parser_done'. * x-c.h (SCANNERS_C): Register 'literalstring_c' as a literalstring_parser. (literalstring_c): New variable declaration.
* tests: Add test for prefixed comment tagDaiki Ueno2014-05-031-1/+1
| | | | | * xgettext-11: New file. * Makefile.am (TESTS): Add new test.
* scheme: Recognize GIMP script-fu extension _"abc"Daiki Ueno2014-04-301-0/+1
| | | | * gettext-tools/src/x-scheme.c (read_object): Recognize _"abc".
* tests: Don't run a test only successful after "make dist" by defaultDaiki Ueno2014-04-291-1/+2
| | | | | * Makefile.am (TESTS): Move xgettext-1 to... (EXTRA_DIST): ...here.
* tests: Don't run system dependent test by defaultDaiki Ueno2014-04-211-2/+3
| | | | | * Makefile.am (TESTS): Move xgettext-c-1 to... (EXTRA_DIST): ...here.
* msgfilter: Add 'quot' and 'boldquot' built-in filtersDaiki Ueno2014-04-151-1/+1
|
* msgfmt: Add support for Desktop Entry filesDaiki Ueno2014-04-041-0/+1
|
* xgettext: Add support for Desktop Entry filesDaiki Ueno2014-04-041-0/+1
|
* tests: Add tests for autopointDaiki Ueno2014-03-271-1/+2
|
* Extend --add-location option to suppress line number outputDaiki Ueno2014-03-251-10/+10
| | | | | | | | | | | The --add-location option of msgattrib, msgcat, msgcomm, msgconv, msgen, msgfilter, msggrep, msgmerge, msguniq, and xgettext commands now takes an optional argument 'never', 'full', or 'file', to control the format of "#: ..." comments. The default catalog reader changed to always remember file positions so the line number part can be suppressed in output phase rather than input phase.
* tests: Include missing init.cfg in tarballDaiki Ueno2014-03-111-1/+1
|
* tests: use absolute path of source filesRoumen Petrov2014-01-281-0/+1
| | | | | Replace ../$top_srcdir with $abs_top_srcdir in gettext-tools tests to add support for configuration with absolute path.
* tests: use absolute path of source filesRoumen Petrov2014-01-281-0/+1
| | | | | Replace ../$srcdir with $abs_srcdir in gettext-tools tests to add support for configuration with absolute path.
* xgettext: Add E4X support to JavaScript scannerDaiki Ueno2013-12-041-1/+1
| | | | | | | | | | | | | | | | Reported by Piotr Drąg at: <https://savannah.gnu.org/bugs/?40125>. * src/xgettext.h (enum lexical_context_ty): New enumeration items lc_xml_open_tag, lc_xml_close_tag, lc_xml_content. * src/x-javascript.c (phase5_scan_xml_markup): New function. (phase5_get): Handle '<', '>', '/', '=', '{', and '}' specially to support E4X. (enum token_type_ty): New enumeration item token_type_equal. (xml_element_depth): New variable. (inside_embedded_in_xml): New variable. (extract_javascript): Initialize those variables. * tests/Makefile.am (TESTS): Add xgettext-javascript-6. * tests/xgettext-javascript-6: New file.
* Don't add 'gnulib-lib' to include path when compiling libgettextpo tests.Daiki Ueno2013-08-301-1/+6
|
* xgettext: support GSettings schema fileDaiki Ueno2013-08-061-0/+1
|
* tests: allow each test to run individually without 'make'Daiki Ueno2013-07-251-17/+0
|
* tests: fix path adjustment for LTLIBINTLDaiki Ueno2013-07-251-1/+0
|
* tests: include init.sh in the distributionDaiki Ueno2013-07-211-1/+1
| | | | * gettext-tools/tests/Makefile.am (EXTRA_DIST): Add init.sh.