mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(i18n): wording, dates and directions from the cross-model review
Two other models reviewed the ru and es review PDFs. What held up:
- Directions: Russian reads "держитесь левее" at a fork and "займите
левую полосу" for a lane, Spanish "toma el carril izquierdo". Forks and
lanes get their own direction words; English is unchanged.
- Weather timestamps read "13.10 19:04 UTC" / "13/10 19:04 UTC" instead
of "10-13", which read as a range. English keeps "10-13".
- Cockpit coordinates write the hemisphere out in Russian ("30,312° с.
ш."): a lone «С» after a degree sign read as Celsius.
- A layer whose source joins several providers shows each name in the UI
language ("Mapillary · Google Просмотр улиц").
- Vessel speed uses the locale's decimal separator.
- Layer names no longer hyphenate into two-letter pieces ("es-paciales").
- Catalog: wrong meanings (cyclone centre, STREAMING, credited source,
"DE OÍDAS"), calques ("Пацифика", "Активная погода", "Прочитать вид",
"referrer", worker), Russian "щёлкните по …", shorter Spanish labels
that were cut (voice status, PREAJUSTES, search placeholder) and one
term per concept.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
005b4dc9dc
commit
eed05721f2
13 files changed
+278
-134
No files matched your search
@@ -164,6 +164,32 @@ export function formatDate(value, options) {
|
||||
return cachedFormatter('date', Intl.DateTimeFormat, options).format(value);
|
||||
}
|
||||
|
||||
const UTC_DAY_MONTH = Object.freeze({
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
timeZone: 'UTC',
|
||||
});
|
||||
|
||||
/**
|
||||
* The UTC day and month of a time, for "MM-DD HH:MM UTC" readouts: "10-13" in
|
||||
* English (as before), "13.10" in Russian, "13/10" in Spanish, never read as a
|
||||
* range. Takes an ISO string (its date part is used as written) or a time.
|
||||
* @param {string|number|Date} value
|
||||
* @returns {string} '' when the value is not a time.
|
||||
*/
|
||||
export function formatUtcDayMonth(value) {
|
||||
const written =
|
||||
typeof value === 'string' ? /^(\d{4})-(\d{2})-(\d{2})/.exec(value) : null;
|
||||
const time = written
|
||||
? Date.UTC(Number(written[1]), Number(written[2]) - 1, Number(written[3]))
|
||||
: new Date(value).getTime();
|
||||
if (!Number.isFinite(time)) return '';
|
||||
if (currentLocale === 'en') return new Date(time).toISOString().slice(5, 10);
|
||||
return cachedFormatter('date', Intl.DateTimeFormat, UTC_DAY_MONTH).format(
|
||||
time,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Locale-aware relative time (Intl.RelativeTimeFormat), e.g.
|
||||
* formatRelativeTime(-5, 'minute') → '5 minutes ago' / '5 минут назад'.
|
||||
|
||||
Reference in new issue
Block a user