Freeciv-3.2
Loading...
Searching...
No Matches
api_common_intl.c
Go to the documentation of this file.
1/*****************************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12*****************************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* utility */
19#include "fcintl.h"
20
21/* common/scriptcore */
22#include "luascript.h"
23
24#include "api_common_intl.h"
25
26/**********************************************************************/
29const char *api_intl__(lua_State *L, const char *untranslated)
30{
32 LUASCRIPT_CHECK_ARG_NIL(L, untranslated, 2, string, "");
33
34 return _(untranslated);
35}
36
37/**********************************************************************/
40const char *api_intl_N_(lua_State *L, const char *untranslated)
41{
43 LUASCRIPT_CHECK_ARG_NIL(L, untranslated, 2, string, "");
44
45 return N_(untranslated);
46}
47
48/**********************************************************************/
51const char *api_intl_Q_(lua_State *L, const char *untranslated)
52{
54 LUASCRIPT_CHECK_ARG_NIL(L, untranslated, 2, string, "");
55
56 return Q_(untranslated);
57}
58
59/**********************************************************************/
62const char *api_intl_PL_(lua_State *L, const char *singular,
63 const char *plural, int n)
64{
66 LUASCRIPT_CHECK_ARG_NIL(L, singular, 2, string, "");
67 LUASCRIPT_CHECK_ARG_NIL(L, plural, 3, string, "");
68
69 return PL_(singular, plural, n);
70}
const char * api_intl_N_(lua_State *L, const char *untranslated)
const char * api_intl_PL_(lua_State *L, const char *singular, const char *plural, int n)
const char * api_intl__(lua_State *L, const char *untranslated)
const char * api_intl_Q_(lua_State *L, const char *untranslated)
#define n
Definition astring.c:77
char * incite_cost
Definition comments.c:75
#define Q_(String)
Definition fcintl.h:70
#define PL_(String1, String2, n)
Definition fcintl.h:71
#define _(String)
Definition fcintl.h:67
#define N_(String)
Definition fcintl.h:69
#define LUASCRIPT_CHECK_STATE(L,...)
Definition luascript.h:117
#define LUASCRIPT_CHECK_ARG_NIL(L, value, narg, type,...)
Definition luascript.h:138