WordPress.org

GlotPress

Changeset 728


Ignore:
Timestamp:
10/31/12 22:10:11 (18 months ago)
Author:
westi
Message:

Improve the display of export format names in the UI. See #225 props fmestrone.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/gp-includes/formats/format_android.php

    r718 r728  
    33class GP_Format_Android { 
    44 
     5    var $name = 'Android XML (.xml)'; 
    56    var $extension = 'xml'; 
    67 
  • trunk/gp-includes/formats/format_pomo.php

    r718 r728  
    33class GP_Format_PO { 
    44 
     5    var $name = 'Portable Object Message Catalog (.po)'; 
    56    var $extension = 'po'; 
    67    var $class = 'PO'; 
     
    4546 
    4647class GP_Format_MO extends GP_Format_PO { 
     48    var $name = 'Machine Object Message Catalog (.mo)'; 
    4749    var $extension = 'mo'; 
    4850    var $class = 'MO'; 
  • trunk/gp-includes/formats/format_resx.php

    r718 r728  
    33class GP_Format_ResX { 
    44 
     5    var $name = '.NET Resource (.resx)'; 
    56    var $extension = 'resx.xml'; 
    67 
  • trunk/gp-includes/formats/format_rrc.php

    r718 r728  
    33class GP_Format_RRC { 
    44 
     5    var $name = 'Blackberry Resource (.rrc)'; 
    56    var $extension = 'rrc'; 
    67 
  • trunk/gp-includes/formats/format_strings.php

    r718 r728  
    33class GP_Format_Strings { 
    44 
     5    var $name = 'Mac OS X / iOS Strings File (.strings)'; 
    56    var $extension = 'strings'; 
    67 
  • trunk/gp-templates/project-import.php

    r556 r728  
    1212    <dd><input type="file" name="import-file" id="import-file" /></dd> 
    1313<?php 
    14     $format_slugs = array_keys( GP::$formats ); 
    15     $format_dropdown = gp_select( 'format', array_combine( $format_slugs, $format_slugs ), 'po' ); 
     14    $format_options = array(); 
     15    foreach ( GP::$formats as $slug => $format ) { 
     16        $format_options[$slug] = $format->name; 
     17    } 
     18    $format_dropdown = gp_select( 'format', $format_options, 'po' ); 
    1619?> 
    1720    <dt><label  for="format"><?php _e('Format:'); ?></label></dt> 
  • trunk/gp-templates/translations.php

    r718 r728  
    172172        $export_url = gp_url_project( $project, array( $locale->slug, $translation_set->slug, 'export-translations' ) ); 
    173173        $export_link = gp_link_get( $export_url , __('Export'), array('id' => 'export', 'filters' => add_query_arg( array( 'filters' => $filters ), $export_url ) ) ); 
    174         $format_slugs = array_keys( GP::$formats ); 
     174        $format_options = array(); 
     175        foreach ( GP::$formats as $slug => $format ) { 
     176            $format_options[$slug] = $format->name; 
     177        } 
    175178        $what_dropdown = gp_select( 'what-to-export', array('all' => _x('all current', 'export choice'), 'filtered' => _x('only matching the filter', 'export choice')), 'all' ); 
    176         $format_dropdown = gp_select( 'export-format', array_combine( $format_slugs, $format_slugs ), 'po' ); 
     179        $format_dropdown = gp_select( 'export-format', $format_options, 'po' ); 
    177180        /* translators: 1: export 2: what to export dropdown (all/filtered) 3: export format */ 
    178181        $footer_links[] = sprintf( __('%1$s %2$s as %3$s'), $export_link, $what_dropdown, $format_dropdown ); 
Note: See TracChangeset for help on using the changeset viewer.