Skip to content

"Block Name" label not localized – hardcoded string in baseBlockFields.ts bypasses i18n system #13189

@CreativeFutureX

Description

@CreativeFutureX

Describe the Bug

In the admin UI, when creating or editing content blocks, the label “Block Name” is not localized despite the presence of an internationalization (i18n) system in PayloadCMS. This results in inconsistent language usage for non-English interfaces, such as Polish.

The root cause is a hardcoded string (label: 'Block Name') found in the PayloadCMS source code. Specifically, the label is defined directly in the baseBlockFields.ts file, bypassing the i18n mechanism that should allow this string to be translated based on the active language.

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/blob/be8e8d9c7f0d4dd292169f6b84bba6270d3c7d5c/packages/payload/src/fields/baseFields/baseBlockFields.ts

Reproduction Steps

  1. Enable a non-English language in the PayloadCMS admin panel (e.g., Polish).
  2. Go to any collection where blocks are used.
  3. Create or edit a document that includes a block field.
  4. Observe the label for naming a block.

Actual result:

The interface displays the English label “Block Name”.

Expected result:

The label should be translated based on the selected interface language (e.g., “Nazwa bloku” in Polish).

Which area(s) are affected?

  1. Admin UI
  2. Internationalization (i18n)

Which area(s) are affected? (Select all that apply)

Not sure

Environment Info

PayloadCMS version: v3.28.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions