Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): Auto-mirror back and forward arrows for RTL support 📟 #12227

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

darcywong00
Copy link
Contributor

@darcywong00 darcywong00 commented Aug 20, 2024

Addresses much of #12215

This PR changes UI elements from ic_arrow_back / ic_arrow_forward to use ic_action_back and ic_action_forward layouts because the action layouts have the android:autoMirrored="true" property to support right-to-left languages.

For left-to-right languages, action_back points left, action_forward points to the right
For right-to-left languages, action_back points right, action_forward points to the left.

Current limitations to address on separate PRs:

  • The order of the navigation arrows in the Info Activity need to change
  • The arrows in the Text Size dialog will be addressed separately

User Testing

Setup - Choose one of the following two ways to test RTL strings:

  1. Pseudo locale uses "English strings" but lays everything out right-to-left
    a. On a modern Android device/emulator, Android Settings --> About emulated device --> Click on the "Build number" 7+ times to unlock developer options --> Reboot device
    b. When the device is back on --> Android Settings --> System --> Languages --> System Languages --> "idiB-oduesP) cibarA)" [this is the psuedo-bidirectional Arabic locale"] --> drag this to the number 1 preferred language order
  2. Using the PR build from follow-on PR feat(android): Add localization for Arabic 📟 #12228, in Keyman for Android change the display language to Arabic. You may want to have Keyman for Android on another device in English to follow along when navigating Arabic menus

Screenshot

Installed languages
"Installed Languages" menu displayed in Arabic.
The "back arrow" in the title bar points to the right
The "forward arrow" for English keyboard points to the left

  • TEST_RTL - Verifies back and forward arrows
  1. Launch Keyman for Android in an RTL languages (according to one of the 2 setup scenarios)
  2. For each of the menus below, verify back arrows point to the right and forward arrows point to the left
  3. Info page (help menu)
  4. Keyman Settings
  5. Add Language to installed keyboard
  6. English Language settings
  7. EuroLatin (SIL) keyboard settings
  8. English dictionary (MTNT) Settings

@darcywong00 darcywong00 added this to the A18S9 milestone Aug 20, 2024
@darcywong00 darcywong00 requested a review from sgschantz as a code owner August 20, 2024 03:48
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Aug 20, 2024
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Aug 20, 2024

User Test Results

Test specification and instructions

@darcywong00 darcywong00 changed the title fix(android): Auto-mirror back and forward arrows for RTL support fix(android): Auto-mirror back and forward arrows for RTL support 📟 Aug 20, 2024
@dinakaranr
Copy link

Test Results

  • TEST_RTL (passed):

I retested this issue with the attached "Keyman 18.0.93-alpha-test-12228" build on the Android 14 physical device and Android 12(emulator) Here is my observation.

  1. Installed the "Keyman-18.0.93.apk" file and gave all permissions to the application.
  2. Checked the "Enable Keyman as system-wide keyboard" and set the keyboard as the default keyboard box on the settings page.
  3. Selected the "Arabic Phonetic(SIL)" default keyboard.
  4. Open the Keyman app. Enable the "Predictions" to install the "Dictionary."
  5. Change the display UI to "Arabic" by settings/Display Language.
  6. Added a sentence to the notepad.
  7. Go to the settings. Verified that the "Back arrow" appears on the right side.
  8. Go to "Installed Languages".
  • Verified that the "Back arrow" appears on the right side.
  • Verified that the "forward arrow" for installed keyboards points to the left side.
  1. Go to the EuroLatin (SIL) keyboard settings.
  • Verified that the "Back arrow" appears on the right side.
  • Verified that the "forward arrow" for installed keyboards points to the left side.
  1. Go to the English dictionary (MTNT) Settings
  • A blue tick appears on the right side.
  • Verified that the "Back arrow" appears on the right side
  • Verified that the "forward arrow" for installed keyboards points to the left side.
    Hence, It looks good now. Thank you.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Aug 21, 2024
@darcywong00 darcywong00 merged commit 25b21bc into master Aug 21, 2024
6 checks passed
@darcywong00 darcywong00 deleted the fix/android/mirror-arrows branch August 21, 2024 12:11
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.94-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants