Skip to content

Localize keyboard return-key labels on numeric-keypad input accessory view (#57168)#57168

Open
cipolleschi wants to merge 1 commit into
react:mainfrom
cipolleschi:export-D108270298
Open

Localize keyboard return-key labels on numeric-keypad input accessory view (#57168)#57168
cipolleschi wants to merge 1 commit into
react:mainfrom
cipolleschi:export-D108270298

Conversation

@cipolleschi

@cipolleschi cipolleschi commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary:

The "Next", "Done", and other return-key button labels on the iOS numeric-keypad input accessory view render in English regardless of device locale.

Root cause: returnKeyTypeToString: in RCTTextInputComponentView.mm returns hardcoded English string literals. These strings are passed directly to UIBarButtonItem as the button title, so they never go through the localization pipeline.

Fix: Wrap each literal in the RCTLocalizedString macro, which registers the strings for translation. This follows the established React Native pattern used elsewhere in the codebase.

Changelog:
[iOS][Changed] - Adds localization for Text Input default return key types

Differential Revision: D108270298

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2026
@meta-codesync

meta-codesync Bot commented Jun 11, 2026

Copy link
Copy Markdown

@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108270298.

@meta-codesync meta-codesync Bot changed the title Localize keyboard return-key labels on numeric-keypad input accessory view Localize keyboard return-key labels on numeric-keypad input accessory view (#57168) Jun 11, 2026
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Jun 11, 2026
… view (react#57168)

Summary:

The "Next", "Done", and other return-key button labels on the iOS numeric-keypad input accessory view render in English regardless of device locale.

Root cause: `returnKeyTypeToString:` in `RCTTextInputComponentView.mm` returns hardcoded English string literals. These strings are passed directly to `UIBarButtonItem` as the button title, so they never go through the localization pipeline.

Fix: Wrap each literal in the `RCTLocalizedString` macro, which registers the strings for translation. This follows the established React Native pattern used elsewhere in the codebase.

Changelog:
[iOS][Changed] - Adds localization for Text Input default return key types

Differential Revision: D108270298
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Jun 11, 2026
… view (react#57168)

Summary:

The "Next", "Done", and other return-key button labels on the iOS numeric-keypad input accessory view render in English regardless of device locale.

Root cause: `returnKeyTypeToString:` in `RCTTextInputComponentView.mm` returns hardcoded English string literals. These strings are passed directly to `UIBarButtonItem` as the button title, so they never go through the localization pipeline.

Fix: Wrap each literal in the `RCTLocalizedString` macro, which registers the strings for translation. This follows the established React Native pattern used elsewhere in the codebase.

Changelog:
[iOS][Changed] - Adds localization for Text Input default return key types

Differential Revision: D108270298
… view (react#57168)

Summary:

The "Next", "Done", and other return-key button labels on the iOS numeric-keypad input accessory view render in English regardless of device locale.

Root cause: `returnKeyTypeToString:` in `RCTTextInputComponentView.mm` returns hardcoded English string literals. These strings are passed directly to `UIBarButtonItem` as the button title, so they never go through the localization pipeline.

Fix: Wrap each literal in the `RCTLocalizedString` macro, which registers the strings for translation. This follows the established React Native pattern used elsewhere in the codebase.

Changelog:
[iOS][Changed] - Adds localization for Text Input default return key types

Differential Revision: D108270298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant