feat(seed): nordiska högtider (NO/DK/FI/IS) + nameLocalized (MIKRO C1)
CI / Typecheck, test & build (push) Failing after 43s
CI / Typecheck, test & build (push) Failing after 43s
This commit is contained in:
@@ -7,11 +7,14 @@ export interface SeedSeasonEvent {
|
||||
id: string;
|
||||
slug: string;
|
||||
nameSv: string;
|
||||
nameLocalized: string;
|
||||
market: string;
|
||||
dateRule:
|
||||
| { kind: "fixed"; monthDay: string }
|
||||
| { kind: "range"; startMonthDay: string; endMonthDay: string }
|
||||
| { kind: "computed"; algorithm: "midsummer" | "easter" | "advent" | "custom" };
|
||||
| { kind: "computed"; algorithm: "midsummer" | "easter" | "advent" | "custom" }
|
||||
| { kind: "easter-offset"; days: number }
|
||||
| { kind: "nth-weekday"; month: number; weekday: number; n: number | "last" };
|
||||
leadDays: number;
|
||||
foodTags: string[];
|
||||
recipeSlugs: string[];
|
||||
@@ -23,6 +26,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-midsommar",
|
||||
slug: "midsommar",
|
||||
nameSv: "Midsommar",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "computed", algorithm: "midsummer" },
|
||||
leadDays: 10,
|
||||
@@ -34,6 +38,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-jul",
|
||||
slug: "jul",
|
||||
nameSv: "Jul",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "range", startMonthDay: "12-20", endMonthDay: "12-26" },
|
||||
leadDays: 21,
|
||||
@@ -45,6 +50,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-pask",
|
||||
slug: "påsk",
|
||||
nameSv: "Påsk",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "computed", algorithm: "easter" },
|
||||
leadDays: 10,
|
||||
@@ -56,6 +62,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-nyar",
|
||||
slug: "nyår",
|
||||
nameSv: "Nyårsafton",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "fixed", monthDay: "12-31" },
|
||||
leadDays: 7,
|
||||
@@ -67,6 +74,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-kraftskiva",
|
||||
slug: "kraftskiva",
|
||||
nameSv: "Kräftskivepremiär",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "range", startMonthDay: "08-01", endMonthDay: "08-31" },
|
||||
leadDays: 7,
|
||||
@@ -78,6 +86,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-surstromming",
|
||||
slug: "surstromming",
|
||||
nameSv: "Surströmmingspremiär",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "fixed", monthDay: "08-15" },
|
||||
leadDays: 5,
|
||||
@@ -89,6 +98,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-lucia",
|
||||
slug: "lucia",
|
||||
nameSv: "Lucia",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "fixed", monthDay: "12-13" },
|
||||
leadDays: 7,
|
||||
@@ -100,6 +110,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-valborg",
|
||||
slug: "valborg",
|
||||
nameSv: "Valborg",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "fixed", monthDay: "04-30" },
|
||||
leadDays: 5,
|
||||
@@ -111,6 +122,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-grillsasong",
|
||||
slug: "grillsasong",
|
||||
nameSv: "Grillsäsong",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "range", startMonthDay: "05-15", endMonthDay: "08-31" },
|
||||
leadDays: 0,
|
||||
@@ -122,6 +134,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-skolstart",
|
||||
slug: "skolstart",
|
||||
nameSv: "Skolstart",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "range", startMonthDay: "08-10", endMonthDay: "08-31" },
|
||||
leadDays: 7,
|
||||
@@ -133,6 +146,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "se-alla-hjartans",
|
||||
slug: "alla-hjartans-dag",
|
||||
nameSv: "Alla hjärtans dag",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "fixed", monthDay: "02-14" },
|
||||
leadDays: 5,
|
||||
@@ -144,6 +158,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "int-halloween",
|
||||
slug: "halloween",
|
||||
nameSv: "Halloween",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "fixed", monthDay: "10-31" },
|
||||
leadDays: 7,
|
||||
@@ -155,6 +170,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "int-oktoberfest",
|
||||
slug: "oktoberfest",
|
||||
nameSv: "Oktoberfest",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
dateRule: { kind: "range", startMonthDay: "09-20", endMonthDay: "10-05" },
|
||||
leadDays: 5,
|
||||
@@ -166,6 +182,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "int-thanksgiving",
|
||||
slug: "thanksgiving",
|
||||
nameSv: "Thanksgiving",
|
||||
nameLocalized: "",
|
||||
market: "US",
|
||||
dateRule: { kind: "range", startMonthDay: "11-20", endMonthDay: "11-28" },
|
||||
leadDays: 10,
|
||||
@@ -177,6 +194,7 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
id: "int-ramadan-eid",
|
||||
slug: "eid",
|
||||
nameSv: "Eid al-Fitr",
|
||||
nameLocalized: "",
|
||||
market: "SE",
|
||||
// Rörligt datum (månkalender) – uppdateras årligen av admin tills kalenderconnector finns.
|
||||
dateRule: { kind: "computed", algorithm: "custom" },
|
||||
@@ -185,4 +203,248 @@ export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
// --- Norge (NO) ---
|
||||
{
|
||||
id: "no-julaften",
|
||||
slug: "julaften",
|
||||
nameSv: "Julaften",
|
||||
nameLocalized: "Julaften",
|
||||
market: "NO",
|
||||
dateRule: { kind: "fixed", monthDay: "12-24" },
|
||||
leadDays: 21,
|
||||
foodTags: ["ribbe", "pinnekjott", "lutefisk", "surkal", "riskrem", "medisterkake"],
|
||||
recipeSlugs: [],
|
||||
priority: 100,
|
||||
},
|
||||
{
|
||||
id: "no-paske",
|
||||
slug: "paske",
|
||||
nameSv: "Påske",
|
||||
nameLocalized: "Påske",
|
||||
market: "NO",
|
||||
dateRule: { kind: "computed", algorithm: "easter" },
|
||||
leadDays: 10,
|
||||
foodTags: ["lam", "egg", "appelsin", "marsipan", "paskeol"],
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
{
|
||||
id: "no-sankthans",
|
||||
slug: "sankthans",
|
||||
nameSv: "Sankthansaften",
|
||||
nameLocalized: "Sankthansaften",
|
||||
market: "NO",
|
||||
dateRule: { kind: "fixed", monthDay: "06-23" },
|
||||
leadDays: 7,
|
||||
foodTags: ["grillmat", "rommegrot", "spekemat", "jordbaer", "reker"],
|
||||
recipeSlugs: [],
|
||||
priority: 80,
|
||||
},
|
||||
{
|
||||
id: "no-nyttarsaften",
|
||||
slug: "nyttarsaften",
|
||||
nameSv: "Nyttårsaften",
|
||||
nameLocalized: "Nyttårsaften",
|
||||
market: "NO",
|
||||
dateRule: { kind: "fixed", monthDay: "12-31" },
|
||||
leadDays: 7,
|
||||
foodTags: ["pinnekjott", "torsk", "reker", "kransekake"],
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
{
|
||||
id: "no-farikal",
|
||||
slug: "farikalens-festdag",
|
||||
nameSv: "Fårikålens festdag",
|
||||
nameLocalized: "Fårikålens festdag",
|
||||
market: "NO",
|
||||
dateRule: { kind: "nth-weekday", month: 9, weekday: 4, n: "last" },
|
||||
leadDays: 5,
|
||||
foodTags: ["far", "kal", "pepperkorn", "potet"],
|
||||
recipeSlugs: [],
|
||||
priority: 80,
|
||||
},
|
||||
// --- Danmark (DK) ---
|
||||
{
|
||||
id: "dk-juleaften",
|
||||
slug: "juleaften",
|
||||
nameSv: "Juleaften",
|
||||
nameLocalized: "Juleaften",
|
||||
market: "DK",
|
||||
dateRule: { kind: "fixed", monthDay: "12-24" },
|
||||
leadDays: 21,
|
||||
foodTags: ["flaeskesteg", "and", "rodkal", "brunede-kartofler", "risalamande"],
|
||||
recipeSlugs: [],
|
||||
priority: 100,
|
||||
},
|
||||
{
|
||||
id: "dk-paske",
|
||||
slug: "paske",
|
||||
nameSv: "Påske",
|
||||
nameLocalized: "Påske",
|
||||
market: "DK",
|
||||
dateRule: { kind: "computed", algorithm: "easter" },
|
||||
leadDays: 7,
|
||||
foodTags: ["sild", "aeg", "lammesteg", "nye-kartofler", "snaps"],
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
{
|
||||
id: "dk-nytarsaften",
|
||||
slug: "nytarsaften",
|
||||
nameSv: "Nytårsaften",
|
||||
nameLocalized: "Nytårsaften",
|
||||
market: "DK",
|
||||
dateRule: { kind: "fixed", monthDay: "12-31" },
|
||||
leadDays: 7,
|
||||
foodTags: ["kogt-torsk", "kransekage", "marcipan"],
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
{
|
||||
id: "dk-julefrokost",
|
||||
slug: "julefrokost",
|
||||
nameSv: "Julefrokost",
|
||||
nameLocalized: "Julefrokost",
|
||||
market: "DK",
|
||||
dateRule: { kind: "range", startMonthDay: "12-01", endMonthDay: "12-30" },
|
||||
leadDays: 7,
|
||||
foodTags: ["sild", "frikadeller", "leverpostej", "ribbensteg", "snaps"],
|
||||
recipeSlugs: [],
|
||||
priority: 80,
|
||||
},
|
||||
{
|
||||
id: "dk-mortensaften",
|
||||
slug: "mortensaften",
|
||||
nameSv: "Mortensaften",
|
||||
nameLocalized: "Mortensaften",
|
||||
market: "DK",
|
||||
dateRule: { kind: "fixed", monthDay: "11-10" },
|
||||
leadDays: 7,
|
||||
foodTags: ["and", "gas", "rodkal", "brunede-kartofler", "brun-sovs"],
|
||||
recipeSlugs: [],
|
||||
priority: 75,
|
||||
},
|
||||
// --- Finland (FI) ---
|
||||
{
|
||||
id: "fi-joulu",
|
||||
slug: "joulu",
|
||||
nameSv: "Jouluaatto",
|
||||
nameLocalized: "Jouluaatto",
|
||||
market: "FI",
|
||||
dateRule: { kind: "fixed", monthDay: "12-24" },
|
||||
leadDays: 21,
|
||||
foodTags: ["joulukinkku", "lanttulaatikko", "rosolli", "graavilohi", "joulutorttu"],
|
||||
recipeSlugs: [],
|
||||
priority: 100,
|
||||
},
|
||||
{
|
||||
id: "fi-paasiainen",
|
||||
slug: "paasiainen",
|
||||
nameSv: "Pääsiäinen",
|
||||
nameLocalized: "Pääsiäinen",
|
||||
market: "FI",
|
||||
dateRule: { kind: "computed", algorithm: "easter" },
|
||||
leadDays: 7,
|
||||
foodTags: ["mammi", "pasha", "lammas", "suklaamuna"],
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
{
|
||||
id: "fi-juhannus",
|
||||
slug: "juhannus",
|
||||
nameSv: "Juhannus",
|
||||
nameLocalized: "Juhannus",
|
||||
market: "FI",
|
||||
dateRule: { kind: "computed", algorithm: "midsummer" },
|
||||
leadDays: 7,
|
||||
foodTags: ["grillimakkara", "uudet-perunat", "silli", "graavilohi"],
|
||||
recipeSlugs: [],
|
||||
priority: 85,
|
||||
},
|
||||
{
|
||||
id: "fi-rapujuhlat",
|
||||
slug: "rapujuhlat",
|
||||
nameSv: "Rapujuhlat",
|
||||
nameLocalized: "Rapujuhlat",
|
||||
market: "FI",
|
||||
dateRule: { kind: "range", startMonthDay: "07-21", endMonthDay: "09-30" },
|
||||
leadDays: 7,
|
||||
foodTags: ["rapu", "tilli", "ruisleipa", "snapsi"],
|
||||
recipeSlugs: [],
|
||||
priority: 80,
|
||||
},
|
||||
{
|
||||
id: "fi-vappu",
|
||||
slug: "vappu",
|
||||
nameSv: "Vappu",
|
||||
nameLocalized: "Vappu",
|
||||
market: "FI",
|
||||
dateRule: { kind: "fixed", monthDay: "05-01" },
|
||||
leadDays: 7,
|
||||
foodTags: ["sima", "tippaleipa", "munkki"],
|
||||
recipeSlugs: [],
|
||||
priority: 75,
|
||||
},
|
||||
// --- Island (IS) ---
|
||||
{
|
||||
id: "is-adfangadagur",
|
||||
slug: "adfangadagur",
|
||||
nameSv: "Aðfangadagur",
|
||||
nameLocalized: "Aðfangadagur",
|
||||
market: "IS",
|
||||
dateRule: { kind: "fixed", monthDay: "12-24" },
|
||||
leadDays: 21,
|
||||
foodTags: ["hamborgarhryggur", "hangikjot", "laufabraud", "rjupa"],
|
||||
recipeSlugs: [],
|
||||
priority: 100,
|
||||
},
|
||||
{
|
||||
id: "is-paskar",
|
||||
slug: "paskar",
|
||||
nameSv: "Páskar",
|
||||
nameLocalized: "Páskar",
|
||||
market: "IS",
|
||||
dateRule: { kind: "computed", algorithm: "easter" },
|
||||
leadDays: 5,
|
||||
foodTags: ["lambakjot", "lambalaeri", "paskaegg"],
|
||||
recipeSlugs: [],
|
||||
priority: 90,
|
||||
},
|
||||
{
|
||||
id: "is-thorrablot",
|
||||
slug: "thorrablot",
|
||||
nameSv: "Þorrablót",
|
||||
nameLocalized: "Þorrablót",
|
||||
market: "IS",
|
||||
dateRule: { kind: "range", startMonthDay: "01-23", endMonthDay: "02-22" },
|
||||
leadDays: 7,
|
||||
foodTags: ["hakarl", "svid", "hangikjot", "hardfiskur", "brennivin"],
|
||||
recipeSlugs: [],
|
||||
priority: 80,
|
||||
},
|
||||
{
|
||||
id: "is-sprengidagur",
|
||||
slug: "sprengidagur",
|
||||
nameSv: "Sprengidagur",
|
||||
nameLocalized: "Sprengidagur",
|
||||
market: "IS",
|
||||
dateRule: { kind: "easter-offset", days: -47 },
|
||||
leadDays: 3,
|
||||
foodTags: ["saltkjot", "baunir", "gulrofa"],
|
||||
recipeSlugs: [],
|
||||
priority: 70,
|
||||
},
|
||||
{
|
||||
id: "is-thorlaksmessa",
|
||||
slug: "thorlaksmessa",
|
||||
nameSv: "Þorláksmessa",
|
||||
nameLocalized: "Þorláksmessa",
|
||||
market: "IS",
|
||||
dateRule: { kind: "fixed", monthDay: "12-23" },
|
||||
leadDays: 5,
|
||||
foodTags: ["skata", "hangikjot", "rugbraud"],
|
||||
recipeSlugs: [],
|
||||
priority: 70,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -592,6 +592,7 @@ async function main() {
|
||||
id: ev.id,
|
||||
slug: ev.slug,
|
||||
nameSv: ev.nameSv,
|
||||
nameLocalized: ev.nameLocalized,
|
||||
market: ev.market,
|
||||
dateRule: ev.dateRule,
|
||||
leadDays: ev.leadDays,
|
||||
|
||||
Reference in New Issue
Block a user