fix(voice): show FIRMS and ALPR entity labels translated on the voice card

The pointer chip, its live-region line and the get_entity_context card
title now translate the English entity labels the FIRMS and ALPR layers
register ("Fire · FRP {frp} MW", "ALPR camera"). Other names, such as
callsigns and place names, show as they came.
This commit is contained in:
daikaginza committed 2026-10-17 07:32:38 +07:00
1 parent 93ea088f45
commit 681ec84748
3 files changed
+77 -6

No files matched your search

+8 -3
View File
@@ -1,4 +1,9 @@
import { planStepLabel, progressStepLabel, spokenLabel } from './speech.js';
import {
planStepLabel,
progressStepLabel,
shownEntityLabel,
spokenLabel,
} from './speech.js';
import { presentResult } from './resultDisplay.js';
import { MAX_DISPLAYED_REFERENTS, normalizeReferents } from './referents.js';
@@ -132,7 +137,7 @@ export function reduceVoiceCard(state, event) {
return reveal({
...state,
pointer,
announce: `${kind}: ${spokenLabel(pointer.label, 32)}`,
announce: `${kind}: ${spokenLabel(shownEntityLabel(pointer.label), 32)}`,
});
}
case 'transcript': {
@@ -288,7 +293,7 @@ export function voiceCardView(state) {
pointer: {
visible: Boolean(state.pointer),
kind: state.pointer?.kind === 'here' ? t('HERE') : t('THIS'),
text: spokenLabel(state.pointer?.label || '', 32),
text: spokenLabel(shownEntityLabel(state.pointer?.label || ''), 32),
},
assistant: {
visible: Boolean(state.assistant),