Merge "Begin exposing SiteConfiguration via site contexts"
[mediawiki.git] / resources / mediawiki.language / languages / he.js
blob13d457b26ed6c5ed19cd30f5edc873fc20dbe365
1 /**
2  * Hebrew (עברית) language functions
3  */
5 mediaWiki.language.convertGrammar = function( word, form ) {
6         var grammarForms = mediaWiki.language.getData( 'he', 'grammarForms' );
7         if ( grammarForms && grammarForms[form] ) {
8                 return grammarForms[form][word];
9         }
10         switch ( form ) {
11                 case 'prefixed':
12                 case 'תחילית': // the same word in Hebrew
13                         // Duplicate prefixed "Waw", but only if it's not already double
14                         if ( word.substr( 0, 1 ) === 'ו' && word.substr( 0, 2 ) !== 'וו' ) {
15                                 word = 'ו' + word;
16                         }
18                         // Remove the "He" if prefixed
19                         if ( word.substr( 0, 1 ) === 'ה' ) {
20                                 word = word.substr( 1, word.length );
21                         }
23                         // Add a hyphen (maqaf) before numbers and non-Hebrew letters
24                         if (  word.substr( 0, 1 ) < 'א' ||  word.substr( 0, 1 ) > 'ת' ) {
25                                 word = '־' + word;
26                         }
27         }
28         return word;