r101890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101889‎ | r101890 | r101891 >
Date:21:58, 3 November 2011
Author:kaldari
Status:ok
Tags:
Comment:
making canadian provinces translatable
Modified paths:
  • /trunk/extensions/DonationInterface/donationinterface.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_common/canada-provinces.i18n.php (added) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetterCA.php (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/donationinterface.php
@@ -632,7 +632,8 @@
633633 $wgExtensionMessagesFiles['DonateInterface'] = $donationinterface_dir . 'gateway_common/interface.i18n.php';
634634 $wgExtensionMessagesFiles['GatewayCountries'] = $donationinterface_dir . 'gateway_common/countries.i18n.php';
635635 $wgExtensionMessagesFiles['GatewayUSStates'] = $donationinterface_dir . 'gateway_common/us-states.i18n.php';
636 -
 636+$wgExtensionMessagesFiles['GatewayCAProvinces'] = $donationinterface_dir . 'gateway_common/canada-provinces.i18n.php';
 637+
637638 //GlobalCollect gateway magical globals
638639 //TODO: all the bits where we make the i18n make sense for multiple gateways. This is clearly less than ideal.
639640 if ( $optionalParts['GlobalCollect'] === true ){
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetterCA.php
@@ -183,7 +183,7 @@
184184 // generate dropdown of state opts
185185 foreach ( $states as $value => $state_name ) {
186186 $selected = ( $this->form_data[ 'state' ] == $value ) ? true : false;
187 - $state_opts .= Xml::option( $state_name, $value, $selected );
 187+ $state_opts .= Xml::option( wfMsg( 'donate_interface-province-dropdown-' . $value ), $value, $selected );
188188 }
189189
190190 $state_menu = Xml::openElement(
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
@@ -125,7 +125,7 @@
126126 } else {
127127 // Display form
128128
129 - // Not sure what this is for.
 129+ // See GlobalCollectAdapter::stage_returnto()
130130 $oid = $wgRequest->getText( 'order_id' );
131131 if ( $oid ) {
132132 $result = $this->adapter->do_transaction( 'GET_ORDERSTATUS' );
Index: trunk/extensions/DonationInterface/gateway_common/canada-provinces.i18n.php
@@ -0,0 +1,29 @@
 2+<?php
 3+/**
 4+ * Internationalization file for the Donation Interface extension
 5+ * Supplies the drop down menu options of Canadian Provinces
 6+ *
 7+ * @file
 8+ * @ingroup Extensions
 9+ */
 10+
 11+$messages = array();
 12+
 13+/** English */
 14+$messages['en'] = array(
 15+ 'donate_interface-province-dropdown-YY' => 'Select a Province',
 16+ 'donate_interface-province-dropdown-XX' => 'Outside Canada',
 17+ 'donate_interface-province-dropdown-AB' => 'Alberta',
 18+ 'donate_interface-province-dropdown-BC' => 'British Columbia',
 19+ 'donate_interface-province-dropdown-MB' => 'Manitoba',
 20+ 'donate_interface-province-dropdown-NB' => 'New Brunswick',
 21+ 'donate_interface-province-dropdown-NL' => 'Newfoundland and Labrador',
 22+ 'donate_interface-province-dropdown-NT' => 'Northwest Territories',
 23+ 'donate_interface-province-dropdown-NS' => 'Nova Scotia',
 24+ 'donate_interface-province-dropdown-NU' => 'Nunavut',
 25+ 'donate_interface-province-dropdown-ON' => 'Ontario',
 26+ 'donate_interface-province-dropdown-PE' => 'Prince Edward Island',
 27+ 'donate_interface-province-dropdown-QC' => 'Quebec',
 28+ 'donate_interface-province-dropdown-SK' => 'Saskatchewan',
 29+ 'donate_interface-province-dropdown-YT' => 'Yukon',
 30+);

Follow-up revisions

RevisionCommit summaryAuthorDate
r101892follow-up to r101890, forgot to make it available to jskaldari22:02, 3 November 2011
r102236MFT r90286, r100671, r100837, r100950, r101060, r101063, r101064, r101073, r1......khorn03:06, 7 November 2011
r102237MFT r90286, r100671, r100837, r100950, r101060, r101063, r101064, r101073, r1......khorn03:07, 7 November 2011

Status & tagging log