Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Block titles are not translated #3422

Closed

Description

@fluiddot

Describe the bug
The block titles are not translated, they're showing the text in English independently of the device language.

⚠️ I tried in a previous version (WPiOS 17.0.1) and the block titles are translated so looks like this is a regression bug introduced in a recent version.

To Reproduce

  1. Change the language of your device to a non-English one that is supported by the app (check this list)
  2. Open the app
  3. Tap on the ➕ button
  4. Observe that the block titles are not translated

Expected behavior
The block titles should be translated.

Screenshots

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6, Pixel 4] iPhone 8
  • OS: [e.g. iOS 8.1, Android X] iOS 14.2
  • Version [e.g. 22] 17.1

Activity

  1. self-assigned this
    on Apr 27, 2021
  2. fluiddot commented on Apr 27, 2021

    @fluiddot
    ContributorAuthor

    I've just investigated this issue and I found that this problem is caused due to not updating the i18n cache when making a release.

    As an example, for the Paragraph block's title, the localization key is block title\u0004Paragraph. If you check latest localization files that we've bundled, you will see that this key is not present. However, if you run npm run core i18n-cache:force to force updating the localization files and open the file located in gutenberg/packages/react-native-editor/i18n-cache/data/es.json, you will see that the key is present.

    Looks like the problem is that the scripts that we run when making a release are not assuring that we use the latest localization files. A potential solution would be to clean the localization files when we make the bundles, I saw in the npm command bundle that we invoke the command clean in the react-native-editor package so we could include there the command clean:i18n-cache to clean the localizations cache too.

    EDIT: I noticed that, if we delete the i18n localization files, we should also explicitly generate the i18n localization files before generating the bundle because they're not automatically generated.

  3. fluiddot commented on Apr 27, 2021

    @fluiddot
    ContributorAuthor

    I finally decided to follow a different approach, I realized that we have a prebundle command in the react-native-editor that updates the i18n localization files. So I add it to the bundle command to assure that we always bundle the most recent localization files.

  4. mchowning commented on Apr 27, 2021

    @mchowning
    Contributor

    I think this may actually be a duplicate of this issue: #3269. Let's just make sure we close both issues once we resolve this (if you agree).

  5. fluiddot commented on Apr 27, 2021

    @fluiddot
    ContributorAuthor

    I think this may actually be a duplicate of this issue: #3269. Let's just make sure we close both issues once we resolve this (if you agree).

    Yep, most likely this issue has been introduced and fixed in different versions, depending on if the release wrangler had the latest localization files 🤦 .

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions