locale for web app (#334)
* locale for web app * more translations * Rename profiles service to avoid locale conflict * More translation work * Lint fix --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
019fde1e67
commit
42dadec020
54 files changed
+538
-151
No files matched your search
+18
-9
@@ -1,8 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { playletStateStore } from "lib/Stores";
|
||||
import { playletStateStore, tr } from "lib/Stores";
|
||||
import { ExternalControlProtocol } from "lib/Api/ExternalControlProtocol";
|
||||
import { get } from "svelte/store";
|
||||
|
||||
let selectedRelease = "";
|
||||
let releases = [];
|
||||
@@ -65,23 +66,31 @@
|
||||
if (version === "") {
|
||||
version = "latest";
|
||||
}
|
||||
|
||||
const trFn = get(tr);
|
||||
|
||||
if (
|
||||
confirm(
|
||||
`Are you sure you want to change the Playlet Library version to "${version}"?\nThis will restart Playlet.`
|
||||
)
|
||||
trFn(
|
||||
"Are you sure you want to change the Playlet Library version to %1"
|
||||
).replace("%1", version)
|
||||
) +
|
||||
`\n` +
|
||||
trFn("This will restart Playlet.")
|
||||
) {
|
||||
await PlayletApi.setPlayletLibVersion(selectedRelease);
|
||||
alert("Playlet Library version set. Playlet will now restart.");
|
||||
alert(trFn("Playlet Library version changed. Playlet will now restart."));
|
||||
await ExternalControlProtocol.restartApp(appId);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class="text-lg">Playlet Library version</div>
|
||||
<div class="text-lg">{$tr("Playlet Library version")}</div>
|
||||
<div class="text-xs text-gray-500">
|
||||
The version of Playlet Lib to use. These correspond to tagged releases on
|
||||
Github. Releases that do not have a playlet-lib.zip file are disabled.
|
||||
{$tr(
|
||||
"The version of Playlet Lib to use. These correspond to tagged releases on Github. Releases that do not have a playlet-lib.zip file are disabled."
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div class="join w-full m-1">
|
||||
@@ -89,13 +98,13 @@
|
||||
bind:value={selectedRelease}
|
||||
class="select select-bordered join-item w-full mr-1"
|
||||
>
|
||||
<option selected value="">latest (default)</option>
|
||||
<option selected value=""></option>
|
||||
{#each releases as release}
|
||||
<option disabled={!release.enabled} value={release.name}
|
||||
>{release.name}</option
|
||||
>
|
||||
{/each}
|
||||
</select>
|
||||
<button class="join-item btn" on:click={apply}>Apply</button>
|
||||
<button class="join-item btn" on:click={apply}>{$tr("Apply")}</button>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user