Ticket #57: patch-rev491.diff

File patch-rev491.diff, 10.7 KB (added by momo360modena, 2 years ago)

Patch for revision 491

  • scripts/recheck-warnings.php

    Modification de propriétés sur .
    ___________________________________________________________________
    Modifié : svn:ignore
       - gp-config.php
    db-settings.php
    .htaccess
    glotpress.tmproj
    
       + gp-config.php
    db-settings.php
    .htaccess
    glotpress.tmproj
    languages
    diff
    
    
     
    1010                        $warnings = GP::$translation_warnings->check( $entry->singular, $entry->plural, $entry->translations, $locale ); 
    1111                        if ( $warnings != $entry->warnings ) { 
    1212                                $translation = new GP_Translation( array('id' => $entry->id) ); 
    13                                 echo sprintf( __("Updating warnings for %s"), $entry->id ) . "\n"; 
     13                                printf( __("Updating warnings for %s"), $entry->id ) . "\n"; 
    1414                                $translation->update( array('warnings' => $warnings) ); 
    1515                        } 
    1616                } 
  • scripts/wporg2slug.php

     
    1818                        } 
    1919                } 
    2020                if ( !$slug ) 
    21                         $this->to_stderr("No slug match for $wporg_slug."); 
     21                        $this->to_stderr( sprintf(__("No slug match for %s."), $wporg_slug) ); 
    2222                else 
    2323                        echo $slug; 
    2424        } 
  • scripts/import-originals.php

     
    1515                if ( !$project ) $this->error( __('Project not found!') ); 
    1616 
    1717                $format = gp_array_get( GP::$formats, isset( $this->options['o'] )? $this->options['o'] : 'po', null ); 
    18                 if ( !$format ) $this->error( __('No such format.') );; 
     18                if ( !$format ) $this->error( __('No such format.') ); 
    1919 
    2020                $translations = $format->read_originals_from_file( $this->options['f'], $project ); 
    2121                if ( !$translations ) { 
     
    2323                } 
    2424 
    2525                list( $originals_added, $originals_existing ) = GP::$original->import_for_project( $project, $translations ); 
    26                 echo sprintf( __("%s new strings were added, %s existing were updated."), $originals_added, $originals_existing )."\n"; 
     26                printf( __("%s new strings were added, %s existing were updated."), $originals_added, $originals_existing )."\n"; 
    2727        } 
    2828} 
    2929 
  • scripts/export.php

     
    1212        function action_on_translation_set( $translation_set ) { 
    1313 
    1414                $format = gp_array_get( GP::$formats, isset( $this->options['o'] )? $this->options['o'] : 'po', null ); 
    15                 if ( !$format ) $this->error( __('No such format.') );; 
     15                if ( !$format ) $this->error( __('No such format.') ); 
    1616                 
    1717                $entries = GP::$translation->for_translation( $this->project, $translation_set, 'no-limit', gp_get( 'filters', array() ) ); 
    1818                echo $format->print_exported_file( $this->project, $this->locale, $translation_set, $entries )."\n"; 
  • gp-templates/translation-row.php

     
    148148    $permalink = gp_url_project_locale( $project, $locale->slug, $translation_set->slug, 
    149149        array_merge( array('filters[status]' => 'either', 'filters[original_id]' => $t->original_id ), $extra_args ) ); 
    150150?> 
    151                             <dt><a tabindex="-1" href="<?php echo $permalink; ?>" title="Permanent link to this translation">&infin;</a></dt> 
     151                            <dt><a tabindex="-1" href="<?php echo $permalink; ?>" title="<?php _e('Permanent link to this translation'); ?>">&infin;</a></dt> 
    152152                        </dl> 
    153153                </div> 
    154154                <div class="actions"> 
  • gp-templates/project.php

     
    1616<ul> 
    1717<?php foreach($sub_projects as $sub_project): ?> 
    1818        <li> 
    19                 <?php gp_link_project( $sub_project, esc_html( $sub_project->name )); ?>                         
    20                 <?php gp_link_project_edit( $sub_project ); ?>                   
     19                <?php gp_link_project( $sub_project, esc_html( $sub_project->name )); ?> 
     20                <?php gp_link_project_edit( $sub_project ); ?> 
    2121                <?php gp_link_project_delete( $sub_project ); ?> 
    2222        </li> 
    2323<?php endforeach; ?> 
    24 </ul>    
     24</ul> 
    2525<?php endif; ?> 
    2626<?php if ( $translation_sets ): ?> 
    2727        <?php _e('Translations:'); ?> 
    2828        <ul class="translation-sets"> 
    29         <?php foreach( $translation_sets as $set ): ?>     
     29        <?php foreach( $translation_sets as $set ): ?> 
    3030                <li> 
    3131                        <?php gp_link( gp_url_project( $project, gp_url_join( $set->locale, $set->slug ) ), $set->name_with_locale() ); ?> 
    3232                        <span class="stats secondary"> 
     
    6666                <p> 
    6767                        <input type="submit" name="submit" value="<?php echo esc_attr(__('Save &rarr;')); ?>" id="save" /> 
    6868                        <a class="ternary" href="#" onclick="jQuery('#personal-options-toggle').click();return false;"><?php _e('Cancel'); ?></a> 
    69                 </p>             
     69                </p> 
    7070                </form> 
    7171        </div> 
    7272        </div> 
  • gp-templates/project-form.php

     
    99                <small><?php _e('If you leave the slug empty, it will be derived from the name.'); ?></small> 
    1010        </dd>    
    1111 
    12         <dt><label for="project[description]"><?php _e('Description');  ?></label> <span class="ternary">can include HTML</span></dt> 
     12        <dt><label for="project[description]"><?php _e('Description');  ?></label> <span class="ternary"><?php _e('can include HTML'); ?></span></dt> 
    1313        <dd><textarea name="project[description]" rows="4" cols="40" id="project[description]"><?php echo esc_html( $project->description ); ?></textarea></dd> 
    1414 
    1515        <dt><label for="project[source_url_template]"><?php _e('Source file URL');  ?></label></dt> 
  • gp-templates/project-permissions.php

     
    2222                <li> 
    2323                        <span class="permission-action"><?php _e('user'); ?></span> 
    2424                        <span class="user"><?php echo esc_html( $permission->user->user_login ); ?></span> 
    25                         <span class="permission-action">can <?php echo esc_html( $permission->action ); ?> strings with locale</span> 
     25                        <span class="permission-action"><?php printf( __('can %s strings with locale'), esc_html( $permission->action ) ); ?></span> 
    2626                        <span class="user"><?php echo esc_html( $permission->locale_slug ); ?></span> 
    27                         <span class="permission-action">and slug</span> 
     27                        <span class="permission-action"><?php _e('and slug'); ?></span> 
    2828                        <span class="user"><?php echo esc_html( $permission->set_slug ); ?></span> 
    2929                        <a href="<?php echo gp_url_join( gp_url_current(), '-delete/'.$permission->id ); ?>" class="action delete"><?php _e('Remove'); ?></a> 
    3030                </li> 
     
    3838                        <li> 
    3939                                <span class="permission-action"><?php _e('user'); ?></span> 
    4040                                <span class="user"><?php echo esc_html( $permission->user->user_login ); ?></span> 
    41                                 <span class="permission-action">can <?php echo esc_html( $permission->action ); ?> strings with locale</span> 
     41                                <span class="permission-action"><?php printf(__('can %s strings with locale'), esc_html( $permission->action )); ?></span> 
    4242                                <span class="user"><?php echo esc_html( $permission->locale_slug ); ?></span> 
    43                                 <span class="permission-action">and slug</span> 
     43                                <span class="permission-action"><?php _e('and slug'); ?></span> 
    4444                                <span class="user"><?php echo esc_html( $permission->set_slug ); ?></span> 
    45                                 <span class="permission-action">in the project </span> 
     45                                <span class="permission-action"><?php _e('in the project'); ?> </span> 
    4646                                <span class="user"><?php gp_link_project( $permission->project, esc_html( $permission->project->name ) ); ?></span> 
    4747                        </li> 
    4848                <? endforeach; ?> 
  • gp-templates/project-mass-create-sets.php

     
    1111gp_tmpl_header(); 
    1212?> 
    1313<h2><?php _e( sprintf( __('Mass-create Project Sets in <q>%s</q>'), esc_html( $project->name ) ) ); ?></h2> 
    14 <p><?php _e('Here you can mass-create translation sets in this project. 
    15 The list of translation sets will be mirrored with the sets of a project you choose. 
    16 Usually this is one of the parent projects.'); ?></p> 
     14<p><?php _e('Here you can mass-create translation sets in this project. The list of translation sets will be mirrored with the sets of a project you choose. Usually this is one of the parent projects.'); ?></p> 
    1715<form action="<?php echo esc_url( gp_url_current() ); ?>" method="post"> 
    1816        <dl> 
    1917                <dt><label for="project_id"><?php _e('Project to take translation sets from:');  ?></label></dt> 
  • gp-templates/translation-set-form.php

     
    1212        <dt><label for="set[slug]"><?php _e('Slug');  ?></label></dt> 
    1313        <dd><input type="text" name="set[slug]" value="<?php echo esc_html( $set->slug? $set->slug : 'default' ); ?>" id="set[slug]"></dd> 
    1414 
    15         <dt><label for="set[project_id]"><?php _e('Project');  ?></label></dt> 
     15        <dt><label for="set[project_id]"><?php _e('Project'); ?></label></dt> 
    1616        <dd><?php echo gp_projects_dropdown( 'set[project_id]', $set->project_id ); ?></dd> 
    1717</dl> 
    1818<?php echo gp_js_focus_on( 'set[locale]' ); ?> 
  • pomo/po.php

     
    254254                                        return false; 
    255255                                } 
    256256                                // add comment 
    257                                 $this->add_comment_to_entry($entry, $line);; 
     257                                $this->add_comment_to_entry($entry, $line); 
    258258                        } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { 
    259259                                if ($is_final($context)) { 
    260260                                        PO::read_line($f, 'put-back'); 
  • gp-includes/routes/translation.php

     
    1818                $this->can_or_redirect( 'approve', 'translation-set', $translation_set->id ); 
    1919 
    2020                $format = gp_array_get( GP::$formats, gp_post( 'format', 'po' ), null ); 
    21                 if ( !$format ) $this->redirect_with_error( __('No such format.') );; 
     21                if ( !$format ) $this->redirect_with_error( __('No such format.') ); 
    2222 
    2323                if ( !is_uploaded_file( $_FILES['import-file']['tmp_name'] ) ) { 
    2424                        $this->redirect_with_error( __('Error uploading the file.') );