| 1 | # There is a group of contractions that are represented by one letter |
| 2 | # only. If they come as single words, they should be abbriviated |
| 3 | # normally. But if they come as a part of bigger word, dots 36 must be |
| 4 | # placed before the character that represents the abbreviated word. |
| 5 | |
| 6 | # This is the most problematic rule for me so far. I should define |
| 7 | # every contraction twice, one with the "word" opcode, and another |
| 8 | # with the "partword" upcode. |
| 9 | |
| 10 | # When I used the "word" upcode, a big problem happens with |
| 11 | # back-translation: if the contraction is part of a word, NVDA |
| 12 | # automatically assumes that the character before the dots 36 is a |
| 13 | # contraction as well and automatically expand it. An example if the |
| 14 | # "word" upcode is used: |
| 15 | |
| 16 | table: | |
| 17 | include tables/unicode.dis |
| 18 | include tables/ar-ar-g1.utb |
| 19 | word ربما 1235 |
| 20 | partword ربما 36-1235 |
| 21 | word ليس 123 |
| 22 | partword ليس 36-123 |
| 23 | word ولما 2456 |
| 24 | partword ولما 36-2456 |
| 25 | |
| 26 | tests: |
| 27 | |
| 28 | # As separate words it works just fine: |
| 29 | - - ربما ليس هو |
| 30 | - ⠗ ⠇ ⠓⠺ |
| 31 | # As part of a word, it fails: |
| 32 | - - وليس |
| 33 | - ⠺⠤⠇ |
| 34 | - xfail: true |
| 35 | # What happens is that it assumes both characters as contractions, |
| 36 | # but it should only consider the one after dots 36: |
| 37 | - - وليس |
| 38 | - ⠤⠺⠤⠇ |
| 39 | # The first character in the word is not an abbreviation, yet NVDA |
| 40 | # assumes that it is a seperate word as soon as I put dots 36 after |
| 41 | # it, because it thinks it is a dash symbol, not a contraction |
| 42 | # indicator. In grade1, the word "وليس" will be "ولماليس" |
| 43 | |
| 44 | # Another example: |
| 45 | - - لربما |
| 46 | - ⠇⠤⠗ |
| 47 | - xfail: true |
| 48 | # Incorrect back-translation: |
| 49 | - - لربما |
| 50 | - ⠤⠇⠤⠗ |
| 51 | |
| 52 | # To temporarily work around this issue, I used the "lowword" |
| 53 | # upcode. This resulted in good back-translation, but disabled the use |
| 54 | # of all these abbreviations if they come connected with punctuation |
| 55 | # marks, which is not desirable. |
| 56 | |
| 57 | table: | |
| 58 | include tables/unicode.dis |
| 59 | include tables/ar-ar-g1.utb |
| 60 | lowword ربما 1235 |
| 61 | partword ربما 36-1235 |
| 62 | lowword ليس 123 |
| 63 | partword ليس 36-123 |
| 64 | lowword ولما 2456 |
| 65 | partword ولما 36-2456 |
| 66 | |
| 67 | tests: |
| 68 | |
| 69 | # As a seperate word it works fine: |
| 70 | - - ليس |
| 71 | - ⠇ |
| 72 | # Due to the use of "lowword", they will not be translated next to punctuations: |
| 73 | - - ليس ربما. |
| 74 | - ⠇ ⠗⠲ |
| 75 | - xfail: true |
| 76 | # What happens: |
| 77 | - - ليس ربما. |
| 78 | - ⠇ ⠗⠃⠍⠁⠲ |
| 79 | # It solves the issue of the character that comes before dots 36. |
| 80 | - - لربما |
| 81 | - ⠇⠤⠗ |