�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!textdomain.3.html000064400000007223152530064500007753 0ustar00 TEXTDOMAIN

TEXTDOMAIN

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
BUGS
SEE ALSO

NAME

textdomain − set domain for future gettext() calls

SYNOPSIS

#include <libintl.h>

char * textdomain (const char * domainname);

DESCRIPTION

The textdomain function sets or retrieves the current message domain.

A message domain is a set of translatable msgid messages. Usually, every software package has its own message domain. The domain name is used to determine the message catalog where a translation is looked up; it must be a non-empty string.

The current message domain is used by the gettext, ngettext functions, and by the dgettext, dcgettext, dngettext and dcngettext functions when called with a NULL domainname argument.

If domainname is not NULL, the current message domain is set to domainname. The string the function stores internally is a copy of the domainname argument.

If domainname is NULL, the function returns the current message domain.

RETURN VALUE

If successful, the textdomain function returns the current message domain, after possibly changing it. The resulting string is valid until the next textdomain call and must not be modified or freed. If a memory allocation failure occurs, it sets errno to ENOMEM and returns NULL.

ERRORS

The following error can occur, among others:

ENOMEM

Not enough memory available.

BUGS

The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C.

SEE ALSO

gettext(3), ngettext(3), bindtextdomain(3), bind_textdomain_codeset(3)


bind_textdomain_codeset.3.html000064400000010623152530064500012453 0ustar00 BIND_TEXTDOMAIN_CODESET

BIND_TEXTDOMAIN_CODESET

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
BUGS
SEE ALSO

NAME

bind_textdomain_codeset − set encoding of message translations

SYNOPSIS

#include <libintl.h>

char * bind_textdomain_codeset (const char * domainname,
const char *
codeset);

DESCRIPTION

The bind_textdomain_codeset function sets the output codeset for message catalogs for domain domainname.

A message domain is a set of translatable msgid messages. Usually, every software package has its own message domain.

By default, the gettext family of functions returns translated messages in the locale’s character encoding, which can be retrieved as nl_langinfo(CODESET). The need for calling bind_textdomain_codeset arises for programs which store strings in a locale independent way (e.g. UTF-8) and want to avoid an extra character set conversion on the returned translated messages.

domainname must be a non-empty string.

If codeset is not NULL, it must be a valid encoding name which can be used for the iconv_open function. The bind_textdomain_codeset function sets the output codeset for message catalogs belonging to domain domainname to codeset. The function makes copies of the argument strings as needed.

If codeset is NULL, the function returns the previously set codeset for domain domainname. The default is NULL, denoting the locale’s character encoding.

RETURN VALUE

If successful, the bind_textdomain_codeset function returns the current codeset for domain domainname, after possibly changing it. The resulting string is valid until the next bind_textdomain_codeset call for the same domainname and must not be modified or freed. If a memory allocation failure occurs, it sets errno to ENOMEM and returns NULL. If no codeset has been set for domain domainname, it returns NULL.

ERRORS

The following error can occur, among others:

ENOMEM

Not enough memory available.

BUGS

The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C.

SEE ALSO

gettext(3), dgettext(3), dcgettext(3), ngettext(3), dngettext(3), dcngettext(3), textdomain(3), nl_langinfo(3), iconv_open(3)


javadoc2/serialized-form.html000064400000006334152530064500012225 0ustar00 Serialized Form

Serialized Form



javadoc2/index.html000064400000001256152530064500010236 0ustar00 Generated Documentation (Untitled) <H2> Frame Alert</H2> <P> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <BR> Link to <A HREF="gnu/gettext/GettextResource.html">Non-frame version.</A> javadoc2/packages.html000064400000001220152530064500010674 0ustar00


The front page has been relocated.Please see:
          Frame version
          Non-frame version.
javadoc2/help-doc.html000064400000014446152530064500010627 0ustar00 : API Help

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

Class/Interface

Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.



javadoc2/deprecated-list.html000064400000006260152530064500012200 0ustar00 : Deprecated List

Deprecated API



javadoc2/gnu/gettext/package-frame.html000064400000001346152530064500014067 0ustar00 : Package gnu.gettext gnu.gettext
Classes 
GettextResource
javadoc2/gnu/gettext/package-tree.html000064400000007434152530064500013740 0ustar00 : gnu.gettext Class Hierarchy

Hierarchy For Package gnu.gettext

Class Hierarchy



