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

@@ -56,6 +56,7 @@ export interface EditHistoryEntry {
export interface Pokemon extends EditInfo {
id: number;
name: string;
baseName?: string;
translations?: TranslationMap;
environment: NamedEntity;
skills: Skill[];
@@ -79,6 +80,7 @@ export interface PokemonDetail extends Pokemon {
export interface Habitat extends EditInfo {
id: number;
name: string;
baseName?: string;
translations?: TranslationMap;
recipe: Array<NamedEntity & { quantity: number }>;
pokemon?: NamedEntity[];
@@ -113,6 +115,7 @@ export interface HabitatUsage {
export interface Item extends EditInfo {
id: number;
name: string;
baseName?: string;
translations?: TranslationMap;
category: NamedEntity;
usage: NamedEntity | null;
@@ -147,6 +150,7 @@ export interface Recipe extends EditInfo {
export interface DailyChecklistItem {
id: number;
title: string;
baseTitle?: string;
translations?: TranslationMap;
}