From 49705d0699f8c28a5482135cfcaed728f0ed8881 Mon Sep 17 00:00:00 2001 From: rivexe Date: Fri, 31 Jan 2025 11:53:49 +0300 Subject: [PATCH 1/2] feat: insert-text in onRequestSelectDocument support --- src/editor.js | 8 +++++++- src/listener.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/editor.js b/src/editor.js index c2b5d33e..7ee72d78 100644 --- a/src/editor.js +++ b/src/editor.js @@ -491,8 +491,14 @@ case 'combine': title = t(OCA.Onlyoffice.AppName, 'Select file to combine') break - default: + case 'compare': title = t(OCA.Onlyoffice.AppName, 'Select file to compare') + break + case 'insert-text': + title = t(OCA.Onlyoffice.AppName, 'Select file to insert text') + break + default: + title = t(OCA.Onlyoffice.AppName, 'Select file') } OC.dialogs.filepicker(title, OCA.Onlyoffice.editorSetRequested.bind({ documentSelectionType: event.data.c }), diff --git a/src/listener.js b/src/listener.js index 4357f6e9..dc7084a7 100644 --- a/src/listener.js +++ b/src/listener.js @@ -89,8 +89,14 @@ case 'combine': title = t(OCA.Onlyoffice.AppName, 'Select file to combine') break - default: + case 'compare': title = t(OCA.Onlyoffice.AppName, 'Select file to compare') + break + case 'insert-text': + title = t(OCA.Onlyoffice.AppName, 'Select file to insert text') + break + default: + title = t(OCA.Onlyoffice.AppName, 'Select file') } OC.dialogs.filepicker(title, $(OCA.Onlyoffice.frameSelector)[0].contentWindow.OCA.Onlyoffice.editorSetRequested.bind({ documentSelectionType }), From e924683dc1a0b3a38681e2e320965e37034ea7b9 Mon Sep 17 00:00:00 2001 From: rivexe Date: Fri, 31 Jan 2025 11:54:19 +0300 Subject: [PATCH 2/2] feat: langs added --- l10n/ru.js | 4 +++- l10n/ru.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/l10n/ru.js b/l10n/ru.js index 3260d166..87ae7e5c 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -151,6 +151,8 @@ OC.L10N.register( "Open file" : "Открыть документ", "ONLYOFFICE Document Server is unavailable" : "Сервер документов ONLYOFFICE недоступен", "This is a mail message to notify that the connection with the ONLYOFFICE Document Server has been lost. Please check the connection settings:" : "Это почтовое сообщение, уведомляющее о том, что соединение с сервером документов ONLYOFFICE потеряно. Пожалуйста, проверьте настройки подключения:", - "Go to Settings" : "Перейти в настройки" + "Go to Settings" : "Перейти в настройки", + "Select file to insert text" : "Выбрать файл для вставки текста", + "Select file" : "Выбрать файл" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/l10n/ru.json b/l10n/ru.json index 664001fa..75d229ad 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -149,6 +149,8 @@ "Open file" : "Открыть документ", "ONLYOFFICE Document Server is unavailable" : "Сервер документов ONLYOFFICE недоступен", "This is a mail message to notify that the connection with the ONLYOFFICE Document Server has been lost. Please check the connection settings:" : "Это почтовое сообщение, уведомляющее о том, что соединение с сервером документов ONLYOFFICE потеряно. Пожалуйста, проверьте настройки подключения:", - "Go to Settings" : "Перейти в настройки" + "Go to Settings" : "Перейти в настройки", + "Select file to insert text" : "Выбрать файл для вставки текста", + "Select file" : "Выбрать файл" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" } \ No newline at end of file