docs(i18n): tighten the Mapped Installations status comments

This commit is contained in:
German Khokhlov committed 2026-11-18 16:48:59 +04:00
1 parent 93b091d082
commit dc13be07c0
4 files changed
+8 -13

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
import { msg } from '../i18n/marker.js';
// installationFeedback() is English data; ui/statusText.js shows it translated.
// installationFeedback() stays English for the analyst. ui/statusText.js and
// ui/shellFeedback.js (HUD) translate it: keep both in step with this wording.
const REASONS = Object.freeze({
rate_limited: msg('Overpass rate-limited'),
timeout: msg('Overpass timed out'),
+1 -2
View File
@@ -259,8 +259,7 @@ export function createControls({ state: layerState, services, parts, source }) {
retryAt: layerState.retryAt,
retrying: layerState.loading && Boolean(layerState.failureReason),
failureReason: layerState.failureReason,
// English data: it is also the analyst's empty note to the model.
// Displays translate it by its shape (ui/statusText.js).
// English: the analyst reads it as is; displays translate it.
statusMessage: installationFeedback({
...layerState,
count: layerState.lastUpdate ? mappedCount : undefined,
@@ -1,6 +1,4 @@
// getStats().statusMessage is English data (it is also the analyst's empty
// note to the model); the displays show it in the UI language through
// translateStatusPiece (ui/statusText.js).
// statusMessage stays English (the analyst's empty note); displays translate it.
import test from 'node:test';
import assert from 'node:assert/strict';
import { setLocale, t, tn, translateKnown } from '../../i18n/index.js';
@@ -26,8 +24,7 @@ function inLocale(locale, run) {
}
}
// Each layer state, the English statusMessage it reports, and how the UI
// shows it. A retry a minute out reads "60s" (rounded up).
// A retry a minute out reads "60s" (rounded up).
const cases = [
[
{ status: 'empty', lastUpdate: 1 },
+3 -5
View File
@@ -242,10 +242,8 @@ const STATUS_PIECE_PATTERNS = [
],
];
// Mapped Installations feedback (installationFeedback in
// data/installationFeedback.js): getStats().statusMessage is English data, and
// the Layers panel, the toast, the awareness panel and the voice card's analyst
// note show it through here. Keep these in step with that helper.
// Shapes of installationFeedback() (data/installationFeedback.js), which stays
// English for the analyst. Keep them in step with its wording.
const MAPPED_SITE_PATTERNS = [
[
/^(.+) — retrying in (\d+)s$/,
@@ -289,7 +287,7 @@ const MAPPED_SITE_PATTERNS = [
],
];
// Every status piece shape, in matching order.
// First match wins.
const STATUS_SHAPES = [...STATUS_PIECE_PATTERNS, ...MAPPED_SITE_PATTERNS];
/** A status piece by its shape in the UI language, or null. */