@@ -17,7 +18,12 @@
'/profile/blocks',
'/profile/password',
]}
- optionNames={['User', 'Settings', 'Blocks', 'Credentials']}
+ optionNames={[
+ $t('routes.profile.user'),
+ $t('routes.profile.settings'),
+ $t('routes.profile.blocks'),
+ $t('routes.profile.credentials'),
+ ]}
selected={$page.url.pathname}
on:select={(e) => {
goto(e.detail)
diff --git a/src/routes/saved/+page.svelte b/src/routes/saved/+page.svelte
index a165f99c8..942fa4de2 100644
--- a/src/routes/saved/+page.svelte
+++ b/src/routes/saved/+page.svelte
@@ -9,6 +9,8 @@
import { page } from '$app/stores'
import Placeholder from '$lib/components/ui/Placeholder.svelte'
import { Bookmark } from 'svelte-hero-icons'
+ import { t } from '$lib/translations.js'
+ import Header from '$lib/components/ui/layout/pages/Header.svelte'
export let data
@@ -17,10 +19,10 @@
- Search
+ {$t('routes.search.title')}
-
Search
+
{$t('routes.search.title')}
{:then object}
{#if object}
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte
index 67fe6fbda..3d2af5ac1 100644
--- a/src/routes/settings/+page.svelte
+++ b/src/routes/settings/+page.svelte
@@ -3,7 +3,14 @@
import Setting from './Setting.svelte'
import MultiSelect from '$lib/components/input/Switch.svelte'
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
- import { Disclosure, Material, Switch, TextInput, toast } from 'mono-svelte'
+ import {
+ Disclosure,
+ Material,
+ Note,
+ Switch,
+ TextInput,
+ toast,
+ } from 'mono-svelte'
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
import Link from '$lib/components/input/Link.svelte'
import {
@@ -22,102 +29,129 @@
import { Button, Checkbox, Select } from 'mono-svelte'
import ViewSelect from '$lib/components/lemmy/dropdowns/ViewSelect.svelte'
import { LINKED_INSTANCE_URL } from '$lib/instance.js'
- import { removeItem } from '$lib/util.js'
+ import { DOMAIN_REGEX_FORMS, removeItem } from '$lib/util.js'
import Section from './Section.svelte'
import ToggleSetting from './ToggleSetting.svelte'
+ import { locales, t } from '$lib/translations'
- Settings
+ {$t('settings.title')}
- Settings
-
-
-
-
+
- Dock position
- Where the dock should be put
+ {$t('settings.navigation.dockPos.title')}
+
+ {$t('settings.navigation.dockPos.description')}
+
- Panel mode
+ {$t('settings.navigation.panel.title')}
- Extend the dock to screen edges, similar to a panel.
+ {$t('settings.navigation.panel.description')}
-
+
- Theming
- Customize Photon's colors.
+ {$t('settings.app.theming.title')}
+ {$t('settings.app.theming.description')}
- Post style
+ {$t('settings.app.lang.title')}
+
+ {$t('settings.app.lang.description')}
+
+ {$t('settings.app.lang.note')}
+
+
+ {$t('settings.app.lang.credits')}
+
+
+
+
+
+ {$t('settings.app.view.title')}
{#if $userSettings.view == 'list'}
- Show posts in a list, with post bodies and compact images.
+ {$t('settings.app.view.list')}
{:else if $userSettings.view == 'cozy'}
- Show posts with large images, rich embeds and longer post bodies.
+ {$t('settings.app.view.cozy')}
{:else if $userSettings.view == 'compact'}
- Show posts in a list, without post bodies and with tighter spacing.
+ {$t('settings.app.view.compact')}
{:else if $userSettings.view == 'card'}
- Photon's old post style.
+ {$t('settings.app.view.legacy')}
{/if}
- Default sort
- The default sort to use for feeds.
+ {$t('settings.app.sort.title')}
+ {$t('settings.app.sort.description')}
@@ -130,70 +164,92 @@
- Thumbnail alignment
+ {$t('settings.app.thumbnailSide.title')}
- Where thumbnails should be on the post in list/compact view.
+ {$t('settings.app.thumbnailSide.title')}
+
+ {$t('settings.app.font.title')}
+ {$t('settings.app.font.description')}
+
+
+
+ {$t('settings.app.translation.title')}
+
+ {$t('settings.app.translation.description')}
+
+
+
-
+
YouTube
- The website to use to embed YouTube content.
+ {$t('settings.embeds.youtube.description')}
-
- Font
- What font Photon should use.
-
-
-
+
- Hide Submissions
+ {$t('settings.lemmy.hideSubmissions.title')}
- Hide certain types of submissions.
-
- Looking to hide read posts? That was moved to your
- profile settings.
-
-
+ {$t('settings.lemmy.hideSubmissions.description')}
- Deleted
+
+ {$t('settings.lemmy.hideSubmissions.deleted')}
+
- Removed by Moderator
+ {$t('settings.lemmy.hideSubmissions.removed')}
- Show instances
- Show items' instances.
+ {$t('settings.lemmy.instances.title')}
+
+ {$t('settings.lemmy.instances.description')}
+
- Users
+ {$t('content.users')}
- Comments
+ {$t('content.comments')}
- Communities
+ {$t('content.communities')}
-
+
- Removal reply presets
+ {$t('settings.moderation.replyPresets.title')}
- Presets to use for "Reply reason" in a submission removal.
+ {$t('settings.moderation.replyPresets.description')}
- - Syntax:
+ - {$t('settings.moderation.replyPresets.syntax')}
-
{'{{reason}}'}
- : The provided reason
-
{'{{post}}'}
- : The title of the post
-
{'{{community}}'}
- : The community the submission was removed in.
-
{'{{username}}'}
- : The username of the creator of the submission.
@@ -371,11 +410,11 @@
-
diff --git a/src/routes/signup/+page.svelte b/src/routes/signup/+page.svelte
index 20655ef51..aeee76801 100644
--- a/src/routes/signup/+page.svelte
+++ b/src/routes/signup/+page.svelte
@@ -21,6 +21,7 @@
import { Button, TextInput } from 'mono-svelte'
import { onMount } from 'svelte'
import Avatar from '$lib/components/ui/Avatar.svelte'
+ import { t } from '$lib/translations'
let selectedInstance: string = ''
let validating: boolean = false
@@ -64,7 +65,7 @@
// ]
} catch (e) {
toast({
- content: 'Failed to fetch available instances.',
+ content: $t('toast.failFetchInstances'),
type: 'error',
})
}
@@ -78,15 +79,14 @@
- Sign up | Choose Instance
+ {$t('form.signup.title')}
-
Sign Up
-
Choose an instance that interests you, or type the URL manually.
+
{$t('form.signup.title')}
+
{$t('form.signup.description')}
- An instance is the server that your account will be hosted on, but you can
- still access and interact with content from other instances.
+ {$t('form.signup.info')}
{
@@ -154,7 +154,7 @@
loading={validating}
disabled={validating}
>
- Go
+ {$t('form.submit')}
diff --git a/src/routes/signup/[instance]/+page.svelte b/src/routes/signup/[instance]/+page.svelte
index e36a3e990..9758eaf92 100644
--- a/src/routes/signup/[instance]/+page.svelte
+++ b/src/routes/signup/[instance]/+page.svelte
@@ -20,6 +20,8 @@
XCircle,
} from 'svelte-hero-icons'
import { instance as currentInstance } from '$lib/instance.js'
+ import Header from '$lib/components/ui/layout/pages/Header.svelte'
+ import { t } from '$lib/translations.js'
export let data
@@ -67,7 +69,7 @@
if (res?.jwt) {
await setUser(res.jwt, $page.params.instance, username)
- toast({ content: 'Successfully logged in.', type: 'success' })
+ toast({ content: $t('toast.logIn'), type: 'success' })
goto('/')
} else if (
res.verify_email_sent ||
@@ -76,8 +78,7 @@
currentInstance.set(instance)
if (res.verify_email_sent) {
toast({
- content:
- 'A verification link was sent to your email. Verify your email, and then you can log in.',
+ content: $t('toast.verifyEmail'),
type: 'info',
})
}
@@ -85,18 +86,17 @@
data.site_view.local_site.registration_mode == 'RequireApplication'
) {
toast({
- content:
- 'Please wait for your registration application to be approved before you can log in.',
+ content: $t('toast.waitApplication'),
type: 'info',
})
}
goto('/')
} else {
- throw new Error('Failed to sign up.')
+ throw new Error($t('toast.failSignup'))
}
toast({
- content: 'Signed up.',
+ content: $t('toast.successSignup'),
type: 'success',
})
} catch (err) {
@@ -125,36 +125,39 @@
{#if data.site_view.local_site.registration_mode != 'Closed'}
- Create account
+ {$t('form.signup.title')}
-
+
{#if data.site_view.local_site.registration_mode == 'RequireApplication'}
- To join this instance, you must fill out this application, and wait to be
- accepted. You will receive an email if your application is accepted.
+ {$t('form.signup.application.info')}
{#if data.site_view.local_site.application_question}
{/if}
-
+
{/if}
{#if captchaRequired}
@@ -194,7 +197,7 @@
{/if}
-
Show NSFW content
+
{$t('form.profile.showNSFW')}
{:else}
-
diff --git a/src/routes/theme/+page.svelte b/src/routes/theme/+page.svelte
index 19a89b3f1..2b039f4c8 100644
--- a/src/routes/theme/+page.svelte
+++ b/src/routes/theme/+page.svelte
@@ -17,6 +17,8 @@
Icon,
} from 'svelte-hero-icons'
import ColorSwatch from './ColorSwatch.svelte'
+ import { t } from '$lib/translations'
+ import Header from '$lib/components/ui/layout/pages/Header.svelte'
const c = defaultColors
@@ -36,22 +38,22 @@
throw new Error('Import is empty')
}
$colors = JSON.parse(importText)
- toast({ content: 'Import successful', type: 'success' })
+ toast({ content: $t('message.success'), type: 'success' })
importing = false
} catch (err) {
// @ts-ignore
toast({ content: err, type: 'error' })
}
}}
- title="Import"
- action="Import"
+ title={$t('routes.theme.import')}
+ action={$t('routes.theme.import')}
>
{/if}
-
Theme
+
{
@@ -60,7 +62,7 @@
size="lg"
>
- Import
+ {$t('routes.theme.import')}
{
@@ -70,37 +72,37 @@
size="lg"
>
- Export
+ {$t('routes.theme.export')}
{
modal({
actions: [
action({
- content: 'Close',
+ content: $t('common.cancel'),
close: true,
}),
action({
action: () => {
$colors = { other: {}, primary: {}, zinc: {}, slate: {} }
},
- content: 'Reset',
+ content: $t('routes.theme.reset'),
close: true,
type: 'danger',
}),
],
- title: 'Reset Theme',
- body: 'This will reset all your colors to the default. We recommend exporting your theme first.',
+ title: $t('routes.theme.resetWarning.title'),
+ body: $t('routes.theme.resetWarning.description'),
})
}}
size="lg"
>
- Reset
+ {$t('routes.theme.reset')}
- Accent
+ {$t('routes.theme.accent')}
- Light
- Dark
+
+ {$t('nav.menu.colorscheme.light')}
+
+
+ {$t('nav.menu.colorscheme.dark')}
+
{#each svelteIntellisenseSucks() as category}
diff --git a/src/routes/translators/+page.svelte b/src/routes/translators/+page.svelte
new file mode 100644
index 000000000..ae006ee6b
--- /dev/null
+++ b/src/routes/translators/+page.svelte
@@ -0,0 +1,28 @@
+
+
+
+ {$t('routes.translators')}
+
+
+ -
+ Estonian
+ pewgar_seemsimandroid@lemmy.blahaj.zone
+
+ -
+ French
+ Blisterexe@lemmy.zip
+
+
+
+
diff --git a/src/routes/u/[name]/+page.svelte b/src/routes/u/[name]/+page.svelte
index 8a2818078..c624ec870 100644
--- a/src/routes/u/[name]/+page.svelte
+++ b/src/routes/u/[name]/+page.svelte
@@ -44,6 +44,7 @@
import Expandable from '$lib/components/ui/Expandable.svelte'
import { communityLink } from '$lib/lemmy/generic.js'
import ItemList from '$lib/components/lemmy/generic/ItemList.svelte'
+ import { t } from '$lib/translations.js'
export let data
@@ -69,7 +70,7 @@
}
toast({
- content: `Successfully ${blocked ? 'unblocked' : 'blocked'} that user.`,
+ content: blocked ? $t('toast.unblockUser') : $t('toast.blockUser'),
type: 'success',
})
@@ -98,14 +99,14 @@
async function purgeUser() {
purgingUser = false
- const purgeToast = toast({ content: 'Purging user...', loading: true })
+ const purgeToast = toast({ content: '', loading: true })
try {
await client().purgePerson({
person_id: data.person_view.person.id,
})
removeToast(purgeToast)
- toast({ content: 'Purged that user.', type: 'success' })
+ toast({ content: $t('toast.purgeUser'), type: 'success' })
} catch (e) {
toast({ content: e as any, type: 'error' })
}
@@ -158,59 +159,7 @@
alt="User banner"
/>
{/if}
-
-
-
-
-
-
- {#if data.items.length == 0}
-
- {:else}
-
- {#each data.items as item}
- {#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')}
-
- {:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')}
-
- {/if}
- {/each}
-
- {/if}
-
searchParam($page.url, 'page', p.detail.toString())}
- />
-
-
+
{#if (data.moderates ?? []).length > 0}
@@ -252,7 +201,7 @@
>
- Moderates
+ {$t('routes.profile.moderates')}
({
@@ -324,4 +273,56 @@
{/if}
+
+
+
+
+
+
+ {#if data.items.length == 0}
+
+ {:else}
+
+ {#each data.items as item}
+ {#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')}
+
+ {:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')}
+
+ {/if}
+ {/each}
+
+ {/if}
+
searchParam($page.url, 'page', p.detail.toString())}
+ />
+
diff --git a/src/routes/verify_email/[token]/+error.svelte b/src/routes/verify_email/[token]/+error.svelte
index 9cf26a4f5..8cdecd70f 100644
--- a/src/routes/verify_email/[token]/+error.svelte
+++ b/src/routes/verify_email/[token]/+error.svelte
@@ -1,5 +1,6 @@
@@ -9,7 +10,9 @@
>
-
Error
-
Failed to verify your email.
+
+ {$t('message.error')}
+
+
{$t('routes.verifyEmail.error')}
{$page.error?.message}
diff --git a/src/routes/verify_email/[token]/+page.svelte b/src/routes/verify_email/[token]/+page.svelte
index 60973023c..6fab2cbd1 100644
--- a/src/routes/verify_email/[token]/+page.svelte
+++ b/src/routes/verify_email/[token]/+page.svelte
@@ -1,5 +1,6 @@
@@ -10,10 +11,10 @@