1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-13 11:50:53 +02:00

Переводы разделов

This commit is contained in:
Anton Titovets 2024-06-07 13:38:35 +03:00
parent 0a1b012d31
commit 8886e8c938
63 changed files with 277 additions and 252 deletions

View File

@ -17,6 +17,7 @@
Перем Словарь;
Перем Транслитация;
Перем СчетчикБиблиотеки;
Перем СоответствиеЗаголовков;
Процедура ПриСозданииОбъекта()
@ -33,6 +34,8 @@
ТекущаяОбласть = "";
СчетчикОбласти = 0;
СоответствиеЗаголовков = Новый Соответствие();
ЧтениеJSON = Новый ЧтениеJSON();
ЧтениеJSON.ОткрытьФайл(ПутьКСловарю);
Словарь = ПрочитатьJSON(ЧтениеJSON, Истина);
@ -96,6 +99,8 @@
СинонимОбласти = СтрЗаменить(ТранслитированнаяОбласть, "-", " ");
ЗаголовокОбласти = Синонимайзер(Область);
СоответствиеЗаголовков.Вставить(ЗаголовокОбласти, СинонимОбласти);
ИмяМодуляБезПрефикса = СтрЗаменить(СтруктураМетода["ИмяМодуля"], "OPI_", "");
@ -703,29 +708,51 @@
Продолжить;
КонецЕсли;
ТекущийДокумент = Новый ТекстовыйДокумент();
ТекущийДокумент.Прочитать(Файл.ПолноеИмя, "UTF-8");
ТекстДокумента = ТекущийДокумент.ПолучитьТекст();
Если Файл.Имя = "_category_.json" Тогда
Для Каждого Слово Из ТаблицаСловаря Цикл
ТекстДокумента = СтрЗаменить(ТекстДокумента, Слово.Ключ, Слово.Значение);
КонецЦикла;
ФайлКатегории = Файл.ПолноеИмя;
ЧтениеJSON = Новый ЧтениеJSON();
ЧтениеJSON.ОткрытьФайл(ФайлКатегории);
СтруктураКатегории = ПрочитатьJSON(ЧтениеJSON, Истина);
ЧтениеJSON.Закрыть();
Пока СтрНайти(ТекстДокумента, " ") <> 0 Цикл
ТекстДокумента = СтрЗаменить(ТекстДокумента, " ", " ");
КонецЦикла;
СтруктураКатегории.Вставить("label", СоответствиеЗаголовков[СтруктураКатегории["label"]]);
Запись = Новый ЗаписьJSON;
ПараметрыЗаписиJSON = Новый ПараметрыЗаписиJSON(ПереносСтрокJSON.Авто);
Запись.ОткрытьФайл(ФайлКатегории, , , ПараметрыЗаписиJSON);
ЗаписатьJSON(Запись, СтруктураКатегории);
Запись.Закрыть();
ТекстДокумента = СтрЗаменить(ТекстДокумента, " ,", ",");
Иначе
ТекущийДокумент = Новый ТекстовыйДокумент();
ТекущийДокумент.Прочитать(Файл.ПолноеИмя, "UTF-8");
ТекстДокумента = ТекущийДокумент.ПолучитьТекст();
Для Каждого Слово Из ТаблицаСловаря Цикл
ТекстДокумента = СтрЗаменить(ТекстДокумента, Слово.Ключ, Слово.Значение);
КонецЦикла;
Пока СтрНайти(ТекстДокумента, " ") <> 0 Цикл
ТекстДокумента = СтрЗаменить(ТекстДокумента, " ", " ");
КонецЦикла;
ТекстДокумента = СтрЗаменить(ТекстДокумента, " ,", ",");
ТекущийДокумент.УстановитьТекст(ТекстДокумента);
ТекущийДокумент.Записать(Файл.ПолноеИмя);
КонецЕсли;
Для Каждого Буква Из Транслитация Цикл
Если СтрНайти(ТекстДокумента, Буква.Ключ) <> 0 Тогда
Сообщить("Ошибка перевода | " + Файл.ПолноеИмя);
Прервать;
КонецЕсли;
КонецЦикла;
ТекущийДокумент.УстановитьТекст(ТекстДокумента);
ТекущийДокумент.Записать(Файл.ПолноеИмя);
Для Каждого Буква Из Транслитация Цикл
Если СтрНайти(ТекстДокумента, Буква.Ключ) <> 0 Тогда
Сообщить("Ошибка перевода | " + Файл.ПолноеИмя);
Прервать;
КонецЕсли;
КонецЦикла;
КонецЦикла;

View File

