Use label_format in number_range input control

This commit is contained in:
Misode
2025-05-17 23:45:04 +02:00
parent 511311572d
commit c2b11f40cb
3 changed files with 3 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ function TextPart({ part, lang, oneline }: { part: PartData, lang: Record<string
}
function resolveTranslate(translate: string, fallback: string | undefined, with_: any[] | undefined, lang: Record<string, string>): string {
const str = lang[translate] ?? fallback
const str = lang[translate] ?? fallback ?? translate
if (typeof str !== 'string') return translate
const params = with_?.map((c): string => {
if (typeof c === 'string' || typeof c === 'number') return `${c}`

View File

@@ -220,8 +220,7 @@ function InputControl({ input }: { input: any }) {
}
if (type === 'number_range') {
// TODO: use label_format
const label = {translate: 'options.generic_value', with: [input.label ?? '', input.start ?? 0]}
const label = {translate: input.label_format ?? 'options.generic_value', with: [input.label ?? '', input.start ?? 0]}
return <div class="dialog-slider" style={`width: ${px(input.width ?? 200)}; height: ${px(20)};`}>
<div class="dialog-slider-track"></div>
<div class="dialog-slider-handle"></div>

View File

@@ -1981,6 +1981,7 @@ hr {
display: flex;
align-items: center;
justify-content: center;
padding-bottom: var(--dialog-px);
}
.project-files {