Web app to Svelte5 (#541)

* Web app to Svelte5

* ignore ds store

* npm install @rollup/rollup-linux-x64-gnu --save-optional
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2025-01-10 09:15:04 -05:00
1 parent 66990cfd67
commit 68c8f12f9d
36 files changed
+1744 -2332

No files matched your search

+4 -4
View File
@@ -1,4 +1,4 @@
import { tr } from "lib/Stores";
import { translate } 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;
}
tr.set((s) => translations[s] || s);
translate.set((s) => translations[s] || s);
} catch (error) {
console.error(error);
}
}
export function getPluralString(c: number, zeroString: string, oneString: string, pluralString: string) {
const trFn = get(tr);
const trFn = get(translate);
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(tr);
const trFn = get(translate);
c = c || 0;
if (c === 0) {