Index: branches/jsgrammar/resources/mediawiki/mediawiki.jqueryMsg.js |
— | — | @@ -664,10 +664,10 @@ |
665 | 665 | return this.language.gender( gender, forms ); |
666 | 666 | }, |
667 | 667 | /** |
668 | | - * Transform parsed structure into grammar conversion |
| 668 | + * Transform parsed structure into grammar conversion. |
669 | 669 | * Invoked by putting {{grammar:form|word}} in a message |
670 | | - * @param {Array} of noders [{Grammar case eg: genitive}, {String word}] |
671 | | - * @return {String} selected gender form according to current language |
| 670 | + * @param {Array} of nodes [{Grammar case eg: genitive}, {String word}] |
| 671 | + * @return {String} selected grammatical form according to current language |
672 | 672 | */ |
673 | 673 | grammar: function( nodes ) { |
674 | 674 | var form = nodes[0]; |
Index: branches/jsgrammar/resources/mediawiki.language/mediawiki.language.js |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | |
11 | 11 | mw.language = { |
12 | 12 | /** |
13 | | - * @var data {Object} Langauge related data |
| 13 | + * @var data {Object} Language related data |
14 | 14 | * Keyed by language, contains instances of mw.Map |
15 | 15 | * @example Set data |
16 | 16 | * <code> |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | * </code> |
24 | 24 | * @example Get data |
25 | 25 | * <code> |
26 | | - * var grammerForms = mw.language.data[langCode].get( 'grammerForms' ); |
| 26 | + * var grammarForms = mw.language.data[langCode].get( 'grammarForms' ); |
27 | 27 | * </code> |
28 | 28 | */ |
29 | 29 | data: {}, |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | * } |
39 | 39 | * @example {{Template:title|params}} |
40 | 40 | */ |
41 | | - 'procPLURAL': function( template ) { |
| 41 | + procPLURAL: function( template ) { |
42 | 42 | if ( template.title && template.parameters && mw.language.convertPlural ) { |
43 | 43 | // Check if we have forms to replace |
44 | 44 | if ( template.parameters.length === 0 ) { |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | * @param forms array List of plural forms |
63 | 63 | * @return string Correct form for quantifier in this language |
64 | 64 | */ |
65 | | - 'convertPlural': function( count, forms ){ |
| 65 | + convertPlural: function( count, forms ){ |
66 | 66 | if ( !forms || forms.length === 0 ) { |
67 | 67 | return ''; |
68 | 68 | } |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | * @param count integer Number of forms required |
76 | 76 | * @return array Padded array of forms |
77 | 77 | */ |
78 | | - 'preConvertPlural': function( forms, count ) { |
| 78 | + preConvertPlural: function( forms, count ) { |
79 | 79 | while ( forms.length < count ) { |
80 | 80 | forms.push( forms[ forms.length-1 ] ); |
81 | 81 | } |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | * @param {num} number Value to be converted |
88 | 88 | * @param {boolean} integer Convert the return value to an integer |
89 | 89 | */ |
90 | | - 'convertNumber': function( num, integer ) { |
| 90 | + convertNumber: function( num, integer ) { |
91 | 91 | if ( !mw.language.digitTransformTable ) { |
92 | 92 | return num; |
93 | 93 | } |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | * |
128 | 128 | * @return string |
129 | 129 | */ |
130 | | - 'gender': function( gender, forms ) { |
| 130 | + gender: function( gender, forms ) { |
131 | 131 | if ( !forms || forms.length === 0 ) { |
132 | 132 | return ''; |
133 | 133 | } |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | return ( forms.length === 3 ) ? forms[2] : forms[0]; |
142 | 142 | }, |
143 | 143 | /** |
144 | | - * Grammatical transformations, needed for inflected languages |
| 144 | + * Grammatical transformations, needed for inflected languages. |
145 | 145 | * Invoked by putting {{grammar:form|word}} in a message |
146 | 146 | * The rules can be defined in wgGrammarForms global or grammar |
147 | 147 | * forms can be dynamically calculated by overriding this per language |
— | — | @@ -149,14 +149,14 @@ |
150 | 150 | * @param form string |
151 | 151 | * @return string |
152 | 152 | */ |
153 | | - 'convertGrammar': function( word, form ) { |
154 | | - var grammarForms = mw.language.data[ mw.config.get( 'wgContentLanguage' )].get( 'grammarForms' ); |
| 153 | + convertGrammar: function( word, form ) { |
| 154 | + var grammarForms = mw.language.data[mw.config.get( 'wgContentLanguage' )].get( 'grammarForms' ); |
155 | 155 | if ( grammarForms && grammarForms[form] ) { |
156 | 156 | return grammarForms[form][word] || word ; |
157 | 157 | } |
158 | 158 | return word; |
159 | 159 | }, |
160 | 160 | // Digit Transform Table, populated by language classes where applicable |
161 | | - 'digitTransformTable': null |
| 161 | + digitTransformTable: null |
162 | 162 | }; |
163 | 163 | } )( jQuery, mediaWiki ); |