diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /resources/mediawiki.language/languages/he.js | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'resources/mediawiki.language/languages/he.js')
-rw-r--r-- | resources/mediawiki.language/languages/he.js | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/resources/mediawiki.language/languages/he.js b/resources/mediawiki.language/languages/he.js index b74440e4..d35f77ed 100644 --- a/resources/mediawiki.language/languages/he.js +++ b/resources/mediawiki.language/languages/he.js @@ -2,13 +2,28 @@ * Hebrew (עברית) language functions */ -mediaWiki.language.convertPlural = function( count, forms ) { - forms = mediaWiki.language.preConvertPlural( forms, 3 ); - if ( count == 1 ) { - return forms[0]; +mediaWiki.language.convertGrammar = function( word, form ) { + var grammarForms = mw.language.getData( 'he', 'grammarForms' ); + if ( grammarForms && grammarForms[form] ) { + return grammarForms[form][word] ; } - if ( count == 2 && forms[2] ) { - return forms[2]; + switch ( form ) { + case 'prefixed': + case 'תחילית': // the same word in Hebrew + // Duplicate prefixed "Waw", but only if it's not already double + if ( word.substr( 0, 1 ) === "ו" && word.substr( 0, 2 ) !== "וו" ) { + word = "ו" + word; + } + + // Remove the "He" if prefixed + if ( word.substr( 0, 1 ) === "ה" ) { + word = word.substr( 1, word.length ); + } + + // Add a hyphen (maqaf) before numbers and non-Hebrew letters + if ( word.substr( 0, 1 ) < "א" || word.substr( 0, 1 ) > "ת" ) { + word = "־" + word; + } } - return forms[1]; + return word; }; |