Support for multiple transformations

This commit is contained in:
Simon Rozman 2017-04-03 12:36:14 +02:00
parent 57ceeadbe7
commit 2f6c789fdf
13 changed files with 1584 additions and 246 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2017-03-27 14:03+0200\n"
"POT-Creation-Date: 2017-04-03 12:01+0200\n"
"PO-Revision-Date: 2016-05-13 15:52+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
@ -22,7 +22,7 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU"
msgstr ""
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:892 zrcolagui.h:106
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:980 zrcolagui.h:106
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
@ -30,15 +30,15 @@ msgstr ""
msgid "ZRCola"
msgstr ""
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1022
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1110
msgid "Character"
msgstr ""
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1043
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1131
msgid "Context"
msgstr ""
#: zrcolachrreq.cpp:64 zrcolagui.h:365
#: zrcolachrreq.cpp:64 zrcolagui.h:379
msgid "Request a New Character"
msgstr ""
@ -55,15 +55,15 @@ msgstr ""
msgid "Invalid character in Unicode found: %c"
msgstr ""
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:395 zrcolachrslct.cpp:886
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
msgid "▸ Search Options"
msgstr ""
#: zrcolachrslct.cpp:333
#: zrcolachrslct.cpp:328
msgid ", "
msgstr ""
#: zrcolachrslct.cpp:398 zrcolachrslct.cpp:883
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
msgid "▾ Search Options"
msgstr ""
@ -79,11 +79,11 @@ msgstr ""
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
msgstr ""
#: zrcolafrm.cpp:371
#: zrcolafrm.cpp:362
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr ""
#: zrcolafrm.cpp:395
#: zrcolafrm.cpp:386
msgid "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
msgstr ""
@ -427,39 +427,73 @@ msgstr ""
msgid "List of related characters"
msgstr ""
#: zrcolagui.cpp:788
#: zrcolagui.cpp:790
msgid ""
"Some character native to specific language you are working with should not decompose to primitives.\n"
"For optimal decomposition you should set the language correctly."
msgstr ""
#: zrcolagui.cpp:792
#: zrcolagui.cpp:794
msgid "Select language &automatically according to selected keyboard"
msgstr ""
#: zrcolagui.cpp:795
#: zrcolagui.cpp:797
msgid "&Manually select the language from the list below:"
msgstr ""
#: zrcolagui.cpp:807
#: zrcolagui.cpp:809
msgid "Text Language"
msgstr ""
#: zrcolagui.cpp:812
#: zrcolagui.cpp:816
msgid ""
"ZRCola offers multiple text transformations that can be arranged in a sequence.\n"
"Please select desired transformations and the order they are applied."
msgstr ""
#: zrcolagui.cpp:831
msgid "A&vailable:"
msgstr ""
#: zrcolagui.cpp:844
msgid ">"
msgstr ""
#: zrcolagui.cpp:847
msgid "<"
msgstr ""
#: zrcolagui.cpp:856
msgid "&Active:"
msgstr ""
#: zrcolagui.cpp:872
msgid "Up"
msgstr ""
#: zrcolagui.cpp:875
msgid "Down"
msgstr ""
#: zrcolagui.cpp:885
msgid "Transformation"
msgstr ""
#: zrcolagui.cpp:892
msgid ""
"ZRCola can be launched every time you log in to your computer.\n"
"It will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."
msgstr ""
#: zrcolagui.cpp:816
#: zrcolagui.cpp:896
msgid "Start ZRCola &automatically on logon"
msgstr ""
#: zrcolagui.cpp:823
#: zrcolagui.cpp:903
msgid "Startup"
msgstr ""
#: zrcolagui.cpp:903
#: zrcolagui.cpp:991
msgid ""
"Program and Website Editor: Janoš Ježovnik\n"
"Development: Amebis, d. o. o., Kamnik\n"
@ -468,61 +502,61 @@ msgid ""
"Development and maintenance of the original program (20042015): Peter Weiss"
msgstr ""
#: zrcolagui.cpp:911
#: zrcolagui.cpp:999
msgid "zrcola.zrc-sazu.si"
msgstr ""
#: zrcolagui.cpp:917
#: zrcolagui.cpp:1005
msgid "Texts made using ZRCola have to include in a footnote or some other appropriate part of the publication the note below:"
msgstr ""
#: zrcolagui.cpp:921
#: zrcolagui.cpp:1009
msgid "This text was written using the ZRCola input system (http://zrcola.zrc-sazu.si), developed at the Science and Research Centre of SAZU in Ljubljana (http://www.zrc-sazu.si) by Peter Weiss."
msgstr ""
#: zrcolagui.cpp:962
#: zrcolagui.cpp:1050
msgid "Log"
msgstr ""
#: zrcolagui.cpp:978
#: zrcolagui.cpp:1066
msgid "Quit and &Update..."
msgstr ""
#: zrcolagui.cpp:980
#: zrcolagui.cpp:1068
msgid "Exit this program and launch product update"
msgstr ""
#: zrcolagui.cpp:984
#: zrcolagui.cpp:1072
msgid "&Close"
msgstr ""
#: zrcolagui.cpp:985
#: zrcolagui.cpp:1073
msgid "Close this window"
msgstr ""
#: zrcolagui.cpp:1024
#: zrcolagui.cpp:1112
msgid "Enter the &character you would like to request:"
msgstr ""
#: zrcolagui.cpp:1031
#: zrcolagui.cpp:1119
msgid "Decomposed character to request"
msgstr ""
#: zrcolagui.cpp:1035
#: zrcolagui.cpp:1123
msgid ""
"Please, use the decomposed form.\n"
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
msgstr ""
#: zrcolagui.cpp:1045
#: zrcolagui.cpp:1133
msgid "The &context, examples or description why and where the character is required:"
msgstr ""
#: zrcolagui.cpp:1051
#: zrcolagui.cpp:1139
msgid "Additional notes for character request"
msgstr ""
#: zrcolagui.cpp:1058
#: zrcolagui.cpp:1146
msgid ""
"After clicking OK button, your e-mail application should open allowing you to submit the new character request to ZRCola Editor.\n"
"Your e-mail application might not display all the characters correctly, but the Editor will be able to read them correctly anyway."
@ -532,7 +566,12 @@ msgstr ""
msgid "INS key is pressed. Type the Unicode code of desired character now (up to four hexadecimal digits: 0-9, A-F), then release INS."
msgstr ""
#: zrcolasettings.cpp:93
#: zrcolasettings.cpp:90
#, c-format
msgid "Unknown transformation (%u)"
msgstr ""
#: zrcolasettings.cpp:181
msgid "Start ZRCola automatically on logon"
msgstr ""
@ -542,7 +581,7 @@ msgid ""
"Are you sure?"
msgstr ""
#: zrcolaupdater.cpp:94 zrcolagui.h:336
#: zrcolaupdater.cpp:94 zrcolagui.h:350
msgid "Product Update"
msgstr ""
@ -550,11 +589,11 @@ msgstr ""
msgid "Character Search"
msgstr ""
#: zrcolagui.h:285
#: zrcolagui.h:299
msgid "Settings"
msgstr ""
#: zrcolagui.h:311
#: zrcolagui.h:325
msgid "About ZRCola"
msgstr ""

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2017-03-27 14:04+0200\n"
"PO-Revision-Date: 2017-03-27 14:05+0200\n"
"POT-Creation-Date: 2017-04-03 12:04+0200\n"
"PO-Revision-Date: 2017-04-03 12:05+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
"Language: de_DE\n"
@ -20,7 +20,7 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU"
msgstr ""
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:892 zrcolagui.h:106
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:980 zrcolagui.h:106
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
@ -28,17 +28,17 @@ msgstr ""
msgid "ZRCola"
msgstr "ZRCola"
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1022
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1110
#, fuzzy
msgid "Character"
msgstr "Eingabe eines Zeichenstils"
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1043
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1131
#, fuzzy
msgid "Context"
msgstr "Konnte den Kontext auf dem überlagerten Fenster nicht initialisieren."
#: zrcolachrreq.cpp:64 zrcolagui.h:365
#: zrcolachrreq.cpp:64 zrcolagui.h:379
msgid "Request a New Character"
msgstr ""
@ -55,17 +55,17 @@ msgstr "Fehler bei der Validierung"
msgid "Invalid character in Unicode found: %c"
msgstr ""
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:395 zrcolachrslct.cpp:886
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
msgid "▸ Search Options"
msgstr ""
# Recitation separator
#: zrcolachrslct.cpp:333
#: zrcolachrslct.cpp:328
#, fuzzy
msgid ", "
msgstr ", "
#: zrcolachrslct.cpp:398 zrcolachrslct.cpp:883
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
msgid "▾ Search Options"
msgstr ""
@ -82,11 +82,11 @@ msgstr "Warnung: "
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
msgstr ""
#: zrcolafrm.cpp:371
#: zrcolafrm.cpp:362
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/"
#: zrcolafrm.cpp:395
#: zrcolafrm.cpp:386
msgid "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
msgstr "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
@ -461,39 +461,73 @@ msgstr ""
msgid "List of related characters"
msgstr ""
#: zrcolagui.cpp:788
#: zrcolagui.cpp:790
msgid ""
"Some character native to specific language you are working with should not decompose to primitives.\n"
"For optimal decomposition you should set the language correctly."
msgstr ""
#: zrcolagui.cpp:792
#: zrcolagui.cpp:794
msgid "Select language &automatically according to selected keyboard"
msgstr ""
#: zrcolagui.cpp:795
#: zrcolagui.cpp:797
msgid "&Manually select the language from the list below:"
msgstr ""
#: zrcolagui.cpp:807
#: zrcolagui.cpp:809
msgid "Text Language"
msgstr ""
#: zrcolagui.cpp:812
#: zrcolagui.cpp:816
msgid ""
"ZRCola offers multiple text transformations that can be arranged in a sequence.\n"
"Please select desired transformations and the order they are applied."
msgstr ""
#: zrcolagui.cpp:831
msgid "A&vailable:"
msgstr ""
#: zrcolagui.cpp:844
msgid ">"
msgstr ">"
#: zrcolagui.cpp:847
msgid "<"
msgstr "<"
#: zrcolagui.cpp:856
msgid "&Active:"
msgstr ""
#: zrcolagui.cpp:872
msgid "Up"
msgstr ""
#: zrcolagui.cpp:875
msgid "Down"
msgstr ""
#: zrcolagui.cpp:885
msgid "Transformation"
msgstr ""
#: zrcolagui.cpp:892
msgid ""
"ZRCola can be launched every time you log in to your computer.\n"
"It will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."
msgstr ""
#: zrcolagui.cpp:816
#: zrcolagui.cpp:896
msgid "Start ZRCola &automatically on logon"
msgstr ""
#: zrcolagui.cpp:823
#: zrcolagui.cpp:903
msgid "Startup"
msgstr ""
#: zrcolagui.cpp:903
#: zrcolagui.cpp:991
msgid ""
"Program and Website Editor: Janoš Ježovnik\n"
"Development: Amebis, d. o. o., Kamnik\n"
@ -502,65 +536,65 @@ msgid ""
"Development and maintenance of the original program (20042015): Peter Weiss"
msgstr ""
#: zrcolagui.cpp:911
#: zrcolagui.cpp:999
msgid "zrcola.zrc-sazu.si"
msgstr ""
#: zrcolagui.cpp:917
#: zrcolagui.cpp:1005
msgid "Texts made using ZRCola have to include in a footnote or some other appropriate part of the publication the note below:"
msgstr ""
#: zrcolagui.cpp:921
#: zrcolagui.cpp:1009
msgid "This text was written using the ZRCola input system (http://zrcola.zrc-sazu.si), developed at the Science and Research Centre of SAZU in Ljubljana (http://www.zrc-sazu.si) by Peter Weiss."
msgstr ""
#: zrcolagui.cpp:962
#: zrcolagui.cpp:1050
#, fuzzy
msgid "Log"
msgstr "&Log"
#: zrcolagui.cpp:978
#: zrcolagui.cpp:1066
#, fuzzy
msgid "Quit and &Update..."
msgstr "Kann Benutzer-Konfigurationsdatei nicht aktualisieren."
#: zrcolagui.cpp:980
#: zrcolagui.cpp:1068
msgid "Exit this program and launch product update"
msgstr ""
#: zrcolagui.cpp:984
#: zrcolagui.cpp:1072
#, fuzzy
msgid "&Close"
msgstr "&Schließen"
#: zrcolagui.cpp:985
#: zrcolagui.cpp:1073
#, fuzzy
msgid "Close this window"
msgstr "Fenster schließen"
#: zrcolagui.cpp:1024
#: zrcolagui.cpp:1112
msgid "Enter the &character you would like to request:"
msgstr ""
#: zrcolagui.cpp:1031
#: zrcolagui.cpp:1119
msgid "Decomposed character to request"
msgstr ""
#: zrcolagui.cpp:1035
#: zrcolagui.cpp:1123
msgid ""
"Please, use the decomposed form.\n"
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
msgstr ""
#: zrcolagui.cpp:1045
#: zrcolagui.cpp:1133
msgid "The &context, examples or description why and where the character is required:"
msgstr ""
#: zrcolagui.cpp:1051
#: zrcolagui.cpp:1139
msgid "Additional notes for character request"
msgstr ""
#: zrcolagui.cpp:1058
#: zrcolagui.cpp:1146
msgid ""
"After clicking OK button, your e-mail application should open allowing you to submit the new character request to ZRCola Editor.\n"
"Your e-mail application might not display all the characters correctly, but the Editor will be able to read them correctly anyway."
@ -570,7 +604,12 @@ msgstr ""
msgid "INS key is pressed. Type the Unicode code of desired character now (up to four hexadecimal digits: 0-9, A-F), then release INS."
msgstr ""
#: zrcolasettings.cpp:93
#: zrcolasettings.cpp:90
#, c-format
msgid "Unknown transformation (%u)"
msgstr ""
#: zrcolasettings.cpp:181
msgid "Start ZRCola automatically on logon"
msgstr ""
@ -580,7 +619,7 @@ msgid ""
"Are you sure?"
msgstr ""
#: zrcolaupdater.cpp:94 zrcolagui.h:336
#: zrcolaupdater.cpp:94 zrcolagui.h:350
msgid "Product Update"
msgstr ""
@ -589,11 +628,11 @@ msgstr ""
msgid "Character Search"
msgstr "Skupine &znakov"
#: zrcolagui.h:285
#: zrcolagui.h:299
msgid "Settings"
msgstr ""
#: zrcolagui.h:311
#: zrcolagui.h:325
msgid "About ZRCola"
msgstr ""

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2017-03-27 14:05+0200\n"
"PO-Revision-Date: 2017-03-27 14:05+0200\n"
"POT-Creation-Date: 2017-04-03 12:04+0200\n"
"PO-Revision-Date: 2017-04-03 12:04+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
"Language: ru_RU\n"
@ -20,7 +20,7 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU"
msgstr "© 2004%s ZRC SAZU"
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:892 zrcolagui.h:106
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:980 zrcolagui.h:106
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
@ -28,15 +28,15 @@ msgstr "© 2004%s ZRC SAZU"
msgid "ZRCola"
msgstr "ZRCola"
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1022
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1110
msgid "Character"
msgstr "Знак"
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1043
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1131
msgid "Context"
msgstr "Контекст"
#: zrcolachrreq.cpp:64 zrcolagui.h:365
#: zrcolachrreq.cpp:64 zrcolagui.h:379
msgid "Request a New Character"
msgstr "Запрос нового знака"
@ -53,16 +53,16 @@ msgstr ""
msgid "Invalid character in Unicode found: %c"
msgstr ""
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:395 zrcolachrslct.cpp:886
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
msgid "▸ Search Options"
msgstr "▸ Опции поиска"
# Recitation separator
#: zrcolachrslct.cpp:333
#: zrcolachrslct.cpp:328
msgid ", "
msgstr ", "
#: zrcolachrslct.cpp:398 zrcolachrslct.cpp:883
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
msgid "▾ Search Options"
msgstr "▾ Опции поиска"
@ -78,11 +78,11 @@ msgstr "Предупреждение"
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
msgstr "Сочетание клавиш Win+F6 невозможно регистрировать. Некоторые функциональности не будут доступны."
#: zrcolafrm.cpp:371
#: zrcolafrm.cpp:362
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/"
#: zrcolafrm.cpp:395
#: zrcolafrm.cpp:386
msgid "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
msgstr "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
@ -426,7 +426,7 @@ msgstr "&Связанное"
msgid "List of related characters"
msgstr "Список связанных знаков"
#: zrcolagui.cpp:788
#: zrcolagui.cpp:790
msgid ""
"Some character native to specific language you are working with should not decompose to primitives.\n"
"For optimal decomposition you should set the language correctly."
@ -434,19 +434,53 @@ msgstr ""
"Некоторые знаки использованного языка нельзя разбирать.\n"
"Для оптимальной разборки вы должны настроить правильный язык."
#: zrcolagui.cpp:792
#: zrcolagui.cpp:794
msgid "Select language &automatically according to selected keyboard"
msgstr "&Автоматически установить язык на основе выбранной клавиатуры"
#: zrcolagui.cpp:795
#: zrcolagui.cpp:797
msgid "&Manually select the language from the list below:"
msgstr "&Вручную выбрать язык со списка:"
#: zrcolagui.cpp:807
#: zrcolagui.cpp:809
msgid "Text Language"
msgstr "Язык текста"
#: zrcolagui.cpp:812
#: zrcolagui.cpp:816
msgid ""
"ZRCola offers multiple text transformations that can be arranged in a sequence.\n"
"Please select desired transformations and the order they are applied."
msgstr ""
#: zrcolagui.cpp:831
msgid "A&vailable:"
msgstr ""
#: zrcolagui.cpp:844
msgid ">"
msgstr ">"
#: zrcolagui.cpp:847
msgid "<"
msgstr "<"
#: zrcolagui.cpp:856
msgid "&Active:"
msgstr ""
#: zrcolagui.cpp:872
msgid "Up"
msgstr "Up"
#: zrcolagui.cpp:875
msgid "Down"
msgstr "Down"
#: zrcolagui.cpp:885
msgid "Transformation"
msgstr ""
#: zrcolagui.cpp:892
msgid ""
"ZRCola can be launched every time you log in to your computer.\n"
"It will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."
@ -454,15 +488,15 @@ msgstr ""
"Запуск системы ZRCola возможен при каждом запуске компьютера.\n"
"После запуска система ZRCola доступна на панели задач либо через нажатие сочетания клавиш Win+F5 и Win+F6."
#: zrcolagui.cpp:816
#: zrcolagui.cpp:896
msgid "Start ZRCola &automatically on logon"
msgstr "&Автоматически запустить систему ZRCola при запуске компьютера"
#: zrcolagui.cpp:823
#: zrcolagui.cpp:903
msgid "Startup"
msgstr "Запуск"
#: zrcolagui.cpp:903
#: zrcolagui.cpp:991
msgid ""
"Program and Website Editor: Janoš Ježovnik\n"
"Development: Amebis, d. o. o., Kamnik\n"
@ -476,47 +510,47 @@ msgstr ""
"Перевод на русский язык: Домен Крвина (Domen Krvina), Силво Торкар (Silvo Torkar), Анастасия Плотникова\n"
"Разработка in техническая поддержка первоначальной программы (20042015): Петер Вейсс (Peter Weiss)"
#: zrcolagui.cpp:911
#: zrcolagui.cpp:999
msgid "zrcola.zrc-sazu.si"
msgstr "zrcola.zrc-sazu.si"
#: zrcolagui.cpp:917
#: zrcolagui.cpp:1005
msgid "Texts made using ZRCola have to include in a footnote or some other appropriate part of the publication the note below:"
msgstr "Текст, созданный с помощью системы ZRCola, должен в примечании или другом соответствующем месте в публикации сопровождаться следующей записью:"
#: zrcolagui.cpp:921
#: zrcolagui.cpp:1009
msgid "This text was written using the ZRCola input system (http://zrcola.zrc-sazu.si), developed at the Science and Research Centre of SAZU in Ljubljana (http://www.zrc-sazu.si) by Peter Weiss."
msgstr "Текст подготовлен с помощью системы ввода ZRCola (http://zrcola.zrc-sazu.si), разработанной в Научно-исследовательском центре Словенской академии наук и искусств в Любляне (http://www.zrc-sazu.si) Петром Вейссoм."
#: zrcolagui.cpp:962
#: zrcolagui.cpp:1050
msgid "Log"
msgstr "Журнал"
#: zrcolagui.cpp:978
#: zrcolagui.cpp:1066
msgid "Quit and &Update..."
msgstr "Выйти и &обновить ..."
#: zrcolagui.cpp:980
#: zrcolagui.cpp:1068
msgid "Exit this program and launch product update"
msgstr "Выйти из программы и запустить обновление"
#: zrcolagui.cpp:984
#: zrcolagui.cpp:1072
msgid "&Close"
msgstr "&Закрыть"
#: zrcolagui.cpp:985
#: zrcolagui.cpp:1073
msgid "Close this window"
msgstr "Закрыть это окно"
#: zrcolagui.cpp:1024
#: zrcolagui.cpp:1112
msgid "Enter the &character you would like to request:"
msgstr "Ввести запрашиваемый &знак:"
#: zrcolagui.cpp:1031
#: zrcolagui.cpp:1119
msgid "Decomposed character to request"
msgstr "Запрашиваемый разобранный знак"
#: zrcolagui.cpp:1035
#: zrcolagui.cpp:1123
msgid ""
"Please, use the decomposed form.\n"
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
@ -524,15 +558,15 @@ msgstr ""
"Пожалуйста, используйте разобранный формат.\n"
"Для ввода запрашиваемого знака можно использовать сочетания клавиш системы ZRCola либо копировать и вставить знаки из окна для разборки."
#: zrcolagui.cpp:1045
#: zrcolagui.cpp:1133
msgid "The &context, examples or description why and where the character is required:"
msgstr "&Контекст, примеры либо описание запрашиваемого знака или объяснение, зачем он нужен:"
#: zrcolagui.cpp:1051
#: zrcolagui.cpp:1139
msgid "Additional notes for character request"
msgstr "Дополнительные примечания"
#: zrcolagui.cpp:1058
#: zrcolagui.cpp:1146
msgid ""
"After clicking OK button, your e-mail application should open allowing you to submit the new character request to ZRCola Editor.\n"
"Your e-mail application might not display all the characters correctly, but the Editor will be able to read them correctly anyway."
@ -544,7 +578,12 @@ msgstr ""
msgid "INS key is pressed. Type the Unicode code of desired character now (up to four hexadecimal digits: 0-9, A-F), then release INS."
msgstr "Нажата клавиша INS. Введите код Юникод желаемого знака (максимум четыре шестнадцатеричныe цифры: 0-9, A-F), затем отпустите клавишу INS."
#: zrcolasettings.cpp:93
#: zrcolasettings.cpp:90
#, c-format
msgid "Unknown transformation (%u)"
msgstr ""
#: zrcolasettings.cpp:181
msgid "Start ZRCola automatically on logon"
msgstr "Автоматически запустить систему ZRCola при запуске компьютера"
@ -556,7 +595,7 @@ msgstr ""
"Программа будет закрыта и обновлена.\n"
"Вы уверены?"
#: zrcolaupdater.cpp:94 zrcolagui.h:336
#: zrcolaupdater.cpp:94 zrcolagui.h:350
msgid "Product Update"
msgstr "Обновление продукта"
@ -564,11 +603,11 @@ msgstr "Обновление продукта"
msgid "Character Search"
msgstr "Поиск знака"
#: zrcolagui.h:285
#: zrcolagui.h:299
msgid "Settings"
msgstr "Настройки"
#: zrcolagui.h:311
#: zrcolagui.h:325
msgid "About ZRCola"
msgstr "О системе ZRCola"
@ -772,15 +811,9 @@ msgstr "Система ввода ZRCola для лингвистического
#~ msgid "Left"
#~ msgstr "Left"
#~ msgid "Up"
#~ msgstr "Up"
#~ msgid "Right"
#~ msgstr "Right"
#~ msgid "Down"
#~ msgstr "Down"
#~ msgid "Num Lock"
#~ msgstr "Num Lock"

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2017-03-27 14:03+0200\n"
"PO-Revision-Date: 2017-03-27 14:04+0200\n"
"POT-Creation-Date: 2017-04-03 12:01+0200\n"
"PO-Revision-Date: 2017-04-03 12:03+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
"Language: sl_SI\n"
@ -20,7 +20,7 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU"
msgstr "© 2004-%s ZRC SAZU"
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:892 zrcolagui.h:106
#: zrcolaapp.cpp:72 zrcolafrm.cpp:92 zrcolagui.cpp:980 zrcolagui.h:106
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
@ -28,15 +28,15 @@ msgstr "© 2004-%s ZRC SAZU"
msgid "ZRCola"
msgstr "ZRCola"
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1022
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1110
msgid "Character"
msgstr "Znak"
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1043
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1131
msgid "Context"
msgstr "Kontekst"
#: zrcolachrreq.cpp:64 zrcolagui.h:365
#: zrcolachrreq.cpp:64 zrcolagui.h:379
msgid "Request a New Character"
msgstr "Zahtevaj nov znak"
@ -53,16 +53,16 @@ msgstr "Nesoglasje pri preverjanju"
msgid "Invalid character in Unicode found: %c"
msgstr "Napačen znak v zapisu Unicode: %c"
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:395 zrcolachrslct.cpp:886
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
msgid "▸ Search Options"
msgstr "▸ Možnosti iskanja"
# Recitation separator
#: zrcolachrslct.cpp:333
#: zrcolachrslct.cpp:328
msgid ", "
msgstr ", "
#: zrcolachrslct.cpp:398 zrcolachrslct.cpp:883
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
msgid "▾ Search Options"
msgstr "▾ Možnosti iskanja"
@ -78,11 +78,11 @@ msgstr "Opozorilo"
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
msgstr "ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj funkcionalnosti ne bo na voljo."
#: zrcolafrm.cpp:371
#: zrcolafrm.cpp:362
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/info/instructions/"
#: zrcolafrm.cpp:395
#: zrcolafrm.cpp:386
msgid "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
msgstr "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
@ -426,7 +426,7 @@ msgstr "&Sorodni"
msgid "List of related characters"
msgstr "Seznam sorodnih znakov"
#: zrcolagui.cpp:788
#: zrcolagui.cpp:790
msgid ""
"Some character native to specific language you are working with should not decompose to primitives.\n"
"For optimal decomposition you should set the language correctly."
@ -434,19 +434,55 @@ msgstr ""
"Nekateri znaki iz posameznih jezikov, s katerimi delate, se ne smejo razstavljati.\n"
"Za optimalno razstavljanje izberite pravilni jezik."
#: zrcolagui.cpp:792
#: zrcolagui.cpp:794
msgid "Select language &automatically according to selected keyboard"
msgstr "S&amodejno izberi jezik glede na izbrano tipkovnico"
#: zrcolagui.cpp:795
#: zrcolagui.cpp:797
msgid "&Manually select the language from the list below:"
msgstr "&Ročno izberi jezik s seznama spodaj:"
#: zrcolagui.cpp:807
#: zrcolagui.cpp:809
msgid "Text Language"
msgstr "Jezik besedila"
#: zrcolagui.cpp:812
#: zrcolagui.cpp:816
msgid ""
"ZRCola offers multiple text transformations that can be arranged in a sequence.\n"
"Please select desired transformations and the order they are applied."
msgstr ""
"ZRCola ponuja različne pretvorbe besedila, ki jih lahko uredimo v zaporedje.\n"
"Prosimo, izberite želene pretvorbe in vrstni red, v katerem naj jih uporabi."
#: zrcolagui.cpp:831
msgid "A&vailable:"
msgstr "Na &voljo:"
#: zrcolagui.cpp:844
msgid ">"
msgstr ">"
#: zrcolagui.cpp:847
msgid "<"
msgstr "<"
#: zrcolagui.cpp:856
msgid "&Active:"
msgstr "&Aktivni:"
#: zrcolagui.cpp:872
msgid "Up"
msgstr "Gor"
#: zrcolagui.cpp:875
msgid "Down"
msgstr "Dol"
#: zrcolagui.cpp:885
msgid "Transformation"
msgstr "Pretvorba"
#: zrcolagui.cpp:892
msgid ""
"ZRCola can be launched every time you log in to your computer.\n"
"It will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."
@ -454,15 +490,15 @@ msgstr ""
"ZRCola se lahko zažene ob vsaki prijavi v vaš računalnik.\n"
"Na voljo bo v vrstici za sistemska obvestila ter preko registriranih bližnjic Win+F5 in Win+F6."
#: zrcolagui.cpp:816
#: zrcolagui.cpp:896
msgid "Start ZRCola &automatically on logon"
msgstr "S&amodejno zaženi ZRColo ob prijavi"
#: zrcolagui.cpp:823
#: zrcolagui.cpp:903
msgid "Startup"
msgstr "Zagon"
#: zrcolagui.cpp:903
#: zrcolagui.cpp:991
msgid ""
"Program and Website Editor: Janoš Ježovnik\n"
"Development: Amebis, d. o. o., Kamnik\n"
@ -476,48 +512,48 @@ msgstr ""
"Prevod v ruski jezik: Domen Krvina, Silvo Torkar, Anastasija Plotnikova\n"
"Razvoj in vzdrževanje prvotnega programa (20042015): Peter Weiss"
#: zrcolagui.cpp:911
#: zrcolagui.cpp:999
msgid "zrcola.zrc-sazu.si"
msgstr "zrcola.zrc-sazu.si"
#: zrcolagui.cpp:917
#: zrcolagui.cpp:1005
msgid "Texts made using ZRCola have to include in a footnote or some other appropriate part of the publication the note below:"
msgstr "Besedilo, nastalo z uporabo ZRCole, mora biti v opombi ali na drugem ustreznem mestu v publikaciji opremljeno z naslednjim zapisom:"
#: zrcolagui.cpp:921
#: zrcolagui.cpp:1009
msgid "This text was written using the ZRCola input system (http://zrcola.zrc-sazu.si), developed at the Science and Research Centre of SAZU in Ljubljana (http://www.zrc-sazu.si) by Peter Weiss."
msgstr "Besedilo je bilo pripravljeno z vnašalnim sistemom ZRCola (http://zrcola.zrc-sazu.si), ki ga je na Znanstvenoraziskovalnem centru SAZU v Ljubljani (http://www.zrc-sazu.si) razvil Peter Weiss."
#: zrcolagui.cpp:962
#: zrcolagui.cpp:1050
msgid "Log"
msgstr "Dnevnik"
#: zrcolagui.cpp:978
#: zrcolagui.cpp:1066
msgid "Quit and &Update..."
msgstr "Za&ustavi in posodobi ..."
#: zrcolagui.cpp:980
#: zrcolagui.cpp:1068
msgid "Exit this program and launch product update"
msgstr "Zaustavi program in zaženi posodobitev izdelka"
#: zrcolagui.cpp:984
#: zrcolagui.cpp:1072
msgid "&Close"
msgstr "&Zapri"
#: zrcolagui.cpp:985
#: zrcolagui.cpp:1073
msgid "Close this window"
msgstr "Zapri to okno"
#: zrcolagui.cpp:1024
#: zrcolagui.cpp:1112
msgid "Enter the &character you would like to request:"
msgstr "Vpišite &znak, ki ga želite zahtevati:"
#: zrcolagui.cpp:1031
#: zrcolagui.cpp:1119
msgid "Decomposed character to request"
msgstr "Zahtevani znak v razstavljeni obliki"
# Please use a double && for final "&" character
#: zrcolagui.cpp:1035
#: zrcolagui.cpp:1123
msgid ""
"Please, use the decomposed form.\n"
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
@ -525,15 +561,15 @@ msgstr ""
"Uporabite razstavljeno obliko.\n"
"Za vnos znaka lahko uporabite ZRColine bližnjice na tipkovnici ali ga kopirate in prilepite iz okna z razstavljenim besedilom."
#: zrcolagui.cpp:1045
#: zrcolagui.cpp:1133
msgid "The &context, examples or description why and where the character is required:"
msgstr "&Kontekst, primeri oziroma opis, zakaj in kje potrebujete novi znak:"
#: zrcolagui.cpp:1051
#: zrcolagui.cpp:1139
msgid "Additional notes for character request"
msgstr "Dodatne opombe za zahtevo znaka"
#: zrcolagui.cpp:1058
#: zrcolagui.cpp:1146
msgid ""
"After clicking OK button, your e-mail application should open allowing you to submit the new character request to ZRCola Editor.\n"
"Your e-mail application might not display all the characters correctly, but the Editor will be able to read them correctly anyway."
@ -545,7 +581,12 @@ msgstr ""
msgid "INS key is pressed. Type the Unicode code of desired character now (up to four hexadecimal digits: 0-9, A-F), then release INS."
msgstr "Pritisnili ste tipko INS. Vtipkajte kodo Unicode želenega znaka (do štiri šestnajstiške števke: 09, AF), nato izpustite INS."
#: zrcolasettings.cpp:93
#: zrcolasettings.cpp:90
#, c-format
msgid "Unknown transformation (%u)"
msgstr "Neznana pretvorba (%u)"
#: zrcolasettings.cpp:181
msgid "Start ZRCola automatically on logon"
msgstr "Samodejno zaženi ZRColo ob prijavi"
@ -557,7 +598,7 @@ msgstr ""
"Program se bo zdaj zaprl in zagnala se bo posodobitev.\n"
"Ali ste prepričani, da želite nadaljevati?"
#: zrcolaupdater.cpp:94 zrcolagui.h:336
#: zrcolaupdater.cpp:94 zrcolagui.h:350
msgid "Product Update"
msgstr "Posodabljanje izdelka"
@ -565,11 +606,11 @@ msgstr "Posodabljanje izdelka"
msgid "Character Search"
msgstr "Poišči znak"
#: zrcolagui.h:285
#: zrcolagui.h:299
msgid "Settings"
msgstr "Nastavitve"
#: zrcolagui.h:311
#: zrcolagui.h:325
msgid "About ZRCola"
msgstr "O ZRColi"

