~launchpad-pqm/lazr-js/toolchain

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/widget/widget-locale-min.js

  • Committer: Sidnei da Silva
  • Date: 2009-11-16 00:51:29 UTC
  • mto: This revision was merged to the branch mainline in revision 154.
  • Revision ID: sidnei.da.silva@canonical.com-20091116005129-8ibwjlboa38glaw5
- Improved generation of skin modules and revamped combo service to make it more twisty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
 
Code licensed under the BSD License:
4
 
http://developer.yahoo.com/yui/license.html
5
 
version: 3.2.0
6
 
build: 2676
7
 
*/
8
 
YUI.add("widget-locale",function(F){var C=true,G="locale",E="initValue",B="-",A="",D=F.Widget;D.ATTRS[G]={value:"en"};F.mix(D.prototype,{_setStrings:function(I,H){var J=this._strs;H=H.toLowerCase();if(!J[H]){J[H]={};}F.aggregate(J[H],I,C);return J[H];},_getStrings:function(H){return this._strs[H.toLowerCase()];},getStrings:function(P){P=(P||this.get(G)).toLowerCase();var N=this.getDefaultLocale().toLowerCase(),I=this._getStrings(N),O=(I)?F.merge(I):{},L=P.split(B),M,K,J,H;if(P!==N||L.length>1){H=A;for(K=0,J=L.length;K<J;++K){H+=L[K];M=this._getStrings(H);if(M){F.aggregate(O,M,C);}H+=B;}}return O;},getString:function(J,I){I=(I||this.get(G)).toLowerCase();var K=(this.getDefaultLocale()).toLowerCase(),L=this._getStrings(K)||{},M=L[J],H=I.lastIndexOf(B);if(I!==K||H!=-1){do{L=this._getStrings(I);if(L&&J in L){M=L[J];break;}H=I.lastIndexOf(B);if(H!=-1){I=I.substring(0,H);}}while(H!=-1);}return M;},getDefaultLocale:function(){return this._state.get(G,E);},_strSetter:function(H){return this._setStrings(H,this.get(G));},_strGetter:function(H){return this._getStrings(this.get(G));}},true);},"3.2.0",{requires:["widget-base"]});
 
 
b'\\ No newline at end of file'