d_printf() cannot handle messege strings including '\', for example "this is a test.\n". To fix this problem or to modify messege strings not to include '\' is required to support SWAT i18n function.
Example. ja.msg msgid "original message\n" msgstr "Japanes message\n" lang_ja.tdb includes '\' and 'n' in msgid and msgstr. But d_printf(_("xxx\n")) search "xxx" and '0x0A' instead of '\' and 'n'. Therefore it can't find correct message. --- lang_tdb.c.org 2003-09-18 13:05:21.000000000 +0900 +++ lang_tdb.c 2003-09-18 13:06:30.000000000 +0900 @@ -58,6 +58,8 @@ if (*msgstr == 0) { msgstr = msgid; } + all_string_sub(msgid, "\\n", "\n", 0); + all_string_sub(msgstr, "\\n", "\n", 0); key.dptr = msgid; key.dsize = strlen(msgid)+1; data.dptr = msgstr;
Applied. Thanks Monyo!
originally reported against one of the 3.0.0rc[1-4] releases. Cleaning up non-production versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.