fix: update i18n - update schema fields descriptions

This commit is contained in:
2026-09-13 07:16:46 +05:00
parent 4de42b1e40
commit 08c9fbce3b
10 changed files with 287 additions and 57 deletions
+55 -1
View File
@@ -203,7 +203,26 @@ export const en: Dict = {
tooManyParts: "Too many parts ({count}). Maximum is 1000.",
toolUnknown: 'No tool is registered under "{id}".',
},
fields: {},
fields: {
amount: "Amount",
background: "Background",
blockSize: "Block size",
channelTolerance: "Channel tolerance",
color: "Color",
colorTolerance: "Color tolerance",
fillColor: "Fill color",
highlightColor: "Highlight color",
lumaThreshold: "Luminance threshold",
mode: "Mode",
opacity: "Opacity",
quality: "Quality",
radius: "Radius",
rarity: "Rarity",
seed: "Seed",
strength: "Strength",
threshold: "Threshold",
width: "Width",
},
groups: {
adjust: "Adjust",
anchor: "Anchor",
@@ -264,5 +283,40 @@ export const en: Dict = {
orientationSquare: "Square — the sides are equal.",
},
},
"show-transparent-png": {
options: {
mode: { binary: "Black & white mask", highlight: "Color highlight" },
},
},
"show-grayscale-pixels-png": {
options: {
mode: { binary: "Black & white mask", highlight: "Color highlight" },
},
},
"show-color-pixels-png": {
options: {
mode: { binary: "Black & white mask", highlight: "Color highlight" },
},
},
"light-pixel-mask-png": {
options: {
mode: { binary: "Black & white mask", highlight: "Color highlight" },
},
},
"dark-pixel-mask-png": {
options: {
mode: { binary: "Black & white mask", highlight: "Color highlight" },
},
},
"unique-color-mask-png": {
options: {
mode: { binary: "Black & white mask", highlight: "Color highlight" },
},
},
"add-noise-png": {
options: {
mode: { mono: "Monochrome grain", color: "Color noise" },
},
},
},
};
+20 -1
View File
@@ -204,7 +204,26 @@ export const ru: Dict = {
tooManyParts: "Слишком много частей ({count}). Ограничение — 1000.",
toolUnknown: "Инструмента с id «{id}» нет в реестре.",
},
fields: {},
fields: {
amount: "Количество",
background: "Фон",
blockSize: "Размер блока",
channelTolerance: "Допуск по каналам",
color: "Цвет",
colorTolerance: "Допуск похожести",
fillColor: "Цвет заливки",
highlightColor: "Цвет подсветки",
lumaThreshold: "Порог яркости",
mode: "Режим",
opacity: "Непрозрачность",
quality: "Качество",
radius: "Радиус",
rarity: "Максимум повторов",
seed: "Сид",
strength: "Сила",
threshold: "Порог",
width: "Ширина",
},
groups: {
adjust: "Коррекция",
anchor: "Привязка",
+10
View File
@@ -33,6 +33,16 @@ export function groupLabel(title: string): string {
return t(title);
}
/** Подпись опции select: словарь `tools[id].options[fieldId][value]`, фолбэк — label из схемы. */
export function optionLabel(
toolId: string,
fieldId: string,
value: string,
fallback: string,
): string {
return getMergedDict().tools[toolId]?.options?.[fieldId]?.[value] ?? fallback;
}
export function verdictText(toolId: string, key: string): string {
return getMergedDict().tools[toolId]?.results?.[key] ?? key;
}