From 6aec31c4263f9b020f59c3903917e751b44970e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Oct 2001 08:10:07 +0000 Subject: [PATCH] - renamed *.po message files to *.msg - fixed minor bug in lang_tdb.c the msg files are still in a po/ directory, but unfortunately that is not easy to fix given the terrible handling of directories in CVS. (This used to be commit 2fbeedeb1607957f1e48e66074445dc3bc5a16f7) --- source3/intl/lang_tdb.c | 27 +++++++++++++++------------ source3/po/{en.po => en.msg} | 0 source3/po/{ja.po => ja.msg} | 0 source3/po/{pl.po => pl.msg} | 0 source3/po/{tr.po => tr.msg} | 0 source3/po/{zh_CN.po => zh_CN.msg} | 0 6 files changed, 15 insertions(+), 12 deletions(-) rename source3/po/{en.po => en.msg} (100%) rename source3/po/{ja.po => ja.msg} (100%) rename source3/po/{pl.po => pl.msg} (100%) rename source3/po/{tr.po => tr.msg} (100%) rename source3/po/{zh_CN.po => zh_CN.msg} (100%) diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index 8d514c5e7d4..38bdcdd132c 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -27,15 +27,15 @@ static TDB_CONTEXT *tdb; static char *current_lang; -/* load a po file into the tdb */ -static BOOL load_po(const char *po_file) +/* load a msg file into the tdb */ +static BOOL load_msg(const char *msg_file) { char **lines; int num_lines, i; char *msgid, *msgstr; TDB_DATA key, data; - lines = file_lines_load(po_file, &num_lines); + lines = file_lines_load(msg_file, &num_lines); if (!lines) { return False; @@ -45,12 +45,14 @@ static BOOL load_po(const char *po_file) /* wipe the db */ tdb_traverse(tdb, (tdb_traverse_func) tdb_delete, NULL); + + msgid = NULL; for (i=0;i