Compare commits
62 Commits
ver/2.0.1
...
ver/2.1-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
593392782a | ||
|
|
e19a98a249 | ||
|
|
a66128b8ca | ||
|
|
6121f7ee12 | ||
|
|
d9527fe70f | ||
|
|
937c263d56 | ||
|
|
6487507570 | ||
|
|
84fa35c9be | ||
|
|
b8be10390b | ||
|
|
de6d890ac1 | ||
|
|
31b6f1a3e8 | ||
|
|
4c6839e9fe | ||
|
|
397cfe71dd | ||
|
|
1834543564 | ||
|
|
8f4f20f2b4 | ||
|
|
9bba0ca557 | ||
|
|
435b5c4a10 | ||
|
|
bc5058f168 | ||
|
|
5ba870158e | ||
|
|
a6693673a5 | ||
|
|
ba55173f28 | ||
|
|
12a053a495 | ||
|
|
8da5f88e0d | ||
|
|
5a4a20a873 | ||
|
|
7e50ba5974 | ||
|
|
91fd26a51d | ||
|
|
1ea5e52208 | ||
|
|
2a18117b17 | ||
|
|
b7bef14746 | ||
|
|
4aacc4abc5 | ||
|
|
2f6c789fdf | ||
|
|
57ceeadbe7 | ||
|
|
3b297c8427 | ||
|
|
92374e57a8 | ||
|
|
ace7551281 | ||
|
|
15e5f2d9e2 | ||
|
|
08397415c4 | ||
|
|
6dff6eed4f | ||
|
|
acbae76737 | ||
|
|
cc4a150501 | ||
|
|
186dbee443 | ||
|
|
716dde0a84 | ||
|
|
155642a3f9 | ||
|
|
7cb0317544 | ||
|
|
87a2828ce0 | ||
|
|
806aa550a5 | ||
|
|
ca306345c2 | ||
|
|
03ff056898 | ||
|
|
9f083bb521 | ||
|
|
a224454b3c | ||
|
|
bd0fdba435 | ||
|
|
87814981db | ||
|
|
acf86e2ce0 | ||
|
|
1016d5f738 | ||
|
|
4d53785af7 | ||
|
|
8e2a3860e3 | ||
|
|
0c2e666d0f | ||
|
|
d6075327ef | ||
|
|
14e665fdf2 | ||
|
|
55e2ee8c4d | ||
|
|
f444355d6d | ||
|
|
feb3c7c150 |
@@ -1,20 +0,0 @@
|
||||
# Localization of ZRCola
|
||||
|
||||
In order to get ZRCola experience in your language the following resources should be translated:
|
||||
|
||||
1. [ZRCola](https://poeditor.com/join/project/NTidhEPdDM)
|
||||
2. [ZRCola-zrcdb](https://poeditor.com/join/project/QBuYsTwk0d)
|
||||
3. [libZRColaUI](https://poeditor.com/join/project/vrnIvk5IOM)
|
||||
4. [Updater](https://poeditor.com/join/project/oDK4ktH3ZV)
|
||||
5. [wxExtend](https://poeditor.com/join/project/YmsdlC3CBv)
|
||||
6. Setup
|
||||
- [MSIBuildUI](https://poeditor.com/join/project/ikxWBlq1o5)
|
||||
- [MSIBuildCore](https://poeditor.com/join/project/RSCSsz9fXi)
|
||||
- [MSICALib](https://poeditor.com/join/project/cKP0wwBrHU)
|
||||
- [MSICA](https://poeditor.com/join/project/gCNPagUQvn)
|
||||
|
||||
## General Guidelines
|
||||
|
||||
Please use the Windows "official" translations for terms published at [Microsoft Language Portal](https://www.microsoft.com/en-us/language). This will provide a consistent terminology experience on Windows.
|
||||
|
||||
Should you need any assistance to get started, please do not hesitate to contact project maintainer at [simon.rozman@amebis.si](mailto:simon.rozman@amebis.si).
|
||||
Submodule MSI/MSIBuild updated: 61bca29e40...cc374d5acb
Submodule MSI/MSICA updated: d0dcb3d357...d809bfa122
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,6 @@ https://www.amebis.si/prenos/ZRCola/
|
||||
- _sed.exe_ and _grep.exe_
|
||||
- Command line utilities from Microsoft Windows SDK Bin folder: distributed with Visual Studio, add Bin folder to path manually.
|
||||
- Additional command line utilities from project's bin folder: add bin folder to path. The source code is provided on request.
|
||||
- wxWidgets 3.0 - set `WXWIN` environment variable to the folder where wxWidgets include and lib files are located. Official binary builds are required.
|
||||
|
||||
### Digital Signing of Build Outputs
|
||||
In order to have the build process digitally sign output files, one should provide the following:
|
||||
@@ -39,9 +38,6 @@ Use Microsoft NMAKE to build the project. The resulting files can be found in ou
|
||||
|
||||
The `/ls` flag can be appended to the commands above to reduce NMAKE's verbosity. You can combine multiple targets (i.e. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
||||
|
||||
## Translating ZRCola
|
||||
Instructions how to translate ZRCola to your language can be found [here](LOCALIZATION.md).
|
||||
|
||||
## Contact Information
|
||||
Please contact the following addressee for further information and help:
|
||||
- ZRC SAZU, ZRCola@zrc-sazu.si
|
||||
|
||||
1156
ZRCola/ZRCola.fbp
1156
ZRCola/ZRCola.fbp
File diff suppressed because it is too large
Load Diff
BIN
ZRCola/ZRCola.rc
BIN
ZRCola/ZRCola.rc
Binary file not shown.
@@ -91,6 +91,7 @@
|
||||
<ClCompile Include="zrcolagui.cpp" />
|
||||
<ClCompile Include="zrcolakeyhndlr.cpp" />
|
||||
<ClCompile Include="zrcolasettings.cpp" />
|
||||
<ClCompile Include="zrcolatranseq.cpp" />
|
||||
<ClCompile Include="zrcolaupdater.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -106,6 +107,7 @@
|
||||
<ClInclude Include="zrcolagui.h" />
|
||||
<ClInclude Include="zrcolakeyhndlr.h" />
|
||||
<ClInclude Include="zrcolasettings.h" />
|
||||
<ClInclude Include="zrcolatranseq.h" />
|
||||
<ClInclude Include="zrcolaupdater.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -128,6 +130,8 @@
|
||||
<ItemGroup>
|
||||
<None Include="locale\ZRCola.pot" />
|
||||
<None Include="res\char_select.ico" />
|
||||
<None Include="res\copy_composed_and_return.ico" />
|
||||
<None Include="res\copy_decomposed_and_return.ico" />
|
||||
<None Include="res\edit_copy.ico" />
|
||||
<None Include="res\edit_cut.ico" />
|
||||
<None Include="res\edit_paste.ico" />
|
||||
@@ -137,7 +141,9 @@
|
||||
<None Include="res\send_composed.ico" />
|
||||
<None Include="res\send_decomposed.ico" />
|
||||
<None Include="res\zrcola.ico" />
|
||||
<None Include="ZRCola.fbp" />
|
||||
<None Include="ZRCola.fbp">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRCola.rc" />
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
<ClCompile Include="zrcolachrreq.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="zrcolatranseq.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
@@ -99,6 +102,9 @@
|
||||
<ClInclude Include="zrcolachrreq.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="zrcolatranseq.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\zrcola.ico">
|
||||
@@ -137,6 +143,12 @@
|
||||
<None Include="res\navigate_forward.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\copy_composed_and_return.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="res\copy_decomposed_and_return.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRCola.rc">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,15 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola\n"
|
||||
"POT-Creation-Date: 2016-10-18 10:10+0200\n"
|
||||
"PO-Revision-Date: 2016-10-18 10:10+0200\n"
|
||||
"POT-Creation-Date: 2017-06-01 18:04+0200\n"
|
||||
"PO-Revision-Date: 2017-06-01 18:04+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"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.10\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
@@ -20,74 +20,79 @@ msgstr ""
|
||||
msgid "© 2004-%s ZRC SAZU"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolaapp.cpp:71 zrcolafrm.cpp:90 zrcolagui.cpp:874 zrcolagui.h:104
|
||||
#: MSIBuild/en_US.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: zrcolaapp.cpp:72 zrcolafrm.cpp:106 zrcolagui.cpp:894 zrcolagui.h:108
|
||||
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1004
|
||||
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1024
|
||||
#, fuzzy
|
||||
msgid "Character"
|
||||
msgstr "Eingabe eines Zeichenstils"
|
||||
|
||||
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1025
|
||||
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1045
|
||||
#, fuzzy
|
||||
msgid "Context"
|
||||
msgstr "Konnte den Kontext auf dem überlagerten Fenster nicht initialisieren."
|
||||
|
||||
#: zrcolachrreq.cpp:64 zrcolagui.h:363
|
||||
#: zrcolachrreq.cpp:64 zrcolagui.h:366
|
||||
msgid "Request a New Character"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolachrslct.cpp:46 zrcolachrslct.cpp:226 zrcolachrslct.cpp:677
|
||||
#: zrcolachrslct.cpp:89
|
||||
msgid "Too many digits in Unicode."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolachrslct.cpp:89 zrcolachrslct.cpp:107
|
||||
msgid "Validation conflict"
|
||||
msgstr "Fehler bei der Validierung"
|
||||
|
||||
#: zrcolachrslct.cpp:107
|
||||
#, c-format
|
||||
msgid "Invalid character in Unicode found: %c"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
|
||||
msgid "▸ Search Options"
|
||||
msgstr ""
|
||||
|
||||
# Recitation separator
|
||||
#: zrcolachrslct.cpp:164
|
||||
#: zrcolachrslct.cpp:328
|
||||
#, fuzzy
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: zrcolachrslct.cpp:229 zrcolachrslct.cpp:674
|
||||
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
|
||||
msgid "▾ Search Options"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolafrm.cpp:141
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
#: zrcolafrm.cpp:90
|
||||
msgid "Custom Translation..."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolafrm.cpp:141 zrcolafrm.cpp:143
|
||||
#: zrcolafrm.cpp:175
|
||||
msgid "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolafrm.cpp:175 zrcolafrm.cpp:177
|
||||
#, fuzzy
|
||||
msgid "Warning"
|
||||
msgstr "Warnung: "
|
||||
|
||||
#: zrcolafrm.cpp:143
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
#: zrcolafrm.cpp:177
|
||||
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolafrm.cpp:351
|
||||
#: zrcolafrm.cpp:410
|
||||
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/"
|
||||
|
||||
#: zrcolafrm.cpp:375
|
||||
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"
|
||||
#: zrcolafrm.cpp:434
|
||||
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"
|
||||
|
||||
#: zrcolagui.cpp:36
|
||||
msgid "E&xit"
|
||||
@@ -117,7 +122,7 @@ msgstr ""
|
||||
msgid "Find C&haracter..."
|
||||
msgstr "Eingabe eines Zeichenstils"
|
||||
|
||||
#: zrcolagui.cpp:78 zrcolagui.cpp:180
|
||||
#: zrcolagui.cpp:78 zrcolagui.cpp:198
|
||||
msgid "Display character search to select character to insert into text"
|
||||
msgstr ""
|
||||
|
||||
@@ -126,595 +131,595 @@ msgstr ""
|
||||
msgid "&Send Composed"
|
||||
msgstr "Pošlji sestavljeno (F5)"
|
||||
|
||||
#: zrcolagui.cpp:89 zrcolagui.cpp:182
|
||||
#: zrcolagui.cpp:89 zrcolagui.cpp:200
|
||||
msgid "Send composed text to source window"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "Copy Composed and &Return"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "Copy composed text to clipboard and return focus to source window"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#, fuzzy
|
||||
msgid "Send &Decomposed"
|
||||
msgstr "Pošlji razstavljeno (F6)"
|
||||
|
||||
#: zrcolagui.cpp:98 zrcolagui.cpp:184
|
||||
#: zrcolagui.cpp:107 zrcolagui.cpp:202
|
||||
msgid "Send decomposed text to source window"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Copy Decomposed and Re&turn"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Copy decomposed text to clipboard and return focus to source window"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
msgid "Abort (De)composition"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#: zrcolagui.cpp:125
|
||||
msgid "Abort composition and return focus to source window"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:118
|
||||
#: zrcolagui.cpp:136
|
||||
msgid "&Settings..."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:118
|
||||
#: zrcolagui.cpp:136
|
||||
msgid "Open program configuration dialog"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:121
|
||||
#: zrcolagui.cpp:139
|
||||
#, fuzzy
|
||||
msgid "&Edit"
|
||||
msgstr "&Bearbeiten"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
#: zrcolagui.cpp:143
|
||||
msgid "&Edit Toolbar"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
#: zrcolagui.cpp:143
|
||||
msgid "Toggle edit toolbar"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:129
|
||||
#: zrcolagui.cpp:147
|
||||
msgid "&Compose Toolbar"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:129
|
||||
#: zrcolagui.cpp:147
|
||||
msgid "Toggle compose toolbar"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:135
|
||||
#: zrcolagui.cpp:153
|
||||
msgid "Character Catalo&g"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:135
|
||||
#: zrcolagui.cpp:153
|
||||
msgid "Toggle character catalog panel"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:138
|
||||
#: zrcolagui.cpp:156
|
||||
#, fuzzy
|
||||
msgid "&View"
|
||||
msgstr "&Ansicht..."
|
||||
|
||||
#: zrcolagui.cpp:142
|
||||
#: zrcolagui.cpp:160
|
||||
msgid "&Instructions..."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:142
|
||||
#: zrcolagui.cpp:160
|
||||
msgid "Open a web site with product instructions"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:146
|
||||
#: zrcolagui.cpp:164
|
||||
msgid "Keyboard &Shortcuts..."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:146
|
||||
#: zrcolagui.cpp:164
|
||||
msgid "Open a list of keyboard shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:152
|
||||
#: zrcolagui.cpp:170
|
||||
msgid "&Request a new character..."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:152
|
||||
#: zrcolagui.cpp:170
|
||||
msgid "Submit a request to ZRC to add a new character"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:156
|
||||
#: zrcolagui.cpp:174
|
||||
msgid "Check for &Updates..."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:156
|
||||
#: zrcolagui.cpp:174
|
||||
msgid "Check online for product update"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:162
|
||||
#: zrcolagui.cpp:180
|
||||
#, fuzzy
|
||||
msgid "&About..."
|
||||
msgstr ""
|
||||
msgstr "Über..."
|
||||
|
||||
#: zrcolagui.cpp:165
|
||||
#: zrcolagui.cpp:183
|
||||
#, fuzzy
|
||||
msgid "&Help"
|
||||
msgstr "&Hilfe"
|
||||
|
||||
#: zrcolagui.cpp:170
|
||||
#: zrcolagui.cpp:188
|
||||
#, fuzzy
|
||||
msgid "Cut"
|
||||
msgstr "Ausschneiden"
|
||||
|
||||
#: zrcolagui.cpp:170
|
||||
#: zrcolagui.cpp:188
|
||||
#, fuzzy
|
||||
msgid "Cut selection"
|
||||
msgstr "Auswahl ausschneiden"
|
||||
|
||||
#: zrcolagui.cpp:172
|
||||
#: zrcolagui.cpp:190
|
||||
#, fuzzy
|
||||
msgid "Copy"
|
||||
msgstr "Kopieren"
|
||||
|
||||
#: zrcolagui.cpp:172
|
||||
#: zrcolagui.cpp:190
|
||||
#, fuzzy
|
||||
msgid "Copy selection"
|
||||
msgstr "Auswahl kopieren"
|
||||
|
||||
#: zrcolagui.cpp:174
|
||||
#: zrcolagui.cpp:192
|
||||
#, fuzzy
|
||||
msgid "Paste"
|
||||
msgstr "Einfügen"
|
||||
|
||||
#: zrcolagui.cpp:174
|
||||
#: zrcolagui.cpp:192
|
||||
#, fuzzy
|
||||
msgid "Paste selection"
|
||||
msgstr "Auswahl einfügen"
|
||||
|
||||
#: zrcolagui.cpp:177
|
||||
#: zrcolagui.cpp:195
|
||||
#, fuzzy
|
||||
msgid "Edit"
|
||||
msgstr "Bearbeiten"
|
||||
|
||||
#: zrcolagui.cpp:180
|
||||
#: zrcolagui.cpp:198
|
||||
#, fuzzy
|
||||
msgid "Find Character"
|
||||
msgstr "Eingabe eines Zeichenstils"
|
||||
|
||||
#: zrcolagui.cpp:182
|
||||
#: zrcolagui.cpp:200
|
||||
#, fuzzy
|
||||
msgid "Send Composed"
|
||||
msgstr "Pošlji sestavljeno (F5)"
|
||||
|
||||
#: zrcolagui.cpp:184
|
||||
#: zrcolagui.cpp:202
|
||||
#, fuzzy
|
||||
msgid "Send Decomposed"
|
||||
msgstr "Pošlji razstavljeno (F6)"
|
||||
|
||||
#: zrcolagui.cpp:187
|
||||
#: zrcolagui.cpp:209
|
||||
msgid "Compose"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:191
|
||||
#: zrcolagui.cpp:213
|
||||
msgid "Character Catalog"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:195
|
||||
#: zrcolagui.cpp:217
|
||||
msgid "(De)Composer"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:234
|
||||
#: zrcolagui.cpp:258
|
||||
msgid "Decomposed Text"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:254
|
||||
#: zrcolagui.cpp:278
|
||||
msgid "Decomposed Unicode Dump"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:281
|
||||
#: zrcolagui.cpp:305
|
||||
msgid "Composed Text"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:301
|
||||
#: zrcolagui.cpp:325
|
||||
msgid "Composed Unicode Dump"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:355
|
||||
#: zrcolagui.cpp:379
|
||||
msgid "Select category to display"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:389
|
||||
#: zrcolagui.cpp:413
|
||||
#, fuzzy
|
||||
msgid "Show &All"
|
||||
msgstr "Alles zeigen"
|
||||
|
||||
#: zrcolagui.cpp:390
|
||||
#: zrcolagui.cpp:414
|
||||
msgid "Toggle display of less frequent characters"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:430
|
||||
#: zrcolagui.cpp:454
|
||||
#, fuzzy
|
||||
msgid "&Browse"
|
||||
msgstr "Durchsuchen"
|
||||
|
||||
#: zrcolagui.cpp:437
|
||||
msgid ""
|
||||
"Full or partial terms from Unicode character description (in English) to "
|
||||
"search for"
|
||||
#: zrcolagui.cpp:461
|
||||
msgid "Full or partial terms from Unicode character description (in English) to search for"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:441
|
||||
#: zrcolagui.cpp:465
|
||||
msgid "Search Options"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:442
|
||||
#: zrcolagui.cpp:466
|
||||
msgid "Shows/hides additional search options"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:454
|
||||
#: zrcolagui.cpp:478
|
||||
msgid "List of Unicode character categories to search in"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:461
|
||||
#: zrcolagui.cpp:485
|
||||
#, fuzzy
|
||||
msgid "All"
|
||||
msgstr "Alle"
|
||||
|
||||
#: zrcolagui.cpp:462
|
||||
#: zrcolagui.cpp:486
|
||||
msgid "Select all categories"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:466
|
||||
#: zrcolagui.cpp:490
|
||||
#, fuzzy
|
||||
msgid "None"
|
||||
msgstr "Kein"
|
||||
|
||||
#: zrcolagui.cpp:467
|
||||
#: zrcolagui.cpp:491
|
||||
#, fuzzy
|
||||
msgid "Clear category selection"
|
||||
msgstr "Auswahl kopieren"
|
||||
|
||||
#: zrcolagui.cpp:471
|
||||
#: zrcolagui.cpp:495
|
||||
msgid "Invert"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:472
|
||||
#: zrcolagui.cpp:496
|
||||
#, fuzzy
|
||||
msgid "Invert category selection"
|
||||
msgstr "Auswahl einfügen"
|
||||
|
||||
#: zrcolagui.cpp:511
|
||||
#: zrcolagui.cpp:535
|
||||
#, fuzzy
|
||||
msgid "Character search results"
|
||||
msgstr "Skupine &znakov"
|
||||
|
||||
#: zrcolagui.cpp:521
|
||||
#: zrcolagui.cpp:545
|
||||
msgid "Re¢ly Used"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:549
|
||||
#: zrcolagui.cpp:573
|
||||
msgid "List of recently inserted characters"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:563
|
||||
#: zrcolagui.cpp:587
|
||||
#, fuzzy
|
||||
msgid "Preview"
|
||||
msgstr " Vorschau"
|
||||
|
||||
#: zrcolagui.cpp:568
|
||||
#: zrcolagui.cpp:592
|
||||
msgid "U+"
|
||||
msgstr "U+"
|
||||
|
||||
#: zrcolagui.cpp:573
|
||||
#: zrcolagui.cpp:597
|
||||
msgid "Unicode hexadecimal code"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:578
|
||||
#: zrcolagui.cpp:602
|
||||
msgid "Keyboard shortcut in Composer window"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:613
|
||||
#: zrcolagui.cpp:637
|
||||
#, fuzzy
|
||||
msgid "Character preview"
|
||||
msgstr "Skupine &znakov"
|
||||
|
||||
#: zrcolagui.cpp:618
|
||||
#: zrcolagui.cpp:642
|
||||
msgid "Unicode character description"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:623
|
||||
#: zrcolagui.cpp:647
|
||||
#, fuzzy
|
||||
msgid "Character tags"
|
||||
msgstr "Eingabe eines Zeichenstils"
|
||||
|
||||
#: zrcolagui.cpp:628
|
||||
#: zrcolagui.cpp:652
|
||||
msgid "Unicode character category"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:635
|
||||
#: zrcolagui.cpp:659
|
||||
#, fuzzy
|
||||
msgid "« Back"
|
||||
msgstr "< &Zurück"
|
||||
|
||||
#: zrcolagui.cpp:637
|
||||
#: zrcolagui.cpp:661
|
||||
msgid "To previously viewed character"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:641
|
||||
#: zrcolagui.cpp:665
|
||||
#, fuzzy
|
||||
msgid "Forward »"
|
||||
msgstr "&Vorwärts"
|
||||
|
||||
#: zrcolagui.cpp:643
|
||||
#: zrcolagui.cpp:667
|
||||
msgid "To following viewed character"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:654
|
||||
#: zrcolagui.cpp:678
|
||||
msgid "Re&lated"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:681
|
||||
#: zrcolagui.cpp:705
|
||||
msgid "List of related characters"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:770
|
||||
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:774
|
||||
msgid "Select language &automatically according to selected keyboard"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:777
|
||||
msgid "&Manually select the language from the list below:"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:789
|
||||
msgid "Text Language"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:794
|
||||
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."
|
||||
"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:798
|
||||
msgid "Select language &automatically according to selected keyboard"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:801
|
||||
msgid "&Manually select the language from the list below:"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:812
|
||||
msgid "Text Language"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:817
|
||||
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:821
|
||||
msgid "Start ZRCola &automatically on logon"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:805
|
||||
#: zrcolagui.cpp:827
|
||||
msgid "Startup"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:885
|
||||
#: zrcolagui.cpp:905
|
||||
msgid ""
|
||||
"Program and Website Editor: Janoš Ježovnik\n"
|
||||
"Development: Amebis, d. o. o., Kamnik\n"
|
||||
"Translation into English: Janoš Ježovnik\n"
|
||||
"Translation into Russian language: Domen Krvina, Silvo Torkar, Anastasia "
|
||||
"Plotnikova\n"
|
||||
"Translation into Russian language: Domen Krvina, Silvo Torkar, Anastasia Plotnikova\n"
|
||||
"Development and maintenance of the original program (2004–2015): Peter Weiss"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:893
|
||||
#: zrcolagui.cpp:913
|
||||
#, fuzzy
|
||||
msgid "zrcola.zrc-sazu.si"
|
||||
msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/"
|
||||
|
||||
#: zrcolagui.cpp:919
|
||||
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:899
|
||||
msgid ""
|
||||
"Texts made using ZRCola have to include in a footnote or some other "
|
||||
"appropriate part of the publication the note below:"
|
||||
#: zrcolagui.cpp:923
|
||||
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:903
|
||||
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:944
|
||||
#: zrcolagui.cpp:964
|
||||
#, fuzzy
|
||||
msgid "Log"
|
||||
msgstr "&Log"
|
||||
|
||||
#: zrcolagui.cpp:960
|
||||
#: zrcolagui.cpp:980
|
||||
#, fuzzy
|
||||
msgid "Quit and &Update..."
|
||||
msgstr "Kann Benutzer-Konfigurationsdatei nicht aktualisieren."
|
||||
|
||||
#: zrcolagui.cpp:962
|
||||
#: zrcolagui.cpp:982
|
||||
msgid "Exit this program and launch product update"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:966
|
||||
#: zrcolagui.cpp:986
|
||||
#, fuzzy
|
||||
msgid "&Close"
|
||||
msgstr "&Schließen"
|
||||
|
||||
#: zrcolagui.cpp:967
|
||||
#: zrcolagui.cpp:987
|
||||
#, fuzzy
|
||||
msgid "Close this window"
|
||||
msgstr "Fenster schließen"
|
||||
|
||||
#: zrcolagui.cpp:1006
|
||||
#: zrcolagui.cpp:1026
|
||||
msgid "Enter the &character you would like to request:"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1013
|
||||
#: zrcolagui.cpp:1033
|
||||
msgid "Decomposed character to request"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1017
|
||||
#: zrcolagui.cpp:1037
|
||||
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."
|
||||
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1027
|
||||
msgid ""
|
||||
"The &context, examples or description why and where the character is "
|
||||
"required:"
|
||||
#: zrcolagui.cpp:1047
|
||||
msgid "The &context, examples or description why and where the character is required:"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1033
|
||||
#: zrcolagui.cpp:1053
|
||||
msgid "Additional notes for character request"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1040
|
||||
#: zrcolagui.cpp:1060
|
||||
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."
|
||||
"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."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1102
|
||||
msgid "Translation"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1104
|
||||
msgid ""
|
||||
"ZRCola offers multiple text translations that can be arranged in a sequence.\n"
|
||||
"Please select desired translations and the order they are applied."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1114
|
||||
msgid "A&vailable:"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1129
|
||||
msgid ">"
|
||||
msgstr ">"
|
||||
|
||||
#: zrcolagui.cpp:1132
|
||||
msgid "<"
|
||||
msgstr "<"
|
||||
|
||||
#: zrcolagui.cpp:1141
|
||||
#, fuzzy
|
||||
msgid "&Selected:"
|
||||
msgstr "Izreže izbrano besedilo in ga shrani na odložišče"
|
||||
|
||||
#: zrcolagui.cpp:1159
|
||||
#, fuzzy
|
||||
msgid "Up"
|
||||
msgstr "Up"
|
||||
|
||||
#: zrcolagui.cpp:1162
|
||||
#, fuzzy
|
||||
msgid "Down"
|
||||
msgstr "Down"
|
||||
|
||||
#: zrcolagui.h:250
|
||||
#, fuzzy
|
||||
msgid "Character Search"
|
||||
msgstr "Skupine &znakov"
|
||||
|
||||
#: zrcolagui.h:286
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.h:312
|
||||
msgid "About ZRCola"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.h:337 zrcolaupdater.cpp:94
|
||||
msgid "Product Update"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.h:408
|
||||
msgid "Custom Translation Sequence"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolakeyhndlr.cpp:44
|
||||
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."
|
||||
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:87
|
||||
msgid "Start ZRCola automatically on logon"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolatranseq.cpp:63
|
||||
#, c-format
|
||||
msgid "Unknown translation (%u)"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolaupdater.cpp:94
|
||||
msgid ""
|
||||
"This program will now close and the upgrade will be launched.\n"
|
||||
"Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolaupdater.cpp:94 zrcolagui.h:334
|
||||
msgid "Product Update"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.h:246
|
||||
#, fuzzy
|
||||
msgid "Character Search"
|
||||
msgstr "Skupine &znakov"
|
||||
|
||||
#: zrcolagui.h:283
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.h:309
|
||||
msgid "About ZRCola"
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:15
|
||||
msgid "binUIHeader.bmp"
|
||||
msgstr "binUIHeader.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:5
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting"
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:6
|
||||
msgid "bintutorial1.bmp"
|
||||
msgstr "bintutorial1.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:7
|
||||
msgid ""
|
||||
"When configured, ZRCola starts at system startup and runs in the background. "
|
||||
"If needed, it can be brought up by pressing the combination Win+F5."
|
||||
msgid "When configured, ZRCola starts at system startup and runs in the background. If needed, it can be brought up by pressing the combination Win+F5."
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:8
|
||||
msgid ""
|
||||
"IMPORTANT: Upon pressing the combination Win+F5 the program memorises the "
|
||||
"location of the cursor in the text. If ZRCola is brought to the foreground "
|
||||
"without using the aforementioned combination of keys, the program won't know "
|
||||
"where to insert the special characters!"
|
||||
msgid "IMPORTANT: Upon pressing the combination Win+F5 the program memorises the location of the cursor in the text. If ZRCola is brought to the foreground without using the aforementioned combination of keys, the program won't know where to insert the special characters!"
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:19
|
||||
#, fuzzy
|
||||
msgid "&Continue"
|
||||
msgstr "Konnte den Kontext auf dem überlagerten Fenster nicht initialisieren."
|
||||
msgstr "Auf Volume \"[2]\" steht nicht genügend Speicherplatz für die Installation bei aktivierter Wiederherstellungsoption zur Verfügung. [3] KB sind erforderlich, aber nur [4] KB sind verfügbar. Klicken Sie auf \"Ignorieren\", um die Installation ohne Speicherung von Wiederherstellungsinformationen fortzusetzen, klicken Sie auf \"Wiederholen\", um den verfügbaren Speicher erneut zu überprüfen oder auf \"Abbrechen\", um die Installation abzubrechen."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:11
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition"
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:12
|
||||
msgid "bintutorial2.bmp"
|
||||
msgstr "bintutorial2.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:13
|
||||
msgid ""
|
||||
"The string of basic and substitute characters is entered into the upper "
|
||||
"input window of the program. In the window below the resulted special "
|
||||
"characters are displayed. To insert them in the text, the F5 key is used."
|
||||
msgid "The string of basic and substitute characters is entered into the upper input window of the program. In the window below the resulted special characters are displayed. To insert them in the text, the F5 key is used."
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:16
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters"
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:17
|
||||
msgid "bintutorial3.bmp"
|
||||
msgstr "bintutorial3.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:18
|
||||
msgid ""
|
||||
"Characters can be entered using keyboard shortcuts, the character catalogue "
|
||||
"(F4) or the character finding tool (F8)."
|
||||
msgid "Characters can be entered using keyboard shortcuts, the character catalogue (F4) or the character finding tool (F8)."
|
||||
msgstr ""
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "Input system for linguistic use"
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola\n"
|
||||
"POT-Creation-Date: 2016-10-18 10:09+0200\n"
|
||||
"PO-Revision-Date: 2016-10-18 10:10+0200\n"
|
||||
"POT-Creation-Date: 2017-06-01 18:04+0200\n"
|
||||
"PO-Revision-Date: 2017-06-01 18:05+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"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.10\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: _\n"
|
||||
|
||||
@@ -21,74 +20,75 @@ msgstr ""
|
||||
msgid "© 2004-%s ZRC SAZU"
|
||||
msgstr "© 2004–%s ZRC SAZU"
|
||||
|
||||
#: zrcolaapp.cpp:71 zrcolafrm.cpp:90 zrcolagui.cpp:874 zrcolagui.h:104
|
||||
#: MSIBuild/en_US.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: zrcolaapp.cpp:72 zrcolafrm.cpp:106 zrcolagui.cpp:894 zrcolagui.h:108
|
||||
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1004
|
||||
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1024
|
||||
msgid "Character"
|
||||
msgstr "Знак"
|
||||
|
||||
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1025
|
||||
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1045
|
||||
msgid "Context"
|
||||
msgstr "Контекст"
|
||||
|
||||
#: zrcolachrreq.cpp:64 zrcolagui.h:363
|
||||
#: zrcolachrreq.cpp:64 zrcolagui.h:366
|
||||
msgid "Request a New Character"
|
||||
msgstr "Запрос нового знака"
|
||||
|
||||
#: zrcolachrslct.cpp:46 zrcolachrslct.cpp:226 zrcolachrslct.cpp:677
|
||||
#: zrcolachrslct.cpp:89
|
||||
msgid "Too many digits in Unicode."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolachrslct.cpp:89 zrcolachrslct.cpp:107
|
||||
msgid "Validation conflict"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolachrslct.cpp:107
|
||||
#, c-format
|
||||
msgid "Invalid character in Unicode found: %c"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
|
||||
msgid "▸ Search Options"
|
||||
msgstr "▸ Опции поиска"
|
||||
|
||||
# Recitation separator
|
||||
#: zrcolachrslct.cpp:164
|
||||
#: zrcolachrslct.cpp:328
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: zrcolachrslct.cpp:229 zrcolachrslct.cpp:674
|
||||
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
|
||||
msgid "▾ Search Options"
|
||||
msgstr "▾ Опции поиска"
|
||||
|
||||
#: zrcolafrm.cpp:141
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
#: zrcolafrm.cpp:90
|
||||
msgid "Custom Translation..."
|
||||
msgstr ""
|
||||
"Сочетание клавиш Win+F5 \n"
|
||||
"регистрировать. Некоторые функциональности не будут доступны."
|
||||
|
||||
#: zrcolafrm.cpp:141 zrcolafrm.cpp:143
|
||||
#: zrcolafrm.cpp:175
|
||||
msgid "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."
|
||||
msgstr "Сочетание клавиш Win+F5 регистрировать. Некоторые функциональности не будут доступны."
|
||||
|
||||
#: zrcolafrm.cpp:175 zrcolafrm.cpp:177
|
||||
msgid "Warning"
|
||||
msgstr "Предупреждение"
|
||||
|
||||
#: zrcolafrm.cpp:143
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
msgstr ""
|
||||
"Сочетание клавиш Win+F6 невозможно регистрировать. Некоторые "
|
||||
"функциональности не будут доступны."
|
||||
#: zrcolafrm.cpp:177
|
||||
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
|
||||
msgstr "Сочетание клавиш Win+F6 невозможно регистрировать. Некоторые функциональности не будут доступны."
|
||||
|
||||
#: zrcolafrm.cpp:351
|
||||
#: zrcolafrm.cpp:410
|
||||
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/"
|
||||
|
||||
#: zrcolafrm.cpp:375
|
||||
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"
|
||||
#: zrcolafrm.cpp:434
|
||||
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"
|
||||
|
||||
#: zrcolagui.cpp:36
|
||||
msgid "E&xit"
|
||||
@@ -114,7 +114,7 @@ msgstr "Выделить весь текст"
|
||||
msgid "Find C&haracter..."
|
||||
msgstr "Поиск &знака ..."
|
||||
|
||||
#: zrcolagui.cpp:78 zrcolagui.cpp:180
|
||||
#: zrcolagui.cpp:78 zrcolagui.cpp:198
|
||||
msgid "Display character search to select character to insert into text"
|
||||
msgstr "Показать браузер знаков для вставления выбранного знака"
|
||||
|
||||
@@ -122,452 +122,496 @@ msgstr "Показать браузер знаков для вставления
|
||||
msgid "&Send Composed"
|
||||
msgstr "&Послать составленное"
|
||||
|
||||
#: zrcolagui.cpp:89 zrcolagui.cpp:182
|
||||
#: zrcolagui.cpp:89 zrcolagui.cpp:200
|
||||
msgid "Send composed text to source window"
|
||||
msgstr "Послать составленный текст в исходное окно"
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "Copy Composed and &Return"
|
||||
msgstr "Копировать составленное и &возвратиться"
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "Copy composed text to clipboard and return focus to source window"
|
||||
msgstr "Копировать составленный текст в буфер обмена и возвратить фокус в исходное окно"
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
msgid "Send &Decomposed"
|
||||
msgstr "Послать &разобранное"
|
||||
|
||||
#: zrcolagui.cpp:98 zrcolagui.cpp:184
|
||||
#: zrcolagui.cpp:107 zrcolagui.cpp:202
|
||||
msgid "Send decomposed text to source window"
|
||||
msgstr "Послать разобранный текст в исходное окно"
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Copy Decomposed and Re&turn"
|
||||
msgstr "Копировать разобранное и возв&ратиться"
|
||||
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Copy decomposed text to clipboard and return focus to source window"
|
||||
msgstr "Копировать разобранный текст в буфер обмена и возвратить фокус в исходное окно"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
msgid "Abort (De)composition"
|
||||
msgstr "Прервать составление/разборку"
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#: zrcolagui.cpp:125
|
||||
msgid "Abort composition and return focus to source window"
|
||||
msgstr "Прервать составление и возвратить фокус в исходное окно"
|
||||
|
||||
#: zrcolagui.cpp:118
|
||||
#: zrcolagui.cpp:136
|
||||
msgid "&Settings..."
|
||||
msgstr "&Настройки ..."
|
||||
|
||||
#: zrcolagui.cpp:118
|
||||
#: zrcolagui.cpp:136
|
||||
msgid "Open program configuration dialog"
|
||||
msgstr "Открыть диалог конфигурации программы"
|
||||
|
||||
#: zrcolagui.cpp:121
|
||||
#: zrcolagui.cpp:139
|
||||
msgid "&Edit"
|
||||
msgstr "&Правка"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
#: zrcolagui.cpp:143
|
||||
msgid "&Edit Toolbar"
|
||||
msgstr "Панель инструментов для &правки"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
#: zrcolagui.cpp:143
|
||||
msgid "Toggle edit toolbar"
|
||||
msgstr "Переключить панель инструментов для правки"
|
||||
|
||||
#: zrcolagui.cpp:129
|
||||
#: zrcolagui.cpp:147
|
||||
msgid "&Compose Toolbar"
|
||||
msgstr "Панель инструментов для &составления"
|
||||
|
||||
#: zrcolagui.cpp:129
|
||||
#: zrcolagui.cpp:147
|
||||
msgid "Toggle compose toolbar"
|
||||
msgstr "Переключить панель инструментов для составления"
|
||||
|
||||
#: zrcolagui.cpp:135
|
||||
#: zrcolagui.cpp:153
|
||||
msgid "Character Catalo&g"
|
||||
msgstr "Список &знаков"
|
||||
|
||||
#: zrcolagui.cpp:135
|
||||
#: zrcolagui.cpp:153
|
||||
msgid "Toggle character catalog panel"
|
||||
msgstr "Переключить список знаков"
|
||||
|
||||
#: zrcolagui.cpp:138
|
||||
#: zrcolagui.cpp:156
|
||||
msgid "&View"
|
||||
msgstr "&Вид"
|
||||
|
||||
#: zrcolagui.cpp:142
|
||||
#: zrcolagui.cpp:160
|
||||
msgid "&Instructions..."
|
||||
msgstr "&Инструкции ..."
|
||||
|
||||
#: zrcolagui.cpp:142
|
||||
#: zrcolagui.cpp:160
|
||||
msgid "Open a web site with product instructions"
|
||||
msgstr "Открыть сайт с инструкциями по продукту"
|
||||
|
||||
#: zrcolagui.cpp:146
|
||||
#: zrcolagui.cpp:164
|
||||
msgid "Keyboard &Shortcuts..."
|
||||
msgstr "Сочетания &клавиш ..."
|
||||
|
||||
#: zrcolagui.cpp:146
|
||||
#: zrcolagui.cpp:164
|
||||
msgid "Open a list of keyboard shortcuts"
|
||||
msgstr "Открыть список сочетаний клавиш"
|
||||
|
||||
#: zrcolagui.cpp:152
|
||||
#: zrcolagui.cpp:170
|
||||
msgid "&Request a new character..."
|
||||
msgstr "&Запрос нового знака ..."
|
||||
|
||||
#: zrcolagui.cpp:152
|
||||
#: zrcolagui.cpp:170
|
||||
msgid "Submit a request to ZRC to add a new character"
|
||||
msgstr "Отправить запрос нового знака"
|
||||
|
||||
#: zrcolagui.cpp:156
|
||||
#: zrcolagui.cpp:174
|
||||
msgid "Check for &Updates..."
|
||||
msgstr "Проверить наличие &обновлений ..."
|
||||
|
||||
#: zrcolagui.cpp:156
|
||||
#: zrcolagui.cpp:174
|
||||
msgid "Check online for product update"
|
||||
msgstr "Проверить наличие обновлений онлайн"
|
||||
|
||||
#: zrcolagui.cpp:162
|
||||
#: zrcolagui.cpp:180
|
||||
msgid "&About..."
|
||||
msgstr "О прогр&амме ..."
|
||||
|
||||
#: zrcolagui.cpp:165
|
||||
#: zrcolagui.cpp:183
|
||||
msgid "&Help"
|
||||
msgstr "&Справка"
|
||||
|
||||
#: zrcolagui.cpp:170
|
||||
#: zrcolagui.cpp:188
|
||||
msgid "Cut"
|
||||
msgstr "Вырезать"
|
||||
|
||||
#: zrcolagui.cpp:170
|
||||
#: zrcolagui.cpp:188
|
||||
msgid "Cut selection"
|
||||
msgstr "Вырезать выбор"
|
||||
|
||||
#: zrcolagui.cpp:172
|
||||
#: zrcolagui.cpp:190
|
||||
msgid "Copy"
|
||||
msgstr "Копировать"
|
||||
|
||||
#: zrcolagui.cpp:172
|
||||
#: zrcolagui.cpp:190
|
||||
msgid "Copy selection"
|
||||
msgstr "Копировать выбор"
|
||||
|
||||
#: zrcolagui.cpp:174
|
||||
#: zrcolagui.cpp:192
|
||||
msgid "Paste"
|
||||
msgstr "Вставить"
|
||||
|
||||
#: zrcolagui.cpp:174
|
||||
#: zrcolagui.cpp:192
|
||||
msgid "Paste selection"
|
||||
msgstr "Вставить выбор"
|
||||
|
||||
#: zrcolagui.cpp:177
|
||||
#: zrcolagui.cpp:195
|
||||
msgid "Edit"
|
||||
msgstr "Правка"
|
||||
|
||||
#: zrcolagui.cpp:180
|
||||
#: zrcolagui.cpp:198
|
||||
msgid "Find Character"
|
||||
msgstr "Поиск знака"
|
||||
|
||||
#: zrcolagui.cpp:182
|
||||
#: zrcolagui.cpp:200
|
||||
msgid "Send Composed"
|
||||
msgstr "Послать составленное (F5)"
|
||||
|
||||
#: zrcolagui.cpp:184
|
||||
#: zrcolagui.cpp:202
|
||||
msgid "Send Decomposed"
|
||||
msgstr "Послать разобранное (F6)"
|
||||
|
||||
#: zrcolagui.cpp:187
|
||||
#: zrcolagui.cpp:209
|
||||
msgid "Compose"
|
||||
msgstr "Составить"
|
||||
|
||||
#: zrcolagui.cpp:191
|
||||
#: zrcolagui.cpp:213
|
||||
msgid "Character Catalog"
|
||||
msgstr "Список знаков"
|
||||
|
||||
#: zrcolagui.cpp:195
|
||||
#: zrcolagui.cpp:217
|
||||
msgid "(De)Composer"
|
||||
msgstr "(Де)Композитор"
|
||||
|
||||
#: zrcolagui.cpp:234
|
||||
#: zrcolagui.cpp:258
|
||||
msgid "Decomposed Text"
|
||||
msgstr "Разобранний текст"
|
||||
|
||||
#: zrcolagui.cpp:254
|
||||
#: zrcolagui.cpp:278
|
||||
msgid "Decomposed Unicode Dump"
|
||||
msgstr "Дамп разобранного Юнукода"
|
||||
|
||||
#: zrcolagui.cpp:281
|
||||
#: zrcolagui.cpp:305
|
||||
msgid "Composed Text"
|
||||
msgstr "Составленный текст"
|
||||
|
||||
#: zrcolagui.cpp:301
|
||||
#: zrcolagui.cpp:325
|
||||
msgid "Composed Unicode Dump"
|
||||
msgstr "Дамп составленного Юникода"
|
||||
|
||||
#: zrcolagui.cpp:355
|
||||
#: zrcolagui.cpp:379
|
||||
msgid "Select category to display"
|
||||
msgstr "Выделить категории для отображения"
|
||||
|
||||
#: zrcolagui.cpp:389
|
||||
#: zrcolagui.cpp:413
|
||||
msgid "Show &All"
|
||||
msgstr "Показать &все"
|
||||
|
||||
#: zrcolagui.cpp:390
|
||||
#: zrcolagui.cpp:414
|
||||
msgid "Toggle display of less frequent characters"
|
||||
msgstr "Переключить отображение редко использованных знаков"
|
||||
|
||||
#: zrcolagui.cpp:430
|
||||
#: zrcolagui.cpp:454
|
||||
msgid "&Browse"
|
||||
msgstr "&Обзор"
|
||||
|
||||
#: zrcolagui.cpp:437
|
||||
msgid ""
|
||||
"Full or partial terms from Unicode character description (in English) to "
|
||||
"search for"
|
||||
#: zrcolagui.cpp:461
|
||||
msgid "Full or partial terms from Unicode character description (in English) to search for"
|
||||
msgstr "Полное либо частичное описание знака Юникод (на английском) для поиска"
|
||||
|
||||
#: zrcolagui.cpp:441
|
||||
#: zrcolagui.cpp:465
|
||||
msgid "Search Options"
|
||||
msgstr "Опции поиска"
|
||||
|
||||
#: zrcolagui.cpp:442
|
||||
#: zrcolagui.cpp:466
|
||||
msgid "Shows/hides additional search options"
|
||||
msgstr "Показать/скрыть дополнительные опции поиска"
|
||||
|
||||
#: zrcolagui.cpp:454
|
||||
#: zrcolagui.cpp:478
|
||||
msgid "List of Unicode character categories to search in"
|
||||
msgstr "Список категории Юникод для проведения поиска"
|
||||
|
||||
#: zrcolagui.cpp:461
|
||||
#: zrcolagui.cpp:485
|
||||
msgid "All"
|
||||
msgstr "Все"
|
||||
|
||||
#: zrcolagui.cpp:462
|
||||
#: zrcolagui.cpp:486
|
||||
msgid "Select all categories"
|
||||
msgstr "Выбрать все категории"
|
||||
|
||||
#: zrcolagui.cpp:466
|
||||
#: zrcolagui.cpp:490
|
||||
msgid "None"
|
||||
msgstr "Ничего"
|
||||
|
||||
#: zrcolagui.cpp:467
|
||||
#: zrcolagui.cpp:491
|
||||
msgid "Clear category selection"
|
||||
msgstr "Очистить выбор категории"
|
||||
|
||||
#: zrcolagui.cpp:471
|
||||
#: zrcolagui.cpp:495
|
||||
msgid "Invert"
|
||||
msgstr "Обратить"
|
||||
|
||||
#: zrcolagui.cpp:472
|
||||
#: zrcolagui.cpp:496
|
||||
msgid "Invert category selection"
|
||||
msgstr "Обратить выбор категории"
|
||||
|
||||
#: zrcolagui.cpp:511
|
||||
#: zrcolagui.cpp:535
|
||||
msgid "Character search results"
|
||||
msgstr "Результаты поиска знаков"
|
||||
|
||||
#: zrcolagui.cpp:521
|
||||
#: zrcolagui.cpp:545
|
||||
msgid "Re¢ly Used"
|
||||
msgstr "&Недавно использованное"
|
||||
|
||||
#: zrcolagui.cpp:549
|
||||
#: zrcolagui.cpp:573
|
||||
msgid "List of recently inserted characters"
|
||||
msgstr "Список недавно вставленных знаков"
|
||||
|
||||
#: zrcolagui.cpp:563
|
||||
#: zrcolagui.cpp:587
|
||||
msgid "Preview"
|
||||
msgstr "Просмотр"
|
||||
|
||||
#: zrcolagui.cpp:568
|
||||
#: zrcolagui.cpp:592
|
||||
msgid "U+"
|
||||
msgstr "U+"
|
||||
|
||||
#: zrcolagui.cpp:573
|
||||
#: zrcolagui.cpp:597
|
||||
msgid "Unicode hexadecimal code"
|
||||
msgstr "Шестнадцатеричный код Юникод"
|
||||
|
||||
#: zrcolagui.cpp:578
|
||||
#: zrcolagui.cpp:602
|
||||
msgid "Keyboard shortcut in Composer window"
|
||||
msgstr "Сочетание клавиш в окне композитора"
|
||||
|
||||
#: zrcolagui.cpp:613
|
||||
#: zrcolagui.cpp:637
|
||||
msgid "Character preview"
|
||||
msgstr "Просмотр знака"
|
||||
|
||||
#: zrcolagui.cpp:618
|
||||
#: zrcolagui.cpp:642
|
||||
msgid "Unicode character description"
|
||||
msgstr "Описание знака Юникод"
|
||||
|
||||
#: zrcolagui.cpp:623
|
||||
#: zrcolagui.cpp:647
|
||||
msgid "Character tags"
|
||||
msgstr "Ключевые слова"
|
||||
|
||||
#: zrcolagui.cpp:628
|
||||
#: zrcolagui.cpp:652
|
||||
msgid "Unicode character category"
|
||||
msgstr "Категория знака Юникод"
|
||||
|
||||
#: zrcolagui.cpp:635
|
||||
#: zrcolagui.cpp:659
|
||||
msgid "« Back"
|
||||
msgstr "« Назад"
|
||||
|
||||
#: zrcolagui.cpp:637
|
||||
#: zrcolagui.cpp:661
|
||||
msgid "To previously viewed character"
|
||||
msgstr "К предыдущему знаку"
|
||||
|
||||
#: zrcolagui.cpp:641
|
||||
#: zrcolagui.cpp:665
|
||||
msgid "Forward »"
|
||||
msgstr "Далее »"
|
||||
|
||||
#: zrcolagui.cpp:643
|
||||
#: zrcolagui.cpp:667
|
||||
msgid "To following viewed character"
|
||||
msgstr "К следующему знаку"
|
||||
|
||||
#: zrcolagui.cpp:654
|
||||
#: zrcolagui.cpp:678
|
||||
msgid "Re&lated"
|
||||
msgstr "&Связанное"
|
||||
|
||||
#: zrcolagui.cpp:681
|
||||
#: zrcolagui.cpp:705
|
||||
msgid "List of related characters"
|
||||
msgstr "Список связанных знаков"
|
||||
|
||||
#: zrcolagui.cpp:770
|
||||
#: zrcolagui.cpp:794
|
||||
msgid ""
|
||||
"Some character native to specific language you are working with should not "
|
||||
"decompose to primitives.\n"
|
||||
"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 ""
|
||||
"Некоторые знаки использованного языка нельзя разбирать.\n"
|
||||
"Для оптимальной разборки вы должны настроить правильный язык."
|
||||
|
||||
#: zrcolagui.cpp:774
|
||||
#: zrcolagui.cpp:798
|
||||
msgid "Select language &automatically according to selected keyboard"
|
||||
msgstr "&Автоматически установить язык на основе выбранной клавиатуры"
|
||||
|
||||
#: zrcolagui.cpp:777
|
||||
#: zrcolagui.cpp:801
|
||||
msgid "&Manually select the language from the list below:"
|
||||
msgstr "&Вручную выбрать язык со списка:"
|
||||
|
||||
#: zrcolagui.cpp:789
|
||||
#: zrcolagui.cpp:812
|
||||
msgid "Text Language"
|
||||
msgstr "Язык текста"
|
||||
|
||||
#: zrcolagui.cpp:794
|
||||
#: zrcolagui.cpp:817
|
||||
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."
|
||||
"It will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."
|
||||
msgstr ""
|
||||
"Запуск системы ZRCola возможен при каждом запуске компьютера.\n"
|
||||
"После запуска система ZRCola доступна на панели задач либо через нажатие "
|
||||
"сочетания клавиш Win+F5 и Win+F6."
|
||||
"После запуска система ZRCola доступна на панели задач либо через нажатие сочетания клавиш Win+F5 и Win+F6."
|
||||
|
||||
#: zrcolagui.cpp:798
|
||||
#: zrcolagui.cpp:821
|
||||
msgid "Start ZRCola &automatically on logon"
|
||||
msgstr "&Автоматически запустить систему ZRCola при запуске компьютера"
|
||||
|
||||
#: zrcolagui.cpp:805
|
||||
#: zrcolagui.cpp:827
|
||||
msgid "Startup"
|
||||
msgstr "Запуск"
|
||||
|
||||
#: zrcolagui.cpp:885
|
||||
#: zrcolagui.cpp:905
|
||||
msgid ""
|
||||
"Program and Website Editor: Janoš Ježovnik\n"
|
||||
"Development: Amebis, d. o. o., Kamnik\n"
|
||||
"Translation into English: Janoš Ježovnik\n"
|
||||
"Translation into Russian language: Domen Krvina, Silvo Torkar, Anastasia "
|
||||
"Plotnikova\n"
|
||||
"Translation into Russian language: Domen Krvina, Silvo Torkar, Anastasia Plotnikova\n"
|
||||
"Development and maintenance of the original program (2004–2015): Peter Weiss"
|
||||
msgstr ""
|
||||
"Администратор программы и сайта: Янош Ежовник (Janoš Ježovnik)\n"
|
||||
"Разработка: Amebis, d. o. o., Kamnik\n"
|
||||
"Перевод на английский яазык: Янош Ежовник (Janoš Ježovnik)\n"
|
||||
"Перевод на русский язык: Домен Крвина (Domen Krvina), Силво Торкар (Silvo "
|
||||
"Torkar), Анастасия Плотникова\n"
|
||||
"Разработка in техническая поддержка первоначальной программы (2004–2015): "
|
||||
"Петер Вейсс (Peter Weiss)"
|
||||
"Перевод на русский язык: Домен Крвина (Domen Krvina), Силво Торкар (Silvo Torkar), Анастасия Плотникова\n"
|
||||
"Разработка in техническая поддержка первоначальной программы (2004–2015): Петер Вейсс (Peter Weiss)"
|
||||
|
||||
#: zrcolagui.cpp:893
|
||||
#: zrcolagui.cpp:913
|
||||
msgid "zrcola.zrc-sazu.si"
|
||||
msgstr "zrcola.zrc-sazu.si"
|
||||
|
||||
#: zrcolagui.cpp:899
|
||||
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:919
|
||||
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:903
|
||||
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:923
|
||||
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:944
|
||||
#: zrcolagui.cpp:964
|
||||
msgid "Log"
|
||||
msgstr "Журнал"
|
||||
|
||||
#: zrcolagui.cpp:960
|
||||
#: zrcolagui.cpp:980
|
||||
msgid "Quit and &Update..."
|
||||
msgstr "Выйти и &обновить ..."
|
||||
|
||||
#: zrcolagui.cpp:962
|
||||
#: zrcolagui.cpp:982
|
||||
msgid "Exit this program and launch product update"
|
||||
msgstr "Выйти из программы и запустить обновление"
|
||||
|
||||
#: zrcolagui.cpp:966
|
||||
#: zrcolagui.cpp:986
|
||||
msgid "&Close"
|
||||
msgstr "&Закрыть"
|
||||
|
||||
#: zrcolagui.cpp:967
|
||||
#: zrcolagui.cpp:987
|
||||
msgid "Close this window"
|
||||
msgstr "Закрыть это окно"
|
||||
|
||||
#: zrcolagui.cpp:1006
|
||||
#: zrcolagui.cpp:1026
|
||||
msgid "Enter the &character you would like to request:"
|
||||
msgstr "Ввести запрашиваемый &знак:"
|
||||
|
||||
#: zrcolagui.cpp:1013
|
||||
#: zrcolagui.cpp:1033
|
||||
msgid "Decomposed character to request"
|
||||
msgstr "Запрашиваемый разобранный знак"
|
||||
|
||||
#: zrcolagui.cpp:1017
|
||||
#: zrcolagui.cpp:1037
|
||||
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."
|
||||
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
|
||||
msgstr ""
|
||||
"Пожалуйста, используйте разобранный формат.\n"
|
||||
"Для ввода запрашиваемого знака можно использовать сочетания клавиш системы "
|
||||
"ZRCola либо копировать и вставить знаки из окна для разборки."
|
||||
"Для ввода запрашиваемого знака можно использовать сочетания клавиш системы ZRCola либо копировать и вставить знаки из окна для разборки."
|
||||
|
||||
#: zrcolagui.cpp:1027
|
||||
msgid ""
|
||||
"The &context, examples or description why and where the character is "
|
||||
"required:"
|
||||
msgstr ""
|
||||
"&Контекст, примеры либо описание запрашиваемого знака или объяснение, зачем "
|
||||
"он нужен:"
|
||||
#: zrcolagui.cpp:1047
|
||||
msgid "The &context, examples or description why and where the character is required:"
|
||||
msgstr "&Контекст, примеры либо описание запрашиваемого знака или объяснение, зачем он нужен:"
|
||||
|
||||
#: zrcolagui.cpp:1033
|
||||
#: zrcolagui.cpp:1053
|
||||
msgid "Additional notes for character request"
|
||||
msgstr "Дополнительные примечания"
|
||||
|
||||
#: zrcolagui.cpp:1040
|
||||
#: zrcolagui.cpp:1060
|
||||
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."
|
||||
"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."
|
||||
msgstr ""
|
||||
"После нажатия на кнопку «OK» ваша почтовая программа должна открытся для отправки запроса нового знака администратору системы ZRCola.\n"
|
||||
"Возможно, не все знаки будут отображены правильно, но все информации будут закодированны таким образом, что администратор сможет их правильно прочитать."
|
||||
|
||||
#: zrcolagui.cpp:1102
|
||||
msgid "Translation"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1104
|
||||
msgid ""
|
||||
"ZRCola offers multiple text translations that can be arranged in a sequence.\n"
|
||||
"Please select desired translations and the order they are applied."
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1114
|
||||
msgid "A&vailable:"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolagui.cpp:1129
|
||||
msgid ">"
|
||||
msgstr ">"
|
||||
|
||||
#: zrcolagui.cpp:1132
|
||||
msgid "<"
|
||||
msgstr "<"
|
||||
|
||||
#: zrcolagui.cpp:1141
|
||||
#, fuzzy
|
||||
msgid "&Selected:"
|
||||
msgstr "Izreže izbrano besedilo in ga shrani na odložišče"
|
||||
|
||||
#: zrcolagui.cpp:1159
|
||||
msgid "Up"
|
||||
msgstr "Up"
|
||||
|
||||
#: zrcolagui.cpp:1162
|
||||
msgid "Down"
|
||||
msgstr "Down"
|
||||
|
||||
#: zrcolagui.h:250
|
||||
msgid "Character Search"
|
||||
msgstr "Поиск знака"
|
||||
|
||||
#: zrcolagui.h:286
|
||||
msgid "Settings"
|
||||
msgstr "Настройки"
|
||||
|
||||
#: zrcolagui.h:312
|
||||
msgid "About ZRCola"
|
||||
msgstr "О системе ZRCola"
|
||||
|
||||
#: zrcolagui.h:337 zrcolaupdater.cpp:94
|
||||
msgid "Product Update"
|
||||
msgstr "Обновление продукта"
|
||||
|
||||
#: zrcolagui.h:408
|
||||
msgid "Custom Translation Sequence"
|
||||
msgstr ""
|
||||
"После нажатия на кнопку «OK» ваша почтовая программа должна открытся для "
|
||||
"отправки запроса нового знака администратору системы ZRCola.\n"
|
||||
"Возможно, не все знаки будут отображены правильно, но все информации будут "
|
||||
"закодированны таким образом, что администратор сможет их правильно прочитать."
|
||||
|
||||
#: zrcolakeyhndlr.cpp:44
|
||||
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."
|
||||
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:87
|
||||
msgid "Start ZRCola automatically on logon"
|
||||
msgstr "Автоматически запустить систему ZRCola при запуске компьютера"
|
||||
|
||||
#: zrcolatranseq.cpp:63
|
||||
#, c-format
|
||||
msgid "Unknown translation (%u)"
|
||||
msgstr ""
|
||||
|
||||
#: zrcolaupdater.cpp:94
|
||||
msgid ""
|
||||
"This program will now close and the upgrade will be launched.\n"
|
||||
@@ -576,151 +620,76 @@ msgstr ""
|
||||
"Программа будет закрыта и обновлена.\n"
|
||||
"Вы уверены?"
|
||||
|
||||
#: zrcolaupdater.cpp:94 zrcolagui.h:334
|
||||
msgid "Product Update"
|
||||
msgstr "Обновление продукта"
|
||||
|
||||
#: zrcolagui.h:246
|
||||
msgid "Character Search"
|
||||
msgstr "Поиск знака"
|
||||
|
||||
#: zrcolagui.h:283
|
||||
msgid "Settings"
|
||||
msgstr "Настройки"
|
||||
|
||||
#: zrcolagui.h:309
|
||||
msgid "About ZRCola"
|
||||
msgstr "О системе ZRCola"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:15
|
||||
msgid "binUIHeader.bmp"
|
||||
msgstr "binUIHeader.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:5
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting"
|
||||
msgstr "[DlgTitleFont][SimpleProductName] Руководство по запуску системы"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:6
|
||||
msgid "bintutorial1.bmp"
|
||||
msgstr "bintutorial1.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:7
|
||||
msgid ""
|
||||
"When configured, ZRCola starts at system startup and runs in the background. "
|
||||
"If needed, it can be brought up by pressing the combination Win+F5."
|
||||
msgstr ""
|
||||
"Если так настроено, система ZRCola запускается при запуске компьютера и "
|
||||
"работает в фоновом режиме. Если потребуется, пользователь может вывести "
|
||||
"программу на экран, нажав на сочетание клавиш Win+F5."
|
||||
msgid "When configured, ZRCola starts at system startup and runs in the background. If needed, it can be brought up by pressing the combination Win+F5."
|
||||
msgstr "Если так настроено, система ZRCola запускается при запуске компьютера и работает в фоновом режиме. Если потребуется, пользователь может вывести программу на экран, нажав на сочетание клавиш Win+F5."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:8
|
||||
msgid ""
|
||||
"IMPORTANT: Upon pressing the combination Win+F5 the program memorises the "
|
||||
"location of the cursor in the text. If ZRCola is brought to the foreground "
|
||||
"without using the aforementioned combination of keys, the program won't know "
|
||||
"where to insert the special characters!"
|
||||
msgstr ""
|
||||
"Внимание: При нажатии сочетание клавиш Win+F5 программа запомнить "
|
||||
"местонахождение курсора в тексте. Если система ZRCola выведена на экран без "
|
||||
"использования упомянутого сочетания клавиш, программа не знает, куда ввести "
|
||||
"желаемые знаки!"
|
||||
msgid "IMPORTANT: Upon pressing the combination Win+F5 the program memorises the location of the cursor in the text. If ZRCola is brought to the foreground without using the aforementioned combination of keys, the program won't know where to insert the special characters!"
|
||||
msgstr "Внимание: При нажатии сочетание клавиш Win+F5 программа запомнить местонахождение курсора в тексте. Если система ZRCola выведена на экран без использования упомянутого сочетания клавиш, программа не знает, куда ввести желаемые знаки!"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:19
|
||||
msgid "&Continue"
|
||||
msgstr "&Продолжить"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:11
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition"
|
||||
msgstr "[DlgTitleFont][SimpleProductName] Руководство по составлению"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:12
|
||||
msgid "bintutorial2.bmp"
|
||||
msgstr "bintutorial2.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:13
|
||||
msgid ""
|
||||
"The string of basic and substitute characters is entered into the upper "
|
||||
"input window of the program. In the window below the resulted special "
|
||||
"characters are displayed. To insert them in the text, the F5 key is used."
|
||||
msgstr ""
|
||||
"Строка основных и замещающих знаков вводится в верхнее окно для ввода. После "
|
||||
"того, в нижнем окне появляются соответствующие специальные знаки. Для их "
|
||||
"ввода в текст нужно нажать клавишу F5."
|
||||
msgid "The string of basic and substitute characters is entered into the upper input window of the program. In the window below the resulted special characters are displayed. To insert them in the text, the F5 key is used."
|
||||
msgstr "Строка основных и замещающих знаков вводится в верхнее окно для ввода. После того, в нижнем окне появляются соответствующие специальные знаки. Для их ввода в текст нужно нажать клавишу F5."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:16
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters"
|
||||
msgstr "[DlgTitleFont][SimpleProductName] Руководство по вводу знаков"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:17
|
||||
msgid "bintutorial3.bmp"
|
||||
msgstr "bintutorial3.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:18
|
||||
msgid ""
|
||||
"Characters can be entered using keyboard shortcuts, the character catalogue "
|
||||
"(F4) or the character finding tool (F8)."
|
||||
msgstr ""
|
||||
"Знак можно ввести, употребляя сочетания клавиш на клавиатуре, список знаков "
|
||||
"(F4) или функцию \"Поиск знака\" (F8)."
|
||||
msgid "Characters can be entered using keyboard shortcuts, the character catalogue (F4) or the character finding tool (F8)."
|
||||
msgstr "Знак можно ввести, употребляя сочетания клавиш на клавиатуре, список знаков (F4) или функцию \"Поиск знака\" (F8)."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "Input system for linguistic use"
|
||||
@@ -729,12 +698,8 @@ msgstr "Система ввода ZRCola для лингвистического
|
||||
#~ msgid "http://zrcola-2.amebis.si/en/info/instructions/"
|
||||
#~ msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "http://zrcola-2.amebis.si/wp-content/uploads/2016/04/5_ZRCola-"
|
||||
#~ "Tipkovnica_2009-06-21.pdf"
|
||||
#~ msgstr ""
|
||||
#~ "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/08/"
|
||||
#~ "ZRCola_tipkovnica_20160801.pdf"
|
||||
#~ msgid "http://zrcola-2.amebis.si/wp-content/uploads/2016/04/5_ZRCola-Tipkovnica_2009-06-21.pdf"
|
||||
#~ msgstr "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/08/ZRCola_tipkovnica_20160801.pdf"
|
||||
|
||||
# Windows charset for this language (decimal)
|
||||
#~ msgid "1252"
|
||||
@@ -855,15 +820,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"
|
||||
|
||||
@@ -932,12 +891,8 @@ msgstr "Система ввода ZRCola для лингвистического
|
||||
#~ msgid "Send Composed (F5)"
|
||||
#~ msgstr "Pošlji sestavljeno (F5)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "ZRCola keyboard shortcut Win+Shift+Z could not be registered. Some "
|
||||
#~ "functionality will not be available."
|
||||
#~ msgstr ""
|
||||
#~ "ZRColine bližnjice na tipkovnici Win+Shift+Z ni mogoče registrirati. "
|
||||
#~ "Nekaj funkcionalnosti ne bo na voljo."
|
||||
#~ msgid "ZRCola keyboard shortcut Win+Shift+Z could not be registered. Some functionality will not be available."
|
||||
#~ msgstr "ZRColine bližnjice na tipkovnici Win+Shift+Z ni mogoče registrirati. Nekaj funkcionalnosti ne bo na voljo."
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Authentication progress real time monitor"
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola\n"
|
||||
"POT-Creation-Date: 2016-10-18 10:08+0200\n"
|
||||
"PO-Revision-Date: 2016-10-18 10:09+0200\n"
|
||||
"POT-Creation-Date: 2017-06-01 18:05+0200\n"
|
||||
"PO-Revision-Date: 2017-06-01 18:06+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"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.10\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||
"%100==4 ? 2 : 3);\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: _\n"
|
||||
|
||||
@@ -21,74 +20,75 @@ msgstr ""
|
||||
msgid "© 2004-%s ZRC SAZU"
|
||||
msgstr "© 2004-%s ZRC SAZU"
|
||||
|
||||
#: zrcolaapp.cpp:71 zrcolafrm.cpp:90 zrcolagui.cpp:874 zrcolagui.h:104
|
||||
#: MSIBuild/en_US.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: zrcolaapp.cpp:72 zrcolafrm.cpp:106 zrcolagui.cpp:894 zrcolagui.h:108
|
||||
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1004
|
||||
#: zrcolachrreq.cpp:49 zrcolagui.cpp:1024
|
||||
msgid "Character"
|
||||
msgstr "Znak"
|
||||
|
||||
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1025
|
||||
#: zrcolachrreq.cpp:58 zrcolagui.cpp:1045
|
||||
msgid "Context"
|
||||
msgstr "Kontekst"
|
||||
|
||||
#: zrcolachrreq.cpp:64 zrcolagui.h:363
|
||||
#: zrcolachrreq.cpp:64 zrcolagui.h:366
|
||||
msgid "Request a New Character"
|
||||
msgstr "Zahtevaj nov znak"
|
||||
|
||||
#: zrcolachrslct.cpp:46 zrcolachrslct.cpp:226 zrcolachrslct.cpp:677
|
||||
#: zrcolachrslct.cpp:89
|
||||
msgid "Too many digits in Unicode."
|
||||
msgstr "Preveč števk v zapisu Unicode."
|
||||
|
||||
#: zrcolachrslct.cpp:89 zrcolachrslct.cpp:107
|
||||
msgid "Validation conflict"
|
||||
msgstr "Nesoglasje pri preverjanju"
|
||||
|
||||
#: zrcolachrslct.cpp:107
|
||||
#, c-format
|
||||
msgid "Invalid character in Unicode found: %c"
|
||||
msgstr "Napačen znak v zapisu Unicode: %c"
|
||||
|
||||
#: zrcolachrslct.cpp:214 zrcolachrslct.cpp:390 zrcolachrslct.cpp:869
|
||||
msgid "▸ Search Options"
|
||||
msgstr "▸ Možnosti iskanja"
|
||||
|
||||
# Recitation separator
|
||||
#: zrcolachrslct.cpp:164
|
||||
#: zrcolachrslct.cpp:328
|
||||
msgid ", "
|
||||
msgstr ", "
|
||||
|
||||
#: zrcolachrslct.cpp:229 zrcolachrslct.cpp:674
|
||||
#: zrcolachrslct.cpp:393 zrcolachrslct.cpp:866
|
||||
msgid "▾ Search Options"
|
||||
msgstr "▾ Možnosti iskanja"
|
||||
|
||||
#: zrcolafrm.cpp:141
|
||||
msgid ""
|
||||
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
|
||||
"will not be available."
|
||||
msgstr ""
|
||||
"ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj "
|
||||
"funkcionalnosti ne bo na voljo."
|
||||
#: zrcolafrm.cpp:90
|
||||
msgid "Custom Translation..."
|
||||
msgstr "Pretvorba po meri ..."
|
||||
|
||||
#: zrcolafrm.cpp:141 zrcolafrm.cpp:143
|
||||
#: zrcolafrm.cpp:175
|
||||
msgid "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."
|
||||
msgstr "ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj funkcionalnosti ne bo na voljo."
|
||||
|
||||
#: zrcolafrm.cpp:175 zrcolafrm.cpp:177
|
||||
msgid "Warning"
|
||||
msgstr "Opozorilo"
|
||||
|
||||
#: zrcolafrm.cpp:143
|
||||
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:177
|
||||
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:351
|
||||
#: zrcolafrm.cpp:410
|
||||
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/info/instructions/"
|
||||
|
||||
#: zrcolafrm.cpp:375
|
||||
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"
|
||||
#: zrcolafrm.cpp:434
|
||||
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"
|
||||
|
||||
#: zrcolagui.cpp:36
|
||||
msgid "E&xit"
|
||||
@@ -114,7 +114,7 @@ msgstr "Izberi celotno besedilo"
|
||||
msgid "Find C&haracter..."
|
||||
msgstr "Poišči &znak ..."
|
||||
|
||||
#: zrcolagui.cpp:78 zrcolagui.cpp:180
|
||||
#: zrcolagui.cpp:78 zrcolagui.cpp:198
|
||||
msgid "Display character search to select character to insert into text"
|
||||
msgstr "Prikaži iskalnik znakov za izbor znaka za vstavljanje v besedilo"
|
||||
|
||||
@@ -122,348 +122,356 @@ msgstr "Prikaži iskalnik znakov za izbor znaka za vstavljanje v besedilo"
|
||||
msgid "&Send Composed"
|
||||
msgstr "Pošlji &sestavljeno"
|
||||
|
||||
#: zrcolagui.cpp:89 zrcolagui.cpp:182
|
||||
#: zrcolagui.cpp:89 zrcolagui.cpp:200
|
||||
msgid "Send composed text to source window"
|
||||
msgstr "Pošlji sestavljeno besedilo izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "Copy Composed and &Return"
|
||||
msgstr "Kopi&raj sestavljeno in se vrni"
|
||||
|
||||
#: zrcolagui.cpp:98
|
||||
msgid "Copy composed text to clipboard and return focus to source window"
|
||||
msgstr "Kopiraj sestavljeno besedilo na odložišče in vrni fokus nazaj izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
msgid "Send &Decomposed"
|
||||
msgstr "Pošlji &razstavljeno"
|
||||
|
||||
#: zrcolagui.cpp:98 zrcolagui.cpp:184
|
||||
#: zrcolagui.cpp:107 zrcolagui.cpp:202
|
||||
msgid "Send decomposed text to source window"
|
||||
msgstr "Pošlji razstavljeno besedilo izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Copy Decomposed and Re&turn"
|
||||
msgstr "Kopi&raj razstavljeno in se vrni"
|
||||
|
||||
#: zrcolagui.cpp:116
|
||||
msgid "Copy decomposed text to clipboard and return focus to source window"
|
||||
msgstr "Kopiraj razstavljeno besedilo na odložišče in vrni fokus nazaj izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
msgid "Abort (De)composition"
|
||||
msgstr "Prekini raz/sestavljanje"
|
||||
|
||||
#: zrcolagui.cpp:107
|
||||
#: zrcolagui.cpp:125
|
||||
msgid "Abort composition and return focus to source window"
|
||||
msgstr "Prekini sestavljanje in vrni fokus nazaj izvornemu oknu"
|
||||
|
||||
#: zrcolagui.cpp:118
|
||||
#: zrcolagui.cpp:136
|
||||
msgid "&Settings..."
|
||||
msgstr "Na&stavitve ..."
|
||||
|
||||
#: zrcolagui.cpp:118
|
||||
#: zrcolagui.cpp:136
|
||||
msgid "Open program configuration dialog"
|
||||
msgstr "Odpri nastavitveni dialog programa"
|
||||
|
||||
#: zrcolagui.cpp:121
|
||||
#: zrcolagui.cpp:139
|
||||
msgid "&Edit"
|
||||
msgstr "Ur&edi"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
#: zrcolagui.cpp:143
|
||||
msgid "&Edit Toolbar"
|
||||
msgstr "Orodna vrstica za ur&ejanje"
|
||||
|
||||
#: zrcolagui.cpp:125
|
||||
#: zrcolagui.cpp:143
|
||||
msgid "Toggle edit toolbar"
|
||||
msgstr "Prikaži/skrij orodno vrstico za urejanje"
|
||||
|
||||
#: zrcolagui.cpp:129
|
||||
#: zrcolagui.cpp:147
|
||||
msgid "&Compose Toolbar"
|
||||
msgstr "Orodna vrsti&ca za sestavljanje"
|
||||
|
||||
#: zrcolagui.cpp:129
|
||||
#: zrcolagui.cpp:147
|
||||
msgid "Toggle compose toolbar"
|
||||
msgstr "Prikaži/skrij orodno vrstico za sestavljanje"
|
||||
|
||||
#: zrcolagui.cpp:135
|
||||
#: zrcolagui.cpp:153
|
||||
msgid "Character Catalo&g"
|
||||
msgstr "Katalo&g znakov"
|
||||
|
||||
#: zrcolagui.cpp:135
|
||||
#: zrcolagui.cpp:153
|
||||
msgid "Toggle character catalog panel"
|
||||
msgstr "Prikaži/skrij katalog znakov"
|
||||
|
||||
#: zrcolagui.cpp:138
|
||||
#: zrcolagui.cpp:156
|
||||
msgid "&View"
|
||||
msgstr "Po&gled"
|
||||
|
||||
#: zrcolagui.cpp:142
|
||||
#: zrcolagui.cpp:160
|
||||
msgid "&Instructions..."
|
||||
msgstr "Navod&ila ..."
|
||||
|
||||
#: zrcolagui.cpp:142
|
||||
#: zrcolagui.cpp:160
|
||||
msgid "Open a web site with product instructions"
|
||||
msgstr "Odpri spletno stran z navodili izdelka"
|
||||
|
||||
#: zrcolagui.cpp:146
|
||||
#: zrcolagui.cpp:164
|
||||
msgid "Keyboard &Shortcuts..."
|
||||
msgstr "&Bližnjice na tipkovnici ..."
|
||||
|
||||
#: zrcolagui.cpp:146
|
||||
#: zrcolagui.cpp:164
|
||||
msgid "Open a list of keyboard shortcuts"
|
||||
msgstr "Odpri seznam bližnjic na tipkovnici"
|
||||
|
||||
#: zrcolagui.cpp:152
|
||||
#: zrcolagui.cpp:170
|
||||
msgid "&Request a new character..."
|
||||
msgstr "&Zahtevaj nov znak ..."
|
||||
|
||||
#: zrcolagui.cpp:152
|
||||
#: zrcolagui.cpp:170
|
||||
msgid "Submit a request to ZRC to add a new character"
|
||||
msgstr "Oddaj prošnjo za dodajanje novega znaka"
|
||||
|
||||
#: zrcolagui.cpp:156
|
||||
#: zrcolagui.cpp:174
|
||||
msgid "Check for &Updates..."
|
||||
msgstr "Preveri &posodobitve ..."
|
||||
|
||||
#: zrcolagui.cpp:156
|
||||
#: zrcolagui.cpp:174
|
||||
msgid "Check online for product update"
|
||||
msgstr "Preveri na spletu za posodobitev izdelka"
|
||||
|
||||
#: zrcolagui.cpp:162
|
||||
#: zrcolagui.cpp:180
|
||||
msgid "&About..."
|
||||
msgstr "O progr&amu ..."
|
||||
|
||||
#: zrcolagui.cpp:165
|
||||
#: zrcolagui.cpp:183
|
||||
msgid "&Help"
|
||||
msgstr "Po&moč"
|
||||
|
||||
#: zrcolagui.cpp:170
|
||||
#: zrcolagui.cpp:188
|
||||
msgid "Cut"
|
||||
msgstr "Izreži"
|
||||
|
||||
#: zrcolagui.cpp:170
|
||||
#: zrcolagui.cpp:188
|
||||
msgid "Cut selection"
|
||||
msgstr "Izreži izbor"
|
||||
|
||||
#: zrcolagui.cpp:172
|
||||
#: zrcolagui.cpp:190
|
||||
msgid "Copy"
|
||||
msgstr "Kopiraj"
|
||||
|
||||
#: zrcolagui.cpp:172
|
||||
#: zrcolagui.cpp:190
|
||||
msgid "Copy selection"
|
||||
msgstr "Kopiraj izbor"
|
||||
|
||||
#: zrcolagui.cpp:174
|
||||
#: zrcolagui.cpp:192
|
||||
msgid "Paste"
|
||||
msgstr "Prilepi"
|
||||
|
||||
#: zrcolagui.cpp:174
|
||||
#: zrcolagui.cpp:192
|
||||
msgid "Paste selection"
|
||||
msgstr "Prilepi izbor"
|
||||
|
||||
#: zrcolagui.cpp:177
|
||||
#: zrcolagui.cpp:195
|
||||
msgid "Edit"
|
||||
msgstr "Urejanje"
|
||||
|
||||
#: zrcolagui.cpp:180
|
||||
#: zrcolagui.cpp:198
|
||||
msgid "Find Character"
|
||||
msgstr "Poišči znak"
|
||||
|
||||
#: zrcolagui.cpp:182
|
||||
#: zrcolagui.cpp:200
|
||||
msgid "Send Composed"
|
||||
msgstr "Pošlji sestavljeno"
|
||||
|
||||
#: zrcolagui.cpp:184
|
||||
#: zrcolagui.cpp:202
|
||||
msgid "Send Decomposed"
|
||||
msgstr "Pošlji razstavljeno"
|
||||
|
||||
#: zrcolagui.cpp:187
|
||||
#: zrcolagui.cpp:209
|
||||
msgid "Compose"
|
||||
msgstr "Sestavljanje"
|
||||
|
||||
#: zrcolagui.cpp:191
|
||||
#: zrcolagui.cpp:213
|
||||
msgid "Character Catalog"
|
||||
msgstr "Katalog znakov"
|
||||
|
||||
#: zrcolagui.cpp:195
|
||||
#: zrcolagui.cpp:217
|
||||
msgid "(De)Composer"
|
||||
msgstr "Razstavljalnik/Sestavljalnik"
|
||||
|
||||
#: zrcolagui.cpp:234
|
||||
#: zrcolagui.cpp:258
|
||||
msgid "Decomposed Text"
|
||||
msgstr "Razstavljeno besedilo"
|
||||
|
||||
#: zrcolagui.cpp:254
|
||||
#: zrcolagui.cpp:278
|
||||
msgid "Decomposed Unicode Dump"
|
||||
msgstr "Unicode razstavljenega"
|
||||
|
||||
#: zrcolagui.cpp:281
|
||||
#: zrcolagui.cpp:305
|
||||
msgid "Composed Text"
|
||||
msgstr "Sestavljeno besedilo"
|
||||
|
||||
#: zrcolagui.cpp:301
|
||||
#: zrcolagui.cpp:325
|
||||
msgid "Composed Unicode Dump"
|
||||
msgstr "Unicode sestavljenega"
|
||||
|
||||
#: zrcolagui.cpp:355
|
||||
#: zrcolagui.cpp:379
|
||||
msgid "Select category to display"
|
||||
msgstr "Izberi kategorijo za prikaz"
|
||||
|
||||
#: zrcolagui.cpp:389
|
||||
#: zrcolagui.cpp:413
|
||||
msgid "Show &All"
|
||||
msgstr "Prik&aži vse"
|
||||
|
||||
#: zrcolagui.cpp:390
|
||||
#: zrcolagui.cpp:414
|
||||
msgid "Toggle display of less frequent characters"
|
||||
msgstr "Prikaži/skrij manj pogoste znake"
|
||||
|
||||
#: zrcolagui.cpp:430
|
||||
#: zrcolagui.cpp:454
|
||||
msgid "&Browse"
|
||||
msgstr "Pre&brskaj"
|
||||
|
||||
#: zrcolagui.cpp:437
|
||||
msgid ""
|
||||
"Full or partial terms from Unicode character description (in English) to "
|
||||
"search for"
|
||||
msgstr ""
|
||||
"Polne ali delne besede iz opisa znaka Unicode (v angleščini) za iskanje"
|
||||
#: zrcolagui.cpp:461
|
||||
msgid "Full or partial terms from Unicode character description (in English) to search for"
|
||||
msgstr "Polne ali delne besede iz opisa znaka Unicode (v angleščini) za iskanje"
|
||||
|
||||
#: zrcolagui.cpp:441
|
||||
#: zrcolagui.cpp:465
|
||||
msgid "Search Options"
|
||||
msgstr "Možnosti iskanja"
|
||||
|
||||
#: zrcolagui.cpp:442
|
||||
#: zrcolagui.cpp:466
|
||||
msgid "Shows/hides additional search options"
|
||||
msgstr "Prikaže/skrije dodatne možnosti iskanja"
|
||||
|
||||
#: zrcolagui.cpp:454
|
||||
#: zrcolagui.cpp:478
|
||||
msgid "List of Unicode character categories to search in"
|
||||
msgstr "Seznam kategorij znaka Unicode za iskanje"
|
||||
|
||||
#: zrcolagui.cpp:461
|
||||
#: zrcolagui.cpp:485
|
||||
msgid "All"
|
||||
msgstr "Vse"
|
||||
|
||||
#: zrcolagui.cpp:462
|
||||
#: zrcolagui.cpp:486
|
||||
msgid "Select all categories"
|
||||
msgstr "Izberi vse kategorije"
|
||||
|
||||
#: zrcolagui.cpp:466
|
||||
#: zrcolagui.cpp:490
|
||||
msgid "None"
|
||||
msgstr "Nič"
|
||||
|
||||
#: zrcolagui.cpp:467
|
||||
#: zrcolagui.cpp:491
|
||||
msgid "Clear category selection"
|
||||
msgstr "Počisti izbor kategorij"
|
||||
|
||||
#: zrcolagui.cpp:471
|
||||
#: zrcolagui.cpp:495
|
||||
msgid "Invert"
|
||||
msgstr "Obrni"
|
||||
|
||||
#: zrcolagui.cpp:472
|
||||
#: zrcolagui.cpp:496
|
||||
msgid "Invert category selection"
|
||||
msgstr "Obrni izbor kategorij"
|
||||
|
||||
#: zrcolagui.cpp:511
|
||||
#: zrcolagui.cpp:535
|
||||
msgid "Character search results"
|
||||
msgstr "Rezultati iskanja znakov"
|
||||
|
||||
#: zrcolagui.cpp:521
|
||||
#: zrcolagui.cpp:545
|
||||
msgid "Re¢ly Used"
|
||||
msgstr "Nedavno &uporabljeni"
|
||||
|
||||
#: zrcolagui.cpp:549
|
||||
#: zrcolagui.cpp:573
|
||||
msgid "List of recently inserted characters"
|
||||
msgstr "Seznam nedavno vstavljenih znakov"
|
||||
|
||||
#: zrcolagui.cpp:563
|
||||
#: zrcolagui.cpp:587
|
||||
msgid "Preview"
|
||||
msgstr "Predogled"
|
||||
|
||||
#: zrcolagui.cpp:568
|
||||
#: zrcolagui.cpp:592
|
||||
msgid "U+"
|
||||
msgstr "U+"
|
||||
|
||||
#: zrcolagui.cpp:573
|
||||
#: zrcolagui.cpp:597
|
||||
msgid "Unicode hexadecimal code"
|
||||
msgstr "Šestnajstiška koda Unicode"
|
||||
|
||||
#: zrcolagui.cpp:578
|
||||
#: zrcolagui.cpp:602
|
||||
msgid "Keyboard shortcut in Composer window"
|
||||
msgstr "Bližnjica na tipkovnici v oknu sestavljalnika"
|
||||
|
||||
#: zrcolagui.cpp:613
|
||||
#: zrcolagui.cpp:637
|
||||
msgid "Character preview"
|
||||
msgstr "Predogled znaka"
|
||||
|
||||
#: zrcolagui.cpp:618
|
||||
#: zrcolagui.cpp:642
|
||||
msgid "Unicode character description"
|
||||
msgstr "Opis znaka Unicode"
|
||||
|
||||
#: zrcolagui.cpp:623
|
||||
#: zrcolagui.cpp:647
|
||||
msgid "Character tags"
|
||||
msgstr "Oznake znaka"
|
||||
|
||||
#: zrcolagui.cpp:628
|
||||
#: zrcolagui.cpp:652
|
||||
msgid "Unicode character category"
|
||||
msgstr "Kategorija znaka Unicode"
|
||||
|
||||
#: zrcolagui.cpp:635
|
||||
#: zrcolagui.cpp:659
|
||||
msgid "« Back"
|
||||
msgstr "« Nazaj"
|
||||
|
||||
#: zrcolagui.cpp:637
|
||||
#: zrcolagui.cpp:661
|
||||
msgid "To previously viewed character"
|
||||
msgstr "Na prejšnji prikazan znak"
|
||||
|
||||
#: zrcolagui.cpp:641
|
||||
#: zrcolagui.cpp:665
|
||||
msgid "Forward »"
|
||||
msgstr "Naprej »"
|
||||
|
||||
#: zrcolagui.cpp:643
|
||||
#: zrcolagui.cpp:667
|
||||
msgid "To following viewed character"
|
||||
msgstr "Na naslednji prikazan znak"
|
||||
|
||||
#: zrcolagui.cpp:654
|
||||
#: zrcolagui.cpp:678
|
||||
msgid "Re&lated"
|
||||
msgstr "&Sorodni"
|
||||
|
||||
#: zrcolagui.cpp:681
|
||||
#: zrcolagui.cpp:705
|
||||
msgid "List of related characters"
|
||||
msgstr "Seznam sorodnih znakov"
|
||||
|
||||
#: zrcolagui.cpp:770
|
||||
#: zrcolagui.cpp:794
|
||||
msgid ""
|
||||
"Some character native to specific language you are working with should not "
|
||||
"decompose to primitives.\n"
|
||||
"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 ""
|
||||
"Nekateri znaki iz posameznih jezikov, s katerimi delate, se ne smejo "
|
||||
"razstavljati.\n"
|
||||
"Nekateri znaki iz posameznih jezikov, s katerimi delate, se ne smejo razstavljati.\n"
|
||||
"Za optimalno razstavljanje izberite pravilni jezik."
|
||||
|
||||
#: zrcolagui.cpp:774
|
||||
#: zrcolagui.cpp:798
|
||||
msgid "Select language &automatically according to selected keyboard"
|
||||
msgstr "S&amodejno izberi jezik glede na izbrano tipkovnico"
|
||||
|
||||
#: zrcolagui.cpp:777
|
||||
#: zrcolagui.cpp:801
|
||||
msgid "&Manually select the language from the list below:"
|
||||
msgstr "&Ročno izberi jezik s seznama spodaj:"
|
||||
|
||||
#: zrcolagui.cpp:789
|
||||
#: zrcolagui.cpp:812
|
||||
msgid "Text Language"
|
||||
msgstr "Jezik besedila"
|
||||
|
||||
#: zrcolagui.cpp:794
|
||||
#: zrcolagui.cpp:817
|
||||
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."
|
||||
"It will be available on the system tray and via registered shortcuts Win+F5 and Win+F6."
|
||||
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."
|
||||
"Na voljo bo v vrstici za sistemska obvestila ter preko registriranih bližnjic Win+F5 in Win+F6."
|
||||
|
||||
#: zrcolagui.cpp:798
|
||||
#: zrcolagui.cpp:821
|
||||
msgid "Start ZRCola &automatically on logon"
|
||||
msgstr "S&amodejno zaženi ZRColo ob prijavi"
|
||||
|
||||
#: zrcolagui.cpp:805
|
||||
#: zrcolagui.cpp:827
|
||||
msgid "Startup"
|
||||
msgstr "Zagon"
|
||||
|
||||
#: zrcolagui.cpp:885
|
||||
#: zrcolagui.cpp:905
|
||||
msgid ""
|
||||
"Program and Website Editor: Janoš Ježovnik\n"
|
||||
"Development: Amebis, d. o. o., Kamnik\n"
|
||||
"Translation into English: Janoš Ježovnik\n"
|
||||
"Translation into Russian language: Domen Krvina, Silvo Torkar, Anastasia "
|
||||
"Plotnikova\n"
|
||||
"Translation into Russian language: Domen Krvina, Silvo Torkar, Anastasia Plotnikova\n"
|
||||
"Development and maintenance of the original program (2004–2015): Peter Weiss"
|
||||
msgstr ""
|
||||
"Urednik programa in spletne strani: Janoš Ježovnik\n"
|
||||
@@ -472,101 +480,140 @@ msgstr ""
|
||||
"Prevod v ruski jezik: Domen Krvina, Silvo Torkar, Anastasija Plotnikova\n"
|
||||
"Razvoj in vzdrževanje prvotnega programa (2004–2015): Peter Weiss"
|
||||
|
||||
#: zrcolagui.cpp:893
|
||||
#: zrcolagui.cpp:913
|
||||
msgid "zrcola.zrc-sazu.si"
|
||||
msgstr "zrcola.zrc-sazu.si"
|
||||
|
||||
#: zrcolagui.cpp:899
|
||||
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:919
|
||||
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:903
|
||||
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:923
|
||||
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:944
|
||||
#: zrcolagui.cpp:964
|
||||
msgid "Log"
|
||||
msgstr "Dnevnik"
|
||||
|
||||
#: zrcolagui.cpp:960
|
||||
#: zrcolagui.cpp:980
|
||||
msgid "Quit and &Update..."
|
||||
msgstr "Za&ustavi in posodobi ..."
|
||||
|
||||
#: zrcolagui.cpp:962
|
||||
#: zrcolagui.cpp:982
|
||||
msgid "Exit this program and launch product update"
|
||||
msgstr "Zaustavi program in zaženi posodobitev izdelka"
|
||||
|
||||
#: zrcolagui.cpp:966
|
||||
#: zrcolagui.cpp:986
|
||||
msgid "&Close"
|
||||
msgstr "&Zapri"
|
||||
|
||||
#: zrcolagui.cpp:967
|
||||
#: zrcolagui.cpp:987
|
||||
msgid "Close this window"
|
||||
msgstr "Zapri to okno"
|
||||
|
||||
#: zrcolagui.cpp:1006
|
||||
#: zrcolagui.cpp:1026
|
||||
msgid "Enter the &character you would like to request:"
|
||||
msgstr "Vpišite &znak, ki ga želite zahtevati:"
|
||||
|
||||
#: zrcolagui.cpp:1013
|
||||
#: zrcolagui.cpp:1033
|
||||
msgid "Decomposed character to request"
|
||||
msgstr "Zahtevani znak v razstavljeni obliki"
|
||||
|
||||
# Please use a double && for final "&" character
|
||||
#: zrcolagui.cpp:1017
|
||||
#: zrcolagui.cpp:1037
|
||||
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."
|
||||
"You can use ZRCola keyboard shortcuts to enter the character or Copy&&Paste it from the Decomposed window."
|
||||
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."
|
||||
"Za vnos znaka lahko uporabite ZRColine bližnjice na tipkovnici ali ga kopirate in prilepite iz okna z razstavljenim besedilom."
|
||||
|
||||
#: zrcolagui.cpp:1027
|
||||
msgid ""
|
||||
"The &context, examples or description why and where the character is "
|
||||
"required:"
|
||||
#: zrcolagui.cpp:1047
|
||||
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:1033
|
||||
#: zrcolagui.cpp:1053
|
||||
msgid "Additional notes for character request"
|
||||
msgstr "Dodatne opombe za zahtevo znaka"
|
||||
|
||||
#: zrcolagui.cpp:1040
|
||||
#: zrcolagui.cpp:1060
|
||||
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."
|
||||
"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."
|
||||
msgstr ""
|
||||
"Ko boste kliknili gumb V redu, se bo odprl vaš program za e-pošto, s katerim "
|
||||
"boste lahko oddali zahtevo za nov znak uredniku programa.\n"
|
||||
"Vsi znaki v sporočilu morda ne bodo prikazani pravilno, vendar jih bo "
|
||||
"urednik lahko kljub temu razbral."
|
||||
"Ko boste kliknili gumb V redu, se bo odprl vaš program za e-pošto, s katerim boste lahko oddali zahtevo za nov znak uredniku programa.\n"
|
||||
"Vsi znaki v sporočilu morda ne bodo prikazani pravilno, vendar jih bo urednik lahko kljub temu razbral."
|
||||
|
||||
#: zrcolagui.cpp:1102
|
||||
msgid "Translation"
|
||||
msgstr "Pretvorba"
|
||||
|
||||
#: zrcolagui.cpp:1104
|
||||
msgid ""
|
||||
"ZRCola offers multiple text translations that can be arranged in a sequence.\n"
|
||||
"Please select desired translations 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:1114
|
||||
msgid "A&vailable:"
|
||||
msgstr "Na &voljo:"
|
||||
|
||||
#: zrcolagui.cpp:1129
|
||||
msgid ">"
|
||||
msgstr ">"
|
||||
|
||||
#: zrcolagui.cpp:1132
|
||||
msgid "<"
|
||||
msgstr "<"
|
||||
|
||||
#: zrcolagui.cpp:1141
|
||||
msgid "&Selected:"
|
||||
msgstr "I&zbrani:"
|
||||
|
||||
#: zrcolagui.cpp:1159
|
||||
msgid "Up"
|
||||
msgstr "Gor"
|
||||
|
||||
#: zrcolagui.cpp:1162
|
||||
msgid "Down"
|
||||
msgstr "Dol"
|
||||
|
||||
#: zrcolagui.h:250
|
||||
msgid "Character Search"
|
||||
msgstr "Poišči znak"
|
||||
|
||||
#: zrcolagui.h:286
|
||||
msgid "Settings"
|
||||
msgstr "Nastavitve"
|
||||
|
||||
#: zrcolagui.h:312
|
||||
msgid "About ZRCola"
|
||||
msgstr "O ZRColi"
|
||||
|
||||
#: zrcolagui.h:337 zrcolaupdater.cpp:94
|
||||
msgid "Product Update"
|
||||
msgstr "Posodabljanje izdelka"
|
||||
|
||||
#: zrcolagui.h:408
|
||||
msgid "Custom Translation Sequence"
|
||||
msgstr "Zaporedje pretvorb po meri"
|
||||
|
||||
#: zrcolakeyhndlr.cpp:44
|
||||
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: 0–9, A–F), nato izpustite INS."
|
||||
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: 0–9, A–F), nato izpustite INS."
|
||||
|
||||
#: zrcolasettings.cpp:93
|
||||
#: zrcolasettings.cpp:87
|
||||
msgid "Start ZRCola automatically on logon"
|
||||
msgstr "Samodejno zaženi ZRColo ob prijavi"
|
||||
|
||||
#: zrcolatranseq.cpp:63
|
||||
#, c-format
|
||||
msgid "Unknown translation (%u)"
|
||||
msgstr "Neznana pretvorba (%u)"
|
||||
|
||||
#: zrcolaupdater.cpp:94
|
||||
msgid ""
|
||||
"This program will now close and the upgrade will be launched.\n"
|
||||
@@ -575,150 +622,80 @@ msgstr ""
|
||||
"Program se bo zdaj zaprl in zagnala se bo posodobitev.\n"
|
||||
"Ali ste prepričani, da želite nadaljevati?"
|
||||
|
||||
#: zrcolaupdater.cpp:94 zrcolagui.h:334
|
||||
msgid "Product Update"
|
||||
msgstr "Posodabljanje izdelka"
|
||||
|
||||
#: zrcolagui.h:246
|
||||
msgid "Character Search"
|
||||
msgstr "Poišči znak"
|
||||
|
||||
#: zrcolagui.h:283
|
||||
msgid "Settings"
|
||||
msgstr "Nastavitve"
|
||||
|
||||
#: zrcolagui.h:309
|
||||
msgid "About ZRCola"
|
||||
msgstr "O ZRColi"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:15
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:10
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:15
|
||||
msgid "binUIHeader.bmp"
|
||||
msgstr "binUIHeader.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:5
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:5
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting"
|
||||
msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Zagon"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:6
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:6
|
||||
msgid "bintutorial1.bmp"
|
||||
msgstr "bintutorial1.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:7
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:7
|
||||
msgid ""
|
||||
"When configured, ZRCola starts at system startup and runs in the background. "
|
||||
"If needed, it can be brought up by pressing the combination Win+F5."
|
||||
msgstr ""
|
||||
"Če jo tako nastavimo, se ZRCola zažene samodejno in teče v ozadju. V "
|
||||
"ospredje jo prikličemo s pritiskom na bližnjico Win+F5."
|
||||
msgid "When configured, ZRCola starts at system startup and runs in the background. If needed, it can be brought up by pressing the combination Win+F5."
|
||||
msgstr "Če jo tako nastavimo, se ZRCola zažene samodejno in teče v ozadju. V ospredje jo prikličemo s pritiskom na bližnjico Win+F5."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:8
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:8
|
||||
msgid ""
|
||||
"IMPORTANT: Upon pressing the combination Win+F5 the program memorises the "
|
||||
"location of the cursor in the text. If ZRCola is brought to the foreground "
|
||||
"without using the aforementioned combination of keys, the program won't know "
|
||||
"where to insert the special characters!"
|
||||
msgstr ""
|
||||
"POMEMBNO: Ob pritisku na Win+F5 si program zapomni mesto kurzorja v "
|
||||
"besedilu. Če ZRColo povečamo brez pritiska na ti dve tipki, program ne bo "
|
||||
"vedel, kam vstaviti želene znake!"
|
||||
msgid "IMPORTANT: Upon pressing the combination Win+F5 the program memorises the location of the cursor in the text. If ZRCola is brought to the foreground without using the aforementioned combination of keys, the program won't know where to insert the special characters!"
|
||||
msgstr "POMEMBNO: Ob pritisku na Win+F5 si program zapomni mesto kurzorja v besedilu. Če ZRColo povečamo brez pritiska na ti dve tipki, program ne bo vedel, kam vstaviti želene znake!"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:19
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:9
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:14
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:19
|
||||
msgid "&Continue"
|
||||
msgstr "&Nadaljuj"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:11
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:11
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition"
|
||||
msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Sestavljanje"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:12
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:12
|
||||
msgid "bintutorial2.bmp"
|
||||
msgstr "bintutorial2.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:13
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:13
|
||||
msgid ""
|
||||
"The string of basic and substitute characters is entered into the upper "
|
||||
"input window of the program. In the window below the resulted special "
|
||||
"characters are displayed. To insert them in the text, the F5 key is used."
|
||||
msgstr ""
|
||||
"Želeni niz osnovnih in nadomestnih znakov vnesemo v zgornjo vrstico v "
|
||||
"programu. V spodnji vrstici se prikažejo sestavljeni znaki. V besedilo jih "
|
||||
"vnesemo s pritiskom na tipko F5."
|
||||
msgid "The string of basic and substitute characters is entered into the upper input window of the program. In the window below the resulted special characters are displayed. To insert them in the text, the F5 key is used."
|
||||
msgstr "Želeni niz osnovnih in nadomestnih znakov vnesemo v zgornjo vrstico v programu. V spodnji vrstici se prikažejo sestavljeni znaki. V besedilo jih vnesemo s pritiskom na tipko F5."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:16
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:16
|
||||
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters"
|
||||
msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Vnos znakov"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:17
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:17
|
||||
msgid "bintutorial3.bmp"
|
||||
msgstr "bintutorial3.bmp"
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.x64.Debug.Control-2.idtx:18
|
||||
#: MSIBuild/en_US.x64.Release.Control-2.idtx:18
|
||||
msgid ""
|
||||
"Characters can be entered using keyboard shortcuts, the character catalogue "
|
||||
"(F4) or the character finding tool (F8)."
|
||||
msgstr ""
|
||||
"Znake lahko v vnosno vrstico vstavljamo s pomočjo bližnjic na tipkovnici, iz "
|
||||
"kataloga znakov (F4) ali z iskalnikom znakov (F8)."
|
||||
msgid "Characters can be entered using keyboard shortcuts, the character catalogue (F4) or the character finding tool (F8)."
|
||||
msgstr "Znake lahko v vnosno vrstico vstavljamo s pomočjo bližnjic na tipkovnici, iz kataloga znakov (F4) ali z iskalnikom znakov (F8)."
|
||||
|
||||
#: MSIBuild/en_US.Win32.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Debug.Shortcut-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Feature-2.idtx:4
|
||||
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "Input system for linguistic use"
|
||||
msgstr "Vnašalni sistem za jezikoslovno rabo"
|
||||
|
||||
#~ msgid "&Active:"
|
||||
#~ msgstr "&Aktivni:"
|
||||
|
||||
BIN
ZRCola/res/copy_destination_and_return.ico
Normal file
BIN
ZRCola/res/copy_destination_and_return.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1698
ZRCola/res/copy_destination_and_return.pdf
Normal file
1698
ZRCola/res/copy_destination_and_return.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
ZRCola/res/copy_source_and_return.ico
Normal file
BIN
ZRCola/res/copy_source_and_return.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
1718
ZRCola/res/copy_source_and_return.pdf
Normal file
1718
ZRCola/res/copy_source_and_return.pdf
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
@@ -29,6 +29,7 @@
|
||||
#include "zrcolafrm.h"
|
||||
#include "zrcolakeyhndlr.h"
|
||||
#include "zrcolasettings.h"
|
||||
#include "zrcolatranseq.h"
|
||||
#include "zrcolaupdater.h"
|
||||
|
||||
#include <Updater/chkthread.h>
|
||||
@@ -37,13 +38,15 @@
|
||||
#include <wxex/url.h>
|
||||
#include <wxex/persist/auimanager.h>
|
||||
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/persist.h>
|
||||
#include <wx/persist/toplevel.h>
|
||||
#include <wx/socket.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/socket.h>
|
||||
|
||||
#include <WinStd/MSI.h>
|
||||
|
||||
|
||||
@@ -102,6 +102,18 @@ bool ZRColaApp::OnInit()
|
||||
wxFAIL_MSG(wxT("Error reading translation data from ZRCola.zrcdb."));
|
||||
m_t_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::transet_rec::id) {
|
||||
dat >> ZRCola::transet_rec(m_ts_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading translation set data from ZRCola.zrcdb."));
|
||||
m_ts_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::transeq_rec::id) {
|
||||
dat >> ZRCola::transeq_rec(m_tsq_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading translation sequence data from ZRCola.zrcdb."));
|
||||
m_tsq_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::langchar_rec::id) {
|
||||
dat >> ZRCola::langchar_rec(m_lc_db);
|
||||
if (!dat.good()) {
|
||||
@@ -159,7 +171,6 @@ bool ZRColaApp::OnInit()
|
||||
wxSocketBase::Initialize();
|
||||
|
||||
m_mainWnd = new wxZRColaFrame();
|
||||
wxPersistentRegisterAndRestore<wxZRColaFrame>(m_mainWnd);
|
||||
m_mainWnd->Show();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -73,6 +73,8 @@ public:
|
||||
|
||||
public:
|
||||
ZRCola::translation_db m_t_db; ///< Translation database
|
||||
ZRCola::transet_db m_ts_db; ///< Translation set database
|
||||
ZRCola::transeq_db m_tsq_db; ///< Translation sequence database
|
||||
ZRCola::langchar_db m_lc_db; ///< Language character database
|
||||
ZRCola::language_db m_lang_db; ///< Language database
|
||||
ZRCola::keyseq_db m_ks_db; ///< Key sequence database
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE(wxZRColaCharacterCatalogPanel, wxZRColaCharacterCatalogPanelBase)
|
||||
EVT_MENU(wxZRColaCharacterCatalogPanel::wxID_FOCUS_DECOMPOSED, wxZRColaCharacterCatalogPanel::OnFocusDecomposed)
|
||||
EVT_MENU(wxZRColaCharacterCatalogPanel::wxID_FOCUS_SOURCE, wxZRColaCharacterCatalogPanel::OnFocusSource)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) :
|
||||
dat >> rec;
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading character group data from ZRCola.zrcdb."));
|
||||
m_cg_db.idxRnk.clear();
|
||||
m_cg_db.data .clear();
|
||||
m_cg_db.idxRank.clear();
|
||||
m_cg_db.data .clear();
|
||||
}
|
||||
} else
|
||||
wxFAIL_MSG(wxT("ZRCola.zrcdb has no character group data."));
|
||||
@@ -52,16 +52,16 @@ wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) :
|
||||
wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database."));
|
||||
}
|
||||
|
||||
if (!m_cg_db.idxRnk.empty()) {
|
||||
if (!m_cg_db.idxRank.empty()) {
|
||||
// Populate character group list.
|
||||
for (size_t i = 0, n = m_cg_db.idxRnk.size(); i < n; i++) {
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRnk[i];
|
||||
for (size_t i = 0, n = m_cg_db.idxRank.size(); i < n; i++) {
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRank[i];
|
||||
wxString
|
||||
label(cg.data, cg.name_len),
|
||||
label(cg.name(), cg.name_len()),
|
||||
label_tran2(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
|
||||
m_choice->Insert(label_tran2, i);
|
||||
}
|
||||
m_cg_id = m_cg_db.idxRnk[0].id;
|
||||
m_cg_id = m_cg_db.idxRank[0].grp;
|
||||
m_choice->Select(0);
|
||||
|
||||
Update();
|
||||
@@ -70,7 +70,7 @@ wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) :
|
||||
// Register frame specific hotkey(s).
|
||||
{
|
||||
wxAcceleratorEntry entries[1];
|
||||
entries[0].Set(wxACCEL_NORMAL, WXK_ESCAPE, wxID_FOCUS_DECOMPOSED);
|
||||
entries[0].Set(wxACCEL_NORMAL, WXK_ESCAPE, wxID_FOCUS_SOURCE);
|
||||
SetAcceleratorTable(wxAcceleratorTable(_countof(entries), entries));
|
||||
}
|
||||
}
|
||||
@@ -83,10 +83,10 @@ wxZRColaCharacterCatalogPanel::~wxZRColaCharacterCatalogPanel()
|
||||
|
||||
void wxZRColaCharacterCatalogPanel::OnChoice(wxCommandEvent& event)
|
||||
{
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRnk[event.GetSelection()];
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRank[event.GetSelection()];
|
||||
|
||||
if (m_cg_id != cg.id) {
|
||||
m_cg_id = cg.id;
|
||||
if (m_cg_id != cg.grp) {
|
||||
m_cg_id = cg.grp;
|
||||
Update();
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ void wxZRColaCharacterCatalogPanel::OnGridClick(wxGridEvent& event)
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
if (app->m_mainWnd) {
|
||||
app->m_mainWnd->m_panel->m_decomposed->WriteText(m_grid->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
app->m_mainWnd->m_panel->m_decomposed->SetFocus();
|
||||
app->m_mainWnd->m_panel->m_source->WriteText(m_grid->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
app->m_mainWnd->m_panel->m_source->SetFocus();
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
@@ -113,8 +113,8 @@ void wxZRColaCharacterCatalogPanel::OnGridKeyDown(wxKeyEvent& event)
|
||||
case WXK_NUMPAD_ENTER:
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
if (app->m_mainWnd) {
|
||||
app->m_mainWnd->m_panel->m_decomposed->WriteText(m_grid->GetCellValue(m_grid->GetCursorRow(), m_grid->GetCursorColumn()));
|
||||
app->m_mainWnd->m_panel->m_decomposed->SetFocus();
|
||||
app->m_mainWnd->m_panel->m_source->WriteText(m_grid->GetCellValue(m_grid->GetCursorRow(), m_grid->GetCursorColumn()));
|
||||
app->m_mainWnd->m_panel->m_source->SetFocus();
|
||||
|
||||
event.StopPropagation();
|
||||
return;
|
||||
@@ -135,11 +135,11 @@ void wxZRColaCharacterCatalogPanel::OnShowAll(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharacterCatalogPanel::OnFocusDecomposed(wxCommandEvent& event)
|
||||
void wxZRColaCharacterCatalogPanel::OnFocusSource(wxCommandEvent& event)
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
if (app->m_mainWnd) {
|
||||
app->m_mainWnd->m_panel->m_decomposed->SetFocus();
|
||||
app->m_mainWnd->m_panel->m_source->SetFocus();
|
||||
|
||||
event.StopPropagation();
|
||||
return;
|
||||
@@ -151,21 +151,23 @@ void wxZRColaCharacterCatalogPanel::OnFocusDecomposed(wxCommandEvent& event)
|
||||
|
||||
void wxZRColaCharacterCatalogPanel::Update()
|
||||
{
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRnk[m_choice->GetSelection()];
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = m_cg_db.idxRank[m_choice->GetSelection()];
|
||||
|
||||
if (m_show_all->GetValue()) {
|
||||
m_grid->SetCharacters(
|
||||
wxString(cg.get_chars(), cg.char_len),
|
||||
wxArrayShort((const short*)cg.get_char_shown(), (const short*)cg.get_char_shown() + (cg.char_len + 15)/16));
|
||||
wxString(cg.chrlst(), cg.chrlst_end()),
|
||||
wxArrayShort(reinterpret_cast<const short*>(cg.chrshow()), reinterpret_cast<const short*>(cg.chrshow_end())));
|
||||
} else {
|
||||
// Select frequently used characters only.
|
||||
const wchar_t *src = cg.get_chars();
|
||||
const unsigned __int16 *shown = cg.get_char_shown();
|
||||
wxString chars;
|
||||
for (unsigned __int16 i = 0, j = 0; i < cg.char_len; j++) {
|
||||
for (unsigned __int16 k = 0, mask = shown[j]; k < 16 && i < cg.char_len; k++, mask >>= 1, i++) {
|
||||
const wchar_t *src = cg.chrlst();
|
||||
const unsigned __int16 *shown = cg.chrshow();
|
||||
wxArrayString chars;
|
||||
for (size_t i = 0, i_end = cg.chrlst_len(), j = 0; i < i_end; j++) {
|
||||
for (unsigned __int16 k = 0, mask = shown[j]; k < 16 && i < i_end; k++, mask >>= 1) {
|
||||
size_t len = wcsnlen(src + i, i_end - i);
|
||||
if (mask & 1)
|
||||
chars += src[i];
|
||||
chars.Add(wxString(src + i, len));
|
||||
i += len + 1;
|
||||
}
|
||||
}
|
||||
m_grid->SetCharacters(chars);
|
||||
@@ -208,11 +210,11 @@ bool wxPersistentZRColaCharacterCatalogPanel::Restore()
|
||||
// Restore selected character group.
|
||||
int cg_id;
|
||||
if (RestoreValue(wxT("charGroup"), &cg_id)) {
|
||||
for (size_t i = 0, n = wnd->m_cg_db.idxRnk.size(); i < n; i++) {
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = wnd->m_cg_db.idxRnk[i];
|
||||
if (cg.id == cg_id) {
|
||||
if (wnd->m_cg_id != cg.id) {
|
||||
wnd->m_cg_id = cg.id;
|
||||
for (size_t i = 0, n = wnd->m_cg_db.idxRank.size(); i < n; i++) {
|
||||
const ZRCola::chrgrp_db::chrgrp &cg = wnd->m_cg_db.idxRank[i];
|
||||
if (cg.grp == cg_id) {
|
||||
if (wnd->m_cg_id != cg.grp) {
|
||||
wnd->m_cg_id = cg.grp;
|
||||
wnd->m_choice->Select(i);
|
||||
update = true;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class wxZRColaCharacterCatalogPanel : public wxZRColaCharacterCatalogPanelBase
|
||||
public:
|
||||
enum
|
||||
{
|
||||
wxID_FOCUS_DECOMPOSED = 6000,
|
||||
wxID_FOCUS_SOURCE = 6000,
|
||||
};
|
||||
|
||||
wxZRColaCharacterCatalogPanel(wxWindow* parent);
|
||||
@@ -51,7 +51,7 @@ protected:
|
||||
virtual void OnGridClick(wxGridEvent& event);
|
||||
virtual void OnGridKeyDown(wxKeyEvent& event);
|
||||
virtual void OnShowAll(wxCommandEvent& event);
|
||||
void OnFocusDecomposed(wxCommandEvent& event);
|
||||
void OnFocusSource(wxCommandEvent& event);
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
void Update();
|
||||
|
||||
@@ -68,6 +68,24 @@ void wxZRColaCharGrid::Init()
|
||||
|
||||
|
||||
void wxZRColaCharGrid::SetCharacters(const wxString &chars)
|
||||
{
|
||||
m_chars.Clear();
|
||||
const wxCStrData chr = chars.GetData();
|
||||
for (size_t i = 0, i_end = chars.Length(), i_next; i < i_end; i = i_next + 1) {
|
||||
i_next = i + _tcsnlen(chr + i, i_end - i);
|
||||
m_chars.Add(wxString(chr + i, chr + i_next));
|
||||
};
|
||||
m_relevance.Clear();
|
||||
m_regenerate = true;
|
||||
|
||||
// Invoke OnSize(), which will populate the grid.
|
||||
wxSizeEvent e(GetSize(), m_windowId);
|
||||
e.SetEventObject(this);
|
||||
HandleWindowEvent(e);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharGrid::SetCharacters(const wxArrayString &chars)
|
||||
{
|
||||
m_chars = chars;
|
||||
m_relevance.Clear();
|
||||
@@ -82,7 +100,12 @@ void wxZRColaCharGrid::SetCharacters(const wxString &chars)
|
||||
|
||||
void wxZRColaCharGrid::SetCharacters(const wxString &chars, const wxArrayShort &relevance)
|
||||
{
|
||||
m_chars = chars;
|
||||
m_chars.Clear();
|
||||
const wxCStrData chr = chars.GetData();
|
||||
for (size_t i = 0, i_end = chars.Length(), i_next; i < i_end; i = i_next + 1) {
|
||||
i_next = i + _tcsnlen(chr + i, i_end - i);
|
||||
m_chars.Add(wxString(chr + i, chr + i_next));
|
||||
};
|
||||
m_relevance = relevance;
|
||||
m_regenerate = true;
|
||||
|
||||
@@ -95,22 +118,23 @@ void wxZRColaCharGrid::SetCharacters(const wxString &chars, const wxArrayShort &
|
||||
|
||||
wxString wxZRColaCharGrid::GetToolTipText(int idx)
|
||||
{
|
||||
wxASSERT_MSG(idx < (int)m_chars.Length(), wxT("index out of bounds"));
|
||||
wxASSERT_MSG(idx < (int)m_chars.GetCount(), wxT("index out of bounds"));
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
const auto &chr = m_chars[idx];
|
||||
|
||||
// See if this character has a key sequence registered.
|
||||
char ks[sizeof(ZRCola::keyseq_db::keyseq)] = {};
|
||||
((ZRCola::keyseq_db::keyseq*)ks)->chr = m_chars[idx];
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(wchar_t)*chr.length()]);
|
||||
ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, chr.data(), chr.length());
|
||||
ZRCola::keyseq_db::indexKey::size_type start;
|
||||
if (app->m_ks_db.idxChr.find(*(ZRCola::keyseq_db::keyseq*)ks, start)) {
|
||||
if (app->m_ks_db.idxChr.find(*ks, start)) {
|
||||
ZRCola::keyseq_db::keyseq &seq = app->m_ks_db.idxChr[start];
|
||||
wxString ks_str;
|
||||
if (ZRCola::keyseq_db::GetSequenceAsText(seq.seq, seq.seq_len, ks_str))
|
||||
return wxString::Format(wxT("U+%04X (%s)"), (int)m_chars[idx], ks_str.c_str());
|
||||
if (ZRCola::keyseq_db::GetSequenceAsText(seq.seq(), seq.seq_len(), ks_str))
|
||||
return wxString::Format(wxT("U+%s (%s)"), ZRCola::GetUnicodeDump(chr.data(), chr.length(), _T("+")).c_str(), ks_str.c_str());
|
||||
}
|
||||
|
||||
return wxString::Format(wxT("U+%04X"), (int)m_chars[idx]);
|
||||
return wxString::Format(wxT("U+%s"), ZRCola::GetUnicodeDump(chr.data(), chr.length(), _T("+")).c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -126,17 +150,17 @@ void wxZRColaCharGrid::OnSize(wxSizeEvent& event)
|
||||
// Calculate initial estimate of columns and rows.
|
||||
wxSize size(event.GetSize());
|
||||
size_t
|
||||
char_len = m_chars.Length();
|
||||
char_count = m_chars.GetCount();
|
||||
int
|
||||
width = size.GetWidth() - m_rowLabelWidth - m_extraWidth,
|
||||
cols = std::max<int>(width / wxZRColaCharacterGridColumnWidth, 1),
|
||||
rows = std::max<int>((char_len + cols - 1) / cols, 1);
|
||||
width = size.GetWidth() - m_rowLabelWidth - m_extraWidth,
|
||||
cols = std::max<int>(width / wxZRColaCharacterGridColumnWidth, 1),
|
||||
rows = std::max<int>((char_count + cols - 1) / cols, 1);
|
||||
|
||||
if (m_colLabelHeight + rows*wxZRColaCharacterGridRowHeight + m_extraHeight > size.GetHeight()) {
|
||||
// Vertical scrollbar will be shown. Adjust the width and recalculate layout to avoid horizontal scrollbar.
|
||||
width = std::max<int>(width - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X, this), 0);
|
||||
cols = std::max<int>(width / wxZRColaCharacterGridColumnWidth, 1);
|
||||
rows = std::max<int>((char_len + cols - 1) / cols, 1);
|
||||
rows = std::max<int>((char_count + cols - 1) / cols, 1);
|
||||
}
|
||||
|
||||
BeginBatch();
|
||||
@@ -146,14 +170,14 @@ void wxZRColaCharGrid::OnSize(wxSizeEvent& event)
|
||||
wxGridStringTable *table = new wxGridStringTable(rows, cols);
|
||||
for (int r = 0, i = 0; r < rows; r++)
|
||||
for (int c = 0; c < cols; c++, i++)
|
||||
table->SetValue(r, c, i < (int)char_len ? wxString(1, m_chars[i]) : wxEmptyString);
|
||||
table->SetValue(r, c, i < (int)char_count ? m_chars[i] : wxEmptyString);
|
||||
SetTable(table, true);
|
||||
if (!m_relevance.IsEmpty()) {
|
||||
const wxColour colour_def;
|
||||
const wxColour colour_irr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT);
|
||||
for (int r = 0, i = 0; r < rows; r++)
|
||||
for (int c = 0; c < cols; c++, i++)
|
||||
SetCellBackgroundColour(r, c, i >= (int)char_len || ((unsigned short)(m_relevance[i/16]) & (1<<(i%16))) ? colour_def : colour_irr);
|
||||
SetCellBackgroundColour(r, c, i >= (int)char_count || ((unsigned short)(m_relevance[i/16]) & (1<<(i%16))) ? colour_def : colour_irr);
|
||||
} else {
|
||||
for (int r = 0, i = 0; r < rows; r++)
|
||||
for (int c = 0; c < cols; c++, i++)
|
||||
@@ -217,7 +241,7 @@ void wxZRColaCharGrid::OnMotion(wxMouseEvent& event)
|
||||
return;
|
||||
|
||||
size_t toolTipIdx = row*m_numCols + col;
|
||||
if (toolTipIdx >= m_chars.Length()) {
|
||||
if (toolTipIdx >= m_chars.GetCount()) {
|
||||
// Index out of range.
|
||||
m_toolTipIdx = (size_t)-1;
|
||||
m_timerToolTip.Stop();
|
||||
@@ -241,7 +265,7 @@ void wxZRColaCharGrid::OnTooltipTimer(wxTimerEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_toolTipIdx >= m_chars.Length())
|
||||
if (m_toolTipIdx >= m_chars.GetCount())
|
||||
return;
|
||||
|
||||
GetGridWindow()->SetToolTip(GetToolTipText(m_toolTipIdx));
|
||||
|
||||
@@ -54,14 +54,21 @@ public:
|
||||
///
|
||||
/// Sets new array of characters to display
|
||||
///
|
||||
/// \param[in] chars The string containing characters to display
|
||||
/// \param[in] chars The string containing characters to display (zero delimited)
|
||||
///
|
||||
void SetCharacters(const wxString &chars);
|
||||
|
||||
///
|
||||
/// Sets new array of characters to display
|
||||
///
|
||||
/// \param[in] chars The string containing characters to display
|
||||
/// \param[in] chars The array of characters to display
|
||||
///
|
||||
void SetCharacters(const wxArrayString &chars);
|
||||
|
||||
///
|
||||
/// Sets new array of characters to display
|
||||
///
|
||||
/// \param[in] chars The string containing characters to display (zero delimited)
|
||||
/// \param[in] relevance Bit-array of \p chars relevance (1=more relevant, 0=less relevant)
|
||||
///
|
||||
void SetCharacters(const wxString &chars, const wxArrayShort &relevance);
|
||||
@@ -71,7 +78,7 @@ public:
|
||||
///
|
||||
/// \returns The string containing displayed characters
|
||||
///
|
||||
inline wxString GetCharacters() const
|
||||
inline const wxArrayString& GetCharacters() const
|
||||
{
|
||||
return m_chars;
|
||||
}
|
||||
@@ -83,10 +90,14 @@ public:
|
||||
///
|
||||
/// \returns Grid coordinates of selected character or (-1, -1) if character not found.
|
||||
///
|
||||
inline wxGridCellCoords GetCharacterCoords(wchar_t c) const
|
||||
inline wxGridCellCoords GetCharacterCoords(const wxString &c) const
|
||||
{
|
||||
int i = m_chars.Find(c);
|
||||
return i != wxNOT_FOUND ? wxGridCellCoords(i / m_numCols, i % m_numCols) : wxGridCellCoords(-1, -1);
|
||||
for (size_t i = 0, n = m_chars.GetCount(); ; i++) {
|
||||
if (i >= n)
|
||||
return wxGridCellCoords(-1, -1);
|
||||
else if (m_chars[i] == c)
|
||||
return wxGridCellCoords(i / m_numCols, i % m_numCols);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -102,7 +113,7 @@ private:
|
||||
void Init(); // common part of all ctors
|
||||
|
||||
protected:
|
||||
wxString m_chars; ///< Array of Unicode characters to display in the grid
|
||||
wxArrayString m_chars; ///< Array of Unicode characters to display in the grid
|
||||
wxArrayShort m_relevance; ///< Bit-array of `m_chars` relevance
|
||||
|
||||
private:
|
||||
|
||||
@@ -20,6 +20,174 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaUTF16CharValidator
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxZRColaUTF16CharValidator, wxValidator);
|
||||
|
||||
|
||||
wxZRColaUTF16CharValidator::wxZRColaUTF16CharValidator(wchar_t *val) :
|
||||
m_val(val),
|
||||
wxValidator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxObject* wxZRColaUTF16CharValidator::Clone() const
|
||||
{
|
||||
return new wxZRColaUTF16CharValidator(*this);
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUTF16CharValidator::Validate(wxWindow *parent)
|
||||
{
|
||||
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxTextCtrl)));
|
||||
wxTextCtrl *ctrl = (wxTextCtrl*)GetWindow();
|
||||
if (!ctrl->IsEnabled()) return true;
|
||||
|
||||
wxString val(ctrl->GetValue());
|
||||
return Parse(val, 0, val.Length(), ctrl, parent);
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUTF16CharValidator::TransferToWindow()
|
||||
{
|
||||
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxTextCtrl)));
|
||||
|
||||
if (m_val)
|
||||
((wxTextCtrl*)GetWindow())->SetValue(wxString::Format(wxT("%04X"), *m_val));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUTF16CharValidator::TransferFromWindow()
|
||||
{
|
||||
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxTextCtrl)));
|
||||
wxTextCtrl *ctrl = (wxTextCtrl*)GetWindow();
|
||||
|
||||
wxString val(ctrl->GetValue());
|
||||
return Parse(val, 0, val.Length(), ctrl, NULL, m_val);
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, wchar_t *val_out)
|
||||
{
|
||||
const wxStringCharType *buf = val_in;
|
||||
|
||||
wchar_t chr = 0;
|
||||
for (size_t i = i_start;;) {
|
||||
if (i >= i_end) {
|
||||
// End of Unicode found.
|
||||
if (val_out) *val_out = chr;
|
||||
return true;
|
||||
} else if (i >= i_start + 4) {
|
||||
// Maximum characters exceeded.
|
||||
ctrl->SetFocus();
|
||||
ctrl->SetSelection(i, i_end);
|
||||
wxMessageBox(_("Too many digits in Unicode."), _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
|
||||
return false;
|
||||
} else if (_T('0') <= buf[i] && buf[i] <= _T('9')) {
|
||||
// Digit found.
|
||||
chr = (chr << 4) | (buf[i] - _T('0'));
|
||||
i++;
|
||||
} else if (_T('A') <= buf[i] && buf[i] <= _T('F')) {
|
||||
// Capital letter found.
|
||||
chr = (chr << 4) | (buf[i] - _T('A') + 10);
|
||||
i++;
|
||||
} else if (_T('a') <= buf[i] && buf[i] <= _T('f')) {
|
||||
// Lower letter found.
|
||||
chr = (chr << 4) | (buf[i] - _T('a') + 10);
|
||||
i++;
|
||||
} else {
|
||||
// Invalid character found.
|
||||
ctrl->SetFocus();
|
||||
ctrl->SetSelection(i, i + 1);
|
||||
wxMessageBox(wxString::Format(_("Invalid character in Unicode found: %c"), buf[i]), _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaUnicodeDumpValidator
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxZRColaUnicodeDumpValidator, wxValidator);
|
||||
|
||||
|
||||
wxZRColaUnicodeDumpValidator::wxZRColaUnicodeDumpValidator(wxString *val) :
|
||||
m_val(val),
|
||||
wxValidator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxObject* wxZRColaUnicodeDumpValidator::Clone() const
|
||||
{
|
||||
return new wxZRColaUnicodeDumpValidator(*this);
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUnicodeDumpValidator::Validate(wxWindow *parent)
|
||||
{
|
||||
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxTextCtrl)));
|
||||
wxTextCtrl *ctrl = (wxTextCtrl*)GetWindow();
|
||||
if (!ctrl->IsEnabled()) return true;
|
||||
|
||||
wxString val(ctrl->GetValue());
|
||||
return Parse(val, 0, val.Length(), ctrl, parent);
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUnicodeDumpValidator::TransferToWindow()
|
||||
{
|
||||
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxTextCtrl)));
|
||||
|
||||
if (m_val)
|
||||
((wxTextCtrl*)GetWindow())->SetValue(ZRCola::GetUnicodeDumpW(m_val->c_str(), m_val->length(), L"+"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUnicodeDumpValidator::TransferFromWindow()
|
||||
{
|
||||
wxASSERT(GetWindow()->IsKindOf(CLASSINFO(wxTextCtrl)));
|
||||
wxTextCtrl *ctrl = (wxTextCtrl*)GetWindow();
|
||||
|
||||
wxString val(ctrl->GetValue());
|
||||
return Parse(val, 0, val.Length(), ctrl, NULL, m_val);
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUnicodeDumpValidator::Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, wxString *val_out)
|
||||
{
|
||||
const wxStringCharType *buf = val_in;
|
||||
|
||||
wxString str;
|
||||
for (size_t i = i_start;;) {
|
||||
const wxStringCharType *buf_next;
|
||||
wchar_t chr;
|
||||
if ((buf_next = wmemchr(buf + i, L'+', i_end - i)) != NULL) {
|
||||
// Unicode dump separator found.
|
||||
if (!wxZRColaUTF16CharValidator::Parse(val_in, i, buf_next - buf, ctrl, parent, &chr))
|
||||
return false;
|
||||
str += chr;
|
||||
i = buf_next - buf + 1;
|
||||
} else if (wxZRColaUTF16CharValidator::Parse(val_in, i, i_end, ctrl, parent, &chr)) {
|
||||
// The rest of the FQDN parsed succesfully.
|
||||
if (chr) str += chr;
|
||||
if (val_out) *val_out = str;
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaCharSelect
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -30,7 +198,6 @@ wxDEFINE_EVENT(wxEVT_SEARCH_COMPLETE, wxThreadEvent);
|
||||
wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
|
||||
m_searchChanged(false),
|
||||
m_unicodeChanged(false),
|
||||
m_char(0),
|
||||
m_searchThread(NULL),
|
||||
wxZRColaCharSelectBase(parent)
|
||||
{
|
||||
@@ -46,15 +213,15 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
|
||||
|
||||
m_search_more->SetLabel(_(L"▸ Search Options"));
|
||||
|
||||
m_unicode->SetValidator(wxHexValidator<wchar_t>(&m_char, wxNUM_VAL_DEFAULT, 4));
|
||||
m_unicode->SetValidator(wxZRColaUnicodeDumpValidator(&m_char));
|
||||
|
||||
// Fill categories.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRnk[i];
|
||||
int idx = m_categories->Insert(wxGetTranslation(wxString(cc.name, cc.name_len), wxT("ZRCola-zrcdb")), i);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
int idx = m_categories->Insert(wxGetTranslation(wxString(cc.name(), cc.name_len()), wxT("ZRCola-zrcdb")), i);
|
||||
m_categories->Check(idx);
|
||||
m_ccOrder.insert(std::make_pair(cc.id, idx));
|
||||
m_ccOrder.insert(std::make_pair(cc.cat, idx));
|
||||
}
|
||||
|
||||
ResetResults();
|
||||
@@ -84,24 +251,24 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
if (m_unicode->GetValidator()->TransferFromWindow()) {
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
m_gridPreview->SetCellValue(wxString(1, m_char), 0, 0);
|
||||
m_gridPreview->SetCellValue(m_char, 0, 0);
|
||||
|
||||
char chr[sizeof(ZRCola::character_db::character)] = {};
|
||||
((ZRCola::character_db::character*)chr)->chr = m_char;
|
||||
std::unique_ptr<ZRCola::character_db::character> chr((ZRCola::character_db::character*)new char[sizeof(ZRCola::character_db::character) + sizeof(wchar_t)*m_char.length()]);
|
||||
chr->ZRCola::character_db::character::character(m_char.data(), m_char.length());
|
||||
size_t start;
|
||||
if (app->m_chr_db.idxChr.find(*(ZRCola::character_db::character*)chr, start)) {
|
||||
if (app->m_chr_db.idxChr.find(*chr, start)) {
|
||||
const auto &chr = app->m_chr_db.idxChr[start];
|
||||
// Update character description.
|
||||
m_description->SetValue(wxString(chr.data, chr.desc_len));
|
||||
m_description->SetValue(wxString(chr.desc(), chr.desc_len()));
|
||||
{
|
||||
// See if this character has a key sequence registered.
|
||||
char ks[sizeof(ZRCola::keyseq_db::keyseq)] = {};
|
||||
((ZRCola::keyseq_db::keyseq*)ks)->chr = m_char;
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(wchar_t)*m_char.length()]);
|
||||
ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, m_char.data(), m_char.length());
|
||||
ZRCola::keyseq_db::indexKey::size_type start;
|
||||
if (app->m_ks_db.idxChr.find(*(ZRCola::keyseq_db::keyseq*)ks, start)) {
|
||||
if (app->m_ks_db.idxChr.find(*ks, start)) {
|
||||
ZRCola::keyseq_db::keyseq &seq = app->m_ks_db.idxChr[start];
|
||||
wxString ks_str;
|
||||
if (ZRCola::keyseq_db::GetSequenceAsText(seq.seq, seq.seq_len, ks_str))
|
||||
if (ZRCola::keyseq_db::GetSequenceAsText(seq.seq(), seq.seq_len(), ks_str))
|
||||
m_shortcut->SetValue(ks_str);
|
||||
else
|
||||
m_shortcut->SetValue(wxEmptyString);
|
||||
@@ -109,18 +276,16 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
m_shortcut->SetValue(wxEmptyString);
|
||||
}
|
||||
{
|
||||
char cc[sizeof(ZRCola::chrcat_db::chrcat)] = {};
|
||||
((ZRCola::chrcat_db::chrcat*)cc)->id = chr.cat;
|
||||
size_t start;
|
||||
// Update character category.
|
||||
if (app->m_cc_db.idxChrCat.find(*((ZRCola::chrcat_db::chrcat*)cc), start)) {
|
||||
if (app->m_cc_db.idxChrCat.find(ZRCola::chrcat_db::chrcat(chr.cat), start)) {
|
||||
const auto &cat = app->m_cc_db.idxChrCat[start];
|
||||
m_category->SetValue(wxGetTranslation(wxString(cat.name, cat.name_len), wxT("ZRCola-zrcdb")));
|
||||
m_category->SetValue(wxGetTranslation(wxString(cat.name(), cat.name_len()), wxT("ZRCola-zrcdb")));
|
||||
} else
|
||||
m_category->SetValue(wxEmptyString);
|
||||
}
|
||||
// Update related characters.
|
||||
m_gridRelated->SetCharacters(wxString(chr.data + chr.desc_len, chr.rel_len));
|
||||
m_gridRelated->SetCharacters(wxString(chr.rel(), chr.rel_end()));
|
||||
} else {
|
||||
m_description->SetValue(wxEmptyString);
|
||||
m_shortcut->SetValue(wxEmptyString);
|
||||
@@ -130,18 +295,16 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
|
||||
// Find character tags.
|
||||
std::list<std::wstring> tag_names;
|
||||
ZRCola::chrtag_db::chrtag ct = { m_char };
|
||||
std::unique_ptr<ZRCola::chrtag_db::chrtag> ct((ZRCola::chrtag_db::chrtag*)new char[sizeof(ZRCola::chrtag_db::chrtag) + sizeof(wchar_t)*m_char.length()]);
|
||||
ct->ZRCola::chrtag_db::chrtag::chrtag(m_char.data(), m_char.length());
|
||||
size_t end;
|
||||
if (app->m_ct_db.idxChr.find(ct, start, end)) {
|
||||
if (app->m_ct_db.idxChr.find(*ct, start, end)) {
|
||||
for (size_t i = start; i < end; i++) {
|
||||
const ZRCola::chrtag_db::chrtag &ct = app->m_ct_db.idxChr[i];
|
||||
|
||||
// Find tag names.
|
||||
char tn[sizeof(ZRCola::tagname_db::tagname)] = {};
|
||||
((ZRCola::tagname_db::tagname*)tn)->locale = m_locale;
|
||||
((ZRCola::tagname_db::tagname*)tn)->tag = ct.tag;
|
||||
size_t start, end;
|
||||
if (app->m_tn_db.idxTag.find(*((ZRCola::tagname_db::tagname*)tn), start, end)) {
|
||||
if (app->m_tn_db.idxTag.find(ZRCola::tagname_db::tagname(ct.tag, m_locale), start, end)) {
|
||||
for (size_t i = start; i < end; i++) {
|
||||
const ZRCola::tagname_db::tagname &tn = app->m_tn_db.idxTag[i];
|
||||
|
||||
@@ -149,9 +312,9 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
for (auto name = tag_names.cbegin(), name_end = tag_names.cend();; ++name) {
|
||||
if (name == name_end) {
|
||||
// Add name to the list.
|
||||
tag_names.push_back(std::wstring(tn.name, tn.name + tn.name_len));
|
||||
tag_names.push_back(std::wstring(tn.name(), tn.name_end()));
|
||||
break;
|
||||
} else if (ZRCola::tagname_db::tagname::CompareName(m_locale, name->data(), (unsigned __int16)name->length(), tn.name, tn.name_len) == 0)
|
||||
} else if (ZRCola::tagname_db::tagname::CompareName(m_locale, name->data(), (unsigned __int16)name->length(), tn.name(), tn.name_len()) == 0)
|
||||
// Name is already on the list.
|
||||
break;
|
||||
}
|
||||
@@ -191,10 +354,10 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
m_searchThread->m_search.assign(val.c_str(), val.Length());
|
||||
|
||||
// Select categories.
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRnk[i];
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
if (m_categories->IsChecked(i))
|
||||
m_searchThread->m_cats.insert(cc.id);
|
||||
m_searchThread->m_cats.insert(cc.cat);
|
||||
}
|
||||
|
||||
if (m_searchThread->Run() != wxTHREAD_NO_ERROR) {
|
||||
@@ -239,7 +402,7 @@ void wxZRColaCharSelect::OnCategoriesAll(wxHyperlinkEvent& event)
|
||||
event.StopPropagation();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++)
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++)
|
||||
m_categories->Check(i, true);
|
||||
|
||||
m_searchChanged = true;
|
||||
@@ -251,7 +414,7 @@ void wxZRColaCharSelect::OnCategoriesNone(wxHyperlinkEvent& event)
|
||||
event.StopPropagation();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++)
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++)
|
||||
m_categories->Check(i, false);
|
||||
|
||||
m_searchChanged = true;
|
||||
@@ -263,7 +426,7 @@ void wxZRColaCharSelect::OnCategoriesInvert(wxHyperlinkEvent& event)
|
||||
event.StopPropagation();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++)
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++)
|
||||
m_categories->Check(i, !m_categories->IsChecked(i));
|
||||
|
||||
m_searchChanged = true;
|
||||
@@ -284,10 +447,10 @@ void wxZRColaCharSelect::OnSearchComplete(wxThreadEvent& event)
|
||||
|
||||
if (m_searchThread) {
|
||||
// Display results.
|
||||
wxString chars;
|
||||
wxArrayString chars;
|
||||
chars.reserve(m_searchThread->m_hits.size());
|
||||
for (auto i = m_searchThread->m_hits.cbegin(), i_end = m_searchThread->m_hits.cend(); i != i_end; ++i)
|
||||
chars += i->second;
|
||||
chars.Add(i->second);
|
||||
m_gridResults->SetCharacters(chars);
|
||||
|
||||
m_searchThread->Delete();
|
||||
@@ -304,7 +467,7 @@ void wxZRColaCharSelect::OnResultSelectCell(wxGridEvent& event)
|
||||
|
||||
wxString val(m_gridResults->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
if (!val.IsEmpty())
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +477,7 @@ void wxZRColaCharSelect::OnResultCellDClick(wxGridEvent& event)
|
||||
|
||||
wxString val(m_gridResults->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
@@ -328,7 +491,7 @@ void wxZRColaCharSelect::OnResultsKeyDown(wxKeyEvent& event)
|
||||
case WXK_NUMPAD_ENTER:
|
||||
wxString val(m_gridResults->GetCellValue(m_gridResults->GetCursorRow(), m_gridResults->GetCursorColumn()));
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
|
||||
@@ -347,7 +510,7 @@ void wxZRColaCharSelect::OnRecentSelectCell(wxGridEvent& event)
|
||||
|
||||
wxString val(m_gridRecent->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
if (!val.IsEmpty())
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
}
|
||||
|
||||
|
||||
@@ -357,7 +520,7 @@ void wxZRColaCharSelect::OnRecentCellDClick(wxGridEvent& event)
|
||||
|
||||
wxString val(m_gridRecent->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
@@ -371,7 +534,7 @@ void wxZRColaCharSelect::OnRecentKeyDown(wxKeyEvent& event)
|
||||
case WXK_NUMPAD_ENTER:
|
||||
wxString val(m_gridRecent->GetCellValue(m_gridRecent->GetCursorRow(), m_gridRecent->GetCursorColumn()));
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
|
||||
@@ -431,7 +594,7 @@ void wxZRColaCharSelect::OnRelatedSelectCell(wxGridEvent& event)
|
||||
|
||||
wxString val(m_gridRelated->GetCellValue(event.GetRow(), event.GetCol()));
|
||||
if (!val.IsEmpty())
|
||||
NavigateTo(val[0]);
|
||||
NavigateTo(val);
|
||||
}
|
||||
|
||||
|
||||
@@ -439,15 +602,15 @@ void wxZRColaCharSelect::OnOKButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
wxString
|
||||
recent(m_gridRecent->GetCharacters()),
|
||||
val(1, m_char);
|
||||
for (size_t i = 0, n = recent.Length(); i < n; i++) {
|
||||
const wxStringCharType c = recent[i];
|
||||
const wxArrayString &recent = m_gridRecent->GetCharacters();
|
||||
wxArrayString val;
|
||||
val.reserve(recent.GetCount() + 1);
|
||||
val.Add(m_char);
|
||||
for (size_t i = 0, n = recent.GetCount(); i < n; i++) {
|
||||
const wxString &c = recent[i];
|
||||
if (c != m_char)
|
||||
val += c;
|
||||
val.Add(c);
|
||||
}
|
||||
|
||||
m_gridRecent->SetCharacters(val);
|
||||
}
|
||||
|
||||
@@ -457,13 +620,13 @@ void wxZRColaCharSelect::ResetResults()
|
||||
// Fill the results.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
size_t i, n = app->m_chr_db.idxChr.size();
|
||||
wxString val;
|
||||
wxArrayString val;
|
||||
val.reserve(n);
|
||||
for (i = 0; i < n; i++) {
|
||||
const auto &chr = app->m_chr_db.idxChr[i];
|
||||
auto idx = m_ccOrder.find(chr.cat);
|
||||
if (idx == m_ccOrder.end() || m_categories->IsChecked(idx->second))
|
||||
val += chr.chr;
|
||||
val.Add(wxString(chr.chr(), chr.chr_len()));
|
||||
}
|
||||
m_gridResults->SetCharacters(val);
|
||||
}
|
||||
@@ -507,7 +670,7 @@ void wxZRColaCharSelect::NavigateBy(int offset)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::NavigateTo(wchar_t c)
|
||||
void wxZRColaCharSelect::NavigateTo(const wxString &c)
|
||||
{
|
||||
if (m_char != c) {
|
||||
// Update history state
|
||||
@@ -548,7 +711,7 @@ wxZRColaCharSelect::SearchThread::SearchThread(wxZRColaCharSelect *parent) :
|
||||
wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
std::map<wchar_t, ZRCola::charrank_t> hits;
|
||||
std::map<std::wstring, ZRCola::charrank_t> hits;
|
||||
|
||||
if (TestDestroy()) return (wxThread::ExitCode)1;
|
||||
|
||||
@@ -561,7 +724,7 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
|
||||
|
||||
{
|
||||
// Search by description and merge results.
|
||||
std::map<wchar_t, ZRCola::charrank_t> hits_sub;
|
||||
std::map<std::wstring, ZRCola::charrank_t> hits_sub;
|
||||
if (!app->m_chr_db.Search(m_search.c_str(), m_cats, hits, hits_sub, TestDestroyS, this)) return (wxThread::ExitCode)1;
|
||||
for (auto i = hits_sub.cbegin(), i_end = hits_sub.cend(); i != i_end; ++i) {
|
||||
if (TestDestroy()) return (wxThread::ExitCode)1;
|
||||
@@ -589,7 +752,7 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
|
||||
if (i->second > rank_threshold)
|
||||
m_hits.push_back(std::make_pair(i->second, i->first));
|
||||
}
|
||||
std::qsort(m_hits.data(), m_hits.size(), sizeof(std::pair<ZRCola::charrank_t, wchar_t>), CompareHits);
|
||||
std::qsort(m_hits.data(), m_hits.size(), sizeof(std::pair<ZRCola::charrank_t, std::wstring>), CompareHits);
|
||||
|
||||
// Signal the event handler that this thread is going to be destroyed.
|
||||
// NOTE: here we assume that using the m_parent pointer is safe,
|
||||
@@ -637,12 +800,25 @@ void wxPersistentZRColaCharSelect::Save() const
|
||||
auto wnd = static_cast<const wxZRColaCharSelect*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
SaveValue(wxT("recentChars"), wnd->m_gridRecent->GetCharacters());
|
||||
wxString str, str2;
|
||||
auto &recent = wnd->m_gridRecent->GetCharacters();
|
||||
for (size_t i = 0, n = recent.GetCount(); i < n; i++) {
|
||||
if (i) str2 += wxT('|');
|
||||
auto &chr = recent[i];
|
||||
for (size_t j = 0, m = chr.Length(); j < m; j++) {
|
||||
if (j) str2 += wxT('+');
|
||||
str2 += wxString::Format(wxT("%04X"), chr[j]);
|
||||
}
|
||||
if (chr.Length() == 1)
|
||||
str += chr[0];
|
||||
}
|
||||
SaveValue(wxT("recentChars" ), str ); // Save in legacy format for backward compatibility.
|
||||
SaveValue(wxT("recentChars2"), str2); // Save in native format
|
||||
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRnk[i];
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
wxString name(wxT("category"));
|
||||
name.Append(cc.id.data, _countof(cc.id.data));
|
||||
name.Append(cc.cat.data, _countof(cc.cat.data));
|
||||
SaveValue(name, wnd->m_categories->IsChecked(i));
|
||||
}
|
||||
|
||||
@@ -655,14 +831,29 @@ bool wxPersistentZRColaCharSelect::Restore()
|
||||
auto wnd = dynamic_cast<wxZRColaCharSelect*>(GetWindow());
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString recent;
|
||||
if (RestoreValue(wxT("recentChars"), &recent))
|
||||
wnd->m_gridRecent->SetCharacters(recent);
|
||||
wxString str;
|
||||
if (RestoreValue(wxT("recentChars2"), &str)) {
|
||||
// Native format found.
|
||||
wxArrayString val;
|
||||
for (wxStringTokenizer tok(str, wxT("|")); tok.HasMoreTokens(); ) {
|
||||
wxString chr;
|
||||
for (wxStringTokenizer tok_chr(tok.GetNextToken(), wxT("+")); tok_chr.HasMoreTokens(); )
|
||||
chr += (wchar_t)_tcstoul(tok_chr.GetNextToken().c_str(), NULL, 16);
|
||||
val.Add(chr);
|
||||
}
|
||||
wnd->m_gridRecent->SetCharacters(val);
|
||||
} else if (RestoreValue(wxT("recentChars"), &str)) {
|
||||
// Legacy value found.
|
||||
wxArrayString val;
|
||||
for (size_t i = 0, n = str.Length(); i < n; i++)
|
||||
val.Add(wxString(1, str[i]));
|
||||
wnd->m_gridRecent->SetCharacters(val);
|
||||
}
|
||||
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRnk.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRnk[i];
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
wxString name(wxT("category"));
|
||||
name.Append(cc.id.data, _countof(cc.id.data));
|
||||
name.Append(cc.cat.data, _countof(cc.cat.data));
|
||||
bool val;
|
||||
if (RestoreValue(name, &val))
|
||||
wnd->m_categories->Check(i, val);
|
||||
|
||||
@@ -28,15 +28,106 @@ class wxPersistentZRColaCharSelect;
|
||||
|
||||
#include "zrcolagui.h"
|
||||
#include <zrcola/character.h>
|
||||
#include <wxex/valhex.h>
|
||||
#include <wx/validate.h>
|
||||
#include <wxex/persist/dialog.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/thread.h>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
///
|
||||
/// Validator for Unicode character
|
||||
///
|
||||
class WXEXTEND_API wxZRColaUTF16CharValidator : public wxValidator
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Construct the validator with a value to store data
|
||||
///
|
||||
wxZRColaUTF16CharValidator(wchar_t *val = NULL);
|
||||
|
||||
///
|
||||
/// Copies this validator
|
||||
///
|
||||
virtual wxObject* Clone() const;
|
||||
|
||||
///
|
||||
/// Validates the value
|
||||
///
|
||||
virtual bool Validate(wxWindow *parent);
|
||||
|
||||
///
|
||||
/// Transfers the value to the window
|
||||
///
|
||||
virtual bool TransferToWindow();
|
||||
|
||||
///
|
||||
/// Transfers the value from the window
|
||||
///
|
||||
virtual bool TransferFromWindow();
|
||||
|
||||
///
|
||||
/// Parses FQDN value
|
||||
///
|
||||
static bool Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, wchar_t *val_out = NULL);
|
||||
|
||||
protected:
|
||||
wchar_t *m_val; ///< Pointer to variable to receive control's parsed value
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxZRColaUTF16CharValidator);
|
||||
wxDECLARE_NO_ASSIGN_CLASS(wxZRColaUTF16CharValidator);
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Validator for Unicode dump
|
||||
///
|
||||
class wxZRColaUnicodeDumpValidator : public wxValidator
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Construct the validator with a value to store data
|
||||
///
|
||||
wxZRColaUnicodeDumpValidator(wxString *val = NULL);
|
||||
|
||||
///
|
||||
/// Copies this validator
|
||||
///
|
||||
virtual wxObject* Clone() const;
|
||||
|
||||
///
|
||||
/// Validates the value
|
||||
///
|
||||
virtual bool Validate(wxWindow *parent);
|
||||
|
||||
///
|
||||
/// Transfers the value to the window
|
||||
///
|
||||
virtual bool TransferToWindow();
|
||||
|
||||
///
|
||||
/// Transfers the value from the window
|
||||
///
|
||||
virtual bool TransferFromWindow();
|
||||
|
||||
///
|
||||
/// Parses Unicode dump value
|
||||
///
|
||||
static bool Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, wxString *val_out = NULL);
|
||||
|
||||
protected:
|
||||
wxString *m_val; ///< Pointer to variable to receive control's parsed value
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxZRColaUnicodeDumpValidator);
|
||||
wxDECLARE_NO_ASSIGN_CLASS(wxZRColaUnicodeDumpValidator);
|
||||
};
|
||||
|
||||
|
||||
wxDECLARE_EVENT(wxEVT_SEARCH_COMPLETE, wxThreadEvent);
|
||||
|
||||
|
||||
@@ -76,10 +167,10 @@ protected:
|
||||
|
||||
void ResetResults();
|
||||
void NavigateBy(int offset);
|
||||
void NavigateTo(wchar_t c);
|
||||
void NavigateTo(const wxString &c);
|
||||
|
||||
public:
|
||||
wchar_t m_char; ///< Currently selected character (0 when none)
|
||||
wxString m_char; ///< Currently selected character (empty when none)
|
||||
|
||||
protected:
|
||||
LCID m_locale; ///< Locale for tag lookup
|
||||
@@ -104,7 +195,7 @@ protected:
|
||||
public:
|
||||
std::wstring m_search; ///< Search phrase
|
||||
std::set<ZRCola::chrcatid_t> m_cats; ///< Search categories
|
||||
std::vector<std::pair<ZRCola::charrank_t, wchar_t> > m_hits; ///< Search results
|
||||
std::vector<std::pair<ZRCola::charrank_t, std::wstring> > m_hits; ///< Search results
|
||||
|
||||
protected:
|
||||
wxZRColaCharSelect *m_parent; ///< Thread owner
|
||||
@@ -116,7 +207,7 @@ protected:
|
||||
///
|
||||
struct NavigationState
|
||||
{
|
||||
wchar_t m_char;
|
||||
std::wstring m_char;
|
||||
struct {
|
||||
wxGridCellCoords m_selected;
|
||||
} m_related;
|
||||
|
||||
@@ -25,42 +25,42 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxZRColaComposerPanel::wxZRColaComposerPanel(wxWindow* parent) :
|
||||
m_decomposedChanged(false),
|
||||
m_composedChanged(false),
|
||||
m_selDecomposed(0, 0),
|
||||
m_selComposed(0, 0),
|
||||
m_sourceChanged(false),
|
||||
m_destinationChanged(false),
|
||||
m_selSource(0, 0),
|
||||
m_selDestination(0, 0),
|
||||
wxZRColaComposerPanelBase(parent)
|
||||
{
|
||||
m_decomposed->PushEventHandler(&m_keyhandler);
|
||||
m_source->PushEventHandler(&m_keyhandler);
|
||||
|
||||
// Restore the previously saved state (if exists).
|
||||
wxString fileName(GetStateFileName());
|
||||
if (wxFileExists(fileName)) {
|
||||
wxFFile file(fileName, wxT("rb"));
|
||||
if (file.IsOpened()) {
|
||||
// Load decomposed text.
|
||||
// Load source text.
|
||||
unsigned __int64 n;
|
||||
file.Read(&n, sizeof(n));
|
||||
if (!file.Error()) {
|
||||
wxString decomposed;
|
||||
file.Read(wxStringBuffer(decomposed, n), sizeof(wchar_t)*n);
|
||||
wxString source;
|
||||
file.Read(wxStringBuffer(source, n), sizeof(wchar_t)*n);
|
||||
if (!file.Error()) {
|
||||
// Load composed text.
|
||||
// Load destination text.
|
||||
file.Read(&n, sizeof(n));
|
||||
if (!file.Error()) {
|
||||
wxString composed;
|
||||
file.Read(wxStringBuffer(composed, n), sizeof(wchar_t)*n);
|
||||
wxString destination;
|
||||
file.Read(wxStringBuffer(destination, n), sizeof(wchar_t)*n);
|
||||
if (!file.Error()) {
|
||||
// Restore state.
|
||||
m_decomposed->SetValue(decomposed);
|
||||
m_decomposed->GetSelection(&m_selDecomposed.first, &m_selDecomposed.second);
|
||||
SetHexValue(m_decomposedHex, m_selDecomposedHex, m_mappingDecomposedHex, decomposed.GetData(), decomposed.Length(), m_selDecomposed.first, m_selDecomposed.second);
|
||||
m_decomposedChanged = false;
|
||||
m_source->SetValue(source);
|
||||
m_source->GetSelection(&m_selSource.first, &m_selSource.second);
|
||||
SetHexValue(m_sourceHex, m_selSourceHex, m_mappingSourceHex, source.GetData(), source.Length(), m_selSource.first, m_selSource.second);
|
||||
m_sourceChanged = false;
|
||||
|
||||
m_composed->SetValue(composed);
|
||||
m_composed->GetSelection(&m_selComposed.first, &m_selComposed.second);
|
||||
SetHexValue(m_composedHex, m_selComposedHex, m_mappingComposedHex, composed.GetData(), composed.Length(), m_selComposed.first, m_selComposed.second);
|
||||
m_composedChanged = false;
|
||||
m_destination->SetValue(destination);
|
||||
m_destination->GetSelection(&m_selDestination.first, &m_selDestination.second);
|
||||
SetHexValue(m_destinationHex, m_selDestinationHex, m_mappingDestinationHex, destination.GetData(), destination.Length(), m_selDestination.first, m_selDestination.second);
|
||||
m_destinationChanged = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ wxZRColaComposerPanel::wxZRColaComposerPanel(wxWindow* parent) :
|
||||
|
||||
wxZRColaComposerPanel::~wxZRColaComposerPanel()
|
||||
{
|
||||
m_decomposed->PopEventHandler();
|
||||
m_source->PopEventHandler();
|
||||
|
||||
// This is a controlled exit. Purge saved state.
|
||||
wxString fileName(GetStateFileName());
|
||||
@@ -83,195 +83,223 @@ wxZRColaComposerPanel::~wxZRColaComposerPanel()
|
||||
|
||||
void wxZRColaComposerPanel::SynchronizePanels()
|
||||
{
|
||||
if (m_decomposedChanged) {
|
||||
if (m_sourceChanged) {
|
||||
m_timerSave.Stop();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString src;
|
||||
size_t len = GetValue(m_decomposed, 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.Decompose(src.data(), len, norm, &m_mapping1);
|
||||
const ZRCola::transetid_t *sets_begin, *sets_end;
|
||||
GetTranslationSeq(sets_begin, sets_end);
|
||||
|
||||
std::wstring dst;
|
||||
app->m_t_db.Compose(norm.data(), norm.size(), dst, &m_mapping2);
|
||||
m_mapping.clear();
|
||||
for (auto s = sets_begin; s != sets_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));
|
||||
|
||||
m_decomposed->GetSelection(&m_selDecomposed.first, &m_selDecomposed.second);
|
||||
app->m_t_db.Translate(*s, dst2.data(), dst2.size(), dst, &map);
|
||||
m_mapping.push_back(std::move(map));
|
||||
} else {
|
||||
// Other translates
|
||||
app->m_t_db.Translate(*s, dst.data(), dst.size(), dst2, &map);
|
||||
m_mapping.push_back(std::move(map));
|
||||
dst = std::move(dst2);
|
||||
}
|
||||
}
|
||||
|
||||
// Update decomposed HEX dump.
|
||||
SetHexValue(m_decomposedHex, m_selDecomposedHex, m_mappingDecomposedHex, src.data(), len, m_selDecomposed.first, m_selDecomposed.second);
|
||||
m_source->GetSelection(&m_selSource.first, &m_selSource.second);
|
||||
|
||||
// Update composed text, and its HEX dump.
|
||||
m_composed->SetValue(dst);
|
||||
m_composed->SetSelection(
|
||||
m_selComposed.first = m_mapping2.to_dst(m_mapping1.to_dst(m_selDecomposed.first )),
|
||||
m_selComposed.second = m_mapping2.to_dst(m_mapping1.to_dst(m_selDecomposed.second)));
|
||||
SetHexValue(m_composedHex, m_selComposedHex, m_mappingComposedHex, dst.data(), dst.length(), m_selComposed.first, m_selComposed.second);
|
||||
// Update source HEX dump.
|
||||
SetHexValue(m_sourceHex, m_selSourceHex, m_mappingSourceHex, src.data(), len, m_selSource.first, m_selSource.second);
|
||||
|
||||
// Update destination text, and its HEX dump.
|
||||
m_destination->SetValue(dst);
|
||||
m_destination->SetSelection(
|
||||
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.
|
||||
m_timerSave.Start(3000, true);
|
||||
} else if (m_composedChanged) {
|
||||
} else if (m_destinationChanged) {
|
||||
m_timerSave.Stop();
|
||||
|
||||
wxString src;
|
||||
size_t len = GetValue(m_composed, src);
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
std::wstring dst;
|
||||
wxZRColaFrame *mainWnd = dynamic_cast<wxZRColaFrame*>(wxGetActiveWindow());
|
||||
if (mainWnd)
|
||||
app->m_t_db.Decompose(src.data(), len, &app->m_lc_db, mainWnd->m_settings->m_lang, dst, &m_mapping2);
|
||||
else
|
||||
app->m_t_db.Decompose(src.data(), len, dst, &m_mapping2);
|
||||
|
||||
m_mapping1.clear();
|
||||
m_mapping2.invert();
|
||||
wxString src;
|
||||
size_t len = GetValue(m_destination, src);
|
||||
std::wstring dst(src.data(), len), dst2;
|
||||
ZRCola::mapping_vector map;
|
||||
|
||||
m_composed->GetSelection(&m_selComposed.first, &m_selComposed.second);
|
||||
const ZRCola::transetid_t *sets_begin, *sets_end;
|
||||
GetTranslationSeq(sets_begin, sets_end);
|
||||
|
||||
// Update composed HEX dump.
|
||||
SetHexValue(m_composedHex, m_selComposedHex, m_mappingComposedHex, src.data(), len, m_selComposed.first, m_selComposed.second);
|
||||
m_mapping.clear();
|
||||
for (auto s = sets_end; s != sets_begin; s--) {
|
||||
if (*s) {
|
||||
// ZRCola Decomposed => ZRCola Composed
|
||||
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), &app->m_lc_db, app->m_mainWnd->m_settings->m_lang, dst2, &map);
|
||||
} else {
|
||||
// Other translates
|
||||
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), dst2, &map);
|
||||
}
|
||||
dst = std::move(dst2);
|
||||
|
||||
// Update decomposed text, and its HEX dump.
|
||||
m_decomposed->SetValue(dst);
|
||||
m_decomposed->SetSelection(
|
||||
m_selDecomposed.first = m_mapping1.to_src(m_mapping2.to_src(m_selComposed.first )),
|
||||
m_selDecomposed.second = m_mapping1.to_src(m_mapping2.to_src(m_selComposed.second)));
|
||||
SetHexValue(m_decomposedHex, m_selDecomposedHex, m_mappingDecomposedHex, dst.data(), dst.length(), m_selDecomposed.first, m_selDecomposed.second);
|
||||
map.invert();
|
||||
m_mapping.push_back(std::move(map));
|
||||
}
|
||||
|
||||
m_destination->GetSelection(&m_selDestination.first, &m_selDestination.second);
|
||||
|
||||
// Update destination HEX dump.
|
||||
SetHexValue(m_destinationHex, m_selDestinationHex, m_mappingDestinationHex, src.data(), len, m_selDestination.first, m_selDestination.second);
|
||||
|
||||
// Update source text, and its HEX dump.
|
||||
m_source->SetValue(dst);
|
||||
m_source->SetSelection(
|
||||
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.
|
||||
m_timerSave.Start(3000, true);
|
||||
}
|
||||
|
||||
m_decomposedChanged = false;
|
||||
m_composedChanged = false;
|
||||
m_sourceChanged = false;
|
||||
m_destinationChanged = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnDecomposedPaint(wxPaintEvent& event)
|
||||
void wxZRColaComposerPanel::OnSourcePaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
long from, to;
|
||||
m_decomposed->GetSelection(&from, &to);
|
||||
m_source->GetSelection(&from, &to);
|
||||
|
||||
if (m_selDecomposed.first != from || m_selDecomposed.second != to) {
|
||||
if (m_selSource.first != from || m_selSource.second != to) {
|
||||
// Save new selection first, to avoid loop.
|
||||
m_selDecomposed.first = from;
|
||||
m_selDecomposed.second = to;
|
||||
m_selSource.first = from;
|
||||
m_selSource.second = to;
|
||||
|
||||
m_decomposedHex->SetSelection(
|
||||
m_selDecomposedHex.first = m_mappingDecomposedHex.to_dst(from),
|
||||
m_selDecomposedHex.second = m_mappingDecomposedHex.to_dst(to ));
|
||||
m_sourceHex->SetSelection(
|
||||
m_selSourceHex.first = m_mappingSourceHex.to_dst(from),
|
||||
m_selSourceHex.second = m_mappingSourceHex.to_dst(to ));
|
||||
|
||||
m_composed->SetSelection(
|
||||
m_selComposed.first = m_mapping2.to_dst(m_mapping1.to_dst(from)),
|
||||
m_selComposed.second = m_mapping2.to_dst(m_mapping1.to_dst(to )));
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = MapToDestination(from),
|
||||
m_selDestination.second = MapToDestination(to ));
|
||||
|
||||
m_composedHex->SetSelection(
|
||||
m_selComposedHex.first = m_mappingComposedHex.to_dst(m_selComposed.first ),
|
||||
m_selComposedHex.second = m_mappingComposedHex.to_dst(m_selComposed.second));
|
||||
m_destinationHex->SetSelection(
|
||||
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(m_selDestination.first ),
|
||||
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(m_selDestination.second));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnDecomposedHexPaint(wxPaintEvent& event)
|
||||
void wxZRColaComposerPanel::OnSourceHexPaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
long from, to;
|
||||
m_decomposedHex->GetSelection(&from, &to);
|
||||
m_sourceHex->GetSelection(&from, &to);
|
||||
|
||||
if (m_selDecomposedHex.first != from || m_selDecomposedHex.second != to) {
|
||||
if (m_selSourceHex.first != from || m_selSourceHex.second != to) {
|
||||
// Save new selection first, to avoid loop.
|
||||
m_selDecomposedHex.first = from;
|
||||
m_selDecomposedHex.second = to;
|
||||
m_selSourceHex.first = from;
|
||||
m_selSourceHex.second = to;
|
||||
|
||||
m_decomposed->SetSelection(
|
||||
m_selDecomposed.first = m_mappingDecomposedHex.to_src(from),
|
||||
m_selDecomposed.second = m_mappingDecomposedHex.to_src(to ));
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = m_mappingSourceHex.to_src(from),
|
||||
m_selSource.second = m_mappingSourceHex.to_src(to ));
|
||||
|
||||
m_composed->SetSelection(
|
||||
m_selComposed.first = m_mapping2.to_dst(m_mapping1.to_dst(m_selDecomposed.first )),
|
||||
m_selComposed.second = m_mapping2.to_dst(m_mapping1.to_dst(m_selDecomposed.second)));
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = MapToDestination(m_selSource.first ),
|
||||
m_selDestination.second = MapToDestination(m_selSource.second));
|
||||
|
||||
m_composedHex->SetSelection(
|
||||
m_selComposedHex.first = m_mappingComposedHex.to_dst(m_selComposed.first ),
|
||||
m_selComposedHex.second = m_mappingComposedHex.to_dst(m_selComposed.second));
|
||||
m_destinationHex->SetSelection(
|
||||
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(m_selDestination.first ),
|
||||
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(m_selDestination.second));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnDecomposedText(wxCommandEvent& event)
|
||||
void wxZRColaComposerPanel::OnSourceText(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
// Set the flag the decomposed text changed to trigger idle-time composition.
|
||||
m_decomposedChanged = true;
|
||||
// Set the flag the source text changed to trigger idle-time translation.
|
||||
m_sourceChanged = true;
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnComposedPaint(wxPaintEvent& event)
|
||||
void wxZRColaComposerPanel::OnDestinationPaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
long from, to;
|
||||
m_composed->GetSelection(&from, &to);
|
||||
m_destination->GetSelection(&from, &to);
|
||||
|
||||
if (m_selComposed.first != from || m_selComposed.second != to) {
|
||||
if (m_selDestination.first != from || m_selDestination.second != to) {
|
||||
// Save new selection first, to avoid loop.
|
||||
m_selComposed.first = from;
|
||||
m_selComposed.second = to;
|
||||
m_selDestination.first = from;
|
||||
m_selDestination.second = to;
|
||||
|
||||
m_composedHex->SetSelection(
|
||||
m_selComposedHex.first = m_mappingComposedHex.to_dst(from),
|
||||
m_selComposedHex.second = m_mappingComposedHex.to_dst(to ));
|
||||
m_destinationHex->SetSelection(
|
||||
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(from),
|
||||
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(to ));
|
||||
|
||||
m_decomposed->SetSelection(
|
||||
m_selDecomposed.first = m_mapping1.to_src(m_mapping2.to_src(from)),
|
||||
m_selDecomposed.second = m_mapping1.to_src(m_mapping2.to_src(to )));
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = MapToSource(from),
|
||||
m_selSource.second = MapToSource(to ));
|
||||
|
||||
m_decomposedHex->SetSelection(
|
||||
m_selDecomposedHex.first = m_mappingDecomposedHex.to_dst(m_selDecomposed.first ),
|
||||
m_selDecomposedHex.second = m_mappingDecomposedHex.to_dst(m_selDecomposed.second));
|
||||
m_sourceHex->SetSelection(
|
||||
m_selSourceHex.first = m_mappingSourceHex.to_dst(m_selSource.first ),
|
||||
m_selSourceHex.second = m_mappingSourceHex.to_dst(m_selSource.second));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnComposedHexPaint(wxPaintEvent& event)
|
||||
void wxZRColaComposerPanel::OnDestinationHexPaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
long from, to;
|
||||
m_composedHex->GetSelection(&from, &to);
|
||||
m_destinationHex->GetSelection(&from, &to);
|
||||
|
||||
if (m_selComposedHex.first != from || m_selComposedHex.second != to) {
|
||||
if (m_selDestinationHex.first != from || m_selDestinationHex.second != to) {
|
||||
// Save new selection first, to avoid loop.
|
||||
m_selComposedHex.first = from;
|
||||
m_selComposedHex.second = to;
|
||||
m_selDestinationHex.first = from;
|
||||
m_selDestinationHex.second = to;
|
||||
|
||||
m_composed->SetSelection(
|
||||
m_selComposed.first = m_mappingComposedHex.to_src(from),
|
||||
m_selComposed.second = m_mappingComposedHex.to_src(to ));
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = m_mappingDestinationHex.to_src(from),
|
||||
m_selDestination.second = m_mappingDestinationHex.to_src(to ));
|
||||
|
||||
m_decomposed->SetSelection(
|
||||
m_selDecomposed.first = m_mapping1.to_src(m_mapping2.to_src(m_selComposed.first )),
|
||||
m_selDecomposed.second = m_mapping1.to_src(m_mapping2.to_src(m_selComposed.second)));
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = MapToSource(m_selDestination.first ),
|
||||
m_selSource.second = MapToSource(m_selDestination.second));
|
||||
|
||||
m_decomposedHex->SetSelection(
|
||||
m_selDecomposedHex.first = m_mappingDecomposedHex.to_dst(m_selDecomposed.first ),
|
||||
m_selDecomposedHex.second = m_mappingDecomposedHex.to_dst(m_selDecomposed.second));
|
||||
m_sourceHex->SetSelection(
|
||||
m_selSourceHex.first = m_mappingSourceHex.to_dst(m_selSource.first ),
|
||||
m_selSourceHex.second = m_mappingSourceHex.to_dst(m_selSource.second));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnComposedText(wxCommandEvent& event)
|
||||
void wxZRColaComposerPanel::OnDestinationText(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
// Set the flag the composed text changed to trigger idle-time decomposition.
|
||||
m_composedChanged = true;
|
||||
// Set the flag the destination text changed to trigger idle-time inverse translation.
|
||||
m_destinationChanged = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,13 +311,13 @@ void wxZRColaComposerPanel::OnSaveTimer(wxTimerEvent& event)
|
||||
wxString text;
|
||||
size_t len;
|
||||
|
||||
// Save decomposed text.
|
||||
len = GetValue(m_decomposed, text);
|
||||
// Save source text.
|
||||
len = GetValue(m_source, text);
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
|
||||
// Save composed text.
|
||||
len = GetValue(m_composed, text);
|
||||
// Save destination text.
|
||||
len = GetValue(m_destination, text);
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
}
|
||||
@@ -385,8 +413,8 @@ void wxPersistentZRColaComposerPanel::Save() const
|
||||
{
|
||||
auto const wnd = static_cast<const wxZRColaComposerPanel*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
SaveValue(wxT("splitDecomposed"), wnd->m_splitterDecomposed->GetSashPosition());
|
||||
SaveValue(wxT("splitComposed" ), wnd->m_splitterComposed ->GetSashPosition());
|
||||
SaveValue(wxT("splitDecomposed"), wnd->m_splitterSource->GetSashPosition());
|
||||
SaveValue(wxT("splitComposed" ), wnd->m_splitterDestination ->GetSashPosition());
|
||||
}
|
||||
|
||||
|
||||
@@ -398,14 +426,14 @@ bool wxPersistentZRColaComposerPanel::Restore()
|
||||
|
||||
if (RestoreValue(wxT("splitDecomposed"), &sashVal)) {
|
||||
// wxFormBuilder sets initial splitter stash in idle event handler after GUI settles. Overriding our loaded value. Disconnect it's idle event handler.
|
||||
wnd->m_splitterDecomposed->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDecomposedOnIdle ), NULL, wnd );
|
||||
wnd->m_splitterDecomposed->SetSashPosition(sashVal);
|
||||
wnd->m_splitterSource->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, wnd );
|
||||
wnd->m_splitterSource->SetSashPosition(sashVal);
|
||||
}
|
||||
|
||||
if (RestoreValue(wxT("splitComposed"), &sashVal)) {
|
||||
// wxFormBuilder sets initial splitter stash in idle event handler after GUI settles. Overriding our loaded value. Disconnect it's idle event handler.
|
||||
wnd->m_splitterComposed->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterComposedOnIdle ), NULL, wnd );
|
||||
wnd->m_splitterComposed->SetSashPosition(sashVal);
|
||||
wnd->m_splitterDestination->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, wnd );
|
||||
wnd->m_splitterDestination->SetSashPosition(sashVal);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -30,6 +30,7 @@ class wxZRColaComposerPanel;
|
||||
#include <wx/persist/window.h>
|
||||
#include <wx/timer.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
///
|
||||
@@ -46,31 +47,33 @@ public:
|
||||
friend class wxPersistentZRColaComposerPanel; // Allow saving/restoring window state.
|
||||
|
||||
protected:
|
||||
virtual void OnDecomposedPaint(wxPaintEvent& event);
|
||||
virtual void OnDecomposedHexPaint(wxPaintEvent& event);
|
||||
virtual void OnDecomposedText(wxCommandEvent& event);
|
||||
virtual void OnComposedPaint(wxPaintEvent& event);
|
||||
virtual void OnComposedHexPaint(wxPaintEvent& event);
|
||||
virtual void OnComposedText(wxCommandEvent& event);
|
||||
virtual void OnSourcePaint(wxPaintEvent& event);
|
||||
virtual void OnSourceHexPaint(wxPaintEvent& event);
|
||||
virtual void OnSourceText(wxCommandEvent& event);
|
||||
virtual void OnDestinationPaint(wxPaintEvent& event);
|
||||
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;
|
||||
inline void GetTranslationSeq(_Out_ const ZRCola::transetid_t *&sets_begin, _Out_ const ZRCola::transetid_t *&sets_end) 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_decomposedChanged; ///< Boolean flag to mark decomposed text "dirty" to trigger composition
|
||||
bool m_composedChanged; ///< Boolean flag to mark composed text "dirty" to trigger decomposition
|
||||
ZRCola::mapping_vector m_mapping1; ///< Character index mapping vector between decomposed and normalized text
|
||||
ZRCola::mapping_vector m_mapping2; ///< Character index mapping vector between normalized and composed text
|
||||
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
|
||||
std::vector<ZRCola::mapping_vector> m_mapping; ///< Character index mapping vector between source and normalized text
|
||||
std::pair<long, long>
|
||||
m_selDecomposed, ///< Character index of selected text in decomposed text control
|
||||
m_selDecomposedHex, ///< Character index of selected text in decomposed HEX dump text control
|
||||
m_selComposed, ///< Character index of selected text in composed text control
|
||||
m_selComposedHex; ///< Character index of selected text in composed HEX dump text control
|
||||
wxZRColaKeyHandler m_keyhandler; ///< Key handler for decomposed window
|
||||
ZRCola::mapping_vector m_mappingDecomposedHex; ///< Character index mapping vector between decomposed text and its HEX dump
|
||||
ZRCola::mapping_vector m_mappingComposedHex; ///< Character index mapping vector between composed text and its HEX dump
|
||||
m_selSource, ///< Character index of selected text in source text control
|
||||
m_selSourceHex, ///< Character index of selected text in source HEX dump text control
|
||||
m_selDestination, ///< Character index of selected text in destination text control
|
||||
m_selDestinationHex; ///< Character index of selected text in destination HEX dump text control
|
||||
wxZRColaKeyHandler m_keyhandler; ///< Key handler for source window
|
||||
ZRCola::mapping_vector m_mappingSourceHex; ///< Character index mapping vector between source text and its HEX dump
|
||||
ZRCola::mapping_vector m_mappingDestinationHex; ///< Character index mapping vector between destination text and its HEX dump
|
||||
};
|
||||
|
||||
|
||||
@@ -88,6 +91,45 @@ 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 void wxZRColaComposerPanel::GetTranslationSeq(_Out_ const ZRCola::transetid_t *&sets_begin, _Out_ const ZRCola::transetid_t *&sets_end) const
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
if (app->m_mainWnd->m_transeq_id != ZRCOLA_TRANSEQID_CUSTOM) {
|
||||
size_t start;
|
||||
if (app->m_tsq_db.idxTranSeq.find(ZRCola::transeq_db::transeq(app->m_mainWnd->m_transeq_id), start)) {
|
||||
const auto &ts = app->m_tsq_db.idxTranSeq[start];
|
||||
sets_begin = ts.sets();
|
||||
sets_end = ts.sets_end();
|
||||
} else {
|
||||
sets_begin = NULL;
|
||||
sets_end = NULL;
|
||||
}
|
||||
} else {
|
||||
sets_begin = app->m_mainWnd->m_transeq->m_transeq.data();
|
||||
sets_end = sets_begin + app->m_mainWnd->m_transeq->m_transeq.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline wxPersistentObject *wxCreatePersistentObject(wxZRColaComposerPanel *wnd)
|
||||
{
|
||||
return new wxPersistentZRColaComposerPanel(wnd);
|
||||
|
||||
@@ -34,17 +34,19 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
||||
|
||||
EVT_MENU (wxID_CHARACTER_SELECTOR , wxZRColaFrame::OnInsertCharacter )
|
||||
|
||||
EVT_UPDATE_UI_RANGE(wxID_SEND_COMPOSED , wxID_SEND_ABORT, wxZRColaFrame::OnSendUpdate )
|
||||
EVT_MENU (wxID_SEND_COMPOSED , wxZRColaFrame::OnSendComposed )
|
||||
EVT_MENU (wxID_SEND_DECOMPOSED , wxZRColaFrame::OnSendDecomposed )
|
||||
EVT_UPDATE_UI_RANGE(wxID_SEND_DESTINATION , wxID_SEND_ABORT, wxZRColaFrame::OnSendUpdate )
|
||||
EVT_MENU (wxID_COPY_DESTINATION_AND_RETURN , wxZRColaFrame::OnCopyDestinationAndReturn )
|
||||
EVT_MENU (wxID_SEND_DESTINATION , wxZRColaFrame::OnSendDestination )
|
||||
EVT_MENU (wxID_COPY_SOURCE_AND_RETURN , wxZRColaFrame::OnCopySourceAndReturn )
|
||||
EVT_MENU (wxID_SEND_SOURCE , wxZRColaFrame::OnSendSource )
|
||||
EVT_MENU (wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
||||
|
||||
EVT_MENU (wxID_SETTINGS , wxZRColaFrame::OnSettings )
|
||||
|
||||
EVT_UPDATE_UI (wxID_TOOLBAR_EDIT , wxZRColaFrame::OnToolbarEditUpdate )
|
||||
EVT_MENU (wxID_TOOLBAR_EDIT , wxZRColaFrame::OnToolbarEdit )
|
||||
EVT_UPDATE_UI (wxID_TOOLBAR_COMPOSE , wxZRColaFrame::OnToolbarComposeUpdate )
|
||||
EVT_MENU (wxID_TOOLBAR_COMPOSE , wxZRColaFrame::OnToolbarCompose )
|
||||
EVT_UPDATE_UI (wxID_TOOLBAR_TRANSLATE , wxZRColaFrame::OnToolbarTranslateUpdate )
|
||||
EVT_MENU (wxID_TOOLBAR_TRANSLATE , wxZRColaFrame::OnToolbarTranslate )
|
||||
EVT_UPDATE_UI (wxID_PANEL_CHRGRPS , wxZRColaFrame::OnPanelCharacterCatalogUpdate)
|
||||
EVT_MENU (wxID_PANEL_CHRGRPS , wxZRColaFrame::OnPanelCharacterCatalog )
|
||||
EVT_MENU (wxID_FOCUS_CHARACTER_CATALOG , wxZRColaFrame::OnPanelCharacterCatalogFocus )
|
||||
@@ -63,16 +65,30 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
m_chrSelect(NULL),
|
||||
m_settings(NULL),
|
||||
m_chrReq(NULL),
|
||||
m_transeq_id(0), // By default use predefined translation sequence 0 (ZRCola Decomposed >> Composed)
|
||||
m_transeq(NULL),
|
||||
wxZRColaFrameBase(NULL)
|
||||
{
|
||||
{
|
||||
// wxFrameBuilder 3.5 does not support wxAUI_TB_HORIZONTAL flag. Add it manually.
|
||||
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarCompose);
|
||||
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTranslate);
|
||||
paneInfo.LeftDockable(false);
|
||||
paneInfo.RightDockable(false);
|
||||
m_toolbarCompose->SetWindowStyleFlag(m_toolbarCompose->GetWindowStyleFlag() | wxAUI_TB_HORIZONTAL);
|
||||
m_toolbarTranslate->SetWindowStyleFlag(m_toolbarTranslate->GetWindowStyleFlag() | wxAUI_TB_HORIZONTAL);
|
||||
}
|
||||
|
||||
// Populate list of translation sequences.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_toolTranslationSeq->Clear();
|
||||
for (size_t i = 0, n = app->m_tsq_db.idxRank.size(); i < n; i++) {
|
||||
const ZRCola::transeq_db::transeq &ts = app->m_tsq_db.idxRank[i];
|
||||
wxString
|
||||
name(ts.name(), ts.name_len()),
|
||||
name_tran(wxGetTranslation(name, wxT("ZRCola-zrcdb")));
|
||||
m_toolTranslationSeq->Append(name_tran, reinterpret_cast<void*>(ts.seq));
|
||||
}
|
||||
m_toolTranslationSeq->Append(_("Custom Translation..."), reinterpret_cast<void*>(ZRCOLA_TRANSEQID_CUSTOM));
|
||||
|
||||
// Load main window icons.
|
||||
#ifdef __WINDOWS__
|
||||
wxIcon icon_small(wxT("00_zrcola.ico"), wxBITMAP_TYPE_ICO_RESOURCE, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON));
|
||||
@@ -97,6 +113,9 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
m_settings = new wxZRColaSettings(this);
|
||||
wxPersistentRegisterAndRestore<wxZRColaSettings>(m_settings);
|
||||
|
||||
m_transeq = new wxZRColaTranslationSeq(this);
|
||||
wxPersistentRegisterAndRestore<wxZRColaTranslationSeq>(m_transeq);
|
||||
|
||||
m_chrSelect = new wxZRColaCharSelect(this);
|
||||
wxPersistentRegisterAndRestore<wxZRColaCharSelect>(m_chrSelect);
|
||||
|
||||
@@ -104,7 +123,7 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
wxPersistentRegisterAndRestore<wxZRColaCharRequest>(m_chrReq);
|
||||
|
||||
// Set focus.
|
||||
m_panel->m_decomposed->SetFocus();
|
||||
m_panel->m_source->SetFocus();
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
// Register notification sink for language detection.
|
||||
@@ -135,11 +154,26 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
|
||||
// Restore persistent state of wxAuiManager manually, since m_mgr is not on the heap.
|
||||
wxPersistentAuiManager(&m_mgr).Restore();
|
||||
wxPersistentRegisterAndRestore<wxZRColaFrame>(this);
|
||||
|
||||
// Populate list of translation sequences.
|
||||
for (unsigned int i = 0, n = m_toolTranslationSeq->GetCount(); ; i++) {
|
||||
if (i < n) {
|
||||
if (reinterpret_cast<ZRCola::transeqid_t>(m_toolTranslationSeq->GetClientData(i)) == m_transeq_id) {
|
||||
m_toolTranslationSeq->SetSelection(i);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
m_transeq_id = reinterpret_cast<ZRCola::transeqid_t>(m_toolTranslationSeq->GetClientData(0));
|
||||
m_toolTranslationSeq->SetSelection(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Register global hotkey(s).
|
||||
if (!RegisterHotKey(wxZRColaHKID_INVOKE_COMPOSE, wxMOD_WIN, VK_F5))
|
||||
if (!RegisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE, 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_DECOMPOSE, wxMOD_WIN, VK_F6))
|
||||
if (!RegisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE_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);
|
||||
}
|
||||
|
||||
@@ -147,8 +181,8 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
wxZRColaFrame::~wxZRColaFrame()
|
||||
{
|
||||
// Unregister global hotkey(s).
|
||||
UnregisterHotKey(wxZRColaHKID_INVOKE_DECOMPOSE);
|
||||
UnregisterHotKey(wxZRColaHKID_INVOKE_COMPOSE);
|
||||
UnregisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE_INV);
|
||||
UnregisterHotKey(wxZRColaHKID_INVOKE_TRANSLATE );
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
if (m_tfSource) {
|
||||
@@ -202,9 +236,9 @@ void wxZRColaFrame::OnForwardEvent(wxCommandEvent& event)
|
||||
|
||||
void wxZRColaFrame::OnInsertCharacter(wxCommandEvent& event)
|
||||
{
|
||||
if (m_chrSelect->ShowModal() == wxID_OK && m_chrSelect->m_char) {
|
||||
m_panel->m_decomposed->WriteText(m_chrSelect->m_char);
|
||||
m_panel->m_decomposed->SetFocus();
|
||||
if (m_chrSelect->ShowModal() == wxID_OK && !m_chrSelect->m_char.empty()) {
|
||||
m_panel->m_source->WriteText(m_chrSelect->m_char);
|
||||
m_panel->m_source->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,19 +249,37 @@ void wxZRColaFrame::OnSendUpdate(wxUpdateUIEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnSendComposed(wxCommandEvent& event)
|
||||
void wxZRColaFrame::OnSendDestination(wxCommandEvent& event)
|
||||
{
|
||||
if (m_hWndSource)
|
||||
DoSend(m_panel->m_composed->GetValue());
|
||||
DoSend(m_panel->m_destination->GetValue());
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnSendDecomposed(wxCommandEvent& event)
|
||||
void wxZRColaFrame::OnCopyDestinationAndReturn(wxCommandEvent& event)
|
||||
{
|
||||
if (m_hWndSource)
|
||||
DoSend(m_panel->m_decomposed->GetValue());
|
||||
DoCopyAndReturn(m_panel->m_destination->GetValue());
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnSendSource(wxCommandEvent& event)
|
||||
{
|
||||
if (m_hWndSource)
|
||||
DoSend(m_panel->m_source->GetValue());
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCopySourceAndReturn(wxCommandEvent& event)
|
||||
{
|
||||
if (m_hWndSource)
|
||||
DoCopyAndReturn(m_panel->m_source->GetValue());
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -243,8 +295,8 @@ void wxZRColaFrame::OnSendAbort(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
// Select all input in composer to prepare for the overwrite next time.
|
||||
m_panel->m_decomposed->SelectAll();
|
||||
m_panel->m_composed->SelectAll();
|
||||
m_panel->m_source ->SelectAll();
|
||||
m_panel->m_destination->SelectAll();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -297,20 +349,36 @@ void wxZRColaFrame::OnToolbarEdit(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnToolbarComposeUpdate(wxUpdateUIEvent& event)
|
||||
void wxZRColaFrame::OnToolbarTranslateUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Check(m_mgr.GetPane(m_toolbarCompose).IsShown());
|
||||
event.Check(m_mgr.GetPane(m_toolbarTranslate).IsShown());
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnToolbarCompose(wxCommandEvent& event)
|
||||
void wxZRColaFrame::OnToolbarTranslate(wxCommandEvent& event)
|
||||
{
|
||||
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarCompose);
|
||||
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTranslate);
|
||||
paneInfo.Show(!paneInfo.IsShown());
|
||||
m_mgr.Update();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnTranslationSeqChoice(wxCommandEvent& event)
|
||||
{
|
||||
ZRCola::transeqid_t transeq_id = reinterpret_cast<ZRCola::transeqid_t>(event.GetClientData());
|
||||
if (m_transeq_id != transeq_id) {
|
||||
m_transeq_id = transeq_id;
|
||||
|
||||
// Notify source text something changed and should re-translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
m_panel->m_source->ProcessWindowEvent(event2);
|
||||
}
|
||||
|
||||
if (m_transeq_id == ZRCOLA_TRANSEQID_CUSTOM)
|
||||
m_transeq->ShowModal();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnPanelCharacterCatalogUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Check(m_mgr.GetPane(m_panelChrCat).IsShown());
|
||||
@@ -474,9 +542,27 @@ void wxZRColaFrame::DoSend(const wxString& str)
|
||||
::SendInput(input.size(), input.data(), sizeof(INPUT));
|
||||
m_hWndSource = NULL;
|
||||
|
||||
// Select all input in composer and decomposed to prepare for the overwrite next time.
|
||||
m_panel->m_decomposed->SelectAll();
|
||||
m_panel->m_composed->SelectAll();
|
||||
// Select all input in source and destination to prepare for the overwrite next time.
|
||||
m_panel->m_source ->SelectAll();
|
||||
m_panel->m_destination->SelectAll();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::DoCopyAndReturn(const wxString& str)
|
||||
{
|
||||
if (wxTheClipboard->Open()) {
|
||||
wxTheClipboard->SetData(new wxTextDataObject(str));
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
|
||||
// Return focus to the source window.
|
||||
::SetActiveWindow(m_hWndSource);
|
||||
::SetForegroundWindow(m_hWndSource);
|
||||
m_hWndSource = NULL;
|
||||
|
||||
// Select all input in composer and source to prepare for the overwrite next time.
|
||||
m_panel->m_source ->SelectAll();
|
||||
m_panel->m_destination->SelectAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -489,8 +575,8 @@ WXLRESULT wxZRColaFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM
|
||||
WXHWND hWndSource = ::GetForegroundWindow();
|
||||
|
||||
switch (wParam) {
|
||||
case wxZRColaHKID_INVOKE_COMPOSE : m_panel->m_decomposed->SetFocus(); break;
|
||||
case wxZRColaHKID_INVOKE_DECOMPOSE: m_panel->m_composed ->SetFocus(); break;
|
||||
case wxZRColaHKID_INVOKE_TRANSLATE : m_panel->m_source ->SetFocus(); break;
|
||||
case wxZRColaHKID_INVOKE_TRANSLATE_INV: m_panel->m_destination->SetFocus(); break;
|
||||
default:
|
||||
wxFAIL_MSG(wxT("not our registered shortcut"));
|
||||
return wxZRColaFrameBase::MSWWindowProc(message, wParam, lParam);
|
||||
@@ -544,6 +630,8 @@ void wxPersistentZRColaFrame::Save() const
|
||||
|
||||
auto wnd = static_cast<const wxZRColaFrame*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
SaveValue(wxT("transeqId"), static_cast<int>(wnd->m_transeq_id));
|
||||
|
||||
wxPersistentZRColaComposerPanel(wnd->m_panel).Save();
|
||||
wxPersistentZRColaCharacterCatalogPanel(wnd->m_panelChrCat).Save();
|
||||
}
|
||||
@@ -556,5 +644,9 @@ bool wxPersistentZRColaFrame::Restore()
|
||||
wxPersistentZRColaCharacterCatalogPanel(wnd->m_panelChrCat).Restore();
|
||||
wxPersistentZRColaComposerPanel(wnd->m_panel).Restore();
|
||||
|
||||
int num;
|
||||
if (RestoreValue(wxT("transeqId"), &num))
|
||||
wnd->m_transeq_id = num;
|
||||
|
||||
return wxPersistentTLW::Restore();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,9 @@ class wxZRColaFrame;
|
||||
#include "zrcolachrslct.h"
|
||||
#include "zrcolachrreq.h"
|
||||
#include "zrcolasettings.h"
|
||||
#include "zrcolatranseq.h"
|
||||
#include <zrcola/language.h>
|
||||
#include <zrcola/translate.h>
|
||||
#include <wx/taskbar.h>
|
||||
#include <wx/persist/toplevel.h>
|
||||
#if defined(__WXMSW__)
|
||||
@@ -40,8 +42,8 @@ class wxZRColaFrame;
|
||||
///
|
||||
/// Global hotkey message identifiers
|
||||
///
|
||||
#define wxZRColaHKID_INVOKE_COMPOSE 0
|
||||
#define wxZRColaHKID_INVOKE_DECOMPOSE 1
|
||||
#define wxZRColaHKID_INVOKE_TRANSLATE 0
|
||||
#define wxZRColaHKID_INVOKE_TRANSLATE_INV 1
|
||||
|
||||
|
||||
///
|
||||
@@ -72,8 +74,10 @@ protected:
|
||||
void OnForwardEvent(wxCommandEvent& event);
|
||||
void OnInsertCharacter(wxCommandEvent& event);
|
||||
void OnSendUpdate(wxUpdateUIEvent& event);
|
||||
void OnSendComposed(wxCommandEvent& event);
|
||||
void OnSendDecomposed(wxCommandEvent& event);
|
||||
void OnSendDestination(wxCommandEvent& event);
|
||||
void OnCopyDestinationAndReturn(wxCommandEvent& event);
|
||||
void OnSendSource(wxCommandEvent& event);
|
||||
void OnCopySourceAndReturn(wxCommandEvent& event);
|
||||
void OnSendAbort(wxCommandEvent& event);
|
||||
void OnSettings(wxCommandEvent& event);
|
||||
virtual void OnIdle(wxIdleEvent& event);
|
||||
@@ -81,8 +85,9 @@ protected:
|
||||
virtual void OnIconize(wxIconizeEvent& event);
|
||||
void OnToolbarEditUpdate(wxUpdateUIEvent& event);
|
||||
void OnToolbarEdit(wxCommandEvent& event);
|
||||
void OnToolbarComposeUpdate(wxUpdateUIEvent& event);
|
||||
void OnToolbarCompose(wxCommandEvent& event);
|
||||
void OnToolbarTranslateUpdate(wxUpdateUIEvent& event);
|
||||
void OnToolbarTranslate(wxCommandEvent& event);
|
||||
virtual void OnTranslationSeqChoice(wxCommandEvent& event);
|
||||
void OnPanelCharacterCatalogUpdate(wxUpdateUIEvent& event);
|
||||
void OnPanelCharacterCatalog(wxCommandEvent& event);
|
||||
void OnPanelCharacterCatalogFocus(wxCommandEvent& event);
|
||||
@@ -111,6 +116,7 @@ protected:
|
||||
|
||||
private:
|
||||
void DoSend(const wxString& str);
|
||||
void DoCopyAndReturn(const wxString& str);
|
||||
|
||||
protected:
|
||||
#ifdef __WXMSW__
|
||||
@@ -123,6 +129,8 @@ protected:
|
||||
wxZRColaCharSelect *m_chrSelect; ///< Character selection dialog
|
||||
wxZRColaCharRequest *m_chrReq; ///< Request a New Character dialog
|
||||
wxZRColaSettings *m_settings; ///< Configuration dialog
|
||||
ZRCola::transeqid_t m_transeq_id; ///< Translation sequence ID
|
||||
wxZRColaTranslationSeq *m_transeq; ///< Custom translation sequence dialog
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -85,23 +85,41 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
|
||||
|
||||
m_menuEdit->AppendSeparator();
|
||||
|
||||
wxMenuItem* m_menuItemSendComposed;
|
||||
m_menuItemSendComposed = new wxMenuItem( m_menuEdit, wxID_SEND_COMPOSED, wxString( _("&Send Composed") ) + wxT('\t') + wxT("F5"), _("Send composed text to source window"), wxITEM_NORMAL );
|
||||
wxMenuItem* m_menuItemSendDestination;
|
||||
m_menuItemSendDestination = new wxMenuItem( m_menuEdit, wxID_SEND_DESTINATION, wxString( _("&Send Composed") ) + wxT('\t') + wxT("F5"), _("Send composed text to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemSendComposed->SetBitmaps( wxIcon( wxT("send_composed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
m_menuItemSendDestination->SetBitmaps( wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemSendComposed->SetBitmap( wxIcon( wxT("send_composed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
m_menuItemSendDestination->SetBitmap( wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemSendComposed );
|
||||
m_menuEdit->Append( m_menuItemSendDestination );
|
||||
|
||||
wxMenuItem* m_menuItemSendDecomposed;
|
||||
m_menuItemSendDecomposed = new wxMenuItem( m_menuEdit, wxID_SEND_DECOMPOSED, wxString( _("Send &Decomposed") ) + wxT('\t') + wxT("F6"), _("Send decomposed text to source window"), wxITEM_NORMAL );
|
||||
wxMenuItem* m_menuItemCopyDestinationAndReturn;
|
||||
m_menuItemCopyDestinationAndReturn = new wxMenuItem( m_menuEdit, wxID_COPY_DESTINATION_AND_RETURN, wxString( _("Copy Composed and &Return") ) + wxT('\t') + wxT("Ctrl+F5"), _("Copy composed text to clipboard and return focus to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemSendDecomposed->SetBitmaps( wxIcon( wxT("send_decomposed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
m_menuItemCopyDestinationAndReturn->SetBitmaps( wxIcon( wxT("copy_destination_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemSendDecomposed->SetBitmap( wxIcon( wxT("send_decomposed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
m_menuItemCopyDestinationAndReturn->SetBitmap( wxIcon( wxT("copy_destination_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemSendDecomposed );
|
||||
m_menuEdit->Append( m_menuItemCopyDestinationAndReturn );
|
||||
|
||||
wxMenuItem* m_menuItemSendSource;
|
||||
m_menuItemSendSource = new wxMenuItem( m_menuEdit, wxID_SEND_SOURCE, wxString( _("Send &Decomposed") ) + wxT('\t') + wxT("F6"), _("Send decomposed text to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemSendSource->SetBitmaps( wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemSendSource->SetBitmap( wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemSendSource );
|
||||
|
||||
wxMenuItem* m_menuItemCopySourceAndReturn;
|
||||
m_menuItemCopySourceAndReturn = new wxMenuItem( m_menuEdit, wxID_COPY_SOURCE_AND_RETURN, wxString( _("Copy Decomposed and Re&turn") ) + wxT('\t') + wxT("Ctrl+F6"), _("Copy decomposed text to clipboard and return focus to source window"), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuItemCopySourceAndReturn->SetBitmaps( wxIcon( wxT("copy_source_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
|
||||
m_menuItemCopySourceAndReturn->SetBitmap( wxIcon( wxT("copy_source_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
|
||||
#endif
|
||||
m_menuEdit->Append( m_menuItemCopySourceAndReturn );
|
||||
|
||||
wxMenuItem* m_menuItemSendAbort;
|
||||
m_menuItemSendAbort = new wxMenuItem( m_menuEdit, wxID_SEND_ABORT, wxString( _("Abort (De)composition") ) + wxT('\t') + wxT("Esc"), _("Abort composition and return focus to source window"), wxITEM_NORMAL );
|
||||
@@ -126,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_COMPOSE, wxString( _("&Compose Toolbar") ) , _("Toggle compose toolbar"), wxITEM_CHECK );
|
||||
m_menuItemToolbarCompose = new wxMenuItem( m_menuView, wxID_TOOLBAR_TRANSLATE, wxString( _("&Compose Toolbar") ) , _("Toggle compose toolbar"), wxITEM_CHECK );
|
||||
m_menuView->Append( m_menuItemToolbarCompose );
|
||||
|
||||
m_menuView->AppendSeparator();
|
||||
@@ -176,15 +194,19 @@ 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_toolbarCompose = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT );
|
||||
m_toolCharSelect = m_toolbarCompose->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_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_toolSendComposed = m_toolbarCompose->AddTool( wxID_SEND_COMPOSED, _("Send Composed"), wxIcon( wxT("send_composed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Send composed text to source window"), 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_toolSendDecomposed = m_toolbarCompose->AddTool( wxID_SEND_DECOMPOSED, _("Send Decomposed"), wxIcon( wxT("send_decomposed.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Decomposed"), _("Send decomposed 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_toolbarCompose->Realize();
|
||||
m_mgr.AddPane( m_toolbarCompose, wxAuiPaneInfo().Name( wxT("toolbarCompose") ).Top().Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Row( 0 ).Layer( 1 ).ToolbarPane() );
|
||||
wxArrayString m_toolTranslationSeqChoices;
|
||||
m_toolTranslationSeq = new wxChoice( m_toolbarTranslate, wxID_ANY, wxDefaultPosition, wxSize( 170,-1 ), m_toolTranslationSeqChoices, 0 );
|
||||
m_toolTranslationSeq->SetSelection( 0 );
|
||||
m_toolbarTranslate->AddControl( m_toolTranslationSeq );
|
||||
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_panelChrCat = new wxZRColaCharacterCatalogPanel( this );
|
||||
|
||||
@@ -203,6 +225,7 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( wxZRColaFrameBase::OnClose ) );
|
||||
this->Connect( wxEVT_ICONIZE, wxIconizeEventHandler( wxZRColaFrameBase::OnIconize ) );
|
||||
this->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaFrameBase::OnIdle ) );
|
||||
m_toolTranslationSeq->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( wxZRColaFrameBase::OnTranslationSeqChoice ), NULL, this );
|
||||
}
|
||||
|
||||
wxZRColaFrameBase::~wxZRColaFrameBase()
|
||||
@@ -211,6 +234,7 @@ wxZRColaFrameBase::~wxZRColaFrameBase()
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( wxZRColaFrameBase::OnClose ) );
|
||||
this->Disconnect( wxEVT_ICONIZE, wxIconizeEventHandler( wxZRColaFrameBase::OnIconize ) );
|
||||
this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaFrameBase::OnIdle ) );
|
||||
m_toolTranslationSeq->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( wxZRColaFrameBase::OnTranslationSeqChoice ), NULL, this );
|
||||
|
||||
m_mgr.UnInit();
|
||||
|
||||
@@ -221,99 +245,99 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_splitterDecomposed = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
|
||||
m_splitterDecomposed->SetSashGravity( 1 );
|
||||
m_splitterDecomposed->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDecomposedOnIdle ), NULL, this );
|
||||
m_splitterDecomposed->SetMinimumPaneSize( 5 );
|
||||
m_splitterSource = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
|
||||
m_splitterSource->SetSashGravity( 1 );
|
||||
m_splitterSource->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, this );
|
||||
m_splitterSource->SetMinimumPaneSize( 5 );
|
||||
|
||||
m_panelDecomposedEdit = new wxPanel( m_splitterDecomposed, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerDecomposedEdit;
|
||||
bSizerDecomposedEdit = new wxBoxSizer( wxVERTICAL );
|
||||
m_panelSourceEdit = new wxPanel( m_splitterSource, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerSourceEdit;
|
||||
bSizerSourceEdit = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* bSizerDecomposedEdit2;
|
||||
bSizerDecomposedEdit2 = new wxStaticBoxSizer( new wxStaticBox( m_panelDecomposedEdit, wxID_ANY, _("Decomposed Text") ), wxVERTICAL );
|
||||
wxStaticBoxSizer* bSizerSourceEdit2;
|
||||
bSizerSourceEdit2 = new wxStaticBoxSizer( new wxStaticBox( m_panelSourceEdit, wxID_ANY, _("Decomposed Text") ), wxVERTICAL );
|
||||
|
||||
m_decomposed = new wxTextCtrl( bSizerDecomposedEdit2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
m_decomposed->SetFont( wxFont( 20, 70, 90, 90, false, wxT("ZRCola") ) );
|
||||
m_decomposed->SetMinSize( wxSize( 100,25 ) );
|
||||
m_source = new wxTextCtrl( bSizerSourceEdit2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
m_source->SetFont( wxFont( 20, 70, 90, 90, false, wxT("ZRCola") ) );
|
||||
m_source->SetMinSize( wxSize( 100,25 ) );
|
||||
|
||||
bSizerDecomposedEdit2->Add( m_decomposed, 1, wxEXPAND, 5 );
|
||||
bSizerSourceEdit2->Add( m_source, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerDecomposedEdit->Add( bSizerDecomposedEdit2, 1, wxEXPAND, 5 );
|
||||
bSizerSourceEdit->Add( bSizerSourceEdit2, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panelDecomposedEdit->SetSizer( bSizerDecomposedEdit );
|
||||
m_panelDecomposedEdit->Layout();
|
||||
bSizerDecomposedEdit->Fit( m_panelDecomposedEdit );
|
||||
m_panelDecomposedHex = new wxPanel( m_splitterDecomposed, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerDecomposedHex;
|
||||
bSizerDecomposedHex = new wxBoxSizer( wxVERTICAL );
|
||||
m_panelSourceEdit->SetSizer( bSizerSourceEdit );
|
||||
m_panelSourceEdit->Layout();
|
||||
bSizerSourceEdit->Fit( m_panelSourceEdit );
|
||||
m_panelSourceHex = new wxPanel( m_splitterSource, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerSourceHex;
|
||||
bSizerSourceHex = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* bSizerDecomposedHex2;
|
||||
bSizerDecomposedHex2 = new wxStaticBoxSizer( new wxStaticBox( m_panelDecomposedHex, wxID_ANY, _("Decomposed Unicode Dump") ), wxVERTICAL );
|
||||
wxStaticBoxSizer* bSizerSourceHex2;
|
||||
bSizerSourceHex2 = new wxStaticBoxSizer( new wxStaticBox( m_panelSourceHex, wxID_ANY, _("Decomposed Unicode Dump") ), wxVERTICAL );
|
||||
|
||||
m_decomposedHex = new wxTextCtrl( bSizerDecomposedHex2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_decomposedHex->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 76, 90, 90, false, wxEmptyString ) );
|
||||
m_sourceHex = new wxTextCtrl( bSizerSourceHex2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_sourceHex->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 76, 90, 90, false, wxEmptyString ) );
|
||||
|
||||
bSizerDecomposedHex2->Add( m_decomposedHex, 1, wxEXPAND, 5 );
|
||||
bSizerSourceHex2->Add( m_sourceHex, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerDecomposedHex->Add( bSizerDecomposedHex2, 1, wxEXPAND, 5 );
|
||||
bSizerSourceHex->Add( bSizerSourceHex2, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panelDecomposedHex->SetSizer( bSizerDecomposedHex );
|
||||
m_panelDecomposedHex->Layout();
|
||||
bSizerDecomposedHex->Fit( m_panelDecomposedHex );
|
||||
m_splitterDecomposed->SplitVertically( m_panelDecomposedEdit, m_panelDecomposedHex, -5 );
|
||||
bSizerMain->Add( m_splitterDecomposed, 50, wxALL|wxEXPAND, 5 );
|
||||
m_panelSourceHex->SetSizer( bSizerSourceHex );
|
||||
m_panelSourceHex->Layout();
|
||||
bSizerSourceHex->Fit( m_panelSourceHex );
|
||||
m_splitterSource->SplitVertically( m_panelSourceEdit, m_panelSourceHex, -5 );
|
||||
bSizerMain->Add( m_splitterSource, 50, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_splitterComposed = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
|
||||
m_splitterComposed->SetSashGravity( 1 );
|
||||
m_splitterComposed->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterComposedOnIdle ), NULL, this );
|
||||
m_splitterComposed->SetMinimumPaneSize( 5 );
|
||||
m_splitterDestination = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
|
||||
m_splitterDestination->SetSashGravity( 1 );
|
||||
m_splitterDestination->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, this );
|
||||
m_splitterDestination->SetMinimumPaneSize( 5 );
|
||||
|
||||
m_panelComposedEdit = new wxPanel( m_splitterComposed, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerComposedEdit;
|
||||
bSizerComposedEdit = new wxBoxSizer( wxVERTICAL );
|
||||
m_panelDestinationEdit = new wxPanel( m_splitterDestination, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerDestinationEdit;
|
||||
bSizerDestinationEdit = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* bSizerComposedEdit2;
|
||||
bSizerComposedEdit2 = new wxStaticBoxSizer( new wxStaticBox( m_panelComposedEdit, wxID_ANY, _("Composed Text") ), wxVERTICAL );
|
||||
wxStaticBoxSizer* bSizerDestinationEdit2;
|
||||
bSizerDestinationEdit2 = new wxStaticBoxSizer( new wxStaticBox( m_panelDestinationEdit, wxID_ANY, _("Composed Text") ), wxVERTICAL );
|
||||
|
||||
m_composed = new wxTextCtrl( bSizerComposedEdit2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
m_composed->SetFont( wxFont( 20, 70, 90, 90, false, wxT("ZRCola") ) );
|
||||
m_composed->SetMinSize( wxSize( 100,25 ) );
|
||||
m_destination = new wxTextCtrl( bSizerDestinationEdit2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
m_destination->SetFont( wxFont( 20, 70, 90, 90, false, wxT("ZRCola") ) );
|
||||
m_destination->SetMinSize( wxSize( 100,25 ) );
|
||||
|
||||
bSizerComposedEdit2->Add( m_composed, 1, wxEXPAND, 5 );
|
||||
bSizerDestinationEdit2->Add( m_destination, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerComposedEdit->Add( bSizerComposedEdit2, 1, wxEXPAND, 5 );
|
||||
bSizerDestinationEdit->Add( bSizerDestinationEdit2, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panelComposedEdit->SetSizer( bSizerComposedEdit );
|
||||
m_panelComposedEdit->Layout();
|
||||
bSizerComposedEdit->Fit( m_panelComposedEdit );
|
||||
m_panelComposedHex = new wxPanel( m_splitterComposed, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerComposedHex;
|
||||
bSizerComposedHex = new wxBoxSizer( wxVERTICAL );
|
||||
m_panelDestinationEdit->SetSizer( bSizerDestinationEdit );
|
||||
m_panelDestinationEdit->Layout();
|
||||
bSizerDestinationEdit->Fit( m_panelDestinationEdit );
|
||||
m_panelDestinationHex = new wxPanel( m_splitterDestination, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerDestinationHex;
|
||||
bSizerDestinationHex = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* bSizerComposedHex2;
|
||||
bSizerComposedHex2 = new wxStaticBoxSizer( new wxStaticBox( m_panelComposedHex, wxID_ANY, _("Composed Unicode Dump") ), wxVERTICAL );
|
||||
wxStaticBoxSizer* bSizerDestinationHex2;
|
||||
bSizerDestinationHex2 = new wxStaticBoxSizer( new wxStaticBox( m_panelDestinationHex, wxID_ANY, _("Composed Unicode Dump") ), wxVERTICAL );
|
||||
|
||||
m_composedHex = new wxTextCtrl( bSizerComposedHex2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_composedHex->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 76, 90, 90, false, wxEmptyString ) );
|
||||
m_destinationHex = new wxTextCtrl( bSizerDestinationHex2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_destinationHex->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 76, 90, 90, false, wxEmptyString ) );
|
||||
|
||||
bSizerComposedHex2->Add( m_composedHex, 1, wxEXPAND, 5 );
|
||||
bSizerDestinationHex2->Add( m_destinationHex, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerComposedHex->Add( bSizerComposedHex2, 1, wxEXPAND, 5 );
|
||||
bSizerDestinationHex->Add( bSizerDestinationHex2, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panelComposedHex->SetSizer( bSizerComposedHex );
|
||||
m_panelComposedHex->Layout();
|
||||
bSizerComposedHex->Fit( m_panelComposedHex );
|
||||
m_splitterComposed->SplitVertically( m_panelComposedEdit, m_panelComposedHex, -5 );
|
||||
bSizerMain->Add( m_splitterComposed, 50, wxALL|wxEXPAND, 5 );
|
||||
m_panelDestinationHex->SetSizer( bSizerDestinationHex );
|
||||
m_panelDestinationHex->Layout();
|
||||
bSizerDestinationHex->Fit( m_panelDestinationHex );
|
||||
m_splitterDestination->SplitVertically( m_panelDestinationEdit, m_panelDestinationHex, -5 );
|
||||
bSizerMain->Add( m_splitterDestination, 50, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
@@ -322,24 +346,24 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
|
||||
m_timerSave.SetOwner( this, wxID_TIMER_SAVE );
|
||||
|
||||
// Connect Events
|
||||
m_decomposed->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDecomposedPaint ), NULL, this );
|
||||
m_decomposed->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDecomposedText ), NULL, this );
|
||||
m_decomposedHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDecomposedHexPaint ), NULL, this );
|
||||
m_composed->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnComposedPaint ), NULL, this );
|
||||
m_composed->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnComposedText ), NULL, this );
|
||||
m_composedHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnComposedHexPaint ), NULL, this );
|
||||
m_source->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourcePaint ), NULL, this );
|
||||
m_source->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnSourceText ), NULL, this );
|
||||
m_sourceHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourceHexPaint ), NULL, this );
|
||||
m_destination->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationPaint ), NULL, this );
|
||||
m_destination->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDestinationText ), NULL, this );
|
||||
m_destinationHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this );
|
||||
this->Connect( wxID_TIMER_SAVE, wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) );
|
||||
}
|
||||
|
||||
wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_decomposed->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDecomposedPaint ), NULL, this );
|
||||
m_decomposed->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDecomposedText ), NULL, this );
|
||||
m_decomposedHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDecomposedHexPaint ), NULL, this );
|
||||
m_composed->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnComposedPaint ), NULL, this );
|
||||
m_composed->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnComposedText ), NULL, this );
|
||||
m_composedHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnComposedHexPaint ), NULL, this );
|
||||
m_source->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourcePaint ), NULL, this );
|
||||
m_source->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnSourceText ), NULL, this );
|
||||
m_sourceHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourceHexPaint ), NULL, this );
|
||||
m_destination->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationPaint ), NULL, this );
|
||||
m_destination->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDestinationText ), NULL, this );
|
||||
m_destinationHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this );
|
||||
this->Disconnect( wxID_TIMER_SAVE, wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) );
|
||||
|
||||
}
|
||||
@@ -763,12 +787,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 );
|
||||
@@ -785,14 +809,13 @@ 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_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 );
|
||||
@@ -801,7 +824,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();
|
||||
@@ -813,7 +835,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 );
|
||||
@@ -838,8 +860,7 @@ 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_sdbSizerButtonsApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnApplyButtonClick ), NULL, this );
|
||||
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnOKButtonClick ), NULL, this );
|
||||
}
|
||||
@@ -848,8 +869,7 @@ 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_sdbSizerButtonsApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnApplyButtonClick ), NULL, this );
|
||||
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaSettingsBase::OnOKButtonClick ), NULL, this );
|
||||
|
||||
@@ -1070,3 +1090,130 @@ wxZRColaCharRequestBase::~wxZRColaCharRequestBase()
|
||||
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaCharRequestBase::OnOKButtonClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
||||
wxZRColaTranslationSeqBase::wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bSizerContent;
|
||||
bSizerContent = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerTranslationSet;
|
||||
sbSizerTranslationSet = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Translation") ), wxVERTICAL );
|
||||
|
||||
m_transLbl = new wxStaticText( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _("ZRCola offers multiple text translations that can be arranged in a sequence.\nPlease select desired translations and the order they are applied."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_transLbl->Wrap( 452 );
|
||||
sbSizerTranslationSet->Add( m_transLbl, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerTranslation;
|
||||
bSizerTranslation = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizerTransAvailable;
|
||||
bSizerTransAvailable = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_availableLbl = new wxStaticText( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _("A&vailable:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_availableLbl->Wrap( -1 );
|
||||
bSizerTransAvailable->Add( m_availableLbl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_available = new wxListBox( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( 200,-1 ), 0, NULL, wxLB_SINGLE|wxLB_SORT );
|
||||
m_available->SetMinSize( wxSize( 200,150 ) );
|
||||
|
||||
bSizerTransAvailable->Add( m_available, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerTranslation->Add( bSizerTransAvailable, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerTransSelect;
|
||||
bSizerTransSelect = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_add = new wxButton( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _(">"), wxDefaultPosition, wxSize( 32,32 ), 0 );
|
||||
bSizerTransSelect->Add( m_add, 0, wxALL, 5 );
|
||||
|
||||
m_remove = new wxButton( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _("<"), wxDefaultPosition, wxSize( 32,32 ), 0 );
|
||||
bSizerTransSelect->Add( m_remove, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizerTranslation->Add( bSizerTransSelect, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxBoxSizer* bSizerTransSelected;
|
||||
bSizerTransSelected = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_selectedLbl = new wxStaticText( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _("&Selected:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_selectedLbl->Wrap( -1 );
|
||||
bSizerTransSelected->Add( m_selectedLbl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_selected = new wxListBox( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( 200,-1 ), 0, NULL, wxLB_SINGLE );
|
||||
m_selected->SetMinSize( wxSize( 200,150 ) );
|
||||
|
||||
bSizerTransSelected->Add( m_selected, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerTranslation->Add( bSizerTransSelected, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbSizerTranslationSet->Add( bSizerTranslation, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerTransActiveReorder;
|
||||
bSizerTransActiveReorder = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_selectedUp = new wxButton( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _("Up"), wxDefaultPosition, wxSize( 70,-1 ), 0 );
|
||||
bSizerTransActiveReorder->Add( m_selectedUp, 0, wxALL, 5 );
|
||||
|
||||
m_selectedDown = new wxButton( sbSizerTranslationSet->GetStaticBox(), wxID_ANY, _("Down"), wxDefaultPosition, wxSize( 70,-1 ), 0 );
|
||||
bSizerTransActiveReorder->Add( m_selectedDown, 0, wxALL, 5 );
|
||||
|
||||
|
||||
sbSizerTranslationSet->Add( bSizerTransActiveReorder, 0, wxALIGN_RIGHT, 5 );
|
||||
|
||||
|
||||
bSizerContent->Add( sbSizerTranslationSet, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerContent->Add( 0, 0, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_sdbSizerButtons = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
|
||||
m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
||||
m_sdbSizerButtons->Realize();
|
||||
|
||||
bSizerContent->Add( m_sdbSizerButtons, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerContent );
|
||||
this->Layout();
|
||||
bSizerContent->Fit( this );
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( wxZRColaTranslationSeqBase::OnInitDialog ) );
|
||||
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxZRColaTranslationSeqBase::OnUpdate ) );
|
||||
m_available->Connect( wxEVT_CHAR, wxKeyEventHandler( wxZRColaTranslationSeqBase::OnAvailableChar ), NULL, this );
|
||||
m_available->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnAvailableDClick ), NULL, this );
|
||||
m_add->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnAdd ), NULL, this );
|
||||
m_remove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnRemove ), NULL, this );
|
||||
m_selected->Connect( wxEVT_CHAR, wxKeyEventHandler( wxZRColaTranslationSeqBase::OnSelectedChar ), NULL, this );
|
||||
m_selected->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnSelectedDClick ), NULL, this );
|
||||
m_selectedUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnSelectedUp ), NULL, this );
|
||||
m_selectedDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnSelectedDown ), NULL, this );
|
||||
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnOKButtonClick ), NULL, this );
|
||||
}
|
||||
|
||||
wxZRColaTranslationSeqBase::~wxZRColaTranslationSeqBase()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( wxZRColaTranslationSeqBase::OnInitDialog ) );
|
||||
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxZRColaTranslationSeqBase::OnUpdate ) );
|
||||
m_available->Disconnect( wxEVT_CHAR, wxKeyEventHandler( wxZRColaTranslationSeqBase::OnAvailableChar ), NULL, this );
|
||||
m_available->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnAvailableDClick ), NULL, this );
|
||||
m_add->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnAdd ), NULL, this );
|
||||
m_remove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnRemove ), NULL, this );
|
||||
m_selected->Disconnect( wxEVT_CHAR, wxKeyEventHandler( wxZRColaTranslationSeqBase::OnSelectedChar ), NULL, this );
|
||||
m_selected->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnSelectedDClick ), NULL, this );
|
||||
m_selectedUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnSelectedUp ), NULL, this );
|
||||
m_selectedDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnSelectedDown ), NULL, this );
|
||||
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxZRColaTranslationSeqBase::OnOKButtonClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ class wxZRColaCharGrid;
|
||||
#include <wx/settings.h>
|
||||
#include <wx/aui/aui.h>
|
||||
#include <wx/aui/auibar.h>
|
||||
#include <wx/choice.h>
|
||||
class wxZRColaCharacterCatalogPanel;
|
||||
class wxZRColaComposerPanel;
|
||||
#include <wx/statusbr.h>
|
||||
@@ -35,7 +36,6 @@ class wxZRColaComposerPanel;
|
||||
#include <wx/panel.h>
|
||||
#include <wx/splitter.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/srchctrl.h>
|
||||
@@ -63,12 +63,14 @@ class wxZRColaFrameBase : public wxFrame
|
||||
enum
|
||||
{
|
||||
wxID_CHARACTER_SELECTOR = 1000,
|
||||
wxID_SEND_COMPOSED,
|
||||
wxID_SEND_DECOMPOSED,
|
||||
wxID_SEND_DESTINATION,
|
||||
wxID_COPY_DESTINATION_AND_RETURN,
|
||||
wxID_SEND_SOURCE,
|
||||
wxID_COPY_SOURCE_AND_RETURN,
|
||||
wxID_SEND_ABORT,
|
||||
wxID_SETTINGS,
|
||||
wxID_TOOLBAR_EDIT,
|
||||
wxID_TOOLBAR_COMPOSE,
|
||||
wxID_TOOLBAR_TRANSLATE,
|
||||
wxID_PANEL_CHRGRPS,
|
||||
wxID_HELP_INSTRUCTIONS,
|
||||
wxID_HELP_SHORTCUTS,
|
||||
@@ -85,10 +87,11 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBar* m_toolbarCompose;
|
||||
wxAuiToolBar* m_toolbarTranslate;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendComposed;
|
||||
wxAuiToolBarItem* m_toolSendDecomposed;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxChoice* m_toolTranslationSeq;
|
||||
wxZRColaCharacterCatalogPanel* m_panelChrCat;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
@@ -96,6 +99,7 @@ class wxZRColaFrameBase : public wxFrame
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnTranslationSeqChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
@@ -121,43 +125,43 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
wxID_TIMER_SAVE = 1000
|
||||
};
|
||||
|
||||
wxSplitterWindow* m_splitterDecomposed;
|
||||
wxPanel* m_panelDecomposedEdit;
|
||||
wxPanel* m_panelDecomposedHex;
|
||||
wxTextCtrl* m_decomposedHex;
|
||||
wxSplitterWindow* m_splitterComposed;
|
||||
wxPanel* m_panelComposedEdit;
|
||||
wxPanel* m_panelComposedHex;
|
||||
wxTextCtrl* m_composedHex;
|
||||
wxSplitterWindow* m_splitterSource;
|
||||
wxPanel* m_panelSourceEdit;
|
||||
wxPanel* m_panelSourceHex;
|
||||
wxTextCtrl* m_sourceHex;
|
||||
wxSplitterWindow* m_splitterDestination;
|
||||
wxPanel* m_panelDestinationEdit;
|
||||
wxPanel* m_panelDestinationHex;
|
||||
wxTextCtrl* m_destinationHex;
|
||||
wxTimer m_timerSave;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnDecomposedPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnDecomposedText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDecomposedHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnComposedPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnComposedText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnComposedHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSaveTimer( wxTimerEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
wxTextCtrl* m_decomposed;
|
||||
wxTextCtrl* m_composed;
|
||||
wxTextCtrl* m_source;
|
||||
wxTextCtrl* m_destination;
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
~wxZRColaComposerPanelBase();
|
||||
|
||||
void m_splitterDecomposedOnIdle( wxIdleEvent& )
|
||||
void m_splitterSourceOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterDecomposed->SetSashPosition( -5 );
|
||||
m_splitterDecomposed->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDecomposedOnIdle ), NULL, this );
|
||||
m_splitterSource->SetSashPosition( -5 );
|
||||
m_splitterSource->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
void m_splitterComposedOnIdle( wxIdleEvent& )
|
||||
void m_splitterDestinationOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterComposed->SetSashPosition( -5 );
|
||||
m_splitterComposed->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterComposedOnIdle ), NULL, this );
|
||||
m_splitterDestination->SetSashPosition( -5 );
|
||||
m_splitterDestination->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
};
|
||||
@@ -272,8 +276,7 @@ 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 OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
@@ -365,4 +368,46 @@ class wxZRColaCharRequestBase : public wxDialog
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaTranslationSeqBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* m_transLbl;
|
||||
wxStaticText* m_availableLbl;
|
||||
wxListBox* m_available;
|
||||
wxButton* m_add;
|
||||
wxButton* m_remove;
|
||||
wxStaticText* m_selectedLbl;
|
||||
wxListBox* m_selected;
|
||||
wxButton* m_selectedUp;
|
||||
wxButton* m_selectedDown;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnAvailableDClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnAdd( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnRemove( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedChar( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedDClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedUp( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedDown( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
|
||||
~wxZRColaTranslationSeqBase();
|
||||
|
||||
};
|
||||
|
||||
#endif //__ZRCOLAGUI_H__
|
||||
|
||||
@@ -96,13 +96,9 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event)
|
||||
(e.AltDown() ? ZRCola::keyseq_db::keyseq::ALT : 0);
|
||||
m_seq.push_back(key);
|
||||
|
||||
auto n = m_seq.size();
|
||||
ZRCola::keyseq_db::keyseq *ks = (ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::keyseq_db::keyseq::key_t)*n];
|
||||
ks->chr = 0;
|
||||
ks->seq_len = n;
|
||||
memcpy(ks->seq, m_seq.data(), sizeof(ZRCola::keyseq_db::keyseq::key_t)*n);
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::keyseq_db::keyseq::key_t)*m_seq.size()]);
|
||||
ks->ZRCola::keyseq_db::keyseq::keyseq(m_seq.data(), m_seq.size());
|
||||
found = app->m_ks_db.idxKey.find(*ks, start);
|
||||
delete ks;
|
||||
}
|
||||
|
||||
if (found) {
|
||||
@@ -116,14 +112,14 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event)
|
||||
wxObject *obj = event.GetEventObject();
|
||||
if (obj && obj->IsKindOf(wxCLASSINFO(wxTextCtrl))) {
|
||||
// Push text to source control.
|
||||
((wxTextCtrl*)obj)->WriteText(ks.chr);
|
||||
((wxTextCtrl*)obj)->WriteText(wxString(ks.chr(), ks.chr_len()));
|
||||
|
||||
// Event is fully processed now.
|
||||
event.StopPropagation();
|
||||
return true;
|
||||
}
|
||||
} else if (start < app->m_ks_db.idxKey.size() &&
|
||||
ZRCola::keyseq_db::keyseq::CompareSequence(m_seq.data(), m_seq.size(), app->m_ks_db.idxKey[start].seq, std::min<unsigned __int16>(app->m_ks_db.idxKey[start].seq_len, m_seq.size())) == 0)
|
||||
ZRCola::keyseq_db::keyseq::CompareSequence(m_seq.data(), m_seq.size(), app->m_ks_db.idxKey[start].seq(), std::min<size_t>(app->m_ks_db.idxKey[start].seq_len(), m_seq.size())) == 0)
|
||||
{
|
||||
// The sequence is a partial match. Continue watching.
|
||||
if (pFrame && pFrame->GetStatusBar())
|
||||
|
||||
@@ -31,10 +31,10 @@ wxZRColaSettings::wxZRColaSettings(wxWindow* parent) :
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_languages->Clear();
|
||||
for (size_t i = 0, n = app->m_lang_db.idxLng.size(); i < n; i++) {
|
||||
const auto &lang = app->m_lang_db.idxLng[i];
|
||||
for (size_t i = 0, n = app->m_lang_db.idxLang.size(); i < n; i++) {
|
||||
const auto &lang = app->m_lang_db.idxLang[i];
|
||||
wxString
|
||||
label(lang.name, lang.name_len),
|
||||
label(lang.name(), lang.name_len()),
|
||||
label_tran(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
|
||||
m_languages->Insert(label_tran, i);
|
||||
}
|
||||
@@ -58,22 +58,16 @@ 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)->id = m_lang;
|
||||
ZRCola::language_db::indexLang::size_type start;
|
||||
m_languages->Select(app->m_lang_db.idxLng.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);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnLangAuto(wxCommandEvent& event)
|
||||
void wxZRColaSettings::OnLanguageUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
m_languages->Enable(!event.IsChecked());
|
||||
}
|
||||
m_languages->Enable(m_langManual->GetValue());
|
||||
|
||||
|
||||
void wxZRColaSettings::OnLangManual(wxCommandEvent& event)
|
||||
{
|
||||
m_languages->Enable(event.IsChecked());
|
||||
wxZRColaSettingsBase::OnLanguageUpdate(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,20 +116,19 @@ void wxZRColaSettings::OnApplyButtonClick(wxCommandEvent& event)
|
||||
m_lang_auto = false;
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
const auto &lang = app->m_lang_db.idxLng[m_languages->GetSelection()];
|
||||
const auto &lang = app->m_lang_db.idxLang[m_languages->GetSelection()];
|
||||
|
||||
if (m_lang != lang.id) {
|
||||
m_lang = lang.id;
|
||||
if (m_lang != lang.lang) {
|
||||
m_lang = lang.lang;
|
||||
|
||||
// Notify composed text something changed and should re-decompose.
|
||||
// Notify destination text something changed and should re-inverse translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
app->m_mainWnd->m_panel->m_composed->ProcessWindowEvent(event2);
|
||||
app->m_mainWnd->m_panel->m_destination->ProcessWindowEvent(event2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxZRColaSettings::OnOKButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
wxZRColaSettings::OnApplyButtonClick(event);
|
||||
@@ -179,9 +172,9 @@ bool wxPersistentZRColaSettings::Restore()
|
||||
} else if (RestoreValue(wxT("lang"), &lang) && lang.Length() == 3) {
|
||||
// The language was read from configuration.
|
||||
wnd->m_lang = lang.c_str();
|
||||
} else if (!app->m_lang_db.idxLng.empty()) {
|
||||
const auto &lang = app->m_lang_db.idxLng[0];
|
||||
wnd->m_lang = lang.id;
|
||||
} else if (!app->m_lang_db.idxLang.empty()) {
|
||||
const auto &lang = app->m_lang_db.idxLang[0];
|
||||
wnd->m_lang = lang.lang;
|
||||
} else
|
||||
wnd->m_lang = ZRCola::langid_t::blank;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ class wxPersistentZRColaSettings;
|
||||
|
||||
#include "zrcolagui.h"
|
||||
#include <wxex/persist/dialog.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
///
|
||||
@@ -42,14 +43,13 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void OnInitDialog(wxInitDialogEvent& event);
|
||||
virtual void OnLangAuto(wxCommandEvent& event);
|
||||
virtual void OnLangManual(wxCommandEvent& event);
|
||||
virtual void OnLanguageUpdate(wxUpdateUIEvent& event);
|
||||
virtual void OnApplyButtonClick(wxCommandEvent& event);
|
||||
virtual void OnOKButtonClick(wxCommandEvent& event);
|
||||
|
||||
public:
|
||||
bool m_lang_auto; ///< Is language for decomposing resolved using currently selected keyboard
|
||||
ZRCola::langid_t m_lang; ///< Language for decomposing
|
||||
bool m_lang_auto; ///< Is language for inverse translation resolved using currently selected keyboard
|
||||
ZRCola::langid_t m_lang; ///< Language for inverse translation
|
||||
};
|
||||
|
||||
|
||||
|
||||
253
ZRCola/zrcolatranseq.cpp
Normal file
253
ZRCola/zrcolatranseq.cpp
Normal file
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
Copyright 2015-2017 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaTranslationSeq
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxZRColaTranslationSeq::wxZRColaTranslationSeq(wxWindow* parent) :
|
||||
wxZRColaTranslationSeqBase(parent)
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
m_available->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_available->Append(label_tran, (void*)ts.set);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnInitDialog(wxInitDialogEvent& event)
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
m_selected->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_selected->Append(label_tran, (void*)ts.set);
|
||||
} else {
|
||||
wxString label_tran(wxString::Format(_("Unknown translation (%u)"), (unsigned int)*s));
|
||||
m_selected->Append(label_tran, (void*)*s);
|
||||
}
|
||||
}
|
||||
|
||||
wxZRColaTranslationSeqBase::OnInitDialog(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
m_add->Enable(m_available->GetSelection() != wxNOT_FOUND);
|
||||
|
||||
int idx = m_selected->GetSelection();
|
||||
m_remove ->Enable(idx != wxNOT_FOUND);
|
||||
m_selectedUp ->Enable(idx != wxNOT_FOUND && (unsigned int)idx > 0);
|
||||
m_selectedDown->Enable(idx != wxNOT_FOUND && (unsigned int)idx < m_selected->GetCount() - 1);
|
||||
|
||||
wxZRColaTranslationSeqBase::OnUpdate(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnAvailableChar(wxKeyEvent& event)
|
||||
{
|
||||
if (event.GetRawKeyCode() == VK_INSERT) {
|
||||
int idx = m_available->GetSelection();
|
||||
if (idx != wxNOT_FOUND) {
|
||||
m_selected->Append(
|
||||
m_available->GetString(idx),
|
||||
m_available->GetClientData(idx));
|
||||
}
|
||||
}
|
||||
|
||||
wxZRColaTranslationSeqBase::OnAvailableChar(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnAvailableDClick(wxCommandEvent& event)
|
||||
{
|
||||
int idx = m_available->GetSelection();
|
||||
if (idx != wxNOT_FOUND) {
|
||||
m_selected->Append(
|
||||
m_available->GetString(idx),
|
||||
m_available->GetClientData(idx));
|
||||
}
|
||||
|
||||
wxZRColaTranslationSeqBase::OnAvailableDClick(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnAdd(wxCommandEvent& event)
|
||||
{
|
||||
int idx = m_available->GetSelection();
|
||||
wxASSERT_MSG(idx != wxNOT_FOUND, wxT("no available translation selected"));
|
||||
m_selected->Append(
|
||||
m_available->GetString(idx),
|
||||
m_available->GetClientData(idx));
|
||||
|
||||
wxZRColaTranslationSeqBase::OnAdd(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnRemove(wxCommandEvent& event)
|
||||
{
|
||||
int idx = m_selected->GetSelection();
|
||||
wxASSERT_MSG(idx != wxNOT_FOUND, wxT("no active translation selected"));
|
||||
m_selected->Delete(idx);
|
||||
|
||||
wxZRColaTranslationSeqBase::OnRemove(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnSelectedChar(wxKeyEvent& event)
|
||||
{
|
||||
if (event.GetRawKeyCode() == VK_DELETE) {
|
||||
int idx = m_selected->GetSelection();
|
||||
if (idx != wxNOT_FOUND)
|
||||
m_selected->Delete(idx);
|
||||
}
|
||||
|
||||
wxZRColaTranslationSeqBase::OnSelectedChar(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnSelectedDClick(wxCommandEvent& event)
|
||||
{
|
||||
int idx = m_selected->GetSelection();
|
||||
if (idx != wxNOT_FOUND)
|
||||
m_selected->Delete(idx);
|
||||
|
||||
wxZRColaTranslationSeqBase::OnSelectedDClick(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnSelectedUp(wxCommandEvent& event)
|
||||
{
|
||||
int idx = m_selected->GetSelection();
|
||||
wxASSERT_MSG(idx != wxNOT_FOUND && (unsigned int)idx > 0, wxT("no or first active translation selected"));
|
||||
wxString label = m_selected->GetString(idx);
|
||||
void *data = m_selected->GetClientData(idx);
|
||||
m_selected->Delete(idx);
|
||||
m_selected->Insert(label, idx - 1, data);
|
||||
m_selected->Select(idx - 1);
|
||||
|
||||
wxZRColaTranslationSeqBase::OnSelectedUp(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnSelectedDown(wxCommandEvent& event)
|
||||
{
|
||||
int idx = m_selected->GetSelection();
|
||||
wxASSERT_MSG(idx != wxNOT_FOUND && (unsigned int)idx < m_selected->GetCount() - 1, wxT("no or last active translation selected"));
|
||||
wxString label = m_selected->GetString(idx);
|
||||
void *data = m_selected->GetClientData(idx);
|
||||
m_selected->Delete(idx);
|
||||
m_selected->Insert(label, idx + 1, data);
|
||||
m_selected->Select(idx + 1);
|
||||
|
||||
wxZRColaTranslationSeqBase::OnSelectedDown(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnApplyButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
m_transeq.clear();
|
||||
for (unsigned int i = 0, n = m_selected->GetCount(); i < n; i++)
|
||||
m_transeq.push_back(reinterpret_cast<ZRCola::transetid_t>(m_selected->GetClientData(i)));
|
||||
|
||||
// Notify source text something changed and should re-translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
app->m_mainWnd->m_panel->m_source->ProcessWindowEvent(event2);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaTranslationSeq::OnOKButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
wxZRColaTranslationSeq::OnApplyButtonClick(event);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxPersistentZRColaTranslationSeq
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxPersistentZRColaTranslationSeq::wxPersistentZRColaTranslationSeq(wxZRColaTranslationSeq *wnd) : wxPersistentDialog(wnd)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void wxPersistentZRColaTranslationSeq::Save() const
|
||||
{
|
||||
wxPersistentDialog::Save();
|
||||
|
||||
auto wnd = static_cast<const wxZRColaTranslationSeq*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
bool wxPersistentZRColaTranslationSeq::Restore()
|
||||
{
|
||||
auto wnd = dynamic_cast<wxZRColaTranslationSeq*>(GetWindow());
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString str;
|
||||
if (RestoreValue(wxT("transeq"), &str)) {
|
||||
std::vector<ZRCola::transetid_t> transet;
|
||||
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) {
|
||||
transet.push_back(val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!transet.empty())
|
||||
wnd->m_transeq = std::move(transet);
|
||||
}
|
||||
|
||||
return wxPersistentDialog::Restore();
|
||||
}
|
||||
80
ZRCola/zrcolatranseq.h
Normal file
80
ZRCola/zrcolatranseq.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
Copyright 2015-2017 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
/// Forward declarations
|
||||
///
|
||||
class wxZRColaTranslationSeq;
|
||||
class wxPersistentZRColaTranslationSeq;
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "zrcolagui.h"
|
||||
#include <zrcola/translate.h>
|
||||
#include <wxex/persist/dialog.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
///
|
||||
/// Configuration dialog
|
||||
///
|
||||
class wxZRColaTranslationSeq : public wxZRColaTranslationSeqBase
|
||||
{
|
||||
public:
|
||||
wxZRColaTranslationSeq(wxWindow* parent);
|
||||
|
||||
friend class wxPersistentZRColaTranslationSeq; // Allow saving/restoring window state.
|
||||
|
||||
protected:
|
||||
virtual void OnInitDialog(wxInitDialogEvent& event);
|
||||
virtual void OnUpdate(wxUpdateUIEvent& event);
|
||||
virtual void OnAvailableChar(wxKeyEvent& event);
|
||||
virtual void OnAvailableDClick(wxCommandEvent& event);
|
||||
virtual void OnAdd(wxCommandEvent& event);
|
||||
virtual void OnRemove(wxCommandEvent& event);
|
||||
virtual void OnSelectedChar(wxKeyEvent& event);
|
||||
virtual void OnSelectedDClick(wxCommandEvent& event);
|
||||
virtual void OnSelectedUp(wxCommandEvent& event);
|
||||
virtual void OnSelectedDown(wxCommandEvent& event);
|
||||
virtual void OnApplyButtonClick(wxCommandEvent& event);
|
||||
virtual void OnOKButtonClick(wxCommandEvent& event);
|
||||
|
||||
public:
|
||||
std::vector<ZRCola::transetid_t> m_transeq; ///< Custom translation set sequence
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Supports saving/restoring wxZRColaTranslationSeq state
|
||||
///
|
||||
class wxPersistentZRColaTranslationSeq : public wxPersistentDialog
|
||||
{
|
||||
public:
|
||||
wxPersistentZRColaTranslationSeq(wxZRColaTranslationSeq *wnd);
|
||||
|
||||
virtual void Save() const;
|
||||
virtual bool Restore();
|
||||
};
|
||||
|
||||
|
||||
inline wxPersistentObject *wxCreatePersistentObject(wxZRColaTranslationSeq *wnd)
|
||||
{
|
||||
return new wxPersistentZRColaTranslationSeq(wnd);
|
||||
}
|
||||
@@ -45,6 +45,7 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dbsource.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="parse.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
@@ -52,6 +53,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="dbsource.h" />
|
||||
<ClInclude Include="parse.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
<ClCompile Include="dbsource.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="parse.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
@@ -36,6 +39,9 @@
|
||||
<ClInclude Include="dbsource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="parse.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRColaCompile.rc">
|
||||
|
||||
@@ -28,35 +28,19 @@ using namespace winstd;
|
||||
// ZRCola::DBSource::character_bank
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ZRCola::DBSource::character_bank::character_bank() : vector<unique_ptr<ZRCola::DBSource::character> >()
|
||||
{
|
||||
resize(0x10000);
|
||||
}
|
||||
|
||||
|
||||
void ZRCola::DBSource::character_bank::build_related()
|
||||
{
|
||||
// Initialize ignore list.
|
||||
m_ignore.insert(L"letter");
|
||||
m_ignore.insert(L"modifier");
|
||||
m_ignore.insert(L"symbol");
|
||||
m_ignore.insert(L"accent");
|
||||
m_ignore.insert(L"with");
|
||||
m_ignore.insert(L"and");
|
||||
m_ignore.insert(L"capital");
|
||||
m_ignore.insert(L"small");
|
||||
m_ignore.insert(L"combining");
|
||||
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
|
||||
// Launch workers.
|
||||
build_related_worker **workers = new build_related_worker*[si.dwNumberOfProcessors];
|
||||
size_type from = 0, to;
|
||||
for (DWORD i = 0; i < si.dwNumberOfProcessors; i++) {
|
||||
to = MulDiv(i + 1, 0x10000, si.dwNumberOfProcessors);
|
||||
workers[i] = new build_related_worker(this, from, to);
|
||||
from = to;
|
||||
size_type from = 0, total = size();
|
||||
iterator chr_from = begin(), chr_to;
|
||||
for (DWORD i = 0; i < si.dwNumberOfProcessors; i++, chr_from = chr_to) {
|
||||
size_type to = MulDiv(i + 1, total, si.dwNumberOfProcessors);
|
||||
for (chr_to = chr_from; from < to; from++, ++chr_to);
|
||||
workers[i] = new build_related_worker(this, chr_from, chr_to);
|
||||
}
|
||||
|
||||
// Wait for workers.
|
||||
@@ -71,7 +55,7 @@ void ZRCola::DBSource::character_bank::build_related()
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DBSource::character_bank::build_related_worker::build_related_worker(_In_ const character_bank *cb, _In_ size_type from, _In_ size_type to) :
|
||||
ZRCola::DBSource::character_bank::build_related_worker::build_related_worker(_In_ const character_bank *cb, _In_ iterator from, _In_ iterator to) :
|
||||
win_handle((HANDLE)_beginthreadex(NULL, 0, process, this, CREATE_SUSPENDED, NULL)),
|
||||
m_heap(HeapCreate(0, 0, 0)),
|
||||
m_cb(cb),
|
||||
@@ -86,40 +70,39 @@ ZRCola::DBSource::character_bank::build_related_worker::build_related_worker(_In
|
||||
unsigned int ZRCola::DBSource::character_bank::build_related_worker::process()
|
||||
{
|
||||
heap_allocator<wchar_t> al(m_heap);
|
||||
basic_string<wchar_t, char_traits<wchar_t>, heap_allocator<wchar_t> > rel(al);
|
||||
vector<wchar_t, heap_allocator<wchar_t> > rel(al);
|
||||
set<wstring, less<wstring>, heap_allocator<wstring> > matching(less<wstring>(), al);
|
||||
|
||||
for (size_type i = m_from; i < m_to; i++) {
|
||||
auto &chr = *(m_cb->at(i).get());
|
||||
if (&chr == NULL) continue;
|
||||
|
||||
for (auto c = m_from; c != m_to; c++) {
|
||||
rel.clear();
|
||||
|
||||
// Remove all unexisting, inactive, or self related characters.
|
||||
for (auto j = chr.rel.length(); j--;) {
|
||||
wchar_t c = chr.rel[j];
|
||||
if (m_cb->at(c) && (wchar_t)j != c)
|
||||
rel += c;
|
||||
// Skip all unexisting, or self related characters.
|
||||
auto m_cb_end = m_cb->cend();
|
||||
for (std::vector<wchar_t>::const_pointer c_rel = c->second.rel.data(), c_rel_end = c_rel + c->second.rel.size(), c_rel_next = c_rel_end; c_rel < c_rel_end; c_rel = c_rel_next) {
|
||||
c_rel_next = c_rel + wcsnlen(c_rel, c_rel_end - c_rel) + 1;
|
||||
if (m_cb->find(c_rel) != m_cb_end && c->first.compare(c_rel) != 0)
|
||||
rel.insert(rel.end(), c_rel, c_rel_next);
|
||||
}
|
||||
|
||||
// Add all characters that share enought keywords.
|
||||
for (size_type j = 0, j_end = m_cb->size(); j < j_end; j++) {
|
||||
if (i == j || rel.find((wchar_t)j) != wstring::npos)
|
||||
// Add all characters that share enough keywords.
|
||||
for (auto c2 = m_cb->cbegin(), c2_end = m_cb->cend(); c2 != c2_end; ++c2) {
|
||||
if (c == c2)
|
||||
continue;
|
||||
const auto &chr2 = *(m_cb->at(j).get());
|
||||
if (&chr2 == NULL)
|
||||
bool already_present = false;
|
||||
for (std::vector<wchar_t>::const_pointer c_rel = rel.data(), c_rel_end = c_rel + rel.size(), c_rel_next = c_rel_end; c_rel < c_rel_end; c_rel = c_rel_next) {
|
||||
c_rel_next = c_rel + wcsnlen(c_rel, c_rel_end - c_rel) + 1;
|
||||
if (c2->first.compare(c_rel) == 0) {
|
||||
already_present = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (already_present)
|
||||
continue;
|
||||
|
||||
set<wstring>::size_type comparisons = 0;
|
||||
matching.clear();
|
||||
for (auto term = chr.terms.cbegin(), term_end = chr.terms.cend(); term != term_end; ++term) {
|
||||
// Test for ignored word(s).
|
||||
if (m_cb->m_ignore.find(*term) != m_cb->m_ignore.cend())
|
||||
continue;
|
||||
for (auto term2 = chr2.terms.cbegin(), term2_end = chr2.terms.cend(); term2 != term2_end; ++term2) {
|
||||
// Test for ignored word(s).
|
||||
if (m_cb->m_ignore.find(*term2) != m_cb->m_ignore.cend())
|
||||
continue;
|
||||
for (auto term = c->second.terms_rel.cbegin(), term_end = c->second.terms_rel.cend(); term != term_end; ++term) {
|
||||
for (auto term2 = c2->second.terms_rel.cbegin(), term2_end = c2->second.terms_rel.cend(); term2 != term2_end; ++term2) {
|
||||
comparisons++;
|
||||
if (*term == *term2)
|
||||
matching.insert(*term);
|
||||
@@ -130,11 +113,11 @@ unsigned int ZRCola::DBSource::character_bank::build_related_worker::process()
|
||||
// If 1/2 terms match, assume related.
|
||||
auto hits = matching.size();
|
||||
if (hits*hits*2 >= comparisons)
|
||||
rel += chr2.chr;
|
||||
rel.insert(rel.end(), c2->first.data(), c2->first.data() + c2->first.length() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
chr.rel.assign(rel.c_str(), rel.length());
|
||||
c->second.rel.assign(rel.cbegin(), rel.cend());
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -197,7 +180,7 @@ void ZRCola::DBSource::character_desc_idx::parse_keywords(const wchar_t *str, se
|
||||
}
|
||||
|
||||
|
||||
void ZRCola::DBSource::character_desc_idx::add_keywords(const set<wstring> &terms, wchar_t chr, size_t sub)
|
||||
void ZRCola::DBSource::character_desc_idx::add_keywords(const set<wstring> &terms, const wstring &chr, size_t sub)
|
||||
{
|
||||
for (auto term = terms.cbegin(), term_end = terms.cend(); term != term_end; ++term) {
|
||||
if (sub) {
|
||||
@@ -250,12 +233,26 @@ void ZRCola::DBSource::character_desc_idx::save(ZRCola::textindex<wchar_t, wchar
|
||||
|
||||
ZRCola::DBSource::DBSource()
|
||||
{
|
||||
// Initialize ignore list.
|
||||
m_terms_ignore.insert(L"letter");
|
||||
m_terms_ignore.insert(L"modifier");
|
||||
m_terms_ignore.insert(L"symbol");
|
||||
m_terms_ignore.insert(L"accent");
|
||||
m_terms_ignore.insert(L"with");
|
||||
m_terms_ignore.insert(L"and");
|
||||
m_terms_ignore.insert(L"capital");
|
||||
m_terms_ignore.insert(L"small");
|
||||
m_terms_ignore.insert(L"combining");
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DBSource::~DBSource()
|
||||
{
|
||||
// Manually release all COM objects related to the database before we close the database.
|
||||
m_pTranslationSets1.free();
|
||||
m_comTranslationSets.free();
|
||||
m_pTranslation1.free();
|
||||
m_comTranslation.free();
|
||||
m_pCharacterGroup1.free();
|
||||
m_comCharacterGroup.free();
|
||||
|
||||
@@ -286,13 +283,16 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
|
||||
m_filename = filename;
|
||||
m_locale = _create_locale(LC_ALL, "Slovenian_Slovenia.1250");
|
||||
|
||||
wxASSERT_MSG(!m_comCharacterGroup, wxT("ADO command already created"));
|
||||
|
||||
// Create ADO command(s).
|
||||
wxASSERT_MSG(!m_comCharacterGroup, wxT("ADO command already created"));
|
||||
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comCharacterGroup)));
|
||||
wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_ActiveConnection(variant(m_db))));
|
||||
wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandType(adCmdText)));
|
||||
wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandText(bstr(L"SELECT [VRS_SkupineZnakov].[Znak], [VRS_SkupineZnakov].[pogost] FROM [VRS_SkupineZnakov] LEFT JOIN [VRS_CharList] ON [VRS_SkupineZnakov].[Znak]=[VRS_CharList].[znak] WHERE [VRS_CharList].[aktiven]=1 AND [VRS_SkupineZnakov].[Skupina]=? ORDER BY [VRS_SkupineZnakov].[Rang] ASC, [VRS_SkupineZnakov].[Znak] ASC"))));
|
||||
wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandText(bstr(L"SELECT [VRS_SkupineZnakov].[Znak], [VRS_SkupineZnakov].[pogost] "
|
||||
L"FROM [VRS_SkupineZnakov] "
|
||||
L"LEFT JOIN [VRS_CharList] ON [VRS_SkupineZnakov].[Znak]=[VRS_CharList].[znak] "
|
||||
L"WHERE [VRS_CharList].[aktiven]=1 AND [VRS_SkupineZnakov].[Skupina]=? "
|
||||
L"ORDER BY [VRS_SkupineZnakov].[Rang] ASC, [VRS_SkupineZnakov].[Znak] ASC"))));
|
||||
{
|
||||
// Create and add command parameters.
|
||||
com_obj<ADOParameters> params;
|
||||
@@ -302,6 +302,40 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
|
||||
wxVERIFY(SUCCEEDED(params->Append(m_pCharacterGroup1)));
|
||||
}
|
||||
|
||||
wxASSERT_MSG(!m_comTranslation, wxT("ADO command already created"));
|
||||
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comTranslation)));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslation->put_ActiveConnection(variant(m_db))));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslation->put_CommandType(adCmdText)));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslation->put_CommandText(bstr(L"SELECT [Komb1] AS [komb], [rang_komb1] AS [rang_komb], '' AS [Kano], 0 AS [Kanoniziraj], [Komb2] AS [znak], [rang_komb2] AS [rang_znak] "
|
||||
L"FROM [VRS_ScriptRepl2] "
|
||||
L"WHERE [Script]=? "
|
||||
L"ORDER BY [Komb2], [rang_komb2], [rang_komb1], [Komb1]"))));
|
||||
{
|
||||
// Create and add command parameters.
|
||||
com_obj<ADOParameters> params;
|
||||
wxVERIFY(SUCCEEDED(m_comTranslation->get_Parameters(¶ms)));
|
||||
wxASSERT_MSG(!m_pTranslation1, wxT("ADO command parameter already created"));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslation->CreateParameter(bstr(L"@Script"), adInteger, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslation1)));
|
||||
wxVERIFY(SUCCEEDED(params->Append(m_pTranslation1)));
|
||||
}
|
||||
|
||||
wxASSERT_MSG(!m_comTranslationSets, wxT("ADO command already created"));
|
||||
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comTranslationSets)));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslationSets->put_ActiveConnection(variant(m_db))));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandType(adCmdText)));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandText(bstr(L"SELECT [Script] "
|
||||
L"FROM [VRS_Script2SeqScr] "
|
||||
L"WHERE [ID]=? "
|
||||
L"ORDER BY [Rank] ASC"))));
|
||||
{
|
||||
// Create and add command parameters.
|
||||
com_obj<ADOParameters> params;
|
||||
wxVERIFY(SUCCEEDED(m_comTranslationSets->get_Parameters(¶ms)));
|
||||
wxASSERT_MSG(!m_pTranslationSets1, wxT("ADO command parameter already created"));
|
||||
wxVERIFY(SUCCEEDED(m_comTranslationSets->CreateParameter(bstr(L"@ID"), adInteger, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslationSets1)));
|
||||
wxVERIFY(SUCCEEDED(params->Append(m_pTranslationSets1)));
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0011: Could not open database (0x%x).\n"), (LPCTSTR)filename, hr);
|
||||
@@ -376,6 +410,23 @@ bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, int& val) const
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, string& val) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
|
||||
variant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
if (V_VT(&v) != VT_NULL) {
|
||||
wxCHECK(SUCCEEDED(v.change_type(VT_BSTR)), false);
|
||||
|
||||
WideCharToMultiByte(CP_ACP, 0, V_BSTR(&v), ::SysStringLen(V_BSTR(&v)), val, NULL, NULL);
|
||||
} else
|
||||
val.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, wstring& val) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
@@ -434,35 +485,73 @@ bool ZRCola::DBSource::GetUnicodeString(const com_obj<ADOField>& f, wstring& str
|
||||
|
||||
variant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
wxCHECK(SUCCEEDED(v.change_type(VT_BSTR)), false);
|
||||
|
||||
// Parse the field. Must be "xxxx+xxxx+xxxx..." sequence.
|
||||
str.clear();
|
||||
for (UINT i = 0, n = ::SysStringLen(V_BSTR(&v)); i < n && V_BSTR(&v)[i];) {
|
||||
// Parse Unicode code.
|
||||
UINT j = 0;
|
||||
wchar_t c = 0;
|
||||
for (; i < n && V_BSTR(&v)[i]; i++, j++) {
|
||||
if (L'0' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'9') c = c*0x10 + (V_BSTR(&v)[i] - L'0');
|
||||
else if (L'A' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'F') c = c*0x10 + (V_BSTR(&v)[i] - L'A' + 10);
|
||||
else if (L'a' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'f') c = c*0x10 + (V_BSTR(&v)[i] - L'a' + 10);
|
||||
else break;
|
||||
}
|
||||
if (j <= 0 || 4 < j) {
|
||||
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0020: Syntax error in \"%.*ls\" field (\"%.*ls\"). Unicode code must be one to four hexadecimal characters long.\n"), m_filename.c_str(), fieldname.length(), (BSTR)fieldname, n, V_BSTR(&v));
|
||||
return false;
|
||||
}
|
||||
str += c;
|
||||
if (V_VT(&v) != VT_NULL) {
|
||||
wxCHECK(SUCCEEDED(v.change_type(VT_BSTR)), false);
|
||||
|
||||
// Skip delimiter(s) and whitespace.
|
||||
for (; i < n && V_BSTR(&v)[i] && (V_BSTR(&v)[i] == L'+' || _iswspace_l(V_BSTR(&v)[i], m_locale)); i++);
|
||||
// Parse the field. Must be "xxxx+xxxx+xxxx..." sequence.
|
||||
for (UINT i = 0, n = ::SysStringLen(V_BSTR(&v)); i < n && V_BSTR(&v)[i];) {
|
||||
// Parse Unicode code.
|
||||
UINT j = 0;
|
||||
wchar_t c = 0;
|
||||
for (; i < n && V_BSTR(&v)[i]; i++, j++) {
|
||||
if (L'0' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'9') c = c*0x10 + (V_BSTR(&v)[i] - L'0');
|
||||
else if (L'A' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'F') c = c*0x10 + (V_BSTR(&v)[i] - L'A' + 10);
|
||||
else if (L'a' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'f') c = c*0x10 + (V_BSTR(&v)[i] - L'a' + 10);
|
||||
else break;
|
||||
}
|
||||
if (j <= 0 || 4 < j) {
|
||||
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0020: Syntax error in \"%.*ls\" field (\"%.*ls\"). Unicode code must be one to four hexadecimal characters long.\n"), m_filename.c_str(), fieldname.length(), (BSTR)fieldname, n, V_BSTR(&v));
|
||||
return false;
|
||||
}
|
||||
str += c;
|
||||
|
||||
// Skip delimiter(s) and whitespace.
|
||||
for (; i < n && V_BSTR(&v)[i] && (V_BSTR(&v)[i] == L'+' || _iswspace_l(V_BSTR(&v)[i], m_locale)); i++);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADOField>& f, normperm& np) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
|
||||
variant v;
|
||||
wxVERIFY(SUCCEEDED(f->get_Value(&v)));
|
||||
np.clear();
|
||||
if (V_VT(&v) != VT_NULL) {
|
||||
wxCHECK(SUCCEEDED(v.change_type(VT_BSTR)), false);
|
||||
|
||||
// Parse the field. Must be "nnnn,nnnn,nnnn..." sequence.
|
||||
for (UINT i = 0, n = ::SysStringLen(V_BSTR(&v)); i < n && V_BSTR(&v)[i];) {
|
||||
// Parse Unicode code.
|
||||
UINT j = 0;
|
||||
std::vector<size_t> p;
|
||||
for (; i < n && V_BSTR(&v)[i]; i++, j++) {
|
||||
if (L'0' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'9') p.push_back(V_BSTR(&v)[i] - L'0');
|
||||
else break;
|
||||
}
|
||||
if (j <= 0) {
|
||||
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0150: Syntax error in \"%.*ls\" field (\"%.*ls\"). Permutation sequence must be at least one decimal digit long.\n"), m_filename.c_str(), fieldname.length(), (BSTR)fieldname, n, V_BSTR(&v));
|
||||
return false;
|
||||
}
|
||||
np.insert(std::move(p));
|
||||
|
||||
// Skip delimiter(s) and whitespace.
|
||||
for (; i < n && V_BSTR(&v)[i] && (V_BSTR(&v)[i] == L',' || _iswspace_l(V_BSTR(&v)[i], m_locale)); i++);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetLanguage(const com_obj<ADOField>& f, ZRCola::langid_t& lang) const
|
||||
{
|
||||
wxASSERT_MSG(f, wxT("field is empty"));
|
||||
@@ -583,6 +672,59 @@ bool ZRCola::DBSource::GetTagNames(const winstd::com_obj<ADOField>& f, LCID lcid
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectNormPermSets(winstd::com_obj<ADORecordset>& rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
rs.free();
|
||||
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)), false);
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(variant(
|
||||
L"SELECT [oblika], [oblike] "
|
||||
L"FROM [VRS_CharCanoOblike] "
|
||||
L"ORDER BY [oblika], [oblike]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
{
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0160: Error loading normalization permutation sets from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADORecordset>& rs, std::string& norm, normperm& np) const
|
||||
{
|
||||
wxASSERT_MSG(rs, wxT("recordset is empty"));
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"oblika"), &f)));
|
||||
wxCHECK(GetValue(f, norm), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"oblike"), &f)));
|
||||
wxCHECK(GetNormPerm(f, np), false);
|
||||
}
|
||||
|
||||
// Verify all lengths match.
|
||||
size_t n = norm.length();
|
||||
for (auto p = np.cbegin(), p_end = np.cend(); p != p_end; ++p) {
|
||||
if (p->size() != n) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0170: Inconsistent normalization sequence \"%.*s\" permutation length. Please make sure all permutation lengths match normalization sequence length (%u).\n"), m_filename.c_str(), n, norm.c_str(), n);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectTranslations(com_obj<ADORecordset> &rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
@@ -591,12 +733,33 @@ bool ZRCola::DBSource::SelectTranslations(com_obj<ADORecordset> &rs) const
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(variant(
|
||||
L"SELECT [komb], [znak], [rang_znak] "
|
||||
L"SELECT [komb], [rang_komb], [Kano], [Kanoniziraj], [znak], [rang_znak] "
|
||||
L"FROM [VRS_ReplChar] "
|
||||
L"WHERE [rang_komb]=1 "
|
||||
L"ORDER BY [znak], [rang_znak], [komb]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
L"ORDER BY [znak], [rang_znak], [rang_komb], [komb]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
{
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0040: Error loading compositions from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0040: Error loading translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectTranslations(int set, winstd::com_obj<ADORecordset>& rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
rs.free();
|
||||
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)));
|
||||
wxVERIFY(SUCCEEDED(rs->put_CursorLocation(adUseClient)));
|
||||
wxVERIFY(SUCCEEDED(rs->put_CursorType(adOpenForwardOnly)));
|
||||
wxVERIFY(SUCCEEDED(rs->put_LockType(adLockReadOnly)));
|
||||
|
||||
// Open it.
|
||||
wxVERIFY(SUCCEEDED(m_pTranslation1->put_Value(variant(set))));
|
||||
if (FAILED(rs->Open(variant(m_comTranslation), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0100: Error loading translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
@@ -615,19 +778,165 @@ bool ZRCola::DBSource::GetTranslation(const com_obj<ADORecordset>& rs, ZRCola::D
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"komb"), &f)));
|
||||
wxCHECK(GetUnicodeString(f, t.decomp.str), false);
|
||||
wxCHECK(GetUnicodeString(f, t.src.str), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, t.chr), false);
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"rang_komb"), &f)));
|
||||
wxCHECK(GetValue(f, t.src.rank), false);
|
||||
}
|
||||
|
||||
{
|
||||
bool norm;
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Kanoniziraj"), &f)));
|
||||
wxCHECK(GetValue(f, norm), false);
|
||||
if (norm) {
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Kano"), &f)));
|
||||
wxCHECK(GetValue(f, t.norm), false);
|
||||
} else
|
||||
t.norm.clear();
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"rang_znak"), &f)));
|
||||
wxCHECK(GetValue(f, t.decomp.rank), false);
|
||||
wxCHECK(GetValue(f, t.dst.rank), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak"), &f)));
|
||||
wxCHECK(GetUnicodeString(f, t.dst.str), false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectTranlationSets(com_obj<ADORecordset> &rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
rs.free();
|
||||
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)), false);
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(variant(
|
||||
L"SELECT DISTINCT [entCode], [Src_En], [Dst_En] "
|
||||
L"FROM [VRS_Script2] "
|
||||
L"ORDER BY [entCode], [Src_En], [Dst_En]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
{
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0060: Error loading translation sets from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetTranslationSet(const com_obj<ADORecordset>& rs, ZRCola::DBSource::transet& ts) const
|
||||
{
|
||||
wxASSERT_MSG(rs, wxT("recordset is empty"));
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"entCode"), &f)));
|
||||
wxCHECK(GetValue(f, ts.set), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Src_En"), &f)));
|
||||
wxCHECK(GetValue(f, ts.src), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Dst_En"), &f)));
|
||||
wxCHECK(GetValue(f, ts.dst), false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectTranlationSeqs(com_obj<ADORecordset> &rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
rs.free();
|
||||
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)), false);
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(variant(
|
||||
L"SELECT DISTINCT [ID], [Descr], [Rank] "
|
||||
L"FROM [VRS_Script2Seq] "
|
||||
L"ORDER BY [Rank], [Descr]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
{
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0060: Error loading translation sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetTranslationSeq(const com_obj<ADORecordset>& rs, ZRCola::DBSource::transeq& ts) const
|
||||
{
|
||||
wxASSERT_MSG(rs, wxT("recordset is empty"));
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"ID"), &f)));
|
||||
wxCHECK(GetValue(f, ts.seq), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Rank"), &f)));
|
||||
wxCHECK(GetValue(f, ts.rank), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Descr"), &f)));
|
||||
wxCHECK(GetValue(f, ts.name), false);
|
||||
}
|
||||
|
||||
// Read translation sequence sets from database.
|
||||
wxVERIFY(SUCCEEDED(m_pTranslationSets1->put_Value(variant(ts.seq))));
|
||||
com_obj<ADORecordset> rs_chars;
|
||||
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs_chars)));
|
||||
wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient)));
|
||||
wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly)));
|
||||
wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly)));
|
||||
if (FAILED(rs_chars->Open(variant(m_comTranslationSets), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0140: Error loading character group characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
ts.sets.clear();
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs_chars->get_Fields(&flds)));
|
||||
com_obj<ADOField> f_set;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Script"), &f_set)));
|
||||
size_t n = 0;
|
||||
for (VARIANT_BOOL eof = VARIANT_TRUE; SUCCEEDED(rs_chars->get_EOF(&eof)) && !eof; rs_chars->MoveNext(), n++) {
|
||||
int set;
|
||||
wxCHECK(GetValue(f_set, set), false);
|
||||
ts.sets.push_back(set);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -665,7 +974,7 @@ bool ZRCola::DBSource::GetKeySequence(const com_obj<ADORecordset>& rs, ZRCola::D
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Znak"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, ks.chr), false);
|
||||
wxCHECK(GetUnicodeString(f, ks.chr), false);
|
||||
}
|
||||
|
||||
int modifiers;
|
||||
@@ -753,7 +1062,7 @@ bool ZRCola::DBSource::GetLanguage(const com_obj<ADORecordset>& rs, ZRCola::DBSo
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"entCode"), &f)));
|
||||
wxCHECK(GetLanguage(f, lang.id), false);
|
||||
wxCHECK(GetLanguage(f, lang.lang), false);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -797,7 +1106,7 @@ bool ZRCola::DBSource::GetLanguageCharacter(const com_obj<ADORecordset>& rs, ZRC
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, lc.chr), false);
|
||||
wxCHECK(GetUnicodeString(f, lc.chr), false);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -837,18 +1146,18 @@ bool ZRCola::DBSource::GetCharacterGroup(const com_obj<ADORecordset>& rs, chrgrp
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
wstring id;
|
||||
wstring grp;
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"id"), &f)));
|
||||
wxCHECK(GetValue(f, cg.id), false);
|
||||
wxCHECK(GetValue(f, cg.grp), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Skupina"), &f)));
|
||||
wxCHECK(GetValue(f, id), false);
|
||||
wxCHECK(GetValue(f, grp), false);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -864,14 +1173,14 @@ bool ZRCola::DBSource::GetCharacterGroup(const com_obj<ADORecordset>& rs, chrgrp
|
||||
}
|
||||
|
||||
// Read character list from database.
|
||||
wxVERIFY(SUCCEEDED(m_pCharacterGroup1->put_Value(variant(id.c_str()))));
|
||||
wxVERIFY(SUCCEEDED(m_pCharacterGroup1->put_Value(variant(grp.c_str()))));
|
||||
com_obj<ADORecordset> rs_chars;
|
||||
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs_chars)));
|
||||
wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient)));
|
||||
wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly)));
|
||||
wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly)));
|
||||
if (FAILED(rs_chars->Open(variant(m_comCharacterGroup), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0100: Error loading character group characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0140: Error loading character group characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
@@ -884,11 +1193,11 @@ bool ZRCola::DBSource::GetCharacterGroup(const com_obj<ADORecordset>& rs, chrgrp
|
||||
com_obj<ADOField> f_char, f_show;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Znak" ), &f_char)));
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"pogost"), &f_show)));
|
||||
for (VARIANT_BOOL eof = VARIANT_TRUE; SUCCEEDED(rs_chars->get_EOF(&eof)) && !eof; rs_chars->MoveNext()) {
|
||||
wchar_t c;
|
||||
wxCHECK(GetUnicodeCharacter(f_char, c), false);
|
||||
size_t n = cg.chars.length();
|
||||
cg.chars += c;
|
||||
size_t n = 0;
|
||||
for (VARIANT_BOOL eof = VARIANT_TRUE; SUCCEEDED(rs_chars->get_EOF(&eof)) && !eof; rs_chars->MoveNext(), n++) {
|
||||
wstring c;
|
||||
wxCHECK(GetUnicodeString(f_char, c), false);
|
||||
cg.chars.insert(cg.chars.end(), c.data(), c.data() + c.length() + 1);
|
||||
bool show;
|
||||
wxCHECK(GetValue(f_show, show), false);
|
||||
if ((n % 16) == 0)
|
||||
@@ -932,42 +1241,49 @@ bool ZRCola::DBSource::GetCharacter(const com_obj<ADORecordset>& rs, character&
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
wchar_t c;
|
||||
chr.rel.clear();
|
||||
wstring c;
|
||||
chr.second.terms.clear();
|
||||
chr.second.terms_rel.clear();
|
||||
chr.second.rel.clear();
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, chr.chr), false);
|
||||
wxCHECK(GetUnicodeString(f, chr.first), false);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak_v"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, c), false);
|
||||
if (c && c != chr.chr)
|
||||
chr.rel += c;
|
||||
wxCHECK(GetUnicodeString(f, c), false);
|
||||
if (!c.empty() && c != chr.first)
|
||||
chr.second.rel.insert(chr.second.rel.end(), c.data(), c.data() + c.length() + 1);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak_m"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, c), false);
|
||||
if (c && c != chr.chr)
|
||||
chr.rel += c;
|
||||
wxCHECK(GetUnicodeString(f, c), false);
|
||||
if (!c.empty() && c != chr.first)
|
||||
chr.second.rel.insert(chr.second.rel.end(), c.data(), c.data() + c.length() + 1);
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"opis_en"), &f)));
|
||||
wxCHECK(GetValue(f, chr.desc), false);
|
||||
wxCHECK(GetValue(f, chr.second.desc), false);
|
||||
ZRCola::DBSource::character_desc_idx::parse_keywords(chr.second.desc.c_str(), chr.second.terms);
|
||||
for (auto term = chr.second.terms.cbegin(), term_end = chr.second.terms.cend(); term != term_end; ++term) {
|
||||
if (m_terms_ignore.find(*term) != m_terms_ignore.cend())
|
||||
continue;
|
||||
chr.second.terms_rel.insert(*term);
|
||||
}
|
||||
}
|
||||
ZRCola::DBSource::character_desc_idx::parse_keywords(chr.desc.c_str(), chr.terms);
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"kat"), &f)));
|
||||
wxCHECK(GetChrCat(f, chr.cat), false);
|
||||
wxCHECK(GetChrCat(f, chr.second.cat), false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1002,12 +1318,11 @@ bool ZRCola::DBSource::GetCharacterCategory(const com_obj<ADORecordset>& rs, chr
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
wstring id;
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"kat"), &f)));
|
||||
wxCHECK(GetChrCat(f, cc.id), false);
|
||||
wxCHECK(GetChrCat(f, cc.cat), false);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1053,12 +1368,11 @@ bool ZRCola::DBSource::GetCharacterTag(const winstd::com_obj<ADORecordset>& rs,
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
wstring id;
|
||||
|
||||
{
|
||||
com_obj<ADOField> f;
|
||||
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak"), &f)));
|
||||
wxCHECK(GetUnicodeCharacter(f, ct.chr), false);
|
||||
wxCHECK(GetUnicodeString(f, ct.chr), false);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -1098,7 +1412,6 @@ bool ZRCola::DBSource::GetTagName(const winstd::com_obj<ADORecordset>& rs, tagna
|
||||
|
||||
com_obj<ADOFields> flds;
|
||||
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
|
||||
wstring id;
|
||||
tn.names.clear();
|
||||
|
||||
{
|
||||
|
||||
@@ -21,10 +21,18 @@
|
||||
|
||||
#include <zrcola/character.h>
|
||||
#include <zrcola/common.h>
|
||||
#include <zrcola/language.h>
|
||||
#include <zrcola/tag.h>
|
||||
#include <zrcola/translate.h>
|
||||
|
||||
#include <zrcolaui/chargroup.h>
|
||||
#include <zrcolaui/keyboard.h>
|
||||
|
||||
#include <WinStd/COM.h>
|
||||
#include <WinStd/Win.h>
|
||||
|
||||
#include <wx/debug.h>
|
||||
|
||||
#include <adoint.h>
|
||||
#include <list>
|
||||
#include <map>
|
||||
@@ -59,18 +67,50 @@ namespace ZRCola {
|
||||
{
|
||||
}
|
||||
|
||||
///
|
||||
/// Functor to compare two sequences by `rank`, and `str` members respectively
|
||||
///
|
||||
struct less_rank_str {
|
||||
inline bool operator()(_In_ const charseq& a, _In_ const charseq& b) const
|
||||
{
|
||||
if (a.rank < b.rank) return true;
|
||||
else if (a.rank > b.rank) return false;
|
||||
else if (a.str < b.str ) return true;
|
||||
else return false;
|
||||
}
|
||||
};
|
||||
inline charseq(_In_ int _rank, _In_ const std::wstring &_str) :
|
||||
rank(_rank),
|
||||
str (_str)
|
||||
{
|
||||
}
|
||||
|
||||
inline charseq(_In_ int _rank, _Inout_ std::wstring &&_str) :
|
||||
rank(_rank),
|
||||
str (std::move(_str))
|
||||
{
|
||||
}
|
||||
|
||||
inline bool operator==(_In_ const charseq &other) const
|
||||
{
|
||||
return rank == other.rank && str == other.str;
|
||||
}
|
||||
|
||||
inline bool operator!=(_In_ const charseq &other) const
|
||||
{
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
inline bool operator<(_In_ const charseq &other) const
|
||||
{
|
||||
if (rank < other.rank) return true;
|
||||
else if (rank > other.rank) return false;
|
||||
else if (str < other.str ) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
inline bool operator<=(_In_ const charseq &other) const
|
||||
{
|
||||
return !operator>(other);
|
||||
}
|
||||
|
||||
inline bool operator>(_In_ const charseq &other) const
|
||||
{
|
||||
return other.operator<(*this);
|
||||
}
|
||||
|
||||
inline bool operator>=(_In_ const charseq &other) const
|
||||
{
|
||||
return !operator<(other);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -79,11 +119,42 @@ namespace ZRCola {
|
||||
///
|
||||
class translation {
|
||||
public:
|
||||
wchar_t chr; ///< Composed character
|
||||
charseq decomp; ///< Decomposed sequence
|
||||
int set; ///< Translation set ID
|
||||
charseq src; ///< Source sequence
|
||||
std::string norm; ///< Normalization footprint
|
||||
charseq dst; ///< Destination sequence
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Translation set
|
||||
///
|
||||
class transet {
|
||||
public:
|
||||
int set; ///< ID
|
||||
std::wstring src; ///< Source name
|
||||
std::wstring dst; ///< Destination name
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Translation sequence
|
||||
///
|
||||
class transeq {
|
||||
public:
|
||||
int seq; ///< ID
|
||||
int rank; ///< Rank
|
||||
std::wstring name; ///< Name
|
||||
std::vector<int> sets; ///< Sets
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Normalization permutation set
|
||||
///
|
||||
typedef std::set<std::vector<size_t> > normperm;
|
||||
|
||||
|
||||
///
|
||||
/// Key sequence
|
||||
///
|
||||
@@ -114,7 +185,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
public:
|
||||
wchar_t chr; ///< Character
|
||||
std::wstring chr; ///< Character
|
||||
std::vector<keycode> seq; ///< Key sequence
|
||||
};
|
||||
|
||||
@@ -124,8 +195,8 @@ namespace ZRCola {
|
||||
///
|
||||
class language {
|
||||
public:
|
||||
ZRCola::langid_t id; ///< Language ID
|
||||
std::wstring name; ///< Language name
|
||||
ZRCola::langid_t lang; ///< Language ID
|
||||
std::wstring name; ///< Name
|
||||
};
|
||||
|
||||
|
||||
@@ -134,7 +205,7 @@ namespace ZRCola {
|
||||
///
|
||||
class langchar {
|
||||
public:
|
||||
wchar_t chr; ///> Character
|
||||
std::wstring chr; ///> Character
|
||||
ZRCola::langid_t lang; ///< Language ID
|
||||
};
|
||||
|
||||
@@ -144,72 +215,61 @@ namespace ZRCola {
|
||||
///
|
||||
class chrgrp {
|
||||
public:
|
||||
int id; ///< Character group ID
|
||||
int rank; ///< Character group rank
|
||||
std::wstring name; ///< Character group name
|
||||
std::wstring chars; ///< Character group characters
|
||||
std::vector<unsigned __int16> show; ///< Bit vector if particular character is displayed initially
|
||||
int grp; ///< Character group ID
|
||||
int rank; ///< Rank
|
||||
std::wstring name; ///< Name
|
||||
std::vector<wchar_t> chars; ///< Characters (zero-delimited)
|
||||
std::vector<unsigned __int16> show; ///< Bit vector if particular character from \c chars is displayed initially
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Character data
|
||||
///
|
||||
class character_data {
|
||||
public:
|
||||
inline character_data()
|
||||
{
|
||||
cat.data[0] = 0;
|
||||
cat.data[1] = 0;
|
||||
}
|
||||
|
||||
inline character_data(_In_ const character_data &othr) :
|
||||
cat (othr.cat),
|
||||
desc (othr.desc),
|
||||
terms (othr.terms),
|
||||
terms_rel(othr.terms_rel),
|
||||
rel (othr.rel)
|
||||
{
|
||||
}
|
||||
|
||||
ZRCola::chrcatid_t cat; ///< Category ID
|
||||
std::wstring desc; ///< Character description
|
||||
std::set<std::wstring> terms; ///< Search terms
|
||||
std::set<std::wstring> terms_rel; ///< Relevant terms for relating characters
|
||||
std::vector<wchar_t> rel; ///< Related characters (zero-delimited)
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Character
|
||||
///
|
||||
class character {
|
||||
public:
|
||||
inline character()
|
||||
{
|
||||
chr = 0;
|
||||
cat.data[0] = 0;
|
||||
cat.data[1] = 0;
|
||||
}
|
||||
|
||||
inline character(_In_ const character &othr) :
|
||||
chr (othr.chr),
|
||||
cat (othr.cat),
|
||||
desc (othr.desc),
|
||||
terms(othr.terms),
|
||||
rel (othr.rel)
|
||||
{
|
||||
}
|
||||
|
||||
inline bool operator==(_In_ const character &othr) const
|
||||
{
|
||||
return
|
||||
chr == othr.chr &&
|
||||
cat == othr.cat &&
|
||||
desc == othr.desc &&
|
||||
terms == othr.terms &&
|
||||
rel == othr.rel;
|
||||
}
|
||||
|
||||
inline bool operator!=(_In_ const character &othr) const
|
||||
{
|
||||
return !operator==(othr);
|
||||
}
|
||||
|
||||
wchar_t chr; ///< Character
|
||||
ZRCola::chrcatid_t cat; ///< Category ID
|
||||
std::wstring desc; ///< Character description
|
||||
std::set<std::wstring> terms; ///< Search terms
|
||||
std::wstring rel; ///< Related characters
|
||||
};
|
||||
typedef std::pair<std::wstring, character_data> character;
|
||||
|
||||
|
||||
///
|
||||
/// Character bank
|
||||
///
|
||||
class character_bank : public std::vector<std::unique_ptr<character> >
|
||||
class character_bank : public std::map<std::wstring, character_data>
|
||||
{
|
||||
public:
|
||||
character_bank();
|
||||
void build_related();
|
||||
|
||||
protected:
|
||||
class build_related_worker : public winstd::win_handle
|
||||
{
|
||||
public:
|
||||
build_related_worker(_In_ const character_bank *cb, _In_ size_type from, _In_ size_type to);
|
||||
build_related_worker(_In_ const character_bank *cb, _In_ iterator from, _In_ iterator to);
|
||||
|
||||
inline void join()
|
||||
{
|
||||
@@ -230,12 +290,9 @@ namespace ZRCola {
|
||||
|
||||
protected:
|
||||
const character_bank *m_cb;
|
||||
size_type m_from, m_to;
|
||||
iterator m_from, m_to;
|
||||
winstd::heap m_heap;
|
||||
};
|
||||
|
||||
protected:
|
||||
std::set<std::wstring> m_ignore;
|
||||
};
|
||||
|
||||
|
||||
@@ -266,8 +323,8 @@ namespace ZRCola {
|
||||
{
|
||||
public:
|
||||
static void parse_keywords(const wchar_t *str, std::set<std::wstring> &terms);
|
||||
void add_keywords(const std::set<std::wstring> &terms, wchar_t chr, size_t sub = 0);
|
||||
inline void add_keywords(const wchar_t *str, wchar_t chr, size_t sub = 0)
|
||||
void add_keywords(const std::set<std::wstring> &terms, const std::wstring &chr, size_t sub = 0);
|
||||
inline void add_keywords(const wchar_t *str, const std::wstring &chr, size_t sub = 0)
|
||||
{
|
||||
std::set<std::wstring> terms;
|
||||
parse_keywords(str, terms);
|
||||
@@ -277,21 +334,21 @@ namespace ZRCola {
|
||||
void save(ZRCola::textindex<wchar_t, wchar_t, unsigned __int32> &idx) const;
|
||||
|
||||
protected:
|
||||
inline void add_keyword(const std::wstring &term, wchar_t chr)
|
||||
inline void add_keyword(const std::wstring &term, const std::wstring &chr)
|
||||
{
|
||||
iterator idx = find(term);
|
||||
if (idx == end()) {
|
||||
// New keyword.
|
||||
insert(std::make_pair(term, std::vector<wchar_t>(1, chr)));
|
||||
insert(std::make_pair(term, mapped_type(chr.data(), chr.data() + chr.length() + 1)));
|
||||
} else {
|
||||
// Append to existing keyword.
|
||||
std::vector<wchar_t> &val = idx->second;
|
||||
for (auto i = val.cbegin(), i_end = val.cend(); ; ++i) {
|
||||
if (i == i_end) {
|
||||
auto &val = idx->second;
|
||||
for (mapped_type::size_type i = 0, n = val.size(); ; i += wcsnlen(val.data() + i, n - i) + 1) {
|
||||
if (i >= n) {
|
||||
// End-of-values reached. Append character.
|
||||
val.push_back(chr);
|
||||
val.insert(val.end(), chr.data(), chr.data() + chr.length() + 1);
|
||||
break;
|
||||
} else if (*i == chr) {
|
||||
} else if (chr.compare(val.data() + i) == 0) {
|
||||
// Character already among the values.
|
||||
break;
|
||||
}
|
||||
@@ -306,9 +363,9 @@ namespace ZRCola {
|
||||
///
|
||||
class chrcat {
|
||||
public:
|
||||
ZRCola::chrcatid_t id; ///> Category ID
|
||||
int rank; ///< Character category rank
|
||||
std::wstring name; ///< Character category name
|
||||
ZRCola::chrcatid_t cat; ///> Category ID
|
||||
int rank; ///< Rank
|
||||
std::wstring name; ///< Name
|
||||
};
|
||||
|
||||
|
||||
@@ -317,7 +374,7 @@ namespace ZRCola {
|
||||
///
|
||||
class chrtag {
|
||||
public:
|
||||
wchar_t chr; ///> Character
|
||||
std::wstring chr; ///> Character
|
||||
int tag; ///< Tag ID
|
||||
};
|
||||
|
||||
@@ -416,6 +473,18 @@ namespace ZRCola {
|
||||
///
|
||||
bool GetValue(const winstd::com_obj<ADOField>& f, int& val) const;
|
||||
|
||||
///
|
||||
/// Gets string from ZRCola.zrc database
|
||||
///
|
||||
/// \param[in] f Data field
|
||||
/// \param[out] val Output string value
|
||||
///
|
||||
/// \returns
|
||||
/// - true when successful
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetValue(const winstd::com_obj<ADOField>& f, std::string& val) const;
|
||||
|
||||
///
|
||||
/// Gets string from ZRCola.zrc database
|
||||
///
|
||||
@@ -452,6 +521,18 @@ namespace ZRCola {
|
||||
///
|
||||
bool GetUnicodeString(const winstd::com_obj<ADOField>& f, std::wstring& str) const;
|
||||
|
||||
///
|
||||
/// Gets encoded normalization permutations from ZRCola.zrc database
|
||||
///
|
||||
/// \param[in] f Data field
|
||||
/// \param[out] str Output normalization permutation set
|
||||
///
|
||||
/// \returns
|
||||
/// - true when successful
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetNormPerm(const winstd::com_obj<ADOField>& f, normperm& np) const;
|
||||
|
||||
///
|
||||
/// Gets language ID from ZRCola.zrc database
|
||||
///
|
||||
@@ -488,6 +569,29 @@ namespace ZRCola {
|
||||
///
|
||||
bool GetTagNames(const winstd::com_obj<ADOField>& f, LCID lcid, std::list<std::wstring>& names) const;
|
||||
|
||||
///
|
||||
/// Returns normalization permutation sets
|
||||
///
|
||||
/// \param[out] rs Recordset with results
|
||||
///
|
||||
/// \returns
|
||||
/// - true when query succeeds
|
||||
/// - false otherwise
|
||||
///
|
||||
bool SelectNormPermSets(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns normalization permutation set
|
||||
///
|
||||
/// \param[in] rs Recordset with results
|
||||
/// \param[out] np Normalization permutation set
|
||||
///
|
||||
/// \returns
|
||||
/// - true when succeeded
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetNormPerm(const winstd::com_obj<ADORecordset>& rs, std::string& norm, normperm& np) const;
|
||||
|
||||
///
|
||||
/// Returns character translations
|
||||
///
|
||||
@@ -499,6 +603,18 @@ namespace ZRCola {
|
||||
///
|
||||
bool SelectTranslations(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns character translations by set
|
||||
///
|
||||
/// \param[in ] set Translation set ID
|
||||
/// \param[out] rs Recordset with results
|
||||
///
|
||||
/// \returns
|
||||
/// - true when query succeeds
|
||||
/// - false otherwise
|
||||
///
|
||||
bool SelectTranslations(int set, winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns translation data
|
||||
///
|
||||
@@ -511,6 +627,52 @@ namespace ZRCola {
|
||||
///
|
||||
bool GetTranslation(const winstd::com_obj<ADORecordset>& rs, translation& t) const;
|
||||
|
||||
///
|
||||
/// Returns translation sets
|
||||
///
|
||||
/// \param[out] rs Recordset with results
|
||||
///
|
||||
/// \returns
|
||||
/// - true when query succeeds
|
||||
/// - false otherwise
|
||||
///
|
||||
bool SelectTranlationSets(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns translation set data
|
||||
///
|
||||
/// \param[in] rs Recordset with results
|
||||
/// \param[out] lang Language
|
||||
///
|
||||
/// \returns
|
||||
/// - true when succeeded
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetTranslationSet(const winstd::com_obj<ADORecordset>& rs, transet& ts) const;
|
||||
|
||||
///
|
||||
/// Returns translation sequences
|
||||
///
|
||||
/// \param[out] rs Recordset with results
|
||||
///
|
||||
/// \returns
|
||||
/// - true when query succeeds
|
||||
/// - false otherwise
|
||||
///
|
||||
bool SelectTranlationSeqs(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns translation sequence data
|
||||
///
|
||||
/// \param[in] rs Recordset with results
|
||||
/// \param[out] lang Language
|
||||
///
|
||||
/// \returns
|
||||
/// - true when succeeded
|
||||
/// - false otherwise
|
||||
///
|
||||
bool GetTranslationSeq(const winstd::com_obj<ADORecordset>& rs, transeq& ts) const;
|
||||
|
||||
///
|
||||
/// Returns key sequences
|
||||
///
|
||||
@@ -697,10 +859,237 @@ namespace ZRCola {
|
||||
|
||||
protected:
|
||||
std::basic_string<TCHAR> m_filename; ///< Database filename
|
||||
winstd::com_obj<ADOConnection> m_db; ///< Database
|
||||
winstd::com_obj<ADOConnection> m_db; ///< Database
|
||||
_locale_t m_locale; ///< Database locale
|
||||
|
||||
winstd::com_obj<ADOCommand> m_comCharacterGroup; ///< ADO Command for GetCharacterGroup subquery
|
||||
winstd::com_obj<ADOParameter> m_pCharacterGroup1; ///< \c m_comCharacterGroup parameter
|
||||
winstd::com_obj<ADOCommand> m_comCharacterGroup; ///< ADO Command for GetCharacterGroup subquery
|
||||
winstd::com_obj<ADOParameter> m_pCharacterGroup1; ///< \c m_comCharacterGroup parameter
|
||||
|
||||
winstd::com_obj<ADOCommand> m_comTranslation; ///< ADO Command for SelectTranslations subquery
|
||||
winstd::com_obj<ADOParameter> m_pTranslation1; ///< \c m_comTranslations parameter
|
||||
|
||||
winstd::com_obj<ADOCommand> m_comTranslationSets; ///< ADO Command for GetTranslationSeq subquery
|
||||
winstd::com_obj<ADOParameter> m_pTranslationSets1; ///< \c m_comTranslationSets parameter
|
||||
|
||||
std::set<std::wstring> m_terms_ignore; ///< Terms to ignore when comparing characters
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
inline ZRCola::translation_db& operator<<(_Inout_ ZRCola::translation_db &db, _In_ const ZRCola::DBSource::translation &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.set && rec.set <= (int)0x00007fff, wxT("translation set id out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.set);
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.dst.rank && rec.dst.rank <= (int)0x00007fff, wxT("destination character rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.dst.rank);
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.src.rank && rec.src.rank <= (int)0x00007fff, wxT("source character rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.src.rank);
|
||||
std::wstring::size_type n = rec.dst.str.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("destination overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.src.str.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("source overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.dst.str.cbegin(), rec.dst.str.cend());
|
||||
db.data.insert(db.data.end(), rec.src.str.cbegin(), rec.src.str.cend());
|
||||
db.idxSrc.push_back(idx);
|
||||
db.idxDst.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::transet_db& operator<<(_Inout_ ZRCola::transet_db &db, _In_ const ZRCola::DBSource::transet &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.set && rec.set <= (int)0x00007fff, wxT("translation set id out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.set);
|
||||
std::wstring::size_type n = rec.src.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("translation set source name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.dst.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("translation set destination name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.src.cbegin(), rec.src.cend());
|
||||
db.data.insert(db.data.end(), rec.dst.cbegin(), rec.dst.cend());
|
||||
db.idxTranSet.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::transeq_db& operator<<(_Inout_ ZRCola::transeq_db &db, _In_ const ZRCola::DBSource::transeq &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.seq && rec.seq <= (int)0x00007fff, wxT("translation sequence id out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.seq);
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.rank && rec.rank <= (int)0x00007fff, wxT("translation rank id out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.rank);
|
||||
std::wstring::size_type n = rec.name.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("translation sequence name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.sets.size();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("translation sequence sets overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend());
|
||||
db.data.insert(db.data.end(), rec.sets.cbegin(), rec.sets.cend());
|
||||
db.idxTranSeq.push_back(idx);
|
||||
db.idxRank .push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::keyseq_db& operator<<(_Inout_ ZRCola::keyseq_db &db, _In_ const ZRCola::DBSource::keyseq &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
std::wstring::size_type n = rec.chr.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.seq.size() * sizeof(ZRCola::keyseq_db::keyseq::key_t) / sizeof(wchar_t);
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("key sequence overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend());
|
||||
for (auto kc = rec.seq.cbegin(), kc_end = rec.seq.cend(); kc != kc_end; ++kc) {
|
||||
db.data.push_back(kc->key);
|
||||
db.data.push_back(
|
||||
(kc->shift ? ZRCola::keyseq_db::keyseq::SHIFT : 0) |
|
||||
(kc->ctrl ? ZRCola::keyseq_db::keyseq::CTRL : 0) |
|
||||
(kc->alt ? ZRCola::keyseq_db::keyseq::ALT : 0));
|
||||
}
|
||||
db.idxChr.push_back(idx);
|
||||
db.idxKey.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::language_db& operator<<(_Inout_ ZRCola::language_db &db, _In_ const ZRCola::DBSource::language &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.insert(db.data.end(), reinterpret_cast<const unsigned __int16*>(&rec.lang), reinterpret_cast<const unsigned __int16*>(&rec.lang + 1));
|
||||
std::wstring::size_type n = rec.name.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("language name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend());
|
||||
db.idxLang.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::langchar_db& operator<<(_Inout_ ZRCola::langchar_db &db, _In_ const ZRCola::DBSource::langchar &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.insert(db.data.end(), reinterpret_cast<const unsigned __int16*>(&rec.lang), reinterpret_cast<const unsigned __int16*>(&rec.lang + 1));
|
||||
std::wstring::size_type n = rec.chr.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend());
|
||||
db.idxChr .push_back(idx);
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
db.idxLang.push_back(idx);
|
||||
#endif
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::chrgrp_db& operator<<(_Inout_ ZRCola::chrgrp_db &db, _In_ const ZRCola::DBSource::chrgrp &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.grp && rec.grp <= (int)0x00007fff, wxT("character group ID out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.grp);
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.rank && rec.rank <= (int)0x00007fff, wxT("character group rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.rank);
|
||||
std::wstring::size_type n = rec.name.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character group name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.chars.size();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character group characters overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.name .cbegin(), rec.name .cend());
|
||||
db.data.insert(db.data.end(), rec.chars.cbegin(), rec.chars.cend());
|
||||
db.data.insert(db.data.end(), rec.show .cbegin(), rec.show .cend());
|
||||
db.idxRank.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::character_db& operator<<(_Inout_ ZRCola::character_db &db, _In_ const ZRCola::DBSource::character &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.insert(db.data.end(), reinterpret_cast<const unsigned __int16*>(&rec.second.cat), reinterpret_cast<const unsigned __int16*>(&rec.second.cat + 1));
|
||||
std::wstring::size_type n = rec.first.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.second.desc.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character description overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
n += rec.second.rel.size();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("related characters overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.first .cbegin(), rec.first .cend());
|
||||
db.data.insert(db.data.end(), rec.second.desc.cbegin(), rec.second.desc.cend());
|
||||
db.data.insert(db.data.end(), rec.second.rel .cbegin(), rec.second.rel .cend());
|
||||
db.idxChr.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::chrcat_db& operator<<(_Inout_ ZRCola::chrcat_db &db, _In_ const ZRCola::DBSource::chrcat &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.insert(db.data.end(), reinterpret_cast<const unsigned __int16*>(&rec.cat), reinterpret_cast<const unsigned __int16*>(&rec.cat + 1));
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.rank && rec.rank <= (int)0x00007fff, wxT("character category rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.rank);
|
||||
std::wstring::size_type n = rec.name.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character category name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend());
|
||||
db.idxChrCat.push_back(idx);
|
||||
db.idxRank .push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::chrtag_db& operator<<(_Inout_ ZRCola::chrtag_db &db, _In_ const ZRCola::DBSource::chrtag &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.tag && rec.tag <= (int)0x00007fff, wxT("tag out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.tag);
|
||||
std::wstring::size_type n = rec.chr.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend());
|
||||
db.idxChr.push_back(idx);
|
||||
db.idxTag.push_back(idx);
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
inline ZRCola::tagname_db& operator<<(_Inout_ ZRCola::tagname_db &db, _In_ const ZRCola::DBSource::tagname &rec)
|
||||
{
|
||||
for (auto ln = rec.names.cbegin(), ln_end = rec.names.cend(); ln != ln_end; ++ln) {
|
||||
for (auto nm = ln->second.cbegin(), nm_end = ln->second.cend(); nm != nm_end; ++nm) {
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.tag && rec.tag <= (int)0x00007fff, wxT("tag out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.tag);
|
||||
db.data.push_back(LOWORD(ln->first));
|
||||
db.data.push_back(HIWORD(ln->first));
|
||||
std::wstring::size_type n = nm->length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("tag name overflow"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
db.data.insert(db.data.end(), nm->cbegin(), nm->cend());
|
||||
db.idxName.push_back(idx);
|
||||
db.idxTag .push_back(idx);
|
||||
}
|
||||
}
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
@@ -24,49 +24,198 @@ using namespace stdex;
|
||||
using namespace winstd;
|
||||
|
||||
|
||||
typedef map<wchar_t, set<ZRCola::DBSource::charseq, ZRCola::DBSource::charseq::less_rank_str> > translation_db;
|
||||
|
||||
|
||||
static set<wstring> decompose(_In_ const translation_db &db, _In_z_ const wchar_t *str, _Inout_ set<wchar_t> &path)
|
||||
///
|
||||
/// (destination character rank, (source character rank, source character)) data holder
|
||||
///
|
||||
class com_translation
|
||||
{
|
||||
set<wstring> res;
|
||||
public:
|
||||
int rank_src; ///< Source sequence rank
|
||||
int rank_dst; ///< Destination character rank
|
||||
string norm; ///< Normalization footprint
|
||||
|
||||
if (*str) {
|
||||
// Decompose remainder first.
|
||||
auto rem = decompose(db, str + 1, path);
|
||||
if (rem.empty())
|
||||
return res;
|
||||
inline com_translation()
|
||||
{
|
||||
}
|
||||
|
||||
auto const t = db.find(*str);
|
||||
if (t != db.end()) {
|
||||
// Current characted decomposed. Iterate all possible decompositions and combine them with the remainder.
|
||||
auto p = path.insert(*str);
|
||||
if (!p.second) {
|
||||
// Path already contains this character: Cycle detected!
|
||||
return res;
|
||||
}
|
||||
for (auto d = t->second.cbegin(), d_end = t->second.cend(); d != d_end; ++d) {
|
||||
auto dec = decompose(db, d->str.c_str(), path);
|
||||
if (!dec.empty()) {
|
||||
for (auto dd = dec.cbegin(), dd_end = dec.cend(); dd != dd_end; ++dd) {
|
||||
for (auto r = rem.cbegin(), r_end = rem.cend(); r != r_end; ++r)
|
||||
res.insert(*dd + *r);
|
||||
}
|
||||
} else {
|
||||
// Cycle detected. Do not continue decomposition.
|
||||
for (auto r = rem.cbegin(), r_end = rem.cend(); r != r_end; ++r)
|
||||
res.insert(wstring(1, *str) + *r);
|
||||
}
|
||||
}
|
||||
path.erase(p.first);
|
||||
} else {
|
||||
// Current character is non-decomposable. Combine it with the remainder(s).
|
||||
for (auto r = rem.cbegin(), r_end = rem.cend(); r != r_end; ++r)
|
||||
res.insert(wstring(1, *str) + *r);
|
||||
inline com_translation(int _rank_src, int _rank_dst) :
|
||||
rank_src(_rank_src),
|
||||
rank_dst(_rank_dst)
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(int _rank_src, int _rank_dst, const char *_norm) :
|
||||
rank_src(_rank_src),
|
||||
rank_dst(_rank_dst),
|
||||
norm (_norm )
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(int _rank_src, int _rank_dst, string &&_norm) :
|
||||
rank_src( _rank_src ),
|
||||
rank_dst( _rank_dst ),
|
||||
norm (std::move(_norm ))
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(const com_translation &other) :
|
||||
rank_src(other.rank_src),
|
||||
rank_dst(other.rank_dst),
|
||||
norm (other.norm )
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(com_translation &&other) :
|
||||
rank_src( other.rank_src ),
|
||||
rank_dst( other.rank_dst ),
|
||||
norm (std::move(other.norm ))
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation& operator=(const com_translation &other)
|
||||
{
|
||||
if (this != std::addressof(other)) {
|
||||
rank_src = other.rank_src;
|
||||
rank_dst = other.rank_dst;
|
||||
norm = other.norm ;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline com_translation& operator=(com_translation &&other)
|
||||
{
|
||||
if (this != std::addressof(other)) {
|
||||
rank_src = other.rank_src ;
|
||||
rank_dst = other.rank_dst ;
|
||||
norm = std::move(other.norm );
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool operator==(_In_ const com_translation& other) const
|
||||
{
|
||||
return
|
||||
rank_src == other.rank_src &&
|
||||
rank_dst == other.rank_dst &&
|
||||
norm == other.norm;
|
||||
}
|
||||
|
||||
inline bool operator!=(_In_ const com_translation &other) const
|
||||
{
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
inline bool operator<(_In_ const com_translation& other) const
|
||||
{
|
||||
if (rank_src < other.rank_src) return true;
|
||||
else if (rank_src > other.rank_src) return false;
|
||||
else if (rank_dst < other.rank_dst) return true;
|
||||
else if (rank_dst > other.rank_dst) return false;
|
||||
else if (norm < other.norm ) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
inline bool operator<=(_In_ const com_translation &other) const
|
||||
{
|
||||
return !operator>(other);
|
||||
}
|
||||
|
||||
inline bool operator>(_In_ const com_translation &other) const
|
||||
{
|
||||
return other.operator<(*this);
|
||||
}
|
||||
|
||||
inline bool operator>=(_In_ const com_translation &other) const
|
||||
{
|
||||
return !operator<(other);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef map<wstring, map<wstring, com_translation> > translation_db;
|
||||
typedef map<string, ZRCola::DBSource::normperm> normperm_db;
|
||||
|
||||
|
||||
static set<ZRCola::DBSource::charseq> translate_inv(_In_ const translation_db &db_trans, _In_ const normperm_db &db_np, _In_z_ const wchar_t *str, _Inout_ set<translation_db::key_type> &path);
|
||||
static inline set<ZRCola::DBSource::charseq> permutate_and_translate_inv(_In_ const translation_db &db_trans, _In_ const normperm_db &db_np, _In_z_ const wchar_t *str, _In_z_ const char *norm, _Inout_ set<translation_db::key_type> &path);
|
||||
|
||||
|
||||
static set<ZRCola::DBSource::charseq> translate_inv(_In_ const translation_db &db_trans, _In_ const normperm_db &db_np, _In_z_ const wchar_t *str, _Inout_ set<translation_db::key_type> &path)
|
||||
{
|
||||
set<ZRCola::DBSource::charseq> res;
|
||||
|
||||
if (!*str) {
|
||||
// Empty string results in empty inverse translation.
|
||||
res.insert(ZRCola::DBSource::charseq(0, L""));
|
||||
return res;
|
||||
}
|
||||
|
||||
// Prepare inverse translate of the remainder string (without the first character).
|
||||
auto res_rem = translate_inv(db_trans, db_np, str + 1, path);
|
||||
if (res_rem.empty())
|
||||
return res;
|
||||
|
||||
// See if first character is inverse translatable.
|
||||
translation_db::key_type chr(1, *str);
|
||||
auto const hit_trans = db_trans.find(chr);
|
||||
if (hit_trans != db_trans.end()) {
|
||||
// Current character is inverse translatable.
|
||||
|
||||
// Add the current character to the path before recursing.
|
||||
auto hit_path = path.insert(chr);
|
||||
if (!hit_path.second) {
|
||||
// Path already contains this character: Cycle detected!
|
||||
return res;
|
||||
}
|
||||
|
||||
// Iterate all possible character inverse translations and combine them with the remainder string inverse translations.
|
||||
for (auto d = hit_trans->second.cbegin(), d_end = hit_trans->second.cend(); d != d_end; ++d) {
|
||||
auto res_chr = d->second.norm.empty() ?
|
||||
translate_inv(db_trans, db_np, d->first.c_str(), path) :
|
||||
permutate_and_translate_inv(db_trans, db_np, d->first.c_str(), d->second.norm.c_str(), path);
|
||||
if (!res_chr.empty()) {
|
||||
for (auto r_chr = res_chr.cbegin(), r_chr_end = res_chr.cend(); r_chr != r_chr_end; ++r_chr) {
|
||||
for (auto r_rem = res_rem.cbegin(), r_rem_end = res_rem.cend(); r_rem != r_rem_end; ++r_rem)
|
||||
res.insert(ZRCola::DBSource::charseq(d->second.rank_src + r_chr->rank + r_rem->rank, r_chr->str + r_rem->str));
|
||||
}
|
||||
} else {
|
||||
// Cycle detected. Do not continue inverse translation.
|
||||
for (auto r_rem = res_rem.cbegin(), r_end = res_rem.cend(); r_rem != r_end; ++r_rem)
|
||||
res.insert(ZRCola::DBSource::charseq(r_rem->rank, chr + r_rem->str));
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the current character from the path.
|
||||
path.erase(hit_path.first);
|
||||
} else {
|
||||
// Empty string results in empty decomposition.
|
||||
res.insert(L"");
|
||||
// First character is non-inverse translatable. Combine it with the remainder(s).
|
||||
for (auto r_rem = res_rem.cbegin(), r_end = res_rem.cend(); r_rem != r_end; ++r_rem)
|
||||
res.insert(ZRCola::DBSource::charseq(r_rem->rank, chr + r_rem->str));
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static inline set<ZRCola::DBSource::charseq> permutate_and_translate_inv(_In_ const translation_db &db_trans, _In_ const normperm_db &db_np, _In_z_ const wchar_t *str, _In_z_ const char *norm, _Inout_ set<translation_db::key_type> &path)
|
||||
{
|
||||
// Primary permutation inverse translate.
|
||||
auto res = translate_inv(db_trans, db_np, str, path);
|
||||
|
||||
// Secondary permutation(s).
|
||||
auto const hit_np = db_np.find(norm);
|
||||
if (hit_np != db_np.end()) {
|
||||
for (auto perm = hit_np->second.cbegin(), perm_end = hit_np->second.cend(); perm != perm_end; ++perm) {
|
||||
// Prepare permutated string.
|
||||
translation_db::mapped_type::key_type str_perm;
|
||||
for (auto idx = perm->cbegin(), idx_end = perm->cend(); idx != idx_end; ++idx)
|
||||
str_perm += str[*idx];
|
||||
|
||||
// Secondary permutation inverse translate.
|
||||
auto res_perm = translate_inv(db_trans, db_np, str_perm.c_str(), path);
|
||||
for (auto r = res_perm.begin(), r_end = res_perm.end(); r != r_end; ++r)
|
||||
res.insert(ZRCola::DBSource::charseq(r->rank + 1, std::move(r->str)));
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
@@ -151,6 +300,37 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
// Open file ID.
|
||||
streamoff dst_start = idrec::open<ZRCola::recordid_t, ZRCola::recordsize_t>(dst, ZRCOLA_DB_ID);
|
||||
|
||||
ZRCola::translation_db db_trans;
|
||||
normperm_db db_np;
|
||||
|
||||
{
|
||||
// Get normalization permutation sets.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectNormPermSets(rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
string norm;
|
||||
ZRCola::DBSource::normperm np;
|
||||
|
||||
// Parse normalization permutation sets.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read normalization permutation set from the database.
|
||||
if (src.GetNormPerm(rs, norm, np)) {
|
||||
if (!np.empty())
|
||||
db_np.insert(pair<string, ZRCola::DBSource::normperm>(norm, std::move(np)));
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0009: Error getting translation set count from database or too many translation sets.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0008: Error getting translation sets from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get translations.
|
||||
com_obj<ADORecordset> rs;
|
||||
@@ -164,72 +344,63 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
ZRCola::DBSource::translation trans;
|
||||
if (src.GetTranslation(rs, trans)) {
|
||||
// Add translation to temporary database.
|
||||
auto const t = db_temp1.find(trans.chr);
|
||||
if (t != db_temp1.end())
|
||||
t->second.insert(std::move(trans.decomp));
|
||||
pair<translation_db::mapped_type::key_type, translation_db::mapped_type::mapped_type> ctp(std::move(trans.src.str), translation_db::mapped_type::mapped_type(trans.src.rank, trans.dst.rank, std::move(trans.norm)));
|
||||
auto hit = db_temp1.find(trans.dst.str);
|
||||
if (hit != db_temp1.end())
|
||||
hit->second.insert(std::move(ctp));
|
||||
else {
|
||||
translation_db::mapped_type d;
|
||||
d.insert(std::move(trans.decomp));
|
||||
db_temp1.insert(std::move(pair<translation_db::key_type, translation_db::mapped_type>(trans.chr, std::move(d))));
|
||||
translation_db::mapped_type t;
|
||||
t.insert(std::move(ctp));
|
||||
db_temp1.insert(pair<translation_db::key_type, translation_db::mapped_type>(std::move(trans.dst.str), std::move(t)));
|
||||
}
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Decompose decompositions down to non-decomposable characters.
|
||||
// Inverse translate source sequences down to non-inverse translatable characters.
|
||||
translation_db db_temp2;
|
||||
for (auto t1 = db_temp1.cbegin(), t1_end = db_temp1.cend(); t1 != t1_end; ++t1) {
|
||||
auto t2 = db_temp2.insert(pair<translation_db::key_type, translation_db::mapped_type>(t1->first, translation_db::mapped_type())).first;
|
||||
|
||||
for (auto d1 = t1->second.cbegin(), d1_end = t1->second.cend(); d1 != d1_end; ++d1) {
|
||||
set<wchar_t> path;
|
||||
set<translation_db::key_type> path;
|
||||
path.insert(t1->first);
|
||||
auto str = decompose(db_temp1, d1->str.c_str(), path);
|
||||
assert(!str.empty());
|
||||
auto res = d1->second.norm.empty() ?
|
||||
translate_inv(db_temp1, db_np, d1->first.c_str(), path) :
|
||||
permutate_and_translate_inv(db_temp1, db_np, d1->first.c_str(), d1->second.norm.c_str(), path);
|
||||
assert(!res.empty());
|
||||
|
||||
// Add translation to temporary database.
|
||||
auto const t2 = db_temp2.find(t1->first);
|
||||
if (t2 != db_temp2.end()) {
|
||||
for (auto s = str.cbegin(), s_end = str.cend(); s != s_end; ++s)
|
||||
t2->second.insert(std::move(ZRCola::DBSource::charseq(d1->rank, s->c_str())));
|
||||
} else {
|
||||
translation_db::mapped_type d2;
|
||||
for (auto s = str.cbegin(), s_end = str.cend(); s != s_end; ++s)
|
||||
d2.insert(std::move(ZRCola::DBSource::charseq(d1->rank, s->c_str())));
|
||||
db_temp2.insert(std::move(pair<translation_db::key_type, translation_db::mapped_type>(t1->first, std::move(d2))));
|
||||
for (auto r = res.begin(), r_end = res.end(); r != r_end; ++r) {
|
||||
translation_db::mapped_type::mapped_type ct(d1->second.rank_src + r->rank, d1->second.rank_dst);
|
||||
auto hit = t2->second.find(r->str);
|
||||
if (hit != t2->second.end()) {
|
||||
hit->second.rank_src = std::min<int>(hit->second.rank_src, ct.rank_src);
|
||||
hit->second.rank_dst = std::max<int>(hit->second.rank_dst, ct.rank_dst);
|
||||
} else
|
||||
t2->second.insert(pair<translation_db::mapped_type::key_type, translation_db::mapped_type::mapped_type>(std::move(r->str), std::move(ct)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ZRCola::translation_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxComp .reserve(count);
|
||||
db.idxDecomp.reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
db_trans.idxSrc.reserve(count);
|
||||
db_trans.idxDst.reserve(count);
|
||||
db_trans.data .reserve(count*5);
|
||||
|
||||
// Parse translations and build index and data.
|
||||
ZRCola::DBSource::translation trans;
|
||||
trans.set = 0;
|
||||
for (auto t = db_temp2.cbegin(), t_end = db_temp2.cend(); t != t_end; ++t) {
|
||||
// Add translation to index and data.
|
||||
trans.dst.str = std::move(t->first);
|
||||
for (auto d = t->second.cbegin(), d_end = t->second.cend(); d != d_end; ++d) {
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.push_back(t->first);
|
||||
wxASSERT_MSG((int)0xffff8000 <= d->rank && d->rank <= (int)0x00007fff, wxT("transformation rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)d->rank);
|
||||
wstring::size_type n = d->str.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("transformation string too long"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
for (wstring::size_type i = 0; i < n; i++)
|
||||
db.data.push_back(d->str[i]);
|
||||
db.idxComp .push_back(idx);
|
||||
db.idxDecomp.push_back(idx);
|
||||
trans.dst.rank = d->second.rank_dst;
|
||||
trans.src.rank = d->second.rank_src;
|
||||
trans.src.str = std::move(d->first);
|
||||
db_trans << trans;
|
||||
}
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxComp .sort();
|
||||
db.idxDecomp.sort();
|
||||
|
||||
// Write translations to file.
|
||||
dst << ZRCola::translation_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0004: Error getting translation count from database or too many translations.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
@@ -240,6 +411,143 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get translation sets.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectTranlationSets(rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::DBSource::transet ts;
|
||||
ZRCola::transet_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxTranSet.reserve((count+1));
|
||||
db.data .reserve((count+1)*4);
|
||||
|
||||
// Add (de)composing translation set to index and data.
|
||||
ts.set = 0;
|
||||
ts.src = L"ZRCola Decomposed";
|
||||
ts.dst = L"ZRCola Composed";
|
||||
db << ts;
|
||||
if (build_pot) {
|
||||
pot.insert(ts.src);
|
||||
pot.insert(ts.dst);
|
||||
}
|
||||
|
||||
// Parse translation sets and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read translation set from the database.
|
||||
if (src.GetTranslationSet(rs, ts)) {
|
||||
if (build_pot) {
|
||||
pot.insert(ts.src);
|
||||
pot.insert(ts.dst);
|
||||
}
|
||||
|
||||
// Add translation set to index and data.
|
||||
db << ts;
|
||||
|
||||
// Get translations.
|
||||
com_obj<ADORecordset> rs_tran;
|
||||
if (src.SelectTranslations(ts.set, rs_tran)) {
|
||||
size_t count = src.GetRecordsetCount(rs_tran);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
// Parse translations and build temporary database.
|
||||
ZRCola::DBSource::translation trans;
|
||||
trans.set = ts.set;
|
||||
for (; !ZRCola::DBSource::IsEOF(rs_tran); rs_tran->MoveNext()) {
|
||||
// Read translation from the database.
|
||||
if (src.GetTranslation(rs_tran, trans)) {
|
||||
// Add translation to index and data.
|
||||
db_trans << trans;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0004: Error getting translation count from database or too many translations.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0003: Error getting translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxTranSet.sort();
|
||||
|
||||
// Write translation sets to file.
|
||||
dst << ZRCola::transet_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0009: Error getting translation set count from database or too many translation sets.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0008: Error getting translation sets from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db_trans.idxSrc.sort();
|
||||
db_trans.idxDst.sort();
|
||||
|
||||
// Write translations to file.
|
||||
dst << ZRCola::translation_rec(db_trans);
|
||||
|
||||
{
|
||||
// Get translation sequences.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectTranlationSeqs(rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::DBSource::transeq ts;
|
||||
ZRCola::transeq_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxTranSeq.reserve((count+1));
|
||||
db.idxRank .reserve((count+1));
|
||||
db.data .reserve((count+1)*4);
|
||||
|
||||
// Add basic ZRCola translation sequence to index and data.
|
||||
ts.seq = 0;
|
||||
ts.rank = 0;
|
||||
ts.name = L"ZRCola (De)composition";
|
||||
ts.sets.push_back(0);
|
||||
db << ts;
|
||||
if (build_pot)
|
||||
pot.insert(ts.name);
|
||||
|
||||
// Parse translation sequences and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read translation sequence from the database.
|
||||
if (src.GetTranslationSeq(rs, ts)) {
|
||||
if (build_pot)
|
||||
pot.insert(ts.name);
|
||||
|
||||
// Add translation sequence to index and data.
|
||||
db << ts;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxTranSeq.sort();
|
||||
db.idxRank .sort();
|
||||
|
||||
// Write translation sequences to file.
|
||||
dst << ZRCola::transeq_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0025: Error getting translation sequence count from database or too many translation sequences.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0024: Error getting translation sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get key sequences.
|
||||
com_obj<ADORecordset> rs;
|
||||
@@ -259,21 +567,7 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
// Read key sequence from the database.
|
||||
if (src.GetKeySequence(rs, ks)) {
|
||||
// Add key sequence to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.push_back(ks.chr);
|
||||
vector<ZRCola::DBSource::keyseq::keycode>::size_type n = ks.seq.size();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("key sequence too long"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
for (vector<ZRCola::DBSource::keyseq::keycode>::size_type i = 0; i < n; i++) {
|
||||
const ZRCola::DBSource::keyseq::keycode &kc = ks.seq[i];
|
||||
db.data.push_back(kc.key);
|
||||
db.data.push_back(
|
||||
(kc.shift ? ZRCola::keyseq_db::keyseq::SHIFT : 0) |
|
||||
(kc.ctrl ? ZRCola::keyseq_db::keyseq::CTRL : 0) |
|
||||
(kc.alt ? ZRCola::keyseq_db::keyseq::ALT : 0));
|
||||
}
|
||||
db.idxChr.push_back(idx);
|
||||
db.idxKey.push_back(idx);
|
||||
db << ks;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
@@ -288,10 +582,14 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
&ks1 = db.idxKey[i - 1],
|
||||
&ks2 = db.idxKey[i ];
|
||||
|
||||
if (ZRCola::keyseq_db::keyseq::CompareSequence(ks1.seq, ks1.seq_len, ks2.seq, ks2.seq_len) == 0) {
|
||||
if (ZRCola::keyseq_db::keyseq::CompareSequence(ks1.seq(), ks1.seq_len(), ks2.seq(), ks2.seq_len()) == 0) {
|
||||
wxString seq_str;
|
||||
ZRCola::keyseq_db::GetSequenceAsText(ks1.seq, ks1.seq_len, seq_str);
|
||||
_ftprintf(stderr, wxT("%s: warning ZCC0007: Duplicate key sequence (%ls => %04X or %04X). The keyboard behaviour will be unpredictable.\n"), (LPCTSTR)filenameIn.c_str(), seq_str.c_str(), ks1.chr, ks2.chr);
|
||||
ZRCola::keyseq_db::GetSequenceAsText(ks1.seq(), ks1.seq_len(), seq_str);
|
||||
_ftprintf(stderr, wxT("%s: warning ZCC0007: Duplicate key sequence (%ls => %s or %s). The keyboard behaviour will be unpredictable.\n"),
|
||||
(LPCTSTR)filenameIn.c_str(),
|
||||
seq_str.c_str(),
|
||||
ZRCola::GetUnicodeDump(ks1.chr(), ks1.chr_len()).c_str(),
|
||||
ZRCola::GetUnicodeDump(ks2.chr(), ks2.chr_len()).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,8 +615,8 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
ZRCola::language_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxLng.reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
db.idxLang.reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Parse languages and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
@@ -328,21 +626,13 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
pot.insert(lang.name);
|
||||
|
||||
// Add language to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
for (wstring::size_type i = 0; i < sizeof(ZRCola::langid_t)/sizeof(unsigned __int16); i++)
|
||||
db.data.push_back(((const unsigned __int16*)lang.id.data)[i]);
|
||||
wstring::size_type n = lang.name.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("language name too long"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
for (wstring::size_type i = 0; i < n; i++)
|
||||
db.data.push_back(lang.name[i]);
|
||||
db.idxLng.push_back(idx);
|
||||
db << lang;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxLng.sort();
|
||||
db.idxLang.sort();
|
||||
|
||||
// Write languages to file.
|
||||
dst << ZRCola::language_rec(db);
|
||||
@@ -366,25 +656,18 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
ZRCola::langchar_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChr.reserve(count);
|
||||
db.idxChr .reserve(count);
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
db.idxLng.reserve(count);
|
||||
db.idxLang.reserve(count);
|
||||
#endif
|
||||
db.data .reserve(count*4);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Parse language characters and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read language characters from the database.
|
||||
if (src.GetLanguageCharacter(rs, lc)) {
|
||||
// Add language characters to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.push_back(lc.chr);
|
||||
for (wstring::size_type i = 0; i < sizeof(ZRCola::langid_t)/sizeof(unsigned __int16); i++)
|
||||
db.data.push_back(((const unsigned __int16*)lc.lang.data)[i]);
|
||||
db.idxChr.push_back(idx);
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
db.idxLng.push_back(idx);
|
||||
#endif
|
||||
db << lc;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
@@ -392,7 +675,7 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
// Sort indices.
|
||||
db.idxChr .sort();
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
db.idxLng.sort();
|
||||
db.idxLang.sort();
|
||||
#endif
|
||||
|
||||
// Write language characters to file.
|
||||
@@ -417,8 +700,8 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
ZRCola::chrgrp_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxRnk.reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
db.idxRank.reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Parse character groups and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
@@ -433,30 +716,13 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
|
||||
// Add character group to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= cg.id && cg.id <= (int)0x00007fff, wxT("character group ID out of bounds"));
|
||||
db.data.push_back((unsigned __int16)cg.id);
|
||||
wxASSERT_MSG((int)0xffff8000 <= cg.rank && cg.rank <= (int)0x00007fff, wxT("character group rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)cg.rank);
|
||||
wstring::size_type n_name = cg.name.length();
|
||||
wxASSERT_MSG(n_name <= 0xffff, wxT("character group name too long"));
|
||||
db.data.push_back((unsigned __int16)n_name);
|
||||
wstring::size_type n_char = cg.chars.length();
|
||||
wxASSERT_MSG(n_char <= 0xffff, wxT("too many character group characters"));
|
||||
db.data.push_back((unsigned __int16)n_char);
|
||||
for (wstring::size_type i = 0; i < n_name; i++)
|
||||
db.data.push_back(cg.name[i]);
|
||||
for (wstring::size_type i = 0; i < n_char; i++)
|
||||
db.data.push_back(cg.chars[i]);
|
||||
for (std::vector<unsigned __int16>::size_type i = 0, n = cg.show.size(); i < n; i++)
|
||||
db.data.push_back(cg.show[i]);
|
||||
db.idxRnk.push_back(idx);
|
||||
db << cg;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxRnk.sort();
|
||||
db.idxRank.sort();
|
||||
|
||||
// Write character groups to file.
|
||||
dst << ZRCola::chrgrp_rec(db);
|
||||
@@ -481,15 +747,14 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
ZRCola::DBSource::character_desc_idx idxChrDsc, idxChrDscSub;
|
||||
|
||||
ZRCola::DBSource::character_bank chrs;
|
||||
ZRCola::DBSource::character chr;
|
||||
|
||||
// Phase 1: Parse characters and build indexes.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read character from the database.
|
||||
unique_ptr<ZRCola::DBSource::character> c(new ZRCola::DBSource::character);
|
||||
if (src.GetCharacter(rs, *c)) {
|
||||
const auto &chr = *c.get();
|
||||
chrs[chr.chr].swap(c);
|
||||
} else
|
||||
if (src.GetCharacter(rs, chr))
|
||||
chrs[chr.first] = std::move(chr.second);
|
||||
else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
@@ -503,33 +768,16 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Phase 3: Parse characters and build index and data.
|
||||
for (size_t i = 0, i_end = chrs.size(); i < i_end; i++) {
|
||||
const auto &chr = *(chrs[i].get());
|
||||
if (&chr == NULL) continue;
|
||||
|
||||
for (auto chr = chrs.cbegin(), chr_end = chrs.cend(); chr != chr_end; ++chr) {
|
||||
// Add character to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.push_back((unsigned __int16)chr.chr);
|
||||
for (wstring::size_type i = 0; i < sizeof(ZRCola::chrcatid_t)/sizeof(unsigned __int16); i++)
|
||||
db.data.push_back(((const unsigned __int16*)chr.cat.data)[i]);
|
||||
wstring::size_type n_desc = chr.desc.length();
|
||||
wxASSERT_MSG(n_desc <= 0xffff, wxT("character description too long"));
|
||||
db.data.push_back((unsigned __int16)n_desc);
|
||||
wstring::size_type n_rel = chr.rel.length();
|
||||
wxASSERT_MSG(n_rel <= 0xffff, wxT("too many related characters"));
|
||||
db.data.push_back((unsigned __int16)n_rel);
|
||||
for (wstring::size_type i = 0; i < n_desc; i++)
|
||||
db.data.push_back(chr.desc[i]);
|
||||
for (wstring::size_type i = 0; i < n_rel; i++)
|
||||
db.data.push_back(chr.rel[i]);
|
||||
db.idxChr.push_back(idx);
|
||||
db << *chr;
|
||||
|
||||
// Add description (and keywords) to index.
|
||||
idxChrDsc .add_keywords(chr.terms, chr.chr, 0);
|
||||
idxChrDscSub.add_keywords(chr.terms, chr.chr, 3);
|
||||
idxChrDsc .add_keywords(chr->second.terms, chr->first, 0);
|
||||
idxChrDscSub.add_keywords(chr->second.terms, chr->first, 3);
|
||||
|
||||
// Mark category used.
|
||||
categories_used.insert(chr.cat);
|
||||
categories_used.insert(chr->second.cat);
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
@@ -562,7 +810,7 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChrCat.reserve(count);
|
||||
db.idxRnk .reserve(count);
|
||||
db.idxRank .reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Parse character categories and build index and data.
|
||||
@@ -572,31 +820,20 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
if (build_pot)
|
||||
pot.insert(cc.name);
|
||||
|
||||
if (categories_used.find(cc.id) == categories_used.end()) {
|
||||
if (categories_used.find(cc.cat) == categories_used.end()) {
|
||||
// Skip empty character categories.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add character category to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
for (wstring::size_type i = 0; i < sizeof(ZRCola::chrcatid_t)/sizeof(unsigned __int16); i++)
|
||||
db.data.push_back(((const unsigned __int16*)cc.id.data)[i]);
|
||||
wxASSERT_MSG((int)0xffff8000 <= cc.rank && cc.rank <= (int)0x00007fff, wxT("character category rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)cc.rank);
|
||||
wstring::size_type n_name = cc.name.length();
|
||||
wxASSERT_MSG(n_name <= 0xffff, wxT("character category name too long"));
|
||||
db.data.push_back((unsigned __int16)n_name);
|
||||
for (wstring::size_type i = 0; i < n_name; i++)
|
||||
db.data.push_back(cc.name[i]);
|
||||
db.idxChrCat.push_back(idx);
|
||||
db.idxRnk .push_back(idx);
|
||||
db << cc;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxChrCat.sort();
|
||||
db.idxRnk .sort();
|
||||
db.idxRank .sort();
|
||||
|
||||
// Write character categories to file.
|
||||
dst << ZRCola::chrcat_rec(db);
|
||||
@@ -629,18 +866,13 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
// Read characters tags from the database.
|
||||
if (src.GetCharacterTag(rs, ct)) {
|
||||
// Add characters tags to index and data.
|
||||
unsigned __int32 idx = db.data.size();
|
||||
db.data.push_back(ct.chr);
|
||||
wxASSERT_MSG((int)0xffff8000 <= ct.tag && ct.tag <= (int)0x00007fff, wxT("tag out of bounds"));
|
||||
db.data.push_back((unsigned __int16)ct.tag);
|
||||
db.idxChr.push_back(idx);
|
||||
db.idxTag.push_back(idx);
|
||||
db << ct;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxChr .sort();
|
||||
db.idxChr.sort();
|
||||
db.idxTag.sort();
|
||||
|
||||
// Write characters tags to file.
|
||||
@@ -674,22 +906,7 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
// Read tag name from the database.
|
||||
if (src.GetTagName(rs, tn)) {
|
||||
// Add tag name to index and data.
|
||||
for (auto ln = tn.names.cbegin(), ln_end = tn.names.cend(); ln != ln_end; ++ln) {
|
||||
for (auto nm = ln->second.cbegin(), nm_end = ln->second.cend(); nm != nm_end; ++nm) {
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= tn.tag && tn.tag <= (int)0x00007fff, wxT("tag out of bounds"));
|
||||
db.data.push_back((unsigned __int16)tn.tag);
|
||||
db.data.push_back(LOWORD(ln->first));
|
||||
db.data.push_back(HIWORD(ln->first));
|
||||
wstring::size_type n = nm->length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("tag name too long"));
|
||||
db.data.push_back((unsigned __int16)n);
|
||||
for (wstring::size_type i = 0; i < n; i++)
|
||||
db.data.push_back(nm->at(i));
|
||||
db.idxName.push_back(idx);
|
||||
db.idxTag .push_back(idx);
|
||||
}
|
||||
}
|
||||
db << tn;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
212
ZRColaCompile/parse.cpp
Normal file
212
ZRColaCompile/parse.cpp
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
Copyright 2017 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace stdex;
|
||||
using namespace winstd;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// ZRCola::DecompParser
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ZRCola::DecompParser::DecompParser(_In_ const std::wstring &decomposed) : m_decomposed(decomposed)
|
||||
{
|
||||
if (m_decomposed.empty()) {
|
||||
m_sym = 0;
|
||||
m_idx = 0;
|
||||
} else {
|
||||
m_sym = m_decomposed[0];
|
||||
m_idx = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ZRCola::DecompParser::ParsePrefixes(_Inout_ std::vector<wchar_t> &prefix)
|
||||
{
|
||||
for (;;) {
|
||||
if (
|
||||
m_sym == 0x203F || // Undertie
|
||||
0xE0F0 <= m_sym && m_sym <= 0xE0F3 || // 1st Set of Prefix Modifiers
|
||||
m_sym == 0xE0F6 || // Above
|
||||
m_sym == 0xE0F7 || // Below
|
||||
0xE0F8 <= m_sym && m_sym <= 0xE0FC) // 2nd Set of Prefix Modifiers
|
||||
{
|
||||
// Prefix modifier
|
||||
prefix.push_back(m_sym);
|
||||
NextChar();
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ZRCola::DecompParser::ParseModifiers(_Inout_ std::vector<wchar_t> &mod)
|
||||
{
|
||||
for (;;) {
|
||||
if (0xE000 <= m_sym && m_sym <= 0xE05B || // 1st Set of Modifiers
|
||||
0xE063 <= m_sym && m_sym <= 0xE0BE || // 2nd Set of Modifiers
|
||||
m_sym == 0x0023 || // Number Sign
|
||||
m_sym == 0x003A || // Colon
|
||||
m_sym == 0x02DE || // Rhotic Hook
|
||||
m_sym == 0x2019 || // Right Single Quotation Mark
|
||||
0x02B0 <= m_sym && m_sym <= 0x02FF || // Standard Unicode Modifiers
|
||||
m_sym == 0xE0C0 || // Circle
|
||||
m_sym == 0xE0C2 || // Square
|
||||
m_sym == 0xE0CA || // Diamond
|
||||
m_sym == 0xE0CD) // Not Circle
|
||||
{
|
||||
mod.push_back(m_sym);
|
||||
NextChar();
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DecompParser::Expression* ZRCola::DecompParser::ParseParentheses(_In_ wchar_t open, _In_ wchar_t close)
|
||||
{
|
||||
if (m_sym == open) {
|
||||
// Parenthesis Start
|
||||
NextChar();
|
||||
if (m_sym == 0xE037) {
|
||||
// EVA Parenthesis End
|
||||
unique_ptr<Character> res(new Character(close));
|
||||
NextChar();
|
||||
return res.release();
|
||||
} else {
|
||||
unique_ptr<Parentheses> res(new Parentheses(open, close, ParseExpression()));
|
||||
if (m_sym == close) {
|
||||
// Parenthesis End
|
||||
NextChar();
|
||||
} else if (m_sym == open && m_idx < m_decomposed.length() && m_decomposed[m_idx] == 0xE037) {
|
||||
// Decomposed Parenthesis End
|
||||
NextChar();
|
||||
NextChar();
|
||||
} else
|
||||
throw invalid_argument(string_printf("%lc is unexpected. Should end with %lc.", m_sym, close));
|
||||
return res.release();
|
||||
}
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DecompParser::Expression* ZRCola::DecompParser::ParseCharacter()
|
||||
{
|
||||
Expression *res_p;
|
||||
if ((res_p = ParseParentheses(0xE0C5, 0xE0C6)) != NULL || // Superscript
|
||||
(res_p = ParseParentheses(0xE0CE, 0xE0CF)) != NULL || // Subscript
|
||||
(res_p = ParseParentheses(0xE2E0, 0xE2E1)) != NULL || // EVA Double
|
||||
(res_p = ParseParentheses(0xE2E2, 0xE2E3)) != NULL || // EVA Condensed
|
||||
(res_p = ParseParentheses(0xE2E4, 0xE2E5)) != NULL || // EVA Emphasis
|
||||
(res_p = ParseParentheses(0xE2E6, 0xE2E7)) != NULL || // EVA Strike
|
||||
(res_p = ParseParentheses(0xE2E8, 0xE2E9)) != NULL || // EVA Undeal
|
||||
(res_p = ParseParentheses(0xE2EA, 0xE2EB)) != NULL || // EVA Italic
|
||||
(res_p = ParseParentheses(0xE2EC, 0xE2ED)) != NULL || // EVA Superscript
|
||||
(res_p = ParseParentheses(0xE2EE, 0xE2EF)) != NULL) // EVA Subscript
|
||||
{
|
||||
return res_p;
|
||||
}
|
||||
|
||||
unique_ptr<Character> res(new Character());
|
||||
|
||||
ParsePrefixes(res->m_prefix);
|
||||
|
||||
if (m_sym < 0xE000 || 0xE0FC < m_sym ||
|
||||
m_sym == 0xE0D6 || // Clockwise Top Semicircle Arrow
|
||||
m_sym == 0xE0D7) // Anticlockwise Top Semicircle Arrow
|
||||
{
|
||||
// Base Character
|
||||
res->m_char = m_sym;
|
||||
NextChar();
|
||||
}
|
||||
|
||||
ParseModifiers(res->m_mod);
|
||||
|
||||
return res.release();
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DecompParser::Expression* ZRCola::DecompParser::ParseTerm()
|
||||
{
|
||||
unique_ptr<Ligature> res(new Ligature(ParseCharacter()));
|
||||
while (m_sym == 0xE0C4) {
|
||||
// Ligature
|
||||
std::unique_ptr<Ligature::Element> res2(new Ligature::Element(m_sym));
|
||||
NextChar();
|
||||
ParseModifiers(res2->m_mod);
|
||||
res2->m_el.reset(ParseCharacter());
|
||||
res->m_rest.push_back(std::move(res2));
|
||||
}
|
||||
|
||||
if (res->m_rest.empty()) {
|
||||
// A ligature of, well one single character, is rather a character alone.
|
||||
return res->m_first.release();
|
||||
} else
|
||||
return res.release();
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DecompParser::Expression* ZRCola::DecompParser::ParseExpression()
|
||||
{
|
||||
unique_ptr<Expression> res(ParseTerm());
|
||||
if (0xE05C <= m_sym && m_sym <= 0xE062 ||
|
||||
m_sym == 0xE0C1 || // Two Characters in Circle
|
||||
m_sym == 0xE0C3 || // Two Characters in Square
|
||||
m_sym == 0xE0C7 || // Breved below
|
||||
m_sym == 0xE0CB || // Inverse tilded
|
||||
m_sym == 0xE0CC || // Diagonally Barred
|
||||
0xE0D0 <= m_sym && m_sym <= 0xE0D5)
|
||||
{
|
||||
// Joiner of two terms
|
||||
unique_ptr<Joined2> res_j(new Joined2(m_sym, res.release()));
|
||||
NextChar();
|
||||
|
||||
ParseModifiers(res_j->m_mod);
|
||||
|
||||
res_j->m_second.reset(ParseTerm());
|
||||
return res_j.release();
|
||||
} else if (
|
||||
m_sym == 0xE0C8 || // Inverse breved
|
||||
m_sym == 0xE0C9) // Breved below
|
||||
{
|
||||
// Joiner of three terms
|
||||
unique_ptr<Joined3> res_j(new Joined3(m_sym, res.release()));
|
||||
NextChar();
|
||||
|
||||
ParseModifiers(res_j->m_mod);
|
||||
|
||||
res_j->m_second.reset(ParseTerm());
|
||||
res_j->m_third.reset(ParseTerm());
|
||||
return res_j.release();
|
||||
} else
|
||||
return res.release();
|
||||
}
|
||||
|
||||
|
||||
ZRCola::DecompParser::Expression* ZRCola::DecompParser::Parse()
|
||||
{
|
||||
unique_ptr<Expression> res(ParseExpression());
|
||||
if (m_sym)
|
||||
throw invalid_argument("Unexpected trailing character(s).");
|
||||
return res.release();
|
||||
}
|
||||
154
ZRColaCompile/parse.h
Normal file
154
ZRColaCompile/parse.h
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
Copyright 2017 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sal.h>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace ZRCola {
|
||||
///
|
||||
/// Decomposed sequence parser
|
||||
///
|
||||
class DecompParser
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Base class for expressions
|
||||
///
|
||||
class Expression
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Expression in "parentheses"
|
||||
///
|
||||
class Parentheses : public Expression
|
||||
{
|
||||
public:
|
||||
inline Parentheses(_In_opt_ wchar_t open = 0, _In_opt_ wchar_t close = 0, _In_opt_ Expression *expr = NULL) : m_open(open), m_close(close), m_expr(expr) {}
|
||||
|
||||
public:
|
||||
wchar_t m_open, m_close;
|
||||
std::unique_ptr<Expression> m_expr;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Operator
|
||||
///
|
||||
class Operator : public Expression
|
||||
{
|
||||
public:
|
||||
inline Operator(_In_opt_ wchar_t chr = 0) : m_char(chr) {}
|
||||
|
||||
wchar_t m_char;
|
||||
std::vector<wchar_t> m_mod;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Character
|
||||
///
|
||||
class Character : public Operator
|
||||
{
|
||||
public:
|
||||
inline Character(_In_opt_ wchar_t chr = 0) : Operator(chr) {}
|
||||
|
||||
std::vector<wchar_t> m_prefix;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Ligature
|
||||
///
|
||||
class Ligature : public Expression
|
||||
{
|
||||
public:
|
||||
class Element : public Operator
|
||||
{
|
||||
public:
|
||||
inline Element(_In_opt_ wchar_t chr = 0) : Operator(chr) {}
|
||||
|
||||
std::unique_ptr<Expression> m_el;
|
||||
};
|
||||
|
||||
inline Ligature(_In_opt_ Expression *first = NULL) : m_first(first) {}
|
||||
|
||||
std::unique_ptr<Expression> m_first;
|
||||
std::list<std::unique_ptr<Element> > m_rest;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Two joined terms
|
||||
///
|
||||
class Joined2 : public Operator
|
||||
{
|
||||
public:
|
||||
Joined2(_In_opt_ wchar_t chr = 0, _In_opt_ Expression *first = NULL) : Operator(chr), m_first(first) {}
|
||||
|
||||
std::unique_ptr<Expression> m_first, m_second;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
/// Three joined terms
|
||||
///
|
||||
class Joined3 : public Joined2
|
||||
{
|
||||
public:
|
||||
Joined3(_In_opt_ wchar_t chr = 0, _In_opt_ Expression *first = NULL) : Joined2(chr, first) {}
|
||||
|
||||
std::unique_ptr<Expression> m_third;
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
DecompParser(_In_ const std::wstring &decomposed);
|
||||
|
||||
protected:
|
||||
inline void NextChar();
|
||||
void ParsePrefixes(_Inout_ std::vector<wchar_t> &prefix);
|
||||
void ParseModifiers(_Inout_ std::vector<wchar_t> &mod);
|
||||
Expression* ParseParentheses(_In_ wchar_t open, _In_ wchar_t close);
|
||||
Expression* ParseCharacter();
|
||||
Expression* ParseTerm();
|
||||
Expression* ParseExpression();
|
||||
|
||||
public:
|
||||
Expression* Parse();
|
||||
|
||||
protected:
|
||||
std::wstring::size_type m_idx; ///< Index of current character
|
||||
const std::wstring &m_decomposed; ///< Decomposed character sequence to analyse
|
||||
wchar_t m_sym; ///< Current character
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
inline void ZRCola::DecompParser::NextChar()
|
||||
{
|
||||
m_sym = m_idx < m_decomposed.length() ? m_decomposed[m_idx++] : 0;
|
||||
}
|
||||
@@ -21,12 +21,7 @@
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "dbsource.h"
|
||||
|
||||
#include <zrcola/language.h>
|
||||
#include <zrcola/translate.h>
|
||||
#include <zrcola/tag.h>
|
||||
#include <zrcolaui/chargroup.h>
|
||||
#include <zrcolaui/keyboard.h>
|
||||
#include "parse.h"
|
||||
|
||||
#include <wx/app.h>
|
||||
#include <wx/cmdline.h>
|
||||
|
||||
244
bin/InstFont.wsf
244
bin/InstFont.wsf
@@ -20,7 +20,7 @@
|
||||
<package>
|
||||
<job id="InstFont">
|
||||
<runtime>
|
||||
<description>Installs font - Amebis, Copyright © 2016-2017</description>
|
||||
<description>Installs font - Amebis, Copyright © 2016</description>
|
||||
<unnamed name="<Shortcut.lnk>" required="true" helpstring="Shortcut file to create"/>
|
||||
<example>
|
||||
Example:
|
||||
@@ -48,11 +48,11 @@ InstFont.wsf "My Font.ttf"
|
||||
</job>
|
||||
|
||||
<signature>
|
||||
** SIG ** MIIbIAYJKoZIhvcNAQcCoIIbETCCGw0CAQExCzAJBgUr
|
||||
** SIG ** MIIbHwYJKoZIhvcNAQcCoIIbEDCCGwwCAQExCzAJBgUr
|
||||
** SIG ** DgMCGgUAMGcGCisGAQQBgjcCAQSgWTBXMDIGCisGAQQB
|
||||
** SIG ** gjcCAR4wJAIBAQQQcAVhGs441BGiowAQS9NQkAIBAAIB
|
||||
** SIG ** AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFGEeMjueacR0
|
||||
** SIG ** jh4XkURojdD3J5x+oIIKLzCCBM4wggO2oAMCAQICEDB6
|
||||
** SIG ** AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFEBWxSAOwkGf
|
||||
** SIG ** 9dI+P2ELuLz+DxeroIIKLzCCBM4wggO2oAMCAQICEDB6
|
||||
** SIG ** NnqqPmiBpvlPCMs7OWQwDQYJKoZIhvcNAQELBQAwfzEL
|
||||
** SIG ** MAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENv
|
||||
** SIG ** cnBvcmF0aW9uMR8wHQYDVQQLExZTeW1hbnRlYyBUcnVz
|
||||
@@ -131,7 +131,7 @@ InstFont.wsf "My Font.ttf"
|
||||
** SIG ** EV/WpCWJmwVrL7TJAUwnewusGQUioGAVP9rJ+01Mj/ty
|
||||
** SIG ** Z3f9J5THujUOiEn+jf0or0oSvQ2zlwXeRAwV+jYrA9zB
|
||||
** SIG ** UAHxoRFdFOXivSdLVL4rhF4PpsN0BQrvl8OJIrEfd/O9
|
||||
** SIG ** zUPU8UypP7WLhK9k8tAUITGCEF0wghBZAgEBMIGTMH8x
|
||||
** SIG ** zUPU8UypP7WLhK9k8tAUITGCEFwwghBYAgEBMIGTMH8x
|
||||
** SIG ** CzAJBgNVBAYTAlVTMR0wGwYDVQQKExRTeW1hbnRlYyBD
|
||||
** SIG ** b3Jwb3JhdGlvbjEfMB0GA1UECxMWU3ltYW50ZWMgVHJ1
|
||||
** SIG ** c3QgTmV0d29yazEwMC4GA1UEAxMnU3ltYW50ZWMgQ2xh
|
||||
@@ -139,125 +139,125 @@ InstFont.wsf "My Font.ttf"
|
||||
** SIG ** qj5ogab5TwjLOzlkMAkGBSsOAwIaBQCgcDAQBgorBgEE
|
||||
** SIG ** AYI3AgEMMQIwADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGC
|
||||
** SIG ** NwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIB
|
||||
** SIG ** FTAjBgkqhkiG9w0BCQQxFgQUznZZYwta1knx/qCWsLrQ
|
||||
** SIG ** xhI/iSEwDQYJKoZIhvcNAQEBBQAEggEAPYeqftDHUS31
|
||||
** SIG ** QK3yXnFhEGCzEifnj47Z5hsIsCj64g2Mawryh2SQqzke
|
||||
** SIG ** /lwJQYdR8ZHnnitm8oIM2dQ+duCm6/7b452yRQmlW+bm
|
||||
** SIG ** PfKUYAntHYtFiBvPDXFFcd/vC/wKQN7/IoX1xHUmIJCL
|
||||
** SIG ** PpoUDf8luTRknl2wLpevQg6RyDL1ra1TfE2m3vovmiQE
|
||||
** SIG ** vWjmnebUzbReg6eDp8uqpSkWX6sl3CkjS7Du4K1vyIuQ
|
||||
** SIG ** z3Y1NEKTp0sc1OPReAyI8IIMZFiv4B+aIozloZKLCZlX
|
||||
** SIG ** RX/7WV4poxy07HL2D0eSpKU/E5sGx3WPQJspmfCSgVpW
|
||||
** SIG ** LB0gOEdADx1qXjT8SmhGcqGCDiwwgg4oBgorBgEEAYI3
|
||||
** SIG ** AwMBMYIOGDCCDhQGCSqGSIb3DQEHAqCCDgUwgg4BAgED
|
||||
** SIG ** MQ0wCwYJYIZIAWUDBAIBMIH/BgsqhkiG9w0BCRABBKCB
|
||||
** SIG ** 7wSB7DCB6QIBAQYLYIZIAYb4RQEHFwMwITAJBgUrDgMC
|
||||
** SIG ** GgUABBRK+KyXCF2Tf00Aw6jImyGktIi+hwIVAPP8EMTA
|
||||
** SIG ** f5W0fbcFV9uvT/3tRGNxGA8yMDE3MTIyMjA5MjMxMlow
|
||||
** SIG ** AwIBHqCBhqSBgzCBgDELMAkGA1UEBhMCVVMxHTAbBgNV
|
||||
** SIG ** BAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQL
|
||||
** SIG ** ExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMTEwLwYDVQQD
|
||||
** SIG ** EyhTeW1hbnRlYyBTSEEyNTYgVGltZVN0YW1waW5nIFNp
|
||||
** SIG ** Z25lciAtIEcyoIIKizCCBTgwggQgoAMCAQICEHsFsdRJ
|
||||
** SIG ** aFFE98mJ0pwZnRIwDQYJKoZIhvcNAQELBQAwgb0xCzAJ
|
||||
** SIG ** BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5j
|
||||
** SIG ** LjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y
|
||||
** SIG ** azE6MDgGA1UECxMxKGMpIDIwMDggVmVyaVNpZ24sIElu
|
||||
** SIG ** Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE4MDYG
|
||||
** SIG ** A1UEAxMvVmVyaVNpZ24gVW5pdmVyc2FsIFJvb3QgQ2Vy
|
||||
** SIG ** dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTYwMTEyMDAw
|
||||
** SIG ** MDAwWhcNMzEwMTExMjM1OTU5WjB3MQswCQYDVQQGEwJV
|
||||
** SIG ** FTAjBgkqhkiG9w0BCQQxFgQUhbkItGJ7IwanoGmf2+D4
|
||||
** SIG ** Mp5JZMMwDQYJKoZIhvcNAQEBBQAEggEAj/hbqjgcyKPJ
|
||||
** SIG ** ZcIYVjpfyyMaT9bkrFUArI1W/QPCEcS2xCG6h1lbe4Fu
|
||||
** SIG ** dZ1sp0xrKPirGXXAW6H1ZXbMRKXqGmmgdl5q8H3BtEMu
|
||||
** SIG ** xEcL2W80//kYL3847GYvUTBViD5I1NLC9mnskN8e3ok3
|
||||
** SIG ** HQhPdwXwMJ+2JdqG8GzYlpJe4xJ7mnU5m3lUvhlIoydD
|
||||
** SIG ** xZFJL3Pjs9jwCW9f1A7FgrQPpXi+hnVpciXZHL5pkSjf
|
||||
** SIG ** WGr1evGxhrHVRQpyF7sPrv3A1sSa4JbxtL+IQ9GGqVf9
|
||||
** SIG ** Xu5i3s9vDnfLSN6ZSZfwxZwIlTMmbGyN/lMYgBzdrAM5
|
||||
** SIG ** vUAhRibJy8uDaY82F48otqGCDiswgg4nBgorBgEEAYI3
|
||||
** SIG ** AwMBMYIOFzCCDhMGCSqGSIb3DQEHAqCCDgQwgg4AAgED
|
||||
** SIG ** MQ0wCwYJYIZIAWUDBAIBMIH+BgsqhkiG9w0BCRABBKCB
|
||||
** SIG ** 7gSB6zCB6AIBAQYLYIZIAYb4RQEHFwMwITAJBgUrDgMC
|
||||
** SIG ** GgUABBQtpvAkgc5L99fuVf1QYBxu6EjXaAIUTZOA6vF5
|
||||
** SIG ** BBSaesQcbr6p7GoNlG0YDzIwMTcwNDE4MTI0MzU5WjAD
|
||||
** SIG ** AgEeoIGGpIGDMIGAMQswCQYDVQQGEwJVUzEdMBsGA1UE
|
||||
** SIG ** ChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNVBAsT
|
||||
** SIG ** FlN5bWFudGVjIFRydXN0IE5ldHdvcmsxMTAvBgNVBAMT
|
||||
** SIG ** KFN5bWFudGVjIFNIQTI1NiBUaW1lU3RhbXBpbmcgU2ln
|
||||
** SIG ** bmVyIC0gRzKgggqLMIIFODCCBCCgAwIBAgIQewWx1Elo
|
||||
** SIG ** UUT3yYnSnBmdEjANBgkqhkiG9w0BAQsFADCBvTELMAkG
|
||||
** SIG ** A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMu
|
||||
** SIG ** MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3Jr
|
||||
** SIG ** MTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5j
|
||||
** SIG ** LiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYD
|
||||
** SIG ** VQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0
|
||||
** SIG ** aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNjAxMTIwMDAw
|
||||
** SIG ** MDBaFw0zMTAxMTEyMzU5NTlaMHcxCzAJBgNVBAYTAlVT
|
||||
** SIG ** MR0wGwYDVQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjEf
|
||||
** SIG ** MB0GA1UECxMWU3ltYW50ZWMgVHJ1c3QgTmV0d29yazEo
|
||||
** SIG ** MCYGA1UEAxMfU3ltYW50ZWMgU0hBMjU2IFRpbWVTdGFt
|
||||
** SIG ** cGluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
|
||||
** SIG ** AQoCggEBALtZnVlVT52Mcl0agaLrVfOwAa08cawyjwVr
|
||||
** SIG ** hponADKXak3JZBRLKbvC2Sm5Luxjs+HPPwtWkPhiG37r
|
||||
** SIG ** pgfi3n9ebUA41JEG50F8eRzLy60bv9iVkfPw7mz4rZY5
|
||||
** SIG ** Ln/BJ7h4OcWEpe3tr4eOzo3HberSmLU6Hx45ncP0mqj0
|
||||
** SIG ** hOHE0XxxxgYptD/kgw0mw3sIPk35CrczSf/KO9T1sptL
|
||||
** SIG ** 4YiZGvXA6TMU1t/HgNuR7v68kldyd/TNqMz+CfWTN76V
|
||||
** SIG ** iGrF3PSxS9TO6AmRX7WEeTWKeKwZMo8jwTJBG1kOqT6x
|
||||
** SIG ** zPnWK++32OTVHW0ROpL2k8mc40juu1MO1DaXhnjFoTcC
|
||||
** SIG ** AwEAAaOCAXcwggFzMA4GA1UdDwEB/wQEAwIBBjASBgNV
|
||||
** SIG ** HRMBAf8ECDAGAQH/AgEAMGYGA1UdIARfMF0wWwYLYIZI
|
||||
** SIG ** AYb4RQEHFwMwTDAjBggrBgEFBQcCARYXaHR0cHM6Ly9k
|
||||
** SIG ** LnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGRoXaHR0
|
||||
** SIG ** cHM6Ly9kLnN5bWNiLmNvbS9ycGEwLgYIKwYBBQUHAQEE
|
||||
** SIG ** IjAgMB4GCCsGAQUFBzABhhJodHRwOi8vcy5zeW1jZC5j
|
||||
** SIG ** b20wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL3Muc3lt
|
||||
** SIG ** Y2IuY29tL3VuaXZlcnNhbC1yb290LmNybDATBgNVHSUE
|
||||
** SIG ** DDAKBggrBgEFBQcDCDAoBgNVHREEITAfpB0wGzEZMBcG
|
||||
** SIG ** A1UEAxMQVGltZVN0YW1wLTIwNDgtMzAdBgNVHQ4EFgQU
|
||||
** SIG ** r2PWyqNOhXLgp7xB8ymiOH+AdWIwHwYDVR0jBBgwFoAU
|
||||
** SIG ** tnf6aUhHn1MS1cLqBzJ2B9GXBxkwDQYJKoZIhvcNAQEL
|
||||
** SIG ** BQADggEBAHXqsC3VNBlcMkX+DuHUT6Z4wW/X6t3cT/Oh
|
||||
** SIG ** yIGI96ePFeZAKa3mXfSi2VZkhHEwKt0eYRdmIFYGmBmN
|
||||
** SIG ** XXHy+Je8Cf0ckUfJ4uiNA/vMkC/WCmxOM+zWtJPITJBj
|
||||
** SIG ** SDlAIcTd1m6JmDy1mJfoqQa3CcmPU1dBkC/hHk1O3MoQ
|
||||
** SIG ** eGxCbvC2xfhhXFL1TvZrjfdKer7zzf0D19n2A6gP41P3
|
||||
** SIG ** CnXsxnUuqmaFBJm3+AZX4cYO9uiv2uybGB+queM6AL/O
|
||||
** SIG ** ipTLAduexzi7D1Kr0eOUA2AKTaD+J20UMvw/l0Dhv5mJ
|
||||
** SIG ** 2+Q5FL3a5NPD6itas5VYVQR9x5rsIwONhSrS/66pYYEw
|
||||
** SIG ** ggVLMIIEM6ADAgECAhBUWPKq10HWRLyEqXugllLmMA0G
|
||||
** SIG ** CSqGSIb3DQEBCwUAMHcxCzAJBgNVBAYTAlVTMR0wGwYD
|
||||
** SIG ** VQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjEfMB0GA1UE
|
||||
** SIG ** CxMWU3ltYW50ZWMgVHJ1c3QgTmV0d29yazEoMCYGA1UE
|
||||
** SIG ** AxMfU3ltYW50ZWMgU0hBMjU2IFRpbWVTdGFtcGluZyBD
|
||||
** SIG ** QTAeFw0xNzAxMDIwMDAwMDBaFw0yODA0MDEyMzU5NTla
|
||||
** SIG ** MIGAMQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50
|
||||
** SIG ** ZWMgQ29ycG9yYXRpb24xHzAdBgNVBAsTFlN5bWFudGVj
|
||||
** SIG ** IFRydXN0IE5ldHdvcmsxMTAvBgNVBAMTKFN5bWFudGVj
|
||||
** SIG ** IFNIQTI1NiBUaW1lU3RhbXBpbmcgU2lnbmVyIC0gRzIw
|
||||
** SIG ** ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZ
|
||||
** SIG ** 8/zYBAkDhvnXXKaTwEJ86nxjz10A4o7zwJDfjyn1GOqU
|
||||
** SIG ** t5Ll17Cgc4Ho6QqbSnwB/52PpDmnDupF9CIMOnDtOUWL
|
||||
** SIG ** 5MUbXPBFaEYkBWN2mxz8nmwqsVblin9Sca7yNdVGIwYc
|
||||
** SIG ** z0gtHbTNuNl2I44c/z6/uwZcaQemZQ74Xq59Lu1NrjXv
|
||||
** SIG ** ydcAQv0olQ6fXXJCCbzD2kTS7cxHhOT8yi2sWL6u967Z
|
||||
** SIG ** RA0It8J31hpDcNFuA95SksQQCHHZuiJV8h+87ZudO+Je
|
||||
** SIG ** HUyD/5cPewvnVYNO0g3rvtfsrm5HuZ/fpdZRvARV7f8n
|
||||
** SIG ** cEzJ7SpLE+GxuUwPyQHuVWVfaQJ4Zss/AgMBAAGjggHH
|
||||
** SIG ** MIIBwzAMBgNVHRMBAf8EAjAAMGYGA1UdIARfMF0wWwYL
|
||||
** SIG ** YIZIAYb4RQEHFwMwTDAjBggrBgEFBQcCARYXaHR0cHM6
|
||||
** SIG ** Ly9kLnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGRoX
|
||||
** SIG ** aHR0cHM6Ly9kLnN5bWNiLmNvbS9ycGEwQAYDVR0fBDkw
|
||||
** SIG ** NzA1oDOgMYYvaHR0cDovL3RzLWNybC53cy5zeW1hbnRl
|
||||
** SIG ** Yy5jb20vc2hhMjU2LXRzcy1jYS5jcmwwFgYDVR0lAQH/
|
||||
** SIG ** BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQDAgeAMHcG
|
||||
** SIG ** CCsGAQUFBwEBBGswaTAqBggrBgEFBQcwAYYeaHR0cDov
|
||||
** SIG ** L3RzLW9jc3Aud3Muc3ltYW50ZWMuY29tMDsGCCsGAQUF
|
||||
** SIG ** BzAChi9odHRwOi8vdHMtYWlhLndzLnN5bWFudGVjLmNv
|
||||
** SIG ** bS9zaGEyNTYtdHNzLWNhLmNlcjAoBgNVHREEITAfpB0w
|
||||
** SIG ** GzEZMBcGA1UEAxMQVGltZVN0YW1wLTIwNDgtNTAdBgNV
|
||||
** SIG ** HQ4EFgQUCbXB/pZylylDmsngArqu+P0vuvYwHwYDVR0j
|
||||
** SIG ** BBgwFoAUr2PWyqNOhXLgp7xB8ymiOH+AdWIwDQYJKoZI
|
||||
** SIG ** hvcNAQELBQADggEBABezCojpXFpeIGs7ChWybMWpijKH
|
||||
** SIG ** 07H0HFOuhb4/m//XvLeUhbTHUn6U6L3tYbLUp5nkw8mT
|
||||
** SIG ** wTU9C+hoCl1WmL2xIjvRRHrXv/BtUTKK1SPfOAE39uJT
|
||||
** SIG ** K3orEY+3TWx6MwMbfGsJlBe75NtY1CETZefs0SXKLHWa
|
||||
** SIG ** nH/8ybsqaKvEfbTPo8lsp9nEAJyJCneR9E2i+zE7hm72
|
||||
** SIG ** 5h9QA4abv8tCq+Z2m3JaEQGKxu+lb5Xn3a665iJl8BhZ
|
||||
** SIG ** GxHJzYC32JdHH0II+KxxH7BGU7PUstWjq1B1SBIXgq3P
|
||||
** SIG ** 4EFPMn7NlRy/kYoIPaSnZwKW3yRMpdBBwIJgo4oXMkvT
|
||||
** SIG ** vM+ktIwxggJaMIICVgIBATCBizB3MQswCQYDVQQGEwJV
|
||||
** SIG ** UzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24x
|
||||
** SIG ** HzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsx
|
||||
** SIG ** KDAmBgNVBAMTH1N5bWFudGVjIFNIQTI1NiBUaW1lU3Rh
|
||||
** SIG ** bXBpbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
|
||||
** SIG ** ggEKAoIBAQC7WZ1ZVU+djHJdGoGi61XzsAGtPHGsMo8F
|
||||
** SIG ** a4aaJwAyl2pNyWQUSym7wtkpuS7sY7Phzz8LVpD4Yht+
|
||||
** SIG ** 66YH4t5/Xm1AONSRBudBfHkcy8utG7/YlZHz8O5s+K2W
|
||||
** SIG ** OS5/wSe4eDnFhKXt7a+Hjs6Nx23q0pi1Oh8eOZ3D9Jqo
|
||||
** SIG ** 9IThxNF8ccYGKbQ/5IMNJsN7CD5N+Qq3M0n/yjvU9bKb
|
||||
** SIG ** S+GImRr1wOkzFNbfx4Dbke7+vJJXcnf0zajM/gn1kze+
|
||||
** SIG ** lYhqxdz0sUvUzugJkV+1hHk1inisGTKPI8EyQRtZDqk+
|
||||
** SIG ** scz51ivvt9jk1R1tETqS9pPJnONI7rtTDtQ2l4Z4xaE3
|
||||
** SIG ** AgMBAAGjggF3MIIBczAOBgNVHQ8BAf8EBAMCAQYwEgYD
|
||||
** SIG ** VR0TAQH/BAgwBgEB/wIBADBmBgNVHSAEXzBdMFsGC2CG
|
||||
** SIG ** SAGG+EUBBxcDMEwwIwYIKwYBBQUHAgEWF2h0dHBzOi8v
|
||||
** SIG ** ZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkaF2h0
|
||||
** SIG ** dHBzOi8vZC5zeW1jYi5jb20vcnBhMC4GCCsGAQUFBwEB
|
||||
** SIG ** BCIwIDAeBggrBgEFBQcwAYYSaHR0cDovL3Muc3ltY2Qu
|
||||
** SIG ** Y29tMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9zLnN5
|
||||
** SIG ** bWNiLmNvbS91bml2ZXJzYWwtcm9vdC5jcmwwEwYDVR0l
|
||||
** SIG ** BAwwCgYIKwYBBQUHAwgwKAYDVR0RBCEwH6QdMBsxGTAX
|
||||
** SIG ** BgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTMwHQYDVR0OBBYE
|
||||
** SIG ** FK9j1sqjToVy4Ke8QfMpojh/gHViMB8GA1UdIwQYMBaA
|
||||
** SIG ** FLZ3+mlIR59TEtXC6gcydgfRlwcZMA0GCSqGSIb3DQEB
|
||||
** SIG ** CwUAA4IBAQB16rAt1TQZXDJF/g7h1E+meMFv1+rd3E/z
|
||||
** SIG ** ociBiPenjxXmQCmt5l30otlWZIRxMCrdHmEXZiBWBpgZ
|
||||
** SIG ** jV1x8viXvAn9HJFHyeLojQP7zJAv1gpsTjPs1rSTyEyQ
|
||||
** SIG ** Y0g5QCHE3dZuiZg8tZiX6KkGtwnJj1NXQZAv4R5NTtzK
|
||||
** SIG ** EHhsQm7wtsX4YVxS9U72a433Snq+8839A9fZ9gOoD+NT
|
||||
** SIG ** 9wp17MZ1LqpmhQSZt/gGV+HGDvbor9rsmxgfqrnjOgC/
|
||||
** SIG ** zoqUywHbnsc4uw9Sq9HjlANgCk2g/idtFDL8P5dA4b+Z
|
||||
** SIG ** idvkORS92uTTw+orWrOVWFUEfcea7CMDjYUq0v+uqWGB
|
||||
** SIG ** MIIFSzCCBDOgAwIBAgIQVFjyqtdB1kS8hKl7oJZS5jAN
|
||||
** SIG ** BgkqhkiG9w0BAQsFADB3MQswCQYDVQQGEwJVUzEdMBsG
|
||||
** SIG ** A1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNV
|
||||
** SIG ** BAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNV
|
||||
** SIG ** BAMTH1N5bWFudGVjIFNIQTI1NiBUaW1lU3RhbXBpbmcg
|
||||
** SIG ** Q0EwHhcNMTcwMTAyMDAwMDAwWhcNMjgwNDAxMjM1OTU5
|
||||
** SIG ** WjCBgDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFu
|
||||
** SIG ** dGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZTeW1hbnRl
|
||||
** SIG ** YyBUcnVzdCBOZXR3b3JrMTEwLwYDVQQDEyhTeW1hbnRl
|
||||
** SIG ** YyBTSEEyNTYgVGltZVN0YW1waW5nIFNpZ25lciAtIEcy
|
||||
** SIG ** MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||
** SIG ** mfP82AQJA4b511ymk8BCfOp8Y89dAOKO88CQ348p9Rjq
|
||||
** SIG ** lLeS5dewoHOB6OkKm0p8Af+dj6Q5pw7qRfQiDDpw7TlF
|
||||
** SIG ** i+TFG1zwRWhGJAVjdpsc/J5sKrFW5Yp/UnGu8jXVRiMG
|
||||
** SIG ** HM9ILR20zbjZdiOOHP8+v7sGXGkHpmUO+F6ufS7tTa41
|
||||
** SIG ** 78nXAEL9KJUOn11yQgm8w9pE0u3MR4Tk/MotrFi+rveu
|
||||
** SIG ** 2UQNCLfCd9YaQ3DRbgPeUpLEEAhx2boiVfIfvO2bnTvi
|
||||
** SIG ** Xh1Mg/+XD3sL51WDTtIN677X7K5uR7mf36XWUbwEVe3/
|
||||
** SIG ** J3BMye0qSxPhsblMD8kB7lVlX2kCeGbLPwIDAQABo4IB
|
||||
** SIG ** xzCCAcMwDAYDVR0TAQH/BAIwADBmBgNVHSAEXzBdMFsG
|
||||
** SIG ** C2CGSAGG+EUBBxcDMEwwIwYIKwYBBQUHAgEWF2h0dHBz
|
||||
** SIG ** Oi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBka
|
||||
** SIG ** F2h0dHBzOi8vZC5zeW1jYi5jb20vcnBhMEAGA1UdHwQ5
|
||||
** SIG ** MDcwNaAzoDGGL2h0dHA6Ly90cy1jcmwud3Muc3ltYW50
|
||||
** SIG ** ZWMuY29tL3NoYTI1Ni10c3MtY2EuY3JsMBYGA1UdJQEB
|
||||
** SIG ** /wQMMAoGCCsGAQUFBwMIMA4GA1UdDwEB/wQEAwIHgDB3
|
||||
** SIG ** BggrBgEFBQcBAQRrMGkwKgYIKwYBBQUHMAGGHmh0dHA6
|
||||
** SIG ** Ly90cy1vY3NwLndzLnN5bWFudGVjLmNvbTA7BggrBgEF
|
||||
** SIG ** BQcwAoYvaHR0cDovL3RzLWFpYS53cy5zeW1hbnRlYy5j
|
||||
** SIG ** b20vc2hhMjU2LXRzcy1jYS5jZXIwKAYDVR0RBCEwH6Qd
|
||||
** SIG ** MBsxGTAXBgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTUwHQYD
|
||||
** SIG ** VR0OBBYEFAm1wf6WcpcpQ5rJ4AK6rvj9L7r2MB8GA1Ud
|
||||
** SIG ** IwQYMBaAFK9j1sqjToVy4Ke8QfMpojh/gHViMA0GCSqG
|
||||
** SIG ** SIb3DQEBCwUAA4IBAQAXswqI6VxaXiBrOwoVsmzFqYoy
|
||||
** SIG ** h9Ox9BxTroW+P5v/17y3lIW0x1J+lOi97WGy1KeZ5MPJ
|
||||
** SIG ** k8E1PQvoaApdVpi9sSI70UR617/wbVEyitUj3zgBN/bi
|
||||
** SIG ** Uyt6KxGPt01sejMDG3xrCZQXu+TbWNQhE2Xn7NElyix1
|
||||
** SIG ** mpx//Mm7KmirxH20z6PJbKfZxACciQp3kfRNovsxO4Zu
|
||||
** SIG ** 9uYfUAOGm7/LQqvmdptyWhEBisbvpW+V592uuuYiZfAY
|
||||
** SIG ** WRsRyc2At9iXRx9CCPiscR+wRlOz1LLVo6tQdUgSF4Kt
|
||||
** SIG ** z+BBTzJ+zZUcv5GKCD2kp2cClt8kTKXQQcCCYKOKFzJL
|
||||
** SIG ** 07zPpLSMMYICWjCCAlYCAQEwgYswdzELMAkGA1UEBhMC
|
||||
** SIG ** VVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9u
|
||||
** SIG ** MR8wHQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3Jr
|
||||
** SIG ** MSgwJgYDVQQDEx9TeW1hbnRlYyBTSEEyNTYgVGltZVN0
|
||||
** SIG ** YW1waW5nIENBAhBUWPKq10HWRLyEqXugllLmMAsGCWCG
|
||||
** SIG ** SAFlAwQCAaCBpDAaBgkqhkiG9w0BCQMxDQYLKoZIhvcN
|
||||
** SIG ** AQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTE3MTIyMjA5MjMx
|
||||
** SIG ** MlowLwYJKoZIhvcNAQkEMSIEIDjC9lH4vmnVGgUQ3K9/
|
||||
** SIG ** UJyaFJXcivYDNejbPrRERGkRMDcGCyqGSIb3DQEJEAIv
|
||||
** SIG ** MSgwJjAkMCIEIM96wXrQR+zV/cNoIgMbEtTvB4tvK0xe
|
||||
** SIG ** a6Qfj/LPS61nMAsGCSqGSIb3DQEBAQSCAQBQNgf6pNDg
|
||||
** SIG ** E7O0sqTK8DqO3WPe9wXqJB4uZqR0YyH8VH/ymK3MTiSo
|
||||
** SIG ** O/4uG0vyAT/t5i5Bvt67lQIgCckpop4u348NUoi9hSNG
|
||||
** SIG ** br/fMo1jib1sHUpqiOcLnZSKjOE717APXkDw3ADWrFsg
|
||||
** SIG ** 2SUEX/fPvYvL/DW3YjTG82iuf9x/QQLqn0W6jbdw9m8d
|
||||
** SIG ** IWbjlTubIjjzuNMVEJIIAuahtqPU+cHW/skzXXoRpvsG
|
||||
** SIG ** o5ga0X7uGNeGYiSalDcVDktNaaJT41xMgAvs7XKhSUK3
|
||||
** SIG ** YTfJrwhpf4ph2JbwONzjhboqQy9Jw2A7pcjl/khfMqX0
|
||||
** SIG ** mRUHJlKxrTA7lM1vbxNkSZIy
|
||||
** SIG ** bXBpbmcgQ0ECEFRY8qrXQdZEvISpe6CWUuYwCwYJYIZI
|
||||
** SIG ** AWUDBAIBoIGkMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0B
|
||||
** SIG ** CRABBDAcBgkqhkiG9w0BCQUxDxcNMTcwNDE4MTI0MzU5
|
||||
** SIG ** WjAvBgkqhkiG9w0BCQQxIgQgKhTtKk9Ooi1gb1eC/Hcy
|
||||
** SIG ** IZVyZTtIoalALNn39GL54zIwNwYLKoZIhvcNAQkQAi8x
|
||||
** SIG ** KDAmMCQwIgQgz3rBetBH7NX9w2giAxsS1O8Hi28rTF5r
|
||||
** SIG ** pB+P8s9LrWcwCwYJKoZIhvcNAQEBBIIBAH1XiJUxrAWs
|
||||
** SIG ** 2r+e1unwxqCO2/tO3X0f1IftZtZrWaErmBlk609PSx7D
|
||||
** SIG ** 0dKjvUL7RCJpZMiZWuTS/TRNIjMWvP4XLjzvZlRkSfET
|
||||
** SIG ** T272f3oUm9NBSSaMlaFhoqVDlCK6rOcinQ7EnHuP4lXO
|
||||
** SIG ** ellRCLI1uAt3fmnopu3Qnx2Q7BwZA2H1H16QYlf5ZyHj
|
||||
** SIG ** okQsmQIv9LEMBIMj8G/zGAERAu3KS0SCpOMHuY50DEDw
|
||||
** SIG ** pmnIrTbQU++fZ3XDvIiS3hILMoHCH7m3qCIldjOqBjHE
|
||||
** SIG ** GRap0p3ApfFeMtm4lR/8kibaaAd/JQXlUwpf8WE+1btN
|
||||
** SIG ** je2WincBIwL4kuzHxrFfzB8=
|
||||
</signature>
|
||||
</package>
|
||||
|
||||
405
bin/MkLnk.wsf
405
bin/MkLnk.wsf
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Copyright 1991-2015 Amebis
|
||||
Copyright 1991-2017 Amebis
|
||||
|
||||
This file is part of MkLink.
|
||||
|
||||
@@ -84,201 +84,216 @@ MkLnk.wsf "%USERPROFILE%\Desktop\My shortcut.lnk" "%windir%\notep
|
||||
</job>
|
||||
|
||||
<signature>
|
||||
** SIG ** MIIZKwYJKoZIhvcNAQcCoIIZHDCCGRgCAQExCzAJBgUr
|
||||
** SIG ** MIIbIAYJKoZIhvcNAQcCoIIbETCCGw0CAQExCzAJBgUr
|
||||
** SIG ** DgMCGgUAMGcGCisGAQQBgjcCAQSgWTBXMDIGCisGAQQB
|
||||
** SIG ** gjcCAR4wJAIBAQQQcAVhGs441BGiowAQS9NQkAIBAAIB
|
||||
** SIG ** AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFMH67hpbFt5K
|
||||
** SIG ** CSnD9RSD/SRyKRZSoIIUJTCCA+4wggNXoAMCAQICEH6T
|
||||
** SIG ** 6/t8xk5Z6kuad9QG/DswDQYJKoZIhvcNAQEFBQAwgYsx
|
||||
** SIG ** CzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENh
|
||||
** SIG ** cGUxFDASBgNVBAcTC0R1cmJhbnZpbGxlMQ8wDQYDVQQK
|
||||
** SIG ** EwZUaGF3dGUxHTAbBgNVBAsTFFRoYXd0ZSBDZXJ0aWZp
|
||||
** SIG ** Y2F0aW9uMR8wHQYDVQQDExZUaGF3dGUgVGltZXN0YW1w
|
||||
** SIG ** aW5nIENBMB4XDTEyMTIyMTAwMDAwMFoXDTIwMTIzMDIz
|
||||
** SIG ** NTk1OVowXjELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5
|
||||
** SIG ** bWFudGVjIENvcnBvcmF0aW9uMTAwLgYDVQQDEydTeW1h
|
||||
** SIG ** bnRlYyBUaW1lIFN0YW1waW5nIFNlcnZpY2VzIENBIC0g
|
||||
** SIG ** RzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
|
||||
** SIG ** AQCxrLNJVEuXHBIK2CV5kSJXKm/cuCbEQ3Nrwr8uUFr7
|
||||
** SIG ** FMJ2jkMBJUO0oeJF9Oi3e8N0zCLXtJQAAvdN7b+0t0Qk
|
||||
** SIG ** a81fRTvRRM5DEnMXgotptCvLmR6schsmTXEfsTHd+1Fh
|
||||
** SIG ** AlOmqvVJLAV4RaUvic7nmef+jOJXPz3GktxK+Hsz5HkK
|
||||
** SIG ** +/B1iEGc/8UDUZmq12yfk2mHZSmDhcJgFMTIyTsU2sCB
|
||||
** SIG ** 8B8NdN6SIqvK9/t0fCfm90obf6fDni2uiuqm5qonFn1h
|
||||
** SIG ** 95hxEbziUKFL5V365Q6nLJ+qZSDT2JboyHylTkhE/xni
|
||||
** SIG ** RAeSC9dohIBdanhkRc1gRn5UwRN8xXnxycFxAgMBAAGj
|
||||
** SIG ** gfowgfcwHQYDVR0OBBYEFF+a9W5czMx0mtTdfe8/2+xM
|
||||
** SIG ** gC7dMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcwAYYW
|
||||
** SIG ** aHR0cDovL29jc3AudGhhd3RlLmNvbTASBgNVHRMBAf8E
|
||||
** SIG ** CDAGAQH/AgEAMD8GA1UdHwQ4MDYwNKAyoDCGLmh0dHA6
|
||||
** SIG ** Ly9jcmwudGhhd3RlLmNvbS9UaGF3dGVUaW1lc3RhbXBp
|
||||
** SIG ** bmdDQS5jcmwwEwYDVR0lBAwwCgYIKwYBBQUHAwgwDgYD
|
||||
** SIG ** VR0PAQH/BAQDAgEGMCgGA1UdEQQhMB+kHTAbMRkwFwYD
|
||||
** SIG ** VQQDExBUaW1lU3RhbXAtMjA0OC0xMA0GCSqGSIb3DQEB
|
||||
** SIG ** BQUAA4GBAAMJm495739ZMKrvaLX64wkdu0+CBl03X6ZS
|
||||
** SIG ** nxaN6hySCURu9W3rWHww6PlpjSNzCxJvR6muORH4KrGb
|
||||
** SIG ** sBrDjutZlgCtzgxNstAxpghcKnr84nodV0yoZRjpeUBi
|
||||
** SIG ** JZZux8c3aoMhCI5B6t3ZVz8dd0mHKhYGXqY4aiISo1EZ
|
||||
** SIG ** g362MIIEozCCA4ugAwIBAgIQDs/0OMj+vzVuBNhqmBsa
|
||||
** SIG ** UDANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQGEwJVUzEd
|
||||
** SIG ** MBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xMDAu
|
||||
** SIG ** BgNVBAMTJ1N5bWFudGVjIFRpbWUgU3RhbXBpbmcgU2Vy
|
||||
** SIG ** dmljZXMgQ0EgLSBHMjAeFw0xMjEwMTgwMDAwMDBaFw0y
|
||||
** SIG ** MDEyMjkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMR0wGwYD
|
||||
** SIG ** VQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjE0MDIGA1UE
|
||||
** SIG ** AxMrU3ltYW50ZWMgVGltZSBTdGFtcGluZyBTZXJ2aWNl
|
||||
** SIG ** cyBTaWduZXIgLSBHNDCCASIwDQYJKoZIhvcNAQEBBQAD
|
||||
** SIG ** ggEPADCCAQoCggEBAKJjCzlEuLsjp0RJuw7/ofBhClOT
|
||||
** SIG ** sJjbrSwPSsVu/4Y8U1UPFc4EPyv9qZaW2b5heQtbyUyG
|
||||
** SIG ** duXgQ0sile7CK0PBn9hotI5AT+6FOLkRxSPyZFjwFTJv
|
||||
** SIG ** TlehroikAtcqHs1L4d1j1ReJMluwXplaqJ0oUA4X7pbb
|
||||
** SIG ** YTtFUR3PElYLkkf8q672Zj1HrHBy55LnX80QucSDZJQZ
|
||||
** SIG ** vSWA4ejSIqXQugJ6oXeTW2XD7hd0vEGGKtwITIySjJEt
|
||||
** SIG ** nndEH2jWqHR32w5bMotWizO92WPISZ06xcXqMwvS8aMb
|
||||
** SIG ** 9Iu+2bNXizveBKd6IrIkri7HcMW+ToMmCPsLvalPmQjh
|
||||
** SIG ** EChyqs0CAwEAAaOCAVcwggFTMAwGA1UdEwEB/wQCMAAw
|
||||
** SIG ** FgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/
|
||||
** SIG ** BAQDAgeAMHMGCCsGAQUFBwEBBGcwZTAqBggrBgEFBQcw
|
||||
** SIG ** AYYeaHR0cDovL3RzLW9jc3Aud3Muc3ltYW50ZWMuY29t
|
||||
** SIG ** MDcGCCsGAQUFBzAChitodHRwOi8vdHMtYWlhLndzLnN5
|
||||
** SIG ** bWFudGVjLmNvbS90c3MtY2EtZzIuY2VyMDwGA1UdHwQ1
|
||||
** SIG ** MDMwMaAvoC2GK2h0dHA6Ly90cy1jcmwud3Muc3ltYW50
|
||||
** SIG ** ZWMuY29tL3Rzcy1jYS1nMi5jcmwwKAYDVR0RBCEwH6Qd
|
||||
** SIG ** MBsxGTAXBgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTIwHQYD
|
||||
** SIG ** VR0OBBYEFEbGaaMOShQe1UzaUmMXP142vA3mMB8GA1Ud
|
||||
** SIG ** IwQYMBaAFF+a9W5czMx0mtTdfe8/2+xMgC7dMA0GCSqG
|
||||
** SIG ** SIb3DQEBBQUAA4IBAQB4O7SRKgBM8I9iMDd4o4QnB28Y
|
||||
** SIG ** st4l3KDUlAOqhk4ln5pAAxzdzuN5yyFoBtq2MrRtv/Qs
|
||||
** SIG ** JmMz5ElkbQ3mw2cO9wWkNWx8iRbG6bLfsundIMZxD82V
|
||||
** SIG ** dNy2XN69Nx9DeOZ4tc0oBCCjqvFLxIgpkQ6A0RH83Vx2
|
||||
** SIG ** bk9eDkVGQW4NsOo4mrE62glxEPwcebSAe6xp9P2ctgwW
|
||||
** SIG ** K/F/Wwk9m1viFsoTgW0ALjgNqCmPLOGy9FqpAa8VnCwv
|
||||
** SIG ** SRvbIrvD/niUUcOGsYKIXfA9tFGheTMrLnu53CAJE3Hr
|
||||
** SIG ** ahlbz+ilMFcsiUk/uc9/yb8+ImhjU5q9aXSsxR08f5Lg
|
||||
** SIG ** w7wc2AR1MIIFejCCBGKgAwIBAgIQQIeLZ2eQpZcEKJ6U
|
||||
** SIG ** AwIaGzANBgkqhkiG9w0BAQUFADCBtDELMAkGA1UEBhMC
|
||||
** SIG ** VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYD
|
||||
** SIG ** VQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYD
|
||||
** SIG ** VQQLEzJUZXJtcyBvZiB1c2UgYXQgaHR0cHM6Ly93d3cu
|
||||
** SIG ** dmVyaXNpZ24uY29tL3JwYSAoYykxMDEuMCwGA1UEAxMl
|
||||
** SIG ** VmVyaVNpZ24gQ2xhc3MgMyBDb2RlIFNpZ25pbmcgMjAx
|
||||
** SIG ** MCBDQTAeFw0xMjA5MjYwMDAwMDBaFw0xNTEwMTEyMzU5
|
||||
** SIG ** NTlaMIG9MQswCQYDVQQGEwJTSTERMA8GA1UECBMIU2xv
|
||||
** SIG ** dmVuaWExDzANBgNVBAcTBkthbW5pazEWMBQGA1UEChQN
|
||||
** SIG ** QW1lYmlzIGQuby5vLjE+MDwGA1UECxM1RGlnaXRhbCBJ
|
||||
** SIG ** RCBDbGFzcyAzIC0gTWljcm9zb2Z0IFNvZnR3YXJlIFZh
|
||||
** SIG ** bGlkYXRpb24gdjIxGjAYBgNVBAsUEXByb2dyYW1za2Eg
|
||||
** SIG ** b3ByZW1hMRYwFAYDVQQDFA1BbWViaXMgZC5vLm8uMIIB
|
||||
** SIG ** IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9QZF
|
||||
** SIG ** QzscW51y/Ermb72+gkWUJ6ExfOS1UHvNAcefWdFm4yVX
|
||||
** SIG ** wqi8TRT+P5czX+UjKbh77d00CxODQK7rdLb8+EgKybFT
|
||||
** SIG ** /bVfT2y8RMtEdG0qI84ZSwh2POazD0PyiHb9XORN2yKH
|
||||
** SIG ** ykqLiO+6cJvZXjfNpGqf/LxkXVJvyxaemN1XTR91ohhc
|
||||
** SIG ** 97bNyGCP0M8PNKRZ6Hr5uKlZyr7QLYoYAkaENYdXHrOc
|
||||
** SIG ** l5CmBAIL56Ngc8vIlLF2lLPmDYf1qWrPpJyXfj7p3iUf
|
||||
** SIG ** AewtEpbC5FfhCaeHwgg41NfxhRWCXEBTewLHQJtpSo2k
|
||||
** SIG ** mwv5Q1ZuWMDUjPeuHZ3F/ofBoJTE4wIDAQABo4IBezCC
|
||||
** SIG ** AXcwCQYDVR0TBAIwADAOBgNVHQ8BAf8EBAMCB4AwQAYD
|
||||
** SIG ** VR0fBDkwNzA1oDOgMYYvaHR0cDovL2NzYzMtMjAxMC1j
|
||||
** SIG ** cmwudmVyaXNpZ24uY29tL0NTQzMtMjAxMC5jcmwwRAYD
|
||||
** SIG ** VR0gBD0wOzA5BgtghkgBhvhFAQcXAzAqMCgGCCsGAQUF
|
||||
** SIG ** BwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBh
|
||||
** SIG ** MBMGA1UdJQQMMAoGCCsGAQUFBwMDMHEGCCsGAQUFBwEB
|
||||
** SIG ** BGUwYzAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVy
|
||||
** SIG ** aXNpZ24uY29tMDsGCCsGAQUFBzAChi9odHRwOi8vY3Nj
|
||||
** SIG ** My0yMDEwLWFpYS52ZXJpc2lnbi5jb20vQ1NDMy0yMDEw
|
||||
** SIG ** LmNlcjAfBgNVHSMEGDAWgBTPmanqeyb0S8mOj9fwBSbv
|
||||
** SIG ** 49KnnTARBglghkgBhvhCAQEEBAMCBBAwFgYKKwYBBAGC
|
||||
** SIG ** NwIBGwQIMAYBAQABAf8wDQYJKoZIhvcNAQEFBQADggEB
|
||||
** SIG ** AOMOvRZGpbGuLiIAaqp22r2WAOzxinLpe0O/pJCmBoU0
|
||||
** SIG ** lK/Es/Jyc4Y90QyvvhoSVKoZ2hMQ2Y6N7oSkhHjKo/n8
|
||||
** SIG ** WIQwNvaqZu4JpO9IgH1WkfqJWnpVcaVGPA0uHhuDhPe9
|
||||
** SIG ** gH6Z6I3HC5GL7sc+z4n0kzy1f3AyD+DihQhD0J/i/sgF
|
||||
** SIG ** iEaFmwwlJHMv6b4xmERMff050y15k875cdRpeFvSjHko
|
||||
** SIG ** IUbY2bfPlnvhWd/4eidkT3KY5Lpm4cqUO20166p2Cjxf
|
||||
** SIG ** i9kEGuDPYEYiX94hQmjWwZfIYxdYdD9f+gVcyPpiMspq
|
||||
** SIG ** n5QwKHOenweisG6BwXs4H5q45SLx1oJ9PUQwggYKMIIE
|
||||
** SIG ** 8qADAgECAhBSAOWqJVb8GobtlsnUSzPHMA0GCSqGSIb3
|
||||
** SIG ** DQEBBQUAMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMO
|
||||
** SIG ** VmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWdu
|
||||
** SIG ** IFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA2
|
||||
** SIG ** IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQg
|
||||
** SIG ** dXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNz
|
||||
** SIG ** IDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBB
|
||||
** SIG ** dXRob3JpdHkgLSBHNTAeFw0xMDAyMDgwMDAwMDBaFw0y
|
||||
** SIG ** MDAyMDcyMzU5NTlaMIG0MQswCQYDVQQGEwJVUzEXMBUG
|
||||
** SIG ** A1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
|
||||
** SIG ** cmlTaWduIFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRl
|
||||
** SIG ** cm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2ln
|
||||
** SIG ** bi5jb20vcnBhIChjKTEwMS4wLAYDVQQDEyVWZXJpU2ln
|
||||
** SIG ** biBDbGFzcyAzIENvZGUgU2lnbmluZyAyMDEwIENBMIIB
|
||||
** SIG ** IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9SNL
|
||||
** SIG ** XqXXirsy6dRX9+/kxyZ+rRmY/qidfZT2NmsQ13WBMH8E
|
||||
** SIG ** aH/LK3UezR0IjN9plKc3o5x7gOCZ4e43TV/OOxTuhtTQ
|
||||
** SIG ** 9Sc1vCULOKeMY50Xowilq7D7zWpigkzVIdob2fHjhDuK
|
||||
** SIG ** Kk+FW5ABT8mndhB/JwN8vq5+fcHd+QW8G0icaefApDw8
|
||||
** SIG ** QQA+35blxeSUcdZVAccAJkpAPLWhJqkMp22AjpAle8+/
|
||||
** SIG ** PxzrL5b65Yd3xrVWsno7VDBTG99iNP8e0fRakyiF5UwX
|
||||
** SIG ** Tn5b/aSTmX/fze+kde/vFfZH5/gZctguNBqmtKdMfr27
|
||||
** SIG ** Tww9V/Ew1qY2jtaAdtcZLqXNfjQtiQIDAQABo4IB/jCC
|
||||
** SIG ** AfowEgYDVR0TAQH/BAgwBgEB/wIBADBwBgNVHSAEaTBn
|
||||
** SIG ** MGUGC2CGSAGG+EUBBxcDMFYwKAYIKwYBBQUHAgEWHGh0
|
||||
** SIG ** dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMwKgYIKwYB
|
||||
** SIG ** BQUHAgIwHhocaHR0cHM6Ly93d3cudmVyaXNpZ24uY29t
|
||||
** SIG ** L3JwYTAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwE
|
||||
** SIG ** YTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAHBgUr
|
||||
** SIG ** DgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0
|
||||
** SIG ** cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYw
|
||||
** SIG ** NAYDVR0fBC0wKzApoCegJYYjaHR0cDovL2NybC52ZXJp
|
||||
** SIG ** c2lnbi5jb20vcGNhMy1nNS5jcmwwNAYIKwYBBQUHAQEE
|
||||
** SIG ** KDAmMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC52ZXJp
|
||||
** SIG ** c2lnbi5jb20wHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsG
|
||||
** SIG ** AQUFBwMDMCgGA1UdEQQhMB+kHTAbMRkwFwYDVQQDExBW
|
||||
** SIG ** ZXJpU2lnbk1QS0ktMi04MB0GA1UdDgQWBBTPmanqeyb0
|
||||
** SIG ** S8mOj9fwBSbv49KnnTAfBgNVHSMEGDAWgBR/02Wnwt3s
|
||||
** SIG ** u/AwCfNDOfoCrzMxMzANBgkqhkiG9w0BAQUFAAOCAQEA
|
||||
** SIG ** ViLmNKTEYctIuQGtVqhkD9mMkcS7zAzlrXqgIn/fRzhK
|
||||
** SIG ** LWzRf3EafOxwqbHwT+QPDFP6FV7+dJhJJIWBJhyRFEew
|
||||
** SIG ** TGOMu6E01MZF6A2FJnMD0KmMZG3ccZLmRQVgFVlROfxY
|
||||
** SIG ** FGv+1KTteWsIDEFy5zciBgm+I+k/RJoe6WGdzLGQXPw9
|
||||
** SIG ** 0o2sQj1lNtS0PUAoj5sQzyMmzEsgy5AfXYxMNMo82OU3
|
||||
** SIG ** 1m+lIL006ybZrg3nxZr3obQhkTNvhuhYuyV8dA5Y/nUb
|
||||
** SIG ** Yz/OMXybjxuWnsVTdoRbnK2R+qztk7pdyCFTwoJTY68S
|
||||
** SIG ** DVCHERs9VFKWiiycPZIaCJoFLseTpUiR0zGCBHIwggRu
|
||||
** SIG ** AgEBMIHJMIG0MQswCQYDVQQGEwJVUzEXMBUGA1UEChMO
|
||||
** SIG ** VmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWdu
|
||||
** SIG ** IFRydXN0IE5ldHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9m
|
||||
** SIG ** IHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5jb20v
|
||||
** SIG ** cnBhIChjKTEwMS4wLAYDVQQDEyVWZXJpU2lnbiBDbGFz
|
||||
** SIG ** cyAzIENvZGUgU2lnbmluZyAyMDEwIENBAhBAh4tnZ5Cl
|
||||
** SIG ** lwQonpQDAhobMAkGBSsOAwIaBQCgcDAQBgorBgEEAYI3
|
||||
** SIG ** AgEMMQIwADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIB
|
||||
** SIG ** BDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAj
|
||||
** SIG ** BgkqhkiG9w0BCQQxFgQUo0XIWEliS73GY2JUwO4mY7Vo
|
||||
** SIG ** A8MwDQYJKoZIhvcNAQEBBQAEggEAE9VEPAaBwp2sFl8I
|
||||
** SIG ** K/xN2uQFkV70yEWp6yL2vqUC4RXVKL03gNIdjAo2nSD5
|
||||
** SIG ** /hGnPJfgohxkXYwX856kUpaqBuQg9ipHBdED9VVFvOZt
|
||||
** SIG ** WbyGa0YKlXMeGmh8tMXbDB2iPxdYpi8/yd94hhH3AOuP
|
||||
** SIG ** dtp+VIxj9NyXvgVXsZgZxOATw8Lp0tDKu0l8bKUJI3aB
|
||||
** SIG ** K7kwGqwBpeFRTLxvAKvHVUBB3yh13WSZPJRdLSr3xWZB
|
||||
** SIG ** Hd9Lgd82tcKQtLtOR+qD9Yiy52EBvztc8KuafJg7zme2
|
||||
** SIG ** wLjAMqgNqJGJaQBpCckUUwqj0yq6b6jDU0SoXwtpGhBv
|
||||
** SIG ** UI2hMesTx2W1wNVsP6GCAgswggIHBgkqhkiG9w0BCQYx
|
||||
** SIG ** ggH4MIIB9AIBATByMF4xCzAJBgNVBAYTAlVTMR0wGwYD
|
||||
** SIG ** VQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjEwMC4GA1UE
|
||||
** SIG ** AxMnU3ltYW50ZWMgVGltZSBTdGFtcGluZyBTZXJ2aWNl
|
||||
** SIG ** cyBDQSAtIEcyAhAOz/Q4yP6/NW4E2GqYGxpQMAkGBSsO
|
||||
** SIG ** AwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcB
|
||||
** SIG ** MBwGCSqGSIb3DQEJBTEPFw0xNTAyMjUwODA3NTZaMCMG
|
||||
** SIG ** CSqGSIb3DQEJBDEWBBSrTeWj/s+8idpt/o21ULaKmPhi
|
||||
** SIG ** jDANBgkqhkiG9w0BAQEFAASCAQChWhzPUW+SFZWpvasx
|
||||
** SIG ** s9OtZB+VWXTTA1pCx9m/JkEon9B+kakUVF+X8TyolR2H
|
||||
** SIG ** YS7Z4k2NNnHg8SW3jOU8+gvbcZBnx/5c6c6N4VWCsg89
|
||||
** SIG ** BofJ8kMU82zS/bQFQLs/OG82cjgJu52N0T2zGsc5V2LY
|
||||
** SIG ** e915NPlBo2SdI4VkBimXfgyBeUPom07bqRgM47o4NRiF
|
||||
** SIG ** DWtEsYzuG9IrwRp/LJcH+lQfh5mFbJ0f895/7Oj9ifG3
|
||||
** SIG ** YB5XE3BtMfX3kB9skXxmZqQI/YDJdCaIPytWfbX6MKjg
|
||||
** SIG ** tB2tsnV6MDtG8XvSEzQiLCzeSNvjs8+64Q7E4VS21Hvz
|
||||
** SIG ** pXI1ABSnlaWUaAhA
|
||||
** SIG ** AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFFdHeRozDEj2
|
||||
** SIG ** yO1NZYotDVj37pO0oIIKLzCCBM4wggO2oAMCAQICEDB6
|
||||
** SIG ** NnqqPmiBpvlPCMs7OWQwDQYJKoZIhvcNAQELBQAwfzEL
|
||||
** SIG ** MAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENv
|
||||
** SIG ** cnBvcmF0aW9uMR8wHQYDVQQLExZTeW1hbnRlYyBUcnVz
|
||||
** SIG ** dCBOZXR3b3JrMTAwLgYDVQQDEydTeW1hbnRlYyBDbGFz
|
||||
** SIG ** cyAzIFNIQTI1NiBDb2RlIFNpZ25pbmcgQ0EwHhcNMTUx
|
||||
** SIG ** MDA5MDAwMDAwWhcNMTgxMTA3MjM1OTU5WjBhMQswCQYD
|
||||
** SIG ** VQQGEwJTSTERMA8GA1UECBMIU2xvdmVuaWExDzANBgNV
|
||||
** SIG ** BAcTBkthbW5pazEWMBQGA1UEChQNQW1lYmlzIGQuby5v
|
||||
** SIG ** LjEWMBQGA1UEAxQNQW1lYmlzIGQuby5vLjCCASIwDQYJ
|
||||
** SIG ** KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfy6Bdwx2kq
|
||||
** SIG ** yGhtaYAZgcA8pWLe7EbyLqBHRq/8jIVfUX1CH7fsbEz1
|
||||
** SIG ** UDgIq74BvilG3BNyjJxh/lbiu2Pr2M0ad3WEy4p0kM9T
|
||||
** SIG ** SmABC8k3Vc5pmJlNy1++uMpNwAbUmbGcD6Igsvk1xPWb
|
||||
** SIG ** ApLoAdnO0KfTfzvRI40A0cGZVGt5y6GPemN6jT8JAp9O
|
||||
** SIG ** KaWIqj3iF00c/FwS7ODZf2w/cMphLjUle+b86GyewVGE
|
||||
** SIG ** MEVO5ZjS9ksEWBDWn9A6XYshSwbDWnx4xmIl0B4DcWVA
|
||||
** SIG ** aY+zqEQzQbzEGC/izPDq44RiCtbhi+QqgQ/6fNXm3hbA
|
||||
** SIG ** GVcYPYa4J5D1UMO+1NC2cPMCAwEAAaOCAWIwggFeMAkG
|
||||
** SIG ** A1UdEwQCMAAwDgYDVR0PAQH/BAQDAgeAMCsGA1UdHwQk
|
||||
** SIG ** MCIwIKAeoByGGmh0dHA6Ly9zdi5zeW1jYi5jb20vc3Yu
|
||||
** SIG ** Y3JsMGYGA1UdIARfMF0wWwYLYIZIAYb4RQEHFwMwTDAj
|
||||
** SIG ** BggrBgEFBQcCARYXaHR0cHM6Ly9kLnN5bWNiLmNvbS9j
|
||||
** SIG ** cHMwJQYIKwYBBQUHAgIwGQwXaHR0cHM6Ly9kLnN5bWNi
|
||||
** SIG ** LmNvbS9ycGEwEwYDVR0lBAwwCgYIKwYBBQUHAwMwVwYI
|
||||
** SIG ** KwYBBQUHAQEESzBJMB8GCCsGAQUFBzABhhNodHRwOi8v
|
||||
** SIG ** c3Yuc3ltY2QuY29tMCYGCCsGAQUFBzAChhpodHRwOi8v
|
||||
** SIG ** c3Yuc3ltY2IuY29tL3N2LmNydDAfBgNVHSMEGDAWgBSW
|
||||
** SIG ** O1PweTOXr32D7y4rzMq3hh5yZjAdBgNVHQ4EFgQU9we9
|
||||
** SIG ** loCaLXTEfww9PSfd1JAKn8wwDQYJKoZIhvcNAQELBQAD
|
||||
** SIG ** ggEBAIpxL0AvtcrbShLKgI7dmLn6WJbpdzkB9e2Cm1Mu
|
||||
** SIG ** AAIiogLFF1n07l0VXZE+gqxGHB8ji2h33t+o1R8PLyyI
|
||||
** SIG ** kdnMhHAd78HsqyZzabfmWuCP12TKBv77wiZkpbTo/Av+
|
||||
** SIG ** z0SlpJRoMpzzXhyPPtHdby80bSu+4RXlewiDCH56aGE4
|
||||
** SIG ** SSk0i8Xa9JJ/ozPKLX3Szdmg6J58XtDH/tq5K1/ABSCB
|
||||
** SIG ** z6SF2Y9l9lRJpGXchSDYCPipSVUGP0WPQRTDNobSwCJD
|
||||
** SIG ** XAz9UFcxWo4Rh8o/gvlLWUH+T3HhmLSRzXqt3JuqJo5x
|
||||
** SIG ** H8s4vPzcGBZZFob8yRB98KD6ioFK2pjRRSw9FucwggVZ
|
||||
** SIG ** MIIEQaADAgECAhA9eNf5dklgsmF99PAeyoYqMA0GCSqG
|
||||
** SIG ** SIb3DQEBCwUAMIHKMQswCQYDVQQGEwJVUzEXMBUGA1UE
|
||||
** SIG ** ChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
|
||||
** SIG ** aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAy
|
||||
** SIG ** MDA2IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6
|
||||
** SIG ** ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENs
|
||||
** SIG ** YXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlv
|
||||
** SIG ** biBBdXRob3JpdHkgLSBHNTAeFw0xMzEyMTAwMDAwMDBa
|
||||
** SIG ** Fw0yMzEyMDkyMzU5NTlaMH8xCzAJBgNVBAYTAlVTMR0w
|
||||
** SIG ** GwYDVQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjEfMB0G
|
||||
** SIG ** A1UECxMWU3ltYW50ZWMgVHJ1c3QgTmV0d29yazEwMC4G
|
||||
** SIG ** A1UEAxMnU3ltYW50ZWMgQ2xhc3MgMyBTSEEyNTYgQ29k
|
||||
** SIG ** ZSBTaWduaW5nIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
|
||||
** SIG ** AQ8AMIIBCgKCAQEAl4MeABavLLHSCMTXaJNRYB5x9uJH
|
||||
** SIG ** tNtYTSNiarS/WhtR96MNGHdou9g2qy8hUNqe8+dfJ04L
|
||||
** SIG ** wpfICXCTqdpcDU6kDZGgtOwUzpFyVC7Oo9tE6VIbP0E8
|
||||
** SIG ** ykrkqsDoOatTzCHQzM9/m+bCzFhqghXuPTbPHMWXBySO
|
||||
** SIG ** 8Xu+MS09bty1mUKfS2GVXxxw7hd924vlYYl4x2gbrxF4
|
||||
** SIG ** GpiuxFVHU9mzMtahDkZAxZeSitFTp5lbhTVX0+qTYmEg
|
||||
** SIG ** CscwdyQRTWKDtrp7aIIx7mXK3/nVjbI13Iwrb2pyXGCE
|
||||
** SIG ** nPIMlF7AVlIASMzT+KV93i/XE+Q4qITVRrgThsIbnepa
|
||||
** SIG ** ON2b2wIDAQABo4IBgzCCAX8wLwYIKwYBBQUHAQEEIzAh
|
||||
** SIG ** MB8GCCsGAQUFBzABhhNodHRwOi8vczIuc3ltY2IuY29t
|
||||
** SIG ** MBIGA1UdEwEB/wQIMAYBAf8CAQAwbAYDVR0gBGUwYzBh
|
||||
** SIG ** BgtghkgBhvhFAQcXAzBSMCYGCCsGAQUFBwIBFhpodHRw
|
||||
** SIG ** Oi8vd3d3LnN5bWF1dGguY29tL2NwczAoBggrBgEFBQcC
|
||||
** SIG ** AjAcGhpodHRwOi8vd3d3LnN5bWF1dGguY29tL3JwYTAw
|
||||
** SIG ** BgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vczEuc3ltY2Iu
|
||||
** SIG ** Y29tL3BjYTMtZzUuY3JsMB0GA1UdJQQWMBQGCCsGAQUF
|
||||
** SIG ** BwMCBggrBgEFBQcDAzAOBgNVHQ8BAf8EBAMCAQYwKQYD
|
||||
** SIG ** VR0RBCIwIKQeMBwxGjAYBgNVBAMTEVN5bWFudGVjUEtJ
|
||||
** SIG ** LTEtNTY3MB0GA1UdDgQWBBSWO1PweTOXr32D7y4rzMq3
|
||||
** SIG ** hh5yZjAfBgNVHSMEGDAWgBR/02Wnwt3su/AwCfNDOfoC
|
||||
** SIG ** rzMxMzANBgkqhkiG9w0BAQsFAAOCAQEAE4UaHmmpN/eg
|
||||
** SIG ** vaSvfh1hU/6djF4MpnUeeBcj3f3sGgNVOftxlcdlWqeO
|
||||
** SIG ** MNJEWmHbcG/aIQXCLnO6SfHRk/5dyc1eA+CJnj90Htf3
|
||||
** SIG ** OIup1s+7NS8zWKiSVtHITTuC5nmEFvwosLFH8x2iPu6H
|
||||
** SIG ** 2aZ/pFalP62ELinefLyoqqM9BAHqupOiDlAiKRdMh+Q6
|
||||
** SIG ** EV/WpCWJmwVrL7TJAUwnewusGQUioGAVP9rJ+01Mj/ty
|
||||
** SIG ** Z3f9J5THujUOiEn+jf0or0oSvQ2zlwXeRAwV+jYrA9zB
|
||||
** SIG ** UAHxoRFdFOXivSdLVL4rhF4PpsN0BQrvl8OJIrEfd/O9
|
||||
** SIG ** zUPU8UypP7WLhK9k8tAUITGCEF0wghBZAgEBMIGTMH8x
|
||||
** SIG ** CzAJBgNVBAYTAlVTMR0wGwYDVQQKExRTeW1hbnRlYyBD
|
||||
** SIG ** b3Jwb3JhdGlvbjEfMB0GA1UECxMWU3ltYW50ZWMgVHJ1
|
||||
** SIG ** c3QgTmV0d29yazEwMC4GA1UEAxMnU3ltYW50ZWMgQ2xh
|
||||
** SIG ** c3MgMyBTSEEyNTYgQ29kZSBTaWduaW5nIENBAhAwejZ6
|
||||
** SIG ** qj5ogab5TwjLOzlkMAkGBSsOAwIaBQCgcDAQBgorBgEE
|
||||
** SIG ** AYI3AgEMMQIwADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGC
|
||||
** SIG ** NwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIB
|
||||
** SIG ** FTAjBgkqhkiG9w0BCQQxFgQUh5Ng4RHmAAAyrsnJEsPP
|
||||
** SIG ** lmD0Y5AwDQYJKoZIhvcNAQEBBQAEggEABk6clvJdfSma
|
||||
** SIG ** NyYvNtHIe1SjhsXZEcE8l3C57Xq2W4mfUsBjvK/e/sQM
|
||||
** SIG ** gwvJraeIBG5z4em89zCWlWPZ+0XLoUKVA4Y/r5DdjuGQ
|
||||
** SIG ** sag75KmkRVDaIUoR5yGl5x/UuZmCZv/N1dKzD+er2XMS
|
||||
** SIG ** VYlzQr4RrciKHcewspIikVlM3x5UAhuxCWob+/xZivyr
|
||||
** SIG ** bx6Burt213CWfAdS8gA9oIjhZSDyn8Ov+UEfM6GNCc2Y
|
||||
** SIG ** ZVjeMs592YKhtV95/+Wjgka4idGVU0kyNF1Aa6KnjdOZ
|
||||
** SIG ** E1T+Y5GWXJqzGZ0pwCOmkzqY6bf9yTVbBg+/Akfrgjr3
|
||||
** SIG ** JZXbQ9I+Ty6HcYykXBhdXqGCDiwwgg4oBgorBgEEAYI3
|
||||
** SIG ** AwMBMYIOGDCCDhQGCSqGSIb3DQEHAqCCDgUwgg4BAgED
|
||||
** SIG ** MQ0wCwYJYIZIAWUDBAIBMIH/BgsqhkiG9w0BCRABBKCB
|
||||
** SIG ** 7wSB7DCB6QIBAQYLYIZIAYb4RQEHFwMwITAJBgUrDgMC
|
||||
** SIG ** GgUABBTyBQT1RIvviW/L5kIDS2bbcMxhAAIVAMyeUKFl
|
||||
** SIG ** YE0HTEopw0cbT7jR4mVzGA8yMDE3MDQxODEyNDQwMlow
|
||||
** SIG ** AwIBHqCBhqSBgzCBgDELMAkGA1UEBhMCVVMxHTAbBgNV
|
||||
** SIG ** BAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQL
|
||||
** SIG ** ExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMTEwLwYDVQQD
|
||||
** SIG ** EyhTeW1hbnRlYyBTSEEyNTYgVGltZVN0YW1waW5nIFNp
|
||||
** SIG ** Z25lciAtIEcyoIIKizCCBTgwggQgoAMCAQICEHsFsdRJ
|
||||
** SIG ** aFFE98mJ0pwZnRIwDQYJKoZIhvcNAQELBQAwgb0xCzAJ
|
||||
** SIG ** BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5j
|
||||
** SIG ** LjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y
|
||||
** SIG ** azE6MDgGA1UECxMxKGMpIDIwMDggVmVyaVNpZ24sIElu
|
||||
** SIG ** Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE4MDYG
|
||||
** SIG ** A1UEAxMvVmVyaVNpZ24gVW5pdmVyc2FsIFJvb3QgQ2Vy
|
||||
** SIG ** dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTYwMTEyMDAw
|
||||
** SIG ** MDAwWhcNMzEwMTExMjM1OTU5WjB3MQswCQYDVQQGEwJV
|
||||
** SIG ** UzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24x
|
||||
** SIG ** HzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsx
|
||||
** SIG ** KDAmBgNVBAMTH1N5bWFudGVjIFNIQTI1NiBUaW1lU3Rh
|
||||
** SIG ** bXBpbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
|
||||
** SIG ** ggEKAoIBAQC7WZ1ZVU+djHJdGoGi61XzsAGtPHGsMo8F
|
||||
** SIG ** a4aaJwAyl2pNyWQUSym7wtkpuS7sY7Phzz8LVpD4Yht+
|
||||
** SIG ** 66YH4t5/Xm1AONSRBudBfHkcy8utG7/YlZHz8O5s+K2W
|
||||
** SIG ** OS5/wSe4eDnFhKXt7a+Hjs6Nx23q0pi1Oh8eOZ3D9Jqo
|
||||
** SIG ** 9IThxNF8ccYGKbQ/5IMNJsN7CD5N+Qq3M0n/yjvU9bKb
|
||||
** SIG ** S+GImRr1wOkzFNbfx4Dbke7+vJJXcnf0zajM/gn1kze+
|
||||
** SIG ** lYhqxdz0sUvUzugJkV+1hHk1inisGTKPI8EyQRtZDqk+
|
||||
** SIG ** scz51ivvt9jk1R1tETqS9pPJnONI7rtTDtQ2l4Z4xaE3
|
||||
** SIG ** AgMBAAGjggF3MIIBczAOBgNVHQ8BAf8EBAMCAQYwEgYD
|
||||
** SIG ** VR0TAQH/BAgwBgEB/wIBADBmBgNVHSAEXzBdMFsGC2CG
|
||||
** SIG ** SAGG+EUBBxcDMEwwIwYIKwYBBQUHAgEWF2h0dHBzOi8v
|
||||
** SIG ** ZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkaF2h0
|
||||
** SIG ** dHBzOi8vZC5zeW1jYi5jb20vcnBhMC4GCCsGAQUFBwEB
|
||||
** SIG ** BCIwIDAeBggrBgEFBQcwAYYSaHR0cDovL3Muc3ltY2Qu
|
||||
** SIG ** Y29tMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9zLnN5
|
||||
** SIG ** bWNiLmNvbS91bml2ZXJzYWwtcm9vdC5jcmwwEwYDVR0l
|
||||
** SIG ** BAwwCgYIKwYBBQUHAwgwKAYDVR0RBCEwH6QdMBsxGTAX
|
||||
** SIG ** BgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTMwHQYDVR0OBBYE
|
||||
** SIG ** FK9j1sqjToVy4Ke8QfMpojh/gHViMB8GA1UdIwQYMBaA
|
||||
** SIG ** FLZ3+mlIR59TEtXC6gcydgfRlwcZMA0GCSqGSIb3DQEB
|
||||
** SIG ** CwUAA4IBAQB16rAt1TQZXDJF/g7h1E+meMFv1+rd3E/z
|
||||
** SIG ** ociBiPenjxXmQCmt5l30otlWZIRxMCrdHmEXZiBWBpgZ
|
||||
** SIG ** jV1x8viXvAn9HJFHyeLojQP7zJAv1gpsTjPs1rSTyEyQ
|
||||
** SIG ** Y0g5QCHE3dZuiZg8tZiX6KkGtwnJj1NXQZAv4R5NTtzK
|
||||
** SIG ** EHhsQm7wtsX4YVxS9U72a433Snq+8839A9fZ9gOoD+NT
|
||||
** SIG ** 9wp17MZ1LqpmhQSZt/gGV+HGDvbor9rsmxgfqrnjOgC/
|
||||
** SIG ** zoqUywHbnsc4uw9Sq9HjlANgCk2g/idtFDL8P5dA4b+Z
|
||||
** SIG ** idvkORS92uTTw+orWrOVWFUEfcea7CMDjYUq0v+uqWGB
|
||||
** SIG ** MIIFSzCCBDOgAwIBAgIQVFjyqtdB1kS8hKl7oJZS5jAN
|
||||
** SIG ** BgkqhkiG9w0BAQsFADB3MQswCQYDVQQGEwJVUzEdMBsG
|
||||
** SIG ** A1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNV
|
||||
** SIG ** BAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNV
|
||||
** SIG ** BAMTH1N5bWFudGVjIFNIQTI1NiBUaW1lU3RhbXBpbmcg
|
||||
** SIG ** Q0EwHhcNMTcwMTAyMDAwMDAwWhcNMjgwNDAxMjM1OTU5
|
||||
** SIG ** WjCBgDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFu
|
||||
** SIG ** dGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZTeW1hbnRl
|
||||
** SIG ** YyBUcnVzdCBOZXR3b3JrMTEwLwYDVQQDEyhTeW1hbnRl
|
||||
** SIG ** YyBTSEEyNTYgVGltZVN0YW1waW5nIFNpZ25lciAtIEcy
|
||||
** SIG ** MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||
** SIG ** mfP82AQJA4b511ymk8BCfOp8Y89dAOKO88CQ348p9Rjq
|
||||
** SIG ** lLeS5dewoHOB6OkKm0p8Af+dj6Q5pw7qRfQiDDpw7TlF
|
||||
** SIG ** i+TFG1zwRWhGJAVjdpsc/J5sKrFW5Yp/UnGu8jXVRiMG
|
||||
** SIG ** HM9ILR20zbjZdiOOHP8+v7sGXGkHpmUO+F6ufS7tTa41
|
||||
** SIG ** 78nXAEL9KJUOn11yQgm8w9pE0u3MR4Tk/MotrFi+rveu
|
||||
** SIG ** 2UQNCLfCd9YaQ3DRbgPeUpLEEAhx2boiVfIfvO2bnTvi
|
||||
** SIG ** Xh1Mg/+XD3sL51WDTtIN677X7K5uR7mf36XWUbwEVe3/
|
||||
** SIG ** J3BMye0qSxPhsblMD8kB7lVlX2kCeGbLPwIDAQABo4IB
|
||||
** SIG ** xzCCAcMwDAYDVR0TAQH/BAIwADBmBgNVHSAEXzBdMFsG
|
||||
** SIG ** C2CGSAGG+EUBBxcDMEwwIwYIKwYBBQUHAgEWF2h0dHBz
|
||||
** SIG ** Oi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBka
|
||||
** SIG ** F2h0dHBzOi8vZC5zeW1jYi5jb20vcnBhMEAGA1UdHwQ5
|
||||
** SIG ** MDcwNaAzoDGGL2h0dHA6Ly90cy1jcmwud3Muc3ltYW50
|
||||
** SIG ** ZWMuY29tL3NoYTI1Ni10c3MtY2EuY3JsMBYGA1UdJQEB
|
||||
** SIG ** /wQMMAoGCCsGAQUFBwMIMA4GA1UdDwEB/wQEAwIHgDB3
|
||||
** SIG ** BggrBgEFBQcBAQRrMGkwKgYIKwYBBQUHMAGGHmh0dHA6
|
||||
** SIG ** Ly90cy1vY3NwLndzLnN5bWFudGVjLmNvbTA7BggrBgEF
|
||||
** SIG ** BQcwAoYvaHR0cDovL3RzLWFpYS53cy5zeW1hbnRlYy5j
|
||||
** SIG ** b20vc2hhMjU2LXRzcy1jYS5jZXIwKAYDVR0RBCEwH6Qd
|
||||
** SIG ** MBsxGTAXBgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTUwHQYD
|
||||
** SIG ** VR0OBBYEFAm1wf6WcpcpQ5rJ4AK6rvj9L7r2MB8GA1Ud
|
||||
** SIG ** IwQYMBaAFK9j1sqjToVy4Ke8QfMpojh/gHViMA0GCSqG
|
||||
** SIG ** SIb3DQEBCwUAA4IBAQAXswqI6VxaXiBrOwoVsmzFqYoy
|
||||
** SIG ** h9Ox9BxTroW+P5v/17y3lIW0x1J+lOi97WGy1KeZ5MPJ
|
||||
** SIG ** k8E1PQvoaApdVpi9sSI70UR617/wbVEyitUj3zgBN/bi
|
||||
** SIG ** Uyt6KxGPt01sejMDG3xrCZQXu+TbWNQhE2Xn7NElyix1
|
||||
** SIG ** mpx//Mm7KmirxH20z6PJbKfZxACciQp3kfRNovsxO4Zu
|
||||
** SIG ** 9uYfUAOGm7/LQqvmdptyWhEBisbvpW+V592uuuYiZfAY
|
||||
** SIG ** WRsRyc2At9iXRx9CCPiscR+wRlOz1LLVo6tQdUgSF4Kt
|
||||
** SIG ** z+BBTzJ+zZUcv5GKCD2kp2cClt8kTKXQQcCCYKOKFzJL
|
||||
** SIG ** 07zPpLSMMYICWjCCAlYCAQEwgYswdzELMAkGA1UEBhMC
|
||||
** SIG ** VVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9u
|
||||
** SIG ** MR8wHQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3Jr
|
||||
** SIG ** MSgwJgYDVQQDEx9TeW1hbnRlYyBTSEEyNTYgVGltZVN0
|
||||
** SIG ** YW1waW5nIENBAhBUWPKq10HWRLyEqXugllLmMAsGCWCG
|
||||
** SIG ** SAFlAwQCAaCBpDAaBgkqhkiG9w0BCQMxDQYLKoZIhvcN
|
||||
** SIG ** AQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTE3MDQxODEyNDQw
|
||||
** SIG ** MlowLwYJKoZIhvcNAQkEMSIEILHqBzTscF8lh+FK7g2t
|
||||
** SIG ** 9A0O6rHk8j/L3MJ11/EMxA96MDcGCyqGSIb3DQEJEAIv
|
||||
** SIG ** MSgwJjAkMCIEIM96wXrQR+zV/cNoIgMbEtTvB4tvK0xe
|
||||
** SIG ** a6Qfj/LPS61nMAsGCSqGSIb3DQEBAQSCAQBURpMMWBM+
|
||||
** SIG ** Kdzjmvg/btSpl0lZ6oVobdcn9w7dAw4EOTXWfrnNt9qI
|
||||
** SIG ** afs2g5ZflDnanEBu42yiWkPt75tV49Zar5y6Nh8UfIe7
|
||||
** SIG ** 7fgXnyABWAoD/L8kxAcmC1XG2QF/5M9bnTpHGn/In4za
|
||||
** SIG ** 369lOomXWXJo5GAkZQlwU9v8Y4YuT2BJEVX9XELBjSTN
|
||||
** SIG ** 4hMOY3WqPr/pMcEC48N+27LTQbR4S1HHcHe3Jh/QILnZ
|
||||
** SIG ** +XRSvWj6SWI34oL1VcHVEaGT+25SJ+mL8kvN/60pv9p4
|
||||
** SIG ** IuMou3rHazqswdZbgMJS5owBAxea1EKcnQWIcpl9VQXj
|
||||
** SIG ** Ty/vnpoPcGdDRPPVMN4Czfmc
|
||||
</signature>
|
||||
</package>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<package>
|
||||
<job id="CharImport">
|
||||
<runtime>
|
||||
<description>Unicode Character Description Update - Amebis, Copyright © 2016-2017</description>
|
||||
<description>Unicode Character Description Update - Amebis, Copyright © 2016</description>
|
||||
<unnamed name="<ZRCola.mdb>" required="true" helpstring="ZRCola database"/>
|
||||
<unnamed name="<UnicodeData.txt>" required="true" helpstring="Unicode character database (from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt)"/>
|
||||
<named name="F" type="simple" required="false" helpstring="Force overwrite of existing data"/>
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
<job id="CharDescGenerate">
|
||||
<runtime>
|
||||
<description>Dynamic Character Description Generator - Amebis, Copyright © 2016-2017</description>
|
||||
<description>Dynamic Character Description Generator - Amebis, Copyright © 2016</description>
|
||||
<unnamed name="<ZRCola.mdb>" required="true" helpstring="ZRCola database"/>
|
||||
<named name="F" type="simple" required="false" helpstring="Force overwrite of existing data"/>
|
||||
</runtime>
|
||||
@@ -480,7 +480,7 @@
|
||||
|
||||
<job id="CharTagsSet">
|
||||
<runtime>
|
||||
<description>Create and set initial character tags - Amebis, Copyright © 2016-2017</description>
|
||||
<description>Create and set initial character tags - Amebis, Copyright © 2016</description>
|
||||
<unnamed name="<ZRCola.mdb>" required="true" helpstring="ZRCola database"/>
|
||||
</runtime>
|
||||
<reference object="ADODB.Connection"/>
|
||||
@@ -3975,11 +3975,11 @@
|
||||
</job>
|
||||
|
||||
<signature>
|
||||
** SIG ** MIIbHwYJKoZIhvcNAQcCoIIbEDCCGwwCAQExCzAJBgUr
|
||||
** SIG ** MIIbIAYJKoZIhvcNAQcCoIIbETCCGw0CAQExCzAJBgUr
|
||||
** SIG ** DgMCGgUAMGcGCisGAQQBgjcCAQSgWTBXMDIGCisGAQQB
|
||||
** SIG ** gjcCAR4wJAIBAQQQcAVhGs441BGiowAQS9NQkAIBAAIB
|
||||
** SIG ** AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFFs8OhUsPi8R
|
||||
** SIG ** iJN1VrPQnCzD3uneoIIKLzCCBM4wggO2oAMCAQICEDB6
|
||||
** SIG ** AAIBAAIBAAIBADAhMAkGBSsOAwIaBQAEFOjAK2fMh9fJ
|
||||
** SIG ** WmNxFll+i7wGG1PhoIIKLzCCBM4wggO2oAMCAQICEDB6
|
||||
** SIG ** NnqqPmiBpvlPCMs7OWQwDQYJKoZIhvcNAQELBQAwfzEL
|
||||
** SIG ** MAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENv
|
||||
** SIG ** cnBvcmF0aW9uMR8wHQYDVQQLExZTeW1hbnRlYyBUcnVz
|
||||
@@ -4058,7 +4058,7 @@
|
||||
** SIG ** EV/WpCWJmwVrL7TJAUwnewusGQUioGAVP9rJ+01Mj/ty
|
||||
** SIG ** Z3f9J5THujUOiEn+jf0or0oSvQ2zlwXeRAwV+jYrA9zB
|
||||
** SIG ** UAHxoRFdFOXivSdLVL4rhF4PpsN0BQrvl8OJIrEfd/O9
|
||||
** SIG ** zUPU8UypP7WLhK9k8tAUITGCEFwwghBYAgEBMIGTMH8x
|
||||
** SIG ** zUPU8UypP7WLhK9k8tAUITGCEF0wghBZAgEBMIGTMH8x
|
||||
** SIG ** CzAJBgNVBAYTAlVTMR0wGwYDVQQKExRTeW1hbnRlYyBD
|
||||
** SIG ** b3Jwb3JhdGlvbjEfMB0GA1UECxMWU3ltYW50ZWMgVHJ1
|
||||
** SIG ** c3QgTmV0d29yazEwMC4GA1UEAxMnU3ltYW50ZWMgQ2xh
|
||||
@@ -4066,125 +4066,125 @@
|
||||
** SIG ** qj5ogab5TwjLOzlkMAkGBSsOAwIaBQCgcDAQBgorBgEE
|
||||
** SIG ** AYI3AgEMMQIwADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGC
|
||||
** SIG ** NwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIB
|
||||
** SIG ** FTAjBgkqhkiG9w0BCQQxFgQU2eBWVkRbhnnHifFZIhKx
|
||||
** SIG ** bEgmVv0wDQYJKoZIhvcNAQEBBQAEggEAk6gWLo+shFOF
|
||||
** SIG ** dbjla3CfPVrklhzPvNkuqx9qUDQiJ5lKXW0xRi8gpd/T
|
||||
** SIG ** biUQO14E7Fop2pzmlC1bE2F0BAgBHzeNr+k1kEajizKH
|
||||
** SIG ** 6fOVRKrw7ntuPeom3yiSHDqcw8U+8QsqY9IHpwxq90do
|
||||
** SIG ** 0fuU1MKvfsf/ga4suqPew5AXRzU7Fvhid4cYZKCSMf1x
|
||||
** SIG ** UtWJh6pZCacKFmj9Vd2GOGXj3H2nR9ytYi/H3WjKBwdn
|
||||
** SIG ** r0k+AMnC5GnPdrb1w26l740ndh+aPcZ9sLNc3pAlBKhJ
|
||||
** SIG ** s9K9yVDafTzf3J7ycElkSwVpiETsx5yDwFWnjWMxYVn+
|
||||
** SIG ** uVLD/l22/SuIuuGCEy2C/aGCDiswgg4nBgorBgEEAYI3
|
||||
** SIG ** AwMBMYIOFzCCDhMGCSqGSIb3DQEHAqCCDgQwgg4AAgED
|
||||
** SIG ** MQ0wCwYJYIZIAWUDBAIBMIH+BgsqhkiG9w0BCRABBKCB
|
||||
** SIG ** 7gSB6zCB6AIBAQYLYIZIAYb4RQEHFwMwITAJBgUrDgMC
|
||||
** SIG ** GgUABBRt9cmH/lzRtb1mRxSGk38J0Yz6OAIUTaVmB7fQ
|
||||
** SIG ** bxZqRR2QkM+CJH/mCS4YDzIwMTcxMjIyMDkyMzE2WjAD
|
||||
** SIG ** AgEeoIGGpIGDMIGAMQswCQYDVQQGEwJVUzEdMBsGA1UE
|
||||
** SIG ** ChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNVBAsT
|
||||
** SIG ** FlN5bWFudGVjIFRydXN0IE5ldHdvcmsxMTAvBgNVBAMT
|
||||
** SIG ** KFN5bWFudGVjIFNIQTI1NiBUaW1lU3RhbXBpbmcgU2ln
|
||||
** SIG ** bmVyIC0gRzKgggqLMIIFODCCBCCgAwIBAgIQewWx1Elo
|
||||
** SIG ** UUT3yYnSnBmdEjANBgkqhkiG9w0BAQsFADCBvTELMAkG
|
||||
** SIG ** A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMu
|
||||
** SIG ** MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3Jr
|
||||
** SIG ** MTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5j
|
||||
** SIG ** LiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYD
|
||||
** SIG ** VQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0
|
||||
** SIG ** aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNjAxMTIwMDAw
|
||||
** SIG ** MDBaFw0zMTAxMTEyMzU5NTlaMHcxCzAJBgNVBAYTAlVT
|
||||
** SIG ** MR0wGwYDVQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjEf
|
||||
** SIG ** MB0GA1UECxMWU3ltYW50ZWMgVHJ1c3QgTmV0d29yazEo
|
||||
** SIG ** MCYGA1UEAxMfU3ltYW50ZWMgU0hBMjU2IFRpbWVTdGFt
|
||||
** SIG ** cGluZyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
|
||||
** SIG ** AQoCggEBALtZnVlVT52Mcl0agaLrVfOwAa08cawyjwVr
|
||||
** SIG ** hponADKXak3JZBRLKbvC2Sm5Luxjs+HPPwtWkPhiG37r
|
||||
** SIG ** pgfi3n9ebUA41JEG50F8eRzLy60bv9iVkfPw7mz4rZY5
|
||||
** SIG ** Ln/BJ7h4OcWEpe3tr4eOzo3HberSmLU6Hx45ncP0mqj0
|
||||
** SIG ** hOHE0XxxxgYptD/kgw0mw3sIPk35CrczSf/KO9T1sptL
|
||||
** SIG ** 4YiZGvXA6TMU1t/HgNuR7v68kldyd/TNqMz+CfWTN76V
|
||||
** SIG ** iGrF3PSxS9TO6AmRX7WEeTWKeKwZMo8jwTJBG1kOqT6x
|
||||
** SIG ** zPnWK++32OTVHW0ROpL2k8mc40juu1MO1DaXhnjFoTcC
|
||||
** SIG ** AwEAAaOCAXcwggFzMA4GA1UdDwEB/wQEAwIBBjASBgNV
|
||||
** SIG ** HRMBAf8ECDAGAQH/AgEAMGYGA1UdIARfMF0wWwYLYIZI
|
||||
** SIG ** AYb4RQEHFwMwTDAjBggrBgEFBQcCARYXaHR0cHM6Ly9k
|
||||
** SIG ** LnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGRoXaHR0
|
||||
** SIG ** cHM6Ly9kLnN5bWNiLmNvbS9ycGEwLgYIKwYBBQUHAQEE
|
||||
** SIG ** IjAgMB4GCCsGAQUFBzABhhJodHRwOi8vcy5zeW1jZC5j
|
||||
** SIG ** b20wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL3Muc3lt
|
||||
** SIG ** Y2IuY29tL3VuaXZlcnNhbC1yb290LmNybDATBgNVHSUE
|
||||
** SIG ** DDAKBggrBgEFBQcDCDAoBgNVHREEITAfpB0wGzEZMBcG
|
||||
** SIG ** A1UEAxMQVGltZVN0YW1wLTIwNDgtMzAdBgNVHQ4EFgQU
|
||||
** SIG ** r2PWyqNOhXLgp7xB8ymiOH+AdWIwHwYDVR0jBBgwFoAU
|
||||
** SIG ** tnf6aUhHn1MS1cLqBzJ2B9GXBxkwDQYJKoZIhvcNAQEL
|
||||
** SIG ** BQADggEBAHXqsC3VNBlcMkX+DuHUT6Z4wW/X6t3cT/Oh
|
||||
** SIG ** yIGI96ePFeZAKa3mXfSi2VZkhHEwKt0eYRdmIFYGmBmN
|
||||
** SIG ** XXHy+Je8Cf0ckUfJ4uiNA/vMkC/WCmxOM+zWtJPITJBj
|
||||
** SIG ** SDlAIcTd1m6JmDy1mJfoqQa3CcmPU1dBkC/hHk1O3MoQ
|
||||
** SIG ** eGxCbvC2xfhhXFL1TvZrjfdKer7zzf0D19n2A6gP41P3
|
||||
** SIG ** CnXsxnUuqmaFBJm3+AZX4cYO9uiv2uybGB+queM6AL/O
|
||||
** SIG ** ipTLAduexzi7D1Kr0eOUA2AKTaD+J20UMvw/l0Dhv5mJ
|
||||
** SIG ** 2+Q5FL3a5NPD6itas5VYVQR9x5rsIwONhSrS/66pYYEw
|
||||
** SIG ** ggVLMIIEM6ADAgECAhBUWPKq10HWRLyEqXugllLmMA0G
|
||||
** SIG ** CSqGSIb3DQEBCwUAMHcxCzAJBgNVBAYTAlVTMR0wGwYD
|
||||
** SIG ** VQQKExRTeW1hbnRlYyBDb3Jwb3JhdGlvbjEfMB0GA1UE
|
||||
** SIG ** CxMWU3ltYW50ZWMgVHJ1c3QgTmV0d29yazEoMCYGA1UE
|
||||
** SIG ** AxMfU3ltYW50ZWMgU0hBMjU2IFRpbWVTdGFtcGluZyBD
|
||||
** SIG ** QTAeFw0xNzAxMDIwMDAwMDBaFw0yODA0MDEyMzU5NTla
|
||||
** SIG ** MIGAMQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50
|
||||
** SIG ** ZWMgQ29ycG9yYXRpb24xHzAdBgNVBAsTFlN5bWFudGVj
|
||||
** SIG ** IFRydXN0IE5ldHdvcmsxMTAvBgNVBAMTKFN5bWFudGVj
|
||||
** SIG ** IFNIQTI1NiBUaW1lU3RhbXBpbmcgU2lnbmVyIC0gRzIw
|
||||
** SIG ** ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZ
|
||||
** SIG ** 8/zYBAkDhvnXXKaTwEJ86nxjz10A4o7zwJDfjyn1GOqU
|
||||
** SIG ** t5Ll17Cgc4Ho6QqbSnwB/52PpDmnDupF9CIMOnDtOUWL
|
||||
** SIG ** 5MUbXPBFaEYkBWN2mxz8nmwqsVblin9Sca7yNdVGIwYc
|
||||
** SIG ** z0gtHbTNuNl2I44c/z6/uwZcaQemZQ74Xq59Lu1NrjXv
|
||||
** SIG ** ydcAQv0olQ6fXXJCCbzD2kTS7cxHhOT8yi2sWL6u967Z
|
||||
** SIG ** RA0It8J31hpDcNFuA95SksQQCHHZuiJV8h+87ZudO+Je
|
||||
** SIG ** HUyD/5cPewvnVYNO0g3rvtfsrm5HuZ/fpdZRvARV7f8n
|
||||
** SIG ** cEzJ7SpLE+GxuUwPyQHuVWVfaQJ4Zss/AgMBAAGjggHH
|
||||
** SIG ** MIIBwzAMBgNVHRMBAf8EAjAAMGYGA1UdIARfMF0wWwYL
|
||||
** SIG ** YIZIAYb4RQEHFwMwTDAjBggrBgEFBQcCARYXaHR0cHM6
|
||||
** SIG ** Ly9kLnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGRoX
|
||||
** SIG ** aHR0cHM6Ly9kLnN5bWNiLmNvbS9ycGEwQAYDVR0fBDkw
|
||||
** SIG ** NzA1oDOgMYYvaHR0cDovL3RzLWNybC53cy5zeW1hbnRl
|
||||
** SIG ** Yy5jb20vc2hhMjU2LXRzcy1jYS5jcmwwFgYDVR0lAQH/
|
||||
** SIG ** BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQDAgeAMHcG
|
||||
** SIG ** CCsGAQUFBwEBBGswaTAqBggrBgEFBQcwAYYeaHR0cDov
|
||||
** SIG ** L3RzLW9jc3Aud3Muc3ltYW50ZWMuY29tMDsGCCsGAQUF
|
||||
** SIG ** BzAChi9odHRwOi8vdHMtYWlhLndzLnN5bWFudGVjLmNv
|
||||
** SIG ** bS9zaGEyNTYtdHNzLWNhLmNlcjAoBgNVHREEITAfpB0w
|
||||
** SIG ** GzEZMBcGA1UEAxMQVGltZVN0YW1wLTIwNDgtNTAdBgNV
|
||||
** SIG ** HQ4EFgQUCbXB/pZylylDmsngArqu+P0vuvYwHwYDVR0j
|
||||
** SIG ** BBgwFoAUr2PWyqNOhXLgp7xB8ymiOH+AdWIwDQYJKoZI
|
||||
** SIG ** hvcNAQELBQADggEBABezCojpXFpeIGs7ChWybMWpijKH
|
||||
** SIG ** 07H0HFOuhb4/m//XvLeUhbTHUn6U6L3tYbLUp5nkw8mT
|
||||
** SIG ** wTU9C+hoCl1WmL2xIjvRRHrXv/BtUTKK1SPfOAE39uJT
|
||||
** SIG ** K3orEY+3TWx6MwMbfGsJlBe75NtY1CETZefs0SXKLHWa
|
||||
** SIG ** nH/8ybsqaKvEfbTPo8lsp9nEAJyJCneR9E2i+zE7hm72
|
||||
** SIG ** 5h9QA4abv8tCq+Z2m3JaEQGKxu+lb5Xn3a665iJl8BhZ
|
||||
** SIG ** GxHJzYC32JdHH0II+KxxH7BGU7PUstWjq1B1SBIXgq3P
|
||||
** SIG ** 4EFPMn7NlRy/kYoIPaSnZwKW3yRMpdBBwIJgo4oXMkvT
|
||||
** SIG ** vM+ktIwxggJaMIICVgIBATCBizB3MQswCQYDVQQGEwJV
|
||||
** SIG ** FTAjBgkqhkiG9w0BCQQxFgQU1JiqEBFfMLz+ewvucB0g
|
||||
** SIG ** YCeAM7EwDQYJKoZIhvcNAQEBBQAEggEASOfdyfso3+eN
|
||||
** SIG ** te5yCJXV9sWpFSsx8AOVFHCJ/Jomo40NU8VxLKvYH8eU
|
||||
** SIG ** XdjdKSJgf2PinrtHR2xitUrwb7WvIVeAlrnO1ZdvwzAG
|
||||
** SIG ** Xes/RjEhMZ2X6x5fh+yaIrF+r0qcGSXaZjBrkBUZDMzo
|
||||
** SIG ** ub8miWO7AtxyGV+T4mUtJjKnS7eIUfO63h1GvwVz0usf
|
||||
** SIG ** vloF+FCb02TlERIr4N9uO1OK+j5md6DDh5WZyCki6FAl
|
||||
** SIG ** ptvjgbDfi7T9Vpae8jdZmBTcog0QGhmCBmN9Br7DDojU
|
||||
** SIG ** OSaEEJ4XTa+TIBFFslWLIImQ8FCaySzsLx+6k2aI9N56
|
||||
** SIG ** dZhMtwv0ITsEF75iU7us+KGCDiwwgg4oBgorBgEEAYI3
|
||||
** SIG ** AwMBMYIOGDCCDhQGCSqGSIb3DQEHAqCCDgUwgg4BAgED
|
||||
** SIG ** MQ0wCwYJYIZIAWUDBAIBMIH/BgsqhkiG9w0BCRABBKCB
|
||||
** SIG ** 7wSB7DCB6QIBAQYLYIZIAYb4RQEHFwMwITAJBgUrDgMC
|
||||
** SIG ** GgUABBRpigMmb6ApU583AUw7154GsXnZIgIVAPAoqBpf
|
||||
** SIG ** lG9FED3JtlJaAQhNVaq8GA8yMDE3MDQxODEyNDMxNFow
|
||||
** SIG ** AwIBHqCBhqSBgzCBgDELMAkGA1UEBhMCVVMxHTAbBgNV
|
||||
** SIG ** BAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8wHQYDVQQL
|
||||
** SIG ** ExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMTEwLwYDVQQD
|
||||
** SIG ** EyhTeW1hbnRlYyBTSEEyNTYgVGltZVN0YW1waW5nIFNp
|
||||
** SIG ** Z25lciAtIEcyoIIKizCCBTgwggQgoAMCAQICEHsFsdRJ
|
||||
** SIG ** aFFE98mJ0pwZnRIwDQYJKoZIhvcNAQELBQAwgb0xCzAJ
|
||||
** SIG ** BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5j
|
||||
** SIG ** LjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y
|
||||
** SIG ** azE6MDgGA1UECxMxKGMpIDIwMDggVmVyaVNpZ24sIElu
|
||||
** SIG ** Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE4MDYG
|
||||
** SIG ** A1UEAxMvVmVyaVNpZ24gVW5pdmVyc2FsIFJvb3QgQ2Vy
|
||||
** SIG ** dGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTYwMTEyMDAw
|
||||
** SIG ** MDAwWhcNMzEwMTExMjM1OTU5WjB3MQswCQYDVQQGEwJV
|
||||
** SIG ** UzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24x
|
||||
** SIG ** HzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsx
|
||||
** SIG ** KDAmBgNVBAMTH1N5bWFudGVjIFNIQTI1NiBUaW1lU3Rh
|
||||
** SIG ** bXBpbmcgQ0ECEFRY8qrXQdZEvISpe6CWUuYwCwYJYIZI
|
||||
** SIG ** AWUDBAIBoIGkMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0B
|
||||
** SIG ** CRABBDAcBgkqhkiG9w0BCQUxDxcNMTcxMjIyMDkyMzE2
|
||||
** SIG ** WjAvBgkqhkiG9w0BCQQxIgQgh6iyk0Har2MEw9zXTWSm
|
||||
** SIG ** UOWAoxD7/AdxP04ivLw8slIwNwYLKoZIhvcNAQkQAi8x
|
||||
** SIG ** KDAmMCQwIgQgz3rBetBH7NX9w2giAxsS1O8Hi28rTF5r
|
||||
** SIG ** pB+P8s9LrWcwCwYJKoZIhvcNAQEBBIIBAB8Cmh1gdqFS
|
||||
** SIG ** fcBY06p1vqBjMZ2KB0Bcp5shE0u9I/ec/y+nEoPwEeoz
|
||||
** SIG ** /1LMWUCG/NEVu9oNotl7gpotBrhjI099+/nBMBvXDfAe
|
||||
** SIG ** OnKR2mRtq8+GTkhbeJncFduzDfomOJHgzMwPqf/D1xrD
|
||||
** SIG ** xjLrjOfcjcDqNctMCtGQ0moHR57Z3c1F6uBOLQaxPGrg
|
||||
** SIG ** RpwMNsB64iBtiYavDUjfSYQALPO+p9tLpdJDlH0rvo0s
|
||||
** SIG ** qtczy028q9iRnVVgXOKU3vKcKiq+xenfhE3OaIda29+e
|
||||
** SIG ** Hc5Ao2yIebivZ1+kT/tj5ZYhrv1wDxqSHmK5XpiAkZiD
|
||||
** SIG ** ii4KGN8WABXfV/wf52XoG30=
|
||||
** SIG ** bXBpbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
|
||||
** SIG ** ggEKAoIBAQC7WZ1ZVU+djHJdGoGi61XzsAGtPHGsMo8F
|
||||
** SIG ** a4aaJwAyl2pNyWQUSym7wtkpuS7sY7Phzz8LVpD4Yht+
|
||||
** SIG ** 66YH4t5/Xm1AONSRBudBfHkcy8utG7/YlZHz8O5s+K2W
|
||||
** SIG ** OS5/wSe4eDnFhKXt7a+Hjs6Nx23q0pi1Oh8eOZ3D9Jqo
|
||||
** SIG ** 9IThxNF8ccYGKbQ/5IMNJsN7CD5N+Qq3M0n/yjvU9bKb
|
||||
** SIG ** S+GImRr1wOkzFNbfx4Dbke7+vJJXcnf0zajM/gn1kze+
|
||||
** SIG ** lYhqxdz0sUvUzugJkV+1hHk1inisGTKPI8EyQRtZDqk+
|
||||
** SIG ** scz51ivvt9jk1R1tETqS9pPJnONI7rtTDtQ2l4Z4xaE3
|
||||
** SIG ** AgMBAAGjggF3MIIBczAOBgNVHQ8BAf8EBAMCAQYwEgYD
|
||||
** SIG ** VR0TAQH/BAgwBgEB/wIBADBmBgNVHSAEXzBdMFsGC2CG
|
||||
** SIG ** SAGG+EUBBxcDMEwwIwYIKwYBBQUHAgEWF2h0dHBzOi8v
|
||||
** SIG ** ZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkaF2h0
|
||||
** SIG ** dHBzOi8vZC5zeW1jYi5jb20vcnBhMC4GCCsGAQUFBwEB
|
||||
** SIG ** BCIwIDAeBggrBgEFBQcwAYYSaHR0cDovL3Muc3ltY2Qu
|
||||
** SIG ** Y29tMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9zLnN5
|
||||
** SIG ** bWNiLmNvbS91bml2ZXJzYWwtcm9vdC5jcmwwEwYDVR0l
|
||||
** SIG ** BAwwCgYIKwYBBQUHAwgwKAYDVR0RBCEwH6QdMBsxGTAX
|
||||
** SIG ** BgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTMwHQYDVR0OBBYE
|
||||
** SIG ** FK9j1sqjToVy4Ke8QfMpojh/gHViMB8GA1UdIwQYMBaA
|
||||
** SIG ** FLZ3+mlIR59TEtXC6gcydgfRlwcZMA0GCSqGSIb3DQEB
|
||||
** SIG ** CwUAA4IBAQB16rAt1TQZXDJF/g7h1E+meMFv1+rd3E/z
|
||||
** SIG ** ociBiPenjxXmQCmt5l30otlWZIRxMCrdHmEXZiBWBpgZ
|
||||
** SIG ** jV1x8viXvAn9HJFHyeLojQP7zJAv1gpsTjPs1rSTyEyQ
|
||||
** SIG ** Y0g5QCHE3dZuiZg8tZiX6KkGtwnJj1NXQZAv4R5NTtzK
|
||||
** SIG ** EHhsQm7wtsX4YVxS9U72a433Snq+8839A9fZ9gOoD+NT
|
||||
** SIG ** 9wp17MZ1LqpmhQSZt/gGV+HGDvbor9rsmxgfqrnjOgC/
|
||||
** SIG ** zoqUywHbnsc4uw9Sq9HjlANgCk2g/idtFDL8P5dA4b+Z
|
||||
** SIG ** idvkORS92uTTw+orWrOVWFUEfcea7CMDjYUq0v+uqWGB
|
||||
** SIG ** MIIFSzCCBDOgAwIBAgIQVFjyqtdB1kS8hKl7oJZS5jAN
|
||||
** SIG ** BgkqhkiG9w0BAQsFADB3MQswCQYDVQQGEwJVUzEdMBsG
|
||||
** SIG ** A1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNV
|
||||
** SIG ** BAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNV
|
||||
** SIG ** BAMTH1N5bWFudGVjIFNIQTI1NiBUaW1lU3RhbXBpbmcg
|
||||
** SIG ** Q0EwHhcNMTcwMTAyMDAwMDAwWhcNMjgwNDAxMjM1OTU5
|
||||
** SIG ** WjCBgDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFu
|
||||
** SIG ** dGVjIENvcnBvcmF0aW9uMR8wHQYDVQQLExZTeW1hbnRl
|
||||
** SIG ** YyBUcnVzdCBOZXR3b3JrMTEwLwYDVQQDEyhTeW1hbnRl
|
||||
** SIG ** YyBTSEEyNTYgVGltZVN0YW1waW5nIFNpZ25lciAtIEcy
|
||||
** SIG ** MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||
** SIG ** mfP82AQJA4b511ymk8BCfOp8Y89dAOKO88CQ348p9Rjq
|
||||
** SIG ** lLeS5dewoHOB6OkKm0p8Af+dj6Q5pw7qRfQiDDpw7TlF
|
||||
** SIG ** i+TFG1zwRWhGJAVjdpsc/J5sKrFW5Yp/UnGu8jXVRiMG
|
||||
** SIG ** HM9ILR20zbjZdiOOHP8+v7sGXGkHpmUO+F6ufS7tTa41
|
||||
** SIG ** 78nXAEL9KJUOn11yQgm8w9pE0u3MR4Tk/MotrFi+rveu
|
||||
** SIG ** 2UQNCLfCd9YaQ3DRbgPeUpLEEAhx2boiVfIfvO2bnTvi
|
||||
** SIG ** Xh1Mg/+XD3sL51WDTtIN677X7K5uR7mf36XWUbwEVe3/
|
||||
** SIG ** J3BMye0qSxPhsblMD8kB7lVlX2kCeGbLPwIDAQABo4IB
|
||||
** SIG ** xzCCAcMwDAYDVR0TAQH/BAIwADBmBgNVHSAEXzBdMFsG
|
||||
** SIG ** C2CGSAGG+EUBBxcDMEwwIwYIKwYBBQUHAgEWF2h0dHBz
|
||||
** SIG ** Oi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBka
|
||||
** SIG ** F2h0dHBzOi8vZC5zeW1jYi5jb20vcnBhMEAGA1UdHwQ5
|
||||
** SIG ** MDcwNaAzoDGGL2h0dHA6Ly90cy1jcmwud3Muc3ltYW50
|
||||
** SIG ** ZWMuY29tL3NoYTI1Ni10c3MtY2EuY3JsMBYGA1UdJQEB
|
||||
** SIG ** /wQMMAoGCCsGAQUFBwMIMA4GA1UdDwEB/wQEAwIHgDB3
|
||||
** SIG ** BggrBgEFBQcBAQRrMGkwKgYIKwYBBQUHMAGGHmh0dHA6
|
||||
** SIG ** Ly90cy1vY3NwLndzLnN5bWFudGVjLmNvbTA7BggrBgEF
|
||||
** SIG ** BQcwAoYvaHR0cDovL3RzLWFpYS53cy5zeW1hbnRlYy5j
|
||||
** SIG ** b20vc2hhMjU2LXRzcy1jYS5jZXIwKAYDVR0RBCEwH6Qd
|
||||
** SIG ** MBsxGTAXBgNVBAMTEFRpbWVTdGFtcC0yMDQ4LTUwHQYD
|
||||
** SIG ** VR0OBBYEFAm1wf6WcpcpQ5rJ4AK6rvj9L7r2MB8GA1Ud
|
||||
** SIG ** IwQYMBaAFK9j1sqjToVy4Ke8QfMpojh/gHViMA0GCSqG
|
||||
** SIG ** SIb3DQEBCwUAA4IBAQAXswqI6VxaXiBrOwoVsmzFqYoy
|
||||
** SIG ** h9Ox9BxTroW+P5v/17y3lIW0x1J+lOi97WGy1KeZ5MPJ
|
||||
** SIG ** k8E1PQvoaApdVpi9sSI70UR617/wbVEyitUj3zgBN/bi
|
||||
** SIG ** Uyt6KxGPt01sejMDG3xrCZQXu+TbWNQhE2Xn7NElyix1
|
||||
** SIG ** mpx//Mm7KmirxH20z6PJbKfZxACciQp3kfRNovsxO4Zu
|
||||
** SIG ** 9uYfUAOGm7/LQqvmdptyWhEBisbvpW+V592uuuYiZfAY
|
||||
** SIG ** WRsRyc2At9iXRx9CCPiscR+wRlOz1LLVo6tQdUgSF4Kt
|
||||
** SIG ** z+BBTzJ+zZUcv5GKCD2kp2cClt8kTKXQQcCCYKOKFzJL
|
||||
** SIG ** 07zPpLSMMYICWjCCAlYCAQEwgYswdzELMAkGA1UEBhMC
|
||||
** SIG ** VVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9u
|
||||
** SIG ** MR8wHQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3Jr
|
||||
** SIG ** MSgwJgYDVQQDEx9TeW1hbnRlYyBTSEEyNTYgVGltZVN0
|
||||
** SIG ** YW1waW5nIENBAhBUWPKq10HWRLyEqXugllLmMAsGCWCG
|
||||
** SIG ** SAFlAwQCAaCBpDAaBgkqhkiG9w0BCQMxDQYLKoZIhvcN
|
||||
** SIG ** AQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTE3MDQxODEyNDMx
|
||||
** SIG ** NFowLwYJKoZIhvcNAQkEMSIEIBIHo1GiDzSLJjfaDfwk
|
||||
** SIG ** 1sxMhgFVQZkYsO+xHtIKcvuOMDcGCyqGSIb3DQEJEAIv
|
||||
** SIG ** MSgwJjAkMCIEIM96wXrQR+zV/cNoIgMbEtTvB4tvK0xe
|
||||
** SIG ** a6Qfj/LPS61nMAsGCSqGSIb3DQEBAQSCAQCY1377Rdz9
|
||||
** SIG ** 040vUOkWgMrOoY65YoGXPfasrXflFWXs8lPuHl2/+bVR
|
||||
** SIG ** kDUBL2MSIYt+dlUsY31lgtCUDBLMy02sZ5BpZ7ZFcI8Y
|
||||
** SIG ** ah3ZDZuxTGBm42sEtOv1xx2QR4bAzxkZGOOienxYNqnn
|
||||
** SIG ** zIdqYl2CYfiV9PBFODnB+aTeRBZ7tH5RDMmZMJ3taZDX
|
||||
** SIG ** 1MCV1Z39HTKQq4uHi7gqg0N8nv6Xm8J+OPchVMlZMGJH
|
||||
** SIG ** tvmZHge+4jDFv/B3YYVOQOLNOHgF3tCtWClmhVQ+Fay+
|
||||
** SIG ** GVDCCMr1Hi2NWImFKS7yoHnYPV5fPtHMrch7XrRpVNQl
|
||||
** SIG ** o8+IiJV7N7/dgZeR5cmJuEX3
|
||||
</signature>
|
||||
</package>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// Product version as a single DWORD
|
||||
// Note: Used for version comparison within C/C++ code.
|
||||
//
|
||||
#define PRODUCT_VERSION 0x02000100
|
||||
#define PRODUCT_VERSION 0x02000200
|
||||
|
||||
//
|
||||
// Product version by components
|
||||
@@ -33,26 +33,26 @@
|
||||
//
|
||||
#define PRODUCT_VERSION_MAJ 2
|
||||
#define PRODUCT_VERSION_MIN 0
|
||||
#define PRODUCT_VERSION_REV 1
|
||||
#define PRODUCT_VERSION_REV 2
|
||||
#define PRODUCT_VERSION_BUILD 0
|
||||
|
||||
//
|
||||
// Human readable product version and build year for UI
|
||||
//
|
||||
#define PRODUCT_VERSION_STR "2.0.1"
|
||||
#define PRODUCT_VERSION_STR "2.1-beta2"
|
||||
#define PRODUCT_BUILD_YEAR_STR "2017"
|
||||
|
||||
//
|
||||
// Numerical version presentation for ProductVersion propery in
|
||||
// MSI packages (syntax: N.N[.N[.N]])
|
||||
//
|
||||
#define PRODUCT_VERSION_INST "2.0.1"
|
||||
#define PRODUCT_VERSION_INST "2.0.2"
|
||||
|
||||
//
|
||||
// The product code for ProductCode property in MSI packages
|
||||
// Replace with new on every version change, regardless how minor it is.
|
||||
//
|
||||
#define PRODUCT_VERSION_GUID "{2EA87F44-E670-4C8B-835A-8046A96B0368}"
|
||||
#define PRODUCT_VERSION_GUID "{162DE912-6795-4F1B-8824-32C873FE4186}"
|
||||
|
||||
//
|
||||
// The product vendor and application name for configuration keeping.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 1991-2017 Amebis
|
||||
Copyright 1991-2016 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 1991-2017 Amebis
|
||||
Copyright 1991-2016 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
Submodule lib/WinStd updated: ffea8e5fbb...750f40fada
@@ -23,7 +23,6 @@
|
||||
<ClCompile Include="..\src\common.cpp" />
|
||||
<ClCompile Include="..\src\language.cpp" />
|
||||
<ClCompile Include="..\src\mapping.cpp" />
|
||||
<ClCompile Include="..\src\normalize.cpp" />
|
||||
<ClCompile Include="..\src\stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
@@ -37,7 +36,6 @@
|
||||
<ClInclude Include="..\include\zrcola\character.h" />
|
||||
<ClInclude Include="..\include\zrcola\common.h" />
|
||||
<ClInclude Include="..\include\zrcola\language.h" />
|
||||
<ClInclude Include="..\include\zrcola\normalize.h" />
|
||||
<ClInclude Include="..\include\zrcola\tag.h" />
|
||||
<ClInclude Include="..\include\zrcola\translate.h" />
|
||||
<ClInclude Include="..\src\stdafx.h" />
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
<ClCompile Include="..\src\mapping.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\normalize.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\translate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -47,9 +44,6 @@
|
||||
<ClInclude Include="..\include\zrcola\common.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\zrcola\normalize.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\zrcola\translate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace ZRCola {
|
||||
///
|
||||
typedef double charrank_t;
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
///
|
||||
/// Character category ID type
|
||||
/// Two letter abbreviation, non-terminated
|
||||
@@ -66,6 +68,7 @@ namespace ZRCola {
|
||||
///
|
||||
static const chrcatid_t blank;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
///
|
||||
@@ -180,18 +183,73 @@ namespace ZRCola {
|
||||
/// Character data
|
||||
///
|
||||
struct character {
|
||||
wchar_t chr; ///> Character
|
||||
chrcatid_t cat; ///> Category ID
|
||||
unsigned __int16 desc_len; ///< Character description length in \c data
|
||||
unsigned __int16 rel_len; ///< Related character count in \c data
|
||||
wchar_t data[]; ///< Character description and list of related characters
|
||||
public:
|
||||
chrcatid_t cat; ///> Character category ID
|
||||
|
||||
protected:
|
||||
unsigned __int16 chr_to; ///< Character end in \c data
|
||||
unsigned __int16 desc_to; ///< Character description end in \c data
|
||||
unsigned __int16 rel_to; ///< Related characters end in \c data
|
||||
wchar_t data[]; ///< Character, character description
|
||||
|
||||
private:
|
||||
inline character(_In_ const character &other);
|
||||
inline character& operator=(_In_ const character &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the character
|
||||
///
|
||||
/// \param[in] chr Character
|
||||
/// \param[in] chr_len Number of UTF-16 characters in \p chr
|
||||
/// \param[in] cat Category
|
||||
/// \param[in] desc Description
|
||||
/// \param[in] desc_len Number of UTF-16 characters in \p desc
|
||||
/// \param[in] rel Related characters list (zero delimited)
|
||||
/// \param[in] rel_len Number of UTF-16 characters in \p rel (including zero delimiters)
|
||||
///
|
||||
inline character(
|
||||
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL,
|
||||
_In_opt_ size_t chr_len = 0,
|
||||
_In_opt_ chrcatid_t cat = chrcatid_t::blank,
|
||||
_In_opt_z_count_(desc_len) const wchar_t *desc = NULL,
|
||||
_In_opt_ size_t desc_len = 0,
|
||||
_In_opt_z_count_(rel_len) const wchar_t *rel = NULL,
|
||||
_In_opt_ size_t rel_len = 0)
|
||||
{
|
||||
this->cat = cat;
|
||||
this->chr_to = static_cast<unsigned __int16>(chr_len);
|
||||
if (chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len);
|
||||
this->desc_to = static_cast<unsigned __int16>(this->chr_to + desc_len);
|
||||
if (desc_len) memcpy(this->data + this->chr_to, desc, sizeof(wchar_t)*desc_len);
|
||||
this->rel_to = static_cast<unsigned __int16>(this->desc_to + rel_len);
|
||||
if (rel_len) memcpy(this->data + this->desc_to, rel, sizeof(wchar_t)*rel_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* chr () const { return data; };
|
||||
inline wchar_t* chr () { return data; };
|
||||
inline const wchar_t* chr_end() const { return data + chr_to; };
|
||||
inline wchar_t* chr_end() { return data + chr_to; };
|
||||
inline unsigned __int16 chr_len() const { return chr_to; };
|
||||
|
||||
inline const wchar_t* desc () const { return data + chr_to; };
|
||||
inline wchar_t* desc () { return data + chr_to; };
|
||||
inline const wchar_t* desc_end() const { return data + desc_to; };
|
||||
inline wchar_t* desc_end() { return data + desc_to; };
|
||||
inline unsigned __int16 desc_len() const { return desc_to - chr_to; };
|
||||
|
||||
inline const wchar_t* rel () const { return data + desc_to; };
|
||||
inline wchar_t* rel () { return data + desc_to; };
|
||||
inline const wchar_t* rel_end() const { return data + rel_to; };
|
||||
inline wchar_t* rel_end() { return data + rel_to; };
|
||||
inline unsigned __int16 rel_len() const { return rel_to - desc_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
///
|
||||
/// Character index
|
||||
///
|
||||
class indexChar : public index<unsigned __int16, unsigned __int32, character>
|
||||
class indexChr : public index<unsigned __int16, unsigned __int32, character>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@@ -199,7 +257,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexChar(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, character>(h) {}
|
||||
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, character>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two characters by ID (for searching)
|
||||
@@ -214,8 +272,8 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const character &a, _In_ const character &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -252,23 +310,25 @@ namespace ZRCola {
|
||||
/// \param[in ] fn_abort Pointer to function to periodically test for search cancellation
|
||||
/// \param[in ] cookie Cookie for \p fn_abort call
|
||||
///
|
||||
bool Search(_In_z_ const wchar_t *str, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<wchar_t, charrank_t> &hits, _Inout_ std::map<wchar_t, charrank_t> &hits_sub, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
|
||||
bool Search(_In_z_ const wchar_t *str, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<std::wstring, charrank_t> &hits, _Inout_ std::map<std::wstring, charrank_t> &hits_sub, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
|
||||
|
||||
///
|
||||
/// Get character category
|
||||
///
|
||||
/// \param[in] c Character
|
||||
/// \param[in] chr Character
|
||||
/// \param[in] len Number of UTF-16 characters in \p chr
|
||||
///
|
||||
/// \returns
|
||||
/// - Character category if character found
|
||||
/// - `ZRCola::chrcatid_t::blank` otherwise
|
||||
///
|
||||
inline chrcatid_t GetCharCat(wchar_t c) const
|
||||
inline chrcatid_t GetCharCat(_In_z_count_(len) const wchar_t *chr, _In_ const size_t len) const
|
||||
{
|
||||
char _chr[sizeof(character)];
|
||||
((character *)_chr)->chr = c;
|
||||
indexChar::size_type start;
|
||||
return idxChr.find(*((character *)_chr), start) ? idxChr[start].cat : chrcatid_t::blank;
|
||||
assert(len <= 0xffff);
|
||||
std::unique_ptr<character> c((character*)new char[sizeof(character) + sizeof(wchar_t)*len]);
|
||||
c->character::character(chr, len);
|
||||
indexChr::size_type start;
|
||||
return idxChr.find(*c, start) ? idxChr[start].cat : chrcatid_t::blank;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -287,10 +347,44 @@ namespace ZRCola {
|
||||
/// Character category data
|
||||
///
|
||||
struct chrcat {
|
||||
chrcatid_t id; ///< Character category ID
|
||||
unsigned __int16 rank; ///< Character category rank
|
||||
unsigned __int16 name_len; ///< \c name length (in characters)
|
||||
wchar_t name[]; ///< Character category name
|
||||
public:
|
||||
chrcatid_t cat; ///< Character category ID
|
||||
unsigned __int16 rank; ///< Character category rank
|
||||
|
||||
protected:
|
||||
unsigned __int16 name_to; ///< Character category name end in \c data
|
||||
wchar_t data[]; ///< Character category name
|
||||
|
||||
private:
|
||||
inline chrcat(_In_ const chrcat &other);
|
||||
inline chrcat& operator=(_In_ const chrcat &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the character category
|
||||
///
|
||||
/// \param[in] cat Character category ID
|
||||
/// \param[in] rank Character category rank
|
||||
/// \param[in] name Character category name
|
||||
/// \param[in] name_len Number of UTF-16 characters in \p name
|
||||
///
|
||||
inline chrcat(
|
||||
_In_opt_ chrcatid_t cat = chrcatid_t::blank,
|
||||
_In_opt_ unsigned __int16 rank = 0,
|
||||
_In_opt_z_count_(name_len) const wchar_t *name = NULL,
|
||||
_In_opt_ size_t name_len = 0)
|
||||
{
|
||||
this->cat = cat;
|
||||
this->rank = rank;
|
||||
this->name_to = static_cast<unsigned __int16>(name_len);
|
||||
if (name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* name () const { return data; };
|
||||
inline wchar_t* name () { return data; };
|
||||
inline const wchar_t* name_end() const { return data + name_to; };
|
||||
inline wchar_t* name_end() { return data + name_to; };
|
||||
inline unsigned __int16 name_len() const { return name_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -320,11 +414,12 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const chrcat &a, _In_ const chrcat &b) const
|
||||
{
|
||||
if (a.id < b.id) return -1;
|
||||
else if (a.id > b.id) return 1;
|
||||
else return 0;
|
||||
if (a.cat < b.cat) return -1;
|
||||
else if (a.cat > b.cat) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxChrCat; ///< Character category index
|
||||
} idxChrCat; ///< Character category index
|
||||
|
||||
///
|
||||
/// Rank index
|
||||
@@ -374,14 +469,17 @@ namespace ZRCola {
|
||||
if (a.rank < b.rank) return -1;
|
||||
else if (a.rank > b.rank) return +1;
|
||||
|
||||
int r = _wcsncoll(a.name, b.name, std::min<unsigned __int16>(a.name_len, b.name_len));
|
||||
unsigned __int16
|
||||
a_name_len = a.name_len(),
|
||||
b_name_len = b.name_len();
|
||||
int r = _wcsncoll(a.name(), b.name(), std::min<unsigned __int16>(a_name_len, b_name_len));
|
||||
if (r != 0) return r;
|
||||
if (a.name_len < b.name_len) return -1;
|
||||
else if (a.name_len > b.name_len) return +1;
|
||||
if (a_name_len < b_name_len) return -1;
|
||||
else if (a_name_len > b_name_len) return +1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxRnk; ///< Rank index
|
||||
} idxRank; ///< Rank index
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Character category data
|
||||
|
||||
@@ -389,7 +487,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Constructs the database
|
||||
///
|
||||
inline chrcat_db() : idxChrCat(data), idxRnk(data) {}
|
||||
inline chrcat_db() : idxChrCat(data), idxRank(data) {}
|
||||
|
||||
///
|
||||
/// Clears the database
|
||||
@@ -397,7 +495,7 @@ namespace ZRCola {
|
||||
inline void clear()
|
||||
{
|
||||
idxChrCat.clear();
|
||||
idxRnk .clear();
|
||||
idxRank .clear();
|
||||
data .clear();
|
||||
}
|
||||
};
|
||||
@@ -407,8 +505,8 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::character_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"CHR";
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::chrcat_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"CCT";
|
||||
const ZRCola::recordid_t ZRCola::character_rec::id = *(ZRCola::recordid_t*)"CHR";
|
||||
const ZRCola::recordid_t ZRCola::chrcat_rec ::id = *(ZRCola::recordid_t*)"CCT";
|
||||
|
||||
|
||||
///
|
||||
@@ -508,7 +606,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::c
|
||||
|
||||
// Write rank index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxRnk;
|
||||
stream << db.idxRank;
|
||||
|
||||
// Write data count.
|
||||
auto data_count = db.data.size();
|
||||
@@ -546,7 +644,7 @@ inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::chrcat
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read rank index.
|
||||
stream >> db.idxRnk;
|
||||
stream >> db.idxRank;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read data count.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sal.h>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
@@ -58,11 +59,11 @@ namespace ZRCola {
|
||||
typedef unsigned __int32 recordsize_t;
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
///
|
||||
/// Key-value index pair for mappings
|
||||
///
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
template <class T>
|
||||
struct mappair_t
|
||||
{
|
||||
@@ -72,6 +73,8 @@ namespace ZRCola {
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
///
|
||||
/// Language ID type
|
||||
/// Three letter abbreviation, zero terminated
|
||||
@@ -105,6 +108,7 @@ namespace ZRCola {
|
||||
///
|
||||
static const langid_t blank;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
///
|
||||
@@ -228,11 +232,11 @@ namespace ZRCola {
|
||||
///
|
||||
/// Memory index
|
||||
///
|
||||
template <class T, class T_idx = unsigned __int32, class T_data = T>
|
||||
template <class T_data, class T_idx = unsigned __int32, class T_el = T_data>
|
||||
class index : public std::vector<T_idx>
|
||||
{
|
||||
protected:
|
||||
std::vector<T> &host; ///< Reference to host data
|
||||
std::vector<T_data> &host; ///< Reference to host data
|
||||
|
||||
public:
|
||||
///
|
||||
@@ -240,7 +244,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
index(_In_ std::vector<T> &h) : host(h) {}
|
||||
index(_In_ std::vector<T_data> &h) : host(h) {}
|
||||
|
||||
|
||||
///
|
||||
@@ -250,9 +254,9 @@ namespace ZRCola {
|
||||
///
|
||||
/// \returns Data reference
|
||||
///
|
||||
inline const T_data& at(size_type pos) const
|
||||
inline const T_el& at(size_type pos) const
|
||||
{
|
||||
return (const T_data&)host.at(std::vector<T_idx>::at(pos));
|
||||
return *reinterpret_cast<const T_el*>(&host[std::vector<T_idx>::at(pos)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -263,9 +267,9 @@ namespace ZRCola {
|
||||
///
|
||||
/// \returns Data reference
|
||||
///
|
||||
inline T_data& at(size_type pos)
|
||||
inline T_el& at(size_type pos)
|
||||
{
|
||||
return (T_data&)host.at(std::vector<T_idx>::at(pos));
|
||||
return *reinterpret_cast<T_el*>(&host[std::vector<T_idx>::at(pos)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -276,9 +280,9 @@ namespace ZRCola {
|
||||
///
|
||||
/// \returns Data reference
|
||||
///
|
||||
inline const T_data& operator[](size_type pos) const
|
||||
inline const T_el& operator[](size_type pos) const
|
||||
{
|
||||
return (const T_data&)host[std::vector<T_idx>::at(pos)];
|
||||
return *reinterpret_cast<const T_el*>(&host[std::vector<T_idx>::operator[](pos)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -289,9 +293,9 @@ namespace ZRCola {
|
||||
///
|
||||
/// \returns Data reference
|
||||
///
|
||||
inline T_data& operator[](size_type pos)
|
||||
inline T_el& operator[](size_type pos)
|
||||
{
|
||||
return (T_data&)host[std::vector<T_idx>::at(pos)];
|
||||
return *reinterpret_cast<T_el*>(&host[std::vector<T_idx>::operator[](pos)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +319,7 @@ namespace ZRCola {
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare(_In_ const T_data &a, _In_ const T_data &b) const = 0;
|
||||
virtual int compare(_In_ const T_el &a, _In_ const T_el &b) const = 0;
|
||||
|
||||
|
||||
///
|
||||
@@ -329,7 +333,7 @@ namespace ZRCola {
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare_sort(_In_ const T_data &a, _In_ const T_data &b) const
|
||||
virtual int compare_sort(_In_ const T_el &a, _In_ const T_el &b) const
|
||||
{
|
||||
// Revert to `compare()` by default.
|
||||
return compare(a, b);
|
||||
@@ -348,7 +352,7 @@ namespace ZRCola {
|
||||
/// - \c true if found
|
||||
/// - \c false otherwise
|
||||
///
|
||||
bool find(_In_ const T_data &el, _Out_ size_type &start, _Out_ size_type &end) const
|
||||
bool find(_In_ const T_el &el, _Out_ size_type &start, _Out_ size_type &end) const
|
||||
{
|
||||
// Start with the full search area.
|
||||
for (start = 0, end = size(); start < end; ) {
|
||||
@@ -388,7 +392,7 @@ namespace ZRCola {
|
||||
/// - \c true if found
|
||||
/// - \c false otherwise
|
||||
///
|
||||
bool find(_In_ const T_data &el, _Out_ size_type &start) const
|
||||
bool find(_In_ const T_el &el, _Out_ size_type &start) const
|
||||
{
|
||||
// Start with the full search area.
|
||||
size_t end;
|
||||
@@ -415,8 +419,11 @@ namespace ZRCola {
|
||||
private:
|
||||
static int __cdecl compare_s(void *p, const void *a, const void *b)
|
||||
{
|
||||
const index<T, T_idx, T_data> *t = (const index<T, T_idx, T_data>*)p;
|
||||
return t->compare_sort((const T_data&)t->host[*(const T_idx*)a], (const T_data&)t->host[*(const T_idx*)b]);
|
||||
const index<T_data, T_idx, T_el> *_this = reinterpret_cast<const index<T_data, T_idx, T_el>*>(p);
|
||||
const T_data *data = _this->host.data();
|
||||
return _this->compare_sort(
|
||||
*reinterpret_cast<const T_el*>(data + *reinterpret_cast<const T_idx*>(a)),
|
||||
*reinterpret_cast<const T_el*>(data + *reinterpret_cast<const T_idx*>(b)));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -521,7 +528,7 @@ namespace ZRCola {
|
||||
|
||||
|
||||
///
|
||||
/// A vector for composed-decomposed index transformation mapping
|
||||
/// A vector for destination-source index transformation mapping
|
||||
///
|
||||
class ZRCOLA_API mapping_vector : public std::vector<mapping> {
|
||||
public:
|
||||
@@ -552,6 +559,86 @@ namespace ZRCola {
|
||||
i->invert();
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
/// Binary compares two strings
|
||||
///
|
||||
/// \param[in] str_a First string
|
||||
/// \param[in] count_a Number of characters in string \p str_a
|
||||
/// \param[in] str_b Second string
|
||||
/// \param[in] count_b Number of characters in string \p str_b
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when str_a < str_b
|
||||
/// - =0 when str_a == str_b
|
||||
/// - >0 when str_a > str_b
|
||||
///
|
||||
/// \note
|
||||
/// The function does not treat \\0 characters as terminators for performance reasons.
|
||||
/// Therefore \p count_a and \p count_b must represent exact string lengths.
|
||||
///
|
||||
inline int CompareString(_In_ const wchar_t *str_a, _In_ size_t count_a, _In_ const wchar_t *str_b, _In_ size_t count_b)
|
||||
{
|
||||
for (size_t i = 0; ; i++) {
|
||||
if (i >= count_a && i >= count_b) return 0;
|
||||
else if (i >= count_a && i < count_b) return -1;
|
||||
else if (i < count_a && i >= count_b) return +1;
|
||||
else if (str_a[i] < str_b[i]) return -1;
|
||||
else if (str_a[i] > str_b[i]) return +1;
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
/// Generates and returns Unicode representation of the string using hexadecimal codes.
|
||||
///
|
||||
/// \param[in] str Unicode string
|
||||
/// \param[in] count Number of characters in string \p str
|
||||
/// \param[in] sep Separator
|
||||
///
|
||||
inline std::string GetUnicodeDumpA(_In_ const wchar_t *str, _In_ size_t count, _In_opt_z_ const char *sep = "+")
|
||||
{
|
||||
std::string out;
|
||||
size_t dump_len_max = strlen(sep) + 4 + 1;
|
||||
char *dump;
|
||||
std::unique_ptr<char> dump_obj(dump = new char[dump_len_max]);
|
||||
if (count && str[0]) {
|
||||
size_t i = 0;
|
||||
out.insert(out.end(), dump, dump + _snprintf(dump, dump_len_max, "%04X", str[i++]));
|
||||
while (i < count && str[i])
|
||||
out.insert(out.end(), dump, dump + _snprintf(dump, dump_len_max, "%s%04X", sep, str[i++]));
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
///
|
||||
/// Generates and returns Unicode representation of the string using hexadecimal codes.
|
||||
///
|
||||
/// \param[in] str Unicode string
|
||||
/// \param[in] count Number of characters in string \p str
|
||||
/// \param[in] sep Separator
|
||||
///
|
||||
inline std::wstring GetUnicodeDumpW(_In_ const wchar_t *str, _In_ size_t count, _In_opt_z_ const wchar_t *sep = L"+")
|
||||
{
|
||||
std::wstring out;
|
||||
size_t dump_len_max = wcslen(sep) + 4 + 1;
|
||||
wchar_t *dump;
|
||||
std::unique_ptr<wchar_t> dump_obj(dump = new wchar_t[dump_len_max]);
|
||||
if (count && str[0]) {
|
||||
size_t i = 0;
|
||||
out.insert(out.end(), dump, dump + _snwprintf(dump, dump_len_max, L"%04X", str[i++]));
|
||||
while (i < count && str[i])
|
||||
out.insert(out.end(), dump, dump + _snwprintf(dump, dump_len_max, L"%s%04X", sep, str[i++]));
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define GetUnicodeDump GetUnicodeDumpW
|
||||
#else
|
||||
#define GetUnicodeDump GetUnicodeDumpA
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -563,8 +650,8 @@ namespace ZRCola {
|
||||
///
|
||||
/// \returns The stream \p stream
|
||||
///
|
||||
template <class T, class T_idx, class T_data>
|
||||
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::index<T, T_idx, T_data> &idx)
|
||||
template <class T_data, class T_idx, class T_el>
|
||||
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::index<T_data, T_idx, T_el> &idx)
|
||||
{
|
||||
// Write index count.
|
||||
auto idx_count = idx.size();
|
||||
@@ -595,8 +682,8 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::i
|
||||
///
|
||||
/// \returns The stream \p stream
|
||||
///
|
||||
template <class T, class T_idx, class T_data>
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::index<T, T_idx, T_data> &idx)
|
||||
template <class T_data, class T_idx, class T_el>
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::index<T_data, T_idx, T_el> &idx)
|
||||
{
|
||||
unsigned __int32 count;
|
||||
|
||||
|
||||
@@ -45,15 +45,47 @@ namespace ZRCola {
|
||||
/// Character data
|
||||
///
|
||||
struct langchar {
|
||||
wchar_t chr; ///> Character
|
||||
public:
|
||||
langid_t lang; ///< Language ID
|
||||
|
||||
protected:
|
||||
unsigned __int16 chr_to; ///< Character end in \c data
|
||||
wchar_t data[]; ///< Character
|
||||
|
||||
private:
|
||||
inline langchar(_In_ const langchar &other);
|
||||
inline langchar& operator=(_In_ const langchar &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the language character
|
||||
///
|
||||
/// \param[in] lang Character language
|
||||
/// \param[in] chr Character
|
||||
/// \param[in] chr_len Number of UTF-16 characters in \p chr
|
||||
///
|
||||
inline langchar(
|
||||
_In_opt_ langid_t lang = langid_t::blank,
|
||||
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL,
|
||||
_In_opt_ size_t chr_len = 0)
|
||||
{
|
||||
this->lang = lang;
|
||||
this->chr_to = static_cast<unsigned __int16>(chr_len);
|
||||
if (chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* chr () const { return data; };
|
||||
inline wchar_t* chr () { return data; };
|
||||
inline const wchar_t* chr_end() const { return data + chr_to; };
|
||||
inline wchar_t* chr_end() { return data + chr_to; };
|
||||
inline unsigned __int16 chr_len() const { return chr_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
///
|
||||
/// Character index
|
||||
///
|
||||
class indexChar : public index<unsigned __int16, unsigned __int32, langchar>
|
||||
class indexChr : public index<unsigned __int16, unsigned __int32, langchar>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@@ -61,7 +93,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexChar(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, langchar>(h) {}
|
||||
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, langchar>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two characters by ID (for searching)
|
||||
@@ -76,27 +108,8 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const langchar &a, _In_ const langchar &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
///
|
||||
/// Compares two characters by ID (for sorting)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when a < b
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare_sort(_In_ const langchar &a, _In_ const langchar &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
if (a.lang < b.lang) return -1;
|
||||
else if (a.lang > b.lang) return 1;
|
||||
@@ -108,9 +121,9 @@ namespace ZRCola {
|
||||
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
///
|
||||
/// Character Language Index
|
||||
/// Language Index
|
||||
///
|
||||
class indexCharLang : public index<unsigned __int16, unsigned __int32, langchar>
|
||||
class indexLang : public index<unsigned __int16, unsigned __int32, langchar>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@@ -118,7 +131,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexCharLang(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, langchar>(h) {}
|
||||
indexLang(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, langchar>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two languages by ID (for searching)
|
||||
@@ -133,34 +146,15 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const langchar &a, _In_ const langchar &b) const
|
||||
{
|
||||
int r = memcmp(a.lang, b.lang, sizeof(langid_t));
|
||||
if (a.lang < b.lang) return -1;
|
||||
else if (a.lang > b.lang) return 1;
|
||||
|
||||
int r = ZRCola::CompareString(a.chr, a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
///
|
||||
/// Compares two languages by ID (for sorting)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when a < b
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare_sort(_In_ const langchar &a, _In_ const langchar &b) const
|
||||
{
|
||||
int r = memcmp(a.lang, b.lang, sizeof(langid_t));
|
||||
if (r != 0) return r;
|
||||
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxLng; ///< Character language index
|
||||
} idxLang; ///< Language index
|
||||
#endif
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Character data
|
||||
@@ -171,7 +165,7 @@ namespace ZRCola {
|
||||
///
|
||||
inline langchar_db() : idxChr(data)
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
, idxLng(data)
|
||||
, idxLang(data)
|
||||
#endif
|
||||
{}
|
||||
|
||||
@@ -180,23 +174,24 @@ namespace ZRCola {
|
||||
///
|
||||
inline void clear()
|
||||
{
|
||||
idxChr.clear();
|
||||
idxChr .clear();
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
idxLng.clear();
|
||||
idxLang.clear();
|
||||
#endif
|
||||
data .clear();
|
||||
data .clear();
|
||||
}
|
||||
|
||||
///
|
||||
/// Tests presence of character in the given language
|
||||
///
|
||||
/// \param[in] chr Character (UTF-16)
|
||||
/// \param[in] lang Language
|
||||
/// \param[in] chr Pointer to character
|
||||
/// \param[in] chr_end Pointer to character end
|
||||
/// \param[in] lang Language
|
||||
///
|
||||
/// \returns
|
||||
/// - \c true when character is used in language
|
||||
/// - \c false otherwise
|
||||
bool IsLocalCharacter(_In_ wchar_t chr, _In_ langid_t lang) const;
|
||||
bool IsLocalCharacter(_In_ const wchar_t *chr, _In_ const wchar_t *chr_end, _In_ langid_t lang) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -214,9 +209,40 @@ namespace ZRCola {
|
||||
/// Language data
|
||||
///
|
||||
struct language {
|
||||
langid_t id; ///< Language ID
|
||||
unsigned __int16 name_len; ///< \c name length (in characters)
|
||||
wchar_t name[]; ///< Language name
|
||||
public:
|
||||
langid_t lang; ///< Language ID
|
||||
|
||||
protected:
|
||||
unsigned __int16 name_to; ///< Language name end in \c data
|
||||
wchar_t data[]; ///< Language name
|
||||
|
||||
private:
|
||||
inline language(_In_ const language &other);
|
||||
inline language& operator=(_In_ const language &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the language
|
||||
///
|
||||
/// \param[in] lang Language ID
|
||||
/// \param[in] name Language name
|
||||
/// \param[in] name_len Number of UTF-16 characters in \p name
|
||||
///
|
||||
inline language(
|
||||
_In_opt_ langid_t lang = langid_t::blank,
|
||||
_In_opt_z_count_(name_len) const wchar_t *name = NULL,
|
||||
_In_opt_ size_t name_len = 0)
|
||||
{
|
||||
this->lang = lang;
|
||||
this->name_to = static_cast<unsigned __int16>(name_len);
|
||||
if (name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* name () const { return data; };
|
||||
inline wchar_t* name () { return data; };
|
||||
inline const wchar_t* name_end() const { return data + name_to; };
|
||||
inline wchar_t* name_end() { return data + name_to; };
|
||||
inline unsigned __int16 name_len() const { return name_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -246,12 +272,12 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const language &a, _In_ const language &b) const
|
||||
{
|
||||
if (a.id < b.id) return -1;
|
||||
else if (a.id > b.id) return 1;
|
||||
if (a.lang < b.lang) return -1;
|
||||
else if (a.lang > b.lang) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxLng; ///< Language index
|
||||
} idxLang; ///< Language index
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Language data
|
||||
|
||||
@@ -259,15 +285,15 @@ namespace ZRCola {
|
||||
///
|
||||
/// Constructs the database
|
||||
///
|
||||
inline language_db() : idxLng(data) {}
|
||||
inline language_db() : idxLang(data) {}
|
||||
|
||||
///
|
||||
/// Clears the database
|
||||
///
|
||||
inline void clear()
|
||||
{
|
||||
idxLng.clear();
|
||||
data .clear();
|
||||
idxLang.clear();
|
||||
data .clear();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -276,8 +302,8 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::langchar_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"L-C";
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::language_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"LNG";
|
||||
const ZRCola::recordid_t ZRCola::langchar_rec::id = *(ZRCola::recordid_t*)"L-C";
|
||||
const ZRCola::recordid_t ZRCola::language_rec::id = *(ZRCola::recordid_t*)"LNG";
|
||||
|
||||
|
||||
///
|
||||
@@ -297,7 +323,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::l
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
// Write language index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxLng;
|
||||
stream << db.idxLang;
|
||||
#endif
|
||||
|
||||
// Write data count.
|
||||
@@ -337,7 +363,7 @@ inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::langch
|
||||
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
// Read language index.
|
||||
stream >> db.idxLng;
|
||||
stream >> db.idxLang;
|
||||
if (!stream.good()) return stream;
|
||||
#endif
|
||||
|
||||
@@ -369,7 +395,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::l
|
||||
{
|
||||
// Write language index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxLng;
|
||||
stream << db.idxLang;
|
||||
|
||||
// Write data count.
|
||||
auto data_count = db.data.size();
|
||||
@@ -403,7 +429,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::l
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::language_db &db)
|
||||
{
|
||||
// Read language index.
|
||||
stream >> db.idxLng;
|
||||
stream >> db.idxLang;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read data count.
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
Copyright 2015-2017 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
namespace ZRCola {
|
||||
///
|
||||
/// Normalizes a decomposed string
|
||||
///
|
||||
/// \param[in] input Input string (UTF-16)
|
||||
/// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated.
|
||||
/// \param[out] output Output string (UTF-16)
|
||||
/// \param[out] map The vector of source to destination index mappings (optional)
|
||||
///
|
||||
void ZRCOLA_API Normalize(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL);
|
||||
};
|
||||
@@ -47,15 +47,47 @@ namespace ZRCola {
|
||||
/// Character tag data
|
||||
///
|
||||
struct chrtag {
|
||||
wchar_t chr; ///> Character
|
||||
public:
|
||||
tagid_t tag; ///< Tag ID
|
||||
|
||||
protected:
|
||||
unsigned __int16 chr_to; ///< Character end in \c data
|
||||
wchar_t data[]; ///< Character
|
||||
|
||||
private:
|
||||
inline chrtag(_In_ const chrtag &other);
|
||||
inline chrtag& operator=(_In_ const chrtag &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the character tag
|
||||
///
|
||||
/// \param[in] chr Character
|
||||
/// \param[in] chr_len Number of UTF-16 characters in \p chr
|
||||
/// \param[in] tag Tag
|
||||
///
|
||||
inline chrtag(
|
||||
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL,
|
||||
_In_opt_ size_t chr_len = 0,
|
||||
_In_opt_ tagid_t tag = 0)
|
||||
{
|
||||
this->tag = tag;
|
||||
this->chr_to = static_cast<unsigned __int16>(chr_len);
|
||||
if (chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* chr () const { return data; };
|
||||
inline wchar_t* chr () { return data; };
|
||||
inline const wchar_t* chr_end() const { return data + chr_to; };
|
||||
inline wchar_t* chr_end() { return data + chr_to; };
|
||||
inline unsigned __int16 chr_len() const { return chr_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
///
|
||||
/// Character Index
|
||||
///
|
||||
class indexChar : public index<unsigned __int16, unsigned __int32, chrtag>
|
||||
class indexChr : public index<unsigned __int16, unsigned __int32, chrtag>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@@ -63,7 +95,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexChar(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrtag>(h) {}
|
||||
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrtag>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two character tags by character (for searching)
|
||||
@@ -78,8 +110,8 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const chrtag &a, _In_ const chrtag &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -97,8 +129,8 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare_sort(_In_ const chrtag &a, _In_ const chrtag &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
if (a.tag < b.tag) return -1;
|
||||
else if (a.tag > b.tag) return 1;
|
||||
@@ -156,8 +188,8 @@ namespace ZRCola {
|
||||
if (a.tag < b.tag) return -1;
|
||||
else if (a.tag > b.tag) return 1;
|
||||
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return 1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -191,7 +223,7 @@ namespace ZRCola {
|
||||
/// \param[in ] fn_abort Pointer to function to periodically test for search cancellation
|
||||
/// \param[in ] cookie Cookie for \p fn_abort call
|
||||
///
|
||||
bool Search(_In_ const std::map<tagid_t, unsigned __int16> &tags, _In_ const character_db &ch_db, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<wchar_t, charrank_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
|
||||
bool Search(_In_ const std::map<tagid_t, unsigned __int16> &tags, _In_ const character_db &ch_db, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<std::wstring, charrank_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -209,19 +241,53 @@ namespace ZRCola {
|
||||
/// Tag name data
|
||||
///
|
||||
struct tagname {
|
||||
public:
|
||||
tagid_t tag; ///< Tag ID
|
||||
LCID locale; ///< Locale ID
|
||||
unsigned __int16 name_len; ///< \c name length (in characters)
|
||||
wchar_t name[]; ///< Tag localized name
|
||||
|
||||
protected:
|
||||
unsigned __int16 name_to; ///< Tag name end in \c data
|
||||
wchar_t data[]; ///< Tag name
|
||||
|
||||
private:
|
||||
inline tagname(_In_ const tagname &other);
|
||||
inline tagname& operator=(_In_ const tagname &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the localized tag name
|
||||
///
|
||||
/// \param[in] tag Tag
|
||||
/// \param[in] locale Locale
|
||||
/// \param[in] name Tag name
|
||||
/// \param[in] name_len Number of UTF-16 characters in \p name
|
||||
///
|
||||
inline tagname(
|
||||
_In_opt_ tagid_t tag = 0,
|
||||
_In_opt_ LCID locale = MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT),
|
||||
_In_opt_z_count_(name_len) const wchar_t *name = NULL,
|
||||
_In_opt_ size_t name_len = 0)
|
||||
{
|
||||
this->tag = tag;
|
||||
this->locale = locale;
|
||||
this->name_to = static_cast<unsigned __int16>(name_len);
|
||||
if (name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* name () const { return data; };
|
||||
inline wchar_t* name () { return data; };
|
||||
inline const wchar_t* name_end() const { return data + name_to; };
|
||||
inline wchar_t* name_end() { return data + name_to; };
|
||||
inline unsigned __int16 name_len() const { return name_to; };
|
||||
|
||||
///
|
||||
/// Compares two names
|
||||
///
|
||||
/// \param[in] locale Locale ID to use for compare
|
||||
/// \param[in] str_a First name
|
||||
/// \param[in] count_a Number of characters in string \p str_a
|
||||
/// \param[in] count_a Number of UTF-16 characters in \p str_a
|
||||
/// \param[in] str_b Second name
|
||||
/// \param[in] count_b Number of characters in string \p str_b
|
||||
/// \param[in] count_b Number of UTF-16 characters in \p str_b
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when str_a < str_b
|
||||
@@ -234,7 +300,7 @@ namespace ZRCola {
|
||||
///
|
||||
static inline int CompareName(LCID locale, const wchar_t *str_a, unsigned __int16 count_a, const wchar_t *str_b, unsigned __int16 count_b)
|
||||
{
|
||||
switch (CompareString(locale, SORT_STRINGSORT | NORM_IGNORECASE, str_a, count_a, str_b, count_b)) {
|
||||
switch (::CompareString(locale, SORT_STRINGSORT | NORM_IGNORECASE, str_a, count_a, str_b, count_b)) {
|
||||
case CSTR_LESS_THAN : return -1;
|
||||
case CSTR_EQUAL : return 0;
|
||||
case CSTR_GREATER_THAN: return 1;
|
||||
@@ -259,7 +325,7 @@ namespace ZRCola {
|
||||
indexName(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, tagname>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two tag names by name (for searching)
|
||||
/// Compares two tag names by locale and name (for searching)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
@@ -274,14 +340,14 @@ namespace ZRCola {
|
||||
if (a.locale < b.locale) return -1;
|
||||
else if (a.locale > b.locale) return 1;
|
||||
|
||||
int r = tagname::CompareName(a.locale, a.name, a.name_len, b.name, b.name_len);
|
||||
int r = tagname::CompareName(a.locale, a.name(), a.name_len(), b.name(), b.name_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
///
|
||||
/// Compares two tag names by name (for sorting)
|
||||
/// Compares two tag names by locale and name (for sorting)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
@@ -296,7 +362,7 @@ namespace ZRCola {
|
||||
if (a.locale < b.locale) return -1;
|
||||
else if (a.locale > b.locale) return 1;
|
||||
|
||||
int r = tagname::CompareName(a.locale, a.name, a.name_len, b.name, b.name_len);
|
||||
int r = tagname::CompareName(a.locale, a.name(), a.name_len(), b.name(), b.name_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
if (a.tag < b.tag) return -1;
|
||||
@@ -378,8 +444,8 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::chrtag_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"C-T";
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::tagname_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"TGN";
|
||||
const ZRCola::recordid_t ZRCola::chrtag_rec ::id = *(ZRCola::recordid_t*)"C-T";
|
||||
const ZRCola::recordid_t ZRCola::tagname_rec::id = *(ZRCola::recordid_t*)"TGN";
|
||||
|
||||
|
||||
///
|
||||
|
||||
@@ -33,8 +33,23 @@
|
||||
#pragma warning(disable: 4251)
|
||||
#pragma warning(disable: 4512)
|
||||
|
||||
///
|
||||
/// Custom translation sequence ID
|
||||
///
|
||||
#define ZRCOLA_TRANSEQID_CUSTOM ((ZRCola::transeqid_t)-1)
|
||||
|
||||
|
||||
namespace ZRCola {
|
||||
///
|
||||
/// Translation set ID
|
||||
///
|
||||
typedef unsigned __int16 transetid_t;
|
||||
|
||||
///
|
||||
/// Translation sequence ID
|
||||
///
|
||||
typedef unsigned __int16 transeqid_t;
|
||||
|
||||
///
|
||||
/// Translation database
|
||||
///
|
||||
@@ -46,45 +61,79 @@ namespace ZRCola {
|
||||
/// Translation data
|
||||
///
|
||||
struct translation {
|
||||
wchar_t chr; ///< Composed character
|
||||
unsigned __int16 rank; ///< Decomposition rank
|
||||
unsigned __int16 str_len; ///< \c str length (in characters)
|
||||
wchar_t str[]; ///< Decomposed string
|
||||
public:
|
||||
transetid_t set; ///< Translation set ID
|
||||
unsigned __int16 dst_rank; ///< Destination character rank
|
||||
unsigned __int16 src_rank; ///< Source character rank
|
||||
|
||||
protected:
|
||||
unsigned __int16 dst_to; ///< Destination character end in \c data
|
||||
unsigned __int16 src_to; ///< Source string end in \c data
|
||||
wchar_t data[]; ///< Destination string and source character
|
||||
|
||||
private:
|
||||
inline translation(_In_ const translation &other);
|
||||
inline translation& operator=(_In_ const translation &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Binary compares two strings
|
||||
/// Constructs the translation
|
||||
///
|
||||
/// \param[in] str_a First string
|
||||
/// \param[in] count_a Number of characters in string \p str_a
|
||||
/// \param[in] str_b Second string
|
||||
/// \param[in] count_b Number of characters in string \p str_b
|
||||
/// \param[in] set Translation set ID
|
||||
/// \param[in] dst_rank Destination character rank
|
||||
/// \param[in] dst Destination character
|
||||
/// \param[in] dst_len Number of UTF-16 characters in \p dst
|
||||
/// \param[in] src_rank Source character rank
|
||||
/// \param[in] src Source character
|
||||
/// \param[in] src_len Number of UTF-16 characters in \p src
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when str_a < str_b
|
||||
/// - =0 when str_a == str_b
|
||||
/// - >0 when str_a > str_b
|
||||
///
|
||||
/// \note
|
||||
/// The function does not treat \\0 characters as terminators for performance reasons.
|
||||
/// Therefore \p count_a and \p count_b must represent exact string lengths.
|
||||
///
|
||||
static inline int CompareString(const wchar_t *str_a, unsigned __int16 count_a, const wchar_t *str_b, unsigned __int16 count_b)
|
||||
inline translation(
|
||||
_In_opt_ transetid_t set = 0,
|
||||
_In_opt_ unsigned __int16 dst_rank = 0,
|
||||
_In_opt_z_count_(dst_len) const wchar_t *dst = NULL,
|
||||
_In_opt_ size_t dst_len = 0,
|
||||
_In_opt_ unsigned __int16 src_rank = 0,
|
||||
_In_opt_z_count_(src_len) const wchar_t *src = NULL,
|
||||
_In_opt_ size_t src_len = 0)
|
||||
{
|
||||
for (unsigned __int16 i = 0; ; i++) {
|
||||
if (i >= count_a && i >= count_b) return 0;
|
||||
else if (i >= count_a && i < count_b) return -1;
|
||||
else if (i < count_a && i >= count_b) return +1;
|
||||
else if (str_a[i] < str_b[i]) return -1;
|
||||
else if (str_a[i] > str_b[i]) return +1;
|
||||
}
|
||||
this->set = set;
|
||||
this->dst_rank = dst_rank;
|
||||
this->src_rank = src_rank;
|
||||
this->dst_to = static_cast<unsigned __int16>(dst_len);
|
||||
if (dst_len) memcpy(this->data, dst, sizeof(wchar_t)*dst_len);
|
||||
this->src_to = static_cast<unsigned __int16>(this->dst_to + src_len);
|
||||
if (src_len) memcpy(this->data + this->dst_to, src, sizeof(wchar_t)*src_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* dst () const { return data; };
|
||||
inline wchar_t* dst () { return data; };
|
||||
inline const wchar_t* dst_end() const { return data + dst_to; };
|
||||
inline wchar_t* dst_end() { return data + dst_to; };
|
||||
inline unsigned __int16 dst_len() const { return dst_to; };
|
||||
|
||||
inline wchar_t dst_at(_In_ size_t i) const
|
||||
{
|
||||
return i < dst_to ? data[i] : 0;
|
||||
}
|
||||
|
||||
inline const wchar_t* src () const { return data + dst_to; };
|
||||
inline wchar_t* src () { return data + dst_to; };
|
||||
inline const wchar_t* src_end() const { return data + src_to; };
|
||||
inline wchar_t* src_end() { return data + src_to; };
|
||||
inline unsigned __int16 src_len() const { return src_to - dst_to; };
|
||||
|
||||
inline wchar_t src_at(_In_ size_t i) const
|
||||
{
|
||||
size_t ii = i + dst_to; // absolute index
|
||||
return ii < src_to ? data[ii] : 0;
|
||||
}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
///
|
||||
/// Composition index
|
||||
/// Translation index
|
||||
///
|
||||
class indexComp : public index<unsigned __int16, unsigned __int32, translation>
|
||||
class indexSrc : public index<unsigned __int16, unsigned __int32, translation>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@@ -92,7 +141,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexComp(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, translation>(h) {}
|
||||
indexSrc(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, translation>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two transformations by string (for searching)
|
||||
@@ -107,7 +156,10 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const translation &a, _In_ const translation &b) const
|
||||
{
|
||||
int r = translation::CompareString(a.str, a.str_len, b.str, b.str_len);
|
||||
if (a.set < b.set) return -1;
|
||||
else if (a.set > b.set) return +1;
|
||||
|
||||
int r = ZRCola::CompareString(a.src(), a.src_len(), b.src(), b.src_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
@@ -126,21 +178,27 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare_sort(_In_ const translation &a, _In_ const translation &b) const
|
||||
{
|
||||
int r = translation::CompareString(a.str, a.str_len, b.str, b.str_len);
|
||||
if (a.set < b.set) return -1;
|
||||
else if (a.set > b.set) return +1;
|
||||
|
||||
int r = ZRCola::CompareString(a.src(), a.src_len(), b.src(), b.src_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return +1;
|
||||
if (a.src_rank < b.src_rank) return -1;
|
||||
else if (a.src_rank > b.src_rank) return +1;
|
||||
|
||||
r = ZRCola::CompareString(a.dst(), a.dst_len(), b.dst(), b.dst_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxComp; ///< Composition index
|
||||
} idxSrc; ///< Translation index
|
||||
|
||||
|
||||
///
|
||||
/// Decomposition index
|
||||
/// Inverse translation index
|
||||
///
|
||||
class indexDecomp : public index<unsigned __int16, unsigned __int32, translation>
|
||||
class indexDst : public index<unsigned __int16, unsigned __int32, translation>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@@ -148,7 +206,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexDecomp(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, translation>(h) {}
|
||||
indexDst(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, translation>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two transformations by character (for searching)
|
||||
@@ -163,8 +221,11 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const translation &a, _In_ const translation &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return +1;
|
||||
if (a.set < b.set) return -1;
|
||||
else if (a.set > b.set) return +1;
|
||||
|
||||
int r = ZRCola::CompareString(a.dst(), a.dst_len(), b.dst(), b.dst_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -182,18 +243,21 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare_sort(_In_ const translation &a, _In_ const translation &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return +1;
|
||||
if (a.set < b.set) return -1;
|
||||
else if (a.set > b.set) return +1;
|
||||
|
||||
if (a.rank < b.rank) return -1;
|
||||
else if (a.rank > b.rank) return +1;
|
||||
int r = ZRCola::CompareString(a.dst(), a.dst_len(), b.dst(), b.dst_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
int r = translation::CompareString(a.str, a.str_len, b.str, b.str_len);
|
||||
if (a.dst_rank < b.dst_rank) return -1;
|
||||
else if (a.dst_rank > b.dst_rank) return +1;
|
||||
|
||||
r = ZRCola::CompareString(a.src(), a.src_len(), b.src(), b.src_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxDecomp; ///< Decomposition index
|
||||
} idxDst; ///< Inverse translation index
|
||||
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Transformation data
|
||||
@@ -202,44 +266,47 @@ namespace ZRCola {
|
||||
///
|
||||
/// Constructs the database
|
||||
///
|
||||
inline translation_db() : idxComp(data), idxDecomp(data) {}
|
||||
inline translation_db() : idxSrc(data), idxDst(data) {}
|
||||
|
||||
///
|
||||
/// Clears the database
|
||||
///
|
||||
inline void clear()
|
||||
{
|
||||
idxComp .clear();
|
||||
idxDecomp.clear();
|
||||
data .clear();
|
||||
idxSrc.clear();
|
||||
idxDst.clear();
|
||||
data .clear();
|
||||
}
|
||||
|
||||
///
|
||||
/// Composes string
|
||||
/// Translates string
|
||||
///
|
||||
/// \param[in] set Translation set ID
|
||||
/// \param[in] input Input string (UTF-16)
|
||||
/// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated.
|
||||
/// \param[out] output Output string (UTF-16)
|
||||
/// \param[out] map The vector of source to destination index mappings (optional)
|
||||
///
|
||||
void Compose(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL) const;
|
||||
void Translate(_In_ transetid_t set, _In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL) const;
|
||||
|
||||
///
|
||||
/// Decomposes string
|
||||
/// Inverse translates string
|
||||
///
|
||||
/// \param[in] set Translation set ID
|
||||
/// \param[in] input Input string (UTF-16)
|
||||
/// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated.
|
||||
/// \param[out] output Output string (UTF-16)
|
||||
/// \param[out] map The vector of source to destination index mappings (optional)
|
||||
///
|
||||
inline void Decompose(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL) const
|
||||
inline void TranslateInv(_In_ transetid_t set, _In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL) const
|
||||
{
|
||||
Decompose(input, inputMax, NULL, langid_t::blank, output, map);
|
||||
TranslateInv(set, input, inputMax, NULL, langid_t::blank, output, map);
|
||||
}
|
||||
|
||||
///
|
||||
/// Decomposes string according ommiting language specific characters
|
||||
/// Inverse translates string according ommiting language specific characters
|
||||
///
|
||||
/// \param[in] set Translation set ID
|
||||
/// \param[in] input Input string (UTF-16)
|
||||
/// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated.
|
||||
/// \param[in] lc_db Language character database
|
||||
@@ -247,15 +314,314 @@ namespace ZRCola {
|
||||
/// \param[out] output Output string (UTF-16)
|
||||
/// \param[out] map The vector of source to destination index mappings (optional)
|
||||
///
|
||||
void Decompose(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _In_opt_ const langchar_db *lc_db, _In_opt_ langid_t lang, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL) const;
|
||||
void TranslateInv(_In_ transetid_t set, _In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _In_opt_ const langchar_db *lc_db, _In_opt_ langid_t lang, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL) const;
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<translation_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> translation_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Translation set database
|
||||
///
|
||||
class ZRCOLA_API transet_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
///
|
||||
/// Translation set data
|
||||
///
|
||||
struct transet {
|
||||
public:
|
||||
transetid_t set; ///< Translation set ID
|
||||
|
||||
protected:
|
||||
unsigned __int16 src_to; ///< Source name end in \c data
|
||||
unsigned __int16 dst_to; ///< Sestination name end in \c data
|
||||
wchar_t data[]; ///< Source and destination names
|
||||
|
||||
private:
|
||||
inline transet(_In_ const transet &other);
|
||||
inline transet& operator=(_In_ const transet &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the translation set
|
||||
///
|
||||
/// \param[in] set Translation set ID
|
||||
/// \param[in] src Translation set source
|
||||
/// \param[in] src_len Number of UTF-16 characters in \p src
|
||||
/// \param[in] dst Translation set destination
|
||||
/// \param[in] dst_len Number of UTF-16 characters in \p dst
|
||||
///
|
||||
inline transet(
|
||||
_In_opt_ transetid_t set = 0,
|
||||
_In_opt_z_count_(src_len) const wchar_t *src = NULL,
|
||||
_In_opt_ size_t src_len = 0,
|
||||
_In_opt_z_count_(dst_len) const wchar_t *dst = NULL,
|
||||
_In_opt_ size_t dst_len = 0)
|
||||
{
|
||||
this->set = set;
|
||||
this->src_to = static_cast<unsigned __int16>(src_len);
|
||||
if (src_len) memcpy(this->data, src, sizeof(wchar_t)*src_len);
|
||||
this->dst_to = static_cast<unsigned __int16>(this->src_to + dst_len);
|
||||
if (dst_len) memcpy(this->data + this->src_to, dst, sizeof(wchar_t)*dst_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* src () const { return data; };
|
||||
inline wchar_t* src () { return data; };
|
||||
inline const wchar_t* src_end() const { return data + src_to; };
|
||||
inline wchar_t* src_end() { return data + src_to; };
|
||||
inline unsigned __int16 src_len() const { return src_to; };
|
||||
|
||||
inline const wchar_t* dst () const { return data + src_to; };
|
||||
inline wchar_t* dst () { return data + src_to; };
|
||||
inline const wchar_t* dst_end() const { return data + dst_to; };
|
||||
inline wchar_t* dst_end() { return data + dst_to; };
|
||||
inline unsigned __int16 dst_len() const { return dst_to - src_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
///
|
||||
/// Translation set index
|
||||
///
|
||||
class indexTranSet : public index<unsigned __int16, unsigned __int32, transet>
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Constructs the index
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexTranSet(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, transet>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two translation sets by ID (for searching)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when a < b
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare(_In_ const transet &a, _In_ const transet &b) const
|
||||
{
|
||||
if (a.set < b.set) return -1;
|
||||
else if (a.set > b.set) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxTranSet; ///< Translation set index
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Translation set data
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the database
|
||||
///
|
||||
inline transet_db() : idxTranSet(data) {}
|
||||
|
||||
///
|
||||
/// Clears the database
|
||||
///
|
||||
inline void clear()
|
||||
{
|
||||
idxTranSet.clear();
|
||||
data .clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<transet_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transet_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Translation sequence database
|
||||
///
|
||||
class ZRCOLA_API transeq_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
///
|
||||
/// Translation sequence data
|
||||
///
|
||||
struct transeq {
|
||||
public:
|
||||
transeqid_t seq; ///< Translation sequence ID
|
||||
unsigned __int16 rank; ///< Translation sequence rank
|
||||
|
||||
protected:
|
||||
unsigned __int16 name_to; ///< Translation sequence name end in \c data
|
||||
unsigned __int16 sets_to; ///< Translation sequence sets end in \c data
|
||||
wchar_t data[]; ///< Translation sequence name and sets
|
||||
|
||||
private:
|
||||
inline transeq(_In_ const transeq &other);
|
||||
inline transeq& operator=(_In_ const transeq &other);
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the translation sequence
|
||||
///
|
||||
/// \param[in] seq Translation sequence ID
|
||||
/// \param[in] rank Translation sequence rank
|
||||
/// \param[in] name Translation sequence source
|
||||
/// \param[in] name_len Number of UTF-16 characters in \p src
|
||||
/// \param[in] sets Translation sequence destination
|
||||
/// \param[in] sets_len Number of UTF-16 characters in \p sets
|
||||
///
|
||||
inline transeq(
|
||||
_In_opt_ transeqid_t seq = 0,
|
||||
_In_opt_ unsigned __int16 rank = 0,
|
||||
_In_opt_z_count_(name_len) const wchar_t *name = NULL,
|
||||
_In_opt_ size_t name_len = 0,
|
||||
_In_opt_count_ (sets_len) const transetid_t *sets = NULL,
|
||||
_In_opt_ size_t sets_len = 0)
|
||||
{
|
||||
this->seq = seq;
|
||||
this->rank = rank;
|
||||
this->name_to = static_cast<unsigned __int16>(name_len);
|
||||
if (name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len);
|
||||
this->sets_to = static_cast<unsigned __int16>(this->name_to + sets_len);
|
||||
if (sets_len) memcpy(this->data + this->name_to, sets, sizeof(transetid_t)*sets_len);
|
||||
}
|
||||
|
||||
inline const wchar_t* name () const { return data; };
|
||||
inline wchar_t* name () { return data; };
|
||||
inline const wchar_t* name_end() const { return data + name_to; };
|
||||
inline wchar_t* name_end() { return data + name_to; };
|
||||
inline unsigned __int16 name_len() const { return name_to; };
|
||||
|
||||
inline const transetid_t* sets () const { return reinterpret_cast<const transetid_t*>(data + name_to); };
|
||||
inline transetid_t* sets () { return reinterpret_cast< transetid_t*>(data + name_to); };
|
||||
inline const transetid_t* sets_end() const { return reinterpret_cast<const transetid_t*>(data + sets_to); };
|
||||
inline transetid_t* sets_end() { return reinterpret_cast< transetid_t*>(data + sets_to); };
|
||||
inline unsigned __int16 sets_len() const { return sets_to - name_to; };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
///
|
||||
/// Translation sequence index
|
||||
///
|
||||
class indexTranSeq : public index<unsigned __int16, unsigned __int32, transeq>
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Constructs the index
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexTranSeq(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, transeq>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two translation sequences by ID (for searching)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when a < b
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare(_In_ const transeq &a, _In_ const transeq &b) const
|
||||
{
|
||||
if (a.seq < b.seq) return -1;
|
||||
else if (a.seq > b.seq) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxTranSeq; ///< Translation sequence index
|
||||
|
||||
///
|
||||
/// Rank index
|
||||
///
|
||||
class indexRank : public index<unsigned __int16, unsigned __int32, transeq>
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Constructs the index
|
||||
///
|
||||
/// \param[in] h Reference to vector holding the data
|
||||
///
|
||||
indexRank(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, transeq>(h) {}
|
||||
|
||||
///
|
||||
/// Compares two translation sets by rank (for searching)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when a < b
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare(_In_ const transeq &a, _In_ const transeq &b) const
|
||||
{
|
||||
if (a.rank < b.rank) return -1;
|
||||
else if (a.rank > b.rank) return +1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
///
|
||||
/// Compares two translation sets by rank (for sorting)
|
||||
///
|
||||
/// \param[in] a Pointer to first element
|
||||
/// \param[in] b Pointer to second element
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when a < b
|
||||
/// - =0 when a == b
|
||||
/// - >0 when a > b
|
||||
///
|
||||
virtual int compare_sort(_In_ const transeq &a, _In_ const transeq &b) const
|
||||
{
|
||||
if (a.rank < b.rank) return -1;
|
||||
else if (a.rank > b.rank) return +1;
|
||||
|
||||
unsigned __int16
|
||||
a_name_len = a.name_len(),
|
||||
b_name_len = b.name_len();
|
||||
int r = _wcsncoll(a.name(), b.name(), std::min<unsigned __int16>(a_name_len, b_name_len));
|
||||
if (r != 0) return r;
|
||||
if (a_name_len < b_name_len) return -1;
|
||||
else if (a_name_len > b_name_len) return +1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxRank; ///< Rank index
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Translation sequence data
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the database
|
||||
///
|
||||
inline transeq_db() : idxTranSeq(data), idxRank(data) {}
|
||||
|
||||
///
|
||||
/// Clears the database
|
||||
///
|
||||
inline void clear()
|
||||
{
|
||||
idxTranSeq.clear();
|
||||
idxRank .clear();
|
||||
data .clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<transeq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transeq_rec;
|
||||
};
|
||||
|
||||
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::translation_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"TRN";
|
||||
const ZRCola::recordid_t ZRCola::translation_rec::id = *(ZRCola::recordid_t*)"TRN";
|
||||
const ZRCola::recordid_t ZRCola::transet_rec ::id = *(ZRCola::recordid_t*)"TSE";
|
||||
const ZRCola::recordid_t ZRCola::transeq_rec ::id = *(ZRCola::recordid_t*)"TSQ";
|
||||
|
||||
|
||||
///
|
||||
@@ -268,13 +634,13 @@ const ZRCola::recordid_t stdex::idrec::record<ZRCola::translation_db, ZRCola::re
|
||||
///
|
||||
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::translation_db &db)
|
||||
{
|
||||
// Write composition index.
|
||||
// Write translation index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxComp;
|
||||
stream << db.idxSrc;
|
||||
|
||||
// Write decomposition index.
|
||||
// Write inverse translation index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxDecomp;
|
||||
stream << db.idxDst;
|
||||
|
||||
// Write data count.
|
||||
auto data_count = db.data.size();
|
||||
@@ -307,12 +673,150 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::t
|
||||
///
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::translation_db &db)
|
||||
{
|
||||
// Read composition index.
|
||||
stream >> db.idxComp;
|
||||
// Read translation index.
|
||||
stream >> db.idxSrc;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read decomposition index.
|
||||
stream >> db.idxDecomp;
|
||||
// Read inverse translation index.
|
||||
stream >> db.idxDst;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read data count.
|
||||
unsigned __int32 count;
|
||||
stream.read((char*)&count, sizeof(count));
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
if (count) {
|
||||
// Read data.
|
||||
db.data.resize(count);
|
||||
stream.read((char*)db.data.data(), sizeof(unsigned __int16)*count);
|
||||
} else
|
||||
db.data.clear();
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Writes translation set database to a stream
|
||||
///
|
||||
/// \param[in] stream Output stream
|
||||
/// \param[in] db Translation set database
|
||||
///
|
||||
/// \returns The stream \p stream
|
||||
///
|
||||
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::transet_db &db)
|
||||
{
|
||||
// Write translation set index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxTranSet;
|
||||
|
||||
// Write data count.
|
||||
auto data_count = db.data.size();
|
||||
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
|
||||
// 4G check
|
||||
if (data_count > 0xffffffff) {
|
||||
stream.setstate(std::ios_base::failbit);
|
||||
return stream;
|
||||
}
|
||||
#endif
|
||||
if (stream.fail()) return stream;
|
||||
unsigned __int32 count = (unsigned __int32)data_count;
|
||||
stream.write((const char*)&count, sizeof(count));
|
||||
|
||||
// Write data.
|
||||
if (stream.fail()) return stream;
|
||||
stream.write((const char*)db.data.data(), sizeof(unsigned __int16)*count);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Reads translation set database from a stream
|
||||
///
|
||||
/// \param[in ] stream Input stream
|
||||
/// \param[out] db Translation set database
|
||||
///
|
||||
/// \returns The stream \p stream
|
||||
///
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::transet_db &db)
|
||||
{
|
||||
// Read translation set index.
|
||||
stream >> db.idxTranSet;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read data count.
|
||||
unsigned __int32 count;
|
||||
stream.read((char*)&count, sizeof(count));
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
if (count) {
|
||||
// Read data.
|
||||
db.data.resize(count);
|
||||
stream.read((char*)db.data.data(), sizeof(unsigned __int16)*count);
|
||||
} else
|
||||
db.data.clear();
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Writes translation sequence database to a stream
|
||||
///
|
||||
/// \param[in] stream Output stream
|
||||
/// \param[in] db Translation sequence database
|
||||
///
|
||||
/// \returns The stream \p stream
|
||||
///
|
||||
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::transeq_db &db)
|
||||
{
|
||||
// Write translation sequence index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxTranSeq;
|
||||
|
||||
// Write rank index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxRank;
|
||||
|
||||
// Write data count.
|
||||
auto data_count = db.data.size();
|
||||
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
|
||||
// 4G check
|
||||
if (data_count > 0xffffffff) {
|
||||
stream.setstate(std::ios_base::failbit);
|
||||
return stream;
|
||||
}
|
||||
#endif
|
||||
if (stream.fail()) return stream;
|
||||
unsigned __int32 count = (unsigned __int32)data_count;
|
||||
stream.write((const char*)&count, sizeof(count));
|
||||
|
||||
// Write data.
|
||||
if (stream.fail()) return stream;
|
||||
stream.write((const char*)db.data.data(), sizeof(unsigned __int16)*count);
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Reads translation sequence database from a stream
|
||||
///
|
||||
/// \param[in ] stream Input stream
|
||||
/// \param[out] db Translation sequence database
|
||||
///
|
||||
/// \returns The stream \p stream
|
||||
///
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::transeq_db &db)
|
||||
{
|
||||
// Read translation sequence index.
|
||||
stream >> db.idxTranSeq;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read rank index.
|
||||
stream >> db.idxRank;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read data count.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
const ZRCola::chrcatid_t ZRCola::chrcatid_t::blank = {};
|
||||
|
||||
|
||||
bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<wchar_t, charrank_t> &hits, _Inout_ std::map<wchar_t, charrank_t> &hits_sub, _In_opt_ bool (__cdecl *fn_abort)(void *cookie), _In_opt_ void *cookie) const
|
||||
bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<std::wstring, charrank_t> &hits, _Inout_ std::map<std::wstring, charrank_t> &hits_sub, _In_opt_ bool (__cdecl *fn_abort)(void *cookie), _In_opt_ void *cookie) const
|
||||
{
|
||||
assert(str);
|
||||
|
||||
@@ -76,14 +76,15 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
|
||||
|
||||
if (idxDsc.find(term.c_str(), term.size(), &data, &len)) {
|
||||
// The term was found.
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
for (size_t i = 0, j = 0; i < len; i += j + 1) {
|
||||
if (fn_abort && fn_abort(cookie)) return false;
|
||||
wchar_t c = data[i];
|
||||
if (cats.find(GetCharCat(c)) != cats.end()) {
|
||||
j = wcsnlen(data + i, len - i);
|
||||
if (cats.find(GetCharCat(data + i, j)) != cats.end()) {
|
||||
std::wstring c(data + i, j);
|
||||
auto idx = hits.find(c);
|
||||
if (idx == hits.end()) {
|
||||
// New character.
|
||||
hits.insert(std::make_pair(data[i], 1.0/len));
|
||||
hits.insert(std::make_pair(std::move(c), 1.0/len));
|
||||
} else {
|
||||
// Increase rating of existing character.
|
||||
idx->second += 1.0/len;
|
||||
@@ -94,14 +95,15 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
|
||||
|
||||
if (idxDscSub.find(term.c_str(), term.size(), &data, &len)) {
|
||||
// The term was found in the sub-term index.
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
for (size_t i = 0, j = 0; i < len; i += j + 1) {
|
||||
if (fn_abort && fn_abort(cookie)) return false;
|
||||
wchar_t c = data[i];
|
||||
if (cats.find(GetCharCat(c)) != cats.end()) {
|
||||
j = wcsnlen(data + i, len - i);
|
||||
if (cats.find(GetCharCat(data + i, j)) != cats.end()) {
|
||||
std::wstring c(data + i, j);
|
||||
auto idx = hits_sub.find(c);
|
||||
if (idx == hits_sub.end()) {
|
||||
// New character.
|
||||
hits_sub.insert(std::make_pair(data[i], 1.0/len));
|
||||
hits_sub.insert(std::make_pair(c, 1.0/len));
|
||||
} else {
|
||||
// Increase rating of existing character.
|
||||
idx->second += 1.0/len;
|
||||
|
||||
@@ -71,26 +71,12 @@ void ZRCola::LangConvert(_In_ LANGID lang_win, _Inout_ ZRCola::langid_t &lang)
|
||||
#endif
|
||||
|
||||
|
||||
bool ZRCola::langchar_db::IsLocalCharacter(_In_ wchar_t chr, _In_ ZRCola::langid_t lang) const
|
||||
bool ZRCola::langchar_db::IsLocalCharacter(_In_ const wchar_t *chr, _In_ const wchar_t *chr_end, _In_ ZRCola::langid_t lang) const
|
||||
{
|
||||
for (size_t l = 0, r = idxChr.size(); l < r; ) {
|
||||
// Test the character in the middle of the search area.
|
||||
size_t m = (l + r) / 2;
|
||||
const langchar &lc = idxChr[m];
|
||||
|
||||
// Do the bisection test on character.
|
||||
if (chr < lc.chr) r = m;
|
||||
else if (lc.chr < chr ) l = m + 1;
|
||||
else {
|
||||
// Do the bisection test on language.
|
||||
if (lang < lc.lang) r = m;
|
||||
else if (lang > lc.lang) l = m + 1;
|
||||
else {
|
||||
// Match found.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
size_t n = chr_end - chr;
|
||||
assert(n <= 0xffff);
|
||||
std::unique_ptr<langchar> lc((langchar*)new char[sizeof(langchar) + sizeof(wchar_t)*n]);
|
||||
lc->langchar::langchar(lang, chr, n);
|
||||
indexChr::size_type start;
|
||||
return idxChr.find(*lc, start);
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
Copyright 2015-2017 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
void ZRCola::Normalize(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map)
|
||||
{
|
||||
}
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include "../include/zrcola/character.h"
|
||||
#include "../include/zrcola/language.h"
|
||||
#include "../include/zrcola/normalize.h"
|
||||
#include "../include/zrcola/translate.h"
|
||||
#include "../include/zrcola/tag.h"
|
||||
|
||||
|
||||
@@ -20,23 +20,24 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
bool ZRCola::chrtag_db::Search(_In_ const std::map<tagid_t, unsigned __int16> &tags, _In_ const character_db &ch_db, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<wchar_t, charrank_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie), _In_opt_ void *cookie) const
|
||||
bool ZRCola::chrtag_db::Search(_In_ const std::map<tagid_t, unsigned __int16> &tags, _In_ const character_db &ch_db, _In_ const std::set<chrcatid_t> &cats, _Inout_ std::map<std::wstring, charrank_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie), _In_opt_ void *cookie) const
|
||||
{
|
||||
for (auto tag = tags.cbegin(), tag_end = tags.cend(); tag != tag_end; ++tag) {
|
||||
if (fn_abort && fn_abort(cookie)) return false;
|
||||
|
||||
// Search for tagged characters.
|
||||
chrtag el = { 0, tag->first };
|
||||
size_t start, end;
|
||||
if (idxTag.find(el, start, end)) {
|
||||
if (idxTag.find(chrtag(NULL, 0, tag->first), start, end)) {
|
||||
for (size_t i = start; i < end; i++) {
|
||||
if (fn_abort && fn_abort(cookie)) return false;
|
||||
const chrtag &ct = idxTag[i];
|
||||
if (cats.find(ch_db.GetCharCat(ct.chr)) != cats.end()) {
|
||||
auto idx = hits.find(ct.chr);
|
||||
unsigned __int16 len = ct.chr_len();
|
||||
if (cats.find(ch_db.GetCharCat(ct.chr(), len)) != cats.end()) {
|
||||
std::wstring chr(ct.chr(), len);
|
||||
auto idx = hits.find(chr);
|
||||
if (idx == hits.end()) {
|
||||
// New character.
|
||||
hits.insert(std::make_pair(ct.chr, tag->second));
|
||||
hits.insert(std::make_pair(std::move(chr), tag->second));
|
||||
} else {
|
||||
// Increase count for existing character.
|
||||
idx->second += tag->second;
|
||||
@@ -95,8 +96,7 @@ bool ZRCola::tagname_db::Search(_In_z_ const wchar_t *str, _In_ LCID locale, _In
|
||||
|
||||
// Find the name.
|
||||
std::unique_ptr<tagname> tn(reinterpret_cast<tagname*>(new char[sizeof(tagname) + sizeof(wchar_t)*name.length()]));
|
||||
tn->locale = locale;
|
||||
memcpy(tn->name, name.data(), sizeof(wchar_t)*(tn->name_len = (unsigned __int16)name.length()));
|
||||
tn->tagname::tagname(0, locale, name.data(), name.length());
|
||||
size_t start, end;
|
||||
if (idxName.find(*tn, start, end)) {
|
||||
// The name was found.
|
||||
|
||||
@@ -20,36 +20,38 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
void ZRCola::translation_db::Compose(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map) const
|
||||
void ZRCola::translation_db::Translate(_In_ transetid_t set, _In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map) const
|
||||
{
|
||||
assert(input || inputMax == 0);
|
||||
|
||||
// Trim inputMax to actual length.
|
||||
inputMax = inputMax != (size_t)-1 ? wcsnlen(input, inputMax) : wcslen(input);
|
||||
|
||||
// Clear the output string and preallocate at least inputMax chars.
|
||||
// Since composing is usually reducing the number of chars, memory reallocation is not expected later.
|
||||
// Clear the output.
|
||||
output.clear();
|
||||
output.reserve(inputMax);
|
||||
if (map)
|
||||
map->clear();
|
||||
|
||||
auto compositionsCount = idxComp.size();
|
||||
// Limit search to the given set first.
|
||||
indexSrc::size_type l_set, r_set;
|
||||
idxSrc.find(translation(set ), l_set);
|
||||
idxSrc.find(translation(set + 1), r_set);
|
||||
|
||||
for (size_t i = 0; i < inputMax;) {
|
||||
// Find the longest matching composition at i-th character.
|
||||
// Find the longest matching translation at i-th character.
|
||||
size_t l_match = (size_t)-1;
|
||||
for (size_t l = 0, r = compositionsCount, ii = i, j = 0; ii < inputMax && l < r; ii++, j++) {
|
||||
for (size_t l = l_set, r = r_set, ii = i, j = 0; ii < inputMax && l < r; ii++, j++) {
|
||||
wchar_t c = input[ii];
|
||||
while (l < r) {
|
||||
// Test the composition in the middle of the search area.
|
||||
// Test the translation in the middle of the search area.
|
||||
size_t m = (l + r) / 2;
|
||||
|
||||
// Get the j-th character of the composition.
|
||||
// All compositions that get short on characters are lexically ordered before.
|
||||
// Get the j-th character of the translation.
|
||||
// All translations that get short on characters are lexically ordered before.
|
||||
// Thus the j-th character is considered 0.
|
||||
const translation &trans = idxComp[m];
|
||||
wchar_t s = j < trans.str_len ? trans.str[j] : 0;
|
||||
const translation &trans = idxSrc[m];
|
||||
wchar_t s = trans.src_at(j);
|
||||
|
||||
// Do the bisection test.
|
||||
if (c < s) r = m;
|
||||
@@ -57,25 +59,25 @@ void ZRCola::translation_db::Compose(_In_z_count_(inputMax) const wchar_t* input
|
||||
else {
|
||||
// Character found.
|
||||
|
||||
// Narrow the search area on the left to start at the first composition in the run.
|
||||
// Narrow the search area on the left to start at the first translation in the run.
|
||||
for (size_t rr = m; l < rr;) {
|
||||
size_t m = (l + rr) / 2;
|
||||
const translation &trans = idxComp[m];
|
||||
wchar_t s = j < trans.str_len ? trans.str[j] : 0;
|
||||
const translation &trans = idxSrc[m];
|
||||
wchar_t s = trans.src_at(j);
|
||||
if (c <= s) rr = m; else l = m + 1;
|
||||
}
|
||||
|
||||
// Narrow the search area on the right to end at the first composition not in the run.
|
||||
// Narrow the search area on the right to end at the first translation not in the run.
|
||||
for (size_t ll = m + 1; ll < r;) {
|
||||
size_t m = (ll + r) / 2;
|
||||
const translation &trans = idxComp[m];
|
||||
wchar_t s = j < trans.str_len ? trans.str[j] : 0;
|
||||
const translation &trans = idxSrc[m];
|
||||
wchar_t s = trans.src_at(j);
|
||||
if (s <= c) ll = m + 1; else r = m;
|
||||
}
|
||||
|
||||
const translation &trans = idxComp[l];
|
||||
if (j + 1 == trans.str_len) {
|
||||
// The first composition of the run was a match (thus far). Save it.
|
||||
const translation &trans = idxSrc[l];
|
||||
if (j + 1 == trans.src_len()) {
|
||||
// The first translation of the run was a match (thus far). Save it.
|
||||
l_match = l;
|
||||
}
|
||||
|
||||
@@ -84,12 +86,12 @@ void ZRCola::translation_db::Compose(_In_z_count_(inputMax) const wchar_t* input
|
||||
}
|
||||
}
|
||||
|
||||
if (l_match < compositionsCount) {
|
||||
// The saved composition was an exact match.
|
||||
const translation &trans = idxComp[l_match];
|
||||
output += trans.chr;
|
||||
i += trans.str_len;
|
||||
if (trans.str_len > 1 && map) {
|
||||
if (l_match < r_set) {
|
||||
// The saved translation was an exact match.
|
||||
const translation &trans = idxSrc[l_match];
|
||||
output.append(trans.dst(), trans.dst_end());
|
||||
i += trans.src_len();
|
||||
if (trans.src_len() != trans.dst_len() && map) {
|
||||
// Mapping changed.
|
||||
map->push_back(ZRCola::mapping(i, output.length()));
|
||||
}
|
||||
@@ -102,66 +104,92 @@ void ZRCola::translation_db::Compose(_In_z_count_(inputMax) const wchar_t* input
|
||||
}
|
||||
|
||||
|
||||
void ZRCola::translation_db::Decompose(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _In_ const langchar_db *lc_db, _In_ langid_t lang, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map) const
|
||||
void ZRCola::translation_db::TranslateInv(_In_ transetid_t set, _In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _In_ const langchar_db *lc_db, _In_ langid_t lang, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map) const
|
||||
{
|
||||
assert(input || inputMax == 0);
|
||||
|
||||
// Trim inputMax to actual length.
|
||||
inputMax = inputMax != (size_t)-1 ? wcsnlen(input, inputMax) : wcslen(input);
|
||||
|
||||
// Clear the output string and preallocate at least 2*inputMax chars.
|
||||
// Since decomposition expands the string, let's keep our fingers crossed to avoid reallocation later.
|
||||
// Clear the output.
|
||||
output.clear();
|
||||
output.reserve(inputMax * 2);
|
||||
output.reserve(inputMax);
|
||||
if (map)
|
||||
map->clear();
|
||||
|
||||
auto decompositionsCount = idxDecomp.size();
|
||||
// Limit search to the given set first.
|
||||
indexDst::size_type l_set, r_set;
|
||||
idxDst.find(translation(set ), l_set);
|
||||
idxDst.find(translation(set + 1), r_set);
|
||||
|
||||
for (size_t i = 0; i < inputMax;) {
|
||||
// Find whether the character can be decomposed.
|
||||
wchar_t c = input[i];
|
||||
|
||||
for (size_t l = 0, r = decompositionsCount;; ) {
|
||||
if (l < r) {
|
||||
// Find the longest matching inverse translation at i-th character.
|
||||
size_t l_match = (size_t)-1;
|
||||
for (size_t l = 0, r = r_set, ii = i, j = 0; ii < inputMax && l < r; ii++, j++) {
|
||||
wchar_t c = input[ii];
|
||||
while (l < r) {
|
||||
// Test the inverse translation in the middle of the search area.
|
||||
size_t m = (l + r) / 2;
|
||||
const translation &trans = idxDecomp[m];
|
||||
wchar_t decompSrc = trans.chr;
|
||||
if (c < decompSrc) r = m;
|
||||
else if (decompSrc < c) l = m + 1;
|
||||
|
||||
// Get the j-th character of the inverse translation.
|
||||
// All inverse translations that get short on characters are lexically ordered before.
|
||||
// Thus the j-th character is considered 0.
|
||||
const translation &trans = idxDst[m];
|
||||
wchar_t s = trans.dst_at(j);
|
||||
|
||||
// Do the bisection test.
|
||||
if (c < s) r = m;
|
||||
else if (s < c) l = m + 1;
|
||||
else {
|
||||
// Character found.
|
||||
|
||||
// Narrow the search area on the left to start at the first decomposition in the run (first by rank).
|
||||
// Narrow the search area on the left to start at the first inverse translation in the run.
|
||||
for (size_t rr = m; l < rr;) {
|
||||
size_t m = (l + rr) / 2;
|
||||
const translation &trans = idxDecomp[m];
|
||||
wchar_t decompSrc = trans.chr;
|
||||
if (c <= decompSrc) rr = m; else l = m + 1;
|
||||
const translation &trans = idxDst[m];
|
||||
wchar_t s = trans.dst_at(j);
|
||||
if (c <= s) rr = m; else l = m + 1;
|
||||
}
|
||||
|
||||
const translation &trans = idxDecomp[l];
|
||||
if (trans.str_len && trans.str[0] != L'#' && (!lc_db || !lc_db->IsLocalCharacter(c, lang))) {
|
||||
// Append decomposed sequence.
|
||||
output.append(trans.str, trans.str_len);
|
||||
i++;
|
||||
if (map) {
|
||||
// Mapping changed.
|
||||
map->push_back(ZRCola::mapping(i, output.length()));
|
||||
}
|
||||
} else {
|
||||
// Character is inhibited to decompose.
|
||||
output += c;
|
||||
i++;
|
||||
// Narrow the search area on the right to end at the first inverse translation not in the run.
|
||||
for (size_t ll = m + 1; ll < r;) {
|
||||
size_t m = (ll + r) / 2;
|
||||
const translation &trans = idxDst[m];
|
||||
wchar_t s = trans.dst_at(j);
|
||||
if (s <= c) ll = m + 1; else r = m;
|
||||
}
|
||||
|
||||
const translation &trans = idxDst[l];
|
||||
if (j + 1 == trans.dst_len()) {
|
||||
// The first inverse translation of the run was a match (thus far). Save it.
|
||||
l_match = l;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// Character not found.
|
||||
output += c;
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (l_match < r_set) {
|
||||
// The saved inverse translation was an exact match.
|
||||
const translation &trans = idxDst[l_match];
|
||||
if (trans.src_len() && trans.src()[0] != L'#' && (!lc_db || !lc_db->IsLocalCharacter(trans.dst(), trans.dst_end(), lang))) {
|
||||
// Append source sequence.
|
||||
output.append(trans.src(), trans.src_end());
|
||||
i += trans.dst_len();
|
||||
if (trans.dst_len() != trans.src_len() && map) {
|
||||
// Mapping changed.
|
||||
map->push_back(ZRCola::mapping(i, output.length()));
|
||||
}
|
||||
} else {
|
||||
// Character is inhibited to inverse translate.
|
||||
output.append(trans.dst(), trans.dst_end());
|
||||
i += trans.dst_len();
|
||||
}
|
||||
} else {
|
||||
// The match was not found.
|
||||
output += input[i];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
|
||||
|
||||
namespace ZRCola {
|
||||
///
|
||||
/// Character group ID
|
||||
///
|
||||
typedef unsigned __int16 chrgrpid_t;
|
||||
|
||||
|
||||
///
|
||||
/// Character group database
|
||||
///
|
||||
@@ -46,33 +52,64 @@ namespace ZRCola {
|
||||
/// Character group data
|
||||
///
|
||||
struct chrgrp {
|
||||
unsigned __int16 id; ///< Character group id
|
||||
public:
|
||||
chrgrpid_t grp; ///< Character group ID
|
||||
unsigned __int16 rank; ///< Character group rank
|
||||
unsigned __int16 name_len; ///< Character group name length in \c data
|
||||
unsigned __int16 char_len; ///< Character list length in \c data
|
||||
wchar_t data[]; ///< Character group name and character list
|
||||
|
||||
inline const wchar_t* get_chars() const
|
||||
protected:
|
||||
unsigned __int16 name_to; ///< Character group name end in \c data
|
||||
unsigned __int16 chrlst_to; ///< Character list end in \c data
|
||||
wchar_t data[]; ///< Character group name, character list, bit vector if particular character is displayed initially
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the character group
|
||||
///
|
||||
/// \param[in] grp Character group ID
|
||||
/// \param[in] rank Character group rank
|
||||
/// \param[in] name Character group name
|
||||
/// \param[in] name_len Number of UTF-16 characters in \p name
|
||||
/// \param[in] chrlst Character list (zero delimited)
|
||||
/// \param[in] chrlst_len Number of UTF-16 characters in \p chrlst (including zero delimiters)
|
||||
/// \param[in] chrshow Binary vector which particular character is displayed initially
|
||||
///
|
||||
inline chrgrp(
|
||||
_In_opt_ chrgrpid_t grp = 0,
|
||||
_In_opt_ unsigned __int16 rank = 0,
|
||||
_In_opt_z_count_(name_len) const wchar_t *name = NULL,
|
||||
_In_opt_ size_t name_len = 0,
|
||||
_In_opt_z_count_(chrlst_len) const wchar_t *chrlst = NULL,
|
||||
_In_opt_ size_t chrlst_len = 0,
|
||||
_In_opt_count_x_((chrlst_len + 15)/16) const unsigned __int16 *chrshow = NULL)
|
||||
{
|
||||
return data + name_len;
|
||||
this->grp = grp;
|
||||
this->rank = rank;
|
||||
this->name_to = static_cast<unsigned __int16>(name_len);
|
||||
if (name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len);
|
||||
this->chrlst_to = static_cast<unsigned __int16>(this->name_to + chrlst_len);
|
||||
if (chrlst_len) {
|
||||
memcpy(this->data + this->name_to, chrlst, sizeof(wchar_t)*chrlst_len);
|
||||
memcpy(this->data + this->chrlst_to, chrshow, (chrlst_len + sizeof(*data)*8 - 1)/8);
|
||||
}
|
||||
}
|
||||
|
||||
inline wchar_t get_char(size_t index) const
|
||||
{
|
||||
assert(index < char_len);
|
||||
return data[name_len + index];
|
||||
}
|
||||
inline const wchar_t* name () const { return data; };
|
||||
inline wchar_t* name () { return data; };
|
||||
inline const wchar_t* name_end() const { return data + name_to; };
|
||||
inline wchar_t* name_end() { return data + name_to; };
|
||||
inline unsigned __int16 name_len() const { return name_to; };
|
||||
|
||||
inline const unsigned __int16* get_char_shown() const
|
||||
{
|
||||
return (const unsigned __int16*)(data + name_len + char_len);
|
||||
}
|
||||
inline const wchar_t* chrlst () const { return data + name_to; };
|
||||
inline wchar_t* chrlst () { return data + name_to; };
|
||||
inline const wchar_t* chrlst_end() const { return data + chrlst_to; };
|
||||
inline wchar_t* chrlst_end() { return data + chrlst_to; };
|
||||
inline unsigned __int16 chrlst_len() const { return chrlst_to - name_to; };
|
||||
|
||||
inline bool is_char_shown(size_t index) const
|
||||
{
|
||||
assert(index < char_len);
|
||||
return (data[name_len + char_len + index / 16] & (1 << (index % 16))) ? true : false;
|
||||
}
|
||||
inline const unsigned __int16* chrshow () const { return reinterpret_cast<const unsigned __int16*>(data + chrlst_to ); };
|
||||
inline unsigned __int16* chrshow () { return reinterpret_cast< unsigned __int16*>(data + chrlst_to ); };
|
||||
inline const unsigned __int16* chrshow_end() const { return reinterpret_cast<const unsigned __int16*>(data + chrlst_to + chrshow_len()); };
|
||||
inline unsigned __int16* chrshow_end() { return reinterpret_cast< unsigned __int16*>(data + chrlst_to + chrshow_len()); };
|
||||
inline unsigned __int16 chrshow_len() const { return (chrlst_len() + sizeof(*data)*8 - 1)/(sizeof(*data)*8); };
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -124,14 +161,17 @@ namespace ZRCola {
|
||||
if (a.rank < b.rank) return -1;
|
||||
else if (a.rank > b.rank) return +1;
|
||||
|
||||
int r = _wcsncoll(a.data, b.data, std::min<unsigned __int16>(a.name_len, b.name_len));
|
||||
unsigned __int16
|
||||
a_name_len = a.name_len(),
|
||||
b_name_len = b.name_len();
|
||||
int r = _wcsncoll(a.name(), b.name(), std::min<unsigned __int16>(a_name_len, b_name_len));
|
||||
if (r != 0) return r;
|
||||
if (a.name_len < b.name_len) return -1;
|
||||
else if (a.name_len > b.name_len) return +1;
|
||||
if (a_name_len < b_name_len) return -1;
|
||||
else if (a_name_len > b_name_len) return +1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
} idxRnk; ///< Rank index
|
||||
} idxRank; ///< Rank index
|
||||
|
||||
std::vector<unsigned __int16> data; ///< Character groups data
|
||||
|
||||
@@ -139,7 +179,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Constructs the database
|
||||
///
|
||||
inline chrgrp_db() : idxRnk(data) {}
|
||||
inline chrgrp_db() : idxRank(data) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -147,7 +187,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::chrgrp_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"CGR";
|
||||
const ZRCola::recordid_t ZRCola::chrgrp_rec::id = *(ZRCola::recordid_t*)"CGR";
|
||||
|
||||
|
||||
///
|
||||
@@ -162,7 +202,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::c
|
||||
{
|
||||
// Write rank index.
|
||||
if (stream.fail()) return stream;
|
||||
stream << db.idxRnk;
|
||||
stream << db.idxRank;
|
||||
|
||||
// Write data count.
|
||||
auto data_count = db.data.size();
|
||||
@@ -196,7 +236,7 @@ inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::c
|
||||
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::chrgrp_db &db)
|
||||
{
|
||||
// Read rank index.
|
||||
stream >> db.idxRnk;
|
||||
stream >> db.idxRank;
|
||||
if (!stream.good()) return stream;
|
||||
|
||||
// Read data count.
|
||||
|
||||
@@ -48,39 +48,75 @@ namespace ZRCola {
|
||||
/// Key sequence data
|
||||
///
|
||||
struct keyseq {
|
||||
public:
|
||||
enum modifiers_t {
|
||||
SHIFT = 1<<0, ///< SHIFT key was pressed
|
||||
CTRL = 1<<1, ///< CTRL key was pressed
|
||||
ALT = 1<<2, ///< ALT key was pressed
|
||||
};
|
||||
|
||||
wchar_t chr; ///< Character
|
||||
unsigned __int16 seq_len; ///< \c seq length
|
||||
struct key_t {
|
||||
wchar_t key; ///< Key
|
||||
unsigned __int16 modifiers; ///< Modifiers (bitwise combination of SHIFT, CTRL and ALT)
|
||||
} seq[]; ///< Key sequence
|
||||
};
|
||||
|
||||
protected:
|
||||
unsigned __int16 chr_to; ///< Character end in \c data
|
||||
unsigned __int16 seq_to; ///< Key sequence end in \c data
|
||||
wchar_t data[]; ///< Character and key sequence
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the key sequence
|
||||
///
|
||||
/// \param[in] seq Key sequence
|
||||
/// \param[in] seq_count Number of UTF-16 characters in \p seq
|
||||
/// \param[in] chr Character
|
||||
/// \param[in] chr_len Number of UTF-16 characters in \p chr
|
||||
///
|
||||
inline keyseq(
|
||||
_In_opt_count_(seq_count) const key_t *seq = NULL,
|
||||
_In_opt_ size_t seq_count = 0,
|
||||
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL,
|
||||
_In_opt_ size_t chr_len = 0)
|
||||
{
|
||||
this->chr_to = static_cast<unsigned __int16>(chr_len);
|
||||
if (chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len);
|
||||
this->seq_to = static_cast<unsigned __int16>(this->chr_to + seq_count * sizeof(key_t) / sizeof(*data));
|
||||
if (seq_count) memcpy(this->data + this->chr_to, seq, sizeof(key_t)*seq_count);
|
||||
}
|
||||
|
||||
inline const wchar_t* chr () const { return data; };
|
||||
inline wchar_t* chr () { return data; };
|
||||
inline const wchar_t* chr_end() const { return data + chr_to; };
|
||||
inline wchar_t* chr_end() { return data + chr_to; };
|
||||
inline unsigned __int16 chr_len() const { return chr_to; };
|
||||
|
||||
inline const key_t* seq () const { return reinterpret_cast<const key_t*>(data + chr_to); };
|
||||
inline key_t* seq () { return reinterpret_cast< key_t*>(data + chr_to); };
|
||||
inline const key_t* seq_end() const { return reinterpret_cast<const key_t*>(data + seq_to); };
|
||||
inline key_t* seq_end() { return reinterpret_cast< key_t*>(data + seq_to); };
|
||||
inline unsigned __int16 seq_len() const { return (seq_to - chr_to) * sizeof(*data) / sizeof(key_t); };
|
||||
|
||||
///
|
||||
/// Compares two key sequences
|
||||
///
|
||||
/// \param[in] seq_a First key sequence
|
||||
/// \param[in] count_a Number of keys in sequence \p seq_a
|
||||
/// \param[in] seq_b Second key sequence
|
||||
/// \param[in] count_b Number of keys in sequence \p seq_b
|
||||
/// \param[in] seq_a First key sequence
|
||||
/// \param[in] len_a Number of keys in sequence \p seq_a
|
||||
/// \param[in] seq_b Second key sequence
|
||||
/// \param[in] len_b Number of keys in sequence \p seq_b
|
||||
///
|
||||
/// \returns
|
||||
/// - <0 when seq_a < seq_b
|
||||
/// - =0 when seq_a == seq_b
|
||||
/// - >0 when seq_a > seq_b
|
||||
///
|
||||
static inline int CompareSequence(const key_t *seq_a, unsigned __int16 count_a, const key_t *seq_b, unsigned __int16 count_b)
|
||||
static inline int CompareSequence(_In_ const key_t *seq_a, _In_ size_t len_a, _In_ const key_t *seq_b, _In_ size_t len_b)
|
||||
{
|
||||
for (unsigned __int16 i = 0; ; i++) {
|
||||
if (i >= count_a && i >= count_b) return 0;
|
||||
else if (i >= count_a && i < count_b) return -1;
|
||||
else if (i < count_a && i >= count_b) return +1;
|
||||
for (size_t i = 0; ; i++) {
|
||||
if (i >= len_a && i >= len_b) return 0;
|
||||
else if (i >= len_a && i < len_b) return -1;
|
||||
else if (i < len_a && i >= len_b) return +1;
|
||||
else if (seq_a[i].key < seq_b[i].key ) return -1;
|
||||
else if (seq_a[i].key > seq_b[i].key ) return +1;
|
||||
else if (seq_a[i].modifiers < seq_b[i].modifiers) return -1;
|
||||
@@ -116,8 +152,8 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const keyseq &a, _In_ const keyseq &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return +1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -135,10 +171,10 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare_sort(_In_ const keyseq &a, _In_ const keyseq &b) const
|
||||
{
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return +1;
|
||||
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
int r = keyseq::CompareSequence(a.seq, a.seq_len, b.seq, b.seq_len);
|
||||
r = keyseq::CompareSequence(a.seq(), a.seq_len(), b.seq(), b.seq_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
@@ -172,7 +208,7 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare(_In_ const keyseq &a, _In_ const keyseq &b) const
|
||||
{
|
||||
int r = keyseq::CompareSequence(a.seq, a.seq_len, b.seq, b.seq_len);
|
||||
int r = keyseq::CompareSequence(a.seq(), a.seq_len(), b.seq(), b.seq_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
@@ -191,11 +227,11 @@ namespace ZRCola {
|
||||
///
|
||||
virtual int compare_sort(_In_ const keyseq &a, _In_ const keyseq &b) const
|
||||
{
|
||||
int r = keyseq::CompareSequence(a.seq, a.seq_len, b.seq, b.seq_len);
|
||||
int r = keyseq::CompareSequence(a.seq(), a.seq_len(), b.seq(), b.seq_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
if (a.chr < b.chr) return -1;
|
||||
else if (a.chr > b.chr) return +1;
|
||||
r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
|
||||
if (r != 0) return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -252,7 +288,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
const ZRCola::recordid_t stdex::idrec::record<ZRCola::keyseq_db, ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>::id = *(ZRCola::recordid_t*)"KEY";
|
||||
const ZRCola::recordid_t ZRCola::keyseq_rec::id = *(ZRCola::recordid_t*)"KEY";
|
||||
|
||||
|
||||
///
|
||||
|
||||
Submodule lib/stdex updated: 22151a982c...f843736067
Submodule lib/wxExtend updated: 1b5739aa34...d80f24189d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user