Mark strings for translation.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-04-17 15:56:23 +00:00
parent 782590b1aa
commit f81987a2f2
4 changed files with 23 additions and 23 deletions

View File

@ -130,7 +130,7 @@ function list_authors($optioncount = false, $exclude_admin = true, $show_fullnam
if ($posts == 0) { if ($posts == 0) {
if (! $hide_empty) echo $name; if (! $hide_empty) echo $name;
} else { } else {
$link = '<a href="' . get_author_link(0, $author->ID, $author->user_nicename) . '" title="Posts by ' . htmlspecialchars($author->user_nickname) . '">' . stripslashes($name) . '</a>'; $link = '<a href="' . get_author_link(0, $author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), htmlspecialchars($author->user_nickname)) . '">' . stripslashes($name) . '</a>';
if ( (! empty($feed_image)) || (! empty($feed)) ) { if ( (! empty($feed_image)) || (! empty($feed)) ) {

View File

@ -63,16 +63,16 @@ function the_category($seperator = '', $parents='') {
switch(strtolower($parents)) { switch(strtolower($parents)) {
case 'multiple': case 'multiple':
if ($category->category_parent) echo get_category_parents($category->category_parent, TRUE); if ($category->category_parent) echo get_category_parents($category->category_parent, TRUE);
echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="View all posts in '.$category->cat_name.'">'.$category->cat_name.'</a></li>'; echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '">'.$category->cat_name.'</a></li>';
break; break;
case 'single': case 'single':
echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="View all posts in '.$category->cat_name.'>'; echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '>';
if ($category->category_parent)echo get_category_parents($category->category_parent, FALSE); if ($category->category_parent)echo get_category_parents($category->category_parent, FALSE);
echo $category->cat_name.'</a></li>'; echo $category->cat_name.'</a></li>';
break; break;
case '': case '':
default: default:
echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="View all posts in '.$category->cat_name.'">'.$category->cat_name.'</a></li>'; echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '">'.$category->cat_name.'</a></li>';
} }
} }
echo '</ul>'; echo '</ul>';
@ -84,14 +84,14 @@ function the_category($seperator = '', $parents='') {
switch(strtolower($parents)) { switch(strtolower($parents)) {
case 'multiple': case 'multiple':
if ($category->category_parent) echo get_category_parents($category->category_parent, TRUE); if ($category->category_parent) echo get_category_parents($category->category_parent, TRUE);
echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="View all posts in '.$category->cat_name.'">'.$category->cat_name.'</a>'; echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '">'.$category->cat_name.'</a>';
case 'single': case 'single':
echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="View all posts in '.$category->cat_name.'">'; echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '">';
if ($category->category_parent) echo get_category_parents($category->category_parent, FALSE); if ($category->category_parent) echo get_category_parents($category->category_parent, FALSE);
echo "$category->cat_name</a>"; echo "$category->cat_name</a>";
case '': case '':
default: default:
echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="View all posts in '.$category->cat_name.'">'.$category->cat_name.'</a>'; echo '<a href="' . get_category_link(0, $category->category_id, $category->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '">'.$category->cat_name.'</a>';
} }
++$i; ++$i;
} }
@ -133,7 +133,7 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename =
} }
if ($parent->category_parent) $chain .= get_category_parents($parent->category_parent, $link, $separator, $nicename); if ($parent->category_parent) $chain .= get_category_parents($parent->category_parent, $link, $separator, $nicename);
if ($link) { if ($link) {
$chain .= '<a href="' . get_category_link(0, $parent->cat_ID, $parent->category_nicename) . '" title="View all posts in "'.$parent->cat_name.'">'.$name.'</a>' . $separator; $chain .= '<a href="' . get_category_link(0, $parent->cat_ID, $parent->category_nicename) . '" title="' . sprintf(__("View all posts in %s"), $parent->cat_name) . '">'.$name.'</a>' . $separator;
} else { } else {
$chain .= $name.$separator; $chain .= $name.$separator;
} }
@ -313,7 +313,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
$num_found++; $num_found++;
$link = '<a href="'.get_category_link(0, $category->cat_ID, $category->category_nicename).'" '; $link = '<a href="'.get_category_link(0, $category->cat_ID, $category->category_nicename).'" ';
if ($use_desc_for_title == 0 || empty($category->category_description)) { if ($use_desc_for_title == 0 || empty($category->category_description)) {
$link .= 'title="View all posts filed under ' . htmlspecialchars($category->cat_name) . '"'; $link .= 'title="'. sprintf(__("View all posts filed under %s"), htmlspecialchars($category->cat_name)) . '"';
} else { } else {
$link .= 'title="' . htmlspecialchars($category->category_description) . '"'; $link .= 'title="' . htmlspecialchars($category->category_description) . '"';
} }
@ -372,7 +372,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
$before = '<li>'; $before = '<li>';
$after = '</li>'; $after = '</li>';
} }
echo $before . "No categories" . $after . "\n"; echo $before . __("No categories") . $after . "\n";
return; return;
} }
if ($list && $child_of && $num_found && $recurse) { if ($list && $child_of && $num_found && $recurse) {

View File

@ -48,27 +48,27 @@ function formHandler(form) {
function print_UrlPopNav() { function print_UrlPopNav() {
$sites = array( $sites = array(
array('http://www.acme.com/mapper/?lat='.get_Lat().'&amp;long='.get_Lon().'&amp;scale=11&amp;theme=Image&amp;width=3&amp;height=2&amp;dot=Yes', array('http://www.acme.com/mapper/?lat='.get_Lat().'&amp;long='.get_Lon().'&amp;scale=11&amp;theme=Image&amp;width=3&amp;height=2&amp;dot=Yes',
'Acme Mapper'), __('Acme Mapper')),
array('http://geourl.org/near/?lat='.get_Lat().'&amp;lon='.get_Lon().'&amp;dist=500', array('http://geourl.org/near/?lat='.get_Lat().'&amp;lon='.get_Lon().'&amp;dist=500',
'GeoURLs near here'), __('GeoURLs near here')),
array('http://www.geocaching.com/seek/nearest.aspx?origin_lat='.get_Lat().'&amp;origin_long='.get_Lon().'&amp;dist=5', array('http://www.geocaching.com/seek/nearest.aspx?origin_lat='.get_Lat().'&amp;origin_long='.get_Lon().'&amp;dist=5',
'Geocaches Near Nere'), __('Geocaches near here')),
array('http://www.mapquest.com/maps/map.adp?latlongtype=decimal&amp;latitude='.get_Lat().'&amp;longitude='.get_Lon(), array('http://www.mapquest.com/maps/map.adp?latlongtype=decimal&amp;latitude='.get_Lat().'&amp;longitude='.get_Lon(),
'Mapquest map of this spot'), __('Mapquest map of this spot')),
array('http://www.sidebit.com/ProjectGeoURLMap.php?lat='.get_Lat().'&amp;lon='.get_Lon(), array('http://www.sidebit.com/ProjectGeoURLMap.php?lat='.get_Lat().'&amp;lon='.get_Lon(),
'SideBit URL Map of this spot'), __('SideBit URL Map of this spot')),
array('http://confluence.org/confluence.php?lat='.get_Lat().'&amp;lon='.get_Lon(), array('http://confluence.org/confluence.php?lat='.get_Lat().'&amp;lon='.get_Lon(),
'Confluence.org near here'), __('Confluence.org near here')),
array('http://www.topozone.com/map.asp?lat='.get_Lat().'&amp;lon='.get_Lon(), array('http://www.topozone.com/map.asp?lat='.get_Lat().'&amp;lon='.get_Lon(),
'Topozone near here'), __('Topozone near here')),
array('http://www.findu.com/cgi-bin/near.cgi?lat='.get_Lat().'&amp;lon='.get_Lon(), array('http://www.findu.com/cgi-bin/near.cgi?lat='.get_Lat().'&amp;lon='.get_Lon(),
'FindU near here'), __('FindU near here')),
array('http://mapserver.maptech.com/api/espn/index.cfm?lat='.get_Lat().'&amp;lon='.get_Lon().'&amp;scale=100000&amp;zoom=50&amp;type=1&amp;icon=0&amp;&amp;scriptfile=http://mapserver.maptech.com/api/espn/index.cfm', array('http://mapserver.maptech.com/api/espn/index.cfm?lat='.get_Lat().'&amp;lon='.get_Lon().'&amp;scale=100000&amp;zoom=50&amp;type=1&amp;icon=0&amp;&amp;scriptfile=http://mapserver.maptech.com/api/espn/index.cfm',
'Maptech near here') __('Maptech near here'))
); );
echo '<form action=""><div> echo '<form action=""><div>
<select name="site" size="1" onchange="formHandler(this.form);" >'."\n"; <select name="site" size="1" onchange="formHandler(this.form);" >'."\n";
echo '<option value=".">Sites referencing '.get_Lat().' x '.get_Lon()."</option>\n"; echo '<option value=".">' . sprintf(__("Sites referencing %s x %s"), get_Lat(), get_Lon()) . "</option>\n";
foreach($sites as $site) { foreach($sites as $site) {
echo "\t".'<option value="'.$site[0].'">'.$site[1]."</option>\n"; echo "\t".'<option value="'.$site[0].'">'.$site[1]."</option>\n";
} }

View File

@ -17,8 +17,8 @@ add_filter('the_excerpt', 'wpautop');
function get_the_password_form() { function get_the_password_form() {
$output = '<form action="' . get_settings('siteurl') . '/wp-pass.php" method="post"> $output = '<form action="' . get_settings('siteurl') . '/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p> <p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
<p><label>Password: <input name="post_password" type="text" size="20" /></label> <input type="submit" name="Submit" value="Submit" /></p> <p><label>' . __("Password:") . ' <input name="post_password" type="text" size="20" /></label> <input type="submit" name="Submit" value="Submit" /></p>
</form> </form>
'; ';
return $output; return $output;
@ -182,7 +182,7 @@ function get_the_excerpt($fakeit = true) {
$output = stripslashes($post->post_excerpt); $output = stripslashes($post->post_excerpt);
if (!empty($post->post_password)) { // if there's a password if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
$output = 'There is no excerpt because this is a protected post.'; $output = __('There is no excerpt because this is a protected post.');
return $output; return $output;
} }
} }