mirror of
https://git.zap.org.au/git/trader.git
synced 2025-01-03 14:57:41 -05:00
Remove premature provisions for internationalisation
In particular, remove the use of the "_" macro: real internationalisation may require this macro in a different form from that used here.
This commit is contained in:
parent
ba721ced10
commit
e8bdcfe304
@ -78,15 +78,6 @@
|
|||||||
#define CURS_VERYVISIBLE (2)
|
#define CURS_VERYVISIBLE (2)
|
||||||
|
|
||||||
|
|
||||||
// For future use in internationalisation
|
|
||||||
#ifndef _
|
|
||||||
# define _(x) (x)
|
|
||||||
#endif
|
|
||||||
#ifndef N_
|
|
||||||
# define N_(x) (x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Compiler __attributes__ for less-capable compilers
|
// Compiler __attributes__ for less-capable compilers
|
||||||
#ifndef HAVE___ATTRIBUTE__
|
#ifndef HAVE___ATTRIBUTE__
|
||||||
# define __attribute__(x)
|
# define __attribute__(x)
|
||||||
|
52
src/trader.c
52
src/trader.c
@ -76,13 +76,13 @@ int main (int argc, char *argv[])
|
|||||||
clear();
|
clear();
|
||||||
move(0, 0);
|
move(0, 0);
|
||||||
|
|
||||||
printw(_("Program name: %s\n"), program_name());
|
printw("Program name: %s\n", program_name());
|
||||||
printw(_("Home directory: %s\n"), home_directory());
|
printw("Home directory: %s\n", home_directory());
|
||||||
printw(_("Data directory: %s\n"), data_directory());
|
printw("Data directory: %s\n", data_directory());
|
||||||
printw(_("Game filename: %s\n"), game_filename);
|
printw("Game filename: %s\n", game_filename);
|
||||||
|
|
||||||
printw(_("Cols x Lines: %d x %d\n"), COLS, LINES);
|
printw("Cols x Lines: %d x %d\n", COLS, LINES);
|
||||||
printw(_("Colours, pairs: %d, %d\n"), COLORS, COLOR_PAIRS);
|
printw("Colours, pairs: %d, %d\n", COLORS, COLOR_PAIRS);
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ int main (int argc, char *argv[])
|
|||||||
w2 = newwin(LINES - 9, COLS - 8, 8, 4);
|
w2 = newwin(LINES - 9, COLS - 8, 8, 4);
|
||||||
wbkgd(w2, COLOR_PAIR(2));
|
wbkgd(w2, COLOR_PAIR(2));
|
||||||
|
|
||||||
mvwprintw(w2, 0, 0, _("Type some keys (^C to exit):\n\n"));
|
mvwprintw(w2, 0, 0, "Type some keys (^C to exit):\n\n");
|
||||||
wrefresh(w2);
|
wrefresh(w2);
|
||||||
|
|
||||||
keypad(w2, true);
|
keypad(w2, true);
|
||||||
@ -185,7 +185,7 @@ static void process_cmdline (int argc, char *argv[])
|
|||||||
|
|
||||||
if ((optind < argc) && (argv[optind] != NULL)) {
|
if ((optind < argc) && (argv[optind] != NULL)) {
|
||||||
if (argv[optind][0] == '-') {
|
if (argv[optind][0] == '-') {
|
||||||
fprintf(stderr, _("%s: invalid operand `%s'\n"), program_name(),
|
fprintf(stderr, "%s: invalid operand `%s'\n", program_name(),
|
||||||
argv[optind]);
|
argv[optind]);
|
||||||
show_usage(EXIT_FAILURE);
|
show_usage(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ static void process_cmdline (int argc, char *argv[])
|
|||||||
game_filename = strto_game_filename(argv[optind]);
|
game_filename = strto_game_filename(argv[optind]);
|
||||||
|
|
||||||
if (game_filename == NULL) {
|
if (game_filename == NULL) {
|
||||||
fprintf(stderr, _("%s: invalid game number `%s'\n"),
|
fprintf(stderr, "%s: invalid game number `%s'\n",
|
||||||
program_name(), argv[optind]);
|
program_name(), argv[optind]);
|
||||||
show_usage(EXIT_FAILURE);
|
show_usage(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ static void process_cmdline (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((optind < argc) && (argv[optind] != NULL)) {
|
if ((optind < argc) && (argv[optind] != NULL)) {
|
||||||
fprintf(stderr, _("%s: extra operand `%s'\n"), program_name(),
|
fprintf(stderr, "%s: extra operand `%s'\n", program_name(),
|
||||||
argv[optind]);
|
argv[optind]);
|
||||||
show_usage(EXIT_FAILURE);
|
show_usage(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ static void process_cmdline (int argc, char *argv[])
|
|||||||
|
|
||||||
static void __attribute__((noreturn)) show_version (void)
|
static void __attribute__((noreturn)) show_version (void)
|
||||||
{
|
{
|
||||||
printf(_("\
|
printf("\
|
||||||
" PACKAGE_NAME " (%s) %s\n\
|
" PACKAGE_NAME " (%s) %s\n\
|
||||||
Copyright (C) %s, John Zaitseff.\n\
|
Copyright (C) %s, John Zaitseff.\n\
|
||||||
\n\
|
\n\
|
||||||
@ -232,7 +232,7 @@ This program is free software that is distributed under the terms of the\n\
|
|||||||
GNU General Public License, version 3 or later. You are welcome to\n\
|
GNU General Public License, version 3 or later. You are welcome to\n\
|
||||||
modify and/or distribute it under certain conditions. This program has\n\
|
modify and/or distribute it under certain conditions. This program has\n\
|
||||||
NO WARRANTY, to the extent permitted by law; see the License for details.\n\
|
NO WARRANTY, to the extent permitted by law; see the License for details.\n\
|
||||||
"), program_name(), PACKAGE_VERSION, "1990-2011");
|
", program_name(), PACKAGE_VERSION, "1990-2011");
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
@ -249,34 +249,36 @@ NO WARRANTY, to the extent permitted by law; see the License for details.\n\
|
|||||||
|
|
||||||
static void __attribute__((noreturn)) show_usage (int status)
|
static void __attribute__((noreturn)) show_usage (int status)
|
||||||
{
|
{
|
||||||
|
const char *pn = program_name();
|
||||||
|
|
||||||
if (status != EXIT_SUCCESS) {
|
if (status != EXIT_SUCCESS) {
|
||||||
fprintf(stderr, _("%s: Try `%s --help' for more information.\n"),
|
fprintf(stderr, "%s: Try `%s --help' for more information.\n",
|
||||||
program_name(), program_name());
|
pn, pn);
|
||||||
} else {
|
} else {
|
||||||
printf(_("Usage: %s [OPTION ...] [GAME]\n"), program_name());
|
printf("Usage: %s [OPTION ...] [GAME]\n", pn);
|
||||||
printf(_("\
|
printf("\
|
||||||
Play Star Traders, a simple game of interstellar trading.\n\n\
|
Play Star Traders, a simple game of interstellar trading.\n\n\
|
||||||
"));
|
");
|
||||||
printf(_("\
|
printf("\
|
||||||
Options:\n\
|
Options:\n\
|
||||||
-V, --version output version information and exit\n\
|
-V, --version output version information and exit\n\
|
||||||
-h, --help display this help and exit\n\n\
|
-h, --help display this help and exit\n\n\
|
||||||
"));
|
");
|
||||||
printf(_("\
|
printf("\
|
||||||
If GAME is specified as a number between 1 and 9, load and continue\n\
|
If GAME is specified as a number between 1 and 9, load and continue\n\
|
||||||
playing that game. If GAME is not specified, start a new game.\n\n\
|
playing that game. If GAME is not specified, start a new game.\n\n\
|
||||||
"));
|
");
|
||||||
|
|
||||||
#ifdef PACKAGE_AUTHOR
|
#ifdef PACKAGE_AUTHOR
|
||||||
printf(_("Report bugs to %s <%s>.\n"), PACKAGE_AUTHOR, PACKAGE_BUGREPORT);
|
printf("Report bugs to %s <%s>.\n", PACKAGE_AUTHOR, PACKAGE_BUGREPORT);
|
||||||
#else
|
#else
|
||||||
printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
|
printf("Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PACKAGE_PACKAGER_BUG_REPORTS
|
#ifdef PACKAGE_PACKAGER_BUG_REPORTS
|
||||||
printf(_("Report %s bugs to <%s>.\n"), PACKAGE_PACKAGER, PACKAGE_PACKAGER_BUG_REPORTS);
|
printf("Report %s bugs to <%s>.\n", PACKAGE_PACKAGER, PACKAGE_PACKAGER_BUG_REPORTS);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PACKAGE_URL
|
#ifdef PACKAGE_URL
|
||||||
printf(_("Star Traders home page: <%s>.\n"), PACKAGE_URL);
|
printf("Star Traders home page: <%s>.\n", PACKAGE_URL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user