From: Carsten K. <car...@us...> - 2001-12-19 09:55:33
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv3297/phpwiki/lib Modified Files: loadsave.php Log Message: gettext-ified a bunch of strings in here. (I think this was the last one, all PhpWiki strings are _("done") now, whew!) Index: loadsave.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/loadsave.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** loadsave.php 2001/12/16 18:33:25 1.16 --- loadsave.php 2001/12/19 09:55:30 1.17 *************** *** 15,20 **** // FIXME: This is a hack ! echo Element('p', QElement('b', gettext("Complete."))); ! echo Element('p', "Return to " . LinkExistingWikiWord($GLOBALS['pagename'])); echo "</body></html>\n"; } --- 15,20 ---- // FIXME: This is a hack ! echo Element('p', QElement('b', _("Complete."))); ! echo Element('p', sprintf( _("Return to %s"),LinkExistingWikiWord($GLOBALS['pagename']) ) ); echo "</body></html>\n"; } *************** *** 123,139 **** $directory = $request->getArg('directory'); if (empty($directory)) ! ExitWiki(gettext("You must specify a directory to dump to")); // see if we can access the directory the user wants us to use if (! file_exists($directory)) { if (! mkdir($directory, 0755)) ! ExitWiki("Cannot create directory '$directory'<br>\n"); else ! $html = "Created directory '$directory' for the page dump...<br>\n"; } else { ! $html = "Using directory '$directory'<br>\n"; } ! StartLoadDump("Dumping Pages", $html); $pages = $dbi->getAllPages(); --- 123,139 ---- $directory = $request->getArg('directory'); if (empty($directory)) ! ExitWiki(_("You must specify a directory to dump to")); // see if we can access the directory the user wants us to use if (! file_exists($directory)) { if (! mkdir($directory, 0755)) ! ExitWiki( sprintf(_("Cannot create directory '%s'"),$directory) . "<br>\n"); else ! $html = sprintf(_("Created directory '%s' for the page dump..."),$directory) . "<br>\n"; } else { ! $html = sprintf(_("Using directory '%s'"),$directory) . "<br>\n"; } ! StartLoadDump( _("Dumping Pages"), $html); $pages = $dbi->getAllPages(); *************** *** 146,158 **** echo "<br>$enc_name ... "; if($page->getName() != $filename) ! echo "<small>saved as $filename</small> ... "; $data = MailifyPage($page); if ( !($fd = fopen("$directory/$filename", "w")) ) ! ExitWiki("<b>couldn't open file '$directory/$filename' for writing</b>\n"); $num = fwrite($fd, $data, strlen($data)); ! echo "<small>$num bytes written</small>\n"; flush(); --- 146,158 ---- echo "<br>$enc_name ... "; if($page->getName() != $filename) ! echo "<small>" . sprintf(_("saved as %s"),$filename) . "</small> ... "; $data = MailifyPage($page); if ( !($fd = fopen("$directory/$filename", "w")) ) ! ExitWiki("<b>" . sprintf(_("couldn't open file '%s' for writing"),"$directory/$filename") . "</b>\n"); $num = fwrite($fd, $data, strlen($data)); ! echo "<small>" . sprintf(_("%s bytes written"),$num) . "</small>\n"; flush(); *************** *** 176,180 **** if (empty($pageinfo['pagename'])) { ! echo Element('dd'). Element('dt', QElement('b', "Empty pagename!")); return; } --- 176,180 ---- if (empty($pageinfo['pagename'])) { ! echo Element('dd'). Element('dt', QElement('b', _("Empty pagename!") )); return; } *************** *** 196,204 **** $skip = false; if ($source) ! $mesg[] = sprintf(gettext("from %s"), $source); $current = $page->getCurrentRevision(); if ($current->getVersion() == 0) { ! $mesg[] = gettext("new page"); $isnew = true; } --- 196,204 ---- $skip = false; if ($source) ! $mesg[] = sprintf(_("from %s"), $source); $current = $page->getCurrentRevision(); if ($current->getVersion() == 0) { ! $mesg[] = _("new page"); $isnew = true; } *************** *** 206,212 **** if ($current->getPackedContent() == $content && $current->get('author') == $versiondata['author']) { ! $mesg[] = sprintf(gettext("is identical to current version %d"), $current->getVersion()); ! $mesg[] = gettext("- skipped"); $skip = true; } --- 206,212 ---- if ($current->getPackedContent() == $content && $current->get('author') == $versiondata['author']) { ! $mesg[] = sprintf(_("is identical to current version %d"), $current->getVersion()); ! $mesg[] = _("- skipped"); $skip = true; } *************** *** 219,223 **** ExtractWikiPageLinks($content)); ! $mesg[] = sprintf(gettext("- saved as version %d"), $new->getVersion()); } --- 219,223 ---- ExtractWikiPageLinks($content)); ! $mesg[] = sprintf(_("- saved to database as version %d"), $new->getVersion()); } *************** *** 311,318 **** usort($parts, 'SortByPageVersion'); foreach ($parts as $pageinfo) ! SavePage($dbi, $pageinfo, "MIME file $filename", $basename); } else if ( ($pageinfo = ParseSerializedPage($text, $default_pagename)) ) { ! SavePage($dbi, $pageinfo, "Serialized file $filename", $basename); } else { --- 311,318 ---- usort($parts, 'SortByPageVersion'); foreach ($parts as $pageinfo) ! SavePage($dbi, $pageinfo, sprintf(_("MIME file %s"),$filename), $basename); } else if ( ($pageinfo = ParseSerializedPage($text, $default_pagename)) ) { ! SavePage($dbi, $pageinfo, sprintf(_("Serialized file %s"),$filename), $basename); } else { *************** *** 325,329 **** => preg_replace('/[ \t\r]*\n/', "\n", chop($text)) ); ! SavePage($dbi, $pageinfo, "plain file $filename", $basename); } } --- 325,329 ---- => preg_replace('/[ \t\r]*\n/', "\n", chop($text)) ); ! SavePage($dbi, $pageinfo, sprintf(_("plain file %s"),$filename), $basename); } } *************** *** 339,343 **** || ($exclude && in_array($fn, $exclude)) ) { ! print Element('dt', LinkExistingWikiWord($fn)) . QElement('dd', 'Skipping'); continue; } --- 339,343 ---- || ($exclude && in_array($fn, $exclude)) ) { ! print Element('dt', LinkExistingWikiWord($fn)) . QElement('dd', _("Skipping")); continue; } *************** *** 358,362 **** || ($exclude && in_array($fn, $exclude)) ) { ! print Element('dt', LinkExistingWikiWord($fn)) . QElement('dd', 'Skipping'); continue; } --- 358,362 ---- || ($exclude && in_array($fn, $exclude)) ) { ! print Element('dt', LinkExistingWikiWord($fn)) . QElement('dd', _("Skipping")); continue; } *************** *** 397,401 **** else if ($type != 'file' && !preg_match('/^(http|ftp):/', $file_or_dir)) { ! ExitWiki("Bad file type: $type"); } else if (IsZipFile($file_or_dir)) --- 397,401 ---- else if ($type != 'file' && !preg_match('/^(http|ftp):/', $file_or_dir)) { ! ExitWiki( sprintf(_("Bad file type: %s"),$type) ); } else if (IsZipFile($file_or_dir)) *************** *** 412,416 **** { $source = $request->getArg('source'); ! StartLoadDump("Loading '$source'"); echo "<dl>\n"; LoadAny($dbi, $source/*, false, array(gettext("RecentChanges"))*/); --- 412,416 ---- { $source = $request->getArg('source'); ! StartLoadDump( sprintf(_("Loading '%s'"),$source) ); echo "<dl>\n"; LoadAny($dbi, $source/*, false, array(gettext("RecentChanges"))*/); *************** *** 424,430 **** //FIXME: This is a hack ! $user->userid = 'The PhpWiki programming team'; ! StartLoadDump('Loading up virgin wiki'); echo "<dl>\n"; --- 424,430 ---- //FIXME: This is a hack ! $user->userid = _("The PhpWiki programming team"); ! StartLoadDump(_("Loading up virgin wiki")); echo "<dl>\n"; *************** *** 442,449 **** if (!$upload) ! ExitWiki('No uploaded file to upload?'); // Dump http headers. ! StartLoadDump("Uploading " . $upload->getName()); echo "<dl>\n"; --- 442,449 ---- if (!$upload) ! ExitWiki(_("No uploaded file to upload?")); // Dump http headers. ! StartLoadDump( sprintf(_("Uploading %s"),$upload->getName()) ); echo "<dl>\n"; |