From: Carsten K. <car...@ma...> - 2001-12-18 09:26:37
|
Hi, German translations for PhpWiki 1.3 are 90% complete. I welcome any suggestions for change, especially the grammar. :-) Cheers, Carsten P.S. - There are a few translated strings which still render in english, offhand I don't know why (the word "edit" on the Diff page, for one example). - There are other strings I know of that weren't automatically picked out of the source code by xgettext for inclusion in the .po files, and on quick inspection of the files I couldn't yet see why. |
From: Jeff D. <da...@da...> - 2001-12-18 16:00:51
|
On Tue, 18 Dec 2001 04:26:34 -0500 "Carsten Klapp" <car...@ma...> wrote: > - There are a few translated strings which still render in english, > offhand I don't know why (the word "edit" on the Diff page, for one > example). That's because the translation for "Edit:" is tagged as 'fuzzy' in the local/po/de.po. "Fuzzy" means that (at some point) the translation was _automagically_ (had to use that word, just for you :-) ) guessed by msgmerge base on similarity to some other translation already in de.po. (Msgfmt, by default, ignores the 'fuzzy' entries.) If you use po-mode in emacs, it's very easy to find and manipulate these flags ('f' takes you to the next fuzzy translation, 'TAB' un-fuzzies it.) > - There are other strings I know of that weren't automatically picked out > of the source code by xgettext for inclusion in the .po files, and on > quick inspection of the files I couldn't yet see why. Which ones? |
From: Carsten K. <car...@ma...> - 2001-12-18 23:02:48
|
Ok, I removed the fuzzies with emacs--what a cool little program! (I was=20= used to using pico, never even new what emacs was.) Still verifying which strings weren't picked out by xgettext. A couple more problems: 1. Variable reordering. In the case where word ordering differs during=20= translation, the gettext manual suggests the following syntax to force = the=20 correct text substitution: #: ../lib/diff.php:251 #, c-format msgid "Differences between %s and %s of %s." msgstr "Der Unterschiedsergebnis von %3$s, zwischen %1$s und %2$s." PHP doesn't like it. Probably the example from the gettext manual refers=20= to C code. PHP Warnungen locale/de/LC_MESSAGES/phpwiki.php:57: Notice[8]: Undefined variable: s What to do? 2. Strings in the html template don't seem to substitute for %s. I tried: <?php echo sprintf(_("haystack %s"),_("needle")); ?> and some permutations of $_() as they are used elsewhere on the page: <?php echo sprintf($_("haystack %s"),_("needle")); ?> The purpose is to make the three following changes, the first and second=20= are the most important: 1.=3D=3D=3D=3D #: ../templates/browse.html:97 ../templates/editpage.html:71 -msgid "You are signed in as" -msgstr "Du bist eingemeldet als" +msgid "You are signed in as %s" +msgstr "Du bist als %s eingemeldet" 2.=3D=3D=3D=3D #: ../templates/editpage.html:80 -msgid "You can change the size of the editing area in" +msgid "You can change the size of the editing area in %s" 3.=3D=3D=3D=3D -#: ../templates/editpage.html:82 -msgid "See" -msgstr "Sehe" #: ../templates/editpage.html:82 msgid "GoodStyle" msgstr "GuterStil" -#: ../templates/editpage.html:82 -msgid "tips for editing." -msgstr "tips f=B8rs Editieren." +msgid "See %s tips for editing." +msgstr "Sehe %s tips f=B8rs Editieren." =3D=3D=3D=3D Carsten |
[Phpwiki-talk] =?iso-8859-1?Q?Re:_[Phpwiki-talk]_German_translations_need_proofing_(volunteers=3F)?=
From: Jeff D. <da...@da...> - 2001-12-19 01:09:33
|
Carsten Klapp said: > 1. Variable reordering. That's a problem. PHP doesn't seem to support the printf argument reordering... I'll see if I can think of a work-around. > 2. Strings in the html template don't seem to substitute for %s. > I tried: > <?php echo sprintf(_("haystack %s"),_("needle")); ?> That works for me. I just tried it. Also note that 'printf(...);' is equivalent to 'echo sprintf(...);'. |
From: Carsten K. <car...@ma...> - 2001-12-19 15:13:24
|
Hi, Found my problem using sprintf in the html templates! Turns out that variables in bracket form on the templates need to be quoted "${var}" or else they aren't eval()'d. -<?php echo sprintf(_("Last edited on %s."),${LASTMODIFIED}); ?> +<?php printf(_("Last edited on %s."),"${LASTMODIFIED}"); ?> Thanks for the tip about printf. Also the new variable reordering functions sound great. I'll try them later today. carsten On Tuesday, December 18, 2001, at 08:09 pm, Jeff Dairiki wrote: > Carsten Klapp said: > >> 1. Variable reordering. > > That's a problem. PHP doesn't seem to support the printf > argument reordering... > > I'll see if I can think of a work-around. > >> 2. Strings in the html template don't seem to substitute for %s. >> I tried: >> <?php echo sprintf(_("haystack %s"),_("needle")); ?> > > That works for me. I just tried it. > Also note that 'printf(...);' is equivalent to 'echo sprintf(...);'. |
[Phpwiki-talk] =?iso-8859-1?Q?Re:_[Phpwiki-talk]_German_translations_need_proofing_(volunteers=3F)?=
From: Jeff D. <da...@da...> - 2001-12-19 05:16:30
|
Carsten Klapp said: > 1. Variable reordering. In the case where word ordering differs during > translation, the gettext manual suggests the following syntax to force > the correct text substitution: > > #: ../lib/diff.php:251 > #, c-format > msgid "Differences between %s and %s of %s." > msgstr "Der Unterschiedsergebnis von %3$s, zwischen %1$s und %2$s." I've just checked three new functions into lib/stdlib.php. __printf, __sprintf, and __vsprintf. These behave like the PHP's built-in printf functions, except: 1. They pass the format string through gettext(). 2. The support the above method of argument reordering. (I've also fixed locale/Makefile, so that xgettext will find the format strings of __printf()s, __sprintf()s, __vsprintf()s...) For the argument reordering to work, code like: printf(gettext("..format string.."), ..., ...); needs to be changed to: __printf("..format string..", ..., ...); (And similarly for sprintf.) |
From: Steve W. <sw...@pa...> - 2001-12-19 23:03:01
|
On Tue, 18 Dec 2001, Carsten Klapp wrote: > > Ok, I removed the fuzzies with emacs--what a cool little program! (I was > used to using pico, never even new what emacs was.) Gott im Himmel. You've been using Pico to edit source files? My fingers hurt just thinking about it! ~swain --- http://www.panix.com/~swain/ "Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid." -- Frank Zappa |