forked from github/server
po export code removed.
This commit is contained in:
parent
87914a7b5b
commit
409f5df9a9
4 changed files with 0 additions and 55 deletions
|
@ -1,16 +0,0 @@
|
|||
local path = 'scripts'
|
||||
if config.install then
|
||||
path = config.install .. '/' .. path
|
||||
end
|
||||
package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
|
||||
require 'eressea'
|
||||
require 'eressea.xmlconf' -- read xml data
|
||||
|
||||
local rules = {}
|
||||
if config.rules then
|
||||
rules = require('eressea.' .. config.rules)
|
||||
eressea.log.info('loaded ' .. #rules .. ' modules for ' .. config.rules)
|
||||
else
|
||||
eressea.log.warning('no rule modules loaded, specify a game in eressea.ini or with -r')
|
||||
end
|
||||
export_locales()
|
|
@ -914,32 +914,6 @@ static int lua_rng_default(lua_State *L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void export_locale(const struct locale *lang, const char *name) {
|
||||
char fname[64];
|
||||
FILE * F;
|
||||
|
||||
sprintf(fname, "messages.%2s.po", name);
|
||||
F = fopen(fname, "wt");
|
||||
if (F) {
|
||||
export_messages(lang, F, NULL);
|
||||
}
|
||||
#if 0
|
||||
/* disabled, because it also export message text */
|
||||
sprintf(fname, "strings.%2s.po", name);
|
||||
F = fopen(fname, "wt");
|
||||
if (F) {
|
||||
export_strings(lang, F);
|
||||
fclose(F);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int tolua_export_locales(lua_State *L) {
|
||||
UNUSED_ARG(L);
|
||||
locale_foreach(export_locale);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void tolua_bind_open(lua_State * L);
|
||||
|
||||
int tolua_bindings_open(lua_State * L, const dictionary *inifile)
|
||||
|
@ -1057,7 +1031,6 @@ int tolua_bindings_open(lua_State * L, const dictionary *inifile)
|
|||
tolua_function(L, TOLUA_CAST "spells", tolua_get_spells);
|
||||
tolua_function(L, TOLUA_CAST "read_xml", tolua_read_xml);
|
||||
tolua_function(L, TOLUA_CAST "equip_newunits", tolua_equip_newunits);
|
||||
tolua_function(L, TOLUA_CAST "export_locales", tolua_export_locales);
|
||||
} tolua_endmodule(L);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -175,13 +175,3 @@ void free_nrmesssages(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void export_messages(const struct locale * lang, FILE *F, const char *msgctxt) {
|
||||
int i;
|
||||
for (i = 0; i != NRT_MAXHASH; ++i) {
|
||||
nrmessage_type *nrt = nrtypes[i];
|
||||
while (nrt) {
|
||||
po_write_msg(F, nrt->mtype->name, nrt_string(nrt, lang), msgctxt);
|
||||
nrt = nrt->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,8 +43,6 @@ extern "C" {
|
|||
char *buffer, size_t size, const void *userdata);
|
||||
const char *nr_section(const struct message *msg);
|
||||
|
||||
void export_messages(const struct locale * lang, FILE *F, const char *msgctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue