Skip to content

Commit

Permalink
i18n: add missing translation source strings for new components (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser authored Sep 24, 2023
1 parent 59c9971 commit ca4c581
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 139 deletions.
245 changes: 132 additions & 113 deletions src/assets/translations/en-US.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/components/games/GameControls.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@
await writeText(launchString);
toastStore.makeToast("Copied to clipboard!", "info");
}}
>Copy Game Executable Command<Helper
>{$_("gameControls_button_copyExecutableCommand")}<Helper
helperClass="!text-neutral-400 !text-xs"
>For running the game outside the launcher.<br />The command is
tooling-version specific.</Helper
>{$_("gameControls_button_copyExecutableCommand_helpText_1")}<br
/>{$_("gameControls_button_copyExecutableCommand_helpText_2")}</Helper
></DropdownItem
>
<DropdownDivider />
Expand Down
12 changes: 6 additions & 6 deletions src/components/games/features/texture-packs/TexturePacks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@
class="flex-shrink border-solid rounded text-white hover:dark:text-slate-900 hover:bg-white font-semibold px-2 py-2"
on:click={async () =>
navigate(`/${getInternalName(activeGame)}`, { replace: true })}
aria-label="back to game page"
aria-label={$_("features_backToGamePage_buttonAlt")}
>
<IconArrowLeft />
</Button>
<Button
class="flex-shrink border-solid rounded bg-orange-400 hover:bg-orange-600 text-sm text-slate-900 font-semibold px-5 py-2"
on:click={addNewTexturePack}
aria-label="add a new texture pack"
aria-label={$_("features_textures_addNewPack_buttonAlt")}
disabled={addingPack}
>
{#if addingPack}
Expand All @@ -250,7 +250,7 @@
<Button
class="flex-shrink border-solid rounded bg-green-400 hover:bg-green-500 text-sm text-slate-900 font-semibold px-5 py-2"
on:click={applyTexturePacks}
aria-label="apply texture changes"
aria-label={$_("features_textures_applyChanges_buttonAlt")}
>{$_("features_textures_applyChanges")}</Button
>
{/if}
Expand Down Expand Up @@ -331,7 +331,7 @@
<Button
outline
class="!p-1.5 rounded-md border-blue-500 text-blue-500 hover:bg-blue-600"
aria-label="move texture pack up in order"
aria-label={$_("features_textures_moveUp_buttonAlt")}
on:click={() => {
moveTexturePack(packIndex - 1, packIndex);
}}
Expand All @@ -343,7 +343,7 @@
<Button
outline
class="!p-1.5 rounded-md border-blue-500 text-blue-500 hover:bg-blue-600"
aria-label="move texture pack down in order"
aria-label={$_("features_textures_moveDown_buttonAlt")}
on:click={() => {
moveTexturePack(packIndex + 1, packIndex);
}}
Expand All @@ -355,7 +355,7 @@
<Button
outline
class="!p-1.5 rounded-md border-red-500 text-red-500 hover:bg-red-600"
aria-label="delete texture pack"
aria-label={$_("features_textures_deletePack_buttonAlt")}
on:click={() => {
pack.toBeDeleted = true;
pack.enabled = false;
Expand Down
9 changes: 5 additions & 4 deletions src/components/games/setup/GameSetup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
async function install(viaFolder: boolean) {
let sourcePath = "";
if (viaFolder) {
sourcePath = await folderPrompt(
"Select a folder with your ISO's data extracted",
);
sourcePath = await folderPrompt($_("setup_prompt_selectFolderWithISO"));
} else {
sourcePath = await isoPrompt();
sourcePath = await isoPrompt(
$_("setup_prompt_ISOFileLabel"),
$_("setup_prompt_selectISO"),
);
}
if (sourcePath !== undefined) {
installing = true;
Expand Down
4 changes: 2 additions & 2 deletions src/components/header/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
</div>
<div class="border-l shrink-0 border-[#9f9f9f] h-8 m-2" />
<div class="flex flex-col shrink-0 text-neutral-500 mr-2 pointer-events-none">
<p class="font-mono text-sm">Launcher</p>
<p class="font-mono text-sm">Tooling</p>
<p class="font-mono text-sm">{$_("header_launcherVersionLabel")}</p>
<p class="font-mono text-sm">{$_("header_toolingVersionLabel")}</p>
</div>
<div
class="flex flex-col text-neutral-300 mr-2 pointer-events-none max-w-[250px]"
Expand Down
11 changes: 5 additions & 6 deletions src/lib/utils/file-dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ export async function saveFolderPrompt(
});
}

export async function isoPrompt(): Promise<string | undefined> {
const path = await filePrompt(
["ISO", "iso"],
"Jak ISO File",
"Select your legitimately obtained ISO File",
);
export async function isoPrompt(
fileExplanation: string,
title: string,
): Promise<string | undefined> {
const path = await filePrompt(["ISO", "iso"], fileExplanation, title);
if (path === null) {
return undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/settings/General.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
{#if localeFontDownloading}
<Spinner class="mr-3" size="4" color="white" />
{/if}
Download Locale Specific Font
{$_("settings_general_downloadLocaleSpecificFont")}
</Button>
{/if}
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/routes/settings/versions/VersionList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
)}
/>
{:else if release.downloadUrl === undefined}
<span>Incompatible</span>
<span>{$_("settings_versions_incompatibleVersion")}</span>
{:else if release.pendingAction}
<Spinner color="yellow" size={"6"} />
{:else if release.releaseType === "official" && release.downloadUrl !== undefined}
Expand All @@ -173,13 +173,13 @@
{#if release.invalid}
<Tooltip color="red">
{#if release.invalidationReasons.length > 0}
Release marked as invalid for the following reasons:
{$_("settings_versions_invalidReleaseGeneric")}
{#each release.invalidationReasons as reason}
<br />
- {reason}
{/each}
{:else}
Release marked as invalid
{$_("settings_versions_invalidReleaseGeneric")}
{/if}
</Tooltip>
{/if}
Expand All @@ -199,7 +199,9 @@
{:else}
<IconRefresh
class="text-xl"
aria-label="Redownload Version"
aria-label={$_(
"settings_versions_icon_redownloadVersion_altText",
)}
/>
{/if}
</Button>
Expand Down

0 comments on commit ca4c581

Please sign in to comment.