fix(shipwrecks): small row and query fixes: era counts in one pass, pickers list only years with a wreck, no Portuguese default

- The legend counted each era twice, scanning every record eight times per
  row refresh; it now counts once.
- Each year picker listed every year from the oldest dated wreck (well over
  a thousand entries); it lists the years that have a wreck, plus the chosen
  ends.
- Labels fell back to Portuguese and links to Portuguese Wikipedia while the
  app ships 11 locales: labels now fall back through the app's languages
  after English, and a wreck with no English article links its Wikidata
  item, which lists the article in every language.
This commit is contained in:
Sameh Khamis committed 2026-11-10 13:29:25 -08:00
1 parent 38cf1e2be5
commit 0c159186f9
5 files changed
+71 -17

No files matched your search

+5
View File
@@ -307,3 +307,8 @@ test('the query reads the end of service with its precision', () => {
);
assert.doesNotMatch(WIKIDATA_QUERY, /wdt:P576/);
});
test('labels and links do not default to one other language', () => {
assert.doesNotMatch(WIKIDATA_QUERY, /ptwiki|pt\.wikipedia/);
assert.match(WIKIDATA_QUERY, /wikibase:language "en,mul,/);
});