From 5b728ec413392c591d8442e59889450376b76ffd Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Sun, 9 Sep 2012 10:07:31 +0530 Subject: [PATCH] User region names instead of region codes * Till i18n is in place, use a workaround to show region names in English Change-Id: I6e14ab67600ad32263f04eb0aa6b931177425e5a --- lib/jquery.uls/src/jquery.uls.core.js | 2 +- lib/jquery.uls/src/jquery.uls.lcd.js | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/jquery.uls/src/jquery.uls.core.js b/lib/jquery.uls/src/jquery.uls.core.js index 776aee62..9025f3f4 100644 --- a/lib/jquery.uls/src/jquery.uls.core.js +++ b/lib/jquery.uls/src/jquery.uls.core.js @@ -43,7 +43,7 @@ America\ \
\ - Europe
Middle east
Africa\ +
Europe
Middle East
Africa\
\
\
\ diff --git a/lib/jquery.uls/src/jquery.uls.lcd.js b/lib/jquery.uls/src/jquery.uls.lcd.js index a1650478..6e5e3a55 100644 --- a/lib/jquery.uls/src/jquery.uls.lcd.js +++ b/lib/jquery.uls/src/jquery.uls.lcd.js @@ -149,11 +149,21 @@ render: function() { var that = this; + var regions = { // FIXME Remove this when i18n is in place. + WW: 'Worldwide', + AM: 'America', + EU: 'Europe', + ME: 'Middle East', + AS: 'Asia', + AF: 'Africa', + PA: 'Pacific' + }; var $section; $.each( $.uls.data.regiongroups, function( regionCode, regionIndex ) { $section = $( '
' ).addClass( 'twelve columns uls-lcd-region-section' ).prop( 'id', regionCode ); - $section.append( $( '

' ).addClass( 'eleven columns uls-lcd-region-section offset-by-one' ).html( regionCode ) ); - // FIXME this is regioncode(NA, EU etc). Should be proper localized region name. + $section.append( $( '

' ) + .addClass( 'eleven columns uls-lcd-region-section offset-by-one' ) + .text( regions[regionCode] ) ); that.$element.append( $section ); $section.hide(); that.regionDivs[regionCode] = $section;