From a7e5c96a3d11671ed45b5d4f02334e8cc988ce9e Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 13 Jun 2023 15:50:01 -0700 Subject: [PATCH] Localize Talkback strings (#37856) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37856 These strings are spoken to the user when using an ascessibility role or state not natively supported by Talkback. We can enable these for translation by removing flags to disable localization, and adding descriptions to each string. These are derived from MDN for ARIA (used for iOS strings), along with Android and iOS documentation. Note that this was explicitly disabled as part of D15087192 because of creating spam which was hitting the GitHub repo, but when translation was enabled for the dev menu, this ended up being a non-issue after initial translation. And we really do want these to be localized. Changelog: [Android][Fixed] - Localize Talkback strings Reviewed By: cortinico Differential Revision: D46692127 fbshipit-source-id: 6da4a181e03f46bad850e4385b94155695a142a8 --- .../res/views/uimanager/values/strings.xml | 103 ++++++++++++++++++ .../uimanager/values/strings_unlocalized.xml | 103 ------------------ 2 files changed, 103 insertions(+), 103 deletions(-) create mode 100644 packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml delete mode 100644 packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings_unlocalized.xml diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml new file mode 100644 index 00000000000000..a2f6ad5263150a --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml @@ -0,0 +1,103 @@ + + + Link + Image + Button, Image + Heading + Alert + Combo Box + Menu + Menu Bar + Menu Item + Progress Bar + Radio Group + Scroll Bar + Spin Button + Tab + Tab List + Timer + Tool Bar + Summary + busy + expanded + collapsed + unselected + on + off + mixed + diff --git a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings_unlocalized.xml b/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings_unlocalized.xml deleted file mode 100644 index d06603f611372a..00000000000000 --- a/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings_unlocalized.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - Link - Image - Button, Image - Heading - Alert - Combo Box - Menu - Menu Bar - Menu Item - Progress Bar - Radio Group - Scroll Bar - Spin Button - Tab - Tab List - Timer - Tool Bar - Summary - busy - expanded - collapsed - unselected - on - off - mixed -