PaperMC / PaperMC/Paper

Component.translatable() does not translate text in the Dialog API

Open
#12,971 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #13871 by @valaphee — closed without merging
status: accepted
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

The client should see the translated text displayed in the dialog.

Observed/Actual behavior

The dialog only shows the translation key instead of the translated text.

Steps/models to reproduce
  • Register languages with the GlobalTranslator using a TranslationStore. like in the docs
  • Use Component.translatable() within any part of the dialog.
Plugin and Datapack List

? Server Plugins (1):
Paper Plugins:

  • Waystonez

There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
There are no more data packs available

Paper version

1.21.7-32-main@e792779 (2025-07-16T20:10:15Z) (Implementing API version 1.21.7-R0.1-SNAPSHOT)

Other

The translations are correctly registered, as Component.translatable() works as expected in chat messages.
The dialog is created dynamically when an event is triggered (in my case, a PlayerInteractEvent), not during plugin bootstrap or startup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a dynamically created Dialog API dialog after registering languages through GlobalTranslator and a TranslationStore, then compare its behavior with translated chat messages. Done means Component.translatable() displays translated text in every relevant part of the dialog rather than the translation key.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.