javadoc2/gnu/gettext/GettextResource.html000064400000031210152530064500014531 0ustar00 : Class GettextResource

gnu.gettext
Class GettextResource

java.lang.Object
  |
  +--java.util.ResourceBundle
        |
        +--gnu.gettext.GettextResource

public abstract class GettextResource
extends java.util.ResourceBundle

This class implements the main GNU libintl functions in Java.

Using the GNU gettext approach, compiled message catalogs are normal Java ResourceBundle classes and are thus interoperable with standard ResourceBundle based code.

The main differences between the Sun ResourceBundle approach and the GNU gettext approach are:

To compile GNU gettext message catalogs into Java ResourceBundle classes, the msgfmt program can be used.


Field Summary
static boolean verbose
           
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
GettextResource()
           
 
Method Summary
static java.lang.String gettext(java.util.ResourceBundle catalog, java.lang.String msgid)
          Returns the translation of msgid.
static java.lang.String ngettext(java.util.ResourceBundle catalog, java.lang.String msgid, java.lang.String msgid_plural, long n)
          Returns the plural form for n of the translation of msgid.
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getKeys, getLocale, getObject, getString, getStringArray, handleGetObject, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

verbose

public static boolean verbose
Constructor Detail

GettextResource

public GettextResource()
Method Detail

gettext

public static java.lang.String gettext(java.util.ResourceBundle catalog,
                                       java.lang.String msgid)
Returns the translation of msgid.
Parameters:
catalog - a ResourceBundle
msgid - the key string to be translated, an ASCII string
Returns:
the translation of msgid, or msgid if none is found

ngettext

public static java.lang.String ngettext(java.util.ResourceBundle catalog,
                                        java.lang.String msgid,
                                        java.lang.String msgid_plural,
                                        long n)
Returns the plural form for n of the translation of msgid.
Parameters:
catalog - a ResourceBundle
msgid - the key string to be translated, an ASCII string
msgid_plural - its English plural form
Returns:
the translation of msgid depending on n, or msgid or msgid_plural if none is found


javadoc2/gnu/gettext/package-summary.html000064400000007646152530064500014503 0ustar00 : Package gnu.gettext

Package gnu.gettext

Class Summary
GettextResource This class implements the main GNU libintl functions in Java.
 



javadoc2/overview-tree.html000064400000006662152530064500011740 0ustar00 : Class Hierarchy

Hierarchy For All Packages

Class Hierarchy



