From 84c71bd4c2696f7811b9239f01c63446cbebac97 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 16 Aug 2019 15:47:17 +0300 Subject: [PATCH 01/17] move changelog --- CHANGELOG.md | 9 ++++++++- docs/CHANGELOG.md | 11 ----------- 2 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 docs/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index bb068de..14ec46f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ # Change Log -## 2.0.0 +## 1.0.2 +-------------------- +- Fix: PHP 7.2 compatibility issues + + +## 1.0.1 +----------------------- +- Enh: Updated translations diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md deleted file mode 100644 index c1b066f..0000000 --- a/docs/CHANGELOG.md +++ /dev/null @@ -1,11 +0,0 @@ -Changelog -========= - -1.0.2 (July 2, 2018) --------------------- -- Fix: PHP 7.2 compatibility issues - - -1.0.1 (May 08, 2018) ------------------------ -- Enh: Updated translations From 97ef5c0060a4bfdbb567677c586ba78e58ebad13 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Fri, 16 Aug 2019 15:59:12 +0300 Subject: [PATCH 02/17] language fix, config --- CHANGELOG.md | 8 +++++ resources/humhub.onlydocuments.js | 57 ++++++----------------------- widgets/EditorWidget.php | 60 +++++++++++++++++++++++-------- 3 files changed, 64 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14ec46f..cba625d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0 +-------------------- +- Fix: Editors will now use portal language if user language is null +- Fix: `author` and `created` fields are now passed correctly +- Fix: `firstname` and `lastname` fields are deprecated, using `name` instead + +- Enh: Better way to pass editors config + ## 1.0.2 -------------------- - Fix: PHP 7.2 compatibility issues diff --git a/resources/humhub.onlydocuments.js b/resources/humhub.onlydocuments.js index b06a514..5407591 100644 --- a/resources/humhub.onlydocuments.js +++ b/resources/humhub.onlydocuments.js @@ -82,54 +82,17 @@ humhub.module('onlydocuments', function (module, require, $) { } } - this.docEditor = new DocsAPI.DocEditor('iframeContainer', { - width: "100%", - height: "100%", - - type: "desktop", // embedded - documentType: this.options.documentType, - document: { - title: this.options.fileName, - url: this.options.backendDownloadUrl, - fileType: this.options.fileExtension, - key: this.options.fileKey, - info: { - author: this.options.createdBy, - created: this.options.createdAt, - }, - permissions: { - edit: (this.options.editMode == 'edit'), - download: true, - } - }, - editorConfig: { - mode: this.options.editMode, - lang: this.options.userLanguage, - callbackUrl: this.options.backendTrackUrl, - user: { - id: this.options.userGuid, - firstname: this.options.userFirstName, - lastname: this.options.userLastName, - }, - - embedded: { - toolbarDocked: "top", - }, + var config = this.options.config; + config.width = "100%"; + config.height = "100%"; + config.events = { + //'onReady': onReady, + //'onDocumentStateChange': onDocumentStateChange, + //'onRequestEditRights': onRequestEditRights, + //'onError': onError, + }; - customization: { - about: false, - feedback: false, - autosave: true, - forcesave: true, - }, - }, - events: { - //'onReady': onReady, - //'onDocumentStateChange': onDocumentStateChange, - //'onRequestEditRights': onRequestEditRights, - //'onError': onError, - } - }); + this.docEditor = new DocsAPI.DocEditor('iframeContainer', config); } var Share = function (node, options) { diff --git a/widgets/EditorWidget.php b/widgets/EditorWidget.php index 38d1bce..b328254 100644 --- a/widgets/EditorWidget.php +++ b/widgets/EditorWidget.php @@ -73,20 +73,7 @@ public function getData() $key = $this->generateDocumentKey(); return [ - 'file-name' => Html::encode($this->file->fileName), - 'file-extension' => Html::encode(strtolower(FileHelper::getExtension($this->file))), - 'file-key' => $key, - 'created-by' => Html::encode('Creator BY'), - 'created-at' => Html::encode('Creator AT'), - 'document-type' => $this->documentType, - 'user-guid' => ($user) ? Html::encode($user->guid) : '', - 'user-first-name' => ($user) ? Html::encode($user->profile->firstname) : 'Anonymous', - 'user-last-name' => ($user) ? Html::encode($user->profile->lastname) : 'User', - 'user-language' => ($user) ? $user->language : 'en', - 'backend-track-url' => Url::to(['/onlydocuments/backend/track', 'key' => $key], true), - 'backend-download-url' => Url::to(['/onlydocuments/backend/download', 'key' => $key], true), - 'edit-mode' => $this->mode, - 'file-info-url' => Url::to(['/onlydocuments/open/get-info', 'guid' => $this->file->guid]), + 'config' => $this->getConfig(), 'module-configured' => (empty($module->getServerUrl()) ? '0' : '1'), ]; } @@ -130,4 +117,49 @@ protected function generateDocumentKey() return $key; } + protected function getConfig() + { + $module = Yii::$app->getModule('onlydocuments'); + $user = Yii::$app->user->getIdentity(); + $key = $this->generateDocumentKey($this->file); + + $config = [ + 'type' => 'desktop', + 'documentType' => $this->documentType, + 'document' => [ + 'title' => Html::encode($this->file->fileName), + 'url' => Url::to(['/onlydocuments/backend/download', 'key' => $key], true), + 'fileType' => Html::encode(strtolower(FileHelper::getExtension($this->file))), + 'key' => $key, + 'info' => [ + 'author' => Html::encode($this->file->createdBy->displayname), + 'created' => Html::encode(Yii::$app->formatter->asDatetime($this->file->created_at, 'short')), + ], + 'permissions' => [ + 'edit' => $this->mode == 'edit', + 'download' => true, + ] + ], + 'editorConfig' => [ + 'mode' => $this->mode, + 'lang' => ($user) && !empty($user->language) ? $user->language : Yii::$app->language, + 'callbackUrl' => Url::to(['/onlydocuments/backend/track', 'key' => $key], true), + 'user' => [ + 'id' => ($user) ? Html::encode($user->guid) : '', + 'name' => ($user) ? Html::encode($user->displayname) : 'Anonymous User', + ], + 'embedded' => [ + 'toolbarDocked' => 'top', + ], + 'customization' => [ + 'about' => false, + 'feedback' => false, + 'autosave' => true, + 'forcesave' => true, + ] + ] + ]; + + return $config; + } } From 242295786c02263c1282dc1d3bbd4d77e27fad67 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Fri, 16 Aug 2019 16:08:19 +0300 Subject: [PATCH 03/17] allow editing only for Office Open XML formats --- CHANGELOG.md | 1 + Events.php | 9 +++++++-- Module.php | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cba625d..11d95cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fix: Editors will now use portal language if user language is null - Fix: `author` and `created` fields are now passed correctly - Fix: `firstname` and `lastname` fields are deprecated, using `name` instead +- Fix: Allow editing only for Office Open XML formats - Enh: Better way to pass editors config diff --git a/Events.php b/Events.php index a931205..5729808 100644 --- a/Events.php +++ b/Events.php @@ -29,11 +29,16 @@ public static function onFileHandlerCollection($event) /* @var $module \humhub\modules\onlydocuments\Module */ $module = Yii::$app->getModule('onlydocuments'); + $file = $event->sender->file; if ($module->getDocumentType($event->sender->file) !== null) { - if ($collection->type == FileHandlerCollection::TYPE_EDIT) { + $canEdit = $collection->type == FileHandlerCollection::TYPE_EDIT && $module->canEdit($file); + $canView = $collection->type == FileHandlerCollection::TYPE_VIEW && $module->canView($file); + + if ($canEdit) { $collection->register(new filehandler\EditFileHandler()); - } elseif ($collection->type === FileHandlerCollection::TYPE_VIEW) { + } + if ($canView) { $collection->register(new filehandler\ViewFileHandler()); } } diff --git a/Module.php b/Module.php index fd6d348..930af6a 100644 --- a/Module.php +++ b/Module.php @@ -52,6 +52,10 @@ class Module extends \humhub\components\Module */ public $textExtensions = ['docx', 'doc', 'odt', 'rtf', 'txt', 'html', 'htm', 'mht', 'pdf', 'djvu', 'fb2', 'epub', 'xps']; + /** + * @var string[] allowed for editing extensions + */ + public $editableExtensions = ['xlsx', 'ppsx', 'pptx', 'docx' ]; @@ -84,6 +88,17 @@ public function getDocumentType($file) return null; } + public function canEdit($file) + { + $fileExtension = FileHelper::getExtension($file); + return in_array($fileExtension, $this->editableExtensions); + } + + public function canView($file) + { + return !empty($this->getDocumentType($file)); + } + /** * @inheritdoc */ From 20d22940601674d38222bdac12753ee50504a6c1 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Fri, 16 Aug 2019 16:25:28 +0300 Subject: [PATCH 04/17] jwt support --- CHANGELOG.md | 3 +++ Module.php | 20 +++++++++++++++++++- controllers/AdminController.php | 13 +++---------- controllers/BackendController.php | 26 ++++++++++++++++++++++++++ models/ConfigureForm.php | 8 +++++++- views/admin/index.php | 10 ++++++++-- widgets/EditorWidget.php | 6 ++++++ 7 files changed, 72 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11d95cd..7029b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,11 @@ - Fix: `author` and `created` fields are now passed correctly - Fix: `firstname` and `lastname` fields are deprecated, using `name` instead - Fix: Allow editing only for Office Open XML formats +- Fix: Issue with `/` at the end of Document Service url - Enh: Better way to pass editors config +- Enh: JWT support + ## 1.0.2 -------------------- diff --git a/Module.php b/Module.php index 930af6a..e87a799 100644 --- a/Module.php +++ b/Module.php @@ -13,6 +13,7 @@ use yii\helpers\Json; use humhub\modules\file\libs\FileHelper; use humhub\libs\CURLHelper; +use \Firebase\JWT\JWT; /** * File Module @@ -58,7 +59,15 @@ class Module extends \humhub\components\Module public $editableExtensions = ['xlsx', 'ppsx', 'pptx', 'docx' ]; - + + public function isJwtEnabled() { + return !empty($this->getJwtSecret()); + } + + public function getJwtSecret() { + return $this->settings->get('jwtSecret'); + } + public function getServerUrl() { return $this->settings->get('serverUrl'); @@ -120,7 +129,16 @@ public function commandService($data) 'timeout' => 10 ]); $http->setMethod('POST'); + $headers = $http->getRequest()->getHeaders(); + + if ($this->isJwtEnabled()) { + $data['token'] = JWT::encode($data, $this->getJwtSecret()); + $headers->addHeaderLine('Authorization', 'Bearer ' . JWT::encode(['payload' => $data], $this->getJwtSecret())); + } + $http->setRawBody(Json::encode($data)); + $headers->addHeaderLine('Accept', 'application/json'); + $response = $http->send(); $json = $response->getBody(); } catch (\Exception $ex) { diff --git a/controllers/AdminController.php b/controllers/AdminController.php index 21a43db..865cdc2 100644 --- a/controllers/AdminController.php +++ b/controllers/AdminController.php @@ -28,21 +28,14 @@ public function actionIndex() $this->view->saved(); } - $version = $this->getDocumentServerVersion(); - - return $this->render('index', ['model' => $model, 'version' => $version]); + $response = $this->getDocumentServerVersion(); + return $this->render('index', ['model' => $model, 'view' => $response]); } private function getDocumentServerVersion() { $module = Yii::$app->getModule('onlydocuments'); - $response = $module->commandService(['c' => 'version']); - - if (isset($response['version'])) { - return $response['version']; - } - - return null; + return $module->commandService(['c' => 'version']); } } diff --git a/controllers/BackendController.php b/controllers/BackendController.php index f4ab97a..ed9aa1f 100644 --- a/controllers/BackendController.php +++ b/controllers/BackendController.php @@ -14,6 +14,7 @@ use humhub\modules\file\models\File; use humhub\modules\file\libs\FileHelper; use humhub\components\Controller; +use \Firebase\JWT\JWT; class BackendController extends Controller { @@ -79,6 +80,31 @@ public function actionTrack() return $result; } + $module = Yii::$app->getModule('onlydocuments'); + if ($module->isJwtEnabled()) { + $token = null; + if (!empty($data["token"])) { + $token = $data["token"]; + } else if (!empty($_SERVER['HTTP_AUTHORIZATION'])) { + $token = substr($_SERVER['HTTP_AUTHORIZATION'], strlen('Bearer ')); + } + + if (empty($token)) { + Yii::error('Expected JWT', 'onlydocuments'); + $result["error"] = "Bad Response"; + return $result; + } + + try { + $ds = JWT::decode($token, $module->getJwtSecret(), array('HS256')); + $data = (array) $ds->payload; + } catch (\Exception $ex) { + Yii::error('Invalid JWT signature', 'onlydocuments'); + $result["error"] = "Bad Response"; + return $result; + } + } + //Yii::warning('Tracking request for file ' . $this->file->guid . ' - data: ' . print_r($data, 1), 'onlydocuments'); $status = $_trackerStatus[$data["status"]]; diff --git a/models/ConfigureForm.php b/models/ConfigureForm.php index c287d1f..fd2a760 100644 --- a/models/ConfigureForm.php +++ b/models/ConfigureForm.php @@ -12,6 +12,7 @@ class ConfigureForm extends \yii\base\Model { public $serverUrl; + public $jwtSecret; /** * @inheritdoc @@ -20,6 +21,7 @@ public function rules() { return [ ['serverUrl', 'string'], + ['jwtSecret', 'string'], ]; } @@ -30,6 +32,7 @@ public function attributeLabels() { return [ 'serverUrl' => Yii::t('OnlydocumentsModule.base', 'Hostname'), + 'jwtSecret' => Yii::t('OnlydocumentsModule.base', 'JWT Secret'), ]; } @@ -40,19 +43,22 @@ public function attributeHints() { return [ 'serverUrl' => Yii::t('OnlydocumentsModule.base', 'e.g. http://documentserver'), + 'jwtSecret' => Yii::t('OnlydocumentsModule.base', 'JWT Secret key (leave blank to disable)'), ]; } public function loadSettings() { $this->serverUrl = Yii::$app->getModule('onlydocuments')->settings->get('serverUrl'); + $this->jwtSecret = Yii::$app->getModule('onlydocuments')->settings->get('jwtSecret'); return true; } public function save() { - Yii::$app->getModule('onlydocuments')->settings->set('serverUrl', $this->serverUrl); + Yii::$app->getModule('onlydocuments')->settings->set('serverUrl', rtrim($this->serverUrl, '/')); + Yii::$app->getModule('onlydocuments')->settings->set('jwtSecret', $this->jwtSecret); return true; } diff --git a/views/admin/index.php b/views/admin/index.php index 2847dc2..72e536e 100644 --- a/views/admin/index.php +++ b/views/admin/index.php @@ -10,10 +10,12 @@
- - + + serverUrl)): ?> + + @@ -23,6 +25,10 @@ field($model, 'serverUrl'); ?>
+
+ field($model, 'jwtSecret'); ?> +
+
'btn btn-primary', 'data-ui-loader' => '']) ?>
diff --git a/widgets/EditorWidget.php b/widgets/EditorWidget.php index b328254..0a472e4 100644 --- a/widgets/EditorWidget.php +++ b/widgets/EditorWidget.php @@ -15,6 +15,7 @@ use humhub\libs\Html; use humhub\modules\file\libs\FileHelper; use humhub\widgets\JsWidget; +use \Firebase\JWT\JWT; /** * Description of EditorWidget @@ -160,6 +161,11 @@ protected function getConfig() ] ]; + if ($module->isJwtEnabled()) { + $token = JWT::encode($config, $module->getJwtSecret()); + $config['token'] = $token; + } + return $config; } } From afde9507a16f5b13f3b19d392dde0b87917769cb Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Fri, 16 Aug 2019 16:28:43 +0300 Subject: [PATCH 05/17] unused vars --- widgets/EditorWidget.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/widgets/EditorWidget.php b/widgets/EditorWidget.php index 0a472e4..3a11052 100644 --- a/widgets/EditorWidget.php +++ b/widgets/EditorWidget.php @@ -70,8 +70,6 @@ public function init() public function getData() { $module = Yii::$app->getModule('onlydocuments'); - $user = Yii::$app->user->getIdentity(); - $key = $this->generateDocumentKey(); return [ 'config' => $this->getConfig(), From b3c7f55f44d13754ff1d8d0e7ddb4c93896c55c3 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Fri, 16 Aug 2019 18:09:16 +0300 Subject: [PATCH 06/17] change updatedby, size on save --- CHANGELOG.md | 1 + Events.php | 2 +- controllers/BackendController.php | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7029b9c..199b7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Enh: Better way to pass editors config - Enh: JWT support +- Enh: Files properly marked as updated now ## 1.0.2 diff --git a/Events.php b/Events.php index 5729808..faa5cbb 100644 --- a/Events.php +++ b/Events.php @@ -31,7 +31,7 @@ public static function onFileHandlerCollection($event) $module = Yii::$app->getModule('onlydocuments'); $file = $event->sender->file; - if ($module->getDocumentType($event->sender->file) !== null) { + if ($module->getDocumentType($file) !== null) { $canEdit = $collection->type == FileHandlerCollection::TYPE_EDIT && $module->canEdit($file); $canView = $collection->type == FileHandlerCollection::TYPE_VIEW && $module->canView($file); diff --git a/controllers/BackendController.php b/controllers/BackendController.php index ed9aa1f..497688a 100644 --- a/controllers/BackendController.php +++ b/controllers/BackendController.php @@ -13,6 +13,7 @@ use yii\helpers\Url; use humhub\modules\file\models\File; use humhub\modules\file\libs\FileHelper; +use humhub\modules\user\models\User; use humhub\components\Controller; use \Firebase\JWT\JWT; @@ -107,6 +108,12 @@ public function actionTrack() //Yii::warning('Tracking request for file ' . $this->file->guid . ' - data: ' . print_r($data, 1), 'onlydocuments'); + $user = null; + if (!empty($data['users'])) { + $users = $data['users']; + $user = User::findOne(['guid' => $users[0]]); + } + $status = $_trackerStatus[$data["status"]]; switch ($status) { case "MustSave": @@ -119,7 +126,14 @@ public function actionTrack() $this->file->getStore()->setContent($newData); if ($status != 'ForceSave') { - $this->file->updateAttributes(['onlydocuments_key' => new \yii\db\Expression('NULL')]); + $newAttr = [ + 'onlydocuments_key' => new \yii\db\Expression('NULL'), + 'updated_at' => date("Y-m-d H:i:s"), + 'size' => strlen($newData), + ]; + if (!empty($user)) $newAttr['updated_by'] = $user->getId(); + + $this->file->updateAttributes($newAttr); //Yii::warning('Dosaved', 'onlydocuments'); } else { //Yii::warning('ForceSaved', 'onlydocuments'); From e72d4cfe2dde7bd0896158d748e3d9e95b84b420 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Wed, 21 Aug 2019 17:05:52 +0300 Subject: [PATCH 07/17] conversion --- CHANGELOG.md | 1 + Events.php | 4 ++ Module.php | 83 +++++++++++++++++++++++++++++ controllers/ConvertController.php | 56 ++++++++++++++++++++ filehandler/ConvertFileHandler.php | 28 ++++++++++ resources/humhub.onlydocuments.js | 85 +++++++++++++++++++++++++----- views/convert/index.php | 6 +++ widgets/ConvertWidget.php | 71 +++++++++++++++++++++++++ widgets/EditorWidget.php | 20 ++----- widgets/views/convert.php | 27 ++++++++++ 10 files changed, 351 insertions(+), 30 deletions(-) create mode 100644 controllers/ConvertController.php create mode 100644 filehandler/ConvertFileHandler.php create mode 100644 views/convert/index.php create mode 100644 widgets/ConvertWidget.php create mode 100644 widgets/views/convert.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 199b7c5..f929659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Enh: Better way to pass editors config - Enh: JWT support - Enh: Files properly marked as updated now +- Enh: Option to convert `.doc .odt .xls. ods .ppt .odp .txt .csv` files to Office Open XML ## 1.0.2 diff --git a/Events.php b/Events.php index faa5cbb..e938b66 100644 --- a/Events.php +++ b/Events.php @@ -33,11 +33,15 @@ public static function onFileHandlerCollection($event) if ($module->getDocumentType($file) !== null) { $canEdit = $collection->type == FileHandlerCollection::TYPE_EDIT && $module->canEdit($file); + $canConvert = $collection->type == FileHandlerCollection::TYPE_EDIT && $module->canConvert($file); $canView = $collection->type == FileHandlerCollection::TYPE_VIEW && $module->canView($file); if ($canEdit) { $collection->register(new filehandler\EditFileHandler()); } + if ($canConvert) { + $collection->register(new filehandler\ConvertFileHandler()); + } if ($canView) { $collection->register(new filehandler\ViewFileHandler()); } diff --git a/Module.php b/Module.php index e87a799..4a8eba3 100644 --- a/Module.php +++ b/Module.php @@ -57,7 +57,19 @@ class Module extends \humhub\components\Module * @var string[] allowed for editing extensions */ public $editableExtensions = ['xlsx', 'ppsx', 'pptx', 'docx' ]; + public $convertableExtensions = ['doc','odt','xls','ods','ppt','odp','txt','csv']; + + public $convertsTo = [ + 'doc' => 'docx', + 'odt' => 'docx', + 'txt' => 'docx', + 'xls' => 'xlsx', + 'ods' => 'xlsx', + 'csv' => 'xlsx', + 'ppt' => 'pptx', + 'odp' => 'pptx', + ]; public function isJwtEnabled() { @@ -103,6 +115,12 @@ public function canEdit($file) return in_array($fileExtension, $this->editableExtensions); } + public function canConvert($file) + { + $fileExtension = FileHelper::getExtension($file); + return in_array($fileExtension, $this->convertableExtensions); + } + public function canView($file) { return !empty($this->getDocumentType($file)); @@ -118,6 +136,22 @@ public function getConfigUrl() ]); } + /** + * Generate unique document key + * + * @return string + */ + public function generateDocumentKey($file) + { + if (!empty($file->onlydocuments_key)) { + return $file->onlydocuments_key; + } + + $key = substr(strtolower(md5(Yii::$app->security->generateRandomString(20))), 0, 20); + $file->updateAttributes(['onlydocuments_key' => $key]); + return $key; + } + public function commandService($data) { $url = $this->getServerUrl() . '/coauthoring/CommandService.ashx'; @@ -154,4 +188,53 @@ public function commandService($data) } } + public function convertService($file, $ts) + { + $url = $this->getServerUrl() . '/ConvertService.ashx'; + $key = $this->generateDocumentKey($file); + + $ext = FileHelper::getExtension($file); + $data = [ + 'async' => true, + 'embeddedfonts' => true, + 'filetype' => $ext, + 'outputtype' => $this->convertsTo[$ext], + 'key' => $key . $ts, + 'url' => Url::to(['/onlydocuments/backend/download', 'key' => $key], true), + ]; + + try { + $http = new \Zend\Http\Client($url, [ + 'adapter' => '\Zend\Http\Client\Adapter\Curl', + 'curloptions' => CURLHelper::getOptions(), + 'timeout' => 10 + ]); + $http->setMethod('POST'); + $headers = $http->getRequest()->getHeaders(); + + if ($this->isJwtEnabled()) { + $data['token'] = JWT::encode($data, $this->getJwtSecret()); + $headers->addHeaderLine('Authorization', 'Bearer ' . JWT::encode(['payload' => $data], $this->getJwtSecret())); + } + + $http->setRawBody(Json::encode($data)); + $headers->addHeaderLine('Accept', 'application/json'); + + $response = $http->send(); + $json = $response->getBody(); + } catch (\Exception $ex) { + $error = 'Could not get document server response! ' . $ex->getMessage(); + Yii::error($error); + return [ 'error' => $error ]; + } + + try { + return Json::decode($json); + } catch (\yii\base\InvalidParamException $ex) { + $error = 'Could not get document server response! ' . $ex->getMessage(); + Yii::error($error); + return [ 'error' => $error ]; + } + } + } diff --git a/controllers/ConvertController.php b/controllers/ConvertController.php new file mode 100644 index 0000000..21404ff --- /dev/null +++ b/controllers/ConvertController.php @@ -0,0 +1,56 @@ +getModule('onlydocuments'); + + if (!$module->canConvert($this->file)) { + throw new HttpException('400', 'Could not convert this file'); + } + } + + public function actionIndex() + { + return $this->renderAjax('index', ['file' => $this->file]); + } + + public function actionConvert($guid, $ts, $newName) + { + Yii::$app->response->format = 'json'; + $module = Yii::$app->getModule('onlydocuments'); + + $json = $module->convertService($this->file, $ts); + + if (!empty($json["endConvert"]) && $json["endConvert"]) { + $this->saveFileReplace($json["fileUrl"], $newName); + } + + return $json; + } + + private function saveFileReplace($url, $newName) { + $content = file_get_contents($url); + + $this->file->store->setContent($content); + $this->file->updateAttributes([ + 'onlydocuments_key' => new \yii\db\Expression('NULL'), + 'size' => strlen($content), + 'file_name' => $newName + ]); + } +} diff --git a/filehandler/ConvertFileHandler.php b/filehandler/ConvertFileHandler.php new file mode 100644 index 0000000..ac13bce --- /dev/null +++ b/filehandler/ConvertFileHandler.php @@ -0,0 +1,28 @@ + Yii::t('FileModule.base', 'Convert document'), + 'data-action-url' => Url::to(['/onlydocuments/convert', 'guid' => $this->file->guid]), + 'data-action-click' => 'ui.modal.load', + 'data-modal-id' => 'onlydocuments-modal', + 'data-modal-close' => '' + ]; + } + +} diff --git a/resources/humhub.onlydocuments.js b/resources/humhub.onlydocuments.js index 5407591..5ece0b4 100644 --- a/resources/humhub.onlydocuments.js +++ b/resources/humhub.onlydocuments.js @@ -35,7 +35,7 @@ humhub.module('onlydocuments', function (module, require, $) { this.modal.$.on('hidden.bs.modal', function(evt) { that.modal.clear(); }); - + }; @@ -47,20 +47,9 @@ humhub.module('onlydocuments', function (module, require, $) { Editor.prototype.close = function (evt) { - var that = this; if (this.options.editMode == 'edit') { - client.post({url: this.options.fileInfoUrl}).then(function (response) { - event.trigger('humhub:file:modified', [response.file]); - that.modal.clear(); - that.modal.close(); - evt.finish(); - }).catch(function (e) { - module.log.error(e); - that.modal.clear(); - that.modal.close(); - evt.finish(); - }); + refreshFileInfo(this, evt); } else { this.modal.clear(); this.modal.close(); @@ -95,6 +84,75 @@ humhub.module('onlydocuments', function (module, require, $) { this.docEditor = new DocsAPI.DocEditor('iframeContainer', config); } + var Convert = function (node, options) { + Widget.call(this, node, options); + }; + + object.inherits(Convert, Widget); + + Convert.prototype.init = function () { + + var that = this; + var msg = that.$.find('#oConvertMessage'); + + function _onError(error) { + msg.text(that.options.errorMessage + ' ' + error); + loader.reset(that.$.find('.modal-footer')); + } + + function _callAjax() { + jQuery.ajax({ + type : "POST", + url : that.options.convertPost, + cache: false, + success: function(data) { + if (data.error) { + _onError(data.error); + return; + } + + if (data.percent != null) { + msg.text(data.percent + "%"); + } + + if (!data.endConvert) { + setTimeout(_callAjax, 1000); + } else { + msg.text(that.options.doneMessage); + loader.reset(that.$.find('.modal-footer')); + } + }, + error: _onError + }); + } + + loader.set(that.$.find('.modal-footer')); + _callAjax(); + }; + + Convert.prototype.getDefaultOptions = function () { + return {}; + }; + + Convert.prototype.close = function (evt) { + refreshFileInfo(this, evt); + }; + + function refreshFileInfo(that, evt) { + client.post({url: that.options.fileInfoUrl}).then(function (response) { + event.trigger('humhub:file:modified', [response.file]); + that.modal.clear(); + that.modal.close(); + evt.finish(); + }).catch(function (e) { + module.log.error(e); + that.modal.clear(); + that.modal.close(); + evt.finish(); + }); + } + + var Share = function (node, options) { Widget.call(this, node, options); }; @@ -217,6 +275,7 @@ humhub.module('onlydocuments', function (module, require, $) { init: init, createSubmit: createSubmit, Editor: Editor, + Convert: Convert, Share: Share, }); diff --git a/views/convert/index.php b/views/convert/index.php new file mode 100644 index 0000000..8031ee1 --- /dev/null +++ b/views/convert/index.php @@ -0,0 +1,6 @@ + $file, +]); +?> \ No newline at end of file diff --git a/widgets/ConvertWidget.php b/widgets/ConvertWidget.php new file mode 100644 index 0000000..1301994 --- /dev/null +++ b/widgets/ConvertWidget.php @@ -0,0 +1,71 @@ +getModule('onlydocuments'); + $this->newName = substr($this->file->fileName, 0, strpos($this->file->fileName, '.') + 1) . $module->convertsTo[strtolower(FileHelper::getExtension($this->file))]; + } + + /** + * @inheritdoc + */ + public function getData() + { + return [ + 'convert-post' => Url::to(['/onlydocuments/convert/convert', 'guid' => $this->file->guid, 'ts' => time(), 'newName' => $this->newName]), + 'file-info-url' => Url::to(['/onlydocuments/open/get-info', 'guid' => $this->file->guid]), + 'done-message' => Yii::t('OnlydocumentsModule.base', 'Done!'), + 'error-message' => Yii::t('OnlydocumentsModule.base', 'Error:'), + ]; + } + + /** + * @inheritdoc + */ + public function run() + { + return $this->render('convert', [ + 'options' => $this->getOptions(), + 'file' => $this->file, + 'newName' => $this->newName, + ]); + } + +} diff --git a/widgets/EditorWidget.php b/widgets/EditorWidget.php index 3a11052..8288e5a 100644 --- a/widgets/EditorWidget.php +++ b/widgets/EditorWidget.php @@ -73,6 +73,8 @@ public function getData() return [ 'config' => $this->getConfig(), + 'edit-mode' => $this->mode, + 'file-info-url' => Url::to(['/onlydocuments/open/get-info', 'guid' => $this->file->guid]), 'module-configured' => (empty($module->getServerUrl()) ? '0' : '1'), ]; } @@ -100,27 +102,11 @@ public function run() ]); } - /** - * Generate unique document key - * - * @return string - */ - protected function generateDocumentKey() - { - if (!empty($this->file->onlydocuments_key)) { - return $this->file->onlydocuments_key; - } - - $key = substr(strtolower(md5(Yii::$app->security->generateRandomString(20))), 0, 20); - $this->file->updateAttributes(['onlydocuments_key' => $key]); - return $key; - } - protected function getConfig() { $module = Yii::$app->getModule('onlydocuments'); $user = Yii::$app->user->getIdentity(); - $key = $this->generateDocumentKey($this->file); + $key = $module->generateDocumentKey($this->file); $config = [ 'type' => 'desktop', diff --git a/widgets/views/convert.php b/widgets/views/convert.php new file mode 100644 index 0000000..4e7ad35 --- /dev/null +++ b/widgets/views/convert.php @@ -0,0 +1,27 @@ + + + Yii::t('OnlydocumentsModule.base', 'Convert document')]) ?> + + + + + + + + \ No newline at end of file From a83d95f70183e7e9841bd0ef9b5f5fe2ea6cde78 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Thu, 22 Aug 2019 10:25:21 +0300 Subject: [PATCH 08/17] update readme --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2f5163a..5ce7634 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,31 @@ # HumHub ONLYOFFICE integration plugin -This plugin enables users to edit office documents from [HumHub](https://www.humhub.com/) using ONLYOFFICE Document Server. Currently the following document formats can be opened and edited with this plugin: DOCX, XLSX, PPTX. +This plugin enables users to edit office documents from [HumHub](https://www.humhub.com/) using ONLYOFFICE Document Server. + +## Features +* Currently the following document formats can be opened and edited with this plugin: DOCX, XLSX, PPTX. +* The following formats are available for view only: ODT, ODS, ODP, DOC, XLS, PPT, TXT, PDF. +* The plugin will create a new *Edit/View* menu option for Office documents. +* This allows multiple users to collaborate in real time and to save back those changes to HumHub. +* The following formats can be converted to Office Open XML: ODT, ODS, ODP, DOC, XLS, PPT, TXT, CSV. ## Installing ONLYOFFICE Document Server -You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from HumHub and any end clients. If that is not the case, use the official ONLYOFFICE Document Server documetnations page: [Document Server for Linux](http://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx). ONLYOFFICE Document Server must also be able to POST to HumHub directly. +You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from HumHub and any end clients. If that is not the case, use the official ONLYOFFICE Document Server documentations page: [Document Server for Linux](http://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx). ONLYOFFICE Document Server must also be able to POST to HumHub directly. The easiest way to start an instance of ONLYOFFICE Document Server is to use [Docker](https://github.com/onlyoffice/Docker-DocumentServer). -## Installing ONLYOFFICE Document Server - - ## Installing HumHub ONLYOFFICE integration plugin +Either install it from HumHub Marketplace or simply clone the repository inside one of the folder specified by `moduleAutoloadPaths` parameter. Please see [HumHub Documentation](http://docs.humhub.org/dev-environment.html#external-modules-directory) for more information. + ## Configuring HumHub CONLYOFFICE integration plugin +Navigate to `Administration` -> `Modules` find the plugin under Installed tab and click `Configure`. + ## How it works From 85c2a9425ac95b7d30f34108b7ab762f2b963184 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Fri, 30 Aug 2019 12:17:27 +0300 Subject: [PATCH 09/17] pass error message to editors --- controllers/BackendController.php | 138 +++++++++++++++--------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/controllers/BackendController.php b/controllers/BackendController.php index 497688a..eb572ab 100644 --- a/controllers/BackendController.php +++ b/controllers/BackendController.php @@ -65,88 +65,88 @@ public function actionTrack() ); $result = []; - $result['status'] = 'success'; - $result["error"] = 0; - - if (($body_stream = file_get_contents('php://input')) === FALSE) { - $result["error"] = "Bad Request"; - Yii::error('Bad tracker request', 'onlydocuments'); - return $result; - } - - $data = json_decode($body_stream, TRUE); //json_decode - PHP 5 >= 5.2.0 - if ($data === NULL) { - Yii::error('Got bad tracking response from documentserver!', 'onlydocuments'); - $result["error"] = "Bad Response"; - return $result; - } - - $module = Yii::$app->getModule('onlydocuments'); - if ($module->isJwtEnabled()) { - $token = null; - if (!empty($data["token"])) { - $token = $data["token"]; - } else if (!empty($_SERVER['HTTP_AUTHORIZATION'])) { - $token = substr($_SERVER['HTTP_AUTHORIZATION'], strlen('Bearer ')); + $msg = null; + try { + if (($body_stream = file_get_contents('php://input')) === FALSE) { + throw new \Exception('Empty body'); } - if (empty($token)) { - Yii::error('Expected JWT', 'onlydocuments'); - $result["error"] = "Bad Response"; - return $result; + $data = json_decode($body_stream, TRUE); //json_decode - PHP 5 >= 5.2.0 + if ($data === NULL) { + throw new \Exception('Could not parse json'); } - try { - $ds = JWT::decode($token, $module->getJwtSecret(), array('HS256')); - $data = (array) $ds->payload; - } catch (\Exception $ex) { - Yii::error('Invalid JWT signature', 'onlydocuments'); - $result["error"] = "Bad Response"; - return $result; - } - } - - //Yii::warning('Tracking request for file ' . $this->file->guid . ' - data: ' . print_r($data, 1), 'onlydocuments'); - - $user = null; - if (!empty($data['users'])) { - $users = $data['users']; - $user = User::findOne(['guid' => $users[0]]); - } + $module = Yii::$app->getModule('onlydocuments'); + if ($module->isJwtEnabled()) { + $token = null; + if (!empty($data["token"])) { + $token = $data["token"]; + } else if (!empty($_SERVER['HTTP_AUTHORIZATION'])) { + $token = substr($_SERVER['HTTP_AUTHORIZATION'], strlen('Bearer ')); + } - $status = $_trackerStatus[$data["status"]]; - switch ($status) { - case "MustSave": - case "Corrupted": - case "ForceSave": + if (empty($token)) { + throw new \Exception('Expected JWT'); + } - $newData = file_get_contents($data["url"]); + try { + $ds = JWT::decode($token, $module->getJwtSecret(), array('HS256')); + $data = (array) $ds->payload; + } catch (\Exception $ex) { + throw new \Exception('Invalid JWT signature'); + } + } - if (!empty($newData)) { - $this->file->getStore()->setContent($newData); + //Yii::warning('Tracking request for file ' . $this->file->guid . ' - data: ' . print_r($data, 1), 'onlydocuments'); - if ($status != 'ForceSave') { - $newAttr = [ - 'onlydocuments_key' => new \yii\db\Expression('NULL'), - 'updated_at' => date("Y-m-d H:i:s"), - 'size' => strlen($newData), - ]; - if (!empty($user)) $newAttr['updated_by'] = $user->getId(); + $user = null; + if (!empty($data['users'])) { + $users = $data['users']; + $user = User::findOne(['guid' => $users[0]]); + } - $this->file->updateAttributes($newAttr); - //Yii::warning('Dosaved', 'onlydocuments'); + $status = $_trackerStatus[$data["status"]]; + switch ($status) { + case "MustSave": + case "Corrupted": + case "ForceSave": + + $newData = file_get_contents($data["url"]); + + if (!empty($newData)) { + $this->file->getStore()->setContent($newData); + + if ($status != 'ForceSave') { + $newAttr = [ + 'onlydocuments_key' => new \yii\db\Expression('NULL'), + 'updated_at' => date("Y-m-d H:i:s"), + 'size' => strlen($newData), + ]; + if (!empty($user)) $newAttr['updated_by'] = $user->getId(); + + $this->file->updateAttributes($newAttr); + //Yii::warning('Dosaved', 'onlydocuments'); + } else { + //Yii::warning('ForceSaved', 'onlydocuments'); + } } else { - //Yii::warning('ForceSaved', 'onlydocuments'); + throw new \Exception('Could not save onlyoffice document: ' . $data["url"]); } - $saved = 1; - } else { - Yii::error('Could not save onlyoffice document: ' . $data["url"], 'onlydocuments'); - $saved = 0; - } - $result["c"] = "saved"; - $result["status"] = $saved; break; + } + + } catch (\Exception $e) { + Yii::error($e->getMessage(), 'onlydocuments'); + $msg = $e->getMessage(); + } + + if ($msg == null) { + $result['error'] = 0; + } else { + Yii::$app->response->statusCode = 500; + $result['error'] = 1; + $result['message'] = $msg; } //Yii::warning("Return: " . print_r($result, 1), 'onlydocuments'); From 373808af252fb11ff9be1391018070812f7a3959 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Mon, 2 Sep 2019 10:23:59 +0300 Subject: [PATCH 10/17] readme howto --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ce7634..25a97ef 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,38 @@ Navigate to `Administration` -> `Modules` find the plugin under Installed tab an ## How it works -The ONLYOFFICE integration follows the API documented here https://api.onlyoffice.com/editors/basic: +The ONLYOFFICE integration follows the API documented [here](https://api.onlyoffice.com/editors/basic): + +* When creating a new file, the user will be provided with Document, Spreadsheet or Presentation options in the `Create document` menu. + +* The browser invokes the `index` method in the `/controllers/CreateController.php` controller. + +* Or, when opening an existing file, the user will be provided with `View document` or `Edit document` depending on an extension. + +* A popup is opened and the `index` method of the `/controllers/OpenController.php` controller is invoked. + +* The app prepares a JSON object with the following properties: + + * **url** - the URL that ONLYOFFICE Document Server uses to download the document; + * **callbackUrl** - the URL that ONLYOFFICE Document Server informs about status of the document editing; + * **key** - the random MD5 hash to instruct ONLYOFFICE Document Server whether to download the document again or not; + * **title** - the document Title (name); + * **id** - the identification of the user; + * **name** - the name of the user. + +* HumHub takes this object and constructs a page from `views/open/index.php` template, filling in all of those values so that the client browser can load up the editor. + +* The client browser makes a request for the javascript library from ONLYOFFICE Document Server and sends ONLYOFFICE Document Server the DocEditor configuration with the above properties. + +* Then ONLYOFFICE Document Server downloads the document from HumHub and the user begins editing. + +* ONLYOFFICE Document Server sends a POST request to the _callbackUrl_ to inform HumHub that a user is editing the document. + +* When all users and client browsers are done with editing, they close the editing window. + +* After [10 seconds](https://api.onlyoffice.com/editors/save#savedelay) of inactivity, ONLYOFFICE Document Server sends a POST to the _callbackUrl_ letting HumHub know that the clients have finished editing the document and closed it. + +* HumHub downloads the new version of the document, replacing the old one. ## ONLYOFFICE Document Server editions From 413a36dde8aee9990f63b74d0d9fc77c9d6a8092 Mon Sep 17 00:00:00 2001 From: Andrey Panov Date: Thu, 7 Nov 2019 13:59:16 +0300 Subject: [PATCH 11/17] i18n changes --- controllers/BackendController.php | 2 +- filehandler/ConvertFileHandler.php | 2 +- filehandler/CreateFileHandler.php | 2 +- filehandler/EditFileHandler.php | 2 +- filehandler/ViewFileHandler.php | 2 +- messages/am/base.php | 22 ---------- messages/an/base.php | 38 ---------------- messages/ar/base.php | 38 ---------------- messages/bg/base.php | 38 ---------------- messages/br/base.php | 22 ---------- messages/ca/base.php | 38 ---------------- messages/cs/base.php | 38 ---------------- messages/da/base.php | 38 ---------------- messages/de/base.php | 69 +++++++++++++++++++++--------- messages/el/base.php | 38 ---------------- messages/es/base.php | 38 ---------------- messages/fa_ir/base.php | 38 ---------------- messages/fi/base.php | 69 +++++++++++++++++++++--------- messages/fr/base.php | 69 +++++++++++++++++++++--------- messages/hr/base.php | 16 ++++++- messages/ht/base.php | 38 ---------------- messages/hu/base.php | 69 +++++++++++++++++++++--------- messages/id/base.php | 38 ---------------- messages/it/base.php | 69 +++++++++++++++++++++--------- messages/ja/base.php | 69 +++++++++++++++++++++--------- messages/ko/base.php | 38 ---------------- messages/lt/base.php | 38 ---------------- messages/lv/base.php | 38 ---------------- messages/nb_no/base.php | 38 ---------------- messages/nl/base.php | 69 +++++++++++++++++++++--------- messages/nn_no/base.php | 38 ---------------- messages/pl/base.php | 69 +++++++++++++++++++++--------- messages/pt/base.php | 38 ---------------- messages/pt_br/base.php | 69 +++++++++++++++++++++--------- messages/ro/base.php | 38 ---------------- messages/ru/base.php | 38 ---------------- messages/sk/base.php | 38 ---------------- messages/sl/base.php | 38 ---------------- messages/sv/base.php | 21 --------- messages/th/base.php | 38 ---------------- messages/tr/base.php | 38 ---------------- messages/uk/base.php | 38 ---------------- messages/uz/base.php | 38 ---------------- messages/vi/base.php | 69 +++++++++++++++++++++--------- messages/zh_cn/base.php | 38 ---------------- messages/zh_tw/base.php | 38 ---------------- views/create/index.php | 2 +- 47 files changed, 510 insertions(+), 1299 deletions(-) delete mode 100644 messages/am/base.php delete mode 100644 messages/an/base.php delete mode 100644 messages/ar/base.php delete mode 100644 messages/bg/base.php delete mode 100644 messages/br/base.php delete mode 100644 messages/ca/base.php delete mode 100644 messages/cs/base.php delete mode 100644 messages/da/base.php delete mode 100644 messages/el/base.php delete mode 100644 messages/es/base.php delete mode 100644 messages/fa_ir/base.php delete mode 100644 messages/ht/base.php delete mode 100644 messages/id/base.php delete mode 100644 messages/ko/base.php delete mode 100644 messages/lt/base.php delete mode 100644 messages/lv/base.php delete mode 100644 messages/nb_no/base.php delete mode 100644 messages/nn_no/base.php delete mode 100644 messages/pt/base.php delete mode 100644 messages/ro/base.php delete mode 100644 messages/ru/base.php delete mode 100644 messages/sk/base.php delete mode 100644 messages/sl/base.php delete mode 100644 messages/sv/base.php delete mode 100644 messages/th/base.php delete mode 100644 messages/tr/base.php delete mode 100644 messages/uk/base.php delete mode 100644 messages/uz/base.php delete mode 100644 messages/zh_cn/base.php delete mode 100644 messages/zh_tw/base.php diff --git a/controllers/BackendController.php b/controllers/BackendController.php index eb572ab..5d40c1d 100644 --- a/controllers/BackendController.php +++ b/controllers/BackendController.php @@ -36,7 +36,7 @@ public function beforeAction($action) $this->file = File::findOne(['onlydocuments_key' => $key]); if ($this->file == null) { - throw new HttpException(404, Yii::t('FileModule.base', 'Could not find requested file!')); + throw new HttpException(404, Yii::t('OnlydocumentsModule.base', 'Could not find requested file!')); } return parent::beforeAction($action); diff --git a/filehandler/ConvertFileHandler.php b/filehandler/ConvertFileHandler.php index ac13bce..ae9e0bb 100644 --- a/filehandler/ConvertFileHandler.php +++ b/filehandler/ConvertFileHandler.php @@ -17,7 +17,7 @@ class ConvertFileHandler extends BaseFileHandler public function getLinkAttributes() { return [ - 'label' => Yii::t('FileModule.base', 'Convert document'), + 'label' => Yii::t('OnlydocumentsModule.base', 'Convert document'), 'data-action-url' => Url::to(['/onlydocuments/convert', 'guid' => $this->file->guid]), 'data-action-click' => 'ui.modal.load', 'data-modal-id' => 'onlydocuments-modal', diff --git a/filehandler/CreateFileHandler.php b/filehandler/CreateFileHandler.php index 0f9f8f7..75fef1d 100644 --- a/filehandler/CreateFileHandler.php +++ b/filehandler/CreateFileHandler.php @@ -28,7 +28,7 @@ class CreateFileHandler extends BaseFileHandler public function getLinkAttributes() { return [ - 'label' => Yii::t('FileModule.base', 'Create document (Text, Spreadsheet, Presentation)'), + 'label' => Yii::t('OnlydocumentsModule.base', 'Create document (Text, Spreadsheet, Presentation)'), 'data-action-url' => Url::to(['/onlydocuments/create']), 'data-action-click' => 'ui.modal.load', 'data-modal-id' => 'onlydocuments-modal', diff --git a/filehandler/EditFileHandler.php b/filehandler/EditFileHandler.php index dd12f2c..f356b4b 100644 --- a/filehandler/EditFileHandler.php +++ b/filehandler/EditFileHandler.php @@ -28,7 +28,7 @@ class EditFileHandler extends BaseFileHandler public function getLinkAttributes() { return [ - 'label' => Yii::t('FileModule.base', 'Edit document'), + 'label' => Yii::t('OnlydocumentsModule.base', 'Edit document'), 'data-action-url' => Url::to(['/onlydocuments/open', 'guid' => $this->file->guid, 'mode' => Module::OPEN_MODE_EDIT]), 'data-action-click' => 'ui.modal.load', 'data-modal-id' => 'onlydocuments-modal', diff --git a/filehandler/ViewFileHandler.php b/filehandler/ViewFileHandler.php index af26388..f065a9d 100644 --- a/filehandler/ViewFileHandler.php +++ b/filehandler/ViewFileHandler.php @@ -28,7 +28,7 @@ class ViewFileHandler extends BaseFileHandler public function getLinkAttributes() { return [ - 'label' => Yii::t('FileModule.base', 'View document'), + 'label' => Yii::t('OnlydocumentsModule.base', 'View document'), 'data-action-url' => Url::to(['/onlydocuments/open', 'guid' => $this->file->guid, 'mode' => Module::OPEN_MODE_VIEW]), 'data-action-click' => 'ui.modal.load', 'data-modal-id' => 'onlydocuments-modal', diff --git a/messages/am/base.php b/messages/am/base.php deleted file mode 100644 index 3d578a2..0000000 --- a/messages/am/base.php +++ /dev/null @@ -1,22 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/an/base.php b/messages/an/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/an/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/ar/base.php b/messages/ar/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/ar/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/bg/base.php b/messages/bg/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/bg/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/br/base.php b/messages/br/base.php deleted file mode 100644 index 3d578a2..0000000 --- a/messages/br/base.php +++ /dev/null @@ -1,22 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/ca/base.php b/messages/ca/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/ca/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/cs/base.php b/messages/cs/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/cs/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/da/base.php b/messages/da/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/da/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/de/base.php b/messages/de/base.php index 0f27c70..ad0c408 100644 --- a/messages/de/base.php +++ b/messages/de/base.php @@ -1,21 +1,50 @@ Create document' => 'Dokument erstellen ', - 'DocumentServer not accessible.' => 'DocumentServer nicht erreichbar', - 'DocumentServer not configured yet.' => 'DocumentServer wurde noch nicht konfiguriert.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'Erfolgreich mit dem DocumentServer verbunden! – Installierte Version: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice – DocumentServer Modul-Konfiguration', - 'Share document' => 'Dokument teilen', - 'Close' => 'Schließen', - 'Copy to clipboard' => 'In die Zwischenablage kopieren', - 'Could not find requested file!' => 'Angeforderte Datei nicht gefunden!', - 'Could not find shared file!' => 'Geteilte Datei nicht gefunden!', - 'File read access denied!' => 'Lesezugriff wurde abgelehnt!', - 'File write access denied!' => 'Schreibzugriff wurde abgelehnt!', - 'Hostname' => 'Hostname', - 'Link for view only access' => 'Link für Lesezugriff', - 'Link with enabled write access' => 'Link mit aktiviertem Schreibzugriff', - 'Open the new document in the next step' => 'Öffne das neue Dokument im nächsten Schritt', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Du kannst dieses Dokument einfach über einen direkten Link teilen. Der Nutzer benötigt kein gültiges Benutzerkonto auf der Plattform.', - 'e.g. http://documentserver' => 'z.B. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Dokument erstellen ', + 'DocumentServer not accessible.' => 'DocumentServer nicht erreichbar', + 'DocumentServer not configured yet.' => 'DocumentServer wurde noch nicht konfiguriert.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'Erfolgreich mit dem DocumentServer verbunden! – Installierte Version: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice – DocumentServer Modul-Konfiguration', + 'Share document' => 'Dokument teilen', + 'Close' => 'Schließen', + 'Copy to clipboard' => 'In die Zwischenablage kopieren', + 'Could not find requested file!' => 'Angeforderte Datei nicht gefunden!', + 'Could not find shared file!' => 'Geteilte Datei nicht gefunden!', + 'File read access denied!' => 'Lesezugriff wurde abgelehnt!', + 'File write access denied!' => 'Schreibzugriff wurde abgelehnt!', + 'Hostname' => 'Hostname', + 'Link for view only access' => 'Link für Lesezugriff', + 'Link with enabled write access' => 'Link mit aktiviertem Schreibzugriff', + 'Open the new document in the next step' => 'Öffne das neue Dokument im nächsten Schritt', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Du kannst dieses Dokument einfach über einen direkten Link teilen. Der Nutzer benötigt kein gültiges Benutzerkonto auf der Plattform.', + 'e.g. http://documentserver' => 'z.B. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/el/base.php b/messages/el/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/el/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/es/base.php b/messages/es/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/es/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/fa_ir/base.php b/messages/fa_ir/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/fa_ir/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/fi/base.php b/messages/fi/base.php index 3983e72..87a0471 100644 --- a/messages/fi/base.php +++ b/messages/fi/base.php @@ -1,21 +1,50 @@ Create document' => 'Luo tiedosto', - 'DocumentServer not accessible.' => 'DocumentServer ei yhteyttä.', - 'DocumentServer not configured yet.' => 'DocumentServer ei määritetty.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer yhdistetty! - Versio: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer laajennuksen määritys', - 'Share document' => 'Jaa tiedosto', - 'Close' => 'Sulje', - 'Copy to clipboard' => 'Kopioi leikepöydälle', - 'Could not find requested file!' => 'Pyydettyä tiedostoa ei löytynyt!', - 'Could not find shared file!' => 'Jaettua tiedostoa ei löytynyt!', - 'File read access denied!' => 'Tiedoston luku estetty!', - 'File write access denied!' => 'Tiedoston muokkaus estetty!', - 'Hostname' => 'Isäntänimi', - 'Link for view only access' => 'Katselu linkki', - 'Link with enabled write access' => 'Linkki jolla voi muokata oikeus', - 'Open the new document in the next step' => 'Avaa tiedosto heti', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Voit jakaa tämän tiedoston tällä linkillä. Käyttäjän ei tarvitse olla palvelun jäsen.', - 'e.g. http://documentserver' => 'esim. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Luo tiedosto', + 'DocumentServer not accessible.' => 'DocumentServer ei yhteyttä.', + 'DocumentServer not configured yet.' => 'DocumentServer ei määritetty.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer yhdistetty! - Versio: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer laajennuksen määritys', + 'Share document' => 'Jaa tiedosto', + 'Close' => 'Sulje', + 'Copy to clipboard' => 'Kopioi leikepöydälle', + 'Could not find requested file!' => 'Pyydettyä tiedostoa ei löytynyt!', + 'Could not find shared file!' => 'Jaettua tiedostoa ei löytynyt!', + 'File read access denied!' => 'Tiedoston luku estetty!', + 'File write access denied!' => 'Tiedoston muokkaus estetty!', + 'Hostname' => 'Isäntänimi', + 'Link for view only access' => 'Katselu linkki', + 'Link with enabled write access' => 'Linkki jolla voi muokata oikeus', + 'Open the new document in the next step' => 'Avaa tiedosto heti', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Voit jakaa tämän tiedoston tällä linkillä. Käyttäjän ei tarvitse olla palvelun jäsen.', + 'e.g. http://documentserver' => 'esim. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/fr/base.php b/messages/fr/base.php index 8d66705..217bd52 100644 --- a/messages/fr/base.php +++ b/messages/fr/base.php @@ -1,21 +1,50 @@ Create document' => 'Créer un document', - 'DocumentServer not accessible.' => 'DocumentServer non accessible.', - 'DocumentServer not configured yet.' => 'DocumentServer pas encore configuré.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer connecté avec succès ! - Version installée : {version}', - 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer configuration du module', - 'Share document' => 'Partager un document', - 'Close' => 'Fermer', - 'Copy to clipboard' => 'Copier dans le presse-papier', - 'Could not find requested file!' => 'Impossible de trouver le fichier demandé !', - 'Could not find shared file!' => 'Impossible de trouver le fichier partagé !', - 'File read access denied!' => 'Lecture du fichier refusée !', - 'File write access denied!' => 'Écriture du fichier refusée !', - 'Hostname' => 'Nom du serveur', - 'Link for view only access' => 'Lien pour un accès uniquement en lecture', - 'Link with enabled write access' => 'Lien avec accès en écriture', - 'Open the new document in the next step' => 'Ouvrir le nouveau document lors de la prochaine étape', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Vous pouvez simplement partager ce document à l\'aide d\'un lien direct. L\'utilisateur n\'a pas besoin de posséder une compte valide sur la plateforme. ', - 'e.g. http://documentserver' => 'par ex. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Créer un document', + 'DocumentServer not accessible.' => 'DocumentServer non accessible.', + 'DocumentServer not configured yet.' => 'DocumentServer pas encore configuré.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer connecté avec succès ! - Version installée : {version}', + 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer configuration du module', + 'Share document' => 'Partager un document', + 'Close' => 'Fermer', + 'Copy to clipboard' => 'Copier dans le presse-papier', + 'Could not find requested file!' => 'Impossible de trouver le fichier demandé !', + 'Could not find shared file!' => 'Impossible de trouver le fichier partagé !', + 'File read access denied!' => 'Lecture du fichier refusée !', + 'File write access denied!' => 'Écriture du fichier refusée !', + 'Hostname' => 'Nom du serveur', + 'Link for view only access' => 'Lien pour un accès uniquement en lecture', + 'Link with enabled write access' => 'Lien avec accès en écriture', + 'Open the new document in the next step' => 'Ouvrir le nouveau document lors de la prochaine étape', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Vous pouvez simplement partager ce document à l\'aide d\'un lien direct. L\'utilisateur n\'a pas besoin de posséder une compte valide sur la plateforme. ', + 'e.g. http://documentserver' => 'par ex. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/hr/base.php b/messages/hr/base.php index 0a73b3e..00af5ad 100644 --- a/messages/hr/base.php +++ b/messages/hr/base.php @@ -2,7 +2,7 @@ /** * Message translations. * - * This file is automatically generated by 'yii message/extract-module' command. + * This file is automatically generated by 'yii message/extract' command. * It contains the localizable messages extracted from source code. * You may modify this file by translating the extracted messages. * @@ -17,7 +17,6 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'e.g. http://documentserver' => '', 'Create document' => 'Kreiraj dokument', 'DocumentServer not accessible.' => 'DokumentServer nije pristupačan.', 'DocumentServer not configured yet.' => 'DokumentServer još nije konfiguriran.', @@ -35,4 +34,17 @@ 'Link with enabled write access' => 'Poveznica s omogućenim uređivanjem', 'Open the new document in the next step' => 'Otvori novi dokument u sljedećem koraku', 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Možete jednostavno podijeliti ovaj dokument koristeći direktnu poveznicu (link). Korisnik ne treba registirani račun na platformi.', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', + 'e.g. http://documentserver' => '', ]; diff --git a/messages/ht/base.php b/messages/ht/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/ht/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/hu/base.php b/messages/hu/base.php index 280d6fb..92b6de0 100644 --- a/messages/hu/base.php +++ b/messages/hu/base.php @@ -1,21 +1,50 @@ Create document' => 'Dokumentum létrehozása', - 'DocumentServer not accessible.' => 'DocumentServer nem elérhető.', - 'DocumentServer not configured yet.' => 'DocumentServer még nincs konfigurálva.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer sikeresen kapcsolódott! - Telepített verzió: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer modul konfiguráció', - 'Share document' => 'Dokumentum megosztása', - 'Close' => 'Bezárás', - 'Copy to clipboard' => 'Másolás a vágólapra', - 'Could not find requested file!' => 'A kért fájl nem található!', - 'Could not find shared file!' => 'A megosztott fájl nem található!', - 'File read access denied!' => 'Fájl olvasása megtagadva!', - 'File write access denied!' => 'Fájl írása megtagadva!', - 'Hostname' => 'Hosztnév', - 'Link for view only access' => 'Hivatkozás csak megtekintéshez', - 'Link with enabled write access' => 'Hivatkozás íráshoz', - 'Open the new document in the next step' => 'A következő lépésben nyissa meg a dokumentumot', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Egyszerűen megoszthatod ezt a dokumentumot közvetlen hivatkozás használatával. A felhasználónak nem kell érvényes felhasználói fiókkal rendelkeznie a platformon.', - 'e.g. http://documentserver' => 'pl. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Dokumentum létrehozása', + 'DocumentServer not accessible.' => 'DocumentServer nem elérhető.', + 'DocumentServer not configured yet.' => 'DocumentServer még nincs konfigurálva.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer sikeresen kapcsolódott! - Telepített verzió: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer modul konfiguráció', + 'Share document' => 'Dokumentum megosztása', + 'Close' => 'Bezárás', + 'Copy to clipboard' => 'Másolás a vágólapra', + 'Could not find requested file!' => 'A kért fájl nem található!', + 'Could not find shared file!' => 'A megosztott fájl nem található!', + 'File read access denied!' => 'Fájl olvasása megtagadva!', + 'File write access denied!' => 'Fájl írása megtagadva!', + 'Hostname' => 'Hosztnév', + 'Link for view only access' => 'Hivatkozás csak megtekintéshez', + 'Link with enabled write access' => 'Hivatkozás íráshoz', + 'Open the new document in the next step' => 'A következő lépésben nyissa meg a dokumentumot', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Egyszerűen megoszthatod ezt a dokumentumot közvetlen hivatkozás használatával. A felhasználónak nem kell érvényes felhasználói fiókkal rendelkeznie a platformon.', + 'e.g. http://documentserver' => 'pl. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/id/base.php b/messages/id/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/id/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/it/base.php b/messages/it/base.php index 75d95d1..ec227e5 100644 --- a/messages/it/base.php +++ b/messages/it/base.php @@ -1,21 +1,50 @@ Create document' => 'Crea documento', - 'DocumentServer not accessible.' => 'DocumentServer non accessibile.', - 'DocumentServer not configured yet.' => 'DocumentServer non ancora configurato.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer collegato correttamente! - Versione installata: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'Configurazione modulo OnlyOffice - DocumentServer', - 'Share document' => 'Condividi documento', - 'Close' => 'Chiudi', - 'Copy to clipboard' => 'Copia negli appunti', - 'Could not find requested file!' => 'Non risesco a trovare il file richiesto!', - 'Could not find shared file!' => 'Non riesco a trovare il file condiviso!', - 'File read access denied!' => 'Accesso al file negato!', - 'File write access denied!' => 'Non posso scrivere sul file!', - 'Hostname' => 'Hostname', - 'Link for view only access' => 'Link per sola visualizzazione', - 'Link with enabled write access' => 'Link per visualizzazione e modifica', - 'Open the new document in the next step' => 'Apri il nuovo documento nel prossimo passaggio', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Puoi semplicemente condividere questo documento con un link diretto. L\'utente non necessita di un account valido nella piattaforma.', - 'e.g. http://documentserver' => 'es. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Crea documento', + 'DocumentServer not accessible.' => 'DocumentServer non accessibile.', + 'DocumentServer not configured yet.' => 'DocumentServer non ancora configurato.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer collegato correttamente! - Versione installata: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'Configurazione modulo OnlyOffice - DocumentServer', + 'Share document' => 'Condividi documento', + 'Close' => 'Chiudi', + 'Copy to clipboard' => 'Copia negli appunti', + 'Could not find requested file!' => 'Non risesco a trovare il file richiesto!', + 'Could not find shared file!' => 'Non riesco a trovare il file condiviso!', + 'File read access denied!' => 'Accesso al file negato!', + 'File write access denied!' => 'Non posso scrivere sul file!', + 'Hostname' => 'Hostname', + 'Link for view only access' => 'Link per sola visualizzazione', + 'Link with enabled write access' => 'Link per visualizzazione e modifica', + 'Open the new document in the next step' => 'Apri il nuovo documento nel prossimo passaggio', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Puoi semplicemente condividere questo documento con un link diretto. L\'utente non necessita di un account valido nella piattaforma.', + 'e.g. http://documentserver' => 'es. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/ja/base.php b/messages/ja/base.php index afbe0ce..e3ef46c 100644 --- a/messages/ja/base.php +++ b/messages/ja/base.php @@ -1,21 +1,50 @@ Create document' => 'ドキュメント類を作成する', - 'DocumentServer not accessible.' => 'ドキュメントサーバーにアクセスできません', - 'DocumentServer not configured yet.' => 'ドキュメントサーバーが未設定です', - 'DocumentServer successfully connected! - Installed version: {version}' => 'ドキュメントサーバーにアクセスしました、バージョンは {version} です', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => 'ドキュメント類をシェアする', - 'Close' => '閉じる', - 'Copy to clipboard' => 'クリップボードにコピー', - 'Could not find requested file!' => 'お探しのファイルが見つかりませんでした', - 'Could not find shared file!' => '共有ファイルは見つかりませんでした', - 'File read access denied!' => 'ファイルの読み込みが拒否されました', - 'File write access denied!' => 'ファイルへの書込が拒否されました', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'ドキュメント類を作成する', + 'DocumentServer not accessible.' => 'ドキュメントサーバーにアクセスできません', + 'DocumentServer not configured yet.' => 'ドキュメントサーバーが未設定です', + 'DocumentServer successfully connected! - Installed version: {version}' => 'ドキュメントサーバーにアクセスしました、バージョンは {version} です', + 'Share document' => 'ドキュメント類をシェアする', + 'Close' => '閉じる', + 'Copy to clipboard' => 'クリップボードにコピー', + 'Could not find requested file!' => 'お探しのファイルが見つかりませんでした', + 'Could not find shared file!' => '共有ファイルは見つかりませんでした', + 'File read access denied!' => 'ファイルの読み込みが拒否されました', + 'File write access denied!' => 'ファイルへの書込が拒否されました', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'OnlyOffice - DocumentServer module configuration' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'Hostname' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Link for view only access' => '', + 'Link with enabled write access' => '', + 'Open the new document in the next step' => '', + 'Share' => '', + 'View document' => '', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', + 'e.g. http://documentserver' => '', +]; diff --git a/messages/ko/base.php b/messages/ko/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/ko/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/lt/base.php b/messages/lt/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/lt/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/lv/base.php b/messages/lv/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/lv/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/nb_no/base.php b/messages/nb_no/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/nb_no/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/nl/base.php b/messages/nl/base.php index e3583f1..03c0a0b 100644 --- a/messages/nl/base.php +++ b/messages/nl/base.php @@ -1,21 +1,50 @@ Create document' => 'Maak document', - 'DocumentServer not accessible.' => 'Documenten-server is niet bereikbaar.', - 'DocumentServer not configured yet.' => 'Documenten-server is nog niet geconfigureerd.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'Documenten-sverver is succesvol aangesloten! - Geïnstalleerde versie: {versie}', - 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - Documenten-server moduleconfiguratie', - 'Share document' => 'Deel document', - 'Close' => 'Sluit', - 'Copy to clipboard' => 'Kopieer naar klembord', - 'Could not find requested file!' => 'Kan het gevraagde bestand niet vinden!', - 'Could not find shared file!' => 'Kan het gedeelde bestand niet vinden!', - 'File read access denied!' => 'Lees-toegang geweigerd!', - 'File write access denied!' => 'Schrijf-toegang geweigerd!', - 'Hostname' => 'Computernaam (Hostname)', - 'Link for view only access' => 'Link voor alleen lees-toegang', - 'Link with enabled write access' => 'Link voor schrijf-toegang', - 'Open the new document in the next step' => 'Open het nieuwe document in de volgende stap', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'U kunt dit document eenvoudig delen met een directe link. De gebruiker heeft geen geldig gebruikersaccount op het platform nodig.', - 'e.g. http://documentserver' => 'bijvoobeeld http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Maak document', + 'DocumentServer not accessible.' => 'Documenten-server is niet bereikbaar.', + 'DocumentServer not configured yet.' => 'Documenten-server is nog niet geconfigureerd.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'Documenten-sverver is succesvol aangesloten! - Geïnstalleerde versie: {versie}', + 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - Documenten-server moduleconfiguratie', + 'Share document' => 'Deel document', + 'Close' => 'Sluit', + 'Copy to clipboard' => 'Kopieer naar klembord', + 'Could not find requested file!' => 'Kan het gevraagde bestand niet vinden!', + 'Could not find shared file!' => 'Kan het gedeelde bestand niet vinden!', + 'File read access denied!' => 'Lees-toegang geweigerd!', + 'File write access denied!' => 'Schrijf-toegang geweigerd!', + 'Hostname' => 'Computernaam (Hostname)', + 'Link for view only access' => 'Link voor alleen lees-toegang', + 'Link with enabled write access' => 'Link voor schrijf-toegang', + 'Open the new document in the next step' => 'Open het nieuwe document in de volgende stap', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'U kunt dit document eenvoudig delen met een directe link. De gebruiker heeft geen geldig gebruikersaccount op het platform nodig.', + 'e.g. http://documentserver' => 'bijvoobeeld http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/nn_no/base.php b/messages/nn_no/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/nn_no/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/pl/base.php b/messages/pl/base.php index a28cbdf..53eb40f 100644 --- a/messages/pl/base.php +++ b/messages/pl/base.php @@ -1,21 +1,50 @@ Create document' => 'Utwórz dokument', - 'DocumentServer not accessible.' => 'DocumentServer niedostępny.', - 'DocumentServer not configured yet.' => 'DocumentServer jeszcze nie skonfigurowany.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer Połączono - Zainstalowana wersja: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer konfiguracja modułu', - 'Share document' => 'Udostępnij dokument', - 'Close' => 'Zamknij', - 'Copy to clipboard' => 'Kopiuj do schowka', - 'Could not find requested file!' => 'Nie znaleziono wybranego pliku!', - 'Could not find shared file!' => 'Nie znaleziono udostępnionego pliku!', - 'File read access denied!' => 'Odmowa dostępu do odczytu pliku!', - 'File write access denied!' => 'Odmowa dostępu do zapisu pliku!', - 'Hostname' => 'Nazwa Hosta', - 'Link for view only access' => 'Odnośnik z dostępem tylko do odczytu', - 'Link with enabled write access' => 'Odnośnik z dostępem do zapisu', - 'Open the new document in the next step' => 'Otwórz nowy dokument w następnym kroku', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Możesz udostępnić ten dokument używając bezpośredniego odnośnika. Użytkownik nie musi posiadać konta na tej platformie.', - 'e.g. http://documentserver' => 'np. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Utwórz dokument', + 'DocumentServer not accessible.' => 'DocumentServer niedostępny.', + 'DocumentServer not configured yet.' => 'DocumentServer jeszcze nie skonfigurowany.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'DocumentServer Połączono - Zainstalowana wersja: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'OnlyOffice - DocumentServer konfiguracja modułu', + 'Share document' => 'Udostępnij dokument', + 'Close' => 'Zamknij', + 'Copy to clipboard' => 'Kopiuj do schowka', + 'Could not find requested file!' => 'Nie znaleziono wybranego pliku!', + 'Could not find shared file!' => 'Nie znaleziono udostępnionego pliku!', + 'File read access denied!' => 'Odmowa dostępu do odczytu pliku!', + 'File write access denied!' => 'Odmowa dostępu do zapisu pliku!', + 'Hostname' => 'Nazwa Hosta', + 'Link for view only access' => 'Odnośnik z dostępem tylko do odczytu', + 'Link with enabled write access' => 'Odnośnik z dostępem do zapisu', + 'Open the new document in the next step' => 'Otwórz nowy dokument w następnym kroku', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Możesz udostępnić ten dokument używając bezpośredniego odnośnika. Użytkownik nie musi posiadać konta na tej platformie.', + 'e.g. http://documentserver' => 'np. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/pt/base.php b/messages/pt/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/pt/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/pt_br/base.php b/messages/pt_br/base.php index ff7715b..7835edd 100644 --- a/messages/pt_br/base.php +++ b/messages/pt_br/base.php @@ -1,21 +1,50 @@ Create document' => 'Criar documento', - 'DocumentServer not accessible.' => 'Servidor de Documentos não acessível.', - 'DocumentServer not configured yet.' => 'Servidor de Documentos não configurado.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'Servidor de Documentos conectado com sucesso! - Versão instalada: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'Servidor de Documentos - OnlyOffice Módulo de Configuração', - 'Share document' => 'Compartilhar documento', - 'Close' => 'Fechar', - 'Copy to clipboard' => 'Copiar para área de transferência', - 'Could not find requested file!' => 'Não foi possível encontrar o arquivo solicitado!', - 'Could not find shared file!' => 'Não foi possível encontrar o arquivo compartilhado!', - 'File read access denied!' => 'Acesso de leitura ao arquivo negado!', - 'File write access denied!' => 'Acesso de escrita ao arquivo negado!', - 'Hostname' => 'Servidor', - 'Link for view only access' => 'Link para acesso apenas de visualização', - 'Link with enabled write access' => 'Link para acesso com permissão de escrita', - 'Open the new document in the next step' => 'Abrir o novo documento no próximo passo', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Você pode simplesmente compartilhar esse documento usando um link direto. O usuário não precisa de uma conta válida na plataforma.', - 'e.g. http://documentserver' => 'e.g. http://documentserver', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Criar documento', + 'DocumentServer not accessible.' => 'Servidor de Documentos não acessível.', + 'DocumentServer not configured yet.' => 'Servidor de Documentos não configurado.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'Servidor de Documentos conectado com sucesso! - Versão instalada: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'Servidor de Documentos - OnlyOffice Módulo de Configuração', + 'Share document' => 'Compartilhar documento', + 'Close' => 'Fechar', + 'Copy to clipboard' => 'Copiar para área de transferência', + 'Could not find requested file!' => 'Não foi possível encontrar o arquivo solicitado!', + 'Could not find shared file!' => 'Não foi possível encontrar o arquivo compartilhado!', + 'File read access denied!' => 'Acesso de leitura ao arquivo negado!', + 'File write access denied!' => 'Acesso de escrita ao arquivo negado!', + 'Hostname' => 'Servidor', + 'Link for view only access' => 'Link para acesso apenas de visualização', + 'Link with enabled write access' => 'Link para acesso com permissão de escrita', + 'Open the new document in the next step' => 'Abrir o novo documento no próximo passo', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => 'Você pode simplesmente compartilhar esse documento usando um link direto. O usuário não precisa de uma conta válida na plataforma.', + 'e.g. http://documentserver' => 'e.g. http://documentserver', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Share' => '', + 'View document' => '', +]; diff --git a/messages/ro/base.php b/messages/ro/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/ro/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/ru/base.php b/messages/ru/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/ru/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/sk/base.php b/messages/sk/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/sk/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/sl/base.php b/messages/sl/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/sl/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/sv/base.php b/messages/sv/base.php deleted file mode 100644 index 9b3c4e8..0000000 --- a/messages/sv/base.php +++ /dev/null @@ -1,21 +0,0 @@ -Create document' => 'Skapa dokument', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => 'Stäng', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -); diff --git a/messages/th/base.php b/messages/th/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/th/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/tr/base.php b/messages/tr/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/tr/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/uk/base.php b/messages/uk/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/uk/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/uz/base.php b/messages/uz/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/uz/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/vi/base.php b/messages/vi/base.php index f6ff1ba..13102a2 100644 --- a/messages/vi/base.php +++ b/messages/vi/base.php @@ -1,21 +1,50 @@ Create document' => 'Tạo tài liệu', - 'DocumentServer not accessible.' => 'Máy chủ tài liệu không thể truy cập.', - 'DocumentServer not configured yet.' => 'Máy chủ tài liệu chưa được cấu hình.', - 'DocumentServer successfully connected! - Installed version: {version}' => 'Máy chủ tài liệu kết nối thành công! - Phiên bản: {version}', - 'OnlyOffice - DocumentServer module configuration' => 'Cấu hình module OnlyOffice - DocumentServer', - 'Share document' => 'Chia sẻ tài liệu', - 'Close' => 'Đóng', - 'Copy to clipboard' => 'Copy vào clipboard', - 'Could not find requested file!' => 'Không thể tìm thấy file yêu cầu!', - 'Could not find shared file!' => 'Không thể tìm thấy file chia ser!', - 'File read access denied!' => 'Không có quyền đọc file!', - 'File write access denied!' => 'Không có quyền ghi file!', - 'Hostname' => 'Tên host', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -); +/** + * Message translations. + * + * This file is automatically generated by 'yii message/extract' command. + * It contains the localizable messages extracted from source code. + * You may modify this file by translating the extracted messages. + * + * Each array element represents the translation (value) of a message (key). + * If the value is empty, the message is considered as not translated. + * Messages that no longer need translation will have their translations + * enclosed between a pair of '@@' marks. + * + * Message string can be used with plural forms format. Check i18n section + * of the guide for details. + * + * NOTE: this file must be saved in UTF-8 encoding. + */ +return [ + 'Create document' => 'Tạo tài liệu', + 'DocumentServer not accessible.' => 'Máy chủ tài liệu không thể truy cập.', + 'DocumentServer not configured yet.' => 'Máy chủ tài liệu chưa được cấu hình.', + 'DocumentServer successfully connected! - Installed version: {version}' => 'Máy chủ tài liệu kết nối thành công! - Phiên bản: {version}', + 'OnlyOffice - DocumentServer module configuration' => 'Cấu hình module OnlyOffice - DocumentServer', + 'Share document' => 'Chia sẻ tài liệu', + 'Close' => 'Đóng', + 'Copy to clipboard' => 'Copy vào clipboard', + 'Could not find requested file!' => 'Không thể tìm thấy file yêu cầu!', + 'Could not find shared file!' => 'Không thể tìm thấy file chia ser!', + 'File read access denied!' => 'Không có quyền đọc file!', + 'File write access denied!' => 'Không có quyền ghi file!', + 'Hostname' => 'Tên host', + 'Convert document' => '', + 'DocumentServer invalid JWT token.' => '', + 'Convert document' => '', + 'Converting {oldFileName} to {newFileName}..' => '', + 'Create document (Text, Spreadsheet, Presentation)' => '', + 'Done!' => '', + 'Edit document' => '', + 'Error:' => '', + 'JWT Secret' => '', + 'JWT Secret key (leave blank to disable)' => '', + 'Link for view only access' => '', + 'Link with enabled write access' => '', + 'Open the new document in the next step' => '', + 'Share' => '', + 'View document' => '', + 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', + 'e.g. http://documentserver' => '', +]; diff --git a/messages/zh_cn/base.php b/messages/zh_cn/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/zh_cn/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/messages/zh_tw/base.php b/messages/zh_tw/base.php deleted file mode 100644 index 851d844..0000000 --- a/messages/zh_tw/base.php +++ /dev/null @@ -1,38 +0,0 @@ -Create document' => '', - 'DocumentServer not accessible.' => '', - 'DocumentServer not configured yet.' => '', - 'DocumentServer successfully connected! - Installed version: {version}' => '', - 'OnlyOffice - DocumentServer module configuration' => '', - 'Share document' => '', - 'Close' => '', - 'Copy to clipboard' => '', - 'Could not find requested file!' => '', - 'Could not find shared file!' => '', - 'File read access denied!' => '', - 'File write access denied!' => '', - 'Hostname' => '', - 'Link for view only access' => '', - 'Link with enabled write access' => '', - 'Open the new document in the next step' => '', - 'You can simply share this document using a direct link. The user does not need an valid user account on the platform.' => '', - 'e.g. http://documentserver' => '', -]; diff --git a/views/create/index.php b/views/create/index.php index 03bf4a2..adb26c5 100644 --- a/views/create/index.php +++ b/views/create/index.php @@ -4,7 +4,7 @@ use yii\helpers\Url; $modal = \humhub\widgets\ModalDialog::begin([ - 'header' => Yii::t('SpaceModule.views_space_invite', 'Create document') + 'header' => Yii::t('OnlydocumentsModule.base', 'Create document') ]) ?>