Doceditor: add support i18next

This commit is contained in:
Timofey Boyko 2024-02-02 18:41:50 +03:00
parent 1a7b900c44
commit c9515e8fed
76 changed files with 647 additions and 59 deletions

View File

@ -34,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
autoGeneratedTranslations.js

View File

@ -1,4 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: "/doceditor",
compiler: {

View File

@ -4,16 +4,18 @@
"private": true,
"scripts": {
"build": "next build",
"start": "next dev -p 5013",
"start": "node ./scripts/buildTranslations.js && next dev -p 5013",
"start-prod": "next start -p 5013",
"lint": "next lint"
},
"dependencies": {
"@onlyoffice/document-editor-react": "^1.3.0",
"i18next": "^23.8.2",
"mobx": "^6.8.0",
"next": "14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.1",
"styled-components": "^5.3.9"
},
"devDependencies": {

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "يمكنك فتح المستند من خلال البوابة أو بواسطة تطبيق الهاتف",
"OpenInApp": "فتح بواسطة التطبيق",
"OpeningDocument": "فتح المستند",
"StayInBrowser": "متابعة من خلال المتصفح"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "وثائق",
"ErrorConnectionLost": "الاتصال مفقود",
"FileLocation": "افتح موقع ملف",
"FileName": "اسم الملف",
"ImageFileType": "الصور",
"MailMergeFileType": "حدد ملف XLSX",
"OpenSavedDocument": "افتح المستند المحفوظ في علامة تبويب جديدة",
"SelectFilesType": "حدد نوع الملفات : {{fileType}}",
"UsersWithoutAccess": "بعض المستخدمين الذين تريد ذكرهم ليس لديهم حق الوصول إلى الغرفة: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Sənədi portalda və ya mobil proqramda aça bilərsiniz.",
"OpenInApp": "Tətbiqdə açın",
"OpeningDocument": "Sənədin açılması",
"StayInBrowser": "Brauzerdə qalın"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "Sənədlər",
"ErrorConnectionLost": "Bağlantı itdi",
"FileLocation": "Faylın yerləşdiyi yeri açın",
"FileName": "Fayl adı",
"ImageFileType": "Şəkillər",
"MailMergeFileType": "XLSX formatlı faylı seçin",
"OpenSavedDocument": "Yadda saxlanmış sənədi yeni tabda açın",
"SelectFilesType": "Bu növ faylları seçin: {{fileType}}",
"UsersWithoutAccess": "Qeyd etmək istədiyiniz bəzi istifadəçilərin otağa girişi yoxdur: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Можете да отворите документа в портала или в мобилното приложение",
"OpenInApp": "Отвори в приложението",
"OpeningDocument": "Отваряне на документ",
"StayInBrowser": "Остани в браузъра"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "документи",
"ErrorConnectionLost": "Връзката е изгубена",
"FileLocation": "Mестоположението на файла",
"FileName": "Име на файла",
"ImageFileType": "снимки",
"MailMergeFileType": "Изберете файл във XLSX формат",
"OpenSavedDocument": "Отворете записания документ в нов раздел",
"SelectFilesType": "Изберете файлове от тип: {{fileType}}",
"UsersWithoutAccess": "Някои потребители, които искате да споменете, нямат достъп до стаята: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Dokument můžete otevřít na portálu nebo v mobilní aplikaci",
"OpenInApp": "Otevřít v aplikaci",
"OpeningDocument": "Otevření dokumentu",
"StayInBrowser": "Zůstat v prohlížeči"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "dokumenty",
"ErrorConnectionLost": "Spojení je ztraceno",
"FileLocation": "Otevřít umístění souboru",
"FileName": "Název souboru",
"ImageFileType": "obrázky",
"MailMergeFileType": "Vybrat soubor ve formátu XLSX",
"OpenSavedDocument": "Otevřít uložený dokument na nové kartě",
"SelectFilesType": "Vybrat soubory typu: {{fileType}}",
"UsersWithoutAccess": "Někteří uživatelé, které chcete zmínit, nemají do místnosti přístup: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Sie können das Dokument im Portal oder in der mobilen App öffnen",
"OpenInApp": "In der App öffnen",
"OpeningDocument": "Dokument wird geöffnet",
"StayInBrowser": "Im Browser bleiben"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "Dokumente",
"ErrorConnectionLost": "Verbindung ist unterbrochen",
"FileLocation": "Dateispeicherort öffnen",
"FileName": "Dateiname",
"ImageFileType": "Bilder",
"MailMergeFileType": "Datei im XLSX-Format auswählen",
"OpenSavedDocument": "Das gespeicherte Dokument im neuen Tab öffnen",
"SelectFilesType": "Dateien dieses Typs auswählen: {{fileType}}",
"UsersWithoutAccess": "Einige Benutzer, die Sie erwähnen möchten, haben keinen Zugang zum Raum: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Μπορείτε να ανοίξετε το έγγραφο στην πύλη ή στην εφαρμογή για κινητά",
"OpenInApp": "Άνοιγμα στην εφαρμογή",
"OpeningDocument": "Άνοιγμα εγγράφου",
"StayInBrowser": "Παραμονή στο πρόγραμμα περιήγησης"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "Έγγραφα",
"ErrorConnectionLost": "Η σύνδεση χάθηκε",
"FileLocation": "Άνοιγμα τοποθεσίας αρχείου",
"FileName": "Όνομα αρχείου",
"ImageFileType": "Εικόνες",
"MailMergeFileType": "Επιλέξτε το αρχείο σε μορφή XLSX",
"OpenSavedDocument": "Άνοιγμα αποθηκευμένου εγγράφου σε νέα καρτέλα",
"SelectFilesType": "Επιλέξτε αρχεία τύπου: {{fileType}}",
"UsersWithoutAccess": "Ορισμένοι χρήστες τους οποίους θέλετε να αναφέρετε δεν έχουν πρόσβαση στο δωμάτιο: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "You can open the document on the portal or in the mobile application",
"OpenInApp": "Open in the app",
"OpeningDocument": "Opening a document",
"StayInBrowser": "Stay in the browser"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documents",
"ErrorConnectionLost": "Connection is lost",
"FileLocation": "Open file location",
"FileName": "File name",
"ImageFileType": "images",
"MailMergeFileType": "Select .XLSX file",
"OpenSavedDocument": "Open saved document in new tab",
"SelectFilesType": "Select files type: {{fileType}}",
"UsersWithoutAccess": "Some users whom you want to mention don't have access to the room: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Usted puede abrir el documento en el portal o en la aplicación móvil",
"OpenInApp": "Abrir en la aplicación",
"OpeningDocument": "Abriendo el documento",
"StayInBrowser": "Quedarse en el navegador"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documentos",
"ErrorConnectionLost": "Se ha perdido la conexión",
"FileLocation": "Abrir ubicación del archivo",
"FileName": "Nombre de archivo",
"ImageFileType": "imágenes",
"MailMergeFileType": "Seleccionar archivo en formato XLSX",
"OpenSavedDocument": "Abrir el documento guardado en una nueva pestaña",
"SelectFilesType": "Seleccionar archivos de tipo: {{fileType}}",
"UsersWithoutAccess": "Algunos usuarios a los que desea mencionar no tienen acceso a la sala: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Voit avata asiakirjan portaalissa tai mobiilisovelluksessa",
"OpenInApp": "Avaa sovelluksessa",
"OpeningDocument": "Avataan asiakirjaa",
"StayInBrowser": "Pysy selaimessa"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "asiakirjat",
"ErrorConnectionLost": "Yhteys on katkennut",
"FileLocation": "Siirry asiakirjoihin",
"FileName": "Tiedostonimi",
"ImageFileType": "kuvat",
"MailMergeFileType": "Valitse tiedosto XLSX-muodossa",
"OpenSavedDocument": "Avaa tallennettu asiakirja uudessa välilehdessä",
"SelectFilesType": "Valitse tiedostot tyyppiä: {{fileType}}",
"UsersWithoutAccess": "Joillakin käyttäjillä, jotka haluat mainita, ei ole pääsyä huoneeseen: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Vous pouvez ouvrir le document sur le portail ou dans l'application mobile",
"OpenInApp": "Ouvrir dans l'application",
"OpeningDocument": "Ouverture du document",
"StayInBrowser": "Rester dans le navigateur"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documents",
"ErrorConnectionLost": "La connexion est perdue",
"FileLocation": "Ouvrir l'emplacement du fichier",
"FileName": "Nom du fichier",
"ImageFileType": "images",
"MailMergeFileType": "Sélectionner le fichier au format XLSX",
"OpenSavedDocument": "Ouvrir le document enregistré dans un nouvel onglet",
"SelectFilesType": "Sélectionner les fichiers de type: {{fileType}}",
"UsersWithoutAccess": "Certains utilisateurs que vous souhaitez mentionner n'ont pas accès à la salle : {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Դուք կարող եք բացել փաստաթուղթը պորտալում կամ բջջային հավելվածում",
"OpenInApp": "Բացեք հավելվածում",
"OpeningDocument": "Փաստաթղթի բացում",
"StayInBrowser": "Մնացեք բրաուզերո"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "Փաստաթղթեր",
"ErrorConnectionLost": "Կապը ընդհատվեց",
"FileLocation": "Բացել ֆայլի գտնվելու վայրը",
"FileName": "ֆայլի անուն",
"ImageFileType": "Պատկերներ",
"MailMergeFileType": "Ընտրել ֆայլը XLSX ձևաչափով",
"OpenSavedDocument": "Բացել պահպանված փաստաթուղթը նոր ներդիրում",
"SelectFilesType": "Ընտրեք տեսակի ֆայլեր՝ {{fileType}}",
"UsersWithoutAccess": "Որոշ օգտատերեր, որոնց ցանկանում եք նշել, մուտք չունեն սենյակ. {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "È possibile aprire il documento sul portale o nell'applicazione mobile",
"OpenInApp": "Apri nell'app",
"OpeningDocument": "Apertura di un documento",
"StayInBrowser": "Rimani nel browser"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documenti",
"ErrorConnectionLost": "La connessione è persa",
"FileLocation": "Aprire la posizione del file",
"FileName": "Nome di file",
"ImageFileType": "immagine",
"MailMergeFileType": "Selezionare il file nel formato XLSX",
"OpenSavedDocument": "Aprire il documento salvato in una scheda nuova",
"SelectFilesType": "Selezionare i file del tipo: {{fileType}}",
"UsersWithoutAccess": "Alcuni utenti che vuoi menzionare non hanno accesso alla stanza: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "ポータルまたはモバイルアプリケーションでドキュメントを開くことができます",
"OpenInApp": "アプリで開く",
"OpeningDocument": "ドキュメントを開いています",
"StayInBrowser": "ブラウザのまま"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "ドキュメント",
"ErrorConnectionLost": "接続が切断されました",
"FileLocation": "ファイルの場所を開く",
"FileName": "ファイル名",
"ImageFileType": "画像",
"MailMergeFileType": "XLSX形式のファイルを選択する",
"OpenSavedDocument": "保存されたファイルを新しいタブで開く",
"SelectFilesType": " {{fileType}}タイプのファイルの選択",
"UsersWithoutAccess": "言及したいユーザーの中には、ルームにアクセスできない人がいます:{{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "포털이나 모바일 애플리케이션에서 문서를 열 수 있습니다",
"OpenInApp": "앱에서 열기",
"OpeningDocument": "문서 여는 중",
"StayInBrowser": "계속 브라우저 사용"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "문서",
"ErrorConnectionLost": "연결이 끊어졌습니다",
"FileLocation": "파일 위치 열기",
"FileName": "파일명",
"ImageFileType": "이미지",
"MailMergeFileType": "XLSX 포맷 파일 선택",
"OpenSavedDocument": "새로운 탭에서 저장 문서 열기",
"SelectFilesType": "파일 유형 선택: {{fileType}}",
"UsersWithoutAccess": "언급하려는 일부 사용자가 방에 액세스할 수 없습니다: {{users}}"
}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "ເອກະສານ",
"ErrorConnectionLost": "ການເຊື່ອມຕໍ່ຫາຍໄປ",
"FileLocation": "ເປີດບ່ອນຕຳແໜ່ງເອກະສານ",
"FileName": "ຊື່ຟາຍ",
"ImageFileType": "ຮູບພາບ",
"MailMergeFileType": "ກະລຸນາເລືືອກໄຟລ໌ເປັນ .XLSX",
"OpenSavedDocument": "ເປີດເອກະສານທີ່ບັນທືກໄວ້ໃນແຖບໃໝ່",
"SelectFilesType": "ກະລຸນາເລືອກປະເພດໄຟລ໌ {{fileType}}",
"UsersWithoutAccess": "ຜູ້​ໃຊ້​ບາງ​ຄົນ​ທີ່​ທ່ານ​ຕ້ອງ​ການ​ກ່າວ​ເຖິງ​ບໍ່​ມີ​ການ​ເຂົ້າ​ເຖິງ​ຫ້ອງ: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Dokumentu var atvērt portālā un mobilajā lietotnē",
"OpenInApp": "Atvērt lietotnē",
"OpeningDocument": "Notiek dokumenta atvēršana",
"StayInBrowser": "Palieciet pārlūkprogrammā"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "dokumenti",
"ErrorConnectionLost": "Zudis savienojums",
"FileLocation": "Atvērt faila atrašanās vietu",
"FileName": "Faila nosaukums",
"ImageFileType": "attēli",
"MailMergeFileType": "Atlasiet failu XLSX formātā",
"OpenSavedDocument": "Atvērt saglabāto dokumentu jaunā cilnē",
"SelectFilesType": "Atlasīt šāda veida failus: {{fileType}}",
"UsersWithoutAccess": "Daži lietotāji, kurus vēlaties pieminēt, nevar piekļūt telpai: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "U kunt het document openen op het portaal of in de mobiele applicatie",
"OpenInApp": "Openen in de app",
"OpeningDocument": "Een document openen",
"StayInBrowser": "Blijf in de browser"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documenten",
"ErrorConnectionLost": "Verbinding is verbroken",
"FileLocation": "Open bestandslocatie",
"FileName": "Bestandsnaam",
"ImageFileType": "afbeeldingen",
"MailMergeFileType": "Selecteer het bestand in XLSX-formaat",
"OpenSavedDocument": "Open bewaard document in nieuwe tab",
"SelectFilesType": "Kies bestanden van het type: {{fileType}}",
"UsersWithoutAccess": "Een aantal gebruikers die u wilt vermelden hebben geen toegang tot de kamer: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Możesz otworzyć dokument w portalu lub w aplikacji mobilnej",
"OpenInApp": "Otwórz w aplikacji",
"OpeningDocument": "Otwieranie dokumentu",
"StayInBrowser": "Pozostań w przeglądarce"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "dokumenty",
"ErrorConnectionLost": "Połączenie zostało utracone",
"FileLocation": "Otwórz lokalizację pliku",
"FileName": "Nazwa pliku",
"ImageFileType": "obrazy",
"MailMergeFileType": "Wybierz plik w formacie XLSX",
"OpenSavedDocument": "Otwórz zapisany dokument w nowej zakładce",
"SelectFilesType": "Wybierz pliki z rodzaju: {{fileType}}",
"UsersWithoutAccess": "Niektórzy użytkownicy, których chcesz oznaczyć, nie mają dostępu do pokoju: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Você pode abrir o documento no portal ou no aplicativo móvel",
"OpenInApp": "Abra no aplicativo",
"OpeningDocument": "Abrindo um documento",
"StayInBrowser": "Fique no navegador"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documentos",
"ErrorConnectionLost": "A conexão foi perdida",
"FileLocation": "Local do arquivo aberto",
"FileName": "Nome de Arquivo",
"ImageFileType": "imagens",
"MailMergeFileType": "Selecione o arquivo no formato XLSX",
"OpenSavedDocument": "Abrir o documento salvo numa pasta nova",
"SelectFilesType": "Selecionar arquivos do tipo: {{fileType}}",
"UsersWithoutAccess": "Alguns usuários que você deseja mencionar não têm acesso à sala: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Pode abrir o documento no portal ou na aplicação",
"OpenInApp": "Abrir na app",
"OpeningDocument": "A abrir um documento",
"StayInBrowser": "Permanecer no navegador"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "ficheiros",
"ErrorConnectionLost": "A conexão foi perdida",
"FileLocation": "Abrir localização",
"FileName": "Nome do ficheiro",
"ImageFileType": "imagens",
"MailMergeFileType": "Selecione o ficheiro no formato XLSX",
"OpenSavedDocument": "Abrir o documento guardado numa nova aba",
"SelectFilesType": "Selecione ficheiros do tipo: {{fileType}}",
"UsersWithoutAccess": "Alguns utilizadores que quer mencionar não têm acesso à sala: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Puteți să deschideți documentul pe portalul sau din aplicația mobilă",
"OpenInApp": "Deschide din aplicația",
"OpeningDocument": "Deschidere document",
"StayInBrowser": "Rămâi în browser-ul"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "documente",
"ErrorConnectionLost": "Conexiunea este pierdută",
"FileLocation": "Deschidere locația fișierului",
"FileName": "Numele fișierului",
"ImageFileType": "imagini",
"MailMergeFileType": "Selectare fișier format XLSX",
"OpenSavedDocument": "Deschide documentul salvat într-o filă nouă",
"SelectFilesType": "Selectare tip de fișier: {{fileType}}",
"UsersWithoutAccess": "Unii utilizatori pe care doriţi să îi menţionaţi nu au acces la sala: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Вы можете открыть документ на портале или в мобильном приложении",
"OpenInApp": "Открыть в приложении",
"OpeningDocument": "Открытие документа",
"StayInBrowser": "Остаться в браузере"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "документы",
"ErrorConnectionLost": "Соединение потеряно",
"FileLocation": "Открыть расположение файла",
"FileName": "Имя файла",
"ImageFileType": "изображения",
"MailMergeFileType": "Выбрать файлы в формате XLSX",
"OpenSavedDocument": "Открыть сохраненный документ в новой вкладке",
"SelectFilesType": "Выбрать файлы типа: {{fileType}}",
"UsersWithoutAccess": "Некоторые пользователи, которых вы хотите упомянуть, не имеют доступа к комнате: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Môžete otvoriť dokument na portáli alebo v mobilnej aplikácii",
"OpenInApp": "Otvoriť v aplikácii",
"OpeningDocument": "Otvorenie dokumentu",
"StayInBrowser": "Zostať v prehliadači"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "dokumenty",
"ErrorConnectionLost": "Pripojenie sa stratilo",
"FileLocation": "Otvoriť umiestnenie súboru",
"FileName": "Názov súboru",
"ImageFileType": "obrázky",
"MailMergeFileType": "Vybrat soubor vo formátu XLSX",
"OpenSavedDocument": "Otevřít uložený dokument na nové kartě",
"SelectFilesType": "Vybrat soubory typu: {{fileType}}",
"UsersWithoutAccess": "Niektorí používatelia, ktorých chcete označiť, nemajú prístup do miestnosti: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Dokument lahko odprete na portalu ali v mobilni aplikaciji",
"OpenInApp": "Odprite v aplikaciji",
"OpeningDocument": "Odprite dokument",
"StayInBrowser": "Ostanite v brskalniku"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "dokumenti",
"ErrorConnectionLost": "Povezava je prekinjena",
"FileLocation": "Pojdi v dokumente",
"FileName": "Ime datoteke",
"ImageFileType": "slike",
"MailMergeFileType": "Izberi datoteko v XLSX formatu",
"OpenSavedDocument": "Odpri shranjen dokument v novem zavihku",
"SelectFilesType": "Izberi datoteke ali tip: {{fileType}}",
"UsersWithoutAccess": "Nekateri uporabniki, ki jih želite omeniti, nimajo dostopa do sobe: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Belgeyi portalda veya mobil uygulamada açabilirsiniz",
"OpenInApp": "Uygulamada aç",
"OpeningDocument": "Belge açılıyor",
"StayInBrowser": "Tarayıcıda kal"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "dökümanlar",
"ErrorConnectionLost": "Bağlantı kesildi",
"FileLocation": "Dosya konumunu aç",
"FileName": "Dosya Adı",
"ImageFileType": "görüntüler",
"MailMergeFileType": "Dosyayı XLSX formatında seçin",
"OpenSavedDocument": "Kaydedilen belgeyi yeni sekmede aç",
"SelectFilesType": "Şu türdeki dosyaları seçin: {{fileType}}",
"UsersWithoutAccess": "Bahsetmek istediğiniz bazı kullanıcıların odaya erişimi yok: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Ви можете відкрити документ на порталі або в мобільному застосунку",
"OpenInApp": "Відкрити в застосунку",
"OpeningDocument": "Відкриття документа",
"StayInBrowser": "Залишитися у браузері"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "документи",
"ErrorConnectionLost": "З'єднання втрачено",
"FileLocation": "Перейти до документів",
"FileName": "Ім'я файлу",
"ImageFileType": "картинки",
"MailMergeFileType": "Вибрати файл у форматі XLSX",
"OpenSavedDocument": "Відкрити збережений документ на новій вкладці",
"SelectFilesType": "Вибрати файли типу: {{fileType}}",
"UsersWithoutAccess": "Деякі користувачі, яких ви хочете згадати, не мають доступу до кімнати: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "Bạn có thể mở tài liệu trên cổng thông tin hoặc trong ứng dụng di động",
"OpenInApp": "Mở trong ứng dụng",
"OpeningDocument": "Đang mở tài liệu",
"StayInBrowser": "Ở lại trình duyệt"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "tài liệu",
"ErrorConnectionLost": "Mất kết nối",
"FileLocation": "Đi tới Tài liệu",
"FileName": "Tên file",
"ImageFileType": "hình ảnh",
"MailMergeFileType": "Chọn tệp tin trong định dạng XLSX",
"OpenSavedDocument": "Mở tài liệu đã lưu trong tab mới",
"SelectFilesType": "Chọn tệp tin loại: {{fileType}}",
"UsersWithoutAccess": "Một số người dùng mà bạn muốn đề cập đến không có quyền truy cập vào phòng: {{users}}"
}

