Good location for *.msg files for swat i18n?
tpot at samba.org
Tue Sep 23 07:20:45 GMT 2003
On Tue, Sep 23, 2003 at 05:57:19AM +0900, TAKAHASHI Motonobu wrote:
> | --> (https://bugzilla.samba.org/attachment.cgi?id=159&action=view)
> |update msg files and genmsg script
> This file contains the update msg files and genmsg script which is
> based in 3b) in
This looks good. There is no copyright attribution for the genmsg
script. Shall I add (c) 2003 Motonobu Takahashi to it?
> | --> (https://bugzilla.samba.org/attachment.cgi?id=160&action=view)
> |patch to update the calling _( )
> This is the main patch file which
> 1) pick up proper strings to call msg strings for example to add
> strings in wizard menu in web/swat.c, web/statuspage.c and
> 2) define N_() macro in include/intl.h to pick up some strings
> in param/loadparm.c
> 3) quote all name and value tag with '"'
> For example in swat.c:720 the "Edit Parameter Values" string is
> displayd only as "Edit" because value tag is not quoted like:
> value=Edit Parameter Values
> These tags should be quoted though it sometimes works well
> without quotation.
> 4) modify the msg strings not to contain HTML tags or other
> non-message strings ASAP. For example
> dprintf(_("test\n")); is modified to dprintf("%s\n", _("test"));
Also good. I plan to apply both these patches.
> There are still some issues:
> I) BUG#489: d_printf() cannot handle '\"'
This is a problem with passing the msgid as both a tdb key and as
an entry in the msg file. The msg file retains the \" while the
C compiler eats the backslash, so a comparison between the escaped
and unescaped strings will fail.
A solution is to do a substitution of " with \" in lang_msg() but
this will increase the size of the string and possibly create
a bit of a mess. It could be easier just to change the \" to '
> II) please remove old gif files under swat/lang/ja/images
Were you interesting in creating some replacements? I thought the
internationalised gif files were great!
> III) d_printf() in swat.c:754 really needs?
> d_printf() needs in swat.c after line:740?
Do you mean joining these two d_printf()s? That should be OK.
> IV) For example
> 6a) d_printf(_("test %s messege\n")) is working well but
> 6b) d_printf("%s\n", _("test %s messege")) is not working.
> I modified the 6b) format to 6a) format.
> This is currently d_printf() limitation?
I haven't tracked down the source of this but it is probably
to do with the exact key used to index the msg file being
different from the argument passed to d_printf().
> V) long strings are not converted with d_printf() for example
> web/swat.c:771: The above...
> I simply seperate this to 2 strings.
> This is also currently d_printf() limitation?
I think this is because the msg file parser in lang_tdb.c can't
handle multiline msgids. i.e:
"The \"Rewrite smb.conf file\" button will clear the smb.conf file of all "
"default values and of comments.<br>\n"
> VI) click SHARE icon, then "Share Parameters" will display, also
> click PRINTER icon, then "Printer Parameters" will
> I think click GLOBAL icon, then displaying "Global Parameters (not
> variables)" is more better...?
More information about the samba-technical