summaryrefslogtreecommitdiffstats
path: root/include/nls.h
Commit message (Collapse)AuthorAgeFilesLines
* misc: fix typos using codespellRuediger Meier2018-02-161-1/+1
| | | | | | Some more funny typos, please review carefully. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* cal: Use ALTMON_* correctlyRafal Luzynski2018-01-221-0/+30
| | | | | | | | | | | cal: use ALTMON_* and _NL_ABALTMON_* constants to display months in a standalone form correctly. These constants have just been newly added to glibc. ALTMON_x has been used in BSD family since 1990s and has been accepted as the future POSIX extension. _NL_ABALTMON_* is exclusively a GNU extension but it is expected to be added to POSIX in future. More info: https://sourceware.org/bugzilla/show_bug.cgi?id=10871
* libfdisk: fix NLS supportKarel Zak2017-04-251-2/+12
| | | | | | | | | | | | | | | | | | | The current libfdisk code uses gettext() to translate strings. It means it follows the default text domain (as set by textdomain(3) usually in the main program). This is useless for public shared library. We have call private bindtextdomain() and use dgettext() with private domain name to be independent on the main program. For this purpose include/nls.h supports UL_TEXTDOMAIN_EXPLICIT to use dgettext(). Note that libfdisk will continue to use util-linux.po, rather than keep the texts in the separate file. The nls.h has to be included only from fdiskP.h to be sure that nls.h works as expected for the library. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/strutils: circumvent missing localeconv()maximilian attems2012-06-051-0/+6
| | | | | | | Add stub too nls.h, include it instead of locale.h. Code in strutils handles already returned NULL. Signed-off-by: maximilian attems <max@stro.at>
* include: [nls.h] define a macro for handling plurals with ngettext()Benno Schulenberg2011-08-021-0/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* lib: add fallback for nl_langinfo()Karel Zak2010-11-151-0/+73
| | | | | | | | The fallback ignores locales and returns hardcoded static strings. It should be enough to include "nls.h" to work with nl_langinfo() on all systems. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: nls/locale handling in util-linux-ng generalMike Frysinger2007-09-191-1/+7
| | | | | | | | | | | | | | | On Monday 03 September 2007, Karel Zak wrote: > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592 > > I agree that we need a better support for compilation without > locales, but from my point of view NLS != all locales stuff. The NLS > support is subset only. thinking about the input from everyone, i'd propose the attached ... Only pull in locale.h as needed and move it to the common nls.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* build-sys: missing header when NLS is disabledGabriel Barazer2007-07-231-1/+5
| | | | | | | | | | | | Compiling utils fail when disable NLS with the --disable-nls switch. "mkfs.c:46: error: 'LC_ALL' undeclared (first use in this function)" It is due to a missing locale.h header : When enabling NLS, nls.h includes libintl.h, which in turn includes locale.h. When disabling NLS, libintl.h isn't anymore included nor locale.h, which is needed for the setlocale() calls. Signed-off-by: Gabriel Barazer <gabriel@oxeva.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-0/+24