<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[GlotPress][755] trunk: Add missing translatable strings with ability to change the language.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://glotpress.trac.wordpress.org/changeset/755">755</a></dd>
<dt>Author</dt> <dd>markoheijnen</dd>
<dt>Date</dt> <dd>2013-05-01 22:16:38 +0000 (Wed, 01 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add missing translatable strings with ability to change the language. Props atrax. Fixes <a href="http://glotpress.trac.wordpress.org/ticket/137">#137</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkgpincludesassetsloaderphp">trunk/gp-includes/assets-loader.php</a></li>
<li><a href="#trunkgpincludestemplatephp">trunk/gp-includes/template.php</a></li>
<li><a href="#trunkgpsettingsphp">trunk/gp-settings.php</a></li>
<li><a href="#trunkgptemplateshelperfunctionsphp">trunk/gp-templates/helper-functions.php</a></li>
<li><a href="#trunkgptemplatesloginphp">trunk/gp-templates/login.php</a></li>
<li><a href="#trunkgptemplatesprojecteditphp">trunk/gp-templates/project-edit.php</a></li>
<li><a href="#trunkgptemplatesprojectnewphp">trunk/gp-templates/project-new.php</a></li>
<li><a href="#trunkgptemplatesprojectphp">trunk/gp-templates/project.php</a></li>
<li><a href="#trunkgptemplatestranslationrowphp">trunk/gp-templates/translation-row.php</a></li>
<li><a href="#trunkgptemplatestranslationsetnewphp">trunk/gp-templates/translation-set-new.php</a></li>
<li><a href="#trunkgptemplatestranslationsphp">trunk/gp-templates/translations.php</a></li>
<li><a href="#trunkjstranslationspagejs">trunk/js/translations-page.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkgpincludesassetsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/assets-loader.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/assets-loader.php      2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-includes/assets-loader.php 2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">  $scripts->base_url = gp_url_base( 'js' );
</span><span class="cx">  $scripts->default_version = gp_get_option( 'version' );
</span><span class="cx"> 
</span><del>-       $bump = '20120716';
</del><ins>+        $bump = '20130501';
</ins><span class="cx"> 
</span><span class="cx">  $scripts->add( 'jquery', '/jquery/jquery.js', array(), '1.7.2' );
</span><span class="cx">  $scripts->add( 'jquery-ui', '/jquery/jquery-ui.js', array('jquery'), '1.8.18' );
</span></span></pre></div>
<a id="trunkgpincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/gp-includes/template.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-includes/template.php   2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-includes/template.php      2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> function gp_project_links_from_root( $leaf_project ) {
</span><span class="cx">  $links = array();
</span><span class="cx">  $path_from_root = array_reverse( $leaf_project->path_to_root() );
</span><del>-       $links[] = empty( $path_from_root)? 'Projects' : gp_link_get( gp_url( '/projects' ), 'Projects' );
</del><ins>+        $links[] = empty( $path_from_root)? __('Projects') : gp_link_get( gp_url( '/projects' ), __('Projects') );
</ins><span class="cx">   foreach( $path_from_root as $project ) {
</span><span class="cx">          $links[] = gp_link_project_get( $project, esc_html( $project->name ) );
</span><span class="cx">  }
</span></span></pre></div>
<a id="trunkgpsettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-settings.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-settings.php    2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-settings.php       2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -223,6 +223,9 @@
</span><span class="cx"> 
</span><span class="cx"> require_once( GP_LOCALES_PATH . 'locales.php' );
</span><span class="cx"> 
</span><ins>+if ( defined('GP_LANG') )
+       load_default_textdomain();
+
</ins><span class="cx"> // Users and authentication
</span><span class="cx"> if ( !class_exists( 'WP_Users' ) ) {
</span><span class="cx">  require_once( BACKPRESS_PATH . 'class.wp-users.php' );
</span></span></pre></div>
<a id="trunkgptemplateshelperfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/helper-functions.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/helper-functions.php  2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/helper-functions.php     2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx"> function display_status( $status ) {
</span><span class="cx">  $status = preg_replace( '/^[+-]/', '', $status);
</span><del>-       return $status ? $status : 'untranslated';
</del><ins>+        return $status ? $status : __('untranslated');
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function references( $project, $entry ) {
</span></span></pre></div>
<a id="trunkgptemplatesloginphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/login.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/login.php     2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/login.php        2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> ) );
</span><span class="cx"> gp_tmpl_header();
</span><span class="cx"> ?>
</span><del>-       <h2>Login</h2>
</del><ins>+        <h2><? _e('Login'); ?></h2>
</ins><span class="cx">   <?php do_action( 'before_login_form' ); ?>
</span><span class="cx">  <form action="<?php echo gp_url_ssl( gp_url_current() ); ?>" method="post">
</span><span class="cx">  <dl>
</span></span></pre></div>
<a id="trunkgptemplatesprojecteditphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/project-edit.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/project-edit.php      2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/project-edit.php 2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> <?php gp_tmpl_load( 'project-form', get_defined_vars()); ?>
</span><span class="cx">  <p>
</span><span class="cx">          <input type="submit" name="submit" value="<?php echo esc_attr( __('Save') ); ?>" id="submit" />
</span><del>-               <span class="or-cancel">or <a href="javascript:history.back();">Cancel</a></span>
</del><ins>+                <span class="or-cancel"><?php _e('or'); ?> <a href="javascript:history.back();"><?php _e('Cancel'); ?></a></span>
</ins><span class="cx">   </p>
</span><span class="cx"> </form>
</span><span class="cx"> <?php gp_tmpl_footer();
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgptemplatesprojectnewphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/project-new.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/project-new.php       2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/project-new.php  2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> <?php gp_tmpl_load( 'project-form', get_defined_vars()); ?>
</span><span class="cx">  <p>
</span><span class="cx">          <input type="submit" name="submit" value="<?php echo esc_attr( __('Create') ); ?>" id="submit" />
</span><del>-               <span class="or-cancel">or <a href="javascript:history.back();">Cancel</a></span>
</del><ins>+                <span class="or-cancel"><?php _e('or'); ?> <a href="javascript:history.back();"><?php _e('Cancel'); ?></a></span>
</ins><span class="cx">   </p>
</span><span class="cx"> </form>
</span><span class="cx"> <?php gp_tmpl_footer();
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgptemplatesprojectphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/project.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/project.php   2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/project.php      2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -2,9 +2,9 @@
</span><span class="cx"> gp_title( sprintf( __('%s &lt; GlotPress'), esc_html( $project->name ) ) );
</span><span class="cx"> gp_breadcrumb_project( $project );
</span><span class="cx"> wp_enqueue_script( 'common' );
</span><del>-$edit_link = gp_link_project_edit_get( $project, '(edit)' );
</del><ins>+$edit_link = gp_link_project_edit_get( $project, __('(edit)') );
</ins><span class="cx"> $parity = gp_parity_factory();
</span><del>-if ( $project->active ) add_filter( 'gp_breadcrumb', lambda( '$s', '$s . "<span class=\\"active bubble\\">Active</span>"' ) );
</del><ins>+if ( $project->active ) add_filter( 'gp_breadcrumb', lambda( '$s', '$s . "<span class=\\"active bubble\\">' . __('Active') . '</span>"' ) );
</ins><span class="cx"> gp_tmpl_header();
</span><span class="cx"> ?>
</span><span class="cx"> <h2><?php echo esc_html( $project->name ); ?> <?php echo $edit_link; ?></h2>
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">  <dt>
</span><span class="cx">          <?php gp_link_project( $sub_project, esc_html( $sub_project->name ) ); ?>
</span><span class="cx">          <?php gp_link_project_edit( $sub_project, null, array( 'class' => 'bubble' ) ); ?>
</span><del>-               <?php if ( $sub_project->active ) echo "<span class='active bubble'>Active</span>"; ?>
</del><ins>+                <?php if ( $sub_project->active ) echo "<span class='active bubble'>" . __('Active') . "</span>"; ?>
</ins><span class="cx">   </dt>
</span><span class="cx">  <dd>
</span><span class="cx">          <?php echo esc_html( gp_html_excerpt( $sub_project->description, 111 ) ); ?>
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> 
</span><span class="cx"> <?php if ( $translation_sets ): ?>
</span><span class="cx"> <div id="translation-sets">
</span><del>-       <h3>Translations</h3>
</del><ins>+        <h3><? _e('Translations');?></h3>
</ins><span class="cx">   <table class="translation-sets">
</span><span class="cx">          <thead>
</span><span class="cx">                  <tr>
</span><span class="lines">@@ -116,15 +116,15 @@
</span><span class="cx"> 
</span><span class="cx"> <script type="text/javascript" charset="utf-8">
</span><span class="cx">  $gp.showhide('a.personal-options', 'div.personal-options', {
</span><del>-               show_text: 'Personal project options &darr;',
-               hide_text: 'Personal project options &uarr;',
</del><ins>+                show_text: '<?php _e('Personal project options &darr;'); ?>',
+               hide_text: '<?php _e('Personal project options &uarr;'); ?>',
</ins><span class="cx">           focus: '#source-url-template',
</span><span class="cx">          group: 'personal'
</span><span class="cx">  });
</span><span class="cx">  $('div.personal-options').hide();
</span><span class="cx">  $gp.showhide('a.project-actions', 'div.project-actions', {
</span><del>-               show_text: 'Project actions &darr;',
-               hide_text: 'Project actions &uarr;',
</del><ins>+                show_text: '<?php _e('Project actions &darr;'); ?>',
+               hide_text: '<?php _e('Project actions &uarr;'); ?>',
</ins><span class="cx">           focus: '#source-url-template',
</span><span class="cx">          group: 'project'
</span><span class="cx">  });
</span></span></pre></div>
<a id="trunkgptemplatestranslationrowphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/translation-row.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/translation-row.php   2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/translation-row.php      2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx">          array_merge( array('filters[status]' => 'either', 'filters[original_id]' => $t->original_id, 'sort[by]' => 'translation_date_added', 'sort[how]' => 'asc' ) ) );
</span><span class="cx"> 
</span><span class="cx"> ?>
</span><del>-                           <dt>More links:
</del><ins>+                            <dt><?php _e('More links:'); ?>
</ins><span class="cx">                           <ul>
</span><span class="cx">                                  <li><a tabindex="-1" href="<?php echo $permalink; ?>" title="<?php _e('Permanent link to this translation'); ?>"><?php _e('Permalink to this translation'); ?></a></li>
</span><span class="cx">                                  <li><a tabindex="-1" href="<?php echo $original_history; ?>" title="<?php _e('Link to the history of translations of this original'); ?>"><?php _e('All translations of this original'); ?></a></li>
</span></span></pre></div>
<a id="trunkgptemplatestranslationsetnewphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/translation-set-new.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/translation-set-new.php       2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/translation-set-new.php  2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> <?php gp_tmpl_load( 'translation-set-form', get_defined_vars()); ?>
</span><span class="cx">  <p>
</span><span class="cx">          <input type="submit" name="submit" value="<?php echo esc_attr( __('Create') ); ?>" id="submit" />
</span><del>-               <span class="or-cancel">or <a href="javascript:history.back();">Cancel</a></span>
</del><ins>+                <span class="or-cancel"><?php _e('or'); ?> <a href="javascript:history.back();"><?php _e('Cancel'); ?></a></span>
</ins><span class="cx">   </p>
</span><span class="cx"> </form>
</span><span class="cx"> <?php gp_tmpl_footer();
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkgptemplatestranslationsphp"></a>
<div class="modfile"><h4>Modified: trunk/gp-templates/translations.php (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/gp-templates/translations.php      2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/gp-templates/translations.php 2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -6,6 +6,8 @@
</span><span class="cx"> ) );
</span><span class="cx"> wp_enqueue_script( 'editor' );
</span><span class="cx"> wp_enqueue_script( 'translations-page' );
</span><ins>+wp_localize_script( 'translations-page', '$gp_translations_options', array( 'sort' => __('Sort'), 'filter' => __('Filter') ) );
+
</ins><span class="cx"> // localizer adds var in front of the variable name, so we can't use $gp.editor.options
</span><span class="cx"> $editor_options = compact('can_approve', 'can_write', 'url', 'discard_warning_url', 'set_priority_url', 'set_status_url');
</span><span class="cx"> $editor_options['google_translate_language'] = $locale->google_code;
</span><span class="lines">@@ -17,17 +19,17 @@
</span><span class="cx"> $i = 0;
</span><span class="cx"> ?>
</span><span class="cx"> <h2>
</span><del>-       Translation of <?php echo esc_html( $project->name ); ?>: <?php echo esc_html( $translation_set->name ); ?>
-       <?php gp_link_set_edit( $translation_set, $project, '(edit)' ); ?>
</del><ins>+        <?php printf( __("Translation of %s"), esc_html( $project->name )); ?>: <?php echo esc_html( $translation_set->name ); ?>
+       <?php gp_link_set_edit( $translation_set, $project, __('(edit)') ); ?>
</ins><span class="cx"> </h2>
</span><span class="cx"> <?php if ( $can_approve ): ?>
</span><span class="cx"> <form id="bulk-actions-toolbar" class="filters-toolbar bulk-actions" action="<?php echo $bulk_action; ?>" method="post">
</span><span class="cx">  <div>
</span><span class="cx">  <select name="bulk[action]">
</span><del>-               <option value="" selected="selected">Bulk Actions</option>
-               <option value="approve">Approve</option>
-               <option value="reject">Reject</option>
-               <option value="gtranslate">Translate via Google</option>
</del><ins>+                <option value="" selected="selected"><?php _e('Bulk Actions'); ?></option>
+               <option value="approve"><?php _e('Approve'); ?></option>
+               <option value="reject"><?php _e('Reject'); ?></option>
+               <option value="gtranslate"><?php _e('Translate via Google'); ?></option>
</ins><span class="cx">   </select>
</span><span class="cx">  <input type="hidden" name="bulk[redirect_to]" value="<?php echo esc_attr(gp_url_current()); ?>" id="bulk[redirect_to]" />
</span><span class="cx">  <input type="hidden" name="bulk[row-ids]" value="" id="bulk[row-ids]" />
</span></span></pre></div>
<a id="trunkjstranslationspagejs"></a>
<div class="modfile"><h4>Modified: trunk/js/translations-page.js (754 => 755)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/js/translations-page.js    2013-05-01 21:22:44 UTC (rev 754)
+++ trunk/js/translations-page.js       2013-05-01 22:16:38 UTC (rev 755)
</span><span class="lines">@@ -1,12 +1,12 @@
</span><span class="cx"> jQuery(function($) {
</span><span class="cx">  $gp.showhide('#upper-filters-toolbar a.sort', '#upper-filters-toolbar dl.sort', {
</span><del>-               show_text: 'Sort &darr;',
-               hide_text: 'Sort &uarr;', 
</del><ins>+                show_text: $gp_translations_options.sort + ' &darr;',
+               hide_text: $gp_translations_options.sort + ' &uarr;', 
</ins><span class="cx">           focus: '#sort\\[by\\]'
</span><span class="cx">  });
</span><span class="cx">  $gp.showhide('#upper-filters-toolbar a.filter', '#upper-filters-toolbar dl.filters', {
</span><del>-               show_text: 'Filter &darr;',
-               hide_text: 'Filter &uarr;',
</del><ins>+                show_text: $gp_translations_options.filter + ' &darr;',
+               hide_text: $gp_translations_options.filter + ' &uarr;',
</ins><span class="cx">           focus: '#filters\\[term\\]'
</span><span class="cx">  });
</span><span class="cx">  
</span></span></pre>
</div>
</div>

</body>
</html>