Commit 8a6eb4f
Localize keyboard return-key labels on numeric-keypad input accessory view (#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: D1082702981 parent 861d8e0 commit 8a6eb4f
1 file changed
Lines changed: 11 additions & 10 deletions
File tree
- packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput
Lines changed: 11 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
606 | | - | |
| 607 | + | |
607 | 608 | | |
608 | | - | |
| 609 | + | |
609 | 610 | | |
610 | | - | |
| 611 | + | |
611 | 612 | | |
612 | | - | |
| 613 | + | |
613 | 614 | | |
614 | | - | |
| 615 | + | |
615 | 616 | | |
616 | | - | |
| 617 | + | |
617 | 618 | | |
618 | | - | |
| 619 | + | |
619 | 620 | | |
620 | | - | |
| 621 | + | |
621 | 622 | | |
622 | | - | |
| 623 | + | |
623 | 624 | | |
624 | | - | |
| 625 | + | |
625 | 626 | | |
626 | 627 | | |
627 | 628 | | |
| |||
0 commit comments