| # Copyright © 2018 Ikrami Ahmad |
| # |
| # Copying and distribution of this file, with or without modification, |
| # are permitted in any medium without royalty provided the copyright |
| # notice and this notice are preserved. This file is offered as-is, |
| # without any warranty. |
| |
| display: unicode.dis |
| table: |
| locale: ar |
| grade: 1 |
| __assert-match: ar.tbl |
| |
| flags: {testmode: bothDirections} |
| |
| tests: |
| # Join two characters together when they follow each other in a single word which are: Arabic laam |
| # (\x0644) and Arabic Alef (\x0626). |
| - - سلام |
| - ⠎⠧⠍ |
| # Arabic question mark should take priority over english question mark in backtranslation. |
| - - ماذا؟ |
| - ⠍⠁⠮⠁⠦ |
| |
| # Cannot input punctuation marks and signs that consist of two cells, although they are |
| # forward-translated normally. This is because the first part of the symbol represents another |
| # symbol in the table. For example, the colon is 5-2 cannot be written because dot 5 represents |
| # the Arabic comma, and this is applied to any other symbol starts with dot 5. Similarly, because |
| # 56 represents semi-colon, it is not possible to input math symbols like + = or *. This happens |
| # on NVDA, as I don't have the necessary skills to test using the liblouis built-in tools. |
| - - "قال:" |
| - ⠟⠁⠇⠐⠂ |
| - - ٥+٦=١١ |
| - ⠼⠑⠰⠖⠼⠋⠰⠶⠼⠁⠁ |
| |
| # The following are applied only for forward translation. |
| flags: {testmode: forward} |
| tests: |
| # Omiting the tatweel symbol (\x0640) from being backtranslated, as it is used only for decorating |
| # texts. I preferred though not to ignore it completely to allow braille transcribers to identify |
| # and correct it if it exists in a text. |
| - - مـرـحـبا |
| - ⠍⠂⠗⠂⠱⠂⠃⠁ |
| |
| # A rule to correct Shadda symbol (a diacritic mark to indicate that the letter follows it should |
| # be doubled in pronunciation). It should be written before the character in Arabic braille |
| # code. This will consist of every Arabic character followed by the Shadda diacritic symbol, and a |
| # dot pattern of the braille Shadda followed by the character. |
| |
| # I used the "noback" opcode so that I can avoid lots of input issues due to the conflict with the |
| # capital letter sign. This means that the user will have to input this symbol normally after the |
| # character as if he is writing from the standard keyboard, but it will be displayed correctly. In |
| # the standard Arabic braille, Shadda should be also typed before the character. |
| - - المحبّة |
| - ⠁⠇⠍⠱⠠⠃⠡ |
| # It can not come at the begining of a word. |
| - - شدّة |
| - ⠩⠠⠙⠡ |
| |
| # Linguistically correct, if a character has the Shadda and another diacritic symbol on it, Shadda |
| # should be typed first followed by the other diacritic mark. Typing the other diacritic symbol |
| # before it will result in inappropriate output, as the shadda will appear as if it belongs to the |
| # character that follows the stressed character. |
| |
| # correct |
| - - أُمَّة |
| - ⠌⠥⠠⠍⠂⠡ |
| # incorrect |
| - - أُمَّة |
| - ⠌⠥⠍⠂⠠⠡ |
| # The two characters we join together in the above rule can also be doubled. |
| - - ولاّدة |
| - ⠺⠠⠧⠙⠡ |
| # I didn't add this rule for the characters that can never be stressed, so even if a user types |
| # this symbol after them, it will be displayed after the character, not before it. Moreover, these |
| # characters may represent contractions when preceded with dot 6 in grade 2. |
| - - أعلىّ |
| - ⠌⠷⠇⠕⠠ |
| - - 5+6=11 |
| - ⠼⠑⠰⠖⠼⠋⠰⠶⠼⠁⠁ |
| |
| # back-translation of Arabic numerals |
| flags: {testmode: backward} |
| tests: |
| - - ⠼⠁⠃⠉⠙⠑⠋⠛⠓⠊⠚ |
| - ١٢٣٤٥٦٧٨٩٠ |