Skip to content

Commit 990b865

Browse files
trofim24catbasilio
authored andcommitted
fix comments
1 parent 3be7b6b commit 990b865

File tree

10 files changed

+36
-36
lines changed

10 files changed

+36
-36
lines changed

sdkjs-plugins/content/ai/.dev/test-agent/codeDesktop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Available functions:\n";
203203

204204
function loadJSONSync(url) {
205205
const xhr = new XMLHttpRequest();
206-
xhr.open("GET", url, false); // false — делает запрос синхронным
206+
xhr.open("GET", url, false); // false - makes the request synchronous
207207
xhr.send(null);
208208

209209
if (xhr.status === 200) {

sdkjs-plugins/content/grammalecte/scripts/gramma.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ function checkInternetExplorer(){
364364
sTextForDisplay = temp;
365365
};
366366

367-
// tempMatches используются для выделения ошибок внутри textarea,
368-
// функция нужна для того, чтобы с одинаковым началом или концом не выделялись дважды
367+
// tempMatches are used to highlight errors inside textarea,
368+
// this function is needed to prevent highlighting twice for matches with the same start or end
369369
function delExternalMatches(aMatches) {
370370
for (var nItem1 = 0; nItem1 < aMatches.length - 1; nItem1++) {
371371
var bSkipped = false;

sdkjs-plugins/content/highlightcode/scripts/highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@
885885
$('#tab_replace_id').select2({
886886
minimumResultsForSearch: Infinity
887887
}).on('change', function(e) {
888-
// так как парсятся не все языки, то на редактировании изменения будут только у тех, что обрабатываются через библиотеки (при вставке в документ у всех)
888+
// since not all languages are parsed, on editing changes will only apply to those processed through libraries (on document insertion - to all)
889889
switch (e.currentTarget.value) {
890890
case "0":
891891
xml_formatter_settings.indentation = "\t";

sdkjs-plugins/content/languagetool/scripts/langTool.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ function checkInternetExplorer(){
362362
canAddText = false;
363363
changeLangInSelect(oResponse.language.name);
364364

365-
// чтобы сервис различал параграфы необходимо разделять их двумя "\n" во время отправки,
366-
// поэтому после получения ответа нужно поправить позиции, чтобы в исходном тексте верно делать исправления
365+
// for the service to distinguish paragraphs, they need to be separated by two "\n" when sending,
366+
// so after receiving the response we need to correct positions to make corrections in the source text correctly
367367
correctMistakesPosition(matches);
368368

369369
sTextForDisplay = txt;

sdkjs-plugins/content/speechrecognition/scripts/code.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@
154154
});
155155

156156
let oMatchOption = undefined;
157-
// ищем по полному совпадению
157+
// search for exact match
158158
oMatchOption = aOptions.find(function(item) {
159159
if (item.value == documentLang)
160160
return true;
161161
});
162-
// ищем на совпадению по осносному языку
162+
// search for match by base language
163163
if (!oMatchOption) {
164164
oMatchOption = aOptions.find(function(item) {
165165
if (item.value.search(documentLang.split('-')[0]) != -1)

sdkjs-plugins/content/zotero/src/app/index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ import "../styles.css";
5050
var displayNoneClass = "hidden";
5151
var blurClass = "blur";
5252

53-
// TODO добавить ещё обработку событий (удаление линков) их не нужно удалять
54-
// из библиографии автоматически (это делать только при обновлении библиографии
55-
// или refresh), но их точно нужно удалить из formatter!
56-
// TODO добавить ещё обработку события (изменения линков), предлать пользователю
57-
// обновить их или сохранить ручное форматирование (при ручном форматировании
58-
// не меняем внешний вид цитаты при refresh (да и вообще не меняем))
59-
// TODO сейчас всегда делаем полный refresh при каждом действии
60-
// (обновлении, вставке линков, вставке библиографии), потому что мы не знаем
61-
// что поменялось без событий (потом добавить ещё сравнение контента)
62-
// TODO ms меняет линки (если стиль с нумерацией settings._bNumFormat) делает их по порядку
63-
// как документе (для этого нужно знать где именно в документе мы вставляем цитату,
64-
// какая цитата сверху и снизу от текущего курсора)
53+
// TODO add event handling for link deletion - they should not be removed
54+
// from bibliography automatically (do this only when updating bibliography
55+
// or refresh), but they definitely need to be removed from formatter!
56+
// TODO add event handling for link changes, offer the user
57+
// to update them or keep manual formatting (with manual formatting
58+
// we don't change citation appearance on refresh (and don't change at all))
59+
// TODO currently we always do full refresh on every action
60+
// (update, link insertion, bibliography insertion), because we don't know
61+
// what changed without events (add content comparison later)
62+
// TODO ms changes links (if style with numbering settings._bNumFormat) makes them in order
63+
// as in document (for this we need to know where exactly in the document we insert citation,
64+
// which citation is above and below the current cursor)
6565

6666
/** @type {Router} */
6767
var router;
@@ -349,9 +349,9 @@ import "../styles.css";
349349
})
350350
.then(function (keys) {
351351
selectCitation.removeItems(keys);
352-
// TODO есть проблема, что в плагине мы индексы обновили, а вот в документе нет (по идее надо обновить и индексы в документе перед вставкой)
353-
// но тогда у нас уедет селект и новое поле вставится не там, поэтому пока обновлять приходится в конце
354-
// такая же проблем с вставкой библиографии (при обнолении индексов в плагине надо бы их обновлять и в документе тоже)
352+
// TODO there's a problem that we updated indexes in the plugin, but not in the document (ideally we should update indexes in document before insertion)
353+
// but then our selection will shift and new field will be inserted in wrong place, so for now we have to update at the end
354+
// same problem with bibliography insertion (when updating indexes in plugin we should also update them in document)
355355
return citationService.updateCslItems(true, false);
356356
})
357357
.catch(function (error) {

sdkjs-plugins/content/zotero/src/app/services/citation-doc-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ CitationDocService.prototype._removeSuperSubTagsWithPositions = function (
244244
* @returns {Promise<boolean>}
245245
*/
246246
CitationDocService.prototype.saveAsText = function () {
247-
// TODO потом добавить ещё форматы, пока только как текст
247+
// TODO add more formats later, for now only as text
248248
return this.getAddinZoteroFields().then(function (arrFields) {
249249
let count = arrFields.length;
250250
if (!count) {

store/plugin/scripts/code.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@
123123

124124
switch (data.type) {
125125
case 'getInstalled':
126-
// данное сообщение используется только при инициализации плагина и по умолчанию идёт парсинг и отрисовка плагинов из стора
127-
// добавлен флаг updateInstalled - в этом случае не загружаем плагины из стора повторно, работаем только с установленными
128-
126+
// this message is used only during plugin initialization, by default plugins from the store are parsed and rendered
127+
// added updateInstalled flag - in this case we don't load plugins from the store again, we only work with installed ones
128+
129129
window.Asc.plugin.executeMethod('GetInstalledPlugins', null, function(result) {
130130
postMessage({ type: 'InstalledPlugins', data: result, updateInstalled: data.updateInstalled } );
131131
});

store/scripts/code.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ window.addEventListener('message', function(message) {
228228
// sortPlugins(false, true, 'name');
229229
} else if (installed) {
230230
if (installed.obj.backup) {
231-
// нужно обновить список установленных плагинов, чтобы ссылки на ресурсы были правильными
231+
// need to update the list of installed plugins so that resource links are correct
232232
sendMessage({ type: 'getInstalled', updateInstalled: true }, '*');
233233
}
234234
else
@@ -290,7 +290,7 @@ window.addEventListener('message', function(message) {
290290
} else {
291291
installed.removed = true;
292292

293-
// нужно обновить список установленных плагинов, чтобы ссылки на ресурсы были правильными
293+
// need to update the list of installed plugins so that resource links are correct
294294
if (isLocal)
295295
sendMessage({ type: 'getInstalled', updateInstalled: true }, '*');
296296
}
@@ -708,7 +708,7 @@ function showListofPlugins(bAll, sortedArr) {
708708
$('.div_item').remove();
709709
let arr = (sortedArr ? sortedArr : (bAll ? allPlugins : installedPlugins));
710710

711-
// получаем список backup плагинов
711+
// get list of backup plugins
712712
if (!bAll && isLocal) {
713713
var _pluginsTmp = JSON.parse(window["AscDesktopEditor"]["GetBackupPlugins"]());
714714

@@ -975,9 +975,9 @@ function onClickRemove(target, event) {
975975
};
976976

977977
function needBackupPlugin(guid) {
978-
// проверяем установленный плагин:
979-
// если плагин есть в стор ( и его версия <= ? ), то можем удалить, пользователь сможет поставить актуальную версию
980-
// если плагина нет в стор, нужно его хранить у пользователя с возможностью восстановления
978+
// check installed plugin:
979+
// if the plugin exists in the store (and its version <= ?), we can delete it, user will be able to install the current version
980+
// if the plugin is not in the store, we need to keep it for the user with the ability to restore
981981

982982
return isLocal ? findPlugin(true, guid) == undefined : false;
983983
}
@@ -1629,7 +1629,7 @@ function installPluginManually() {
16291629

16301630
let result = window["AscDesktopEditor"]["PluginInstall"](file);
16311631
if (result) {
1632-
// нужно обновить список установленных плагинов
1632+
// need to update the list of installed plugins
16331633
sendMessage({ type: 'getInstalled', updateInstalled: true }, '*');
16341634
} else {
16351635
createError(new Error('Problem with plugin installation.'), false);

store/scripts/polyfill.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)