mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(i18n): fix Russian layouts and the gaps the screenshot review found
A review of the Russian UI screenshots found ~90 places where longer words
broke the layout or text was still English. Fixed so they hold for any
language, then shortened where a control is short by design.
- Layout: label columns that size to their text (weather and wind settings,
Recent Imagery slots and opacity, style sliders, display panel), layer
list names and icons, buttons that wrap instead of overflowing (CCTV,
scenes, Bhote Koshi), voice header that always shows the cost, styled
EN | ES | RU chips, voice error tray above the dock.
- t() context: t('CLEAR', { context: 'action' }) is «СБРОСИТЬ» while the sky
stays «ЯСНО»; also used for radio categories, voice states and directions.
- Units and dates follow the locale through src/ui/unitLabels.js
(formatQuantity: localized number, translated unit, non-breaking space):
wind, pressure, cyclones, directions, CCTV, SDR gain, scene timing, flight
tooltip, Recent Imagery dates and resolution.
- Newly translated: directions turn-by-turn steps (built from the maneuver;
English matches the server word for word), HUD mode and summary, voice
card states, radio categories on the globe, CCTV status, layer source
lines, scene dialogs (Cancel, file pickers), Bhote Koshi statuses, titles,
comparison dates and caveat, Recent Imagery notices. Stored data and text
for AI tools stay English.
- es and ru: 1,885 messages each.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3129e531e6
commit
2b6ccad732
71 files changed
+2435
-370
No files matched your search
+26
-1
@@ -4,6 +4,31 @@ import { t } from '../i18n/index.js';
|
||||
// The assistant's name on its card. i18n-ignore: product name
|
||||
const ASSISTANT_NAME = 'GEV';
|
||||
|
||||
/**
|
||||
* The short state label in the voice heading. The heading is a few characters
|
||||
* wide next to the cost readout, so these carry their own `voice` context and
|
||||
* languages can pick shorter words than the shared CONNECTING / OFF labels.
|
||||
* Unknown states show as they are, upper-cased.
|
||||
* @param {string} status machine state (dataset.status)
|
||||
* @returns {string}
|
||||
*/
|
||||
export function voiceStatusLabel(status) {
|
||||
switch (status) {
|
||||
case 'idle':
|
||||
return t('OFF', { context: 'voice' });
|
||||
case 'connecting':
|
||||
return t('CONNECTING', { context: 'voice' });
|
||||
case 'listening':
|
||||
return t('LISTENING', { context: 'voice' });
|
||||
case 'executing':
|
||||
return t('EXECUTING', { context: 'voice' });
|
||||
case 'error':
|
||||
return t('ERROR', { context: 'voice' });
|
||||
default:
|
||||
return String(status || '').toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
export function createVoiceControl({ reset = false } = {}) {
|
||||
let root = document.getElementById('gev-voice-control');
|
||||
if (root && reset) {
|
||||
@@ -18,7 +43,7 @@ export function createVoiceControl({ reset = false } = {}) {
|
||||
root.innerHTML = `
|
||||
<div class="gev-voice-heading">
|
||||
<div class="gev-voice-kicker">${t('AI AGENT')}</div>
|
||||
<div id="gev-voice-status">${t('OFF')}</div>
|
||||
<div id="gev-voice-status">${voiceStatusLabel('idle')}</div>
|
||||
<div class="gev-voice-cost">
|
||||
<button id="gev-voice-tier" class="gev-voice-tier-btn" type="button" aria-pressed="false" title="${t('Voice model tier — applies next session')}">${t('STD')}</button>
|
||||
<span id="gev-voice-cost-value" class="gev-voice-cost-value" data-level="ok" title="${t('Estimated session cost')}">~$0.00</span>
|
||||
|
||||
Reference in new issue
Block a user