diff --git a/ts/congrats/CongratsPage.svelte b/ts/congrats/CongratsPage.svelte index 908339fef..5f3a2f842 100644 --- a/ts/congrats/CongratsPage.svelte +++ b/ts/congrats/CongratsPage.svelte @@ -1,23 +1,22 @@ diff --git a/ts/congrats/index.ts b/ts/congrats/index.ts index e56123e56..d134011a3 100644 --- a/ts/congrats/index.ts +++ b/ts/congrats/index.ts @@ -9,10 +9,10 @@ import CongratsPage from "./CongratsPage.svelte"; export async function congrats(target: HTMLDivElement): Promise { checkNightMode(); - const i18n = await setupI18n(); + await setupI18n(); const info = await getCongratsInfo(); new CongratsPage({ target, - props: { info, i18n }, + props: { info }, }); } diff --git a/ts/congrats/lib.ts b/ts/congrats/lib.ts index a50c74665..d587a7645 100644 --- a/ts/congrats/lib.ts +++ b/ts/congrats/lib.ts @@ -4,7 +4,8 @@ import pb from "anki/backend_proto"; import { postRequest } from "anki/postrequest"; import { naturalUnit, unitAmount, unitName } from "anki/time"; -import type { I18n } from "anki/i18n"; + +import * as tr from "anki/i18n"; export async function getCongratsInfo(): Promise { return pb.BackendProto.CongratsInfoOut.decode( @@ -12,10 +13,7 @@ export async function getCongratsInfo(): Promise 86_400) { @@ -25,11 +23,11 @@ export function buildNextLearnMsg( const unit = naturalUnit(secsUntil); const amount = Math.round(unitAmount(unit, secsUntil)); const unitStr = unitName(unit); - const nextLearnDue = i18n.schedulingNextLearnDue({ + const nextLearnDue = tr.schedulingNextLearnDue({ amount, unit: unitStr, }); - const remaining = i18n.schedulingLearnRemaining({ + const remaining = tr.schedulingLearnRemaining({ remaining: info.learnRemaining, }); return `${nextLearnDue} ${remaining}`; diff --git a/ts/graphs/AddedGraph.svelte b/ts/graphs/AddedGraph.svelte index 3d7e9208a..3c82b8ee7 100644 --- a/ts/graphs/AddedGraph.svelte +++ b/ts/graphs/AddedGraph.svelte @@ -1,5 +1,4 @@ - + - + - + diff --git a/ts/graphs/ButtonsGraph.svelte b/ts/graphs/ButtonsGraph.svelte index d6c6147d5..ea2a61b49 100644 --- a/ts/graphs/ButtonsGraph.svelte +++ b/ts/graphs/ButtonsGraph.svelte @@ -1,6 +1,5 @@ - + - + diff --git a/ts/graphs/CalendarGraph.svelte b/ts/graphs/CalendarGraph.svelte index 3865745ed..3d352020f 100644 --- a/ts/graphs/CalendarGraph.svelte +++ b/ts/graphs/CalendarGraph.svelte @@ -1,6 +1,6 @@ @@ -88,6 +87,6 @@ - + diff --git a/ts/graphs/CardCounts.svelte b/ts/graphs/CardCounts.svelte index 4e4f8100e..06aaf4feb 100644 --- a/ts/graphs/CardCounts.svelte +++ b/ts/graphs/CardCounts.svelte @@ -1,7 +1,6 @@