Index: branches/jsgrammar/languages/classes/LanguageHe.php |
— | — | @@ -28,8 +28,8 @@ |
29 | 29 | |
30 | 30 | switch ( $case ) { |
31 | 31 | case 'prefixed': |
32 | | - case 'תחילית': |
33 | | - # Duplicate the "Waw" if prefixed |
| 32 | + case 'תחילית': // the same word in Hebrew |
| 33 | + # Duplicate prefixed "Waw", but only if it's not already double |
34 | 34 | if ( substr( $word, 0, 2 ) == "ו" && substr( $word, 0, 4 ) != "וו" ) { |
35 | 35 | $word = "ו" . $word; |
36 | 36 | } |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | $word = substr( $word, 2 ); |
41 | 41 | } |
42 | 42 | |
43 | | - # Add a hyphen (maqaf) if non-Hebrew letters |
| 43 | + # Add a hyphen (maqaf) before numbers and non-Hebrew letters |
44 | 44 | if ( substr( $word, 0, 2 ) < "א" || substr( $word, 0, 2 ) > "ת" ) { |
45 | 45 | $word = "־" . $word; |
46 | 46 | } |
Index: branches/jsgrammar/resources/mediawiki.language/languages/he.js |
— | — | @@ -20,8 +20,8 @@ |
21 | 21 | } |
22 | 22 | switch ( form ) { |
23 | 23 | case 'prefixed': |
24 | | - case 'תחילית': |
25 | | - // Duplicate the "Waw" if prefixed |
| 24 | + case 'תחילית': // the same word in Hebrew |
| 25 | + // Duplicate prefixed "Waw", but only if it's not already double |
26 | 26 | if ( word.substr( 0, 1 ) === "ו" && word.substr( 0, 2 ) !== "וו" ) { |
27 | 27 | word = "ו" + word; |
28 | 28 | } |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | word = word.substr( 1, word.length ); |
33 | 33 | } |
34 | 34 | |
35 | | - // Add a hyphen (maqaf) if non-Hebrew letters |
| 35 | + // Add a hyphen (maqaf) before numbers and non-Hebrew letters |
36 | 36 | if ( word.substr( 0, 1 ) < "א" || word.substr( 0, 1 ) > "ת" ) { |
37 | 37 | word = "־" + word; |
38 | 38 | } |