b2evolution PHP Cross Reference Blogging Systems

Source: /inc/locales/views/_translation_new.view.php - 62 lines - 1605 bytes - Summary - Text - Print

Description: This file implements the UI view for the translation editor. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**

   3   * This file implements the UI view for the translation editor.

   4   *

   5   * This file is part of the evoCore framework - {@link http://evocore.net/}

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}

   9   *

  10   * @package admin

  11   *

  12   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  13   * @author fplanque: Francois PLANQUE.

  14   *

  15   * @version $Id: _translation_new.view.php 985 2012-03-05 21:59:17Z yura $

  16   */
  17  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  18  
  19  
  20  /**

  21   * @var User

  22   */
  23  global $current_User;
  24  
  25  global $edit_locale;
  26  
  27  // Create query

  28  $SQL = new SQL();
  29  $SQL->SELECT( 'iost_ID, iost_string' );
  30  $SQL->FROM( 'T_i18n_original_string' );
  31  $SQL->ORDER_BY( '*, iost_string' );
  32  
  33  
  34  // Create result set:

  35  $Results = new Results( $SQL->get(), 'iost_', 'A' );
  36  
  37  $Results->title = sprintf( T_('Translation editor for locale "%s"'), $edit_locale );
  38  
  39  $Results->cols[] = array(
  40          'th' => T_('Original string'),
  41          'order' => 'iost_string',
  42          'td' => '%htmlspecialchars( #iost_string# )%',
  43      );
  44  
  45  function iost_td_actions( $translated_string_ID )
  46  {
  47      $r = action_icon( T_('Translate this string...'), 'add',
  48                                          regenerate_url( 'action', 'iost_ID='.$translated_string_ID.'&amp;action=new' ) );
  49  
  50      return $r;
  51  }
  52  
  53  $Results->cols[] = array(
  54          'th' => T_('Actions'),
  55          'td' => '%iost_td_actions( #iost_ID# )%',
  56          'th_class' => 'shrinkwrap',
  57          'td_class' => 'shrinkwrap'
  58      );
  59  
  60  $Results->display();
  61  
  62  ?>

title

Description

title

Description

title

Description

title

title

Body