From 5a62a3977009e412268d0a11281dbaa1bf0ea57c Mon Sep 17 00:00:00 2001 From: John Zaitseff Date: Fri, 27 Jul 2018 05:52:25 +1000 Subject: [PATCH] Add strings from obsolete versions of libraries Previous versions of the GNU Portability Library, and versions of the GNU C Library as released with various Linux distributions, used strings no longer present in the current version of the GNU Portability Library. When used on systems with those strings, Star Traders could not provide appropriate translations. This patch fixes that problem. --- .gitattributes | 1 + Makefile.am | 3 +- lib/obsolete-strings.c | 91 ++++++++++++++++++++++++++++++++++++++++++ po/POTFILES.in | 3 ++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 lib/obsolete-strings.c diff --git a/.gitattributes b/.gitattributes index e42c973..13512cb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,6 +5,7 @@ Makefile.am ident /data/trader.desktop.in ident /data/trader.svg ident /doc/trader.* ident +/lib/obsolete-strings.c ident /po/LINGUAS ident /po/Makevars ident /po/POTFILES.in ident diff --git a/Makefile.am b/Makefile.am index 4280a72..df9a8cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,4 +33,5 @@ SUBDIRS = lib src po data doc m4 # Additional files to distribute EXTRA_DIST = \ build-aux/bootstrap \ - build-aux/msgfmt-desktop + build-aux/msgfmt-desktop \ + lib/obsolete-strings.c diff --git a/lib/obsolete-strings.c b/lib/obsolete-strings.c new file mode 100644 index 0000000..372c0dc --- /dev/null +++ b/lib/obsolete-strings.c @@ -0,0 +1,91 @@ +/************************************************************************ +* * +* Obsolete Strings From Various Libraries * +* * +************************************************************************/ + +/* + Author: John Zaitseff + $Id$ + + This file contains strings that are present in older versions of + various libraries but are no longer present in files distributed as + part of the GNU Portability Library. This allows programs to provide + translations for strings used in, for example, older versions of the + GNU C Library as released with various Linux distributions. + + This file is NOT intended to be linked into any program. Instead, it + is simply meant to be listed in po/POTFILES.in. + + + This file is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see https://www.gnu.org/licenses/. +*/ + + +/************************************************************************ +* From GNU C Library posix/getopt.c * +************************************************************************/ + +const char *glibc_posix_getopt_strings[] = { + /* TRANSLATORS: These strings are used in older versions of various + libraries, such as the GNU C Library as released with various + Linux distributions. */ + N_("%s: option `%s%s' is ambiguous\n"), + N_("%s: option '%s%s' is ambiguous\n"), + N_("%s: option `%s%s' is ambiguous; possibilities:"), + N_("%s: option '%s%s' is ambiguous; possibilities:"), + N_("%s: unrecognized option `%s%s'\n"), + N_("%s: unrecognized option '%s%s'\n"), + N_("%s: option `%s%s' doesn't allow an argument\n"), + N_("%s: option '%s%s' doesn't allow an argument\n"), + N_("%s: option `%s%s' requires an argument\n"), + N_("%s: option '%s%s' requires an argument\n"), + N_("%s: invalid option -- `%c'\n"), + N_("%s: invalid option -- '%c'\n"), + N_("%s: option requires an argument -- `%c'\n"), + N_("%s: option requires an argument -- '%c'\n"), + + N_("%s: option `%s' is ambiguous; possibilities:"), + N_("%s: option '%s' is ambiguous; possibilities:"), + N_("%s: option `--%s' doesn't allow an argument\n"), + N_("%s: option '--%s' doesn't allow an argument\n"), + N_("%s: option `%c%s' doesn't allow an argument\n"), + N_("%s: option '%c%s' doesn't allow an argument\n"), + N_("%s: option `--%s' requires an argument\n"), + N_("%s: option '--%s' requires an argument\n"), + N_("%s: unrecognized option `--%s'\n"), + N_("%s: unrecognized option '--%s'\n"), + N_("%s: unrecognized option `%c%s'\n"), + N_("%s: unrecognized option '%c%s'\n"), + N_("%s: invalid option -- `%c'\n"), + N_("%s: invalid option -- '%c'\n"), + N_("%s: invalid option -- `%c'\n"), + N_("%s: invalid option -- '%c'\n"), + N_("%s: option requires an argument -- `%c'\n"), + N_("%s: option requires an argument -- '%c'\n"), + N_("%s: option `-W %s' is ambiguous\n"), + N_("%s: option '-W %s' is ambiguous\n"), + N_("%s: option `-W %s' doesn't allow an argument\n"), + N_("%s: option '-W %s' doesn't allow an argument\n"), + N_("%s: option `-W %s' requires an argument\n"), + N_("%s: option '-W %s' requires an argument\n"), + N_("%s: option requires an argument -- `%c'\n"), + N_("%s: option requires an argument -- '%c'\n"), + + "" +}; + + +/***********************************************************************/ +// End of file diff --git a/po/POTFILES.in b/po/POTFILES.in index 9de5a90..82de51b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -42,3 +42,6 @@ src/utils.c # Source files from the Gnulib GNU Portability Library lib/getopt.c + +# Strings from obsolete versions of various libraries +lib/obsolete-strings.c