i18n: localize post form

This commit is contained in:
Xylight committed 2024-06-03 17:19:46 -07:00
1 parent 9089dd9ac3
commit 4441896134
4 files changed
+129 -37

No files matched your search

@@ -48,7 +48,7 @@
disabled={comment.post.locked}
>
<Icon src={ArrowUturnLeft} width={14} height={14} mini />
<span class="text-xs">Reply</span>
<span class="text-xs">{$t('comment.reply')}</span>
</Button>
{#if $profile?.user && (amMod($profile?.user, comment.community) || isAdmin($profile.user))}
<CommentModerationMenu bind:item={comment} />
+12 -11
View File
@@ -19,6 +19,7 @@
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
import { Button } from 'mono-svelte'
import Avatar from '$lib/components/ui/Avatar.svelte'
import { t } from '$lib/translations'
export let edit = false
@@ -217,7 +218,7 @@
<form on:submit|preventDefault={submit} class="flex flex-col gap-4 h-full">
<slot name="formtitle">
<h1 class="font-bold text-xl">
{edit ? 'Edit' : 'Create'} Post
{edit ? $t('form.post.edit') : $t('form.post.create')}
</h1>
</slot>
{#if !edit && data}
@@ -227,7 +228,7 @@
bind:items={communities}
jwt={$profile?.jwt}
listing_type="All"
label="Community"
label={$t('form.post.community')}
required
on:select={(e) => {
const c = e.detail
@@ -243,7 +244,7 @@
/>
{:else}
<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
class="w-full !bg-white dark:!bg-black h-[38px]"
on:click={() => (data.community = null)}
@@ -268,13 +269,13 @@
{/if}
<TextInput
required
label="Title"
label={$t('form.post.title')}
bind:value={data.title}
placeholder={placeholders.get('post')}
/>
<div class="flex gap-2 w-full items-end">
<TextInput
label="URL"
label={$t('form.post.url')}
bind:value={data.url}
placeholder={placeholders.get('url')}
class="w-full"
@@ -285,32 +286,32 @@
? 'width: 38px; padding: 0;'
: ''}"
class="flex-shrink-0"
title="Generate title/body"
title={$t('form.post.generateTitle')}
loading={generation.loading}
disabled={!generation.generatable || generation.loading}
>
<Icon src={Sparkles} size="18" mini slot="prefix" />
{#if generation.generatable}
Generate Title
{$t('form.post.generateTitle')}
{/if}
</Button>
<Button
on:click={() => (uploadingImage = !uploadingImage)}
style="width: 38px; height: 38px; padding: 0;"
class="flex-shrink-0"
title="Upload image"
title={$t('form.post.uploadImage')}
>
<Icon src={Photo} size="18" mini slot="prefix" />
</Button>
</div>
<MarkdownEditor
rows={8}
label="Body"
label={$t('form.post.body')}
bind:value={data.body}
placeholder={placeholders.get('post')}
previewButton
/>
<Switch bind:checked={data.nsfw}>NSFW</Switch>
<Switch bind:checked={data.nsfw}>{$t('form.post.nsfw')}</Switch>
<div class="mt-auto" />
<div class="flex flex-row items-center gap-2">
<Button
@@ -321,7 +322,7 @@
disabled={data.loading}
class="flex-1"
>
Submit
{$t('form.submit')}
</Button>
{#if !edit}
+25 -3
View File
@@ -89,7 +89,8 @@
"compact": "Compact",
"legacy": "Legacy"
},
"type": "Type"
"type": "Type",
"filter": "Filter"
},
"form": {
"username": "Username",
@@ -100,7 +101,18 @@
"forgotpassword": "Forgot Password",
"submit": "Submit",
"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": {
"frontpage": {
@@ -129,6 +141,7 @@
"alt": "Search across the fediverse"
}
},
"createPost": "Create Post",
"post": {
"crosspostCount": "crossposts",
"commentCount": "comments",
@@ -143,6 +156,14 @@
"part": "You're viewing part of a thread.",
"context": "Show Context"
}
},
"inbox": {
"title": "Inbox",
"markAsRead": "Mark All Read",
"empty": {
"title": "No new notifications",
"description": "Messages, replies, and mentions will appear here."
}
}
},
"cards": {
@@ -204,6 +225,7 @@
"common": {
"back": "Back",
"next": "Next",
"debug": "Debug"
"debug": "Debug",
"refresh": "Refresh"
}
}
+91 -22
View File
@@ -7,19 +7,19 @@
},
"nav": {
"home": "Accueil",
"admin": "Admin",
"admin": "Administration",
"moderation": "Modération",
"communities": "Explorer",
"search": "Rechercher",
"create": {
"label": "Créer",
"post": "Post",
"post": "Publication",
"community": "Communauté",
"logingate": "Vous devez vous connecter pour créer du contenu."
},
"menu": {
"label": "Profil",
"app": "App",
"app": "Application",
"settings": "Paramètres",
"colorscheme": {
"label": "Schéma de couleurs",
@@ -39,7 +39,13 @@
"logout": "Se déconnecter",
"signup": "S'inscrire",
"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": {
"location": {
@@ -58,60 +64,114 @@
"time": {
"label": "Temps",
"all": "Tout",
"9months": "9 Mois",
"6months": "6 Mois",
"3months": "3 Mois",
"9months": "9 mois",
"6months": "6 mois",
"3months": "3 mois",
"month": "Mois",
"week": "Semaine",
"day": "Jour",
"12hours": "12 Heures",
"6hours": "6 Heures",
"12hours": "12 heures",
"6hours": "6 heures",
"hour": "Heure"
}
},
"new": "Nouveau",
"old": "Ancien",
"controversial": "Controversé",
"scaled": "Adapté",
"scaled": "Redimensionné",
"mostcomments": "Commentaires",
"newcomments": "Nouvelles réponses"
},
"view": {
"label": "Vue",
"cozy": "Cosy",
"cozy": "Confortable",
"list": "Liste",
"compact": "Compact",
"legacy": "Ancien"
}
"legacy": "Hérité"
},
"type": "Type"
},
"form": {
"username": "Nom d'utilisateur",
"name": "Nom",
"instance": "URL de l'instance",
"password": "Mot de passe",
"2fa": "Code 2FA",
"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": {
"frontpage": {
"title": "Page d'accueil",
"footer": "{{users:number}} {{users; 1:utilisateur; default:utilisateurs;}} actif(s)"
},
"modlog": "Modlog",
"modlog": "Journal de modération",
"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": {
"site": {
"about": "À propos",
"stats": "Statistiques",
"admins": "Admins"
"admins": "Administrateurs"
},
"community": {
"members": "Membres",
"moderators": "Modérateurs"
}
},
"content": {
"users": "Utilisateurs",
"all": "Tout",
"posts": "Posts",
"users": "Utilisateurs",
"posts": "Publications",
"comments": "Commentaires",
"communities": "Communautés"
},
@@ -122,13 +182,13 @@
"unsave": "Désénregistrer",
"more": {
"label": "Plus d'actions",
"edit": "Éditer",
"edit": "Modifier",
"creator": "Créateur",
"actions": "Actions",
"markRead": "Marquer comme lu",
"markUnread": "Marquer comme non lu",
"share": "Partager",
"crosspost": "Crossposter",
"crosspost": "Republier",
"delete": "Supprimer",
"restore": "Restaurer"
}
@@ -142,11 +202,20 @@
"saved": "Enregistré"
}
},
"comment": {
"reply": "Répondre",
"actions": {
"label": "Actions",
"link": "Copier le lien"
},
"locked": "Cette publication est verrouillée."
},
"moderation": {
"report": "Signaler"
},
"common": {
"back": "Retour",
"next": "Suivant"
"next": "Suivant",
"debug": "Débogage"
}
}