http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74032

Revision: 74032
Author:   awjrichards
Date:     2010-09-30 18:35:38 +0000 (Thu, 30 Sep 2010)

Log Message:
-----------
Added select country translations to i18n file for german (will eventually 
transition to using CLDR country translations, but needed to push this out for 
de.wikipedia.org today); CC form now alpha sorts country list based on wfmsg 
country names

Modified Paths:
--------------
    trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php

Modified: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
===================================================================
--- trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php        
2010-09-30 18:18:56 UTC (rev 74031)
+++ trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php        
2010-09-30 18:35:38 UTC (rev 74032)
@@ -113,11 +113,20 @@
         */
        public function generateCountryDropdown() {
                $country_options = '';
+
+               // create a new array of countries with potentially translated 
country names for alphabetizing later
+               foreach ( $this->getCountries() as $iso_value => $full_name ) {
+                       $countries[ $iso_value ] = wfMsg( 
'payflowpro_gateway-country-dropdown-' . $iso_value );
+               }
                
+               // alphabetically sort the country names
+               // @fixme we should probably set locale and do a locale string 
sort
+               asort( $countries, SORT_STRING );
+               
                // generate a dropdown option for each country
-               foreach ( $this->getCountries() as $iso_value => $full_name ) {
+               foreach ( $countries as $iso_value => $full_name ) {
                        $selected = ( $iso_value == $this->form_data[ 'country' 
] ) ? true : false;
-                       $country_options .= Xml::option( wfMsg( 
'payflowpro_gateway-country-dropdown-' . $iso_value ), $iso_value, $selected );
+                       $country_options .= Xml::option( $full_name, 
$iso_value, $selected );
                }
 
                // build the actual select

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php
   2010-09-30 18:18:56 UTC (rev 74031)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php
   2010-09-30 18:35:38 UTC (rev 74032)
@@ -1591,6 +1591,26 @@
        'payflowpro_gateway-token-mismatch' => 'Deine Sitzung ist inzwischen 
abgelaufen. Bitte fülle das Formular erneut aus und sende es nochmals ab.',
        'payflowpro_gateway-cc-form-header-personal' => 'Zahlungsinformationen',
        'payflowpro_gateway-cc-form-header-payment' => 'Zahlungsinformationen',
+       'payflowpro_gateway-state-dropdown-YY'   => 'Wählen Sie einen 
Bundesstaat',
+       'payflowpro_gateway-state-dropdown-XX' => 'Außerhalb der USA',
+       'payflowpro_gateway-country-dropdown-840' => 'USA',
+       'payflowpro_gateway-country-dropdown-036' => 'Australien',
+       'payflowpro_gateway-country-dropdown-040' => 'Österreich',
+       'payflowpro_gateway-country-dropdown-124' => 'Kanada',
+       'payflowpro_gateway-country-dropdown-208' => 'Dänemark',
+       'payflowpro_gateway-country-dropdown-246' => 'Finnland',
+       'payflowpro_gateway-country-dropdown-250' => 'Frankreich',
+       'payflowpro_gateway-country-dropdown-276' => 'Deutschland',
+       'payflowpro_gateway-country-dropdown-380' => 'Italien',
+       'payflowpro_gateway-country-dropdown-440' => 'Litauen',
+       'payflowpro_gateway-country-dropdown-442' => 'Luxemburg',
+       'payflowpro_gateway-country-dropdown-528' => 'Niederlande',
+       'payflowpro_gateway-country-dropdown-616' => 'Polen',
+       'payflowpro_gateway-country-dropdown-643' => 'Russland',
+       'payflowpro_gateway-country-dropdown-710' => 'Südafrika',
+       'payflowpro_gateway-country-dropdown-724' => 'Spanien',
+       'payflowpro_gateway-country-dropdown-756' => 'Schweiz',
+       'payflowpro_gateway-country-dropdown-826' => 'Großbritannien',
 );
 
 /** German (formal address) (Deutsch (Sie-Form))



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to