More translation fixes

This commit is contained in:
Georgy Litvinov 2020-05-04 15:02:31 +02:00
parent a4ca08b952
commit c8634a88fe
3 changed files with 117 additions and 28 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark48 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark49
End Sub End Sub
@ -53,57 +53,58 @@ Private Sub cleanAccordingTo(dialog As Object)
statusIndicator = ThisComponent.getCurrentController.statusIndicator statusIndicator = ThisComponent.getCurrentController.statusIndicator
dialog.setVisible(false) dialog.setVisible(false)
saveDocument saveDocument
statusIndicator.Start(&quot;Чистка документа начата, подождите&quot;,100) statusIndicator.Start(getTranslation(&quot;statusStarted&quot;),100)
doNotTrack doNotTrack
If dialog.getControl(&quot;fontsInStyles&quot;).state = 1 Then If dialog.getControl(&quot;fontsInStyles&quot;).state = 1 Then
statusIndicator.Start(&quot;Заменяем шрифты в стилях&quot;,100) statusIndicator.Start(getTranslation(&quot;statusReplaceFontsInStyles&quot;),100)
replaceStyleFonts replaceStyleFonts
EndIf EndIf
If dialog.getControl(&quot;symbolsConversion&quot;).state = 1 Then If dialog.getControl(&quot;symbolsConversion&quot;).state = 1 Then
statusIndicator.Start(&quot;Конвертируем символы в целевые шрифты&quot;,100) statusIndicator.Start(getTranslation(&quot;statusConvertSymbolsInTargetFonts&quot;),100)
unicodeSymbolsConversion unicodeSymbolsConversion
EndIf EndIf
If dialog.getControl(&quot;cleanFormatting&quot;).state = 1 Then If dialog.getControl(&quot;cleanFormatting&quot;).state = 1 Then
statusIndicator.Start(&quot;Чистим ручное форматирование&quot;,100) statusIndicator.Start(getTranslation(&quot;statusCleaningManualFormatting&quot;),100)
cleanFormatting cleanFormatting
EndIf EndIf
If dialog.getControl(&quot;replaceWhiteBackground&quot;).state = 1 Then If dialog.getControl(&quot;replaceWhiteBackground&quot;).state = 1 Then
statusIndicator.Start(&quot;Заменяем белый фон на прозрачный&quot;,100) statusIndicator.Start(getTranslation(&quot;statusReplaceWhiteBackground&quot;),100)
replaceWhiteBackgroundWithTransparent replaceWhiteBackgroundWithTransparent
EndIf EndIf
If dialog.getControl(&quot;removeUnusedStyles&quot;).state = 1 Then If dialog.getControl(&quot;removeUnusedStyles&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;statusRemovedUnusedStyles&quot;),100)
removeUnusedStyles removeUnusedStyles
EndIf EndIf
If dialog.getControl(&quot;removeLinks&quot;).state = 1 Then If dialog.getControl(&quot;removeLinks&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем гиперссылки&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemoveLinks&quot;),100)
removeHyperlinks removeHyperlinks
EndIf EndIf
If dialog.getControl(&quot;removeBookmarks&quot;).state = 1 Then If dialog.getControl(&quot;removeBookmarks&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем закладки&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemoveBookmarks&quot;),100)
disposeAllBookmarks disposeAllBookmarks
EndIf EndIf
If dialog.getControl(&quot;configTables&quot;).state = 1 Then If dialog.getControl(&quot;configTables&quot;).state = 1 Then
statusIndicator.Start(&quot;Настраиваем таблицы&quot;,100) statusIndicator.Start(getTranslation(&quot;statusConfigureTables&quot;),100)
fixTableWidth fixTableWidth
EndIf EndIf
If dialog.getControl(&quot;configAnchors&quot;).state = 1 Then If dialog.getControl(&quot;configAnchors&quot;).state = 1 Then
statusIndicator.Start(&quot;Настраиваем привязку изображений&quot;,100) statusIndicator.Start(getTranslation(&quot;statusConfigureImagesAnchors&quot;),100)
fixDrawingAnchors fixDrawingAnchors
EndIf EndIf
If dialog.getControl(&quot;fixMistakes&quot;).state = 1 Then If dialog.getControl(&quot;fixMistakes&quot;).state = 1 Then
statusIndicator.Start(&quot;Исправляем часто встречающиеся ошибки&quot;,100) statusIndicator.Start(getTranslation(&quot;statusFixFrequentMistakes&quot;),100)
fixFrequentMistakes fixFrequentMistakes
EndIf EndIf
If dialog.getControl(&quot;removeInitPageBreak&quot;).state = 1 Then If dialog.getControl(&quot;removeInitPageBreak&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем разрыв страницы, если он задан в начале документа&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemovePageBreakAtStart&quot;),100)
removeFirstElementPageBreak removeFirstElementPageBreak
EndIf EndIf
If dialog.getControl(&quot;removePageStyles&quot;).state = 1 Then If dialog.getControl(&quot;removePageStyles&quot;).state = 1 Then
statusIndicator.Start(&quot;Удаляем пользовательские стили страниц&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemoveCustomPageStyles&quot;),100)
removeUserPageStyles removeUserPageStyles
EndIf EndIf
If dialog.getControl(&quot;loadStandardStyles&quot;).state = 1 Then If dialog.getControl(&quot;loadStandardStyles&quot;).state = 1 Then
statusIndicator.Start(&quot;Загружаем стили из шаблона&quot;,100) statusIndicator.Start(getTranslation(&quot;statusLoadingStylesFromTemplate&quot;),100)
loadArticleStyles loadArticleStyles
EndIf EndIf
If dialog.getControl(&quot;removeManualPageBreaks&quot;).state = 1 Then If dialog.getControl(&quot;removeManualPageBreaks&quot;).state = 1 Then
@ -137,30 +138,33 @@ Private Sub quietCleaning
Dim statusIndicator As Object Dim statusIndicator As Object
statusIndicator = ThisComponent.getCurrentController.statusIndicator statusIndicator = ThisComponent.getCurrentController.statusIndicator
saveDocument saveDocument
statusIndicator.Start(&quot;Чистка документа начата, подождите&quot;,100) statusIndicator.Start(getTranslation(&quot;statusStarted&quot;),100)
doNotTrack doNotTrack
statusIndicator.Start(&quot;Заменяем шрифты в стилях&quot;,100) statusIndicator.Start(getTranslation(&quot;statusReplaceFontsInStyles&quot;),100)
replaceStyleFonts replaceStyleFonts
statusIndicator.Start(&quot;Конвертируем символы в целевые шрифты&quot;,100) statusIndicator.Start(getTranslation(&quot;statusConvertSymbolsInTargetFonts&quot;),100)
unicodeSymbolsConversion unicodeSymbolsConversion
statusIndicator.Start(&quot;Чистим ручное форматирование&quot;,100) statusIndicator.Start(getTranslation(&quot;statusCleaningManualFormatting&quot;),100)
cleanFormatting cleanFormatting
statusIndicator.Start(getTranslation(&quot;statusReplaceWhiteBackground&quot;),100)
replaceWhiteBackgroundWithTransparent
statusIndicator.Start(getTranslation(&quot;statusRemovedUnusedStyles&quot;),100)
removeUnusedStyles removeUnusedStyles
statusIndicator.Start(&quot;Удаляем гиперссылки&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemoveLinks&quot;),100)
removeHyperlinks removeHyperlinks
statusIndicator.Start(&quot;Удаляем закладки&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemoveBookmarks&quot;),100)
disposeAllBookmarks disposeAllBookmarks
statusIndicator.Start(&quot;Настраиваем таблицы&quot;,100) statusIndicator.Start(getTranslation(&quot;statusConfigureTables&quot;),100)
fixTableWidth fixTableWidth
statusIndicator.Start(&quot;Настраиваем привязку изображений&quot;,100) statusIndicator.Start(getTranslation(&quot;statusConfigureImagesAnchors&quot;),100)
fixDrawingAnchors fixDrawingAnchors
statusIndicator.Start(&quot;Исправляем часто встречающиеся ошибки&quot;,100) statusIndicator.Start(getTranslation(&quot;statusFixFrequentMistakes&quot;),100)
fixFrequentMistakes fixFrequentMistakes
statusIndicator.Start(&quot;Удаляем разрыв страницы, если он задан в начале документа&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemovePageBreakAtStart&quot;),100)
removeFirstElementPageBreak removeFirstElementPageBreak
statusIndicator.Start(&quot;Удаляем пользовательские стили страниц&quot;,100) statusIndicator.Start(getTranslation(&quot;statusRemoveCustomPageStyles&quot;),100)
removeUserPageStyles removeUserPageStyles
statusIndicator.Start(&quot;Загружаем стили из шаблона&quot;,100) statusIndicator.Start(getTranslation(&quot;statusLoadingStylesFromTemplate&quot;),100)
loadArticleStyles loadArticleStyles
removeLibs removeLibs
statusIndicator.end() statusIndicator.end()

