i18n: localize post form
This commit is contained in:
1 parent
9089dd9ac3
commit
4441896134
4 files changed
+129
-37
No files matched your search
@@ -48,7 +48,7 @@
|
|||||||
disabled={comment.post.locked}
|
disabled={comment.post.locked}
|
||||||
>
|
>
|
||||||
<Icon src={ArrowUturnLeft} width={14} height={14} mini />
|
<Icon src={ArrowUturnLeft} width={14} height={14} mini />
|
||||||
<span class="text-xs">Reply</span>
|
<span class="text-xs">{$t('comment.reply')}</span>
|
||||||
</Button>
|
</Button>
|
||||||
{#if $profile?.user && (amMod($profile?.user, comment.community) || isAdmin($profile.user))}
|
{#if $profile?.user && (amMod($profile?.user, comment.community) || isAdmin($profile.user))}
|
||||||
<CommentModerationMenu bind:item={comment} />
|
<CommentModerationMenu bind:item={comment} />
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
|
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button } from 'mono-svelte'
|
||||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||||
|
import { t } from '$lib/translations'
|
||||||
|
|
||||||
export let edit = false
|
export let edit = false
|
||||||
|
|
||||||
@@ -217,7 +218,7 @@
|
|||||||
<form on:submit|preventDefault={submit} class="flex flex-col gap-4 h-full">
|
<form on:submit|preventDefault={submit} class="flex flex-col gap-4 h-full">
|
||||||
<slot name="formtitle">
|
<slot name="formtitle">
|
||||||
<h1 class="font-bold text-xl">
|
<h1 class="font-bold text-xl">
|
||||||
{edit ? 'Edit' : 'Create'} Post
|
{edit ? $t('form.post.edit') : $t('form.post.create')}
|
||||||
</h1>
|
</h1>
|
||||||
</slot>
|
</slot>
|
||||||
{#if !edit && data}
|
{#if !edit && data}
|
||||||
@@ -227,7 +228,7 @@
|
|||||||
bind:items={communities}
|
bind:items={communities}
|
||||||
jwt={$profile?.jwt}
|
jwt={$profile?.jwt}
|
||||||
listing_type="All"
|
listing_type="All"
|
||||||
label="Community"
|
label={$t('form.post.community')}
|
||||||
required
|
required
|
||||||
on:select={(e) => {
|
on:select={(e) => {
|
||||||
const c = e.detail
|
const c = e.detail
|
||||||
@@ -243,7 +244,7 @@
|
|||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<span class="font-medium text-sm">Community</span>
|
<span class="font-medium text-sm">{$t('form.post.community')}</span>
|
||||||
<Button
|
<Button
|
||||||
class="w-full !bg-white dark:!bg-black h-[38px]"
|
class="w-full !bg-white dark:!bg-black h-[38px]"
|
||||||
on:click={() => (data.community = null)}
|
on:click={() => (data.community = null)}
|
||||||
@@ -268,13 +269,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<TextInput
|
<TextInput
|
||||||
required
|
required
|
||||||
label="Title"
|
label={$t('form.post.title')}
|
||||||
bind:value={data.title}
|
bind:value={data.title}
|
||||||
placeholder={placeholders.get('post')}
|
placeholder={placeholders.get('post')}
|
||||||
/>
|
/>
|
||||||
<div class="flex gap-2 w-full items-end">
|
<div class="flex gap-2 w-full items-end">
|
||||||
<TextInput
|
<TextInput
|
||||||
label="URL"
|
label={$t('form.post.url')}
|
||||||
bind:value={data.url}
|
bind:value={data.url}
|
||||||
placeholder={placeholders.get('url')}
|
placeholder={placeholders.get('url')}
|
||||||
class="w-full"
|
class="w-full"
|
||||||
@@ -285,32 +286,32 @@
|
|||||||
? 'width: 38px; padding: 0;'
|
? 'width: 38px; padding: 0;'
|
||||||
: ''}"
|
: ''}"
|
||||||
class="flex-shrink-0"
|
class="flex-shrink-0"
|
||||||
title="Generate title/body"
|
title={$t('form.post.generateTitle')}
|
||||||
loading={generation.loading}
|
loading={generation.loading}
|
||||||
disabled={!generation.generatable || generation.loading}
|
disabled={!generation.generatable || generation.loading}
|
||||||
>
|
>
|
||||||
<Icon src={Sparkles} size="18" mini slot="prefix" />
|
<Icon src={Sparkles} size="18" mini slot="prefix" />
|
||||||
{#if generation.generatable}
|
{#if generation.generatable}
|
||||||
Generate Title
|
{$t('form.post.generateTitle')}
|
||||||
{/if}
|
{/if}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
on:click={() => (uploadingImage = !uploadingImage)}
|
on:click={() => (uploadingImage = !uploadingImage)}
|
||||||
style="width: 38px; height: 38px; padding: 0;"
|
style="width: 38px; height: 38px; padding: 0;"
|
||||||
class="flex-shrink-0"
|
class="flex-shrink-0"
|
||||||
title="Upload image"
|
title={$t('form.post.uploadImage')}
|
||||||
>
|
>
|
||||||
<Icon src={Photo} size="18" mini slot="prefix" />
|
<Icon src={Photo} size="18" mini slot="prefix" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<MarkdownEditor
|
<MarkdownEditor
|
||||||
rows={8}
|
rows={8}
|
||||||
label="Body"
|
label={$t('form.post.body')}
|
||||||
bind:value={data.body}
|
bind:value={data.body}
|
||||||
placeholder={placeholders.get('post')}
|
placeholder={placeholders.get('post')}
|
||||||
previewButton
|
previewButton
|
||||||
/>
|
/>
|
||||||
<Switch bind:checked={data.nsfw}>NSFW</Switch>
|
<Switch bind:checked={data.nsfw}>{$t('form.post.nsfw')}</Switch>
|
||||||
<div class="mt-auto" />
|
<div class="mt-auto" />
|
||||||
<div class="flex flex-row items-center gap-2">
|
<div class="flex flex-row items-center gap-2">
|
||||||
<Button
|
<Button
|
||||||
@@ -321,7 +322,7 @@
|
|||||||
disabled={data.loading}
|
disabled={data.loading}
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
>
|
>
|
||||||
Submit
|
{$t('form.submit')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{#if !edit}
|
{#if !edit}
|
||||||
|
|||||||
+25
-3
@@ -89,7 +89,8 @@
|
|||||||
"compact": "Compact",
|
"compact": "Compact",
|
||||||
"legacy": "Legacy"
|
"legacy": "Legacy"
|
||||||
},
|
},
|
||||||
"type": "Type"
|
"type": "Type",
|
||||||
|
"filter": "Filter"
|
||||||
},
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
@@ -100,7 +101,18 @@
|
|||||||
"forgotpassword": "Forgot Password",
|
"forgotpassword": "Forgot Password",
|
||||||
"submit": "Submit",
|
"submit": "Submit",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"preview": "Preview"
|
"preview": "Preview",
|
||||||
|
"post": {
|
||||||
|
"create": "Create Post",
|
||||||
|
"edit": "Edit Post",
|
||||||
|
"community": "Community",
|
||||||
|
"title": "Title",
|
||||||
|
"url": "URL",
|
||||||
|
"body": "Body",
|
||||||
|
"nsfw": "NSFW",
|
||||||
|
"generateTitle": "Generate Title",
|
||||||
|
"uploadImage": "Upload Image"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"routes": {
|
"routes": {
|
||||||
"frontpage": {
|
"frontpage": {
|
||||||
@@ -129,6 +141,7 @@
|
|||||||
"alt": "Search across the fediverse"
|
"alt": "Search across the fediverse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"createPost": "Create Post",
|
||||||
"post": {
|
"post": {
|
||||||
"crosspostCount": "crossposts",
|
"crosspostCount": "crossposts",
|
||||||
"commentCount": "comments",
|
"commentCount": "comments",
|
||||||
@@ -143,6 +156,14 @@
|
|||||||
"part": "You're viewing part of a thread.",
|
"part": "You're viewing part of a thread.",
|
||||||
"context": "Show Context"
|
"context": "Show Context"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"inbox": {
|
||||||
|
"title": "Inbox",
|
||||||
|
"markAsRead": "Mark All Read",
|
||||||
|
"empty": {
|
||||||
|
"title": "No new notifications",
|
||||||
|
"description": "Messages, replies, and mentions will appear here."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cards": {
|
"cards": {
|
||||||
@@ -204,6 +225,7 @@
|
|||||||
"common": {
|
"common": {
|
||||||
"back": "Back",
|
"back": "Back",
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
"debug": "Debug"
|
"debug": "Debug",
|
||||||
|
"refresh": "Refresh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+91
-22
@@ -7,19 +7,19 @@
|
|||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
"home": "Accueil",
|
"home": "Accueil",
|
||||||
"admin": "Admin",
|
"admin": "Administration",
|
||||||
"moderation": "Modération",
|
"moderation": "Modération",
|
||||||
"communities": "Explorer",
|
"communities": "Explorer",
|
||||||
"search": "Rechercher",
|
"search": "Rechercher",
|
||||||
"create": {
|
"create": {
|
||||||
"label": "Créer",
|
"label": "Créer",
|
||||||
"post": "Post",
|
"post": "Publication",
|
||||||
"community": "Communauté",
|
"community": "Communauté",
|
||||||
"logingate": "Vous devez vous connecter pour créer du contenu."
|
"logingate": "Vous devez vous connecter pour créer du contenu."
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"label": "Profil",
|
"label": "Profil",
|
||||||
"app": "App",
|
"app": "Application",
|
||||||
"settings": "Paramètres",
|
"settings": "Paramètres",
|
||||||
"colorscheme": {
|
"colorscheme": {
|
||||||
"label": "Schéma de couleurs",
|
"label": "Schéma de couleurs",
|
||||||
@@ -39,7 +39,13 @@
|
|||||||
"logout": "Se déconnecter",
|
"logout": "Se déconnecter",
|
||||||
"signup": "S'inscrire",
|
"signup": "S'inscrire",
|
||||||
"accounts": "Comptes",
|
"accounts": "Comptes",
|
||||||
"changeinstance": "Changer d'instance"
|
"changeinstance": "Changer d'instance",
|
||||||
|
"resetColor": "Réinitialiser la couleur",
|
||||||
|
"addGuest": "Ajouter un invité",
|
||||||
|
"moveUp": "Monter",
|
||||||
|
"moveDown": "Descendre",
|
||||||
|
"guest": "Invité",
|
||||||
|
"versionGate": "Cette version de Photon prend en charge les instances exécutant {{version}} ou une version supérieure."
|
||||||
},
|
},
|
||||||
"filter": {
|
"filter": {
|
||||||
"location": {
|
"location": {
|
||||||
@@ -58,60 +64,114 @@
|
|||||||
"time": {
|
"time": {
|
||||||
"label": "Temps",
|
"label": "Temps",
|
||||||
"all": "Tout",
|
"all": "Tout",
|
||||||
"9months": "9 Mois",
|
"9months": "9 mois",
|
||||||
"6months": "6 Mois",
|
"6months": "6 mois",
|
||||||
"3months": "3 Mois",
|
"3months": "3 mois",
|
||||||
"month": "Mois",
|
"month": "Mois",
|
||||||
"week": "Semaine",
|
"week": "Semaine",
|
||||||
"day": "Jour",
|
"day": "Jour",
|
||||||
"12hours": "12 Heures",
|
"12hours": "12 heures",
|
||||||
"6hours": "6 Heures",
|
"6hours": "6 heures",
|
||||||
"hour": "Heure"
|
"hour": "Heure"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"new": "Nouveau",
|
"new": "Nouveau",
|
||||||
"old": "Ancien",
|
"old": "Ancien",
|
||||||
"controversial": "Controversé",
|
"controversial": "Controversé",
|
||||||
"scaled": "Adapté",
|
"scaled": "Redimensionné",
|
||||||
"mostcomments": "Commentaires",
|
"mostcomments": "Commentaires",
|
||||||
"newcomments": "Nouvelles réponses"
|
"newcomments": "Nouvelles réponses"
|
||||||
},
|
},
|
||||||
"view": {
|
"view": {
|
||||||
"label": "Vue",
|
"label": "Vue",
|
||||||
"cozy": "Cosy",
|
"cozy": "Confortable",
|
||||||
"list": "Liste",
|
"list": "Liste",
|
||||||
"compact": "Compact",
|
"compact": "Compact",
|
||||||
"legacy": "Ancien"
|
"legacy": "Hérité"
|
||||||
}
|
},
|
||||||
|
"type": "Type"
|
||||||
},
|
},
|
||||||
"form": {
|
"form": {
|
||||||
"username": "Nom d'utilisateur",
|
"username": "Nom d'utilisateur",
|
||||||
|
"name": "Nom",
|
||||||
"instance": "URL de l'instance",
|
"instance": "URL de l'instance",
|
||||||
"password": "Mot de passe",
|
"password": "Mot de passe",
|
||||||
"2fa": "Code 2FA",
|
"2fa": "Code 2FA",
|
||||||
"forgotpassword": "Mot de passe oublié",
|
"forgotpassword": "Mot de passe oublié",
|
||||||
"submit": "Soumettre"
|
"submit": "Soumettre",
|
||||||
|
"edit": "Modifier",
|
||||||
|
"preview": "Aperçu",
|
||||||
|
"post": {
|
||||||
|
"create": "Créer une publication",
|
||||||
|
"edit": "Modifier la publication",
|
||||||
|
"community": "Communauté",
|
||||||
|
"title": "Titre",
|
||||||
|
"url": "URL",
|
||||||
|
"body": "Corps",
|
||||||
|
"nsfw": "NSFW",
|
||||||
|
"generateTitle": "Générer le titre",
|
||||||
|
"uploadImage": "Télécharger une image"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"routes": {
|
"routes": {
|
||||||
"frontpage": {
|
"frontpage": {
|
||||||
"title": "Page d'accueil",
|
"title": "Page d'accueil",
|
||||||
"footer": "{{users:number}} {{users; 1:utilisateur; default:utilisateurs;}} actif(s)"
|
"footer": "{{users:number}} {{users; 1:utilisateur; default:utilisateurs;}} actif(s)"
|
||||||
},
|
},
|
||||||
"modlog": "Modlog",
|
"modlog": "Journal de modération",
|
||||||
"instances": "Instances",
|
"instances": "Instances",
|
||||||
"legal": "Légal"
|
"legal": "Mentions légales",
|
||||||
|
"profile": {
|
||||||
|
"user": "Utilisateur",
|
||||||
|
"settings": "Paramètres",
|
||||||
|
"blocks": "Bloqués",
|
||||||
|
"credentials": "Informations d'identification",
|
||||||
|
"moderates": "Modère"
|
||||||
|
},
|
||||||
|
"accounts": "Comptes",
|
||||||
|
"communities": "Communautés",
|
||||||
|
"search": {
|
||||||
|
"title": "Rechercher",
|
||||||
|
"federating": "Fédérer",
|
||||||
|
"query": "Requête",
|
||||||
|
"noResults": {
|
||||||
|
"title": "Aucun résultat",
|
||||||
|
"description": "Il n'y a aucun résultat correspondant à ce filtre. Essayez d'affiner votre recherche.",
|
||||||
|
"alt": "Rechercher dans le fediverse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createPost": "Créer une publication",
|
||||||
|
"post": {
|
||||||
|
"crosspostCount": "rediffusions",
|
||||||
|
"commentCount": "commentaires",
|
||||||
|
"addComment": "Ajouter un commentaire",
|
||||||
|
"scrollToTop": "Défiler vers le haut",
|
||||||
|
"instanceWarning": "Cette publication a été demandée à partir d'un serveur différent de celui de votre compte. De nombreuses actions ne fonctionneront pas.",
|
||||||
|
"remoteView": "Vue distante",
|
||||||
|
"localView": "Vue locale",
|
||||||
|
"thread": {
|
||||||
|
"single": "Vous visualisez un fil unique.",
|
||||||
|
"allComments": "Tous les commentaires",
|
||||||
|
"part": "Vous visualisez une partie d'un fil.",
|
||||||
|
"context": "Afficher le contexte"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"cards": {
|
"cards": {
|
||||||
"site": {
|
"site": {
|
||||||
"about": "À propos",
|
"about": "À propos",
|
||||||
"stats": "Statistiques",
|
"stats": "Statistiques",
|
||||||
"admins": "Admins"
|
"admins": "Administrateurs"
|
||||||
|
},
|
||||||
|
"community": {
|
||||||
|
"members": "Membres",
|
||||||
|
"moderators": "Modérateurs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"users": "Utilisateurs",
|
|
||||||
"all": "Tout",
|
"all": "Tout",
|
||||||
"posts": "Posts",
|
"users": "Utilisateurs",
|
||||||
|
"posts": "Publications",
|
||||||
"comments": "Commentaires",
|
"comments": "Commentaires",
|
||||||
"communities": "Communautés"
|
"communities": "Communautés"
|
||||||
},
|
},
|
||||||
@@ -122,13 +182,13 @@
|
|||||||
"unsave": "Désénregistrer",
|
"unsave": "Désénregistrer",
|
||||||
"more": {
|
"more": {
|
||||||
"label": "Plus d'actions",
|
"label": "Plus d'actions",
|
||||||
"edit": "Éditer",
|
"edit": "Modifier",
|
||||||
"creator": "Créateur",
|
"creator": "Créateur",
|
||||||
"actions": "Actions",
|
"actions": "Actions",
|
||||||
"markRead": "Marquer comme lu",
|
"markRead": "Marquer comme lu",
|
||||||
"markUnread": "Marquer comme non lu",
|
"markUnread": "Marquer comme non lu",
|
||||||
"share": "Partager",
|
"share": "Partager",
|
||||||
"crosspost": "Crossposter",
|
"crosspost": "Republier",
|
||||||
"delete": "Supprimer",
|
"delete": "Supprimer",
|
||||||
"restore": "Restaurer"
|
"restore": "Restaurer"
|
||||||
}
|
}
|
||||||
@@ -142,11 +202,20 @@
|
|||||||
"saved": "Enregistré"
|
"saved": "Enregistré"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"comment": {
|
||||||
|
"reply": "Répondre",
|
||||||
|
"actions": {
|
||||||
|
"label": "Actions",
|
||||||
|
"link": "Copier le lien"
|
||||||
|
},
|
||||||
|
"locked": "Cette publication est verrouillée."
|
||||||
|
},
|
||||||
"moderation": {
|
"moderation": {
|
||||||
"report": "Signaler"
|
"report": "Signaler"
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"back": "Retour",
|
"back": "Retour",
|
||||||
"next": "Suivant"
|
"next": "Suivant",
|
||||||
|
"debug": "Débogage"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user