From: <ja...@gn...> - 2000-10-24 13:18:44
|
Hi, While testing the wikilink-stem bug, I found that savepage hadn't been translated, which in turn triggered a bug in the translate script. In the mean time, you fixed the bug too, so my fix is no in the patch, but I've included it here, just for good karma. Looks a bit simpler?) -- yours is probably more efficient. /* all '!WikiName' entries are sorted first longests links must come first */ function WikiLinkCompare ($l, $r) { $lc = $l[0]; $rc = $r[0]; $res = 0; if ($lc == $rc || ($lc != "!" && $rc != "!")) $res = - strcmp ($l, $r); else if ($lc == "!") $res = -1; else $res = 1; return $res; }; [...] uksort($hash, WikiLinkCompare); diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/lib/editpage.php ./lib/editpage.php --- ../phpwiki/lib/editpage.php Fri Oct 20 15:22:03 2000 +++ ./lib/editpage.php Tue Oct 24 11:55:27 2000 @@ -30,7 +30,7 @@ $html = "<p>"; $html .= gettext ("This page has been locked by the administrator and cannot be edited."); $html .= "\n<p>"; - $html .= gettext ("Sorry for the inconvinience."); + $html .= gettext ("Sorry for the inconvenience."); $html .= "\n"; GeneratePage('MESSAGE', $html, sprintf (gettext ("Problem while editing %s"), $pagename), 0); ExitWiki (""); diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/lib/savepage.php ./lib/savepage.php --- ../phpwiki/lib/savepage.php Thu Oct 19 23:36:50 2000 +++ ./lib/savepage.php Tue Oct 24 12:45:24 2000 @@ -10,22 +10,31 @@ function ConcurrentUpdates($pagename) { - $html = "<P>PhpWiki is unable to save your changes, because\n" . - "another user edited and saved the page while you\n" . - "were editing the page too. If saving proceeded now\n" . - "changes from the previous author would be lost.</P>\n" . - "<P>In order to recover from this situation follow these steps:\n" . - "<OL><LI>Use your browsers <B>Back</B> button to go back " . - "to the edit page.\n" . - "<LI>Copy your changes to the clipboard or to another temporary " . - "place (e.g. text editor).\n" . - "<LI><B>Reload</B> the page. You should now see the most current" . - " version of the page. Your changes are no longer there.\n" . - "<LI>Make changes to the file again. Paste your additions from " . - "the clipboard (or text editor).\n" . - "<LI>Press <B>Save</B> again.</OL>\n" . - "<P>Sorry for the inconvinience.</P>"; - GeneratePage('MESSAGE', $html, "Problem while updating $pagename", 0); + $html = "<P>"; + /* xgettext only knows about c/c++ line-continuation strings + is does not know about php's dot operator. + We want to translate this entire paragraph as one string, of course. + */ + $html .= gettext ("PhpWiki is unable to save your changes, because another user edited and saved the page while you were editing the page too. If saving proceeded now changes from the previous author would be lost."); + $html .= "</P>\n<P>"; + + $html .= gettext ("In order to recover from this situation follow these steps:"); + $html .= "\n<OL><LI>"; + $html .= gettext ("Use your browser's <b>Back</b> button to go back to the edit page."); + $html .= "\n<LI>"; + $html .= gettext ("Copy your changes to the clipboard or to another temporary place (e.g. text editor)."); + $html .= "\n<LI>"; + $html .= gettext ("<b>Reload</b> the page. You should now see the most current version of the page. Your changes are no longer there."); + $html .= "\n<LI>"; + $html .= gettext ("Make changes to the file again. Paste your additions from the clipboard (or text editor)."); + $html .= "\n<LI>"; + $html .= gettext ("Press <b>Save</b> again."); + $html .= "</OL>\n<P>"; + $html .= gettext ("Sorry for the inconvenience."); + $html .= "</P>"; + + GeneratePage('MESSAGE', $html, + sprintf (gettext ("Problem while updating %s"), $pagename), 0); exit; } Binary files ../phpwiki/locale/nl/LC_MESSAGES/phpwiki.mo and ./locale/nl/LC_MESSAGES/phpwiki.mo differ diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/locale/nl/LC_MESSAGES/phpwiki.php ./locale/nl/LC_MESSAGES/phpwiki.php --- ../phpwiki/locale/nl/LC_MESSAGES/phpwiki.php Tue Oct 24 12:59:46 2000 +++ ./locale/nl/LC_MESSAGES/phpwiki.php Tue Oct 24 15:07:25 2000 @@ -1,4 +1,5 @@ <?php + $locale["./pgsrc"] = "locale/nl/pgsrc"; $locale["templates/browse.html"] = @@ -9,14 +10,6 @@ "locale/nl/templates/editlinks.html"; $locale["templates/message.html"] = "locale/nl/templates/message.html"; -$locale["WikiDiff::apply: line count mismatch: %s != %s"] = - ""; -$locale["WikiDiff::_check: failed"] = - ""; -$locale["WikiDiff::_check: edit sequence is non-optimal"] = - ""; -$locale["WikiDiff Okay: LCS = %s"] = - ""; $locale["Current page:"] = "Huidige pagina:"; $locale["version %s"] = @@ -42,8 +35,8 @@ $locale["No page name passed into editpage!"] = "Geen paginanaam doorgegeven aan veranderpagina"; $locale["This page has been locked by the administrator and cannot be edited."] = - ""; -$locale["Sorry for the inconvinience."] = + "Deze pagina is afgesloten door de beheerder en kan niet veranderd worden."; +$locale["Sorry for the inconvenience."] = "Excuses voor het ongemak."; $locale["Problem while editing %s"] = "Probleem tijdens veranderen %s"; @@ -83,6 +76,22 @@ "Actuele versie:"; $locale["Archived version"] = "Gearchiveerde versie:"; +$locale["PhpWiki is unable to save your changes, because another user edited and saved the page while you were editing the page too. If saving proceeded now changes from the previous author would be lost."] = + "PhpWiki kan je veranderingen niet bewaren, want een andere gebruiker\nheeft de pagina veranderd terwijl jij de pagina ook aan het veranderen\nwas. Als bewaren nu doorgang zou vinden, zouden de veranderingen van\nde vorige auteur verloren gaan."; +$locale["In order to recover from this situation follow these steps:"] = + "Om uit deze benarde situatie te geraken, volg je deze stappen:"; +$locale["Use your browser's <b>Back</b> button to go back to the edit page."] = + "Gebruik de <b>Terug</b> knop van je bladeraar om terug te gaan naar de verander tekst pagina."; +$locale["Copy your changes to the clipboard or to another temporary place (e.g. text editor)."] = + "Kopiëer je veranderingen naar het klipbord of een andere tijdelijke plaats (bijv. een tekst editor)."; +$locale["<b>Reload</b> the page. You should now see the most current version of the page. Your changes are no longer there."] = + "<b>Reload</b> de pagina. Je zou nu de meest recente versie van de pagina moeten zien. Jouw veranderingen staan er nu niet meer."; +$locale["Make changes to the file again. Paste your additions from the clipboard (or text editor)."] = + "Breng je veranderingen aan de pagina opnieuw aan. Plak je toevoeginen van het klipbord (of tekst editor)."; +$locale["Press <b>Save</b> again."] = + "Druk opnieuw op <b>Bewaar</b>."; +$locale["Problem while updating %s"] = + "Probleem tijdens veranderen van %s"; $locale["Thank you for editing %s."] = "Bedankt voor het veranderen van %s."; $locale["Your careful attention to detail is much appreciated."] = @@ -97,8 +106,5 @@ "%d beste uitgaande koppelingen:"; $locale["%d most popular nearby:"] = "%d meest gevraagde in de buurt:"; -$locale["Stack bounds exceeded in SetHTMLOutputMode"] = - ""; -$locale["RecentChanges"] = - "RecenteVeranderingen"; -?> + +;?> diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/locale/nl/templates/editpage.html ./locale/nl/templates/editpage.html --- ../phpwiki/locale/nl/templates/editpage.html Sun Oct 22 19:12:49 2000 +++ ./locale/nl/templates/editpage.html Tue Oct 24 15:06:25 2000 @@ -16,7 +16,7 @@ <br> <input type="checkbox" name="convert" value="tabs" > -Ik kan geen tabs typen. +Ik kan geen tabs tiepen. <a href="###SCRIPTURL###?VertaalSpatiesNaarTabs">VertaalSpatiesNaarTabs</a> voor mij als ik bewaar. <p><a href="###SCRIPTURL###?GoedeStijl">GoedeStijl</a> tips for diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/locale/po/nl.po ./locale/po/nl.po --- ../phpwiki/locale/po/nl.po Tue Oct 24 12:59:46 2000 +++ ./locale/po/nl.po Tue Oct 24 15:07:25 2000 @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: phpwiki 1.1.7\n" -"POT-Creation-Date: 2000-10-24 12:00+0200\n" +"POT-Creation-Date: 2000-10-24 15:07+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -117,8 +117,8 @@ msgstr "" "Deze pagina is afgesloten door de beheerder en kan niet veranderd worden." -#: lib/editpage.php:33 -msgid "Sorry for the inconvinience." +#: lib/editpage.php:33 lib/savepage.php:33 +msgid "Sorry for the inconvenience." msgstr "Excuses voor het ongemak." #: lib/editpage.php:35 @@ -140,7 +140,7 @@ msgid "Full Text Search Results" msgstr "Volledige tekst zoek resultaten" -#: lib/msql.php:29 lib/mysql.php:33 +#: lib/msql.php:29 lib/mysql.php:42 msgid "Cannot establish connection to database, giving up." msgstr "Kan verbinding naar data base niet tot stand brengen, geef op." @@ -149,7 +149,7 @@ msgid "Error message: %s" msgstr "Foutboodschap: %s" -#: lib/msql.php:35 lib/mysql.php:39 +#: lib/msql.php:35 lib/mysql.php:48 #, c-format msgid "Cannot open database %s, giving up." msgstr "Kan data base %s niet openen, geef op." @@ -169,12 +169,12 @@ msgid "Insert into %s failed: %s" msgstr "Insert in %s gefaald: %s" -#: lib/mysql.php:35 lib/mysql.php:41 lib/mysql.php:115 +#: lib/mysql.php:44 lib/mysql.php:50 lib/mysql.php:124 #, c-format msgid "MySQL error: %s" msgstr "MySQL fout: %s" -#: lib/mysql.php:113 +#: lib/mysql.php:122 #, c-format msgid "Error writing page '%s'" msgstr "Fout bij schrijven pagina `%s'" @@ -208,12 +208,66 @@ msgid "Archived version" msgstr "Gearchiveerde versie:" -#: lib/savepage.php:60 +#: lib/savepage.php:18 +msgid "" +"PhpWiki is unable to save your changes, because another user edited and " +"saved the page while you were editing the page too. If saving proceeded now " +"changes from the previous author would be lost." +msgstr "" +"PhpWiki kan je veranderingen niet bewaren, want een andere gebruiker\n" +"heeft de pagina veranderd terwijl jij de pagina ook aan het veranderen\n" +"was. Als bewaren nu doorgang zou vinden, zouden de veranderingen van\n" +"de vorige auteur verloren gaan." + +#: lib/savepage.php:21 +msgid "In order to recover from this situation follow these steps:" +msgstr "Om uit deze benarde situatie te geraken, volg je deze stappen:" + +#: lib/savepage.php:23 +msgid "Use your browser's <b>Back</b> button to go back to the edit page." +msgstr "" +"Gebruik de <b>Terug</b> knop van je bladeraar om terug te gaan naar de " +"verander tekst pagina." + +#: lib/savepage.php:25 +msgid "" +"Copy your changes to the clipboard or to another temporary place (e.g. text " +"editor)." +msgstr "" +"Kopiëer je veranderingen naar het klipbord of een andere tijdelijke plaats " +"(bijv. een tekst editor)." + +#: lib/savepage.php:27 +msgid "" +"<b>Reload</b> the page. You should now see the most current version of the " +"page. Your changes are no longer there." +msgstr "" +"<b>Reload</b> de pagina. Je zou nu de meest recente versie van de pagina " +"moeten zien. Jouw veranderingen staan er nu niet meer." + +#: lib/savepage.php:29 +msgid "" +"Make changes to the file again. Paste your additions from the clipboard (or " +"text editor)." +msgstr "" +"Breng je veranderingen aan de pagina opnieuw aan. Plak je toevoeginen van " +"het klipbord (of tekst editor)." + +#: lib/savepage.php:31 +msgid "Press <b>Save</b> again." +msgstr "Druk opnieuw op <b>Bewaar</b>." + +#: lib/savepage.php:37 +#, c-format +msgid "Problem while updating %s" +msgstr "Probleem tijdens veranderen van %s" + +#: lib/savepage.php:69 #, c-format msgid "Thank you for editing %s." msgstr "Bedankt voor het veranderen van %s." -#: lib/savepage.php:90 +#: lib/savepage.php:99 msgid "Your careful attention to detail is much appreciated." msgstr "Je zorgvuldige aandacht voor detail wordt erg gewaardeerd." @@ -222,29 +276,29 @@ msgid "Inserting page %s, version %s from %s" msgstr "Voeg pagina %s toe, versie %s van %s" -#: lib/stdlib.php:36 +#: lib/stdlib.php:37 msgid "WikiFatalError" msgstr "WikiFataleFout" -#: lib/stdlib.php:53 +#: lib/stdlib.php:54 #, c-format msgid "%d best incoming links:" msgstr "%d beste inkomende koppelingen:" -#: lib/stdlib.php:63 +#: lib/stdlib.php:64 #, c-format msgid "%d best outgoing links:" msgstr "%d beste uitgaande koppelingen:" -#: lib/stdlib.php:74 +#: lib/stdlib.php:75 #, c-format msgid "%d most popular nearby:" msgstr "%d meest gevraagde in de buurt:" -#: lib/stdlib.php:288 +#: lib/stdlib.php:289 msgid "Stack bounds exceeded in SetHTMLOutputMode" msgstr "" -#: lib/stdlib.php:343 lib/stdlib.php:406 +#: lib/stdlib.php:344 lib/stdlib.php:407 msgid "RecentChanges" msgstr "RecenteVeranderingen" diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/locale/po/phpwiki.pot ./locale/po/phpwiki.pot --- ../phpwiki/locale/po/phpwiki.pot Tue Oct 24 12:59:46 2000 +++ ./locale/po/phpwiki.pot Tue Oct 24 15:07:25 2000 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-10-24 12:00+0200\n" +"POT-Creation-Date: 2000-10-24 15:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -110,8 +110,8 @@ msgid "This page has been locked by the administrator and cannot be edited." msgstr "" -#: lib/editpage.php:33 -msgid "Sorry for the inconvinience." +#: lib/editpage.php:33 lib/savepage.php:33 +msgid "Sorry for the inconvenience." msgstr "" #: lib/editpage.php:35 @@ -133,7 +133,7 @@ msgid "Full Text Search Results" msgstr "" -#: lib/msql.php:29 lib/mysql.php:33 +#: lib/msql.php:29 lib/mysql.php:42 msgid "Cannot establish connection to database, giving up." msgstr "" @@ -142,7 +142,7 @@ msgid "Error message: %s" msgstr "" -#: lib/msql.php:35 lib/mysql.php:39 +#: lib/msql.php:35 lib/mysql.php:48 #, c-format msgid "Cannot open database %s, giving up." msgstr "" @@ -162,12 +162,12 @@ msgid "Insert into %s failed: %s" msgstr "" -#: lib/mysql.php:35 lib/mysql.php:41 lib/mysql.php:115 +#: lib/mysql.php:44 lib/mysql.php:50 lib/mysql.php:124 #, c-format msgid "MySQL error: %s" msgstr "" -#: lib/mysql.php:113 +#: lib/mysql.php:122 #, c-format msgid "Error writing page '%s'" msgstr "" @@ -201,12 +201,54 @@ msgid "Archived version" msgstr "" -#: lib/savepage.php:60 +#: lib/savepage.php:18 +msgid "" +"PhpWiki is unable to save your changes, because another user edited and " +"saved the page while you were editing the page too. If saving proceeded now " +"changes from the previous author would be lost." +msgstr "" + +#: lib/savepage.php:21 +msgid "In order to recover from this situation follow these steps:" +msgstr "" + +#: lib/savepage.php:23 +msgid "Use your browser's <b>Back</b> button to go back to the edit page." +msgstr "" + +#: lib/savepage.php:25 +msgid "" +"Copy your changes to the clipboard or to another temporary place (e.g. text " +"editor)." +msgstr "" + +#: lib/savepage.php:27 +msgid "" +"<b>Reload</b> the page. You should now see the most current version of the " +"page. Your changes are no longer there." +msgstr "" + +#: lib/savepage.php:29 +msgid "" +"Make changes to the file again. Paste your additions from the clipboard (or " +"text editor)." +msgstr "" + +#: lib/savepage.php:31 +msgid "Press <b>Save</b> again." +msgstr "" + +#: lib/savepage.php:37 +#, c-format +msgid "Problem while updating %s" +msgstr "" + +#: lib/savepage.php:69 #, c-format msgid "Thank you for editing %s." msgstr "" -#: lib/savepage.php:90 +#: lib/savepage.php:99 msgid "Your careful attention to detail is much appreciated." msgstr "" @@ -215,29 +257,29 @@ msgid "Inserting page %s, version %s from %s" msgstr "" -#: lib/stdlib.php:36 +#: lib/stdlib.php:37 msgid "WikiFatalError" msgstr "" -#: lib/stdlib.php:53 +#: lib/stdlib.php:54 #, c-format msgid "%d best incoming links:" msgstr "" -#: lib/stdlib.php:63 +#: lib/stdlib.php:64 #, c-format msgid "%d best outgoing links:" msgstr "" -#: lib/stdlib.php:74 +#: lib/stdlib.php:75 #, c-format msgid "%d most popular nearby:" msgstr "" -#: lib/stdlib.php:288 +#: lib/stdlib.php:289 msgid "Stack bounds exceeded in SetHTMLOutputMode" msgstr "" -#: lib/stdlib.php:343 lib/stdlib.php:406 +#: lib/stdlib.php:344 lib/stdlib.php:407 msgid "RecentChanges" msgstr "" diff -urN --exclude=CVS --exclude=*~ --exclude=#* ../phpwiki/locale/translate.sh ./locale/translate.sh --- ../phpwiki/locale/translate.sh Mon Oct 23 03:19:09 2000 +++ ./locale/translate.sh Tue Oct 24 15:01:43 2000 @@ -30,9 +30,41 @@ msgfmt -o $locale/phpwiki.mo $po awk -- ' - BEGIN { print ("<?php") } - /^msgid ""/ { getline; next } - /^msgid "/ { msgid = substr ($0, 7); print ("$locale[" msgid "] ="); next } - /^msgstr "/ { msgstr = substr ($0, 8); print (" " msgstr ";"); next } - END { print ("?>") }' $po > $locale/phpwiki.php +BEGIN { + msgid=""; msgstr=""; + print ("<?php\n"); +} +/^msgid ""/ { + if (msgid && str) + print ("$locale[\"" msgid "\"] =\n \"" str "\";"); + str=""; + next; +} +/^msgid "/ { #"{ + if (msgid && str) + print ("$locale[\"" msgid "\"] =\n \"" str "\";"); + str = substr ($0, 8, length ($0) - 8); + msgstr=""; +} +/^msgstr ""/ { + msgid=str; + str=""; + next; +} +/^msgstr "/ { #"{ + msgid=str; + str = substr ($0, 9, length ($0) - 9); + next; +} +/^"/ { #"{ + str = (str substr ($0, 2, length ($0) - 2)); + next; +} +END { + if (mgsid && str) + print ("$locale[\"" msgid "\"] =\n \"" str "\";"); + print ("\n;?>"); +} + +' $po > $locale/phpwiki.php done -- Jan Nieuwenhuizen <ja...@gn...> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org |