diff --git a/CHANGELOG.md b/CHANGELOG.md index 450309d3..b1642b71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 7.6.7 +## Added +- Dutch translation +- Chinese (Traditional, Taiwan), Basque (Spain), Armenian and Malay (Malaysia) empty file templates + +## Changed +- fix edit locked file +- generate preview by default +- fix collaboration of federated files +- disable forcesave on encryption + ## 7.5.4 ## Changed - compatible with ownCloud 10.11 diff --git a/appinfo/database.xml b/appinfo/database.xml index 1ad441eb..c4e6945d 100644 --- a/appinfo/database.xml +++ b/appinfo/database.xml @@ -42,7 +42,7 @@ last forcesave done - file_id_index + onlyoffice_file_id_index true file_id @@ -51,4 +51,45 @@ + + + *dbprefix*onlyoffice_instance + + + id + integer + 0 + true + 1 + + + remote + text + true + 128 + remote instance address + + + expire + bigint + 0 + time to live + + + status + integer + 0 + true + remote instance status + + + onlyoffice_remote_index + true + + remote + ascending + + + +
\ No newline at end of file diff --git a/appinfo/info.xml b/appinfo/info.xml index b734bc93..465ace3d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within ownCloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage. apl2 Ascensio System SIA - 7.5.4 + 7.6.7 Onlyoffice diff --git a/appinfo/routes.php b/appinfo/routes.php index 5e447ee6..f1753747 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -48,6 +48,7 @@ "ocs" => [ ["name" => "federation#key", "url" => "/api/v1/key", "verb" => "POST"], ["name" => "federation#keylock", "url" => "/api/v1/keylock", "verb" => "POST"], + ["name" => "federation#healthcheck", "url" => "/api/v1/healthcheck", "verb" => "GET"], ["name" => "editorapi#config", "url" => "/api/v1/config/{fileId}", "verb" => "GET"], ["name" => "editorapi#fillempty", "url" => "/api/v1/empty/{fileId}", "verb" => "GET"], ["name" => "settingsapi#get_doc_server_url", "url" => "/api/v1/settings/docserver", "verb" => "GET"], diff --git a/assets b/assets index 01a35499..4b96e283 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 01a35499a3cfb4013d990100e119a7f47f02616f +Subproject commit 4b96e283924e0481299b6400520829649634c23e diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index c1bbe9fc..4b0d57b7 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -37,14 +37,13 @@ use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; -use OCA\Files_Sharing\External\Storage as SharingExternalStorage; - use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\Crypt; use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileVersions; -use OCA\Onlyoffice\KeyManager; use OCA\Onlyoffice\VersionManager; +use OCA\Onlyoffice\KeyManager; +use OCA\Onlyoffice\RemoteInstance; use OCA\Onlyoffice\TemplateManager; /** @@ -534,8 +533,8 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan $prevIsForcesave = KeyManager::wasForcesave($fileId); - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { - $isLock = KeyManager::lockFederatedKey($file, $isForcesave, null); + if (RemoteInstance::isRemoteFile($file)) { + $isLock = RemoteInstance::lockRemoteKey($file, $isForcesave, null); if ($isForcesave && !$isLock) { break; } @@ -548,9 +547,9 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan return $file->putContent($newData); }); - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { + if (RemoteInstance::isRemoteFile($file)) { if ($isForcesave) { - KeyManager::lockFederatedKey($file, false, $isForcesave); + RemoteInstance::lockRemoteKey($file, false, $isForcesave); } } else { KeyManager::lock($fileId, false); @@ -573,6 +572,11 @@ public function track($doc, $users, $key, $status, $url, $token, $history, $chan FileVersions::saveAuthor($file->getFileInfo(), $user); } + if ($this->config->checkEncryptionModule() === "master" + && !$isForcesave) { + KeyManager::delete($fileId); + } + $result = 0; } catch (\Exception $e) { $this->logger->logException($e, ["message" => "Track: $fileId status $status error", "app" => $this->appName]); diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index f89fca1a..d85773d3 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -244,8 +244,10 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = $user = $this->userSession->getUser(); $userId = null; + $accountId = null; if (!empty($user)) { $userId = $user->getUID(); + $accountId = $user->getAccountId(); } list ($file, $error, $share) = empty($shareToken) ? $this->getFile($userId, $fileId, $filePath, $template) : $this->fileUtility->getFileByToken($fileId, $shareToken); @@ -360,9 +362,10 @@ public function config($fileId, $filePath = null, $shareToken = null, $version = $locks = $fileStorage->getLocks($file->getFileInfo()->getInternalPath(), false); if (count($locks) > 0) { $activeLock = $locks[0]; - $lockOwner = explode(' ', trim($activeLock->getOwner()))[0]; - if ($userId !== $lockOwner) { + + if ($accountId !== $activeLock->getOwnerAccountId()) { $isPersistentLock = true; + $lockOwner = $activeLock->getOwner(); $this->logger->debug("File $fileId is locked by $lockOwner", ["app" => $this->appName]); } } diff --git a/controller/federationcontroller.php b/controller/federationcontroller.php index bebb76bd..90ea7e7a 100644 --- a/controller/federationcontroller.php +++ b/controller/federationcontroller.php @@ -28,12 +28,11 @@ use OC\OCS\Result; -use OCA\Files_Sharing\External\Storage as SharingExternalStorage; - use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\DocumentService; use OCA\Onlyoffice\FileUtility; use OCA\Onlyoffice\KeyManager; +use OCA\Onlyoffice\RemoteInstance; /** * OCS handler @@ -137,8 +136,8 @@ public function keylock($shareToken, $path, $lock, $fs) { $fileId = $file->getId(); - if ($file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { - $isLock = KeyManager::lockFederatedKey($file, $lock, $fs); + if (RemoteInstance::isRemoteFile($file)) { + $isLock = RemoteInstance::lockRemoteKey($file, $lock, $fs); if (!$isLock) { return new Result(["error" => "Failed request"]); } @@ -152,4 +151,19 @@ public function keylock($shareToken, $path, $lock, $fs) { $this->logger->debug("Federated request lock for " . $fileId, ["app" => $this->appName]); return new Result(); } + + /** + * Health check instance + * + * @return Result + * + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage + */ + public function healthcheck() { + $this->logger->debug("Federated healthcheck", ["app" => $this->appName]); + + return new Result(["alive" => true]); + } } \ No newline at end of file diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 246ca7bf..c9f39493 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -116,7 +116,7 @@ public function index() { "sameTab" => $this->config->GetSameTab(), "preview" => $this->config->GetPreview(), "versionHistory" => $this->config->GetVersionHistory(), - "encryption" => ($this->config->checkEncryptionModule() === true), + "encryption" => $this->config->checkEncryptionModule(), "limitGroups" => $this->config->GetLimitGroups(), "chat" => $this->config->GetCustomizationChat(), "compactHeader" => $this->config->GetCustomizationCompactHeader(), diff --git a/css/settings.css b/css/settings.css index bb6fca93..3ef71249 100644 --- a/css/settings.css +++ b/css/settings.css @@ -63,7 +63,10 @@ -moz-column-width: 140px; -webkit-column-width: 140px; } -#personal-show + label{ +#personal-show + label { margin-top: -25px; margin-left: 230px; } +.onlyoffice-option-desc { + margin-left: 20px; +} diff --git a/l10n/de.js b/l10n/de.js index 5aed6730..34f0819a 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 036c35c2..5ca5d55f 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -109,6 +109,7 @@ "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 791c0799..cf22598b 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 9a96d85a..5c2ec3a3 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -109,6 +109,7 @@ "Default editor theme": "Standardmäßiges Thema des Editors", "Light": "Hell", "Classic Light": "Klassisch Hell", - "Dark": "Dunkel" + "Dark": "Dunkel", + "This feature is unavailable due to encryption settings.": "Diese Funktion ist wegen der Verschlüsselungseinstellungen nicht verfügbar" },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/es.js b/l10n/es.js index 6b86c0e4..94d1546f 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Tema del editor predeterminado", "Light": "Claro", "Classic Light": "Clásico claro", - "Dark": "Oscuro" + "Dark": "Oscuro", + "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado." }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index c52e3fb0..7f6a203e 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -109,6 +109,7 @@ "Default editor theme": "Tema del editor predeterminado", "Light": "Claro", "Classic Light": "Clásico claro", - "Dark": "Oscuro" + "Dark": "Oscuro", + "This feature is unavailable due to encryption settings.": "Esta característica no está disponible debido a la configuración de cifrado." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/fr.js b/l10n/fr.js index 85dfc80a..8f6c5fef 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Thème d'éditeur par défaut", "Light": "Clair", "Classic Light": "Classique clair", - "Dark": "Sombre" + "Dark": "Sombre", + "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement." }, "nplurals=2; plural=(n > 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 437f75f8..40d2868a 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -109,6 +109,7 @@ "Default editor theme": "Thème d'éditeur par défaut", "Light": "Clair", "Classic Light": "Classique clair", - "Dark": "Sombre" + "Dark": "Sombre", + "This feature is unavailable due to encryption settings.": "Cette fonctionnalité n'est pas disponible en raison des paramètres de chiffrement." },"pluralForm" :"nplurals=2; plural=(n > 1);" } \ No newline at end of file diff --git a/l10n/it.js b/l10n/it.js index cfcff81e..48d03176 100644 --- a/l10n/it.js +++ b/l10n/it.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Tema dell'editor predefinito", "Light": "Chiaro", "Classic Light": "Classico chiaro", - "Dark": "Scuro" + "Dark": "Scuro", + "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia." }, "nplurals=2; plural=(n != 1);"); \ No newline at end of file diff --git a/l10n/it.json b/l10n/it.json index 312cf03a..884550ea 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -109,6 +109,7 @@ "Default editor theme": "Tema dell'editor predefinito", "Light": "Chiaro", "Classic Light": "Classico chiaro", - "Dark": "Scuro" + "Dark": "Scuro", + "This feature is unavailable due to encryption settings.": "Questa funzionalità non è disponibile a causa delle impostazioni di crittografia." },"pluralForm" :"nplurals=2; plural=(n != 1);" } \ No newline at end of file diff --git a/l10n/ja.js b/l10n/ja.js index d1d5c04b..65aef8d7 100644 --- a/l10n/ja.js +++ b/l10n/ja.js @@ -1,27 +1,27 @@ OC.L10N.register( "onlyoffice", { - "Access denied" : "アクセス拒否されました", + "Access denied" : "アクセスが拒否されました", "Invalid request" : "リクエストが不正です", "Files not found" : "ファイルが見つかりません", "File not found" : "ファイルが見つかりません", "Not permitted" : "権限がありません", "Download failed" : "ダウンロードできませんでした", "The required folder was not found" : "開こうとしたフォルダーがありません", - "You don't have enough permission to create" : "充分な作成権限がありません", + "You don't have enough permission to create": "作成権限がありません", "Template not found" : "テンプレートが見つかりません", "Can't create file" : "ファイルを作成できません", "Format is not supported" : "このフォーマットはサポートされていません", "Conversion is not required" : "変換する必要はありません", - "Failed to download converted file" : "コンバート済みファイルをダウンロードできませんでした", + "Failed to download converted file": "変換されたファイルをダウンロードできませんでした", "ONLYOFFICE app is not configured. Please contact admin" : "ONLYOFFICEアプリが設定されていません。管理者に相談してください", "FileId is empty" : "ファイルIDが空です", - "You do not have enough permissions to view the file" : "ファイルを閲覧する権限が足りません", + "You do not have enough permissions to view the file": "ファイルを閲覧する権限ありません", "Error occurred in the document service" : "ドキュメントサービスでエラーが発生しました", - "Not supported version" : "未サポートバージョン", + "Not supported version": "サポートされていないバージョン", "ONLYOFFICE cannot be reached. Please contact admin" : "ONLYOFFICEに接続できません。管理者に相談してください", "Loading, please wait." : "読み込み中です...。しばらくお待ちください。", - "File created" : "ファイル作成されました", + "File created": "ファイルが作成されました", "Open in ONLYOFFICE" : "ONLYOFFICEで開く", "Convert with ONLYOFFICE" : "ONLYOFFICEで変換", "Document" : "ドキュメント", @@ -35,9 +35,9 @@ OC.L10N.register( "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs の位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "暗号化アプリが有効になっていますから、アプリをご使用できません。マスターキーを有効にすると、アプリの作業をご続行できます。", "ONLYOFFICE Docs address": "ONLYOFFICE Docs アドレス", - "Advanced server settings" : "詳細サーバー設定", - "ONLYOFFICE Docs address for internal requests from the server" : "サーバーからの内部リクエストにはONLYOFFICE Docs アドレス", - "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsからの内部リクエストにはサーバーアドレス", + "Advanced server settings": "サーバー詳細設定", + "ONLYOFFICE Docs address for internal requests from the server": "サーバーから内部リクエストに利用されるONLYOFFICE Docs アドレス", + "Server address for internal requests from ONLYOFFICE Docs": "ONLYOFFICE Docsから内部リクエストに利用されるサーバーアドレス", "Secret key (leave blank to disable)" : "シークレットキー (ブランクで無効)", "Open file in the same tab" : "ファイルを同じタブで開く", "The default application for opening the format": "以下のファイルフォーマットをデフォルトで開く", @@ -45,7 +45,7 @@ OC.L10N.register( "View details" : "詳細表示", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", - "Restrict access to editors to following groups" : "アクセス編集できる人を以下のグループに制限する", + "Restrict access to editors to following groups": "エディターの利用を以下のグループに制限する", "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", @@ -54,12 +54,12 @@ OC.L10N.register( "Server settings" : "サーバー設定", "Common settings" : "共通設定", "Editor customization settings" : "エディターカスタム設定", - "The customization section allows personalizing the editor interface": "カスタマイズセクションでは、エディターインターフェイスをパーソナライズできます", - "Display Chat menu button" : "チャットメニューホタンを表示", - "Display the header more compact" : "ヘッダーをよりコンパクトに表示", - "Display Feedback & Support menu button" : "フィードバックとサポートメニューホタンを表示", - "Display Help menu button" : "ヘルプメニューホタンを表示", - "Display monochrome toolbar header" : "モノクローム・ツールバーヘッダーを表示する", + "The customization section allows personalizing the editor interface": "エディターインターフェイスのカスタマイズ", + "Display Chat menu button": "チャットメニューボタンを表示する", + "Display the header more compact": "ヘッダーをよりコンパクトに表示する", + "Display Feedback & Support menu button": "フィードバックとサポートメニューボタンを表示する", + "Display Help menu button": "ヘルプメニューボタンを表示する", + "Display monochrome toolbar header": "ツールバーヘッダーをモノクロで表示する", "Save as" : "別名で保存", "File saved" : "ファイルが保存されました", "Insert image" : "画像を挿入", @@ -69,20 +69,20 @@ OC.L10N.register( "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30日間のテスト期間が終了したら、ONLYOFFICE Docs デモサーバーには繋がらなくなります。", "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "パブリック ONLYOFFICE Docs サーバーを使っているので、プライベートな機密データを利用しないようにしてください。", "Select file to compare" : "比較するファイルを選択", - "Review mode for viewing": "表示するためのレビューモード", + "Review mode for viewing": "レビューモード時の表示方式", "Markup": "マークアップ", "Final": "最終版", "Original": "オリジナル", "version": "バージョン", - "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全でない", + "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全ではありません)", "Keep intermediate versions when editing (forcesave)": "編集時に、中間バージョンを保持する (強制保存)", - "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", - "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用してドキュメントのサムネールを生成する(ディスク容量を消費します)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "編集されたドキュメントの各バージョンのメタデータを保持する(ディスク容量を消費します)", "Clear": "消去", "All history successfully deleted": "すべての履歴が正常に削除されました", "Create": "作成", "Select template" : "テンプレートを選択する", - "Invalid file provided" : "無効なファイルが提供されました", + "Invalid file provided": "提供されたファイルは無効です", "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", @@ -91,7 +91,7 @@ OC.L10N.register( "Template successfully added": "テンプレートが正常に追加されました", "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", - "Failed to delete template": "テンプレートの削除に失敗しました", + "Failed to delete template": "テンプレートを削除できませんでした", "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。", "Download as": "別の形式でダウンロード", "Download": "ダウンロード", @@ -108,9 +108,10 @@ OC.L10N.register( "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください", "Security": "セキュリティ", "Run document macros": "ドキュメントマクロを実行する", - "Default editor theme": "デフォルトのエディタテーマ", + "Default editor theme": "エディターのデフォルトテーマ", "Light": "明るい", - "Classic Light": "明るい(クラシック)", - "Dark": "ダーク" + "Classic Light": "ライト(クラシック)", + "Dark": "ダーク", + "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。" }, "nplurals=1; plural=0;"); diff --git a/l10n/ja.json b/l10n/ja.json index 60d460fd..a53ffe76 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -1,25 +1,25 @@ { "translations": { - "Access denied" : "アクセス拒否されました", + "Access denied" : "アクセスが拒否されました", "Invalid request" : "リクエストが不正です", "Files not found" : "ファイルが見つかりません", "File not found" : "ファイルが見つかりません", "Not permitted" : "権限がありません", "Download failed" : "ダウンロードできませんでした", "The required folder was not found" : "開こうとしたフォルダーがありません", - "You don't have enough permission to create" : "充分な作成権限がありません", + "You don't have enough permission to create" : "作成権限がありません", "Template not found" : "テンプレートが見つかりません", "Can't create file" : "ファイルを作成できません", "Format is not supported" : "このフォーマットはサポートされていません", "Conversion is not required" : "変換する必要はありません", - "Failed to download converted file" : "コンバート済みファイルをダウンロードできませんでした", + "Failed to download converted file" : "変換されたファイルをダウンロードできませんでした", "ONLYOFFICE app is not configured. Please contact admin" : "ONLYOFFICEアプリが設定されていません。管理者に相談してください", "FileId is empty" : "ファイルIDが空です", - "You do not have enough permissions to view the file" : "ファイルを閲覧する権限が足りません", + "You do not have enough permissions to view the file" : "ファイルを閲覧する権限がありません", "Error occurred in the document service" : "ドキュメントサービスでエラーが発生しました", - "Not supported version" : "未サポートバージョン", + "Not supported version" : "サポートされていなバージョン", "ONLYOFFICE cannot be reached. Please contact admin" : "ONLYOFFICEに接続できません。管理者に相談してください", "Loading, please wait." : "読み込み中です...。しばらくお待ちください。", - "File created" : "ファイル作成されました", + "File created" : "ファイルが作成されました", "Open in ONLYOFFICE" : "ONLYOFFICEで開く", "Convert with ONLYOFFICE" : "ONLYOFFICEで変換", "Document" : "ドキュメント", @@ -33,9 +33,9 @@ "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Docs の位置は、ドキュメントサービスがインストールされているサーバーのアドレスを指定します。以下の行の''をサーバーアドレスに変更してください。", "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "暗号化アプリが有効になっていますから、アプリをご使用できません。マスターキーを有効にすると、アプリの作業をご続行できます。", "ONLYOFFICE Docs address" : "ONLYOFFICE Docs アドレス", - "Advanced server settings" : "詳細サーバー設定", - "ONLYOFFICE Docs address for internal requests from the server" : "サーバーからの内部リクエストにはONLYOFFICE Docs アドレス", - "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsからの内部リクエストにはサーバーアドレス", + "Advanced server settings" : "サーバー詳細設定", + "ONLYOFFICE Docs address for internal requests from the server" : "サーバーから内部リクエストに利用されるONLYOFFICE Docs アドレス", + "Server address for internal requests from ONLYOFFICE Docs" : "ONLYOFFICE Docsから内部リクエストに利用されるサーバーアドレス", "Secret key (leave blank to disable)" : "シークレットキー (ブランクで無効)", "Open file in the same tab" : "ファイルを同じタブで開く", "The default application for opening the format": "以下のファイルフォーマットをデフォルトで開く", @@ -43,7 +43,7 @@ "View details" : "詳細表示", "Save" : "保存", "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "アクティブコンテンツの混在は許可されていません。ONLYOFFICE DocsにはHTTPSアドレスが必要です", - "Restrict access to editors to following groups" : "アクセス編集できる人を以下のグループに制限する", + "Restrict access to editors to following groups" : "エディターの利用を以下のグループに制限する", "review" : "レビュー", "form filling" : "フォーム入力", "comment" : "コメント", @@ -52,12 +52,12 @@ "Server settings" : "サーバー設定", "Common settings" : "共通設定", "Editor customization settings" : "エディターカスタム設定", - "The customization section allows personalizing the editor interface": "カスタマイズセクションでは、エディターインターフェイスをパーソナライズできます", - "Display Chat menu button" : "チャットメニューホタンを表示", - "Display the header more compact" : "ヘッダーをよりコンパクトに表示", - "Display Feedback & Support menu button" : "フィードバックとサポートメニューホタンを表示", - "Display Help menu button" : "ヘルプメニューホタンを表示", - "Display monochrome toolbar header" : "モノクローム・ツールバーヘッダーを表示する", + "The customization section allows personalizing the editor interface": "エディターインターフェイスのカスタマイズ", + "Display Chat menu button" : "チャットメニューボタンを表示する", + "Display the header more compact" : "ヘッダーをよりコンパクトに表示する", + "Display Feedback & Support menu button" : "フィードバックとサポートメニューボタンを表示する", + "Display Help menu button" : "ヘルプメニューボタンを表示する", + "Display monochrome toolbar header" : "ツールバーヘッダーをモノクロで表示する", "Save as" : "別名で保存", "File saved" : "ファイルが保存されました", "Insert image" : "画像を挿入", @@ -67,20 +67,20 @@ "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "30日間のテスト期間が終了したら、ONLYOFFICE Docs デモサーバーには繋がらなくなります。", "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "パブリック ONLYOFFICE Docs サーバーを使っているので、プライベートな機密データを利用しないようにしてください。", "Select file to compare" : "比較するファイルを選択", - "Review mode for viewing": "表示するためのレビューモード", + "Review mode for viewing": "レビューモード時の表示方式", "Markup": "マークアップ", "Final": "最終版", "Original": "オリジナル", "version": "バージョン", - "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全でない", + "Disable certificate verification (insecure)": "証明書の検証を無効にする(安全ではありません)", "Keep intermediate versions when editing (forcesave)": "編集時に、中間バージョンを保持する (強制保存)", - "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用して、ドキュメントプレビューを生成する(ディスク容量がかかる)", - "Keep metadata for each version once the document is edited (it will take up disk space)": "ドキュメントが編集されたら、各バージョンのメタデータを保持する(ディスクス容量がかかる)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "ONLYOFFICEを使用してドキュメントのサムネールを生成する(ディスク容量を消費します)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "編集されたドキュメントの各バージョンのメタデータを保持する(ディスク容量を消費します)", "Clear": "消去", "All history successfully deleted": "すべての履歴が正常に削除されました", "Create": "作成", "Select template" : "テンプレートを選択する", - "Invalid file provided" : "無効なファイルが提供されました", + "Invalid file provided" : "提供されたファイルは無効です", "Empty": "空", "Error" : "エラー", "Add a new template": "新しいテンプレートを追加する:", @@ -89,7 +89,7 @@ "Template successfully added": "テンプレートが正常に追加されました", "Template successfully deleted": "テンプレートが正常に削除されました", "Common templates": "よく使われるテンプレート", - "Failed to delete template": "テンプレートの削除に失敗しました", + "Failed to delete template": "テンプレートを削除できませんでした", "File has been converted. Its content might look different.": "ファイルが変換されました。 その内容は異なって見えるかもしれません。", "Download as": "別の形式でダウンロード", "Download": "ダウンロード", @@ -106,9 +106,10 @@ "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "オンラインで入力可能なフォームを作成するには、ONLYOFFICE Docs 7.0版まで更新してください", "Security": "セキュリティ", "Run document macros": "ドキュメントマクロを実行する", - "Default editor theme": "デフォルトのエディタテーマ", + "Default editor theme": "エディターのデフォルトテーマ", "Light": "明るい", - "Classic Light": "明るい(クラシック)", - "Dark": "ダーク" + "Classic Light": "ライト(クラシック)", + "Dark": "ダーク", + "This feature is unavailable due to encryption settings.": "この機能は暗号化の設定により使用できません。" },"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file diff --git a/l10n/nl.js b/l10n/nl.js new file mode 100644 index 00000000..b050da28 --- /dev/null +++ b/l10n/nl.js @@ -0,0 +1,116 @@ +OC.L10N.register( + "onlyoffice", + { + "Access denied" : "Toegang geweigerd", + "Invalid request": "Ongeldig verzoek", + "Files not found": "Bestanden niet gevonden", + "File not found": "Bestand niet gevonden", + "Not permitted": "Niet toegestaan", + "Download failed": "Download mislukt", + "The required folder was not found": "De vereiste map is niet gevonden", + "You don't have enough permission to create": "U heeft geen voldoende aanmaak rechten", + "Template not found": "Sjabloon niet gevonden", + "Can't create file": "Kan bestand niet aanmaken", + "Format is not supported": "Formaat wordt niet ondersteund", + "Conversion is not required": "Converteren is niet vereist", + "Failed to download converted file": "Kan geconverteerd bestand niet downloaden", + "ONLYOFFICE app is not configured. Please contact admin": "ONLYOFFICE app is niet geconfigureerd. Neem contact op met de admin", + "FileId is empty": "FileId is leeg", + "You do not have enough permissions to view the file": "U heeft niet genoeg rechten om het bestand te bekijken", + "Error occurred in the document service": "Er is een fout opgetreden in de documentservice", + "Not supported version": "Niet ondersteunde versie", + "ONLYOFFICE cannot be reached. Please contact admin": "ONLYOFFICE kan niet worden bereikt. Neem contact op met de admin", + "Loading, please wait.": "Laden, wacht alstublieft.", + "File created": "Bestand Aangemaakt", + "Open in ONLYOFFICE": "Open in ONLYOFFICE", + "Convert with ONLYOFFICE": "Converteer met ONLYOFFICE", + "Document": "Document", + "Spreadsheet": "Werkblad", + "Presentation": "Presentaties", + "Error when trying to connect": "Fout bij het verbinden", + "Settings have been successfully updated": "Instellingen zijn met succes bijgewerkt", + "Server can't read xml": "Server kan xml niet lezen", + "Bad Response. Errors: ": "Slechte Reactie. Fouten", + "Documentation": "Documentatie", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line.": "ONLYOFFICE Docs Location geeft het adres op van de server waarop de documentdiensten geïnstalleerd zijn. Verander de '' voor het serveradres in de onderstaande regel.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.": "Encryptie-app is ingeschakeld, de applicatie werkt niet. U kunt blijven werken met de applicatie als u de hoofdsleutel inschakelt.", + "ONLYOFFICE Docs address": "ONLYOFFICE Docs adres", + "Advanced server settings": "Geavanceerde serverinstellingen", + "ONLYOFFICE Docs address for internal requests from the server": "Adres van de ONLYOFFICE Docs voor interne verzoeken van de server", + "Server address for internal requests from ONLYOFFICE Docs": "Serveradres voor interne verzoeken van de ONLYOFFICE Docs", + "Secret key (leave blank to disable)": "Geheime sleutel (leeg laten om niet te te gebruiken)", + "Open file in the same tab": "Bestand in dezelfde tabblad openen", + "The default application for opening the format": "De standaardtoepassing voor het openen van het formaat", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)": "Open het bestand om het te bewerken (wegens formaatbeperkingen kunnen de gegevens verloren gaan bij het opslaan in de formaten van de onderstaande lijst)", + "View details": "Bekijk details", + "Save": "Opslaan", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required.": "Gemende Actieve Inhoud is niet toegestaan. HTTPS-adres voor ONLYOFFICE Docs is vereist.", + "Restrict access to editors to following groups": "Beperk de toegang tot editors tot de volgende groepen", + "review": "overzicht", + "form filling": "formulier invullen", + "comment": "opmerking", + "custom filter": "aangepast filter", + "download": "downloaden", + "Server settings": "Serverinstellingen", + "Common settings": "Algemene instellingen", + "Editor customization settings": "Editor aanpassingsinstellingen", + "The customization section allows personalizing the editor interface": "Met de aanpassingssectie kunt u de interface van de editor personaliseren", + "Display Chat menu button": "Chat Menuknop weergeven", + "Display the header more compact": "De koptekst compacter weergeven", + "Display Feedback & Support menu button": "Menuknop Terugkoppeling & Ondersteuning weergeven", + "Display Help menu button": "Menuknop Help weergeven", + "Display monochrome toolbar header": "Toon de monochrome koptekst van de werkbalk", + "Save as": "Opslaan als", + "File saved": "Bestand opgeslagen", + "Insert image": "Afbeelding invoegen", + "Select recipients": "Kies ontvangers", + "Connect to demo ONLYOFFICE Docs server": "Verbinden met de demo ONLYOFFICE Docs server", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period.": "Dit is een openbare testserver, gelieve deze niet te gebruiken voor persoonlijke en vertrouwelijke gegevens. De server zal gedurende een periode van 30 dagen beschikbaar zijn.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server.": "De 30-dagen proefperiode is voorbij, u kunt niet langer verbinding maken met demo ONLYOFFICE Docs server.", + "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data.": "U gebruikt de openbare demo ONLYOFFICE Docs server. Sla geen vertrouwelijke gegevens op.", + "Select file to compare": "Kies het bestand dat u wilt vergelijken", + "Review mode for viewing": "Beoordelingsmodus voor bekijken", + "Markup": "Markup", + "Final": "Einde", + "Original": "Origineel", + "version": "versie", + "Disable certificate verification (insecure)": "Verificatie van certificaten uitschakelen (onveilig)", + "Keep intermediate versions when editing (forcesave)": "Bewaar tussentijdse versies bij bewerken (forcesave)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Gebruik ONLYOFFICE om een voorbeeld van een document te genereren (dit neemt schijfruimte in beslag)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "Bewaar metadata voor elke versie zodra het document bewerkt is (dit neemt schijfruimte in beslag)", + "Clear": "Wissen", + "All history successfully deleted": "Alle geschiedenis met succes gewist", + "Create": "Maak", + "Select template": "Kies een sjabloon", + "Invalid file provided": "Ongeldig bestand opgegeven", + "Empty": "Leeg", + "Error": "Fout", + "Add a new template": "Voeg een nieuw sjabloon toe", + "Template already exists": "Sjabloon bestaat al", + "Template must be in OOXML format": "Sjabloon moet in OOXML formaat zijn", + "Template successfully added": "Sjabloon met succes toegevoegd", + "Template successfully deleted": "Sjabloon met succes verwijderd", + "Common templates": "Algemene Sjablonen", + "Failed to delete template": "Sjabloon verwijderen mislukt", + "File has been converted. Its content might look different.": "Het bestand is geconverteerd. De inhoud kan er anders uitzien.", + "Download as": "Downloaden als", + "Download": "Downloaden", + "Origin format": "Oorsprong formaat", + "Failed to send notification": "Kennisgeving niet verzonden", + "Notification sent successfully": "Kennisgeving succesvol verzonden", + "%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s genoemd in de %2\$s: \"%3\$s\".", + "Choose a format to convert {fileName}": "Kies een formaat om {fileName} te converteren", + "Form template": "Formulier sjabloon", + "Form template from existing text file": "Formulier sjabloon uit bestaand tekstbestand", + "Create form": "Formulier maken", + "Fill in form in ONLYOFFICE": "Formulier invullen in ONLYOFFICE", + "Create new Form template": "Nieuw Formulier sjabloon maken", + "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Update ONLYOFFICE Docs naar versie 7.0 om online invulbare formulieren te kunnen gebruiken", + "Security": "Beveiliging", + "Run document macros": "Document macro's uitvoeren", + "Default editor theme": "Standaard editor thema", + "Light": "Licht", + "Classic Light": "Klassiek Licht", + "Dark": "Donker" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/l10n/nl.json b/l10n/nl.json new file mode 100644 index 00000000..c17c867a --- /dev/null +++ b/l10n/nl.json @@ -0,0 +1,114 @@ +{ "translations": { + "Access denied" : "Toegang geweigerd", + "Invalid request" : "Ongeldig verzoek", + "Files not found" : "Bestanden niet gevonden", + "File not found" : "Bestand niet gevonden", + "Not permitted" : "Niet toegestaan", + "Download failed" : "Download mislukt", + "The required folder was not found" : "De vereiste map is niet gevonden", + "You don't have enough permission to create" : "U heeft geen voldoende aanmaak rechten", + "Template not found" : "Sjabloon niet gevonden", + "Can't create file" : "Kan bestand niet aanmaken", + "Format is not supported" : "Formaat wordt niet ondersteund", + "Conversion is not required" : "Converteren is niet vereist", + "Failed to download converted file" : "Kan geconverteerd bestand niet downloaden", + "ONLYOFFICE app is not configured. Please contact admin" : "ONLYOFFICE app is niet geconfigureerd. Neem contact op met de admin", + "FileId is empty" : "FileId is leeg", + "You do not have enough permissions to view the file" : "U heeft niet genoeg rechten om het bestand te bekijken", + "Error occurred in the document service" : "Er is een fout opgetreden in de documentservice", + "Not supported version" : "Niet ondersteunde versie", + "ONLYOFFICE cannot be reached. Please contact admin" : "ONLYOFFICE kan niet worden bereikt. Neem contact op met de admin", + "Loading, please wait." : "Laden, wacht alstublieft.", + "File created" : "Bestand Aangemaakt", + "Open in ONLYOFFICE" : "Open in ONLYOFFICE", + "Convert with ONLYOFFICE" : "Converteer met ONLYOFFICE", + "Document" : "Document", + "Spreadsheet" : "Werkblad", + "Presentation" : "Presentaties", + "Error when trying to connect" : "Fout bij het verbinden", + "Settings have been successfully updated" : "Instellingen zijn met succes bijgewerkt", + "Server can't read xml" : "Server kan xml niet lezen", + "Bad Response. Errors: " : "Slechte Reactie. Fouten", + "Documentation" : "Documentatie", + "ONLYOFFICE Docs Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Docs Location geeft het adres op van de server waarop de documentdiensten geïnstalleerd zijn. Verander de '' voor het serveradres in de onderstaande regel.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "Encryptie-app is ingeschakeld, de applicatie werkt niet. U kunt blijven werken met de applicatie als u de hoofdsleutel inschakelt.", + "ONLYOFFICE Docs address" : "ONLYOFFICE Docs adres", + "Advanced server settings" : "Geavanceerde serverinstellingen", + "ONLYOFFICE Docs address for internal requests from the server" : "Adres van de ONLYOFFICE Docs voor interne verzoeken van de server", + "Server address for internal requests from ONLYOFFICE Docs" : "Serveradres voor interne verzoeken van de ONLYOFFICE Docs", + "Secret key (leave blank to disable)" : "Geheime sleutel (leeg laten om niet te te gebruiken)", + "Open file in the same tab" : "Bestand in dezelfde tabblad openen", + "The default application for opening the format" : "De standaardtoepassing voor het openen van het formaat", + "Open the file for editing (due to format restrictions, the data might be lost when saving to the formats from the list below)" : "Open het bestand om het te bewerken (wegens formaatbeperkingen kunnen de gegevens verloren gaan bij het opslaan in de formaten van de onderstaande lijst)", + "View details" : "Bekijk details", + "Save" : "Opslaan", + "Mixed Active Content is not allowed. HTTPS address for ONLYOFFICE Docs is required." : "Gemende Actieve Inhoud is niet toegestaan. HTTPS-adres voor ONLYOFFICE Docs is vereist.", + "Restrict access to editors to following groups" : "Beperk de toegang tot editors tot de volgende groepen", + "review" : "overzicht", + "form filling" : "formulier invullen", + "comment" : "opmerking", + "custom filter" : "aangepast filter", + "download" : "downloaden", + "Server settings" : "Serverinstellingen", + "Common settings" : "Algemene instellingen", + "Editor customization settings" : "Editor aanpassingsinstellingen", + "The customization section allows personalizing the editor interface" : "Met de aanpassingssectie kunt u de interface van de editor personaliseren", + "Display Chat menu button" : "Chat Menuknop weergeven", + "Display the header more compact" : "De koptekst compacter weergeven", + "Display Feedback & Support menu button" : "Menuknop Terugkoppeling & Ondersteuning weergeven", + "Display Help menu button" : "Menuknop Help weergeven", + "Display monochrome toolbar header" : "Toon de monochrome koptekst van de werkbalk", + "Save as" : "Opslaan als", + "File saved" : "Bestand opgeslagen", + "Insert image" : "Afbeelding invoegen", + "Select recipients" : "Kies ontvangers", + "Connect to demo ONLYOFFICE Docs server" : "Verbinden met de demo ONLYOFFICE Docs server", + "This is a public test server, please do not use it for private sensitive data. The server will be available during a 30-day period." : "Dit is een openbare testserver, gelieve deze niet te gebruiken voor persoonlijke en vertrouwelijke gegevens. De server zal gedurende een periode van 30 dagen beschikbaar zijn.", + "The 30-day test period is over, you can no longer connect to demo ONLYOFFICE Docs server." : "De 30-dagen proefperiode is voorbij, u kunt niet langer verbinding maken met demo ONLYOFFICE Docs server.", + "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data." : "U gebruikt de openbare demo ONLYOFFICE Docs server. Sla geen vertrouwelijke gegevens op.", + "Select file to compare" : "Kies het bestand dat u wilt vergelijken", + "Review mode for viewing": "Beoordelingsmodus voor bekijken", + "Markup": "Markup", + "Final": "Einde", + "Original": "Origineel", + "version": "versie", + "Disable certificate verification (insecure)": "Verificatie van certificaten uitschakelen (onveilig)", + "Keep intermediate versions when editing (forcesave)": "Bewaar tussentijdse versies bij bewerken (forcesave)", + "Use ONLYOFFICE to generate a document preview (it will take up disk space)": "Gebruik ONLYOFFICE om een voorbeeld van een document te genereren (dit neemt schijfruimte in beslag)", + "Keep metadata for each version once the document is edited (it will take up disk space)": "Bewaar metadata voor elke versie zodra het document bewerkt is (dit neemt schijfruimte in beslag)", + "Clear": "Wissen", + "All history successfully deleted": "Alle geschiedenis met succes gewist", + "Create": "Maak", + "Select template" : "Kies een sjabloon", + "Invalid file provided" : "Ongeldig bestand opgegeven", + "Empty": "Leeg", + "Error" : "Fout", + "Add a new template": "Voeg een nieuw sjabloon toe", + "Template already exists": "Sjabloon bestaat al", + "Template must be in OOXML format": "Sjabloon moet in OOXML formaat zijn", + "Template successfully added": "Sjabloon met succes toegevoegd", + "Template successfully deleted": "Sjabloon met succes verwijderd", + "Common templates": "Algemene Sjablonen", + "Failed to delete template": "Sjabloon verwijderen mislukt", + "File has been converted. Its content might look different.": "Het bestand is geconverteerd. De inhoud kan er anders uitzien.", + "Download as": "Downloaden als", + "Download": "Downloaden", + "Origin format": "Oorsprong formaat", + "Failed to send notification": "Kennisgeving niet verzonden", + "Notification sent successfully": "Kennisgeving succesvol verzonden", + "%1$s mentioned in the %2$s: \"%3$s\".": "%1$s genoemd in de %2$s: \"%3$s\".", + "Choose a format to convert {fileName}": "Kies een formaat om {fileName} te converteren", + "Form template": "Formulier sjabloon", + "Form template from existing text file": "Formulier sjabloon uit bestaand tekstbestand", + "Create form": "Formulier maken", + "Fill in form in ONLYOFFICE": "Formulier invullen in ONLYOFFICE", + "Create new Form template": "Nieuw Formulier sjabloon maken", + "Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online": "Update ONLYOFFICE Docs naar versie 7.0 om online invulbare formulieren te kunnen gebruiken", + "Security": "Beveiliging", + "Run document macros": "Document macro's uitvoeren", + "Default editor theme": "Standaard editor thema", + "Light": "Licht", + "Classic Light": "Klassiek Licht", + "Dark": "Donker" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +} \ No newline at end of file diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index f69ea196..cc241275 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -93,8 +93,8 @@ OC.L10N.register( "Common templates": "Modelos comuns", "Failed to delete template": "Falha ao excluir modelo", "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente.", - "Download as": "Baixar", - "Download": "Baixar como", + "Download as": "Baixar como", + "Download": "Baixar", "Origin format": "Formato de origem", "Failed to send notification": "Falha ao enviar notificação", "Notification sent successfully": "Notificação enviada com sucesso", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 1c89722d..0e973039 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -91,8 +91,8 @@ "Common templates": "Modelos comuns", "Failed to delete template": "Falha ao excluir modelo", "File has been converted. Its content might look different.": "O arquivo foi convertido. Seu conteúdo pode ser diferente.", - "Download as": "Baixar", - "Download": "Baixar como", + "Download as": "Baixar como", + "Download": "Baixar", "Origin format": "Formato de origem", "Failed to send notification": "Falha ao enviar notificação", "Notification sent successfully": "Notificação enviada com sucesso", diff --git a/l10n/ru.js b/l10n/ru.js index 4107a571..014914d6 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -111,6 +111,7 @@ OC.L10N.register( "Default editor theme": "Тема редактора по умолчанию", "Light": "Светлая", "Classic Light": "Светлая классическая", - "Dark": "Темная" + "Dark": "Темная", + "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/l10n/ru.json b/l10n/ru.json index 01a97e24..fb8dd710 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -109,6 +109,7 @@ "Default editor theme": "Тема редактора по умолчанию", "Light": "Светлая", "Classic Light": "Светлая классическая", - "Dark": "Темная" + "Dark": "Темная", + "This feature is unavailable due to encryption settings.": "Данная функция недоступна из-за настроек шифрования" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" } \ No newline at end of file diff --git a/l10n/zh_CN.js b/l10n/zh_CN.js index b257ea88..1de4310d 100644 --- a/l10n/zh_CN.js +++ b/l10n/zh_CN.js @@ -110,6 +110,7 @@ OC.L10N.register( "Default editor theme": "编辑器默认的主题", "Light": "光", "Classic Light": "经典浅色", - "Dark": "黑暗的" + "Dark": "黑暗的", + "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。" }, "nplurals=1; plural=0;"); diff --git a/l10n/zh_CN.json b/l10n/zh_CN.json index f1261e62..dd0f0e3b 100644 --- a/l10n/zh_CN.json +++ b/l10n/zh_CN.json @@ -108,6 +108,7 @@ "Default editor theme": "编辑器默认的主题", "Light": "光", "Classic Light": "经典浅色", - "Dark": "黑暗的" + "Dark": "黑暗的", + "This feature is unavailable due to encryption settings.": "由于加密设置,该功能不可用。" },"pluralForm" :"nplurals=1; plural=0;" } \ No newline at end of file diff --git a/lib/appconfig.php b/lib/appconfig.php index 38bbc9d4..cc40bfe9 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -650,7 +650,7 @@ public function SetPreview($value) { * @return bool */ public function GetPreview() { - return $this->config->getAppValue($this->appName, $this->_preview, "false") === "true"; + return $this->config->getAppValue($this->appName, $this->_preview, "true") === "true"; } /** @@ -750,7 +750,9 @@ public function SetCustomizationForcesave($value) { * @return bool */ public function GetCustomizationForcesave() { - return $this->config->getAppValue($this->appName, $this->_customizationForcesave, "false") === "true"; + $value = $this->config->getAppValue($this->appName, $this->_customizationForcesave, "false") === "true"; + + return $value && ($this->checkEncryptionModule() === false); } /** diff --git a/lib/fileutility.php b/lib/fileutility.php index e47d4321..9e25f1c9 100644 --- a/lib/fileutility.php +++ b/lib/fileutility.php @@ -27,11 +27,10 @@ use OCP\ISession; use OCP\Share\IManager; -use OCA\Files_Sharing\External\Storage as SharingExternalStorage; - use OCA\Onlyoffice\AppConfig; use OCA\Onlyoffice\Version; use OCA\Onlyoffice\KeyManager; +use OCA\Onlyoffice\RemoteInstance; /** * File utility @@ -222,10 +221,10 @@ public function getKey($file, $origin = false) { $fileId = $file->getId(); if ($origin - && $file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) { + && RemoteInstance::isRemoteFile($file)) { try { - $key = $this->getFederatedKey($file); + $key = RemoteInstance::getRemoteKey($file); if (!empty($key)) { return $key; @@ -288,41 +287,6 @@ private function GUID() return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)); } - /** - * Generate unique document identifier in federated share - * - * @param File $file - file - * - * @return string - */ - private function getFederatedKey($file) { - $remote = $file->getStorage()->getRemote(); - $shareToken = $file->getStorage()->getToken(); - $internalPath = $file->getInternalPath(); - - $httpClientService = \OC::$server->getHTTPClientService(); - $client = $httpClientService->newClient(); - $response = $client->post($remote . "/ocs/v2.php/apps/" . $this->appName . "/api/v1/key?format=json", [ - "timeout" => 5, - "body" => [ - "shareToken" => $shareToken, - "path" => $internalPath - ] - ]); - $body = \json_decode($response->getBody(), true); - - $data = $body["ocs"]["data"]; - if (!empty($data["error"])) { - $this->logger->error("Error federated key " . $data["error"], ["app" => $this->appName]); - return null; - } - - $key = $data["key"]; - $this->logger->debug("Federated key: $key", ["app" => $this->appName]); - - return $key; - } - /** * Generate unique file version key * diff --git a/lib/keymanager.php b/lib/keymanager.php index c3c538d2..489cf015 100644 --- a/lib/keymanager.php +++ b/lib/keymanager.php @@ -19,8 +19,6 @@ namespace OCA\Onlyoffice; -use OCP\Files\File; - /** * Key manager * @@ -28,11 +26,6 @@ */ class KeyManager { - /** - * App name - */ - private const App_Name = "onlyoffice"; - /** * Table name */ @@ -153,56 +146,4 @@ public static function wasForcesave($fileId) { return $fs === "1"; } - - /** - * Change lock status in the federated share - * - * @param File $file - file - * @param bool $lock - status - * @param bool $fs - status - * - * @return bool - */ - public static function lockFederatedKey($file, $lock, $fs) { - $logger = \OC::$server->getLogger(); - $action = $lock ? "lock" : "unlock"; - - $remote = $file->getStorage()->getRemote(); - $shareToken = $file->getStorage()->getToken(); - $internalPath = $file->getInternalPath(); - - $httpClientService = \OC::$server->getHTTPClientService(); - $client = $httpClientService->newClient(); - $data = [ - "timeout" => 5, - "body" => [ - "shareToken" => $shareToken, - "path" => $internalPath, - "lock" => $lock - ] - ]; - if (!empty($fs)) { - $data["body"]["fs"] = $fs; - } - - try { - $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/keylock?format=json", $data); - $body = \json_decode($response->getBody(), true); - - $data = $body["ocs"]["data"]; - - if (empty($data)) { - $logger->debug("Federated request" . $action . "for " . $file->getFileInfo()->getId() . " is successful", ["app" => self::App_Name]); - return true; - } - - if (!empty($data["error"])) { - $logger->error("Error" . $action . "federated key for " . $file->getFileInfo()->getId() . ": " . $data["error"], ["app" => self::App_Name]); - return false; - } - } catch(\Exception $e) { - $logger->logException($e, ["message" => "Failed to request federated " . $action . " for " . $file->getFileInfo()->getId(), "app" => self::App_Name]); - return false; - } - } } \ No newline at end of file diff --git a/lib/remoteinstance.php b/lib/remoteinstance.php new file mode 100644 index 00000000..47ea5b84 --- /dev/null +++ b/lib/remoteinstance.php @@ -0,0 +1,270 @@ +getDatabaseConnection(); + $select = $connection->prepare(" + SELECT remote, expire, status + FROM `*PREFIX*" . self::TableName_Key . "` + WHERE `remote` = ? + "); + $result = $select->execute([$remote]); + + $dbremote = $result ? $select->fetch() : []; + + return $dbremote; + } + + /** + * Store remote instance + * + * @param string $remote - remote instance + * @param bool $status - remote status + * + * @return bool + */ + private static function set($remote, $status) { + $connection = \OC::$server->getDatabaseConnection(); + $insert = $connection->prepare(" + INSERT INTO `*PREFIX*" . self::TableName_Key . "` + (`remote`, `status`, `expire`) + VALUES (?, ?, ?) + "); + return (bool)$insert->execute([$remote, $status === true ? 1 : 0, time()]); + } + + /** + * Update remote instance + * + * @param string $remote - remote instance + * @param bool $status - remote status + * + * @return bool + */ + private static function update($remote, $status) { + $connection = \OC::$server->getDatabaseConnection(); + $update = $connection->prepare(" + UPDATE `*PREFIX*" . self::TableName_Key . "` + SET status = ?, expire = ? + WHERE remote = ? + "); + return (bool)$update->execute([$status === true ? 1 : 0, time(), $remote]); + } + + /** + * Health check remote instance + * + * @param string $remote - remote instance + * + * @return bool + */ + public static function healthCheck($remote) { + $logger = \OC::$server->getLogger(); + $remote = rtrim($remote, "/") . "/"; + + if (in_array($remote, self::$healthRemote)) { + $logger->debug("Remote instance " . $remote . " from local cache status " . $dbremote["status"], ["app" => self::App_Name]); + return true; + } + + $dbremote = self::get($remote); + if (!empty($dbremote) && $dbremote["expire"] + self::$ttl > time()) { + $logger->debug("Remote instance " . $remote . " from database status " . $dbremote["status"], ["app" => self::App_Name]); + self::$healthRemote[$remote] = $dbremote["status"]; + return self::$healthRemote[$remote]; + } + + $httpClientService = \OC::$server->getHTTPClientService(); + $client = $httpClientService->newClient(); + + $status = false; + try { + $response = $client->get($remote . "ocs/v2.php/apps/" . self::App_Name . "/api/v1/healthcheck?format=json"); + $body = json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + if (isset($data["alive"])) { + $status = $data["alive"] === true; + } + } catch (\Exception $e) { + $logger->logException($e, ["message" => "Failed to request federated health check for" . $remote, "app" => self::App_Name]); + } + + if (empty($dbremote)) { + self::set($remote, $status); + } else { + self::update($remote, $status); + } + + $logger->debug("Remote instance " . $remote . " was stored to database status " . $dbremote["status"], ["app" => self::App_Name]); + + self::$healthRemote[$remote] = $status; + + return self::$healthRemote[$remote]; + } + + /** + * Generate unique document identifier in federated share + * + * @param File $file - file + * + * @return string + */ + public function getRemoteKey($file) { + $logger = \OC::$server->getLogger(); + + $remote = $file->getStorage()->getRemote(); + $shareToken = $file->getStorage()->getToken(); + $internalPath = $file->getInternalPath(); + + $httpClientService = \OC::$server->getHTTPClientService(); + $client = $httpClientService->newClient(); + $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/key?format=json", [ + "timeout" => 5, + "json" => [ + "shareToken" => $shareToken, + "path" => $internalPath + ] + ]); + $body = \json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + if (!empty($data["error"])) { + $logger->error("Error federated key " . $data["error"], ["app" => self::App_Name]); + return null; + } + + $key = $data["key"]; + $logger->debug("Federated key: $key", ["app" => self::App_Name]); + + return $key; + } + + /** + * Change lock status in the federated share + * + * @param File $file - file + * @param bool $lock - status + * @param bool $fs - status + * + * @return bool + */ + public static function lockRemoteKey($file, $lock, $fs) { + $logger = \OC::$server->getLogger(); + $action = $lock ? "lock" : "unlock"; + + $remote = $file->getStorage()->getRemote(); + $shareToken = $file->getStorage()->getToken(); + $internalPath = $file->getInternalPath(); + + $httpClientService = \OC::$server->getHTTPClientService(); + $client = $httpClientService->newClient(); + $data = [ + "timeout" => 5, + "json" => [ + "shareToken" => $shareToken, + "path" => $internalPath, + "lock" => $lock + ] + ]; + if (!empty($fs)) { + $data["json"]["fs"] = $fs; + } + + try { + $response = $client->post($remote . "/ocs/v2.php/apps/" . self::App_Name . "/api/v1/keylock?format=json", $data); + $body = \json_decode($response->getBody(), true); + + $data = $body["ocs"]["data"]; + + if (empty($data)) { + $logger->debug("Federated request" . $action . "for " . $file->getFileInfo()->getId() . " is successful", ["app" => self::App_Name]); + return true; + } + + if (!empty($data["error"])) { + $logger->error("Error" . $action . "federated key for " . $file->getFileInfo()->getId() . ": " . $data["error"], ["app" => self::App_Name]); + return false; + } + } catch(\Exception $e) { + $logger->logException($e, ["message" => "Failed to request federated " . $action . " for " . $file->getFileInfo()->getId(), "app" => self::App_Name]); + return false; + } + } + + /** + * Check of federated capable + * + * @param File $file - file + * + * @return bool + */ + public static function isRemoteFile($file) { + $storage = $file->getStorage(); + + $alive = false; + $isFederated = $storage->instanceOfStorage(SharingExternalStorage::class); + if (!$isFederated) { + return false; + } + + $alive = RemoteInstance::healthCheck($storage->getRemote()); + return $alive; + } +} \ No newline at end of file diff --git a/templates/settings.php b/templates/settings.php index 78012822..d69441f2 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -30,7 +30,7 @@

t("Server settings")) ?>

- +

t("Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key.")) ?> @@ -163,8 +163,13 @@

checked="checked" /> + checked="checked" + disabled="disabled"/> + +
+ t("This feature is unavailable due to encryption settings.")) ?> +