View File

@ -87,14 +87,30 @@ void wxZRColaComposerPanel::SynchronizePanels()
m_timerSave.Stop();
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
wxZRColaFrame *mainWnd = dynamic_cast<wxZRColaFrame*>(wxGetActiveWindow());
wxASSERT_MSG(mainWnd, "main window missing");
wxString src;
size_t len = GetValue(m_source, src);
std::wstring dst(src.data(), len), dst2;
ZRCola::mapping_vector map;
std::wstring norm;
app->m_t_db.TranslateInv(0, src.data(), len, norm, &m_mapping1);
m_mapping.clear();
for (auto s = mainWnd->m_settings->m_transeq.cbegin(), s_end = mainWnd->m_settings->m_transeq.cend(); s != s_end; ++s) {
if (*s == 0) {
// ZRCola Decomposed => ZRCola Composed should decompose first.
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), dst2, &map);
m_mapping.push_back(std::move(map));
std::wstring dst;
app->m_t_db.Translate(0, norm.data(), norm.size(), dst, &m_mapping2);
app->m_t_db.Translate(*s, dst2.data(), dst2.size(), dst, &map);
m_mapping.push_back(std::move(map));
} else {
// Other transforms
app->m_t_db.Translate(*s, dst.data(), dst.size(), dst2, &map);
m_mapping.push_back(std::move(map));
dst = std::move(dst2);
}
}
m_source->GetSelection(&m_selSource.first, &m_selSource.second);
@ -104,8 +120,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
// Update destination text, and its HEX dump.
m_destination->SetValue(dst);
m_destination->SetSelection(
m_selDestination.first = m_mapping2.to_dst(m_mapping1.to_dst(m_selSource.first )),
m_selDestination.second = m_mapping2.to_dst(m_mapping1.to_dst(m_selSource.second)));
m_selDestination.first = MapToDestination(m_selSource.first ),
m_selDestination.second = MapToDestination(m_selSource.second));
SetHexValue(m_destinationHex, m_selDestinationHex, m_mappingDestinationHex, dst.data(), dst.length(), m_selDestination.first, m_selDestination.second);
// Schedule state save after 3s.
@ -113,19 +129,29 @@ void wxZRColaComposerPanel::SynchronizePanels()
} else if (m_destinationChanged) {
m_timerSave.Stop();
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
wxZRColaFrame *mainWnd = dynamic_cast<wxZRColaFrame*>(wxGetActiveWindow());
wxASSERT_MSG(mainWnd, "main window missing");
wxString src;
size_t len = GetValue(m_destination, src);
std::wstring dst(src.data(), len), dst2;
ZRCola::mapping_vector map;
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
std::wstring dst;
wxZRColaFrame *mainWnd = dynamic_cast<wxZRColaFrame*>(wxGetActiveWindow());
if (mainWnd)
app->m_t_db.TranslateInv(0, src.data(), len, &app->m_lc_db, mainWnd->m_settings->m_lang, dst, &m_mapping2);
else
app->m_t_db.TranslateInv(0, src.data(), len, dst, &m_mapping2);
m_mapping.clear();
for (auto s = mainWnd->m_settings->m_transeq.crbegin(), s_end = mainWnd->m_settings->m_transeq.crend(); s != s_end; ++s) {
if (*s) {
// ZRCola Decomposed => ZRCola Composed
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), &app->m_lc_db, mainWnd->m_settings->m_lang, dst2, &map);
} else {
// Other transforms
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), dst2, &map);
}
dst = std::move(dst2);
m_mapping1.clear();
m_mapping2.invert();
map.invert();
m_mapping.push_back(std::move(map));
}
m_destination->GetSelection(&m_selDestination.first, &m_selDestination.second);
@ -135,8 +161,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
// Update source text, and its HEX dump.
m_source->SetValue(dst);
m_source->SetSelection(
m_selSource.first = m_mapping1.to_src(m_mapping2.to_src(m_selDestination.first )),
m_selSource.second = m_mapping1.to_src(m_mapping2.to_src(m_selDestination.second)));
m_selSource.first = MapToSource(m_selDestination.first ),
m_selSource.second = MapToSource(m_selDestination.second));
SetHexValue(m_sourceHex, m_selSourceHex, m_mappingSourceHex, dst.data(), dst.length(), m_selSource.first, m_selSource.second);
// Schedule state save after 3s.
@ -166,8 +192,8 @@ void wxZRColaComposerPanel::OnSourcePaint(wxPaintEvent& event)
m_selSourceHex.second = m_mappingSourceHex.to_dst(to ));
m_destination->SetSelection(
m_selDestination.first = m_mapping2.to_dst(m_mapping1.to_dst(from)),
m_selDestination.second = m_mapping2.to_dst(m_mapping1.to_dst(to )));
m_selDestination.first = MapToDestination(from),
m_selDestination.second = MapToDestination(to ));
m_destinationHex->SetSelection(
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(m_selDestination.first ),
@ -193,8 +219,8 @@ void wxZRColaComposerPanel::OnSourceHexPaint(wxPaintEvent& event)
m_selSource.second = m_mappingSourceHex.to_src(to ));
m_destination->SetSelection(
m_selDestination.first = m_mapping2.to_dst(m_mapping1.to_dst(m_selSource.first )),
m_selDestination.second = m_mapping2.to_dst(m_mapping1.to_dst(m_selSource.second)));
m_selDestination.first = MapToDestination(m_selSource.first ),
m_selDestination.second = MapToDestination(m_selSource.second));
m_destinationHex->SetSelection(
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(m_selDestination.first ),
@ -207,7 +233,7 @@ void wxZRColaComposerPanel::OnSourceText(wxCommandEvent& event)
{
event.Skip();
// Set the flag the source text changed to trigger idle-time translation.
// Set the flag the source text changed to trigger idle-time transformation.
m_sourceChanged = true;
}
@ -229,8 +255,8 @@ void wxZRColaComposerPanel::OnDestinationPaint(wxPaintEvent& event)
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(to ));
m_source->SetSelection(
m_selSource.first = m_mapping1.to_src(m_mapping2.to_src(from)),
m_selSource.second = m_mapping1.to_src(m_mapping2.to_src(to )));
m_selSource.first = MapToSource(from),
m_selSource.second = MapToSource(to ));
m_sourceHex->SetSelection(
m_selSourceHex.first = m_mappingSourceHex.to_dst(m_selSource.first ),
@ -256,8 +282,8 @@ void wxZRColaComposerPanel::OnDestinationHexPaint(wxPaintEvent& event)
m_selDestination.second = m_mappingDestinationHex.to_src(to ));
m_source->SetSelection(
m_selSource.first = m_mapping1.to_src(m_mapping2.to_src(m_selDestination.first )),
m_selSource.second = m_mapping1.to_src(m_mapping2.to_src(m_selDestination.second)));
m_selSource.first = MapToSource(m_selDestination.first ),
m_selSource.second = MapToSource(m_selDestination.second));
m_sourceHex->SetSelection(
m_selSourceHex.first = m_mappingSourceHex.to_dst(m_selSource.first ),
@ -270,7 +296,7 @@ void wxZRColaComposerPanel::OnDestinationText(wxCommandEvent& event)
{
event.Skip();
// Set the flag the destination text changed to trigger idle-time inverse translation.
// Set the flag the destination text changed to trigger idle-time inverse transformation.
m_destinationChanged = true;
}

View File

@ -30,6 +30,7 @@ class wxZRColaComposerPanel;
#include <wx/persist/window.h>
#include <wx/timer.h>
#include <utility>
#include <vector>
///
@ -53,16 +54,17 @@ protected:
virtual void OnDestinationHexPaint(wxPaintEvent& event);
virtual void OnDestinationText(wxCommandEvent& event);
virtual void OnSaveTimer(wxTimerEvent& event);
inline size_t MapToDestination(_In_ size_t src) const;
inline size_t MapToSource(_In_ size_t dst) const;
static wxString GetStateFileName();
static size_t GetValue(wxTextCtrl *wnd, wxString &text);
static void SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &range, ZRCola::mapping_vector &mapping, const wchar_t *src, size_t len, long from, long to);
protected:
bool m_sourceChanged; ///< Boolean flag to mark source text "dirty" to trigger translation
bool m_destinationChanged; ///< Boolean flag to mark destination text "dirty" to trigger inverse translation
ZRCola::mapping_vector m_mapping1; ///< Character index mapping vector between source and normalized text
ZRCola::mapping_vector m_mapping2; ///< Character index mapping vector between normalized and destination text
bool m_sourceChanged; ///< Boolean flag to mark source text "dirty" to trigger transformation
bool m_destinationChanged; ///< Boolean flag to mark destination text "dirty" to trigger inverse transformation
std::vector<ZRCola::mapping_vector> m_mapping; ///< Character index mapping vector between source and normalized text
std::pair<long, long>
m_selSource, ///< Character index of selected text in source text control
m_selSourceHex, ///< Character index of selected text in source HEX dump text control
@ -88,6 +90,24 @@ public:
};
inline size_t wxZRColaComposerPanel::MapToDestination(_In_ size_t src) const
{
for (auto m = m_mapping.cbegin(), m_end = m_mapping.cend(); m != m_end; ++m)
src = m->to_dst(src);
return src;
}
inline size_t wxZRColaComposerPanel::MapToSource(_In_ size_t dst) const
{
for (auto m = m_mapping.crbegin(), m_end = m_mapping.crend(); m != m_end; ++m)
dst = m->to_src(dst);
return dst;
}
inline wxPersistentObject *wxCreatePersistentObject(wxZRColaComposerPanel *wnd)
{
return new wxPersistentZRColaComposerPanel(wnd);

View File

@ -45,8 +45,8 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
EVT_UPDATE_UI (wxID_TOOLBAR_EDIT , wxZRColaFrame::OnToolbarEditUpdate )
EVT_MENU (wxID_TOOLBAR_EDIT , wxZRColaFrame::OnToolbarEdit )
EVT_UPDATE_UI (wxID_TOOLBAR_TRANSLATE , wxZRColaFrame::OnToolbarTranslateUpdate )
EVT_MENU (wxID_TOOLBAR_TRANSLATE , wxZRColaFrame::OnToolbarTranslate )
EVT_UPDATE_UI (wxID_TOOLBAR_TRANSFORM , wxZRColaFrame::OnToolbarTransformUpdate )
EVT_MENU (wxID_TOOLBAR_TRANSFORM , wxZRColaFrame::OnToolbarTransform )
EVT_UPDATE_UI (wxID_PANEL_CHRGRPS , wxZRColaFrame::OnPanelCharacterCatalogUpdate)
EVT_MENU (wxID_PANEL_CHRGRPS , wxZRColaFrame::OnPanelCharacterCatalog )
EVT_MENU (wxID_FOCUS_CHARACTER_CATALOG , wxZRColaFrame::OnPanelCharacterCatalogFocus )
@ -69,10 +69,10 @@ wxZRColaFrame::wxZRColaFrame() :
{
{
// wxFrameBuilder 3.5 does not support wxAUI_TB_HORIZONTAL flag. Add it manually.
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTranslate);
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTransform);
paneInfo.LeftDockable(false);
paneInfo.RightDockable(false);
m_toolbarTranslate->SetWindowStyleFlag(m_toolbarTranslate->GetWindowStyleFlag() | wxAUI_TB_HORIZONTAL);
m_toolbarTransform->SetWindowStyleFlag(m_toolbarTransform->GetWindowStyleFlag() | wxAUI_TB_HORIZONTAL);
}
// Load main window icons.
@ -139,9 +139,9 @@ wxZRColaFrame::wxZRColaFrame() :
wxPersistentAuiManager(&m_mgr).Restore();
// Register global hotkey(s).
if (!RegisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE, wxMOD_WIN, VK_F5))
if (!RegisterHotKey(wxZRColaHKID_INVOKE_TRANSFORM, wxMOD_WIN, VK_F5))
wxMessageBox(_("ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."), _("Warning"), wxOK | wxICON_WARNING);
if (!RegisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE_INV, wxMOD_WIN, VK_F6))
if (!RegisterHotKey(wxZRColaHKID_INVOKE_TRANSFORM_INV, wxMOD_WIN, VK_F6))
wxMessageBox(_("ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."), _("Warning"), wxOK | wxICON_WARNING);
}
@ -149,8 +149,8 @@ wxZRColaFrame::wxZRColaFrame() :
wxZRColaFrame::~wxZRColaFrame()
{
// Unregister global hotkey(s).
UnregisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE_INV);
UnregisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE );
UnregisterHotKey(wxZRColaHKID_INVOKE_TRANSFORM_INV);
UnregisterHotKey(wxZRColaHKID_INVOKE_TRANSFORM );
#if defined(__WXMSW__)
if (m_tfSource) {
@ -317,15 +317,15 @@ void wxZRColaFrame::OnToolbarEdit(wxCommandEvent& event)
}
void wxZRColaFrame::OnToolbarTranslateUpdate(wxUpdateUIEvent& event)
void wxZRColaFrame::OnToolbarTransformUpdate(wxUpdateUIEvent& event)
{
event.Check(m_mgr.GetPane(m_toolbarTranslate).IsShown());
event.Check(m_mgr.GetPane(m_toolbarTransform).IsShown());
}
void wxZRColaFrame::OnToolbarTranslate(wxCommandEvent& event)
void wxZRColaFrame::OnToolbarTransform(wxCommandEvent& event)
{
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTranslate);
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTransform);
paneInfo.Show(!paneInfo.IsShown());
m_mgr.Update();
}
@ -527,8 +527,8 @@ WXLRESULT wxZRColaFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM
WXHWND hWndSource = ::GetForegroundWindow();
switch (wParam) {
case wxZRColaHKID_INVOKE_TRANSLATE : m_panel->m_source ->SetFocus(); break;
case wxZRColaHKID_INVOKE_TRANSLATE_INV: m_panel->m_destination->SetFocus(); break;
case wxZRColaHKID_INVOKE_TRANSFORM : m_panel->m_source ->SetFocus(); break;
case wxZRColaHKID_INVOKE_TRANSFORM_INV: m_panel->m_destination->SetFocus(); break;
default:
wxFAIL_MSG(wxT("not our registered shortcut"));
return wxZRColaFrameBase::MSWWindowProc(message, wParam, lParam);

View File

@ -40,8 +40,8 @@ class wxZRColaFrame;
///
/// Global hotkey message identifiers
///
#define wxZRColaHKID_INVOKE_TRANSLATE 0
#define wxZRColaHKID_INVOKE_TRANSLATE_INV 1
#define wxZRColaHKID_INVOKE_TRANSFORM 0
#define wxZRColaHKID_INVOKE_TRANSFORM_INV 1
///
@ -83,8 +83,8 @@ protected:
virtual void OnIconize(wxIconizeEvent& event);
void OnToolbarEditUpdate(wxUpdateUIEvent& event);
void OnToolbarEdit(wxCommandEvent& event);
void OnToolbarTranslateUpdate(wxUpdateUIEvent& event);
void OnToolbarTranslate(wxCommandEvent& event);
void OnToolbarTransformUpdate(wxUpdateUIEvent& event);
void OnToolbarTransform(wxCommandEvent& event);
void OnPanelCharacterCatalogUpdate(wxUpdateUIEvent& event);
void OnPanelCharacterCatalog(wxCommandEvent& event);
void OnPanelCharacterCatalogFocus(wxCommandEvent& event);

View File

@ -144,7 +144,7 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_menuView->Append( m_menuItemToolbarEdit );
wxMenuItem* m_menuItemToolbarCompose;
m_menuItemToolbarCompose = new wxMenuItem( m_menuView, wxID_TOOLBAR_TRANSLATE, wxString( _("&Compose Toolbar") ) , _("Toggle compose toolbar"), wxITEM_CHECK );
m_menuItemToolbarCompose = new wxMenuItem( m_menuView, wxID_TOOLBAR_TRANSFORM, wxString( _("&Compose Toolbar") ) , _("Toggle compose toolbar"), wxITEM_CHECK );
m_menuView->Append( m_menuItemToolbarCompose );
m_menuView->AppendSeparator();
@ -194,15 +194,15 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_toolbarEdit->Realize();
m_mgr.AddPane( m_toolbarEdit, wxAuiPaneInfo().Name( wxT("toolbarEdit") ).Top().Caption( _("Edit") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Row( 0 ).Layer( 1 ).ToolbarPane() );
m_toolbarTranslate = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT );
m_toolCharSelect = m_toolbarTranslate->AddTool( wxID_CHARACTER_SELECTOR, _("Find Character"), wxIcon( wxT("char_select.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Find Character"), _("Display character search to select character to insert into text"), NULL );
m_toolbarTransform = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT );
m_toolCharSelect = m_toolbarTransform->AddTool( wxID_CHARACTER_SELECTOR, _("Find Character"), wxIcon( wxT("char_select.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Find Character"), _("Display character search to select character to insert into text"), NULL );
m_toolSendDestination = m_toolbarTranslate->AddTool( wxID_SEND_DESTINATION, _("Send Composed"), wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Send composed text to source window"), NULL );
m_toolSendDestination = m_toolbarTransform->AddTool( wxID_SEND_DESTINATION, _("Send Composed"), wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Send composed text to source window"), NULL );
m_toolSendSource = m_toolbarTranslate->AddTool( wxID_SEND_SOURCE, _("Send Decomposed"), wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Decomposed"), _("Send decomposed text to source window"), NULL );
m_toolSendSource = m_toolbarTransform->AddTool( wxID_SEND_SOURCE, _("Send Decomposed"), wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Decomposed"), _("Send decomposed text to source window"), NULL );
m_toolbarTranslate->Realize();
m_mgr.AddPane( m_toolbarTranslate, wxAuiPaneInfo().Name( wxT("toolbarCompose") ).Top().Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Row( 0 ).Layer( 1 ).ToolbarPane() );
m_toolbarTransform->Realize();
m_mgr.AddPane( m_toolbarTransform, wxAuiPaneInfo().Name( wxT("toolbarCompose") ).Top().Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Row( 0 ).Layer( 1 ).ToolbarPane() );
m_panelChrCat = new wxZRColaCharacterCatalogPanel( this );
@ -781,12 +781,12 @@ wxZRColaSettingsBase::wxZRColaSettingsBase( wxWindow* parent, wxWindowID id, con
bSizerContent = new wxBoxSizer( wxVERTICAL );
m_listbook = new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_DEFAULT );
m_panelLanguage = new wxPanel( m_listbook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panelLanguage = new wxPanel( m_listbook, wxID_ANY, wxDefaultPosition, wxSize( 500,-1 ), wxTAB_TRAVERSAL );
wxBoxSizer* bSizerLanguage;
bSizerLanguage = new wxBoxSizer( wxVERTICAL );
m_langLabel = new wxStaticText( m_panelLanguage, wxID_ANY, _("Some character native to specific language you are working with should not decompose to primitives.\nFor optimal decomposition you should set the language correctly."), wxDefaultPosition, wxDefaultSize, 0 );
m_langLabel->Wrap( -1 );
m_langLabel->Wrap( 490 );
bSizerLanguage->Add( m_langLabel, 0, wxALL|wxEXPAND, 5 );
m_langAuto = new wxRadioButton( m_panelLanguage, wxID_ANY, _("Select language &automatically according to selected keyboard"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
@ -803,14 +803,86 @@ wxZRColaSettingsBase::wxZRColaSettingsBase( wxWindow* parent, wxWindowID id, con
m_panelLanguage->SetSizer( bSizerLanguage );
m_panelLanguage->Layout();
bSizerLanguage->Fit( m_panelLanguage );
m_listbook->AddPage( m_panelLanguage, _("Text Language"), true );
m_panelAutoStart = new wxPanel( m_listbook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panelTransformation = new wxPanel( m_listbook, wxID_ANY, wxDefaultPosition, wxSize( 500,-1 ), wxTAB_TRAVERSAL );
wxBoxSizer* bSizerTransformation;
bSizerTransformation = new wxBoxSizer( wxVERTICAL );
m_transLabel = new wxStaticText( m_panelTransformation, wxID_ANY, _("ZRCola offers multiple text transformations that can be arranged in a sequence.\nPlease select desired transformations and the order they are applied."), wxDefaultPosition, wxDefaultSize, 0 );
m_transLabel->Wrap( 490 );
bSizerTransformation->Add( m_transLabel, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgSizerTransformation;
fgSizerTransformation = new wxFlexGridSizer( 2, 3, 0, 0 );
fgSizerTransformation->AddGrowableCol( 0 );
fgSizerTransformation->AddGrowableCol( 2 );
fgSizerTransformation->AddGrowableRow( 0 );
fgSizerTransformation->SetFlexibleDirection( wxBOTH );
fgSizerTransformation->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
wxBoxSizer* bSizerTransAvailable;
bSizerTransAvailable = new wxBoxSizer( wxVERTICAL );
m_transAvailableLabel = new wxStaticText( m_panelTransformation, wxID_ANY, _("A&vailable:"), wxDefaultPosition, wxDefaultSize, 0 );
m_transAvailableLabel->Wrap( -1 );
bSizerTransAvailable->Add( m_transAvailableLabel, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_transAvailable = new wxListBox( m_panelTransformation, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT );
bSizerTransAvailable->Add( m_transAvailable, 1, wxALL|wxEXPAND, 5 );
fgSizerTransformation->Add( bSizerTransAvailable, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerTransActivate;
bSizerTransActivate = new wxBoxSizer( wxVERTICAL );
m_transActivate = new wxButton( m_panelTransformation, wxID_ANY, _(">"), wxDefaultPosition, wxSize( 32,32 ), 0 );
bSizerTransActivate->Add( m_transActivate, 0, wxALL, 5 );
m_transDeactivate = new wxButton( m_panelTransformation, wxID_ANY, _("<"), wxDefaultPosition, wxSize( 32,32 ), 0 );
bSizerTransActivate->Add( m_transDeactivate, 0, wxALL, 5 );
fgSizerTransformation->Add( bSizerTransActivate, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* bSizerTransActive;
bSizerTransActive = new wxBoxSizer( wxVERTICAL );
m_transActiveLabel = new wxStaticText( m_panelTransformation, wxID_ANY, _("&Active:"), wxDefaultPosition, wxDefaultSize, 0 );
m_transActiveLabel->Wrap( -1 );
bSizerTransActive->Add( m_transActiveLabel, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_transActive = new wxListBox( m_panelTransformation, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
bSizerTransActive->Add( m_transActive, 1, wxALL|wxEXPAND, 5 );
fgSizerTransformation->Add( bSizerTransActive, 1, wxEXPAND, 5 );
bSizerTransformation->Add( fgSizerTransformation, 1, wxEXPAND, 5 );
wxBoxSizer* bSizerTransActiveReorder;
bSizerTransActiveReorder = new wxBoxSizer( wxHORIZONTAL );
m_transActiveUp = new wxButton( m_panelTransformation, wxID_ANY, _("Up"), wxDefaultPosition, wxSize( 70,-1 ), 0 );
bSizerTransActiveReorder->Add( m_transActiveUp, 0, wxALL, 5 );
m_transActiveDown = new wxButton( m_panelTransformation, wxID_ANY, _("Down"), wxDefaultPosition, wxSize( 70,-1 ), 0 );
bSizerTransActiveReorder->Add( m_transActiveDown, 0, wxALL, 5 );
bSizerTransformation->Add( bSizerTransActiveReorder, 0, wxALIGN_RIGHT, 5 );
m_panelTransformation->SetSizer( bSizerTransformation );
m_panelTransformation->Layout();
m_listbook->AddPage( m_panelTransformation, _("Transformation"), false );
m_panelAutoStart = new wxPanel( m_listbook, wxID_ANY, wxDefaultPosition, wxSize( 500,-1 ), wxTAB_TRAVERSAL );
wxBoxSizer* bSizerAutoStart;
bSizerAutoStart = new wxBoxSizer( wxVERTICAL );
m_autoStartLabel = new wxStaticText( m_panelAutoStart, wxID_ANY, _("ZRCola can be launched every time you log in to your computer.\nIt will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."), wxDefaultPosition, wxDefaultSize, 0 );
m_autoStartLabel->Wrap( -1 );
m_autoStartLabel->Wrap( 490 );
bSizerAutoStart->Add( m_autoStartLabel, 0, wxALL|wxEXPAND, 5 );
m_autoStart = new wxCheckBox( m_panelAutoStart, wxID_ANY, _("Start ZRCola &automatically on logon"), wxDefaultPosition, wxDefaultSize, 0 );
@ -819,7 +891,6 @@ wxZRColaSettingsBase::wxZRColaSettingsBase( wxWindow* parent, wxWindowID id, con
m_panelAutoStart->SetSizer( bSizerAutoStart );
m_panelAutoStart->Layout();
bSizerAutoStart->Fit( m_panelAutoStart );
m_listbook->AddPage( m_panelAutoStart, _("Startup"), false );
#ifdef __WXGTK__ // Small icon style not supported in GTK
wxListView* m_listbookListView = m_listbook->GetListView();
@ -831,7 +902,7 @@ wxZRColaSettingsBase::wxZRColaSettingsBase( wxWindow* parent, wxWindowID id, con
m_listbookListView->SetWindowStyleFlag( m_listbookFlags );
#endif
bSizerContent->Add( m_listbook, 1, wxEXPAND | wxALL, 5 );
bSizerContent->Add( m_listbook, 1, wxALL|wxEXPAND, 5 );
bSizerContent->Add( 0, 0, 0, wxALL|wxEXPAND, 5 );
@ -856,8 +927,12 @@ wxZRColaSettingsBase::wxZRColaSettingsBase( wxWindow* parent, wxWindowID id, con
// Connect Events
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( wxZRColaSettingsBase::OnInitDialog ) );
m_langAuto->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( wxZRColaSettingsBase::OnLangAuto ), NULL, this );
m_langManual->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( wxZRColaSettingsBase::OnLangManual ), NULL, this );
m_panelLanguage->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxZRColaSettingsBase::OnLanguageUpdate ), NULL, this );
m_panelTransformation->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxZRColaSettingsBase::OnTransformationUpdate ), NULL, this );
m_transActivate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransActivate ), NULL, this );
m_transDeactivate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransDeactivate ), NULL, this );
m_transActiveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransActiveUp ), NULL, this );
m_transActiveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransActiveDown ), NULL, this );
m_sdbSizerButtonsApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnApplyButtonClick ), NULL, this );
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnOKButtonClick ), NULL, this );
}
@ -866,8 +941,12 @@ wxZRColaSettingsBase::~wxZRColaSettingsBase()
{
// Disconnect Events
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( wxZRColaSettingsBase::OnInitDialog ) );
m_langAuto->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( wxZRColaSettingsBase::OnLangAuto ), NULL, this );
m_langManual->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( wxZRColaSettingsBase::OnLangManual ), NULL, this );
m_panelLanguage->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxZRColaSettingsBase::OnLanguageUpdate ), NULL, this );
m_panelTransformation->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxZRColaSettingsBase::OnTransformationUpdate ), NULL, this );
m_transActivate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransActivate ), NULL, this );
m_transDeactivate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransDeactivate ), NULL, this );
m_transActiveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransActiveUp ), NULL, this );
m_transActiveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnTransActiveDown ), NULL, this );
m_sdbSizerButtonsApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnApplyButtonClick ), NULL, this );
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnOKButtonClick ), NULL, this );

