Revert "Web app to Svelte5 (#540)"

This reverts commit c534c27ae3.
This commit is contained in:
Brahim Hadriche committed 2025-01-09 21:54:08 -05:00
1 parent f987558884
commit aab20f2364
35 files changed
+2336 -1729

No files matched your search

+4 -4
View File
@@ -1,4 +1,4 @@
import { translate } from "lib/Stores";
import { tr } from "lib/Stores";
import { PlayletApi } from "./PlayletApi";
import { get } from "svelte/store";
@@ -31,14 +31,14 @@ export async function fetchLocale(locale: string) {
}
translations[source[0].textContent] = translation[0].textContent;
}
translate.set((s) => translations[s] || s);
tr.set((s) => translations[s] || s);
} catch (error) {
console.error(error);
}
}
export function getPluralString(c: number, zeroString: string, oneString: string, pluralString: string) {
const trFn = get(translate);
const trFn = get(tr);
c = c || 0;
if (c === 0) {
@@ -51,7 +51,7 @@ export function getPluralString(c: number, zeroString: string, oneString: string
}
export function getFormattedPluralString(c: number, zeroString: string, oneString: string, pluralString: string) {
const trFn = get(translate);
const trFn = get(tr);
c = c || 0;
if (c === 0) {