fix(i18n): prevent base name overwrites when editing in localized UI

Include base names in API responses to correctly populate edit forms.
Show base values as placeholders in translation fields for better UX.
Use default locale when fetching previous state for history diffs.
This commit is contained in:
2026-05-01 14:07:07 +08:00
parent 6812ddc428
commit 62406bdc84
7 changed files with 27 additions and 13 deletions

View File

@@ -101,7 +101,7 @@ async function loadEditor() {
const pokemon = await api.pokemonDetail(routeId.value);
pokemonForm.value = {
id: String(pokemon.id),
name: pokemon.name,
name: pokemon.baseName ?? pokemon.name,
translations: pokemon.translations ?? {},
environmentId: String(pokemon.environment.id),
skillIds: pokemon.skills.map((skill) => String(skill.id)),