Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[bug]: Translations unusable and saved without plugin prefix #86

Open
Labels
issue: bugIssue reporting a bug
@joaovpmamede

Description

What version of @strapi/sdk-plugin are you using?

Npm version
9.8.1
Node.js version
18.18.2
React version:
18.3.1
@strapi/sdk-plugin version
5.3.1

What's Wrong?

My understanding is that a plugin should use translations with the plugin name as a prefix, hence the use of PLUGIN_ID to get the translation.
It seems that before a prefixPluginTranslations function was used to "add" the prefix to each translated string (e.g. users-permissions plugin).

To Reproduce

We can see that this is not working because there's no functionality to add this prefix.
We can also check the messages object from the useIntl() hook to see how its being saved (after adding some strings to /translations/en.json for example).

Expected Behaviour

The getTranslation function should return the correct string for the current locale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /