fix: eliminate guaranteed 404s (ru menaion-bundle, unmapped commemorations)

- loadMenaionBundle: ru resolves to cu bundle (no RU liturgical texts by design)
- autoPreload: fetch cu bundle once; keep ru+cu lives for current month
- calendar view: fetch shared commemorations only for mapped feast CIds
This commit is contained in:
catarrh committed 2026-08-22 00:18:15 +03:00
1 parent c8e11f0af7
commit 610cdca3ad
2 files changed
+8 -4

No files matched your search

+5 -2
View File
@@ -109,9 +109,12 @@ export class App {
const key = 'ponomar-preloaded';
if (localStorage.getItem(key)) return;
const lang = this.settings.language as LanguageCode;
const languages = lang === 'ru' ? ['ru', 'cu'] : [lang];
for (const l of languages) {
const liturgicalLangs = lang === 'ru' || lang === 'cu' ? ['cu'] : [lang];
for (const l of liturgicalLangs) {
await DataCache.fetch(`/data/${l}/menaion-bundle.json`).catch(() => {});
}
const livesLangs = lang === 'ru' ? ['ru', 'cu'] : [lang];
for (const l of livesLangs) {
const mm = String(JDate.today().getMonth()).padStart(2, '0');
await DataCache.fetch(`/data/${l}/lives/${mm}.json`).catch(() => {});
}