View File

@ -0,0 +1,6 @@
{
"DeepLinkText": "您可以在门户或移动应用中打开文档",
"OpenInApp": "在应用中打开",
"OpeningDocument": "正在打开文档",
"StayInBrowser": "始终在浏览器中"
}

View File

@ -0,0 +1,11 @@
{
"DocumentsFileType": "文档",
"ErrorConnectionLost": "已断开连接",
"FileLocation": "打开文件的位置",
"FileName": "文件名称",
"ImageFileType": "图片",
"MailMergeFileType": "选择XLSX格式的文件",
"OpenSavedDocument": "在新标签中打开已保存的文件",
"SelectFilesType": "选择类型的文件: {{fileType}}",
"UsersWithoutAccess": "您想提及的部分用户没有房间访问权限:{{users}}"
}

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

Before

Width:  |  Height:  |  Size: 629 B

View File

@ -0,0 +1,12 @@
const path = require("path");
const beforeBuild = require("@docspace/shared/utils/beforeBuild");
beforeBuild(
[
path.join(__dirname, "../public/locales"),
path.join(__dirname, "../../../public/locales"),
],
path.join(__dirname, "../src/utils/autoGeneratedTranslations.js"),
null,
true,
);

View File

@ -1,5 +1,5 @@
import { Inter } from "next/font/google";
import "./globals.css";
import "../styles/globals.css";
import StyledComponentsRegistry from "@/utils/registry";

