r74032 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74031‎ | r74032 | r74033 >
Date:18:35, 30 September 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
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 (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
@@ -113,11 +113,20 @@
114114 */
115115 public function generateCountryDropdown() {
116116 $country_options = '';
 117+
 118+ // create a new array of countries with potentially translated country names for alphabetizing later
 119+ foreach ( $this->getCountries() as $iso_value => $full_name ) {
 120+ $countries[ $iso_value ] = wfMsg( 'payflowpro_gateway-country-dropdown-' . $iso_value );
 121+ }
117122
 123+ // alphabetically sort the country names
 124+ // @fixme we should probably set locale and do a locale string sort
 125+ asort( $countries, SORT_STRING );
 126+
118127 // generate a dropdown option for each country
119 - foreach ( $this->getCountries() as $iso_value => $full_name ) {
 128+ foreach ( $countries as $iso_value => $full_name ) {
120129 $selected = ( $iso_value == $this->form_data[ 'country' ] ) ? true : false;
121 - $country_options .= Xml::option( wfMsg( 'payflowpro_gateway-country-dropdown-' . $iso_value ), $iso_value, $selected );
 130+ $country_options .= Xml::option( $full_name, $iso_value, $selected );
122131 }
123132
124133 // build the actual select
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php
@@ -1591,6 +1591,26 @@
15921592 'payflowpro_gateway-token-mismatch' => 'Deine Sitzung ist inzwischen abgelaufen. Bitte fülle das Formular erneut aus und sende es nochmals ab.',
15931593 'payflowpro_gateway-cc-form-header-personal' => 'Zahlungsinformationen',
15941594 'payflowpro_gateway-cc-form-header-payment' => 'Zahlungsinformationen',
 1595+ 'payflowpro_gateway-state-dropdown-YY' => 'Wählen Sie einen Bundesstaat',
 1596+ 'payflowpro_gateway-state-dropdown-XX' => 'Außerhalb der USA',
 1597+ 'payflowpro_gateway-country-dropdown-840' => 'USA',
 1598+ 'payflowpro_gateway-country-dropdown-036' => 'Australien',
 1599+ 'payflowpro_gateway-country-dropdown-040' => 'Österreich',
 1600+ 'payflowpro_gateway-country-dropdown-124' => 'Kanada',
 1601+ 'payflowpro_gateway-country-dropdown-208' => 'Dänemark',
 1602+ 'payflowpro_gateway-country-dropdown-246' => 'Finnland',
 1603+ 'payflowpro_gateway-country-dropdown-250' => 'Frankreich',
 1604+ 'payflowpro_gateway-country-dropdown-276' => 'Deutschland',
 1605+ 'payflowpro_gateway-country-dropdown-380' => 'Italien',
 1606+ 'payflowpro_gateway-country-dropdown-440' => 'Litauen',
 1607+ 'payflowpro_gateway-country-dropdown-442' => 'Luxemburg',
 1608+ 'payflowpro_gateway-country-dropdown-528' => 'Niederlande',
 1609+ 'payflowpro_gateway-country-dropdown-616' => 'Polen',
 1610+ 'payflowpro_gateway-country-dropdown-643' => 'Russland',
 1611+ 'payflowpro_gateway-country-dropdown-710' => 'Südafrika',
 1612+ 'payflowpro_gateway-country-dropdown-724' => 'Spanien',
 1613+ 'payflowpro_gateway-country-dropdown-756' => 'Schweiz',
 1614+ 'payflowpro_gateway-country-dropdown-826' => 'Großbritannien',
15951615 );
15961616
15971617 /** German (formal address) (Deutsch (Sie-Form))

Status & tagging log