cleanandvalidate/Redaction/Translations.xba

91 lines
4 KiB
Text
Raw Normal View History

2020-04-23 14:15:18 +02:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Translations" script:language="StarBasic" script:moduleType="normal">
Function getTranslation(lang As String, identifier As String) As String
Select Case lang
Case &quot;ru&quot;
getTranslation = getRussian(identifier)
Exit Function
Case Else
getTranslation = getEnglish(identifier)
Exit Function
End Select
End Function
Function getRussian(identifier As String) As String
Select Case identifier
Case &quot;noFileWithStylesFound&quot;
getRussian = &quot;Файл-шаблон, содержащий стили для загрузки в документ не был задан. &quot; &amp; chr(10) &amp;&quot;Вы можете выбрать новый файл-шаблон. &quot; &amp; chr(10) &amp; &quot;Если файл-шаблон не будет выбран, то данный этап чистки будет пропущен.&quot;
Exit Function
Case &quot;startQuietCleaningDescription&quot;
getRussian = &quot;Вы хотите запустить чистку документа? &quot; &amp; chr(10) &amp; &quot;Здесь Вы можете также указать новый файл-шаблон.&quot; &amp; chr(10) &amp; &quot;Стили из шаблона будут загружены в документ.&quot;
Exit Function
Case &quot;buttonOk&quot;
getRussian = &quot;Да&quot;
Exit Function
2020-04-23 14:33:18 +02:00
Case &quot;quietStartCleaningTitle&quot;
getRussian = &quot;Подтверждение запуска чистки&quot;
Exit Function
Case &quot;noStylesFileDialogTitle&quot;
getRussian = &quot;Файл со стилями не найден&quot;
Exit Function
Case &quot;buttonTemplateNotFoundSkip&quot;
getRussian = &quot;Продолжить&quot;
Exit Function
2020-04-23 14:15:18 +02:00
Case &quot;buttonStop&quot;
getRussian = &quot;Нет&quot;
Exit Function
Case &quot;buttonLoad&quot;
getRussian = &quot;Указать шаблон&quot;
Exit Function
Case &quot;buttonNameToSelectFileWithStyles&quot;
getRussian = &quot;Указать файл&quot;
Exit Function
2020-04-23 14:55:56 +02:00
Case &quot;cleaningFinished&quot;
getRussian = &quot;Чистка завершена&quot;
Exit Function
2020-04-23 14:15:18 +02:00
Case Else
getRussian = getEnglish(identifier)
End Select
End Function
Function getEnglish(identifier As String) As String
Select Case identifier
Case &quot;noFileWithStylesFound&quot;
2020-04-23 14:55:56 +02:00
getEnglish = &quot;Template with styles wasn&apos;t found. You can choose template on your computer.&quot; &amp; chr(10) &amp;&quot; This stage of cleaning will be skipped if no file chosen.&quot;
2020-04-23 14:15:18 +02:00
Exit Function
Case &quot;startQuietCleaningDescription&quot;
2020-04-23 14:55:56 +02:00
getEnglish = &quot;Do you want to start document cleaning?&quot; &amp; chr(10) &amp; &quot;You can choose template with styles.&quot; &amp; chr(10) &amp; &quot;Styles will be loaded in process of cleaning.&quot;
2020-04-23 14:15:18 +02:00
Exit Function
2020-04-23 14:33:18 +02:00
Case &quot;noStylesFileDialogTitle&quot;
getEnglish = &quot;Template file not found&quot;
Exit Function
Case &quot;quietStartCleaningTitle&quot;
getEnglish = &quot;Confirmation&quot;
Exit Function
Case &quot;buttonTemplateNotFoundSkip&quot;
getRussian = &quot;Proceed&quot;
Exit Function
2020-04-23 14:15:18 +02:00
Case &quot;buttonOk&quot;
getEnglish = &quot;Ok&quot;
Exit Function
Case &quot;buttonStop&quot;
getEnglish = &quot;Cancel&quot;
Exit Function
Case &quot;buttonLoad&quot;
getEnglish = &quot;Set template&quot;
Exit Function
Case &quot;buttonNameToSelectFileWithStyles&quot;
getEnglish = &quot;Select file&quot;
Exit Function
2020-04-23 14:55:56 +02:00
Case &quot;cleaningFinished&quot;
getEnglish = &quot;Cleaning is completed&quot;
Exit Function
2020-04-23 14:15:18 +02:00
Case Else
getEnglish = &quot;No translation&quot;
End Select
End Function
</script:module>