epublishing/ePublishing/Translations.xba

105 lines
4.3 KiB
Text
Raw Normal View History

2020-05-05 14:01:41 +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(identifier As String) As String
Globalscope.BasicLibraries.LoadLibrary( &quot;Tools&quot; )
Dim lang As String
lang = GetStarOfficeLocale().Language
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;buttonOk&quot;
getRussian = &quot;Применить&quot;
Exit Function
Case &quot;buttonCancel&quot;
getRussian = &quot;Отмена&quot;
Exit Function
Case &quot;configText1&quot;
getRussian = &quot;Введите в поле число от 0 до 10&quot;
Exit Function
Case &quot;configText2&quot;
getRussian = &quot;0 - возврат к автоматической нумерации&quot;
Exit Function
Case &quot;configText3&quot;
getRussian = &quot;Начать нумерацию сноско заново&quot;
Exit Function
Case &quot;configText4&quot;
getRussian = &quot;после заголовков&quot;
Exit Function
Case &quot;configText5&quot;
getRussian = &quot;уровня&quot;
Exit Function
Case &quot;footnotesConfigDialogTitle&quot;
getRussian = &quot;Применение нумерации сносок&quot;
Exit Function
Case &quot;statusNumberingInProcess&quot;
getRussian = &quot;Производится нумерация сносок&quot;
Exit Function
Case &quot;numberingInputOutOfRange&quot;
getRussian = &quot;Введенное число вне допустимого диапазона. Введите число от 0 до 10.&quot;
Exit Function
Case &quot;statusNumberingFinished&quot;
getRussian = &quot;Нумерация сносок успешно завершена.&quot;
Exit Function
Case &quot;replaceParaStyleDialogTitle&quot;
getRussian = &quot;Заменить стиль параграфа (с удалением) на выбранный стиль&quot;
Exit Function
Case Else
getRussian = &quot;Перевод не найден&quot;
End Select
End Function
Function getEnglish(identifier As String) As String
Select Case identifier
Case &quot;buttonOk&quot;
getEnglish = &quot;Apply&quot;
Exit Function
Case &quot;buttonCancel&quot;
getEnglish = &quot;Cancel&quot;
Exit Function
Case &quot;configText1&quot;
getEnglish = &quot;Insert 0 to 10 number in the field below&quot;
Exit Function
Case &quot;configText2&quot;
getEnglish = &quot;0 return to automatic numbering &quot;
Exit Function
Case &quot;configText3&quot;
getEnglish = &quot;Restart footnote numbering&quot;
Exit Function
Case &quot;configText4&quot;
getEnglish = &quot;after heading with&quot;
Exit Function
Case &quot;configText5&quot;
getEnglish = &quot;level&quot;
Exit Function
Case &quot;footnotesConfigDialogTitle&quot;
getEnglish = &quot;Apply footnotes numbering&quot;
Exit Function
Case &quot;statusNumberingInProcess&quot;
getEnglish = &quot;Numbering in process&quot;
Exit Function
Case &quot;numberingInputOutOfRange&quot;
getEnglish = &quot;Input is out of range. Insert number from 0 to 10.&quot;
Exit Function
Case &quot;statusNumberingFinished&quot;
getEnglish = &quot;Footnotes numbering finished successfully.&quot;
Exit Function
Case &quot;replaceParaStyleDialogTitle&quot;
getEnglish = &quot;Replace paragraph style (with removal) by choosen one&quot;
Exit Function
Case Else
getEnglish = &quot;No translation&quot;
End Select
End Function
</script:module>