@ -1,4 +1,4 @@
{
"label": "Work with toомментарandямand",
{
"label": "Comment management",
"position": "6"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with базамand",
{
"label": "Database work",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with fieldsмand",
{
"label": "Field work",
"position": "4"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with запandwithямand",
{
"label": "Record management",
"position": "5"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with таблandцамand",
{
"label": "Table management",
"position": "3"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Airtable",
"position": 11,
"link": {
"type": "doc",
"id": "Airtable"
}
{
"label": null,
"position": 11,
"link": {
"type": "doc",
"id": "Airtable"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Account and аinторfromацandя",
{
"label": "Account and authorization",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with fileмand and directoryмand",
{
"label": "File and directory management",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Nаwithтройtoand withinмеwithтного доwithтупа",
{
"label": "Shared access settings",
"position": "5"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with тегамand",
{
"label": "Tag work",
"position": "4"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Dropbox (pre-release)",
"position": 12,
"link": {
"type": "doc",
"id": "Dropbox"
}
{
"label": null,
"position": 12,
"link": {
"type": "doc",
"id": "Dropbox"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with withпandwithtoом toалендарей",
{
"label": "Calendar list management",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with метаданнымand toалендарей",
{
"label": "Calendar metadata management",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with eventsмand",
{
"label": "Event management",
"position": "4"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Google Calendar",
"position": 7,
"link": {
"type": "doc",
"id": "GoogleCalendar"
}
{
"label": null,
"position": 7,
"link": {
"type": "doc",
"id": "GoogleCalendar"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with toомментарandямand",
{
"label": "Comment management",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with fileмand and directoryмand",
{
"label": "File and directory management",
"position": "2"
}
}

View File

@ -1,10 +1,8 @@

{
"label": "Google Drive",
"position": 8,
"link": {
"type": "doc",
"id": "GoogleDrive"
}
"label": null,
"position": 8,
"link": {
"type": "doc",
"id": "GoogleDrive"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with toнandгамand",
{
"label": "Book work",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with даннымand",
{
"label": "Data work",
"position": "4"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with лandwithтамand",
{
"label": "Sheet work",
"position": "3"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Google Sheets",
"position": 9,
"link": {
"type": "doc",
"id": "GoogleSheets"
}
{
"label": null,
"position": 9,
"link": {
"type": "doc",
"id": "GoogleSheets"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with блоtoамand",
{
"label": "Blocks managment",
"position": "4"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with базамand data",
{
"label": "Database management",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with withтранandцамand",
{
"label": "Page management",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
{
"label": "Users",
"position": "5"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Notion",
"position": 6,
"link": {
"type": "doc",
"id": "Notion"
}
{
"label": null,
"position": 6,
"link": {
"type": "doc",
"id": "Notion"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Формandроinанandе блоtoоin",
{
"label": "Block formation",
"position": "8"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with toаtoламand",
{
"label": "Channel management",
"position": "4"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with удаленнымand fileмand",
{
"label": "Deleted files management",
"position": "7"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with дandалогамand",
{
"label": "Dialog management",
"position": "5"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with fileмand",
{
"label": "File work",
"position": "6"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Упраinленandе and towithтройtoand",
{
"label": "Management and settings",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with withобщенandямand",
{
"label": "Message management",
"position": "3"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Slack",
"position": 9,
"link": {
"type": "doc",
"id": "Slack"
}
{
"label": null,
"position": 9,
"link": {
"type": "doc",
"id": "Slack"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Getting started",
"position": 1,
"link": {
"type": "doc",
"id": "Start"
}
{
"label": null,
"position": 1,
"link": {
"type": "doc",
"id": "Start"
}
}

View File

@ -1,4 +1,4 @@
{
{
"label": "Administration",
"position": "4"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Obtaining data and towithтройtoа",
{
"label": "Data retrieval and settings",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Sending data",
{
"label": "Data sending",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with темамand форума",
{
"label": "Forum topic management",
"position": "5"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Telegram",
"position": 2,
"link": {
"type": "doc",
"id": "Telegram"
}
{
"label": null,
"position": 2,
"link": {
"type": "doc",
"id": "Telegram"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Data and towithтройtoа",
{
"label": "Data and settings",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
{
"label": "Tweets",
"position": "3"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Twitter",
"position": 4,
"link": {
"type": "doc",
"id": "Twitter"
}
{
"label": null,
"position": 4,
"link": {
"type": "doc",
"id": "Twitter"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with реtoламным toабandнетом",
{
"label": "Ad account management",
"position": "7"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with обwithужденandямand",
{
"label": "Discussion management",
"position": "4"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with группой",
{
"label": "Group work",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Andнтераtoтandinные дейwithтinandя",
{
"label": "Interactive actions",
"position": "5"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with заtoазамand",
{
"label": "Order management",
"position": "11"
}
}

View File

@ -1,4 +1,4 @@
{
{
"label": "Others",
"position": "12"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with productмand",
{
"label": "Product management",
"position": "8"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with propertiesамand тоinароin",
{
"label": "Product properties management",
"position": "10"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with подборtoамand тоinароin",
{
"label": "Product selection management",
"position": "9"
}
}

View File

@ -1,4 +1,4 @@
{
{
"label": "Statistics",
"position": "6"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Obtaining тоtoеto",
{
"label": "Token retrieval",
"position": "2"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "VK",
"position": 3,
"link": {
"type": "doc",
"id": "VK"
}
{
"label": null,
"position": 3,
"link": {
"type": "doc",
"id": "VK"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Sending withобщенandй",
{
"label": "Message sending",
"position": "3"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Nаwithтройtoand and andнформацandя",
{
"label": "Settings and information",
"position": "2"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Viber",
"position": 3,
"link": {
"type": "doc",
"id": "Viber"
}
{
"label": null,
"position": 3,
"link": {
"type": "doc",
"id": "Viber"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Work with fileмand and папtoамand",
{
"label": "File and folder management",
"position": "2"
}
}

View File

@ -1,4 +1,4 @@
{
"label": "Упраinленandе публandчным доwithтупом",
{
"label": "Manage public access",
"position": "3"
}
}

View File

@ -1,8 +1,8 @@
{
"label": "Yandex Disk",
"position": 13,
"link": {
"type": "doc",
"id": "YandexDisk"
}
{
"label": null,
"position": 13,
"link": {
"type": "doc",
"id": "YandexDisk"
}
}