mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/save: move strings to i18n & translate to ru
also fixed line break in switcher for future lengthier translations (german, for example)
This commit is contained in:
parent
9939f3b172
commit
5ced7b5388
10 changed files with 90 additions and 8 deletions
3
web/i18n/en/a11y/meowbalt.json
Normal file
3
web/i18n/en/a11y/meowbalt.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"smile": "meowbalt, cobalt's black and white cat mascot, smiling and loafing."
|
||||||
|
}
|
3
web/i18n/en/a11y/save.json
Normal file
3
web/i18n/en/a11y/save.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"linkArea": "link input area"
|
||||||
|
}
|
8
web/i18n/en/save.json
Normal file
8
web/i18n/en/save.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"paste": "paste",
|
||||||
|
"pasteAndDownload": "paste and download",
|
||||||
|
"auto": "auto",
|
||||||
|
"audio": "audio",
|
||||||
|
"mute": "mute",
|
||||||
|
"inputPlaceholder": "paste the link here"
|
||||||
|
}
|
3
web/i18n/ru/a11y/meowbalt.json
Normal file
3
web/i18n/ru/a11y/meowbalt.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"smile": "мяубальт, чёрно-белый маскот кобальта. батонится, сложа лапы под себя, и улыбается."
|
||||||
|
}
|
3
web/i18n/ru/a11y/save.json
Normal file
3
web/i18n/ru/a11y/save.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"linkArea": "зона вставки ссылки"
|
||||||
|
}
|
8
web/i18n/ru/save.json
Normal file
8
web/i18n/ru/save.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"paste": "вставить",
|
||||||
|
"pasteAndDownload": "вставить и скачать",
|
||||||
|
"auto": "авто",
|
||||||
|
"audio": "аудио",
|
||||||
|
"mute": "без звука",
|
||||||
|
"inputPlaceholder": "вставь ссылку сюда"
|
||||||
|
}
|
|
@ -17,6 +17,10 @@
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.switcher :global(.button) {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
.switcher:not(.big) :global(.button:first-child) {
|
.switcher:not(.big) :global(.button:first-child) {
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { t } from "$lib/i18n/translations";
|
||||||
|
</script>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
id="meowbalt-loaf"
|
id="meowbalt-loaf"
|
||||||
src="/meowbalt/smile.png"
|
src="/meowbalt/smile.png"
|
||||||
height="152"
|
height="152"
|
||||||
width="141"
|
width="141"
|
||||||
alt="black and white cat smiling and loafing"
|
alt={$t("a11y.meowbalt.smile")}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#meowbalt-loaf {
|
#meowbalt-loaf {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { SvelteComponent, tick } from "svelte";
|
import { SvelteComponent, tick } from "svelte";
|
||||||
|
|
||||||
|
import { t } from "$lib/i18n/translations";
|
||||||
|
|
||||||
import IconLink from "@tabler/icons-svelte/IconLink.svelte";
|
import IconLink from "@tabler/icons-svelte/IconLink.svelte";
|
||||||
|
|
||||||
import ClearButton from "$components/save/buttons/ClearButton.svelte";
|
import ClearButton from "$components/save/buttons/ClearButton.svelte";
|
||||||
|
@ -60,8 +62,8 @@
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
autocapitalize="off"
|
autocapitalize="off"
|
||||||
maxlength="256"
|
maxlength="256"
|
||||||
placeholder="paste the link here"
|
placeholder={$t("save.inputPlaceholder")}
|
||||||
aria-label="link input area"
|
aria-label={$t("a11y.save.linkArea")}
|
||||||
data-form-type="other"
|
data-form-type="other"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -76,19 +78,19 @@
|
||||||
<div id="action-container">
|
<div id="action-container">
|
||||||
<Switcher>
|
<Switcher>
|
||||||
<SettingsButton settingContext="save" settingId="downloadMode" settingValue="auto">
|
<SettingsButton settingContext="save" settingId="downloadMode" settingValue="auto">
|
||||||
<IconSparkles /> auto
|
<IconSparkles /> {$t("save.auto")}
|
||||||
</SettingsButton>
|
</SettingsButton>
|
||||||
<SettingsButton settingContext="save" settingId="downloadMode" settingValue="audio">
|
<SettingsButton settingContext="save" settingId="downloadMode" settingValue="audio">
|
||||||
<IconMusic /> audio
|
<IconMusic /> {$t("save.audio")}
|
||||||
</SettingsButton>
|
</SettingsButton>
|
||||||
<SettingsButton settingContext="save" settingId="downloadMode" settingValue="mute">
|
<SettingsButton settingContext="save" settingId="downloadMode" settingValue="mute">
|
||||||
<IconMute /> mute
|
<IconMute /> {$t("save.mute")}
|
||||||
</SettingsButton>
|
</SettingsButton>
|
||||||
</Switcher>
|
</Switcher>
|
||||||
<ActionButton id="paste" click={pasteClipboard}>
|
<ActionButton id="paste" click={pasteClipboard}>
|
||||||
<IconClipboard />
|
<IconClipboard />
|
||||||
<span id="paste-desktop-text">paste</span>
|
<span id="paste-desktop-text">{$t("save.paste")}</span>
|
||||||
<span id="paste-mobile-text">paste and download</span>
|
<span id="paste-mobile-text">{$t("save.pasteAndDownload")}</span>
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,6 +25,28 @@ export const config: Config = {
|
||||||
await import(`$i18n/en/a11y/tabs.json`)
|
await import(`$i18n/en/a11y/tabs.json`)
|
||||||
).default,
|
).default,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
locale: 'en',
|
||||||
|
key: 'save',
|
||||||
|
loader: async () => (
|
||||||
|
await import(`$i18n/en/save.json`)
|
||||||
|
).default,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
locale: 'en',
|
||||||
|
key: 'a11y.save',
|
||||||
|
loader: async () => (
|
||||||
|
await import(`$i18n/en/a11y/save.json`)
|
||||||
|
).default,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
locale: 'en',
|
||||||
|
key: 'a11y.meowbalt',
|
||||||
|
loader: async () => (
|
||||||
|
await import(`$i18n/en/a11y/meowbalt.json`)
|
||||||
|
).default,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
locale: 'ru',
|
locale: 'ru',
|
||||||
key: 'tabs',
|
key: 'tabs',
|
||||||
|
@ -39,6 +61,27 @@ export const config: Config = {
|
||||||
await import(`$i18n/ru/a11y/tabs.json`)
|
await import(`$i18n/ru/a11y/tabs.json`)
|
||||||
).default,
|
).default,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
locale: 'ru',
|
||||||
|
key: 'save',
|
||||||
|
loader: async () => (
|
||||||
|
await import(`$i18n/ru/save.json`)
|
||||||
|
).default,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
locale: 'ru',
|
||||||
|
key: 'a11y.save',
|
||||||
|
loader: async () => (
|
||||||
|
await import(`$i18n/ru/a11y/save.json`)
|
||||||
|
).default,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
locale: 'ru',
|
||||||
|
key: 'a11y.meowbalt',
|
||||||
|
loader: async () => (
|
||||||
|
await import(`$i18n/ru/a11y/meowbalt.json`)
|
||||||
|
).default,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue