mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
- i18n scanner: lastError sink, no false sinks on defaults and ternaries - shared src/i18n/marker.js for modules that only mark strings - wind field messages move to wind/fields.js; CITY_POIS imports from cityPois.js - drop review IDs, change history and stale references from comments and docs Co-Authored-By: Claude Opus 5.5 <[email protected]>
29 lines
1.0 KiB
JavaScript
29 lines
1.0 KiB
JavaScript
// A scalar overlay that cannot be drawn reports a marked English status
|
|
// (rendering.js), which the Wind row shows through t() in the UI language.
|
|
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { setLocale, t } from '../../i18n/index.js';
|
|
import { SCALAR_UNAVAILABLE, WIND_FIELDS } from './fields.js';
|
|
import { fieldUnavailableText } from './rendering.js';
|
|
|
|
for (const locale of ['es', 'ru']) {
|
|
test(`${locale}: every field's unavailable status has a translation`, () => {
|
|
setLocale(locale);
|
|
try {
|
|
const english = Object.keys(WIND_FIELDS)
|
|
.map(fieldUnavailableText)
|
|
.filter((text) => t(text) === text);
|
|
assert.deepEqual(english, []);
|
|
} finally {
|
|
setLocale('en');
|
|
}
|
|
});
|
|
}
|
|
|
|
test('only a known overlay has an unavailable status', () => {
|
|
assert.equal(fieldUnavailableText('constructor'), null);
|
|
assert.equal(fieldUnavailableText('none'), null);
|
|
for (const [overlay, text] of Object.entries(SCALAR_UNAVAILABLE))
|
|
assert.equal(fieldUnavailableText(overlay), text);
|
|
});
|