mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
i18n: follow-up to the review of the plural and context fixes
- The street-level plan step names its place the way show_street_level reads its arguments: a pointed or numbered thing has no place yet, and "this spot" needs both coordinates. - The view-centre error message is removed: the Street Level layer always gives its own translated text for an empty search, so it never showed. "the view centre" is one exported constant for both voice modules. - The orbital site status uses the word of the FOCUS card in es, fr, it, pt and he, and the Wildlife chip agrees with "avistamientos" and "avvistamenti". - CURRENTLY OVER is the noun for an overflight in de, uk, it and pt, shorter than before, so the place name keeps its room on a phone. - The glossaries record the new terms; I18N.md words two rules more exactly.
This commit is contained in:
1 parent
3953421aad
commit
69fa1bf222
30 files changed
+80
-75
No files matched your search
+10
-15
@@ -332,16 +332,6 @@ const ERROR_PATTERNS = [
|
||||
place: localizePlaceName(place),
|
||||
}),
|
||||
],
|
||||
// show_street_level names no place when it looks at the view centre. The
|
||||
// phrase is not a name: it has a message of its own, so each language
|
||||
// words it in the case its preposition asks for.
|
||||
[
|
||||
/^No (.+) imagery near the view centre$/,
|
||||
([, source]) =>
|
||||
t('No {source} imagery near the view centre', {
|
||||
source: translateKnown(source),
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^No (.+) imagery near (.+)$/,
|
||||
([, source, place]) =>
|
||||
@@ -1122,15 +1112,20 @@ export function planStepLabel(name, args = {}) {
|
||||
}
|
||||
case 'show_street_level': {
|
||||
const source = STREET_LEVEL_SOURCE_NAMES[args.provider];
|
||||
const query = String(args.query || '').trim();
|
||||
// A pointed or numbered thing is found later (deixis): no place yet.
|
||||
if (query.toLowerCase() === 'pointer' || args.referent != null)
|
||||
return source || t('Street Level');
|
||||
// "This spot" and "the view centre" are phrases, not place names:
|
||||
// each is a message of its own, worded in the grammar of the language.
|
||||
if (args.query) {
|
||||
const place = shownPlace(args.query, 32);
|
||||
if (query) {
|
||||
const place = shownPlace(query, 32);
|
||||
return source
|
||||
? t('{source} at {place}', { source, place })
|
||||
: t('Street level at {place}', { place });
|
||||
}
|
||||
if (args.latitude != null)
|
||||
// Coordinates count only as a pair, as show_street_level reads them.
|
||||
if (args.latitude != null && args.longitude != null)
|
||||
return source
|
||||
? t('{source} at this spot', { source })
|
||||
: t('Street level at this spot');
|
||||
@@ -1212,8 +1207,8 @@ export function narrationLabel(name, args = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
/** The place show_street_level reports when it names none (gevActions). */
|
||||
const VIEW_CENTRE_LABEL = 'the view centre';
|
||||
/** The place show_street_level reports when it names none. */
|
||||
export const VIEW_CENTRE_LABEL = 'the view centre';
|
||||
|
||||
/** On-screen labels for progress steps. */
|
||||
const STEP_LABELS = Object.freeze({
|
||||
|
||||
Reference in new issue
Block a user