javadoc2/stylesheet.css000064400000002330152530064500011136 0ustar00/* Javadoc style sheet */ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color */ body { background-color: #FFFFFF } /* Table colors */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: normal; font-family: normal } .FrameHeadingFont { font-size: normal; font-family: normal } .FrameItemFont { font-size: normal; font-family: normal } /* Example of smaller, sans-serif font in frames */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* Navigation bar fonts and colors */ .NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ .NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} javadoc2/index-all.html000064400000011241152530064500010777 0ustar00 : Index
G N V

G

gettext(ResourceBundle, String) - Static method in class gnu.gettext.GettextResource
Returns the translation of msgid.
GettextResource - class gnu.gettext.GettextResource.
This class implements the main GNU libintl functions in Java.
GettextResource() - Constructor for class gnu.gettext.GettextResource
 

N

ngettext(ResourceBundle, String, String, long) - Static method in class gnu.gettext.GettextResource
Returns the plural form for n of the translation of msgid.

V

verbose - Static variable in class gnu.gettext.GettextResource
 

G N V

javadoc2/allclasses-frame.html000064400000001150152530064500012336 0ustar00 All Classes All Classes
GettextResource
javadoc2/package-list000064400000000014152530064500010517 0ustar00gnu.gettext ChangeLog000064400000077175152530064500006337 0ustar002016-06-11 Daiki Ueno build: Fix unintentional soname bump * gettext-runtime/intl/Makefile.in: Revert LTV_CURRENT and increment LTV_REVISION. * gettext-tools/libgettextpo/Makefile.am: Likewise. 2016-06-09 Daiki Ueno Update translations * gettext-runtime/po/eo.po: Update from Felipe Castro * gettext-runtime/po/hr.po: Update from Božidar Putanec * gettext-runtime/po/sv.po: Update from Göran Uddeborg * gettext-tools/examples/po/eo.po: Update from Felipe Castro * gettext-tools/examples/po/hr.po: Update from Božidar Putanec * gettext-tools/examples/po/sv.po: Update from Göran Uddeborg * gettext-tools/po/bg.po: Update from Roumen Petrov * gettext-tools/po/es.po: Update from Antonio Ceballos * gettext-tools/po/fr.po: Update from Stéphane Aulery * gettext-tools/po/ja.po: Update from Masahito Yamaga * gettext-tools/po/ko.po: Update from Changwoo Ryu * gettext-tools/po/nl.po: Update from Benno Schulenberg * gettext-tools/po/pl.po: Update from Rafał Maszkowski * gettext-tools/po/sk.po: Update from Marcel Telka * gettext-tools/po/sr.po: Update from Мирослав Николић * gettext-tools/po/sv.po: Update from Göran Uddeborg * gettext-tools/po/tr.po: Update from Nilgün Belma Bugüner * gettext-tools/po/uk.po: Update from Yuri Chornoivan * gettext-tools/po/vi.po: Update from Trần Ngọc Quân Update matrix NEWS: Fix release date of 0.19.8 Prepare for 0.19.8 THANKS: Update 2016-06-08 Daiki Ueno gnulib-local: Work around regcomp.c compile error * gnulib-local/Makefile.am (EXTRA_DIST): Add lib/regcomp.c.diff. * gnulib-local/lib/regcomp.c.diff: New file, partially revert Gnulib commit f97745b0. tests: Use Exit instead of exit if init.sh is used * gettext-tools/tests/*: Use Exit instead of exit, as suggested by init.sh. 2016-06-07 Daiki Ueno build: Create intl/ChangeLog * autogen.sh: Create an empty ChangeLog for gettext-runtime/intl, which is necessary when running "make dist" from the top level directory. 2016-06-02 Daiki Ueno build: Simplify placeholder ChangeLog creation * autogen.sh: Use empty ChangeLog for placeholder. Bail out if any error occurs in autoreconf phase. maint: Update release steps 2016-06-01 Daiki Ueno tests: Check invalid input in sentence-1-prg * gettext-tools/tests/sentence-1-prg.c (main): Check input buffer overflow, while it is not possible with the current test case. tests: Fix test data for sentence-1 * gettext-tools/tests/sentence-1: Use NO-BREAK SPACE instead of IDEOGRAPHIC SPACE. 2016-05-31 Daiki Ueno tests: Fix location of valgrind suppression file * gettext-tools/tests/Makefile.am (CHECKER): Use $(abs_srcdir) instead of $(srcdir). tests: Turn sentence test into a shell script 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. 2016-05-30 Daiki Ueno maint: Update copyright year xgettext: Update usage documentation * gettext-tools/src/xgettext.c (usage): Mention 'bullet-unicode' check. 2016-05-28 Daniel Burr (tiny change) build: Make libxml2 check tighter * gnulib-local/m4/libxml.m4 (gl_LIBXML): Try to check xmlXPathSetContextNode, which is available in libxml2 2.9.1 or later. Problem reported by Dominyk in: http://savannah.gnu.org/bugs/?46844 2016-05-27 Daiki Ueno desktop: Add missing "extern" in header * gettext-tools/src/read-desktop.h: Add "extern" to each function declaration. Possibly related to: https://savannah.gnu.org/bugs/?45896 NEWS: Mention gettext.m4 change m4: Rely less on internal symbols * gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Skip checks for the internal symbols _nl_msg_cat_cntr, _nl_domain_bindings, and _nl_expand_alias, if __GNU_GETTEXT_SUPPORTED_REVISION is defined. Problem reported and fix suggested by Masanori Ogino in: https://lists.gnu.org/archive/html/bug-gettext/2016-04/msg00000.html The rationale behind this is: (1) those symbol checks are for detecting certain broken implementations, namely NetBSD and Solaris 7, and (2) __GNU_GETTEXT_SUPPORTED_REVISION is not defined in those implementations, while it is defined on compatible implementations, such as musl-libc which doesn't have those internal symbols. 2016-05-25 Daiki Ueno NEWS: Add 0.19.8 changes intl: Pacify pre-C99 compilers * gettext-runtime/intl/plural-exp.h (HAVE_STRUCT_INITIALIZER): New macro, based on the check previously in plural-exp.c. Also add check for __SUNPRO_C for Solaris Studio C compiler. (GERMANIC_PLURAL): Define as 'struct expression' not 'const struct expression' if struct/union initializers are not supported by the compiler. * gettext-runtime/intl/plural-exp.c: Use HAVE_STRUCT_INITIALIZER. Reported by Dagobert Michelsen and investigated by pan7 in: https://savannah.gnu.org/support/?108743 2016-05-24 David Shea desktop: Fix invalid memory access * gettext-tools/src/read-desktop.c (desktop_lex): Don't access memory deallocated with realloc(). Reported in: http://savannah.gnu.org/bugs/?47991 2016-05-23 Daiki Ueno tests: Add more tests for JavaScript format string * gettext-tools/tests/format-javascript-1: Add test for multiple uses of same argument. * gettext-tools/tests/format-javascript-2: Use proper flag to activate javascript format checker. javascript: Fix format type compatibility check * gettext-tools/src/format-javascript.c (format_check): Check if the two argument types are the same. 2016-05-20 Daiki Ueno tests: Add test for ITS search path * gettext-tools/tests/Makefile.am (TESTS): Add new test. * gettext-tools/tests/xgettext-its-2: New file. search-path: Fix XDG_DATA_DIRS traversal * gettext-tools/src/search-path.c (foreach_elements): Append "gettext" suffix to each element from XDG_DATA_DIRS. search-path: Don't relocate dirs given as envvar * gettext-tools/src/search-path.c (foreach_function_ty): New typedef. (path_array_ty): New struct. (foreach_components, increment, fill): New functions. (get_search_path): Rewrite using those functions. Relocate GETTEXTDATADIR here. * gettext-tools/src/search-path.h (get_search_path): Update documentation. * gettext-tools/src/msgfmt.c (main): Don't relocate directories in ITS search path. * gettext-tools/src/xgettext.c (main): Likewise. 2016-05-19 Daiki Ueno Update after Gnulib changed * gnulib-local/lib/gettext.h: Update from gnulib. * gettext-runtime/m4/extern-inline.m4: Likewise. * gettext-runtime/m4/intdiv0.m4: Likewise. Update gnulib * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Explicitly pull 'gettext', as the module is now marked as obsolete. * gnulib-local/Makefile.am (EXTRA_DIST): Remove m4/hard-locale.m4.diff. * gnulib-local/m4/hard-locale.m4.diff: Remove, as it is no longer needed. * gettext-tools/gnulib-lib/.gitignore: Ignore files brought by gnulib-tool. * gettext-tools/gnulib-tests/.gitignore: Likewise. * gettext-tools/libgettextpo/.gitignore: Likewise. 2016-05-18 Daiki Ueno maint: Add --no-git option to autogen.sh * autogen.sh: Port --no-git option from Gnulib's bootstrap. 2016-05-16 Daiki Ueno msgfmt, xgettext: Respect XDG_DATA_DIRS Suggested in https://savannah.gnu.org/bugs/?47123 * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add 'xmemdup0'. * gettext-tools/gnulib-lib/.gitignore: Ignore files brought by gnulib-tool. * gettext-tools/gnulib-tests/.gitignore: Likewise. * gettext-tools/src/search-path.c: New file. * gettext-tools/src/search-path.h: New file. * gettext-tools/src/Makefile.am (noinst_HEADERS): Add search-path.h. (libgettextsrc_la_SOURCES): Add search-path.c. * gettext-tools/src/msgfmt.c: Include "search-path.h". (main): Use get_search_path to locate ITS directories. * gettext-tools/src/xgettext.c: Include "search-path.h". (main): Use get_search_path to locate ITS directories. javascript: Avoid uninitialized variable * gettext-tools/src/format-javascript.c (format_check): Fix loop initialization. Spotted by clang-analyzer. 2016-03-26 Hanno Boeck (tiny change) lua: Avoid heap buffer overflow * gettext-tools/src/x-lua.c (string_end): Allocate a room for terminating NUL. Reported in: http://savannah.gnu.org/bugs/?4753 2016-03-23 Daiki Ueno format-python-brace: Support chained expression * gettext-tools/src/format-python-brace.c (parse_directive): Recognize chained getattr/getitem expressions. * gettext-tools/tests/format-python-brace-1: Add test for the case where both getattr and getitem are used. Reported by Paul Franklin in: https://lists.gnu.org/archive/html/bug-gettext/2016-03/msg00017.html doc: Fix ngettext usage example * gettext-tools/doc/gettext.texi (Plural forms): Fix positional argument syntax in the C example. Reported by Jonathan Leffler in: http://lists.gnu.org/archive/html/bug-gettext/2016-03/msg00002.html 2016-03-22 Daiki Ueno javascript: Fix invalid memory access * gettext-tools/src/format-javascript.c (format_parse): Fix numbered_arg allocation for the unnumbered case. Reported by Roger Mc Murtrie in: . 2016-03-22 Daiki Ueno maint: Clean up .gitignore * gettext-tools/gnulib-lib/.gitignore: Sort lines. 2016-03-02 Daiki Ueno xgettext: Put --its help in the right section * gettext-tools/src/xgettext.c (usage): Move --its=FILE option under "Language specific options" from "Output details". 2016-02-22 Daiki Ueno 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 2016-02-10 Daiki Ueno 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. 2016-02-08 Daiki Ueno 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. moopp: Revert file modes accidentally set 2016-01-20 KO Myung-Hun 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. 2016-01-20 KO Myung-Hun libasprintf: Build a shared library on OS/2 * gettext-runtime/libasprintf/configure.ac (LTNOUNDEF): Set to -no-undefined on OS/2. 2016-01-20 KO Myung-Hun 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. 2016-01-20 KO Myung-Hun 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. 2016-01-15 Bruno Haible 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. 2016-01-13 Daiki Ueno 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. 2016-01-07 Daiki Ueno its: Recognize *.glade as a GtkBuilder file too 2016-01-05 Santiago Vila (tiny change) * PACKAGING: List version specific files 2016-01-02 Daiki Ueno maint: Update copyright year Update gnulib 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. 2015-12-28 Daiki Ueno 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. Update translations * gettext-runtime/po/fr.po: Update from Stéphane Aulery . * gettext-runtime/po/nb.po: Update from Johnny A. Solbu . * gettext-runtime/po/pt_BR.po: Update from Rafael Ferreira . * gettext-runtime/po/sr.po: Update from Мирослав Николић . * gettext-runtime/po/zh_TW.po: Update from Wei-Lun Chao . * gettext-tools/examples/po/fr.po: Update from Stéphane Aulery . * gettext-tools/examples/po/nb.po: Update from Johnny A. Solbu . * gettext-tools/examples/po/pt_BR.po: Update from Rafael Ferreira . * gettext-tools/examples/po/sr.po: Update from Мирослав Николић . * gettext-tools/examples/po/zh_TW.po: Update from Wei-Lun Chao . * gettext-tools/po/bg.po: Update from Roumen Petrov . * gettext-tools/po/es.po: Update from Antonio Ceballos . * gettext-tools/po/fr.po: Update from Stéphane Aulery . * gettext-tools/po/ja.po: Update from Masahito Yamaga . * gettext-tools/po/nl.po: Update from Benno Schulenberg . * gettext-tools/po/pt_BR.po: Update from Rafael Fontenelle . * gettext-tools/po/sk.po: Update from Marcel Telka . * gettext-tools/po/sl.po: Update from Primoz PETERLIN . * gettext-tools/po/sr.po: Update from Мирослав Николић . * gettext-tools/po/uk.po: Update from Yuri Chornoivan . * gettext-tools/po/vi.po: Update from Trần Ngọc Quân . Prepare for 0.19.7 doc: Regenerate translation matrix * gettext-runtime/ABOUT-NLS: Regenerate for 0.19.7. * gettext-runtime/doc/matrix.texi: Regenerate for 0.19.7. NEWS: Add 0.19.7 changes Update gnulib Ignore file brought by gnulib-tool * gettext-tools/gnulib-tests/.gitignore: Ignore file brought by gnulib-tool. 2015-12-23 Daiki Ueno 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. 2015-12-21 Daiki Ueno 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. 2015-12-17 Daiki Ueno 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. 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. its: Fix typo in GSettings rule * gettext-tools/its/gsettings.its: Fix typo in escape rule. 2015-12-15 Daiki Ueno gnulib-local: Fix link error due to symbol dupes * gnulib-local/lib/libxml/trionan.c (minus_zerod): Mark as static. 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'. 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'. 2015-12-14 Daiki Ueno 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. 2015-12-10 Daiki Ueno gettext-tools: Update POTFILES.in * gettext-tools/po/POTFILES.in: Add newly added files. gnulib-local: Make markup.c translator friendly * gnulib-local/lib/markup.c: Reuse strings. 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". 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. 2015-12-10 KO Myung-Hun (tiny change) 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. 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. 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. 2015-12-10 Daiki Ueno kde: Fix KUIT error handling when libxml2 is used * gettext-tools/src/format-kde-kuit.c (format_parse): Return NULL if xmlReadMemory returns NULL. 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. 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. build: Update DEPENDENCIES * DEPENDENCIES: Remove duplicate entry for libxml2. 2015-12-09 Daiki Ueno 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. 2015-12-08 Daiki Ueno 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. Update gnulib 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. build: Suppress compiler warning * gettext-tools/src/its.c (its_rule_list_extract_text): Remove unused local variable "message". 2015-12-04 Daiki Ueno 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. 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 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. 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. 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. 2015-11-18 Daiki Ueno cldr-plurals: Add sanity checks for input * gettext-tools/src/cldr-plurals.c (extract_rules): Add null checks and element type checks. 2015-11-17 Daiki Ueno cldr-plurals: Rewrite XML handling using libxml2 * src/cldr-plurals.c: Include and , 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). cldr-plurals: Fix a trivial leak * src/cldr-plural.y (sample_range): Free unused operand value. 2015-11-17 Phil Davis (tiny change) doc: Fix typo in gettext_noop example * doc/gettext.texi (Special cases): Add missing ')' to a gettext_noop call. 2015-10-29 Daiki Ueno maint: Ignore more generated ChangeLogs * .gitignore: Add gettext-runtime/intl/ChangeLog, gettext-runtime/po/ChangeLog, and gettext-tools/po/ChangeLog. 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. doc: Fix typo in msgfmt invocation * gettext-tools/doc/msgfmt.texi: Fix the documentation of -d option, used in the Desktop Entry mode. 2015-10-15 Daiki Ueno 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. build: Distribute old ChangeLogs in tarball * Makefile.am (changelog_etc): Remove non-existent ChangeLog files under intl and po. (EXTRA_DIST): Add $(changelog_etc). 2015-10-14 Mike Frysinger 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. 2015-10-14 Mike Frysinger 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. 2015-10-14 Daiki Ueno 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. gettext.3.html000064400000014315152530064500007263 0ustar00 GETTEXT

GETTEXT

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
BUGS
SEE ALSO

NAME

gettext, dgettext, dcgettext − translate message

SYNOPSIS

#include <libintl.h>

char * gettext (const char * msgid);
char * dgettext (const char *
domainname, const char * msgid);
char * dcgettext (const char *
domainname, const char * msgid,
int
category);

DESCRIPTION

The gettext, dgettext and dcgettext functions attempt to translate a text string into the user’s native language, by looking up the translation in a message catalog.

The msgid argument identifies the message to be translated. By convention, it is the English version of the message, with non-ASCII characters replaced by ASCII approximations. This choice allows the translators to work with message catalogs, called PO files, that contain both the English and the translated versions of each message, and can be installed using the msgfmt utility.

A message domain is a set of translatable msgid messages. Usually, every software package has its own message domain. The domain name is used to determine the message catalog where the translation is looked up; it must be a non-empty string. For the gettext function, it is specified through a preceding textdomain call. For the dgettext and dcgettext functions, it is passed as the domainname argument; if this argument is NULL, the domain name specified through a preceding textdomain call is used instead.

Translation lookup operates in the context of the current locale. For the gettext and dgettext functions, the LC_MESSAGES locale facet is used. It is determined by a preceding call to the setlocale function. setlocale(LC_ALL,"") initializes the LC_MESSAGES locale based on the first nonempty value of the three environment variables LC_ALL, LC_MESSAGES, LANG; see setlocale(3). For the dcgettext function, the locale facet is determined by the category argument, which should be one of the LC_xxx constants defined in the <locale.h> header, excluding LC_ALL. In both cases, the functions also use the LC_CTYPE locale facet in order to convert the translated message from the translator’s codeset to the current locale’s codeset, unless overridden by a prior call to the bind_textdomain_codeset function.

The message catalog used by the functions is at the pathname dirname/locale/category/domainname.mo. Here dirname is the directory specified through bindtextdomain. Its default is system and configuration dependent; typically it is prefix/share/locale, where prefix is the installation prefix of the package. locale is the name of the current locale facet; the GNU implementation also tries generalizations, such as the language name without the territory name. category is LC_MESSAGES for the gettext and dgettext functions, or the argument passed to the dcgettext function.

If the LANGUAGE environment variable is set to a nonempty value, and the locale is not the "C" locale, the value of LANGUAGE is assumed to contain a colon separated list of locale names. The functions will attempt to look up a translation of msgid in each of the locales in turn. This is a GNU extension.

In the "C" locale, or if none of the used catalogs contain a translation for msgid, the gettext, dgettext and dcgettext functions return msgid.

RETURN VALUE

If a translation was found in one of the specified catalogs, it is converted to the locale’s codeset and returned. The resulting string is statically allocated and must not be modified or freed. Otherwise msgid is returned.

ERRORS

errno is not modified.

BUGS

The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C.

When an empty string is used for msgid, the functions may return a nonempty string.

SEE ALSO

ngettext(3), dngettext(3), dcngettext(3), setlocale(3), textdomain(3), bindtextdomain(3), bind_textdomain_codeset(3), msgfmt(1)


ngettext.3.html000064400000007701152530064500007442 0ustar00 NGETTEXT

NGETTEXT

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
BUGS
SEE ALSO

NAME

ngettext, dngettext, dcngettext − translate message and choose plural form

SYNOPSIS

#include <libintl.h>

char * ngettext (const char * msgid, const char * msgid_plural,
unsigned long int
n);
char * dngettext (const char *
domainname,
const char *
msgid, const char * msgid_plural,
unsigned long int
n);
char * dcngettext (const char *
domainname,
const char *
msgid, const char * msgid_plural,
unsigned long int
n, int category);

DESCRIPTION

The ngettext, dngettext and dcngettext functions attempt to translate a text string into the user’s native language, by looking up the appropriate plural form of the translation in a message catalog.

Plural forms are grammatical variants depending on the a number. Some languages have two forms, called singular and plural. Other languages have three forms, called singular, dual and plural. There are also languages with four forms.

The ngettext, dngettext and dcngettext functions work like the gettext, dgettext and dcgettext functions, respectively. Additionally, they choose the appropriate plural form, which depends on the number n and the language of the message catalog where the translation was found.

In the "C" locale, or if none of the used catalogs contain a translation for msgid, the ngettext, dngettext and dcngettext functions return msgid if n == 1, or msgid_plural if n != 1.

RETURN VALUE

If a translation was found in one of the specified catalogs, the appropriate plural form is converted to the locale’s codeset and returned. The resulting string is statically allocated and must not be modified or freed. Otherwise msgid or msgid_plural is returned, as described above.

ERRORS

errno is not modified.

BUGS

The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C.

SEE ALSO

gettext(3), dgettext(3), dcgettext(3)


bindtextdomain.3.html000064400000010417152530064500010607 0ustar00 BINDTEXTDOMAIN

BINDTEXTDOMAIN

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
BUGS
SEE ALSO

NAME

bindtextdomain − set directory containing message catalogs

SYNOPSIS

#include <libintl.h>

char * bindtextdomain (const char * domainname, const char * dirname);

DESCRIPTION

The bindtextdomain function sets the base directory of the hierarchy containing message catalogs for a given message domain.

A message domain is a set of translatable msgid messages. Usually, every software package has its own message domain. The need for calling bindtextdomain arises because packages are not always installed with the same prefix as the <libintl.h> header and the libc/libintl libraries.

Message catalogs will be expected at the pathnames dirname/locale/category/domainname.mo, where locale is a locale name and category is a locale facet such as LC_MESSAGES.

domainname must be a non-empty string.

If dirname is not NULL, the base directory for message catalogs belonging to domain domainname is set to dirname. The function makes copies of the argument strings as needed. If the program wishes to call the chdir function, it is important that dirname be an absolute pathname; otherwise it cannot be guaranteed that the message catalogs will be found.

If dirname is NULL, the function returns the previously set base directory for domain domainname.

RETURN VALUE

If successful, the bindtextdomain function returns the current base directory for domain domainname, after possibly changing it. The resulting string is valid until the next bindtextdomain call for the same domainname and must not be modified or freed. If a memory allocation failure occurs, it sets errno to ENOMEM and returns NULL.

ERRORS

The following error can occur, among others:

ENOMEM

Not enough memory available.

BUGS

The return type ought to be const char *, but is char * to avoid warnings in C code predating ANSI C.

SEE ALSO

gettext(3), dgettext(3), dcgettext(3), ngettext(3), dngettext(3), dcngettext(3), textdomain(3), realpath(3)