Skip to content

Commit

Permalink
💄 style: improve thread i18n locale (lobehub#4807)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Nov 27, 2024
1 parent d726f33 commit 3da1704
Show file tree
Hide file tree
Showing 21 changed files with 117 additions and 22 deletions.
7 changes: 6 additions & 1 deletion locales/ar/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "سيتم حذف هذا الموضوع الفرعي، ولن يمكن استعادته بعد الحذف، يرجى توخي الحذر."
}
},
"newPortalThread": {
"includeContext": "تضمين سياق الموضوع",
"title": "فتح موضوع فرعي جديد"
},
"notSupportMultiModals": "الموضوعات الفرعية لا تدعم حاليًا تحميل الملفات/الصور، إذا كان لديك أي طلب، لا تتردد في ترك رسالة: <1>💬 قسم النقاش</1>"
}
7 changes: 6 additions & 1 deletion locales/bg-BG/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Ще изтриете тази подтема. След изтриването ѝ няма да може да бъде възстановена, моля, бъдете внимателни."
}
},
"newPortalThread": {
"includeContext": "Включи контекста на темата",
"title": "Създаване на нова подтема"
},
"notSupportMultiModals": "Подтемите в момента не поддържат качване на файлове/снимки. Ако имате нужда, моля, оставете съобщение: <1>💬 Дискусионен форум</1>"
}
7 changes: 6 additions & 1 deletion locales/de-DE/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Sie sind dabei, dieses Unterthema zu löschen. Nach dem Löschen kann es nicht wiederhergestellt werden. Bitte seien Sie vorsichtig."
}
},
"newPortalThread": {
"includeContext": "Themenkontext einbeziehen",
"title": "Neues Unterthema eröffnen"
},
"notSupportMultiModals": "Unterthemen unterstützen derzeit keinen Datei-/Bilderupload. Bei Bedarf freuen wir uns über Nachrichten: <1>💬 Diskussionsbereich</1>"
}
7 changes: 6 additions & 1 deletion locales/en-US/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "You are about to delete this subtopic. Once deleted, it cannot be recovered. Please proceed with caution."
}
},
"newPortalThread": {
"includeContext": "Include topic context",
"title": "Start a new subtopic"
},
"notSupportMultiModals": "Subtopics do not currently support file/image uploads. If you have any requests, feel free to leave a message: <1>💬 Discussion Area</1>"
}
7 changes: 6 additions & 1 deletion locales/es-ES/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Está a punto de eliminar este subtema. Una vez eliminado, no se podrá recuperar. Por favor, actúe con precaución."
}
},
"newPortalThread": {
"includeContext": "Incluir contexto del tema",
"title": "Iniciar un nuevo subtema"
},
"notSupportMultiModals": "Los subtemas no admiten la carga de archivos/imágenes por el momento. Si tienes alguna necesidad, no dudes en dejar un comentario: <1>💬 Foro de discusión</1>"
}
7 changes: 6 additions & 1 deletion locales/fa-IR/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "شما در حال حذف این زیرموضوع هستید. پس از حذف، امکان بازیابی آن وجود نخواهد داشت. لطفاً با احتیاط عمل کنید."
}
},
"newPortalThread": {
"includeContext": "شامل زمینه موضوع",
"title": "باز کردن زیرموضوع جدید"
},
"notSupportMultiModals": "زیرموضوع‌ها فعلاً از بارگذاری فایل/عکس پشتیبانی نمی‌کنند، در صورت نیاز، خوشحال می‌شویم که پیام بگذارید: <1>💬 بحث‌خانه</1>"
}
7 changes: 6 additions & 1 deletion locales/fr-FR/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Vous allez supprimer ce sous-sujet. Une fois supprimé, il ne pourra pas être récupéré. Veuillez agir avec prudence."
}
},
"newPortalThread": {
"includeContext": "Inclure le contexte du sujet",
"title": "Ouvrir un nouveau sous-sujet"
},
"notSupportMultiModals": "Les sous-sujets ne prennent pas encore en charge le téléchargement de fichiers/images. Si besoin, n'hésitez pas à laisser un message : <1>💬 Forum de discussion</1>"
}
7 changes: 6 additions & 1 deletion locales/it-IT/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Stai per eliminare questo sottoargomento. Una volta eliminato, non potrà essere ripristinato. Ti preghiamo di procedere con cautela."
}
},
"newPortalThread": {
"includeContext": "Includi il contesto della discussione",
"title": "Avvia un nuovo sottoargomento"
},
"notSupportMultiModals": "Attualmente i sottoargomenti non supportano il caricamento di file/immagini. Se hai bisogno, sentiti libero di lasciare un messaggio: <1>💬 Discussione</1>"
}
7 changes: 6 additions & 1 deletion locales/ja-JP/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "このスレッドを削除しようとしています。削除後は復元できませんので、慎重に操作してください。"
}
},
"newPortalThread": {
"includeContext": "トピックのコンテキストを含める",
"title": "新しいサブトピックを開始する"
},
"notSupportMultiModals": "サブトピックではファイルや画像のアップロードはサポートされていません。必要があれば、コメントを残してください:<1>💬 ディスカッションエリア</1>"
}
7 changes: 6 additions & 1 deletion locales/ko-KR/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "이 하위 주제를 삭제하려고 합니다. 삭제 후에는 복구할 수 없으니 신중하게 진행해 주시기 바랍니다."
}
},
"newPortalThread": {
"includeContext": "주제 맥락 포함",
"title": "새로운 하위 주제 시작하기"
},
"notSupportMultiModals": "하위 주제는 현재 파일/이미지 업로드를 지원하지 않습니다. 필요하신 경우 댓글로 남겨주세요: <1>💬 토론 구역</1>"
}
7 changes: 6 additions & 1 deletion locales/nl-NL/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "U staat op het punt dit subonderwerp te verwijderen. Na verwijdering kan het niet worden hersteld, dus wees voorzichtig."
}
},
"newPortalThread": {
"includeContext": "Inclusief onderwerpcontext",
"title": "Een nieuw subonderwerp starten"
},
"notSupportMultiModals": "Subonderwerpen ondersteunen momenteel geen bestand/afbeelding uploads. Als u behoefte heeft, laat dan gerust een bericht achter: <1>💬 Discussieforum</1>"
}
7 changes: 6 additions & 1 deletion locales/pl-PL/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Zaraz usuniesz ten wątek, po usunięciu nie będzie można go przywrócić, proszę postępować ostrożnie."
}
},
"newPortalThread": {
"includeContext": "Zawiera kontekst tematu",
"title": "Rozpocznij nowy podtemat"
},
"notSupportMultiModals": "Podtematy obecnie nie obsługują przesyłania plików/zdjęć. W przypadku potrzeby, zapraszamy do pozostawienia wiadomości: <1>💬 Dyskusja</1>"
}
7 changes: 6 additions & 1 deletion locales/pt-BR/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Você está prestes a remover este subtópico. Após a exclusão, não será possível recuperá-lo. Por favor, proceda com cautela."
}
},
"newPortalThread": {
"includeContext": "Incluir contexto do tópico",
"title": "Iniciar um novo subtópico"
},
"notSupportMultiModals": "Subtópicos atualmente não suportam upload de arquivos/imagens. Se houver necessidade, sinta-se à vontade para deixar uma mensagem: <1>💬 Área de Discussão</1>"
}
7 changes: 6 additions & 1 deletion locales/ru-RU/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Вы собираетесь удалить эту под-тему. После удаления восстановить её будет невозможно, пожалуйста, действуйте осторожно."
}
},
"newPortalThread": {
"includeContext": "Включить контекст темы",
"title": "Открыть новую подтему"
},
"notSupportMultiModals": "Подтемы в настоящее время не поддерживают загрузку файлов/изображений. Если у вас есть потребность, пожалуйста, оставьте сообщение: <1>💬 Обсуждение</1>"
}
7 changes: 6 additions & 1 deletion locales/tr-TR/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Bu alt konuyu silmek üzeresiniz. Silindikten sonra geri alınamaz, lütfen dikkatli olun."
}
},
"newPortalThread": {
"includeContext": "Konu bağlamını dahil et",
"title": "Yeni alt konu aç"
},
"notSupportMultiModals": "Alt konular şu anda dosya/görüntü yüklemeyi desteklemiyor, ihtiyaç duyarsanız lütfen mesaj bırakın: <1>💬 Tartışma Alanı</1>"
}
7 changes: 6 additions & 1 deletion locales/vi-VN/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "Bạn sắp xóa chủ đề con này, sau khi xóa sẽ không thể khôi phục, xin hãy cẩn thận khi thực hiện."
}
},
"newPortalThread": {
"includeContext": "Bao gồm ngữ cảnh chủ đề",
"title": "Mở chủ đề con mới"
},
"notSupportMultiModals": "Chủ đề con hiện không hỗ trợ tải lên tệp/hình ảnh, nếu có nhu cầu, xin vui lòng để lại tin nhắn: <1>💬 Diễn đàn thảo luận</1>"
}
7 changes: 6 additions & 1 deletion locales/zh-CN/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "即将删除该子话题,删除后将不可恢复,请谨慎操作。"
}
},
"newPortalThread": {
"includeContext": "包含话题上下文",
"title": "开启新的子话题"
},
"notSupportMultiModals": "子话题暂不支持文件/图片上传,如有需求,欢迎留言:<1>💬 讨论区</1>"
}
7 changes: 6 additions & 1 deletion locales/zh-TW/thread.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"actions": {
"confirmRemoveThread": "即將刪除該子話題,刪除後將無法恢復,請謹慎操作。"
}
},
"newPortalThread": {
"includeContext": "包含主題上下文",
"title": "開啟新的子主題"
},
"notSupportMultiModals": "子主題暫不支持文件/圖片上傳,如有需求,歡迎留言:<1>💬 討論區</1>"
}
5 changes: 3 additions & 2 deletions src/features/Portal/Thread/Chat/ChatInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { Alert } from '@lobehub/ui';
import Link from 'next/link';
import { memo } from 'react';
import { Trans } from 'react-i18next';

