Ticket #57: patch-rev491.diff
| File patch-rev491.diff, 10.7 KB (added by momo360modena, 2 years ago) |
|---|
-
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
10 10 $warnings = GP::$translation_warnings->check( $entry->singular, $entry->plural, $entry->translations, $locale ); 11 11 if ( $warnings != $entry->warnings ) { 12 12 $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"; 14 14 $translation->update( array('warnings' => $warnings) ); 15 15 } 16 16 } -
scripts/wporg2slug.php
18 18 } 19 19 } 20 20 if ( !$slug ) 21 $this->to_stderr( "No slug match for $wporg_slug.");21 $this->to_stderr( sprintf(__("No slug match for %s."), $wporg_slug) ); 22 22 else 23 23 echo $slug; 24 24 } -
scripts/import-originals.php
15 15 if ( !$project ) $this->error( __('Project not found!') ); 16 16 17 17 $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.') ); 19 19 20 20 $translations = $format->read_originals_from_file( $this->options['f'], $project ); 21 21 if ( !$translations ) { … … 23 23 } 24 24 25 25 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"; 27 27 } 28 28 } 29 29 -
scripts/export.php
12 12 function action_on_translation_set( $translation_set ) { 13 13 14 14 $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.') ); 16 16 17 17 $entries = GP::$translation->for_translation( $this->project, $translation_set, 'no-limit', gp_get( 'filters', array() ) ); 18 18 echo $format->print_exported_file( $this->project, $this->locale, $translation_set, $entries )."\n"; -
gp-templates/translation-row.php
148 148 $permalink = gp_url_project_locale( $project, $locale->slug, $translation_set->slug, 149 149 array_merge( array('filters[status]' => 'either', 'filters[original_id]' => $t->original_id ), $extra_args ) ); 150 150 ?> 151 <dt><a tabindex="-1" href="<?php echo $permalink; ?>" title=" Permanent link to this translation">∞</a></dt>151 <dt><a tabindex="-1" href="<?php echo $permalink; ?>" title="<?php _e('Permanent link to this translation'); ?>">∞</a></dt> 152 152 </dl> 153 153 </div> 154 154 <div class="actions"> -
gp-templates/project.php
16 16 <ul> 17 17 <?php foreach($sub_projects as $sub_project): ?> 18 18 <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 ); ?> 21 21 <?php gp_link_project_delete( $sub_project ); ?> 22 22 </li> 23 23 <?php endforeach; ?> 24 </ul> 24 </ul> 25 25 <?php endif; ?> 26 26 <?php if ( $translation_sets ): ?> 27 27 <?php _e('Translations:'); ?> 28 28 <ul class="translation-sets"> 29 <?php foreach( $translation_sets as $set ): ?> 29 <?php foreach( $translation_sets as $set ): ?> 30 30 <li> 31 31 <?php gp_link( gp_url_project( $project, gp_url_join( $set->locale, $set->slug ) ), $set->name_with_locale() ); ?> 32 32 <span class="stats secondary"> … … 66 66 <p> 67 67 <input type="submit" name="submit" value="<?php echo esc_attr(__('Save →')); ?>" id="save" /> 68 68 <a class="ternary" href="#" onclick="jQuery('#personal-options-toggle').click();return false;"><?php _e('Cancel'); ?></a> 69 </p> 69 </p> 70 70 </form> 71 71 </div> 72 72 </div> -
gp-templates/project-form.php
9 9 <small><?php _e('If you leave the slug empty, it will be derived from the name.'); ?></small> 10 10 </dd> 11 11 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> 13 13 <dd><textarea name="project[description]" rows="4" cols="40" id="project[description]"><?php echo esc_html( $project->description ); ?></textarea></dd> 14 14 15 15 <dt><label for="project[source_url_template]"><?php _e('Source file URL'); ?></label></dt> -
gp-templates/project-permissions.php
22 22 <li> 23 23 <span class="permission-action"><?php _e('user'); ?></span> 24 24 <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> 26 26 <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> 28 28 <span class="user"><?php echo esc_html( $permission->set_slug ); ?></span> 29 29 <a href="<?php echo gp_url_join( gp_url_current(), '-delete/'.$permission->id ); ?>" class="action delete"><?php _e('Remove'); ?></a> 30 30 </li> … … 38 38 <li> 39 39 <span class="permission-action"><?php _e('user'); ?></span> 40 40 <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> 42 42 <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> 44 44 <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> 46 46 <span class="user"><?php gp_link_project( $permission->project, esc_html( $permission->project->name ) ); ?></span> 47 47 </li> 48 48 <? endforeach; ?> -
gp-templates/project-mass-create-sets.php
11 11 gp_tmpl_header(); 12 12 ?> 13 13 <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> 17 15 <form action="<?php echo esc_url( gp_url_current() ); ?>" method="post"> 18 16 <dl> 19 17 <dt><label for="project_id"><?php _e('Project to take translation sets from:'); ?></label></dt> -
gp-templates/translation-set-form.php
12 12 <dt><label for="set[slug]"><?php _e('Slug'); ?></label></dt> 13 13 <dd><input type="text" name="set[slug]" value="<?php echo esc_html( $set->slug? $set->slug : 'default' ); ?>" id="set[slug]"></dd> 14 14 15 <dt><label for="set[project_id]"><?php _e('Project'); ?></label></dt>15 <dt><label for="set[project_id]"><?php _e('Project'); ?></label></dt> 16 16 <dd><?php echo gp_projects_dropdown( 'set[project_id]', $set->project_id ); ?></dd> 17 17 </dl> 18 18 <?php echo gp_js_focus_on( 'set[locale]' ); ?> -
pomo/po.php
254 254 return false; 255 255 } 256 256 // add comment 257 $this->add_comment_to_entry($entry, $line); ;257 $this->add_comment_to_entry($entry, $line); 258 258 } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { 259 259 if ($is_final($context)) { 260 260 PO::read_line($f, 'put-back'); -
gp-includes/routes/translation.php
18 18 $this->can_or_redirect( 'approve', 'translation-set', $translation_set->id ); 19 19 20 20 $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.') ); 22 22 23 23 if ( !is_uploaded_file( $_FILES['import-file']['tmp_name'] ) ) { 24 24 $this->redirect_with_error( __('Error uploading the file.') );
