Skip to content

Commit

Permalink
[RNMobile] Fix missing translations for locales that include region (…
Browse files Browse the repository at this point in the history
…only on Android) (WordPress#41685)
  • Loading branch information
fluiddot authored and jhnstn committed Jun 15, 2022
1 parent 6d978db commit 3e302c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-native-editor/src/setup-locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export default (
pluginTranslations = []
) => {
const setDomainLocaleData = ( { getTranslation, domain = 'default' } ) => {
// Lowercase the locale value as translation filenames are also lowercased.
locale = locale?.toLowerCase();
let translations = getTranslation( locale );
if ( locale && ! translations ) {
// Try stripping out the regional
Expand Down

0 comments on commit 3e302c8

Please sign in to comment.