Ticket #187: translations.php.diff

File translations.php.diff, 2.2 KB (added by vanillalounge, 14 months ago)
  • trunk/gp-templates/translations.php

     
    170170                if ( $can_approve ) { 
    171171                        $footer_links[] = gp_link_get( gp_url_project( $project, array( $locale->slug, $translation_set->slug, 'import-translations' ) ), __('Import translations') ); 
    172172                } 
    173                 if ( GP::$user->logged_in() ) { 
    174                         $export_url = gp_url_project( $project, array( $locale->slug, $translation_set->slug, 'export-translations' ) ); 
    175                         $export_link = gp_link_get( $export_url , __('Export'), array('id' => 'export', 'filters' => add_query_arg( array( 'filters' => $filters ), $export_url ) ) ); 
    176                         $format_slugs = array_keys( GP::$formats ); 
    177                         $what_dropdown = gp_select( 'what-to-export', array('all' => _x('all current', 'export choice'), 'filtered' => _x('only matching the filter', 'export choice')), 'all' ); 
    178                         $format_dropdown = gp_select( 'export-format', array_combine( $format_slugs, $format_slugs ), 'po' ); 
    179                         /* translators: 1: export 2: what to export dropdown (all/filtered) 3: export format */ 
    180                         $footer_links[] = sprintf( __('%1$s %2$s as %3$s'), $export_link, $what_dropdown, $format_dropdown ); 
    181                 } 
     173                $export_url = gp_url_project( $project, array( $locale->slug, $translation_set->slug, 'export-translations' ) ); 
     174                $export_link = gp_link_get( $export_url , __('Export'), array('id' => 'export', 'filters' => add_query_arg( array( 'filters' => $filters ), $export_url ) ) ); 
     175                $format_slugs = array_keys( GP::$formats ); 
     176                $what_dropdown = gp_select( 'what-to-export', array('all' => _x('all current', 'export choice'), 'filtered' => _x('only matching the filter', 'export choice')), 'all' ); 
     177                $format_dropdown = gp_select( 'export-format', array_combine( $format_slugs, $format_slugs ), 'po' ); 
     178                /* translators: 1: export 2: what to export dropdown (all/filtered) 3: export format */ 
     179                $footer_links[] = sprintf( __('%1$s %2$s as %3$s'), $export_link, $what_dropdown, $format_dropdown ); 
    182180                 
    183181                echo implode( ' • ', apply_filters( 'translations_footer_links', $footer_links, $project, $locale, $translation_set ) ); 
    184182        ?>