Skip to content

Add Persian braille tables and language settings - #466

Open
mmfarahmand wants to merge 1 commit into
trypsynth:masterfrom
mmfarahmand:persian-braille
Open

mmfarahmand wants to merge 1 commit into
trypsynth:masterfrom
mmfarahmand:persian-braille

Conversation

@mmfarahmand

Copy link
Copy Markdown

Add Persian braille tables and language settings

Description

Persian braille tables were previously missing from Backtalk, leaving Persian-speaking braille keyboard and braille display users without native braille translation tables.

This pull request adds Persian braille support using the official upstream LibLouis tables:

  • Persian Grade 1 Braille (fa-ir-g1.utb): Standard 6-dot uncontracted literary braille.
  • Persian 8-dot Computer Braille (fa-ir-comp8.ctb): 8-dot computer braille for direct symbol representation.

Changes

  1. Tables (:brailletranslate):

    • Added fa-ir-g1.utb and fa-ir-comp8.ctb directly from LibLouis into braille/translate/src/phone/tables/.
    • Verified that table dependencies (spaces.uti, braille-patterns.cti, and digits6Dots.uti) already exist in the tables directory.
  2. Translator Factory (:brailletranslate):

    • Registered PERSIAN and PERSIAN_COMP8 in LibLouis.java's switch expression to instantiate LibLouisTranslator with the respective table files.
  3. Language Model & Enum (:braillecommon):

    • Added LOCALE_FA = Locale.forLanguageTag("fa") in BrailleLanguages.java.
    • Added Code.PERSIAN and Code.PERSIAN_COMP8 enum values.
    • Ordering ensures PERSIAN (Grade 1) is selected as default when the device locale is Persian (fa / fa_IR).
  4. Localization (:braillecommon):

    • Added code_user_facing_name_persian ("Persian") and code_user_facing_name_persian_comp8 ("Persian 8-dot Computer Braille") with char limit comments to values/strings.xml.
    • Added Persian localized names ("فارسی" and "بریل ۸ نقطه‌ای فارسی ویژه رایانه") to values-fa/strings.xml, matching the phrasing used across existing languages.
  5. Lint (lint.xml):

    • Added <ignore regexp="code_user_facing_name_persian.*" /> under MissingTranslation so that other locales can be translated incrementally without failing lint checks.
    • Untouched lint-baseline.xml.

Testing

  • Verified table syntax and dependencies (spaces.uti, braille-patterns.cti, digits6Dots.uti).
  • Manual device testing:
    • Device / OS: Samsung Galaxy S21FE (SM-G990E) running Android 15
    • Steps tested:
      1. Opened Backtalk Settings > Braille Keyboard > Languages > Add language.
      2. Selected "Persian" from the list and confirmed both "Persian" (Grade 1) and "Persian 8-dot Computer Braille" are present.
      3. Activated Persian keyboard and verified braille dot input translates to Persian letters correctly.
      4. Verified Persian braille display output under Braille Display settings.

Download Persian Grade 1 braille (fa-ir-g1.utb) and Persian 8-dot computer braille (fa-ir-comp8.ctb) tables from the LibLouis repository.

Register PERSIAN and PERSIAN_COMP8 in LibLouis translator factory and BrailleLanguages.Code enum, and add localized string resources for English and Persian (values-fa). Suppress MissingTranslation in lint.xml for the new resources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant