mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
Merge main into fix/earthquake-click-details
Resolves conflicts with main: a world focus target's own range past its framed radius replaces the kind's range (#1832), so a quake asks for its own range only past M6 and the earthquake framing stays its floor; FIRMS keeps main's marker stand-in under the card-on-top rule; launches keep main's label click and also read the card on top through the pick registry.
This commit is contained in:
commit
e87aa5190d
1337 files changed
+38638
-9950
No files matched your search
@@ -544,7 +544,7 @@ test('retention never revives an incumbent card after the observation window exp
|
||||
test('all heights and the sampled fallback use the same sightings-in-view count label', () => {
|
||||
const h = harness();
|
||||
h.state.renderedRows = [sighting];
|
||||
assert.equal(h.layer.getStats().countLabel, '1 sightings in view');
|
||||
assert.equal(h.layer.getStats().countLabel, '1 sighting in view');
|
||||
h.state.sightingCount = 2000;
|
||||
assert.equal(h.layer.getStats().count, 2000);
|
||||
assert.equal(
|
||||
@@ -562,6 +562,32 @@ test('all heights and the sampled fallback use the same sightings-in-view count
|
||||
}
|
||||
});
|
||||
|
||||
test('the sightings count takes the plural form of its number', (t) => {
|
||||
t.after(() => setLocale('en'));
|
||||
const h = harness();
|
||||
const label = (count) => {
|
||||
h.state.sightingCount = count;
|
||||
return h.layer.getStats().countLabel;
|
||||
};
|
||||
setLocale('ru');
|
||||
assert.equal(label(1), '1 наблюдение в кадре');
|
||||
assert.equal(label(3), '3 наблюдения в кадре');
|
||||
assert.equal(label(5), '5 наблюдений в кадре');
|
||||
setLocale('de');
|
||||
assert.equal(label(1), '1 Beobachtung im Bild');
|
||||
assert.equal(label(2000), '2.000 Beobachtungen im Bild');
|
||||
});
|
||||
|
||||
test('the CONFIRMED chip names the sightings, apart from a confirmed launch landing', (t) => {
|
||||
t.after(() => setLocale('en'));
|
||||
const h = harness();
|
||||
assert.equal(h.chip('quality-confirmed').label, 'CONFIRMED');
|
||||
setLocale('sv');
|
||||
assert.equal(h.chip('quality-confirmed').label, 'BEKRÄFTADE');
|
||||
setLocale('es');
|
||||
assert.equal(h.chip('quality-confirmed').label, 'CONFIRMADOS');
|
||||
});
|
||||
|
||||
test('a stale fallback with a failed-refresh deadline remains DEGRADED, retryable and dated to the cached data', async () => {
|
||||
const h = harness({
|
||||
getSnapshotDetail: async () => ({
|
||||
|
||||
+9
-5
@@ -1,4 +1,4 @@
|
||||
import { t, formatNumber, translateKnown } from '../../i18n/index.js';
|
||||
import { t, tn, formatNumber, translateKnown } from '../../i18n/index.js';
|
||||
import { msg } from '../../i18n/marker.js';
|
||||
import { translateFeedError } from '../../ui/statusText.js';
|
||||
import { wildlifeIconicGroup } from './model.js';
|
||||
@@ -138,7 +138,8 @@ export function createControls({ state, services, parts }) {
|
||||
const chips = [
|
||||
chip({
|
||||
id: WILDLIFE_CONFIRMED_CHIP_ID,
|
||||
label: t('CONFIRMED'),
|
||||
// The sightings, plural; a launch landing is CONFIRMED alone.
|
||||
label: t('CONFIRMED', { context: 'sightings filter' }),
|
||||
title: t('Show only community-confirmed (research-grade) sightings'),
|
||||
params: {
|
||||
confirmed: confirmedFailed ? state.confirmed : !state.confirmed,
|
||||
@@ -215,9 +216,12 @@ export function createControls({ state, services, parts }) {
|
||||
stale: state.stale,
|
||||
loading,
|
||||
refreshing,
|
||||
countLabel: t('{count} sightings in view', {
|
||||
count: formatNumber(count),
|
||||
}),
|
||||
countLabel: tn(
|
||||
count,
|
||||
'{count} sighting in view',
|
||||
'{count} sightings in view',
|
||||
{ count: formatNumber(count) },
|
||||
),
|
||||
loadingLabel: loading
|
||||
? t('loading...')
|
||||
: refreshing
|
||||
|
||||
@@ -1939,7 +1939,7 @@ test('unavailable grids fail closed to visible sampled sprites without a global
|
||||
assert.equal(h.clicks.collection.values[0].id, 'wildlife:inat:1');
|
||||
assert.ok(h.clicks.collection.values[0].size[0] * 0.5 >= 8);
|
||||
assert.equal(h.layer.getStats().count, 1);
|
||||
assert.match(h.layer.getStats().countLabel, /sightings in view/);
|
||||
assert.equal(h.layer.getStats().countLabel, '1 sighting in view');
|
||||
assert.equal(h.layer.getStats().partial, undefined);
|
||||
assert.equal(layerFeedState(h.layer.getStats()), 'degraded');
|
||||
assert.match(h.layer.getStats().error, /Malformed iNaturalist grid response/);
|
||||
@@ -1976,7 +1976,7 @@ test('an oversized view coarsens to a complete grid within the six-tile cap', as
|
||||
await h.update();
|
||||
assert.equal(h.clicks.collection.values.length, 1);
|
||||
assert.equal(h.clicks.collection.values[0].id, 'wildlife:inat:1');
|
||||
assert.match(h.layer.getStats().countLabel, /sightings in view/);
|
||||
assert.match(h.layer.getStats().countLabel, /sightings? in view/);
|
||||
assert.equal(layerFeedState(h.layer.getStats()), 'nominal');
|
||||
h.layer.destroy();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user