import { ActionKeys } from '@/features/ChatInput/ActionBar/config';
import DesktopChatInput, { FooterRender } from '@/features/ChatInput/Desktop';
Expand Down Expand Up @@ -33,15 +34,15 @@ const Desktop = memo(() => {
banner
closable
message={
<div>
<Trans i18nKey={'notSupportMultiModals'} ns={'thread'}>
子话题暂不支持文件/图片上传,如有需求,欢迎留言:
<Link
href={'https://github.com/lobehub/lobe-chat/discussions/4717'}
style={{ textDecoration: 'underline' }}
>
💬 讨论
</Link>
</div>
</Trans>
}
onClose={() => {
updateSystemStatus({ hideThreadLimitAlert: true });
Expand Down
6 changes: 4 additions & 2 deletions src/features/Portal/Thread/Header/New.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Icon } from '@lobehub/ui';
import { Checkbox, Typography } from 'antd';
import { GitBranch } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';

import { useChatStore } from '@/store/chat';
Expand All @@ -9,14 +10,15 @@ import { oneLineEllipsis } from '@/styles';
import { ThreadType } from '@/types/topic';

const NewThreadHeader = () => {
const { t } = useTranslation('thread');
const [newThreadMode] = useChatStore((s) => [portalThreadSelectors.newThreadMode(s)]);

return (
<Flexbox>
<Flexbox align={'center'} gap={8} horizontal style={{ marginInlineStart: 8 }}>
<Icon icon={GitBranch} size={{ fontSize: 20 }} />
<Typography.Text className={oneLineEllipsis} style={{ fontSize: 16, fontWeight: 'bold' }}>
开启新的子话题
{t('newPortalThread.title')}
</Typography.Text>
<Checkbox
checked={newThreadMode === ThreadType.Continuation}
Expand All @@ -27,7 +29,7 @@ const NewThreadHeader = () => {
}}
style={{ marginInlineStart: 12 }}
>
包含话题上下文
{t('newPortalThread.includeContext')}
</Checkbox>
</Flexbox>
</Flexbox>
Expand Down
2 changes: 2 additions & 0 deletions src/locales/default/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ export default {
actions: {
confirmRemoveThread: '即将删除该子话题,删除后将不可恢复,请谨慎操作。',
},
newPortalThread: { includeContext: '包含话题上下文', title: '开启新的子话题' },
notSupportMultiModals: '子话题暂不支持文件/图片上传,如有需求,欢迎留言:<1>💬 讨论区</1>',
};

0 comments on commit 3da1704

Please sign in to comment.