View file

@ -96,11 +96,54 @@ Function getRussian(identifier As String) As String
getRussian = &quot;Очистить форматирование&quot; getRussian = &quot;Очистить форматирование&quot;
Exit Function Exit Function
Case &quot;advancedMenuSymbolsConversion&quot; Case &quot;advancedMenuSymbolsConversion&quot;
getRussian = &quot;Произвести конвертацию символов&quot; getRussian = &quot;Конвертировать символы в целевые свободные шрифты&quot;
Exit Function Exit Function
Case &quot;advancedMenuReplaceFontsInStyles&quot; Case &quot;advancedMenuReplaceFontsInStyles&quot;
getRussian = &quot;Заменить шрифты стилях&quot; getRussian = &quot;Заменить шрифты стилях&quot;
Exit Function Exit Function
Case &quot;statusStarted&quot;
getRussian = &quot;Чистка документа начата, подождите&quot;
Exit Function
Case &quot;statusReplaceFontsInStyles&quot;
getRussian = &quot;Заменяем шрифты в стилях&quot;
Exit Function
Case &quot;statusConvertSymbolsInTargetFonts&quot;
getRussian = &quot;Конвертируем символы в целевые шрифты&quot;
Exit Function
Case &quot;statusCleaningManualFormatting&quot;
getRussian = &quot;Чистим ручное форматирование&quot;
Exit Function
Case &quot;statusLoadingStylesFromTemplate&quot;
getRussian = &quot;Загружаем стили из шаблона&quot;
Exit Function
Case &quot;statusRemoveCustomPageStyles&quot;
getRussian = &quot;Удаляем пользовательские стили страниц&quot;
Exit Function
Case &quot;statusRemovePageBreakAtStart&quot;
getRussian = &quot;Удаляем разрыв страницы, если он задан в начале документа&quot;
Exit Function
Case &quot;statusFixFrequentMistakes&quot;
getRussian = &quot;Исправляем часто встречающиеся ошибки&quot;
Exit Function
Case &quot;statusConfigureImagesAnchors&quot;
getRussian = &quot;Настраиваем привязки изображений&quot;
Exit Function
Case &quot;statusConfigureTables&quot;
getRussian = &quot;Настраиваем таблицы&quot;
Exit Function
Case &quot;statusRemoveLinks&quot;
getRussian = &quot;Удаляем гиперссылки&quot;
Exit Function
Case &quot;statusRemoveBookmarks&quot;
getRussian = &quot;Удаляем закладки&quot;
Exit Function
Case &quot;statusReplaceWhiteBackground&quot;
getRussian = &quot;Замеяем белый фон символов на прозрачный&quot;
Exit Function
Case &quot;statusRemovedUnusedStyles&quot;
getRussian = &quot;Удаляем неиспользуемые стили&quot;
Exit Function
Case Else Case Else
getRussian = &quot;Перевод не найден&quot; getRussian = &quot;Перевод не найден&quot;
End Select End Select
@ -188,11 +231,53 @@ Function getEnglish(identifier As String) As String
getEnglish = &quot;Clean manual formatting&quot; getEnglish = &quot;Clean manual formatting&quot;
Exit Function Exit Function
Case &quot;advancedMenuSymbolsConversion&quot; Case &quot;advancedMenuSymbolsConversion&quot;
getEnglish = &quot;Convert symbols&quot; getEnglish = &quot;Convert symbols to target (free) fonts&quot;
Exit Function Exit Function
Case &quot;advancedMenuReplaceFontsInStyles&quot; Case &quot;advancedMenuReplaceFontsInStyles&quot;
getEnglish = &quot;Replace fonts in styles&quot; getEnglish = &quot;Replace fonts in styles&quot;
Exit Function Exit Function
Case &quot;statusStarted&quot;
getEnglish = &quot;Cleaning started&quot;
Exit Function
Case &quot;statusReplaceFontsInStyles&quot;
getEnglish = &quot;Replacing fonts in styles&quot;
Exit Function
Case &quot;statusConvertSymbolsInTargetFonts&quot;
getEnglish = &quot;Converting symbols to target (free) fonts&quot;
Exit Function
Case &quot;statusCleaningManualFormatting&quot;
getEnglish = &quot;Cleaning manual formatting&quot;
Exit Function
Case &quot;statusLoadingStylesFromTemplate&quot;
getEnglish = &quot;Loading styles from template&quot;
Exit Function
Case &quot;statusRemoveCustomPageStyles&quot;
getEnglish = &quot;Removing custom pages styles&quot;
Exit Function
Case &quot;statusRemovePageBreakAtStart&quot;
getEnglish = &quot;Removing page break at start of document&quot;
Exit Function
Case &quot;statusFixFrequentMistakes&quot;
getEnglish = &quot;Fixing frequent mistakes&quot;
Exit Function
Case &quot;statusConfigureImagesAnchors&quot;
getEnglish = &quot;Configuring image anchors&quot;
Exit Function
Case &quot;statusConfigureTables&quot;
getEnglish = &quot;Configuring tables&quot;
Exit Function
Case &quot;statusRemoveLinks&quot;
getEnglish = &quot;Removing links&quot;
Exit Function
Case &quot;statusRemoveBookmarks&quot;
getEnglish = &quot;Removing bookmarks&quot;
Exit Function
Case &quot;statusReplaceWhiteBackground&quot;
getEnglish = &quot;Replacing white symbol back with transparent&quot;
Exit Function
Case &quot;statusRemovedUnusedStyles&quot;
getEnglish = &quot;Removing unused styles&quot;
Exit Function
Case Else Case Else
getEnglish = &quot;No translation&quot; getEnglish = &quot;No translation&quot;
End Select End Select

Binary file not shown.