View File

@ -70,7 +70,7 @@ class wxZRColaFrameBase : public wxFrame
wxID_SEND_ABORT,
wxID_SETTINGS,
wxID_TOOLBAR_EDIT,
wxID_TOOLBAR_TRANSLATE,
wxID_TOOLBAR_TRANSFORM,
wxID_PANEL_CHRGRPS,
wxID_HELP_INSTRUCTIONS,
wxID_HELP_SHORTCUTS,
@ -87,7 +87,7 @@ class wxZRColaFrameBase : public wxFrame
wxAuiToolBarItem* m_toolEditCut;
wxAuiToolBarItem* m_toolEditCopy;
wxAuiToolBarItem* m_toolEditPaste;
wxAuiToolBar* m_toolbarTranslate;
wxAuiToolBar* m_toolbarTransform;
wxAuiToolBarItem* m_toolCharSelect;
wxAuiToolBarItem* m_toolSendDestination;
wxAuiToolBarItem* m_toolSendSource;
@ -264,6 +264,16 @@ class wxZRColaSettingsBase : public wxDialog
wxRadioButton* m_langAuto;
wxRadioButton* m_langManual;
wxListBox* m_languages;
wxPanel* m_panelTransformation;
wxStaticText* m_transLabel;
wxStaticText* m_transAvailableLabel;
wxListBox* m_transAvailable;
wxButton* m_transActivate;
wxButton* m_transDeactivate;
wxStaticText* m_transActiveLabel;
wxListBox* m_transActive;
wxButton* m_transActiveUp;
wxButton* m_transActiveDown;
wxPanel* m_panelAutoStart;
wxStaticText* m_autoStartLabel;
wxCheckBox* m_autoStart;
@ -274,8 +284,12 @@ class wxZRColaSettingsBase : public wxDialog
// Virtual event handlers, overide them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnLangAuto( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLangManual( wxCommandEvent& event ) { event.Skip(); }
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnTransformationUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnTransActivate( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTransDeactivate( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTransActiveUp( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTransActiveDown( wxCommandEvent& event ) { event.Skip(); }
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }

View File

@ -27,6 +27,7 @@
wxZRColaSettings::wxZRColaSettings(wxWindow* parent) :
m_lang_auto(true),
m_lang(ZRCola::langid_t::blank),
m_transeq(1, 0), // By default use translation set 0 (ZRCola Decomposed >> ZRCola Composed)
wxZRColaSettingsBase(parent)
{
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
@ -38,6 +39,18 @@ wxZRColaSettings::wxZRColaSettings(wxWindow* parent) :
label_tran(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
m_languages->Insert(label_tran, i);
}
m_transAvailable->Clear();
for (size_t i = 0, n = app->m_ts_db.idxTranSet.size(); i < n; i++) {
const ZRCola::transet_db::transet &ts = app->m_ts_db.idxTranSet[i];
wxString
src(ts.src(), ts.src_len()),
dst(ts.dst(), ts.dst_len()),
src_tran(wxGetTranslation(src, wxT("ZRCola-zrcdb"))),
dst_tran(wxGetTranslation(dst, wxT("ZRCola-zrcdb"))),
label_tran(wxString::Format(wxT("%s \x00bb %s"), src_tran.c_str(), dst_tran.c_str()));
m_transAvailable->Append(label_tran, (void*)ts.set);
}
}
@ -58,22 +71,97 @@ void wxZRColaSettings::OnInitDialog(wxInitDialogEvent& event)
(m_lang_auto ? m_langAuto : m_langManual)->SetValue(true);
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
char l[sizeof(ZRCola::language_db::language)] = {};
((ZRCola::language_db::language*)l)->lang = m_lang;
ZRCola::language_db::indexLang::size_type start;
m_languages->Select(app->m_lang_db.idxLang.find(*(ZRCola::language_db::language*)l, start) ? start : -1);
m_languages->Select(app->m_lang_db.idxLang.find(ZRCola::language_db::language(m_lang), start) ? start : -1);
m_transActive->Clear();
for (auto s = m_transeq.cbegin(), s_end = m_transeq.cend(); s != s_end; ++s) {
ZRCola::transet_db::indexTranSet::size_type start;
if (app->m_ts_db.idxTranSet.find(ZRCola::transet_db::transet(*s), start)) {
const ZRCola::transet_db::transet &ts = app->m_ts_db.idxTranSet[start];
wxString
src(ts.src(), ts.src_len()),
dst(ts.dst(), ts.dst_len()),
src_tran(wxGetTranslation(src, wxT("ZRCola-zrcdb"))),
dst_tran(wxGetTranslation(dst, wxT("ZRCola-zrcdb"))),
label_tran(wxString::Format(wxT("%s \x00bb %s"), src_tran.c_str(), dst_tran.c_str()));
m_transActive->Append(label_tran, (void*)ts.set);
} else {
wxString label_tran(wxString::Format(_("Unknown transformation (%u)"), (unsigned int)*s));
m_transActive->Append(label_tran, (void*)*s);
}
}
}
void wxZRColaSettings::OnLangAuto(wxCommandEvent& event)
void wxZRColaSettings::OnLanguageUpdate(wxUpdateUIEvent& event)
{
m_languages->Enable(!event.IsChecked());
m_languages->Enable(m_langManual->GetValue());
wxZRColaSettingsBase::OnLanguageUpdate(event);
}
void wxZRColaSettings::OnLangManual(wxCommandEvent& event)
void wxZRColaSettings::OnTransformationUpdate(wxUpdateUIEvent& event)
{
m_languages->Enable(event.IsChecked());
m_transActivate->Enable(m_transAvailable->GetSelection() != wxNOT_FOUND);
int idx = m_transActive->GetSelection();
m_transDeactivate->Enable(idx != wxNOT_FOUND);
m_transActiveUp ->Enable(idx != wxNOT_FOUND && (unsigned int)idx > 0);
m_transActiveDown->Enable(idx != wxNOT_FOUND && (unsigned int)idx < m_transActive->GetCount() - 1);
wxZRColaSettingsBase::OnTransformationUpdate(event);
}
void wxZRColaSettings::OnTransActivate(wxCommandEvent& event)
{
int idx = m_transAvailable->GetSelection();
wxASSERT_MSG(idx != wxNOT_FOUND, wxT("no available transformation selected"));
m_transActive->Append(
m_transAvailable->GetString(idx),
m_transAvailable->GetClientData(idx));
wxZRColaSettingsBase::OnTransActivate(event);
}
void wxZRColaSettings::OnTransDeactivate(wxCommandEvent& event)
{
int idx = m_transActive->GetSelection();
wxASSERT_MSG(idx != wxNOT_FOUND, wxT("no active transformation selected"));
m_transActive->Delete(idx);
wxZRColaSettingsBase::OnTransDeactivate(event);
}
void wxZRColaSettings::OnTransActiveUp(wxCommandEvent& event)
{
int idx = m_transActive->GetSelection();
wxASSERT_MSG(idx != wxNOT_FOUND && (unsigned int)idx > 0, wxT("no or first active transformation selected"));
wxString label = m_transActive->GetString(idx);
void *data = m_transActive->GetClientData(idx);
m_transActive->Delete(idx);
m_transActive->Insert(label, idx - 1, data);
m_transActive->Select(idx - 1);
wxZRColaSettingsBase::OnTransActiveUp(event);
}
void wxZRColaSettings::OnTransActiveDown(wxCommandEvent& event)
{
int idx = m_transActive->GetSelection();
wxASSERT_MSG(idx != wxNOT_FOUND && (unsigned int)idx < m_transActive->GetCount() - 1, wxT("no or last active transformation selected"));
wxString label = m_transActive->GetString(idx);
void *data = m_transActive->GetClientData(idx);
m_transActive->Delete(idx);
m_transActive->Insert(label, idx + 1, data);
m_transActive->Select(idx + 1);
wxZRColaSettingsBase::OnTransActiveDown(event);
}
@ -127,11 +215,15 @@ void wxZRColaSettings::OnApplyButtonClick(wxCommandEvent& event)
if (m_lang != lang.lang) {
m_lang = lang.lang;
// Notify destination text something changed and should re-inverse translate.
// Notify destination text something changed and should re-inverse transform.
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
app->m_mainWnd->m_panel->m_destination->ProcessWindowEvent(event2);
}
}
m_transeq.clear();
for (unsigned int i = 0, n = m_transActive->GetCount(); i < n; i++)
m_transeq.push_back((ZRCola::transetid_t)m_transActive->GetClientData(i));
}
@ -159,6 +251,12 @@ void wxPersistentZRColaSettings::Save() const
SaveValue(wxT("langAuto"), wnd->m_lang_auto);
SaveValue(wxT("lang" ), wxString::FromAscii(wnd->m_lang.data, _countof(wnd->m_lang.data)));
wxString str;
bool first = true;
for (auto s = wnd->m_transeq.cbegin(), s_end = wnd->m_transeq.cend(); s != s_end; ++s, first = false)
str += wxString::Format(first ? wxT("%u") : wxT("|%u"), *s);
SaveValue(wxT("transeq"), str);
}
@ -185,5 +283,22 @@ bool wxPersistentZRColaSettings::Restore()
} else
wnd->m_lang = ZRCola::langid_t::blank;
wxString str;
if (RestoreValue(wxT("transeq"), &str)) {
std::vector<ZRCola::transetid_t> transeq;
for (wxStringTokenizer tok(str, wxT("|")); tok.HasMoreTokens(); ) {
unsigned long val = _tcstoul(tok.GetNextToken().c_str(), NULL, 10);
for (size_t i = 0, n = app->m_ts_db.idxTranSet.size(); i < n; i++) {
const ZRCola::transet_db::transet &cg = app->m_ts_db.idxTranSet[i];
if (cg.set == val) {
transeq.push_back(val);
break;
}
}
}
if (!transeq.empty())
wnd->m_transeq = std::move(transeq);
}
return wxPersistentDialog::Restore();
}

