summaryrefslogtreecommitdiff
path: root/resources/mediawiki.language/languages/hy.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/mediawiki.language/languages/hy.js')
-rw-r--r--resources/mediawiki.language/languages/hy.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/resources/mediawiki.language/languages/hy.js b/resources/mediawiki.language/languages/hy.js
index 215e7504..65081bdd 100644
--- a/resources/mediawiki.language/languages/hy.js
+++ b/resources/mediawiki.language/languages/hy.js
@@ -2,10 +2,11 @@
* Armenian (Հայերեն) language functions
*/
-mediaWiki.language.convertGrammar = function( word, form ) {
- var grammarForms = mw.language.getData( 'hy', 'grammarForms' );
+mediaWiki.language.convertGrammar = function ( word, form ) {
+ /*jshint onecase:true */
+ var grammarForms = mediaWiki.language.getData( 'hy', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
- return grammarForms[form][word] ;
+ return grammarForms[form][word];
}
// These rules are not perfect, but they are currently only used for site names so it doesn't
@@ -13,14 +14,15 @@ mediaWiki.language.convertGrammar = function( word, form ) {
switch ( form ) {
case 'genitive': // սեռական հոլով
- if ( word.substr( -1 ) === 'ա' )
+ if ( word.substr( -1 ) === 'ա' ) {
word = word.substr( 0, word.length -1 ) + 'այի';
- else if ( word.substr( -1 ) === 'ո' )
+ } else if ( word.substr( -1 ) === 'ո' ) {
word = word.substr( 0, word.length - 1 ) + 'ոյի';
- else if ( word.substr( -4 ) === 'գիրք' )
+ } else if ( word.substr( -4 ) === 'գիրք' ) {
word = word.substr( 0, word.length - 4 ) + 'գրքի';
- else
+ } else {
word = word + 'ի';
+ }
break;
}
return word;