View File

@ -1,7 +0,0 @@
.main {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
min-height: 100vh;
}

View File

@ -1,5 +1,5 @@
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import type { Metadata } from "next";
import Editor from "@/components/Editor";
import { getData } from "@/utils/actions";
@ -9,7 +9,7 @@ export const metadata: Metadata = {
description: "",
};
export default async function Page({
async function Page({
searchParams,
}: {
searchParams?: { [key: string]: string };
@ -34,3 +34,5 @@ export default async function Page({
return <Editor {...data} />;
}
export default Page;

View File

@ -15,6 +15,8 @@ import useSocketHelper from "@/hooks/useSocketHelper";
import useSelectFolderDialog from "@/hooks/useSelectFolderDialog";
import SelectFolderDialog from "./SelectFolderDialog";
import { getI18NInstance } from "@/utils/i18n";
import { I18nextProvider } from "react-i18next";
const SYSTEM_THEME = getSystemTheme();
@ -25,6 +27,8 @@ const Editor = ({
successAuth,
user,
}: EditorProps) => {
const i18n = getI18NInstance(user.cultureName || "en", settings.culture);
const [currentColorTheme, setCurrentColorTheme] =
React.useState<TColorScheme | null>(null);
@ -49,7 +53,7 @@ const Editor = ({
if (theme === ThemeKeys.BaseStr)
return { ...Base, currentColorTheme, interfaceDirection: "ltr" };
return { ...Base, currentColorTheme, interfaceDirection: "ltr" };
return { ...Dark, currentColorTheme, interfaceDirection: "ltr" };
};
const getCurrentColorTheme = React.useCallback(async () => {
@ -89,27 +93,29 @@ const Editor = ({
}
return (
<ThemeProvider theme={theme}>
<DocumentEditor
id={"docspace_editor"}
documentServerUrl={documentserverUrl}
config={newConfig}
height="100%"
width="100%"
events_onDocumentReady={onDocumentReady}
/>
{isVisibleSelectFolderDialog && !!socketHelper && (
<SelectFolderDialog
socketHelper={socketHelper}
isVisible={isVisibleSelectFolderDialog}
onSubmit={onSubmitSelectFolderDialog}
onClose={onCloseSelectFolderDialog}
titleSelectorFolder={titleSelectorFolderDialog}
fileInfo={fileInfo}
<I18nextProvider i18n={i18n}>
<ThemeProvider theme={theme}>
<DocumentEditor
id={"docspace_editor"}
documentServerUrl={documentserverUrl}
config={newConfig}
height="100%"
width="100%"
events_onDocumentReady={onDocumentReady}
/>
)}
</ThemeProvider>
{isVisibleSelectFolderDialog && !!socketHelper && (
<SelectFolderDialog
socketHelper={socketHelper}
isVisible={isVisibleSelectFolderDialog}
onSubmit={onSubmitSelectFolderDialog}
onClose={onCloseSelectFolderDialog}
titleSelectorFolder={titleSelectorFolderDialog}
fileInfo={fileInfo}
/>
)}
</ThemeProvider>
</I18nextProvider>
);
};

View File

@ -0,0 +1,3 @@
export const useTranslation = ({}) => {
return {};
};

View File

@ -1,3 +1,5 @@
import { i18n } from "i18next";
import {
TDocServiceLocation,
TFile,
@ -130,8 +132,8 @@ export interface IResponse {
settings: TSettings;
successAuth: boolean;
isSharingAccess: boolean;
error?: unknown;
}
export interface EditorProps extends IResponse {}
@ -165,3 +167,5 @@ export interface SelectFolderDialogProps {
export interface UseSocketHelperProps {
socketUrl: string;
}
export interface UseTranslationProps {}

View File

@ -1,11 +1,13 @@
"use server";
import { headers } from "next/headers";
import { redirect } from "next/navigation";
import { i18n } from "i18next";
import { getLtrLanguageForEditor } from "@docspace/shared/utils/common";
import { TenantStatus } from "@docspace/shared/enums";
import { IResponse } from "@/types";
import { redirect } from "next/navigation";
import { getI18NInstance } from "./i18n";
const API_PREFIX = "api/2.0";

View File

@ -0,0 +1,46 @@
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import config from "../../../../../buildtools/config/appsettings.json";
import { getLtrLanguageForEditor } from "@docspace/shared/utils/common";
import { translations } from "./autoGeneratedTranslations";
export const getI18NInstance = (lng: string, portalLng: string) => {
const newInstance = i18n.createInstance();
const currentLng = getLtrLanguageForEditor(lng, portalLng, true);
newInstance.use(initReactI18next).init({
lng: currentLng,
fallbackLng: "en",
load: "currentOnly",
supportedLngs: config.web.cultures.split(","),
debug: false,
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
format: function (value, format) {
if (format === "lowercase") return value.toLowerCase();
return value;
},
},
ns: ["Editor", "Common", "DeepLink"],
defaultNS: "Editor",
react: {
useSuspense: false,
},
resources: {},
});
Array.from(translations).forEach(([lng, nsList]) => {
Array.from(nsList).forEach(([ns, obj]) => {
newInstance.addResourceBundle(lng, ns, obj, true, true);
});
});
return newInstance;
};

View File

@ -15,14 +15,21 @@
"incremental": true,
"plugins": [
{
"name": "next"
}
"name": "next",
},
],
"paths": {
"@/*": ["./src/*"],
"PUBLIC_DIR/*": ["../../public/*"]
}
"PUBLIC_DIR/*": ["../../public/*"],
"ASSETS_DIR/*": ["./public/*"],
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "next.config.js"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"next.config.js",
],
"exclude": ["node_modules"],
}

View File

@ -8,7 +8,12 @@ const { readdir } = require("fs").promises;
const appSettings = require("../../../../buildtools/config/appsettings.json");
const beforeBuild = async (pathsToLocales, pathToFile, additionalPath) => {
const beforeBuild = async (
pathsToLocales,
pathToFile,
additionalPath,
isSSR = false,
) => {
async function* getFiles(dir) {
const dirents = await readdir(dir, { withFileTypes: true });
for (const dirent of dirents) {
@ -98,7 +103,7 @@ const beforeBuild = async (pathsToLocales, pathToFile, additionalPath) => {
: "PUBLIC_DIR";
importString = `${importString}
import ${fileName}${language}Url from "${alias}/${url}?url";\n`;
import ${fileName}${language}Url from "${alias}/${url}${isSSR ? "" : "?url"}";\n`;
});
let content = `//THIS FILE IS AUTO GENERATED\n//DO NOT EDIT AND DELETE IT\n

View File

@ -764,22 +764,26 @@ export const RoomsTypes = RoomsTypeValues.reduce<Record<number, number>>(
);
export const getSystemTheme = () => {
const isDesktopClient = window.AscDesktopEditor !== undefined;
const desktopClientTheme = window?.RendererProcessVariable?.theme;
const isDark =
desktopClientTheme?.id === "theme-dark" ||
desktopClientTheme?.id === "theme-contrast-dark" ||
(desktopClientTheme?.id === "theme-system" &&
desktopClientTheme?.system === "dark");
if (typeof window !== "undefined") {
const isDesktopClient = window?.AscDesktopEditor !== undefined;
const desktopClientTheme = window?.RendererProcessVariable?.theme;
const isDark =
desktopClientTheme?.id === "theme-dark" ||
desktopClientTheme?.id === "theme-contrast-dark" ||
(desktopClientTheme?.id === "theme-system" &&
desktopClientTheme?.system === "dark");
return isDesktopClient
? isDark
? ThemeKeys.DarkStr
: ThemeKeys.BaseStr
: window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches
? ThemeKeys.DarkStr
: ThemeKeys.BaseStr;
return isDesktopClient
? isDark
? ThemeKeys.DarkStr
: ThemeKeys.BaseStr
: window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches
? ThemeKeys.DarkStr
: ThemeKeys.BaseStr;
}
return ThemeKeys.BaseStr;
};
export const getEditorTheme = (theme: ThemeKeys) => {

View File

@ -3096,11 +3096,13 @@ __metadata:
"@types/react-dom": "npm:^18"
eslint: "npm:^8"
eslint-config-next: "npm:14.0.4"
i18next: "npm:^23.8.2"
mobx: "npm:^6.8.0"
next: "npm:14.0.4"
prettier: "npm:^3.2.4"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-i18next: "npm:^14.0.1"
styled-components: "npm:^5.3.9"
typescript: "npm:^5"
languageName: unknown
@ -17452,6 +17454,15 @@ __metadata:
languageName: node
linkType: hard
"i18next@npm:^23.8.2":
version: 23.8.2
resolution: "i18next@npm:23.8.2"
dependencies:
"@babel/runtime": "npm:^7.23.2"
checksum: 594c4d5bafd9ac0073a5f2c0ccb40b157571857d43f7f22949a5ab6ea07e6e6f7e39058ddee6e7396369b54d5d741e76cba59c0d5c23ce0ab99e06b249c66f5e
languageName: node
linkType: hard
"iconv-lite@npm:0.4.24":
version: 0.4.24
resolution: "iconv-lite@npm:0.4.24"
@ -24702,6 +24713,24 @@ __metadata:
languageName: node
linkType: hard
"react-i18next@npm:^14.0.1":
version: 14.0.1
resolution: "react-i18next@npm:14.0.1"
dependencies:
"@babel/runtime": "npm:^7.22.5"
html-parse-stringify: "npm:^3.0.1"
peerDependencies:
i18next: ">= 23.2.3"
react: ">= 16.8.0"
peerDependenciesMeta:
react-dom:
optional: true
react-native:
optional: true
checksum: f286bac8d091153dc5e8a469c181fddc916c660b10ca496f2fac7bd41ec6dd04e3074e0ce32db5f0192690fc6dbd522fbcf8644813a86b77eeee75d10725024b
languageName: node
linkType: hard
"react-is@npm:18.1.0":
version: 18.1.0
resolution: "react-is@npm:18.1.0"