View File

@ -27,7 +27,9 @@ class wxPersistentZRColaSettings;
#pragma once
#include "zrcolagui.h"
#include <zrcola/translate.h>
#include <wxex/persist/dialog.h>
#include <vector>
///
@ -42,14 +44,19 @@ public:
protected:
virtual void OnInitDialog(wxInitDialogEvent& event);
virtual void OnLangAuto(wxCommandEvent& event);
virtual void OnLangManual(wxCommandEvent& event);
virtual void OnLanguageUpdate(wxUpdateUIEvent& event);
virtual void OnTransformationUpdate(wxUpdateUIEvent& event);
virtual void OnTransActivate(wxCommandEvent& event);
virtual void OnTransDeactivate(wxCommandEvent& event);
virtual void OnTransActiveUp(wxCommandEvent& event);
virtual void OnTransActiveDown(wxCommandEvent& event);
virtual void OnApplyButtonClick(wxCommandEvent& event);
virtual void OnOKButtonClick(wxCommandEvent& event);
public:
bool m_lang_auto; ///< Is language for inverse translation resolved using currently selected keyboard
ZRCola::langid_t m_lang; ///< Language for inverse translation
bool m_lang_auto; ///< Is language for inverse translation resolved using currently selected keyboard
ZRCola::langid_t m_lang; ///< Language for inverse translation
std::vector<ZRCola::transetid_t> m_transeq; ///< Transformation set sequence
};