Compare commits

...

97 Commits
2.6 ... 2.7.2

Author SHA1 Message Date
e6ea4a2742 Order blocks by Unicode location
Signed-off-by: Simon Rozman <simon.rozman@amebis.si>
2025-12-03 12:49:19 +01:00
83e2022ef6 Pull translations from Transifex
Signed-off-by: Simon Rozman <simon.rozman@amebis.si>
2025-12-02 11:31:03 +01:00
45b1b0eb58 Fork my mailbox to business and personal
Signed-off-by: Simon Rozman <simon.rozman@amebis.si>
2025-11-21 03:33:12 +01:00
Simon Rozman
8119bb9271 Preset version to 2.7.2
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-21 03:27:21 +01:00
Simon Rozman
664bdce10f Pull translations from Transifex
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-17 09:52:36 +01:00
Simon Rozman
9457d74047 Fix typo
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-17 09:17:04 +01:00
Simon Rozman
26663ed888 WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 16:25:53 +01:00
Simon Rozman
9f9e19e3b0 Set checksum in binaries
Otherwise, MSI treats binaries as broken.

Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 16:25:53 +01:00
Simon Rozman
df902e9122 Remove Debug signing and add Azure cloud signing
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 16:25:53 +01:00
Simon Rozman
8337a2822f Updater: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 16:25:53 +01:00
Simon Rozman
e8f39da602 Replace Unicode character categories with blocks
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 16:25:49 +01:00
Simon Rozman
1ba71443f5 Add support for Unicode character blocks
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 11:59:43 +01:00
Simon Rozman
9c4caf506b Update Git repo URL
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-14 07:53:58 +01:00
Simon Rozman
668396803a Simplify C++ 2025-11-12 10:13:40 +01:00
Simon Rozman
a11c4bc79a Make character category data reusable
This shall assist adding/replacing it with Unicode character blocks.

Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-12 08:43:24 +01:00
Simon Rozman
ec957caf3c Enlarge default window size slightly
The toolbars didn't fit completely.

Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-04 15:59:03 +01:00
Simon Rozman
ad80612ac2 wxWidgets: Update to 3.3.1
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-04 15:55:08 +01:00
Simon Rozman
3eb6d98b95 wxWidgets: Update to 3.1.7
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-04 13:34:10 +01:00
Simon Rozman
c722094df9 wxFormBuilder: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-04 13:33:48 +01:00
Simon Rozman
c199ce80c7 stdex: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-04 10:33:03 +01:00
Simon Rozman
ead50105e3 Bump build year
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-11-04 10:24:22 +01:00
Simon Rozman
81db4c0055 Update submodules
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-08-11 17:21:42 +02:00
Simon Rozman
9f64d060fb Discontinue using platform toolset in intermediate/output folder names
In recent Visual Studio releases the Toolset variable is no longer set
in the Command Line environment, making it difficult to locate
artifacts in the NMake command line builds.

Signed-off-by: Simon Rozman <simon@rozman.si>
2025-08-11 17:16:26 +02:00
Simon Rozman
0cf4a755fd Fix C++ undefined behavior
It broke in recent VS. Must not dereference std::string::end() iterator,
as this is undefined.

Signed-off-by: Simon Rozman <simon@rozman.si>
2025-08-11 17:10:28 +02:00
Simon Rozman
37196ab4f5 Update submodule URLs 2025-07-04 12:13:05 +02:00
Simon Rozman
e96a627c55 MSICA: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2025-03-13 14:16:27 +01:00
Simon Rozman
7f2c209a06 MSI: Squash INSTALLLEVEL 1,2,3 → 1
Our default used to be INSTALLLEVEL 3, but Microsoft default is 1. By
overriding Microsoft default in Property table, we override the
INSTALLLEVEL user might have specified on the command line.

Since our installations no longer use "Minimal/Typical/Full", we may
squash "Minimal" and "Typical" into Minimal.

Signed-off-by: Simon Rozman <simon@rozman.si>
2025-03-13 14:15:36 +01:00
Simon Rozman
b1a3eb23c7 Updater: Move Git remote 2024-11-29 16:20:43 +01:00
Simon Rozman
35b8b389ff MSICA: Move Git remote 2024-11-29 16:10:15 +01:00
Simon Rozman
d8493554cd stdex: Move Git remote 2024-11-29 16:01:59 +01:00
Simon Rozman
a40e730bf0 wxExtend: Move Git remote 2024-11-29 15:57:45 +01:00
Simon Rozman
056b1c3087 MSIBuild: Move Git remote 2024-11-29 15:55:12 +01:00
Simon Rozman
7127b8ea31 WinStd: Move Git remote 2024-11-29 15:50:21 +01:00
Simon Rozman
82906899de Make mapping reusable
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-04-25 15:16:15 +02:00
Simon Rozman
566d40bd05 Update submodules
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-04-25 14:52:03 +02:00
Simon Rozman
6a8cd1ec80 Preset version to 2.7.1
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-04-25 14:51:30 +02:00
Simon Rozman
b0db806f5e Update submodules
Signed-off-by: Simon Rozman <simon@rozman.si>
2024-03-11 15:56:28 +01:00
Simon Rozman
439dcb35d1 stdex: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-08 18:49:35 +01:00
Simon Rozman
ad07539cb6 Fix to compile for Linux
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-08 13:50:01 +01:00
Simon Rozman
a7c1481f87 Merge branch 'master' of https://github.com/Amebis/ZRCola
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-08 12:22:11 +01:00
Simon Rozman
c7bc2d0aa6 Update submodules
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-08 12:03:15 +01:00
Simon Rozman
2bbad80235 Set version to 2.7
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-07 19:27:30 +01:00
Simon Rozman
ffe11b17b5 Update font and database
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-07 19:27:30 +01:00
Simon Rozman
0daae5af37 Update submodules
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-11-07 19:27:30 +01:00
Simon Rozman
2f1f6a6c83 stdex: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-08 11:41:30 +02:00
Simon Rozman
f8393e3d77 MSICA: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-08 11:38:40 +02:00
Simon Rozman
40c4d65669 WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-09-08 11:37:37 +02:00
Simon Rozman
7d866b183b Update submodules
Signed-off-by: Simon Rozman <simon@rozman.si>
2023-03-15 22:19:56 +01:00
Simon Rozman
b13f77ce95 ZRColaWS: Stop escaping UTF-8 characters in JSON
JSON is always UTF-8 and there is absolutely no need to escape all non-ASCII
characters in output strings.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-12-14 15:18:14 +01:00
Simon Rozman
cb324389e4 ZRColaWS: Cleanup
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-12-14 15:09:40 +01:00
Simon Rozman
2de62b1636 WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-12-14 15:04:25 +01:00
Simon Rozman
afb137edee Explicitly clear reused std::vector and u16string after moved from
MSVC C26800 warned us std::vector and std::string are not guaranteed to
be cleared after being moved from in all standard C++ implementations.

As we reuse those objects and rely they are cleared, do an explicit
clear. We could have one-time-use objects and add scopes, but that makes
code ugly.

Reference: https://stackoverflow.com/a/17735913/2071884
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-28 13:45:51 +02:00
Simon Rozman
d4fdd62916 MSICA, WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-28 08:21:10 +02:00
Simon Rozman
ac63e5a957 Makefile: Move GenRSAKeypair to platform-independent place
GenRSAKeypair is platform independent. When in the MakefilePlat.mak, it
is invoked once per each platform. It was not harmful. Just excessive.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-06 16:00:32 +02:00
Simon Rozman
b8aa592b19 Updater: Move keypair source out of source folder
This allows us to use `git clean` without risking to loose keypair,
as it was .gitignored and not included in the Git repository.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-05 19:18:06 +02:00
Simon Rozman
325b9334b5 Makefile: Cleanup
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-10-05 18:51:48 +02:00
Simon Rozman
f547fbc601 ZRColaWS: Document build and install step-by-step
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-29 15:07:42 +02:00
Simon Rozman
0e2678f09e ZRColaWS: Document install
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-20 12:50:11 +02:00
Simon Rozman
e78bbc9c3b ZRColaWS: Install systemd service
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-20 12:49:25 +02:00
Simon Rozman
f523d12fa1 ZRColaWS: Set default listen port to 54591
The 8000 is Oat++ sample port.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-20 11:41:39 +02:00
Simon Rozman
c6f844775f ZRColaWS: Make logging systemd journal friendlier
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-20 11:39:30 +02:00
Simon Rozman
450c18198a ZRColaWS: Integrate Oat++ building
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-20 10:13:50 +02:00
Simon Rozman
ad57071515 ZRColaWS: Sync executable name with project
The executable is not really a Linux deamon.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-19 18:26:31 +02:00
Simon Rozman
f6d0323485 ZRColaWS: Stop setting API server in Swagger UI
Host where the webservice is listening is not the same as host where
clients connect to. Unless localhost, but that limits use of Swagger UI
for internal use only.
And, not to forget: reverse proxy that will typically run in front of
ZRCola web service and will publish it with who knows what public URL.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-19 16:11:08 +02:00
Simon Rozman
004958f464 ZRColaWS: Rearrange source and provide Swagger-UI documentation
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-19 15:49:36 +02:00
Simon Rozman
09117d68a6 ZRColaWS: Add support for gracefull exit 2022-09-19 12:45:19 +02:00
Simon Rozman
04eea84f8a ZRColaWS: Fix test HTML page
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-19 09:49:32 +02:00
Simon Rozman
685ffedb53 ZRColaWS: Simplify class and variable names
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-19 09:11:34 +02:00
Simon Rozman
f74e9930c1 ZRColaWS: Add support for inverse translation
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 14:54:48 +02:00
Simon Rozman
a05e62f1d3 libZRCola: Add some SAL annotations
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 14:53:25 +02:00
Simon Rozman
3aba608001 ZRColaWS: Return source->destination index mapping
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 13:54:57 +02:00
Simon Rozman
fa59e71fe3 ZRColaWS: Rename .h to .hpp and fix indents
Oat++ is using .hpp extension for header files.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 13:53:59 +02:00
Simon Rozman
839c6fc1e6 Linux: Remove unused code from final binary
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 13:03:34 +02:00
Simon Rozman
ff509ed6b5 ZRColaWS: Initial working version
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 03:02:16 +02:00
Simon Rozman
ca3239f0ff libZRCola: Fix typo
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-16 02:57:52 +02:00
Simon Rozman
eb0911d3c0 ZRColaWS: Split LDFLAGS and LDLIBS
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 22:59:29 +02:00
Simon Rozman
a7c7a3f40c ZRColaWS: Initial skeleton
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 18:25:43 +02:00
Simon Rozman
a6f0357ad8 libZRCola: Cleanup
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 18:17:37 +02:00
Simon Rozman
35eb472e6b Backport gcc changes to MSVC
wchar_t is not char16_t on MSVC, requiring a lot of typecasting when
interfacing ZRCola database strings with GUI.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 15:33:08 +02:00
Simon Rozman
ba4ff3cd42 libZRCola: Add test
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
9709cc2845 libZRCola: Make UTF-16 explicit
ZRCola is using UTF-16LE strings internally (thanks to Windows).
However, wchar_t and std::wstring are UTF-32 on other platforms.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
f35e49dc8b stdex: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
9a307978b5 libZRCola: Include stdex/idrec.h only after << and >> are overloaded
gcc precompiles templates.  When << and >> operators of our datatypes are
not overloaded at the time <stdex/idrec.h> is #included yet, gcc will
seek/look for currently available << and >> operators when reaching
std::ostream and std::istream templates.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
bd01e250b2 libZRCola: Add standard default "all" make target
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
8bb1049cf0 libZRCola: Resolve some warnings reported by -Wall
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
52391d9a08 libZRCola: Set CFLAGS too and enable debugging on Debug builds
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
823390d28b libZRCola: Make parts of the gcc building reusable
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
eedab7da56 libZRCola: Initial stab at compiling with gcc
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
63fda12c99 Switch integer datatypes to C99
This makes code more portable.

Signed-off-by: Simon Rozman <simon@rozman.si>
2022-09-15 14:36:44 +02:00
Simon Rozman
5cc005583c MSICA: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-05-09 14:26:16 +02:00
Simon Rozman
6b856314d0 WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-05-09 14:25:16 +02:00
Simon Rozman
b581b7a8b1 MSI: Simplify ProgramFiles(64)Folder property use
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-03-14 11:39:37 +01:00
Simon Rozman
0bfa44e6bb stdex: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-03-07 11:43:53 +01:00
Simon Rozman
5c05dc6eb6 WinStd: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-03-07 11:43:53 +01:00
Simon Rozman
7a2845fef3 MSICA: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-03-03 16:10:14 +01:00
Simon Rozman
5b71b776a7 MSIBuild: Update
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-03-02 16:04:11 +01:00
Simon Rozman
2bd3b4c3b9 MSI: Match row ID with component ID
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-02-18 10:26:07 +01:00
95 changed files with 15000 additions and 13513 deletions

18
.gitmodules vendored
View File

@@ -1,18 +1,24 @@
[submodule "lib/stdex"] [submodule "lib/stdex"]
path = lib/stdex path = lib/stdex
url = https://github.com/Amebis/stdex.git url = https://git.amebis.si/Amebis/stdex.git
[submodule "lib/WinStd"] [submodule "lib/WinStd"]
path = lib/WinStd path = lib/WinStd
url = https://github.com/Amebis/WinStd.git url = https://git.amebis.si/Amebis/WinStd.git
[submodule "lib/wxExtend"] [submodule "lib/wxExtend"]
path = lib/wxExtend path = lib/wxExtend
url = https://github.com/Amebis/wxExtend.git url = https://git.amebis.si/Amebis/wxExtend.git
[submodule "MSI/MSIBuild"] [submodule "MSI/MSIBuild"]
path = MSI/MSIBuild path = MSI/MSIBuild
url = https://github.com/Amebis/MSIBuild.git url = https://git.amebis.si/Amebis/MSIBuild.git
[submodule "MSI/MSICA"] [submodule "MSI/MSICA"]
path = MSI/MSICA path = MSI/MSICA
url = https://github.com/Amebis/MSICA.git url = https://git.amebis.si/Amebis/MSICA.git
[submodule "Updater"] [submodule "Updater"]
path = Updater path = Updater
url = https://github.com/Amebis/Updater.git url = https://git.amebis.si/Amebis/Updater.git
[submodule "lib/oatpp"]
path = lib/oatpp
url = https://github.com/oatpp/oatpp.git
[submodule "lib/oatpp-swagger"]
path = lib/oatpp-swagger
url = https://github.com/oatpp/oatpp-swagger.git

Binary file not shown.

View File

@@ -1,27 +1,28 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2022 # Simon Rozman <simon.rozman@amebis.si>, 2022
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola MSI\n" "Project-Id-Version: ZRCola MSI\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-19 08:59+0200\n" "POT-Creation-Date: 2022-02-17 13:32+0100\n"
"PO-Revision-Date: 2018-09-19 07:19+0000\n" "PO-Revision-Date: 2018-09-19 07:19+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2022\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2022\n"
"Language-Team: German (Germany) (https://www.transifex.com/amebis/teams/91592/de_DE/)\n" "Language-Team: German (Germany) (https://app.transifex.com/amebis/teams/91592/de_DE/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n" "Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.1.1\n" "X-Generator: Poedit 2.4.2\n"
"X-Poedit-Basepath: ../Main\n" "X-Poedit-Basepath: ../Main\n"
"X-Poedit-KeywordsList: __\n" "X-Poedit-KeywordsList: __\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: en_US.ARM64.Debug.Control-2.idtx:4 en_US.ARM64.Release.Control-2.idtx:4
#: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4 #: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4
#: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4 #: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4
msgid "" msgid ""
@@ -3465,6 +3466,8 @@ msgstr ""
"Heading;}}{\\*\\datastore " "Heading;}}{\\*\\datastore "
"0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}" "0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}"
#: en_US.ARM64.Debug.Control-2.idtx:5 en_US.ARM64.Debug.Control-2.idtx:12
#: en_US.ARM64.Release.Control-2.idtx:5 en_US.ARM64.Release.Control-2.idtx:12
#: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12 #: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12
#: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12 #: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12
#: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12 #: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12
@@ -3472,11 +3475,13 @@ msgstr ""
msgid "UIHeader.bmp" msgid "UIHeader.bmp"
msgstr "UIHeader.bmp" msgstr "UIHeader.bmp"
#: en_US.ARM64.Debug.Control-2.idtx:6 en_US.ARM64.Release.Control-2.idtx:6
#: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6 #: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6
#: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6 #: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6
msgid "[DlgTitleFont][SimpleProductName] Declaration" msgid "[DlgTitleFont][SimpleProductName] Declaration"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:7 en_US.ARM64.Release.Control-2.idtx:7
#: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7 #: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7
#: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7 #: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7
msgid "" msgid ""
@@ -3484,6 +3489,7 @@ msgid ""
"or some other appropriate part of the publication the note below:" "or some other appropriate part of the publication the note below:"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:8 en_US.ARM64.Release.Control-2.idtx:8
#: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8 #: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8
#: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8 #: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8
msgid "" msgid ""
@@ -3497,6 +3503,7 @@ msgid ""
"(http://www.zrc-sazu.si) by Peter Weiss.\\f1\\par}" "(http://www.zrc-sazu.si) by Peter Weiss.\\f1\\par}"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:9 en_US.ARM64.Release.Control-2.idtx:9
#: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9 #: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9
#: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9 #: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9
msgid "" msgid ""
@@ -3504,11 +3511,14 @@ msgid ""
"dialog or on its website." "dialog or on its website."
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:10 en_US.ARM64.Release.Control-2.idtx:10
#: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10 #: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10
#: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10 #: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10
msgid "I &agree." msgid "I &agree."
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:11 en_US.ARM64.Debug.Control-2.idtx:16
#: en_US.ARM64.Release.Control-2.idtx:11 en_US.ARM64.Release.Control-2.idtx:16
#: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16 #: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16
#: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16 #: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16
#: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16 #: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16
@@ -3516,16 +3526,19 @@ msgstr ""
msgid "&Continue" msgid "&Continue"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:13 en_US.ARM64.Release.Control-2.idtx:13
#: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13 #: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13
#: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13 #: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13
msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font" msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Control-2.idtx:14 en_US.ARM64.Release.Control-2.idtx:14
#: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14 #: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14
#: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14 #: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14
msgid "fontsubst.bmp" msgid "fontsubst.bmp"
msgstr "fontsubst.bmp" msgstr "fontsubst.bmp"
#: en_US.ARM64.Debug.Control-2.idtx:15 en_US.ARM64.Release.Control-2.idtx:15
#: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15 #: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15
#: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15 #: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15
msgid "" msgid ""
@@ -3534,86 +3547,103 @@ msgid ""
"computer that will take effect after the next restart." "computer that will take effect after the next restart."
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Directory-2.idtx:4 en_US.ARM64.Release.Directory-2.idtx:4
#: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4 #: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4
#: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4 #: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4
msgid "ZRCola:." msgid "ZRCola:."
msgstr "ZRCola:." msgstr "ZRCola:."
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4 #: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4 #: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
msgid "Fonts" msgid "Fonts"
msgstr "Schriftarten" msgstr "Schriftarten"
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4 #: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4 #: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
msgid "Fonts used by ZRCola" msgid "Fonts used by ZRCola"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5 #: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5 #: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
msgid "ZRCola" msgid "ZRCola"
msgstr "ZRCola" msgstr "ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5 #: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5 #: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
msgid "Times New Roman based font" msgid "Times New Roman based font"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6 #: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6 #: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
msgid "Documentation" msgid "Documentation"
msgstr "Dokumentation" msgstr "Dokumentation"
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6 #: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6 #: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
msgid "ZRCola Documentation" msgid "ZRCola Documentation"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7 #: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7 #: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
msgid "Keyboard Shortcuts" msgid "Keyboard Shortcuts"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7 #: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7 #: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
msgid "PDF document with a list of ZRCola keyboard shortcuts" msgid "PDF document with a list of ZRCola keyboard shortcuts"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Property-2.idtx:4 en_US.ARM64.Release.Property-2.idtx:4
#: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4 #: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4
#: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4 #: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4
msgid "Amebis, Slovenia, E.U." msgid "Amebis, Slovenia, E.U."
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Property-2.idtx:5 en_US.ARM64.Release.Property-2.idtx:5
#: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5 #: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5
#: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5 #: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5
msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU" msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Property-2.idtx:6 en_US.ARM64.Release.Property-2.idtx:6
#: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6 #: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6
#: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6 #: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6
msgid "+386 1 470 6170" msgid "+386 1 470 6170"
msgstr "+386 1 470 6170" msgstr "+386 1 470 6170"
#: en_US.ARM64.Debug.Property-2.idtx:7 en_US.ARM64.Release.Property-2.idtx:7
#: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7 #: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7
#: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7 #: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7
msgid "http://zrcola.zrc-sazu.si/en/contact/" msgid "http://zrcola.zrc-sazu.si/en/contact/"
msgstr "http://zrcola.zrc-sazu.si/de/contact/" msgstr "http://zrcola.zrc-sazu.si/de/contact/"
#: en_US.ARM64.Debug.Property-2.idtx:8 en_US.ARM64.Release.Property-2.idtx:8
#: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8 #: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8
#: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8 #: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/" msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/"
#: en_US.ARM64.Debug.Property-2.idtx:9 en_US.ARM64.Release.Property-2.idtx:9
#: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9 #: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9
#: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9 #: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9
msgid "http://zrcola.zrc-sazu.si/en/install/" msgid "http://zrcola.zrc-sazu.si/en/install/"
msgstr "http://zrcola.zrc-sazu.si/de/install/" msgstr "http://zrcola.zrc-sazu.si/de/install/"
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4 #: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4 #: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts" msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts"
msgstr "" msgstr ""
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4 #: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4 #: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCola Keyboard Shortcuts" msgid "ZRCola Keyboard Shortcuts"

View File

@@ -1,27 +1,28 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2022 # Simon Rozman <simon.rozman@amebis.si>, 2022
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola MSI\n" "Project-Id-Version: ZRCola MSI\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-19 08:59+0200\n" "POT-Creation-Date: 2022-02-17 13:32+0100\n"
"PO-Revision-Date: 2018-09-19 07:19+0000\n" "PO-Revision-Date: 2018-09-19 07:19+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2022\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2022\n"
"Language-Team: Russian (Russia) (https://www.transifex.com/amebis/teams/91592/ru_RU/)\n" "Language-Team: Russian (Russia) (https://app.transifex.com/amebis/teams/91592/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n" "Language: ru_RU\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
"X-Generator: Poedit 2.1.1\n" "X-Generator: Poedit 2.4.2\n"
"X-Poedit-Basepath: ../Main\n" "X-Poedit-Basepath: ../Main\n"
"X-Poedit-KeywordsList: __\n" "X-Poedit-KeywordsList: __\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: en_US.ARM64.Debug.Control-2.idtx:4 en_US.ARM64.Release.Control-2.idtx:4
#: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4 #: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4
#: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4 #: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4
msgid "" msgid ""
@@ -3465,6 +3466,8 @@ msgstr ""
"Heading;}}{\\*\\datastore " "Heading;}}{\\*\\datastore "
"0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}" "0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}"
#: en_US.ARM64.Debug.Control-2.idtx:5 en_US.ARM64.Debug.Control-2.idtx:12
#: en_US.ARM64.Release.Control-2.idtx:5 en_US.ARM64.Release.Control-2.idtx:12
#: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12 #: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12
#: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12 #: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12
#: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12 #: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12
@@ -3472,11 +3475,13 @@ msgstr ""
msgid "UIHeader.bmp" msgid "UIHeader.bmp"
msgstr "UIHeader.bmp" msgstr "UIHeader.bmp"
#: en_US.ARM64.Debug.Control-2.idtx:6 en_US.ARM64.Release.Control-2.idtx:6
#: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6 #: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6
#: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6 #: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6
msgid "[DlgTitleFont][SimpleProductName] Declaration" msgid "[DlgTitleFont][SimpleProductName] Declaration"
msgstr "[DlgTitleFont][SimpleProductName] Декларация" msgstr "[DlgTitleFont][SimpleProductName] Декларация"
#: en_US.ARM64.Debug.Control-2.idtx:7 en_US.ARM64.Release.Control-2.idtx:7
#: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7 #: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7
#: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7 #: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7
msgid "" msgid ""
@@ -3486,6 +3491,7 @@ msgstr ""
"Текст, созданный с помощью системы ZRCola, должен в примечании или другом " "Текст, созданный с помощью системы ZRCola, должен в примечании или другом "
"соответствующем месте в публикации сопровождаться следующей записью" "соответствующем месте в публикации сопровождаться следующей записью"
#: en_US.ARM64.Debug.Control-2.idtx:8 en_US.ARM64.Release.Control-2.idtx:8
#: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8 #: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8
#: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8 #: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8
msgid "" msgid ""
@@ -3515,6 +3521,7 @@ msgstr ""
"\\'cb\\'fe\\'e1\\'eb\\'ff\\'ed\\'e5 (http://www.zrc-sazu.si) " "\\'cb\\'fe\\'e1\\'eb\\'ff\\'ed\\'e5 (http://www.zrc-sazu.si) "
"\\'cf\\'e5\\'f2\\'f0\\'ee\\'ec \\'c2\\'e5\\'e9\\'f1\\'f1o\\'ec.\\f1\\par}" "\\'cf\\'e5\\'f2\\'f0\\'ee\\'ec \\'c2\\'e5\\'e9\\'f1\\'f1o\\'ec.\\f1\\par}"
#: en_US.ARM64.Debug.Control-2.idtx:9 en_US.ARM64.Release.Control-2.idtx:9
#: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9 #: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9
#: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9 #: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9
msgid "" msgid ""
@@ -3524,11 +3531,14 @@ msgstr ""
"Примечание: Ета декларация доступна также в диалоговом окне «О программе» " "Примечание: Ета декларация доступна также в диалоговом окне «О программе» "
"либо на вебсайте системы ZRCola." "либо на вебсайте системы ZRCola."
#: en_US.ARM64.Debug.Control-2.idtx:10 en_US.ARM64.Release.Control-2.idtx:10
#: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10 #: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10
#: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10 #: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10
msgid "I &agree." msgid "I &agree."
msgstr "Согласен." msgstr "Согласен."
#: en_US.ARM64.Debug.Control-2.idtx:11 en_US.ARM64.Debug.Control-2.idtx:16
#: en_US.ARM64.Release.Control-2.idtx:11 en_US.ARM64.Release.Control-2.idtx:16
#: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16 #: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16
#: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16 #: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16
#: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16 #: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16
@@ -3536,16 +3546,19 @@ msgstr "Согласен."
msgid "&Continue" msgid "&Continue"
msgstr "Продолжить" msgstr "Продолжить"
#: en_US.ARM64.Debug.Control-2.idtx:13 en_US.ARM64.Release.Control-2.idtx:13
#: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13 #: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13
#: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13 #: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13
msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font" msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font"
msgstr "[DlgTitleFont]Шрифт «00 ZRCola» в «ZRCola»" msgstr "[DlgTitleFont]Шрифт «00 ZRCola» в «ZRCola»"
#: en_US.ARM64.Debug.Control-2.idtx:14 en_US.ARM64.Release.Control-2.idtx:14
#: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14 #: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14
#: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14 #: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14
msgid "fontsubst.bmp" msgid "fontsubst.bmp"
msgstr "fontsubst.bmp" msgstr "fontsubst.bmp"
#: en_US.ARM64.Debug.Control-2.idtx:15 en_US.ARM64.Release.Control-2.idtx:15
#: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15 #: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15
#: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15 #: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15
msgid "" msgid ""
@@ -3557,86 +3570,103 @@ msgstr ""
"предыдущих документов в вашем компьютере проведена субституция шрифтов, " "предыдущих документов в вашем компьютере проведена субституция шрифтов, "
"которая вступит в силу после следующего запуска компьютера." "которая вступит в силу после следующего запуска компьютера."
#: en_US.ARM64.Debug.Directory-2.idtx:4 en_US.ARM64.Release.Directory-2.idtx:4
#: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4 #: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4
#: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4 #: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4
msgid "ZRCola:." msgid "ZRCola:."
msgstr "ZRCola:." msgstr "ZRCola:."
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4 #: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4 #: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
msgid "Fonts" msgid "Fonts"
msgstr "Шрифты" msgstr "Шрифты"
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4 #: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4 #: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
msgid "Fonts used by ZRCola" msgid "Fonts used by ZRCola"
msgstr "Шрифты, использованные системой ZRCola" msgstr "Шрифты, использованные системой ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5 #: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5 #: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
msgid "ZRCola" msgid "ZRCola"
msgstr "ZRCola" msgstr "ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5 #: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5 #: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
msgid "Times New Roman based font" msgid "Times New Roman based font"
msgstr "Шрифт на основе Times New Roman" msgstr "Шрифт на основе Times New Roman"
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6 #: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6 #: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
msgid "Documentation" msgid "Documentation"
msgstr "Документация" msgstr "Документация"
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6 #: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6 #: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
msgid "ZRCola Documentation" msgid "ZRCola Documentation"
msgstr "Документация системы ZRCola" msgstr "Документация системы ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7 #: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7 #: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
msgid "Keyboard Shortcuts" msgid "Keyboard Shortcuts"
msgstr "Сочетание клавиш" msgstr "Сочетание клавиш"
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7 #: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7 #: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
msgid "PDF document with a list of ZRCola keyboard shortcuts" msgid "PDF document with a list of ZRCola keyboard shortcuts"
msgstr "Документ PDF со списком сочетаний клавиш системы ZRCola " msgstr "Документ PDF со списком сочетаний клавиш системы ZRCola "
#: en_US.ARM64.Debug.Property-2.idtx:4 en_US.ARM64.Release.Property-2.idtx:4
#: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4 #: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4
#: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4 #: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4
msgid "Amebis, Slovenia, E.U." msgid "Amebis, Slovenia, E.U."
msgstr "Amebis, Словения, ЕС" msgstr "Amebis, Словения, ЕС"
#: en_US.ARM64.Debug.Property-2.idtx:5 en_US.ARM64.Release.Property-2.idtx:5
#: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5 #: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5
#: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5 #: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5
msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU" msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU"
msgstr "Институт словенского языка им. Франа Рамовша ZRC SAZU" msgstr "Институт словенского языка им. Франа Рамовша ZRC SAZU"
#: en_US.ARM64.Debug.Property-2.idtx:6 en_US.ARM64.Release.Property-2.idtx:6
#: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6 #: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6
#: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6 #: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6
msgid "+386 1 470 6170" msgid "+386 1 470 6170"
msgstr "+386 1 470 6170" msgstr "+386 1 470 6170"
#: en_US.ARM64.Debug.Property-2.idtx:7 en_US.ARM64.Release.Property-2.idtx:7
#: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7 #: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7
#: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7 #: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7
msgid "http://zrcola.zrc-sazu.si/en/contact/" msgid "http://zrcola.zrc-sazu.si/en/contact/"
msgstr "http://zrcola.zrc-sazu.si/ru/contact/" msgstr "http://zrcola.zrc-sazu.si/ru/contact/"
#: en_US.ARM64.Debug.Property-2.idtx:8 en_US.ARM64.Release.Property-2.idtx:8
#: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8 #: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8
#: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8 #: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/" msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/"
#: en_US.ARM64.Debug.Property-2.idtx:9 en_US.ARM64.Release.Property-2.idtx:9
#: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9 #: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9
#: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9 #: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9
msgid "http://zrcola.zrc-sazu.si/en/install/" msgid "http://zrcola.zrc-sazu.si/en/install/"
msgstr "http://zrcola.zrc-sazu.si/ru/install/" msgstr "http://zrcola.zrc-sazu.si/ru/install/"
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4 #: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4 #: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts" msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts"
msgstr "ZRCOLA~1|Сочетание клавиш системы ZRCola" msgstr "ZRCOLA~1|Сочетание клавиш системы ZRCola"
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4 #: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4 #: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCola Keyboard Shortcuts" msgid "ZRCola Keyboard Shortcuts"

View File

@@ -1,27 +1,28 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2022 # Simon Rozman <simon.rozman@amebis.si>, 2022
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola MSI\n" "Project-Id-Version: ZRCola MSI\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-19 08:59+0200\n" "POT-Creation-Date: 2022-02-17 13:32+0100\n"
"PO-Revision-Date: 2018-09-19 07:19+0000\n" "PO-Revision-Date: 2018-09-19 07:19+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2022\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2022\n"
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91592/sl_SI/)\n" "Language-Team: Slovenian (Slovenia) (https://app.transifex.com/amebis/teams/91592/sl_SI/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: sl_SI\n" "Language: sl_SI\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-Generator: Poedit 2.1.1\n" "X-Generator: Poedit 2.4.2\n"
"X-Poedit-Basepath: ../Main\n" "X-Poedit-Basepath: ../Main\n"
"X-Poedit-KeywordsList: __\n" "X-Poedit-KeywordsList: __\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: en_US.ARM64.Debug.Control-2.idtx:4 en_US.ARM64.Release.Control-2.idtx:4
#: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4 #: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4
#: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4 #: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4
msgid "" msgid ""
@@ -3465,6 +3466,8 @@ msgstr ""
"Heading;}}{\\*\\datastore " "Heading;}}{\\*\\datastore "
"0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}" "0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}"
#: en_US.ARM64.Debug.Control-2.idtx:5 en_US.ARM64.Debug.Control-2.idtx:12
#: en_US.ARM64.Release.Control-2.idtx:5 en_US.ARM64.Release.Control-2.idtx:12
#: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12 #: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12
#: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12 #: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12
#: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12 #: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12
@@ -3472,11 +3475,13 @@ msgstr ""
msgid "UIHeader.bmp" msgid "UIHeader.bmp"
msgstr "UIHeader.bmp" msgstr "UIHeader.bmp"
#: en_US.ARM64.Debug.Control-2.idtx:6 en_US.ARM64.Release.Control-2.idtx:6
#: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6 #: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6
#: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6 #: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6
msgid "[DlgTitleFont][SimpleProductName] Declaration" msgid "[DlgTitleFont][SimpleProductName] Declaration"
msgstr "[DlgTitleFont]Deklaracija [SimpleProductName]" msgstr "[DlgTitleFont]Deklaracija [SimpleProductName]"
#: en_US.ARM64.Debug.Control-2.idtx:7 en_US.ARM64.Release.Control-2.idtx:7
#: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7 #: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7
#: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7 #: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7
msgid "" msgid ""
@@ -3487,6 +3492,7 @@ msgstr ""
"opombi ali na drugem ustreznem mestu v publikaciji opremljeno z naslednjim " "opombi ali na drugem ustreznem mestu v publikaciji opremljeno z naslednjim "
"zapisom:" "zapisom:"
#: en_US.ARM64.Debug.Control-2.idtx:8 en_US.ARM64.Release.Control-2.idtx:8
#: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8 #: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8
#: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8 #: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8
msgid "" msgid ""
@@ -3508,6 +3514,7 @@ msgstr ""
"(http://zrcola.zrc-sazu.si), ki ga je na Znanstvenoraziskovalnem centru SAZU" "(http://zrcola.zrc-sazu.si), ki ga je na Znanstvenoraziskovalnem centru SAZU"
" v Ljubljani (http://www.zrc-sazu.si) razvil Peter Weiss.\\i0\\f1\\par}" " v Ljubljani (http://www.zrc-sazu.si) razvil Peter Weiss.\\i0\\f1\\par}"
#: en_US.ARM64.Debug.Control-2.idtx:9 en_US.ARM64.Release.Control-2.idtx:9
#: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9 #: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9
#: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9 #: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9
msgid "" msgid ""
@@ -3517,11 +3524,14 @@ msgstr ""
"Opomba: Ta deklaracija je na voljo tudi v dialogu vizitke " "Opomba: Ta deklaracija je na voljo tudi v dialogu vizitke "
"[SimpleProductName] ali na spletni strani." "[SimpleProductName] ali na spletni strani."
#: en_US.ARM64.Debug.Control-2.idtx:10 en_US.ARM64.Release.Control-2.idtx:10
#: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10 #: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10
#: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10 #: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10
msgid "I &agree." msgid "I &agree."
msgstr "&Strinjam se." msgstr "&Strinjam se."
#: en_US.ARM64.Debug.Control-2.idtx:11 en_US.ARM64.Debug.Control-2.idtx:16
#: en_US.ARM64.Release.Control-2.idtx:11 en_US.ARM64.Release.Control-2.idtx:16
#: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16 #: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16
#: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16 #: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16
#: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16 #: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16
@@ -3529,16 +3539,19 @@ msgstr "&Strinjam se."
msgid "&Continue" msgid "&Continue"
msgstr "&Nadaljuj" msgstr "&Nadaljuj"
#: en_US.ARM64.Debug.Control-2.idtx:13 en_US.ARM64.Release.Control-2.idtx:13
#: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13 #: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13
#: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13 #: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13
msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font" msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font"
msgstr "[DlgTitleFont]\"00 ZRCola\" v pisavo \"ZRCola\"" msgstr "[DlgTitleFont]\"00 ZRCola\" v pisavo \"ZRCola\""
#: en_US.ARM64.Debug.Control-2.idtx:14 en_US.ARM64.Release.Control-2.idtx:14
#: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14 #: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14
#: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14 #: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14
msgid "fontsubst.bmp" msgid "fontsubst.bmp"
msgstr "fontsubst.bmp" msgstr "fontsubst.bmp"
#: en_US.ARM64.Debug.Control-2.idtx:15 en_US.ARM64.Release.Control-2.idtx:15
#: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15 #: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15
#: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15 #: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15
msgid "" msgid ""
@@ -3550,86 +3563,103 @@ msgstr ""
" dokumenti prikazani pravilno, smo na vašem računalniku uredili nadomeščanje" " dokumenti prikazani pravilno, smo na vašem računalniku uredili nadomeščanje"
" pisave, ki bo stopilo v veljavo po naslednjem zagonu." " pisave, ki bo stopilo v veljavo po naslednjem zagonu."
#: en_US.ARM64.Debug.Directory-2.idtx:4 en_US.ARM64.Release.Directory-2.idtx:4
#: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4 #: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4
#: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4 #: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4
msgid "ZRCola:." msgid "ZRCola:."
msgstr "ZRCola:." msgstr "ZRCola:."
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4 #: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4 #: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
msgid "Fonts" msgid "Fonts"
msgstr "Pisave" msgstr "Pisave"
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4 #: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4 #: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
msgid "Fonts used by ZRCola" msgid "Fonts used by ZRCola"
msgstr "Pisave, ki jih uporablja ZRCola" msgstr "Pisave, ki jih uporablja ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5 #: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5 #: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
msgid "ZRCola" msgid "ZRCola"
msgstr "ZRCola" msgstr "ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5 #: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5 #: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
msgid "Times New Roman based font" msgid "Times New Roman based font"
msgstr "Pisava na osnovi Times New Roman" msgstr "Pisava na osnovi Times New Roman"
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6 #: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6 #: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
msgid "Documentation" msgid "Documentation"
msgstr "Dokumentacija" msgstr "Dokumentacija"
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6 #: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6 #: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
msgid "ZRCola Documentation" msgid "ZRCola Documentation"
msgstr "Dokumentacija ZRCola" msgstr "Dokumentacija ZRCola"
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7 #: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7 #: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
msgid "Keyboard Shortcuts" msgid "Keyboard Shortcuts"
msgstr "Bližnjice na tipkovnici" msgstr "Bližnjice na tipkovnici"
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7 #: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7 #: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
msgid "PDF document with a list of ZRCola keyboard shortcuts" msgid "PDF document with a list of ZRCola keyboard shortcuts"
msgstr "Dokument PDF s seznamom ZRColinih bližnjic na tipkovnici" msgstr "Dokument PDF s seznamom ZRColinih bližnjic na tipkovnici"
#: en_US.ARM64.Debug.Property-2.idtx:4 en_US.ARM64.Release.Property-2.idtx:4
#: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4 #: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4
#: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4 #: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4
msgid "Amebis, Slovenia, E.U." msgid "Amebis, Slovenia, E.U."
msgstr "Amebis, d. o. o., Kamnik" msgstr "Amebis, d. o. o., Kamnik"
#: en_US.ARM64.Debug.Property-2.idtx:5 en_US.ARM64.Release.Property-2.idtx:5
#: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5 #: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5
#: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5 #: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5
msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU" msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU"
msgstr "Inštitut za slovenski jezik Frana Ramovša ZRC SAZU" msgstr "Inštitut za slovenski jezik Frana Ramovša ZRC SAZU"
#: en_US.ARM64.Debug.Property-2.idtx:6 en_US.ARM64.Release.Property-2.idtx:6
#: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6 #: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6
#: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6 #: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6
msgid "+386 1 470 6170" msgid "+386 1 470 6170"
msgstr "01 470 6170" msgstr "01 470 6170"
#: en_US.ARM64.Debug.Property-2.idtx:7 en_US.ARM64.Release.Property-2.idtx:7
#: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7 #: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7
#: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7 #: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7
msgid "http://zrcola.zrc-sazu.si/en/contact/" msgid "http://zrcola.zrc-sazu.si/en/contact/"
msgstr "http://zrcola.zrc-sazu.si/contact/" msgstr "http://zrcola.zrc-sazu.si/contact/"
#: en_US.ARM64.Debug.Property-2.idtx:8 en_US.ARM64.Release.Property-2.idtx:8
#: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8 #: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8
#: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8 #: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/info/instructions/" msgstr "http://zrcola.zrc-sazu.si/info/instructions/"
#: en_US.ARM64.Debug.Property-2.idtx:9 en_US.ARM64.Release.Property-2.idtx:9
#: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9 #: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9
#: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9 #: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9
msgid "http://zrcola.zrc-sazu.si/en/install/" msgid "http://zrcola.zrc-sazu.si/en/install/"
msgstr "http://zrcola.zrc-sazu.si/install/" msgstr "http://zrcola.zrc-sazu.si/install/"
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4 #: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4 #: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts" msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts"
msgstr "ZRCOLA~1|ZRColine bližnjice na tipkovnici" msgstr "ZRCOLA~1|ZRColine bližnjice na tipkovnici"
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4 #: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4 #: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCola Keyboard Shortcuts" msgid "ZRCola Keyboard Shortcuts"

BIN
Makefile

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
# ZRCola # ZRCola
A Microsoft Windows application for composing texts using a wide range of Slavic (and general) letters from or beyond Unicode. A Microsoft Windows application for composing texts using a wide range of Slavic (and general) letters from or beyond Unicode.
@@ -36,14 +36,25 @@ ZRCola is using wxWidgets static libraries. You have to compile static libraries
ZRCola compilation references wxWidgets libraries using `WXWIN` environment variable. Please set it to wxWidgets folder (e.g. `C:\SDK\wxWidgets`). ZRCola compilation references wxWidgets libraries using `WXWIN` environment variable. Please set it to wxWidgets folder (e.g. `C:\SDK\wxWidgets`).
### Digital Signing of Build Outputs ### Digital Signing of Build Outputs
In order to have the build process digitally sign output files, one should provide the following: In order to have the build process digitally sign output files, one should setup either:
1. A signing certificate installed in the current user's certificate store. - Local signing:
2. The following variables in the environment: 1. A signing certificate installed in the current user's certificate store.
- `ManifestCertificateThumbprint` - set the value to certificate's SHA1 thumbprint (hexadecimal, without spaces, e.g. `f61b973226c502a732d24f41aa85e192b009e7c0`). 2. The following variables in the environment:
- `ManifestTimestampRFC3161Url` - set the value to URL used to perform RFC3161 timestamp signature (e.g. `http://time.certum.pl`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL. - `ManifestCertificateThumbprint` - set the value to certificate's SHA1 thumbprint (hexadecimal, without spaces, e.g. `f61b973226c502a732d24f41aa85e192b009e7c0`).
- `ManifestTimestampRFC3161Url` - set the value to URL used to perform RFC3161 timestamp signature (e.g. `http://time.certum.pl`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL.
Please note that only Release builds are configured for timestamp signing. Debug configurations do not attempt to timestamp sign the resulting DLL and EXE files in order to speed up the building process and enable offline building. - Microsoft Trusted Signing:
1. Install [Trusted Signing dlib package](https://www.nuget.org/packages/Microsoft.Trusted.Signing.Client):
```cmd
nuget install Microsoft.Trusted.Signing.Client -Version 1.0.53 -x
```
2. Provide a [`manifest.json`](https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations#create-a-json-file) file and place it at `%APPDATA%\Microsoft.Trusted.Signing.Client.json`:
```cmd
notepad "%APPDATA%\Microsoft.Trusted.Signing.Client.json"
```
Please note that only Release builds are configured for signing. Debug configurations do not sign the resulting DLL and EXE files in order to speed up the building process and reduce signing volume.
### Building ### Building
Use Microsoft NMAKE to build the project. The resulting files can be found in output subfolder. Open _x64 Native Tools Command Prompt for VS 2017_ for building. Use Microsoft NMAKE to build the project. The resulting files can be found in output subfolder. Open _x64 Native Tools Command Prompt for VS 2017_ for building.
@@ -56,6 +67,10 @@ 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 (e.g. nmake Unregister Clean). Please, see NMAKE reference for further reading. The `/ls` flag can be appended to the commands above to reduce NMAKE's verbosity. You can combine multiple targets (e.g. nmake Unregister Clean). Please, see NMAKE reference for further reading.
## Building and installing ZRCola webservice
ZRCola is also available as a Linux web-service. See [ZRColaWS/README.md](ZRColaWS/README.md) for instructions.
## Translating ZRCola ## Translating ZRCola
Instructions how to translate ZRCola to your language can be found [here](LOCALIZATION.md). Instructions how to translate ZRCola to your language can be found [here](LOCALIZATION.md).

Submodule Updater updated: 76124075fc...f8c5385216

Binary file not shown.

View File

@@ -2,7 +2,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola\n" "Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2022-02-17 13:32+0100\n" "POT-Creation-Date: 2025-11-14 16:23+0100\n"
"PO-Revision-Date: 2019-04-01 19:38+0200\n" "PO-Revision-Date: 2019-04-01 19:38+0200\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n" "Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
@@ -21,7 +21,7 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU" msgid "© 2004-%s ZRC SAZU"
msgstr "" msgstr ""
#: zrcolaapp.cpp:60 zrcolafrm.cpp:118 zrcolagui.cpp:232 zrcolagui.cpp:943 #: zrcolaapp.cpp:60 zrcolafrm.cpp:110 zrcolagui.cpp:232 zrcolagui.cpp:943
#: zrcolagui.h:119 MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4 #: zrcolagui.h:119 MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
@@ -45,7 +45,7 @@ msgstr ""
msgid "Context" msgid "Context"
msgstr "" msgstr ""
#: zrcolachrreq.cpp:50 zrcolagui.h:376 #: zrcolachrreq.cpp:50 zrcolagui.h:382
msgid "Request a New Character" msgid "Request a New Character"
msgstr "" msgstr ""
@@ -62,7 +62,7 @@ msgstr ""
msgid "Invalid character in Unicode found: %c" msgid "Invalid character in Unicode found: %c"
msgstr "" msgstr ""
#: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:874 #: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:870
msgid "▸ Search Options" msgid "▸ Search Options"
msgstr "" msgstr ""
@@ -70,35 +70,35 @@ msgstr ""
msgid ", " msgid ", "
msgstr "" msgstr ""
#: zrcolachrslct.cpp:380 zrcolachrslct.cpp:871 #: zrcolachrslct.cpp:380 zrcolachrslct.cpp:867
msgid "▾ Search Options" msgid "▾ Search Options"
msgstr "" msgstr ""
#: zrcolafrm.cpp:84 #: zrcolafrm.cpp:76
msgid "No Translation" msgid "No Translation"
msgstr "" msgstr ""
#: zrcolafrm.cpp:97 #: zrcolafrm.cpp:89
msgid "Custom Translation..." msgid "Custom Translation..."
msgstr "" msgstr ""
#: zrcolafrm.cpp:217 #: zrcolafrm.cpp:209
msgid "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available." msgid "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality will not be available."
msgstr "" msgstr ""
#: zrcolafrm.cpp:217 zrcolafrm.cpp:219 #: zrcolafrm.cpp:209 zrcolafrm.cpp:211
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: zrcolafrm.cpp:219 #: zrcolafrm.cpp:211
msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available." msgid "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality will not be available."
msgstr "" msgstr ""
#: zrcolafrm.cpp:513 #: zrcolafrm.cpp:505
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "" msgstr ""
#: zrcolafrm.cpp:538 #: zrcolafrm.cpp:530
msgid "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf" msgid "http://zrcola.zrc-sazu.si/wp-content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
msgstr "" msgstr ""
@@ -399,7 +399,7 @@ msgid "Shows/hides additional search options"
msgstr "" msgstr ""
#: zrcolagui.cpp:517 #: zrcolagui.cpp:517
msgid "List of Unicode character categories to search in" msgid "List of Unicode character blocks to search in"
msgstr "" msgstr ""
#: zrcolagui.cpp:524 #: zrcolagui.cpp:524
@@ -415,7 +415,7 @@ msgid "None"
msgstr "" msgstr ""
#: zrcolagui.cpp:530 #: zrcolagui.cpp:530
msgid "Clear category selection" msgid "Clear block selection"
msgstr "" msgstr ""
#: zrcolagui.cpp:534 #: zrcolagui.cpp:534
@@ -423,7 +423,7 @@ msgid "Invert"
msgstr "" msgstr ""
#: zrcolagui.cpp:535 #: zrcolagui.cpp:535
msgid "Invert category selection" msgid "Invert block selection"
msgstr "" msgstr ""
#: zrcolagui.cpp:574 #: zrcolagui.cpp:574
@@ -467,7 +467,7 @@ msgid "Character tags"
msgstr "" msgstr ""
#: zrcolagui.cpp:691 #: zrcolagui.cpp:691
msgid "Unicode character category" msgid "Unicode character block"
msgstr "" msgstr ""
#: zrcolagui.cpp:698 #: zrcolagui.cpp:698
@@ -637,23 +637,23 @@ msgstr ""
msgid "↓" msgid "↓"
msgstr "" msgstr ""
#: zrcolagui.h:260 #: zrcolagui.h:262
msgid "Character Search" msgid "Character Search"
msgstr "" msgstr ""
#: zrcolagui.h:296 #: zrcolagui.h:299
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#: zrcolagui.h:322 #: zrcolagui.h:326
msgid "About ZRCola" msgid "About ZRCola"
msgstr "" msgstr ""
#: zrcolagui.h:347 zrcolaupdater.cpp:81 #: zrcolagui.h:352 zrcolaupdater.cpp:81
msgid "Product Update" msgid "Product Update"
msgstr "" msgstr ""
#: zrcolagui.h:418 #: zrcolagui.h:425
msgid "Custom Translation Sequence" msgid "Custom Translation Sequence"
msgstr "" msgstr ""
@@ -661,7 +661,7 @@ msgstr ""
msgid "INS key is pressed. Type the Unicode code of desired character now (up to four hexadecimal digits: 0-9, A-F), then release INS." 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 "" msgstr ""
#: zrcolasettings.cpp:73 #: zrcolasettings.cpp:72
msgid "Start ZRCola automatically on logon" msgid "Start ZRCola automatically on logon"
msgstr "" msgstr ""

View File

@@ -1,15 +1,15 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2021 # Simon Rozman <simon.rozman@amebis.si>, 2021
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola\n" "Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2021-12-21 14:45+0100\n" "POT-Creation-Date: 2025-11-14 16:23+0100\n"
"PO-Revision-Date: 2018-09-19 07:18+0000\n" "PO-Revision-Date: 2018-09-19 07:18+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2021\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2021\n"
"Language-Team: German (Germany) (https://www.transifex.com/amebis/teams/91592/de_DE/)\n" "Language-Team: German (Germany) (https://app.transifex.com/amebis/teams/91592/de_DE/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -27,11 +27,17 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU" msgid "© 2004-%s ZRC SAZU"
msgstr "" msgstr ""
#: zrcolaapp.cpp:60 zrcolafrm.cpp:118 zrcolagui.cpp:232 zrcolagui.cpp:943 #: zrcolaapp.cpp:60 zrcolafrm.cpp:110 zrcolagui.cpp:232 zrcolagui.cpp:943
#: zrcolagui.h:119 MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: zrcolagui.h:119 MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4
#: 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.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-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.Feature-2.idtx:4
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCola" msgid "ZRCola"
@@ -45,7 +51,7 @@ msgstr ""
msgid "Context" msgid "Context"
msgstr "" msgstr ""
#: zrcolachrreq.cpp:50 zrcolagui.h:376 #: zrcolachrreq.cpp:50 zrcolagui.h:382
msgid "Request a New Character" msgid "Request a New Character"
msgstr "" msgstr ""
@@ -62,7 +68,7 @@ msgstr "Fehler bei der Validierung"
msgid "Invalid character in Unicode found: %c" msgid "Invalid character in Unicode found: %c"
msgstr "" msgstr ""
#: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:874 #: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:870
msgid "▸ Search Options" msgid "▸ Search Options"
msgstr "" msgstr ""
@@ -70,39 +76,39 @@ msgstr ""
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: zrcolachrslct.cpp:380 zrcolachrslct.cpp:871 #: zrcolachrslct.cpp:380 zrcolachrslct.cpp:867
msgid "▾ Search Options" msgid "▾ Search Options"
msgstr "" msgstr ""
#: zrcolafrm.cpp:84 #: zrcolafrm.cpp:76
msgid "No Translation" msgid "No Translation"
msgstr "" msgstr ""
#: zrcolafrm.cpp:97 #: zrcolafrm.cpp:89
msgid "Custom Translation..." msgid "Custom Translation..."
msgstr "" msgstr ""
#: zrcolafrm.cpp:217 #: zrcolafrm.cpp:209
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
"will not be available." "will not be available."
msgstr "" msgstr ""
#: zrcolafrm.cpp:217 zrcolafrm.cpp:219 #: zrcolafrm.cpp:209 zrcolafrm.cpp:211
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: zrcolafrm.cpp:219 #: zrcolafrm.cpp:211
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
"will not be available." "will not be available."
msgstr "" msgstr ""
#: zrcolafrm.cpp:513 #: zrcolafrm.cpp:505
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/" msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/"
#: zrcolafrm.cpp:538 #: zrcolafrm.cpp:530
msgid "" msgid ""
"http://zrcola.zrc-sazu.si/wp-" "http://zrcola.zrc-sazu.si/wp-"
"content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf" "content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
@@ -409,7 +415,7 @@ msgid "Shows/hides additional search options"
msgstr "" msgstr ""
#: zrcolagui.cpp:517 #: zrcolagui.cpp:517
msgid "List of Unicode character categories to search in" msgid "List of Unicode character blocks to search in"
msgstr "" msgstr ""
#: zrcolagui.cpp:524 #: zrcolagui.cpp:524
@@ -425,7 +431,7 @@ msgid "None"
msgstr "" msgstr ""
#: zrcolagui.cpp:530 #: zrcolagui.cpp:530
msgid "Clear category selection" msgid "Clear block selection"
msgstr "" msgstr ""
#: zrcolagui.cpp:534 #: zrcolagui.cpp:534
@@ -433,7 +439,7 @@ msgid "Invert"
msgstr "" msgstr ""
#: zrcolagui.cpp:535 #: zrcolagui.cpp:535
msgid "Invert category selection" msgid "Invert block selection"
msgstr "" msgstr ""
#: zrcolagui.cpp:574 #: zrcolagui.cpp:574
@@ -477,7 +483,7 @@ msgid "Character tags"
msgstr "" msgstr ""
#: zrcolagui.cpp:691 #: zrcolagui.cpp:691
msgid "Unicode character category" msgid "Unicode character block"
msgstr "" msgstr ""
#: zrcolagui.cpp:698 #: zrcolagui.cpp:698
@@ -654,23 +660,23 @@ msgstr "↑"
msgid "↓" msgid "↓"
msgstr "↓" msgstr "↓"
#: zrcolagui.h:260 #: zrcolagui.h:262
msgid "Character Search" msgid "Character Search"
msgstr "" msgstr ""
#: zrcolagui.h:296 #: zrcolagui.h:299
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#: zrcolagui.h:322 #: zrcolagui.h:326
msgid "About ZRCola" msgid "About ZRCola"
msgstr "" msgstr ""
#: zrcolagui.h:347 zrcolaupdater.cpp:81 #: zrcolagui.h:352 zrcolaupdater.cpp:81
msgid "Product Update" msgid "Product Update"
msgstr "" msgstr ""
#: zrcolagui.h:418 #: zrcolagui.h:425
msgid "Custom Translation Sequence" msgid "Custom Translation Sequence"
msgstr "" msgstr ""
@@ -680,7 +686,7 @@ msgid ""
"four hexadecimal digits: 0-9, A-F), then release INS." "four hexadecimal digits: 0-9, A-F), then release INS."
msgstr "" msgstr ""
#: zrcolasettings.cpp:73 #: zrcolasettings.cpp:72
msgid "Start ZRCola automatically on logon" msgid "Start ZRCola automatically on logon"
msgstr "" msgstr ""
@@ -695,40 +701,61 @@ msgid ""
"Are you sure?" "Are you sure?"
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:10
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:15
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:10 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:10
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:15 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:15
#: 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:4
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:10 #: MSIBuild/en_US.Win32.Release.Control-2.idtx:10
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:15 #: 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:4
#: MSIBuild/en_US.x64.Release.Control-2.idtx:10 #: MSIBuild/en_US.x64.Release.Control-2.idtx:10
#: MSIBuild/en_US.x64.Release.Control-2.idtx:15 #: MSIBuild/en_US.x64.Release.Control-2.idtx:15
msgid "UIHeader.bmp" msgid "UIHeader.bmp"
msgstr "UIHeader.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:5
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:5 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:5
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:5
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:5
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting"
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:6
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:6 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:6
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:6
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:6
msgid "tutorial1.bmp" msgid "tutorial1.bmp"
msgstr "tutorial1.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:7
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:7 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:7
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:7
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:7
msgid "" msgid ""
"When configured, ZRCola starts at system startup and runs in the background." "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." " If needed, it can be brought up by pressing the combination Win+F5."
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:8
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:8 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:8
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:8
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:8
msgid "" msgid ""
"IMPORTANT: Upon pressing the combination Win+F5 the program memorises the " "IMPORTANT: Upon pressing the combination Win+F5 the program memorises the "
@@ -737,32 +764,50 @@ msgid ""
" where to insert the special characters!" " where to insert the special characters!"
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:9
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:14
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:19
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:9 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:9
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:14 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:14
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:19 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:19
#: 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:9
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:14 #: MSIBuild/en_US.Win32.Release.Control-2.idtx:14
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:19 #: 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:9
#: MSIBuild/en_US.x64.Release.Control-2.idtx:14 #: MSIBuild/en_US.x64.Release.Control-2.idtx:14
#: MSIBuild/en_US.x64.Release.Control-2.idtx:19 #: MSIBuild/en_US.x64.Release.Control-2.idtx:19
msgid "&Continue" msgid "&Continue"
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:11
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:11 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:11
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:11
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:11
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition"
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:12
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:12 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:12
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:12
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:12
msgid "tutorial2.bmp" msgid "tutorial2.bmp"
msgstr "tutorial2.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:13
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:13 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:13
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:13
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:13
msgid "" msgid ""
"The string of basic and substitute characters is entered into the upper " "The string of basic and substitute characters is entered into the upper "
@@ -770,30 +815,45 @@ msgid ""
"characters are displayed. To insert them in the text, the F5 key is used." "characters are displayed. To insert them in the text, the F5 key is used."
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:16
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:16 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:16
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:16
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:16
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters"
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:17
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:17 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:17
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:17
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:17
msgid "tutorial3.bmp" msgid "tutorial3.bmp"
msgstr "tutorial3.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:18
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:18 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:18
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:18
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:18
msgid "" msgid ""
"Characters can be entered using keyboard shortcuts, the character catalogue " "Characters can be entered using keyboard shortcuts, the character catalogue "
"(F4) or the character finding tool (F8)." "(F4) or the character finding tool (F8)."
msgstr "" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4
#: 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.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-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.Feature-2.idtx:4
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
msgid "Input system for linguistic use" msgid "Input system for linguistic use"

View File

@@ -1,16 +1,16 @@
# #
# Translators: # Translators:
# Janoš Ježovnik, 2019 # Janoš Ježovnik, 2019
# Simon Rozman <simon@rozman.si>, 2021 # Simon Rozman <simon.rozman@amebis.si>, 2021
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola\n" "Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2021-12-21 14:45+0100\n" "POT-Creation-Date: 2025-11-14 16:23+0100\n"
"PO-Revision-Date: 2018-09-19 07:18+0000\n" "PO-Revision-Date: 2018-09-19 07:18+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2021\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2021\n"
"Language-Team: Russian (Russia) (https://www.transifex.com/amebis/teams/91592/ru_RU/)\n" "Language-Team: Russian (Russia) (https://app.transifex.com/amebis/teams/91592/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -28,11 +28,17 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU" msgid "© 2004-%s ZRC SAZU"
msgstr "© 2004%s ZRC SAZU" msgstr "© 2004%s ZRC SAZU"
#: zrcolaapp.cpp:60 zrcolafrm.cpp:118 zrcolagui.cpp:232 zrcolagui.cpp:943 #: zrcolaapp.cpp:60 zrcolafrm.cpp:110 zrcolagui.cpp:232 zrcolagui.cpp:943
#: zrcolagui.h:119 MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: zrcolagui.h:119 MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4
#: 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.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-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.Feature-2.idtx:4
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCola" msgid "ZRCola"
@@ -46,7 +52,7 @@ msgstr "Знак"
msgid "Context" msgid "Context"
msgstr "Контекст" msgstr "Контекст"
#: zrcolachrreq.cpp:50 zrcolagui.h:376 #: zrcolachrreq.cpp:50 zrcolagui.h:382
msgid "Request a New Character" msgid "Request a New Character"
msgstr "Запрос нового знака" msgstr "Запрос нового знака"
@@ -63,7 +69,7 @@ msgstr "Конфликт проверки"
msgid "Invalid character in Unicode found: %c" msgid "Invalid character in Unicode found: %c"
msgstr "Недействительный знак в записи Unicode: %c" msgstr "Недействительный знак в записи Unicode: %c"
#: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:874 #: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:870
msgid "▸ Search Options" msgid "▸ Search Options"
msgstr "▸ Опции поиска" msgstr "▸ Опции поиска"
@@ -71,19 +77,19 @@ msgstr "▸ Опции поиска"
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: zrcolachrslct.cpp:380 zrcolachrslct.cpp:871 #: zrcolachrslct.cpp:380 zrcolachrslct.cpp:867
msgid "▾ Search Options" msgid "▾ Search Options"
msgstr "▾ Опции поиска" msgstr "▾ Опции поиска"
#: zrcolafrm.cpp:84 #: zrcolafrm.cpp:76
msgid "No Translation" msgid "No Translation"
msgstr "Без транслитерации" msgstr "Без транслитерации"
#: zrcolafrm.cpp:97 #: zrcolafrm.cpp:89
msgid "Custom Translation..." msgid "Custom Translation..."
msgstr "Настраиваемое преобразование ..." msgstr "Настраиваемое преобразование ..."
#: zrcolafrm.cpp:217 #: zrcolafrm.cpp:209
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
"will not be available." "will not be available."
@@ -91,11 +97,11 @@ msgstr ""
"Сочетание клавиш Win+F5 регистрировать. Некоторые функциональности не будут " "Сочетание клавиш Win+F5 регистрировать. Некоторые функциональности не будут "
"доступны." "доступны."
#: zrcolafrm.cpp:217 zrcolafrm.cpp:219 #: zrcolafrm.cpp:209 zrcolafrm.cpp:211
msgid "Warning" msgid "Warning"
msgstr "Предупреждение" msgstr "Предупреждение"
#: zrcolafrm.cpp:219 #: zrcolafrm.cpp:211
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
"will not be available." "will not be available."
@@ -103,11 +109,11 @@ msgstr ""
"Сочетание клавиш Win+F6 невозможно регистрировать. Некоторые " "Сочетание клавиш Win+F6 невозможно регистрировать. Некоторые "
"функциональности не будут доступны." "функциональности не будут доступны."
#: zrcolafrm.cpp:513 #: zrcolafrm.cpp:505
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/" msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/"
#: zrcolafrm.cpp:538 #: zrcolafrm.cpp:530
msgid "" msgid ""
"http://zrcola.zrc-sazu.si/wp-" "http://zrcola.zrc-sazu.si/wp-"
"content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf" "content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
@@ -419,8 +425,8 @@ msgid "Shows/hides additional search options"
msgstr "Показать/скрыть дополнительные опции поиска" msgstr "Показать/скрыть дополнительные опции поиска"
#: zrcolagui.cpp:517 #: zrcolagui.cpp:517
msgid "List of Unicode character categories to search in" msgid "List of Unicode character blocks to search in"
msgstr "Список категории Юникод для проведения поиска" msgstr ""
#: zrcolagui.cpp:524 #: zrcolagui.cpp:524
msgid "All" msgid "All"
@@ -435,16 +441,16 @@ msgid "None"
msgstr "Ничего" msgstr "Ничего"
#: zrcolagui.cpp:530 #: zrcolagui.cpp:530
msgid "Clear category selection" msgid "Clear block selection"
msgstr "Очистить выбор категории" msgstr ""
#: zrcolagui.cpp:534 #: zrcolagui.cpp:534
msgid "Invert" msgid "Invert"
msgstr "Обратить" msgstr "Обратить"
#: zrcolagui.cpp:535 #: zrcolagui.cpp:535
msgid "Invert category selection" msgid "Invert block selection"
msgstr "Обратить выбор категории" msgstr ""
#: zrcolagui.cpp:574 #: zrcolagui.cpp:574
msgid "Character search results" msgid "Character search results"
@@ -487,8 +493,8 @@ msgid "Character tags"
msgstr "Ключевые слова" msgstr "Ключевые слова"
#: zrcolagui.cpp:691 #: zrcolagui.cpp:691
msgid "Unicode character category" msgid "Unicode character block"
msgstr "Категория знака Юникод" msgstr ""
#: zrcolagui.cpp:698 #: zrcolagui.cpp:698
msgid "« Back" msgid "« Back"
@@ -686,23 +692,23 @@ msgstr "↑"
msgid "↓" msgid "↓"
msgstr "↓" msgstr "↓"
#: zrcolagui.h:260 #: zrcolagui.h:262
msgid "Character Search" msgid "Character Search"
msgstr "Поиск знака" msgstr "Поиск знака"
#: zrcolagui.h:296 #: zrcolagui.h:299
msgid "Settings" msgid "Settings"
msgstr "Настройки" msgstr "Настройки"
#: zrcolagui.h:322 #: zrcolagui.h:326
msgid "About ZRCola" msgid "About ZRCola"
msgstr "О системе ZRCola" msgstr "О системе ZRCola"
#: zrcolagui.h:347 zrcolaupdater.cpp:81 #: zrcolagui.h:352 zrcolaupdater.cpp:81
msgid "Product Update" msgid "Product Update"
msgstr "Обновление продукта" msgstr "Обновление продукта"
#: zrcolagui.h:418 #: zrcolagui.h:425
msgid "Custom Translation Sequence" msgid "Custom Translation Sequence"
msgstr "Настраиваемая последовательность преобразований" msgstr "Настраиваемая последовательность преобразований"
@@ -714,7 +720,7 @@ msgstr ""
"Нажата клавиша INS. Введите код Юникод желаемого знака (максимум четыре " "Нажата клавиша INS. Введите код Юникод желаемого знака (максимум четыре "
естнадцатеричныe цифры: 0-9, A-F), затем отпустите клавишу INS." естнадцатеричныe цифры: 0-9, A-F), затем отпустите клавишу INS."
#: zrcolasettings.cpp:73 #: zrcolasettings.cpp:72
msgid "Start ZRCola automatically on logon" msgid "Start ZRCola automatically on logon"
msgstr "Автоматически запустить систему ZRCola при запуске компьютера" msgstr "Автоматически запустить систему ZRCola при запуске компьютера"
@@ -731,32 +737,50 @@ msgstr ""
"Программа будет закрыта и обновлена.\n" "Программа будет закрыта и обновлена.\n"
"Вы уверены?" "Вы уверены?"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:10
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:15
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:10 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:10
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:15 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:15
#: 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:4
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:10 #: MSIBuild/en_US.Win32.Release.Control-2.idtx:10
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:15 #: 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:4
#: MSIBuild/en_US.x64.Release.Control-2.idtx:10 #: MSIBuild/en_US.x64.Release.Control-2.idtx:10
#: MSIBuild/en_US.x64.Release.Control-2.idtx:15 #: MSIBuild/en_US.x64.Release.Control-2.idtx:15
msgid "UIHeader.bmp" msgid "UIHeader.bmp"
msgstr "UIHeader.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:5
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:5 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:5
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:5
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:5
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting"
msgstr "[DlgTitleFont][SimpleProductName] Руководство по запуску системы" msgstr "[DlgTitleFont][SimpleProductName] Руководство по запуску системы"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:6
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:6 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:6
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:6
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:6
msgid "tutorial1.bmp" msgid "tutorial1.bmp"
msgstr "tutorial1.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:7
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:7 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:7
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:7
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:7
msgid "" msgid ""
"When configured, ZRCola starts at system startup and runs in the background." "When configured, ZRCola starts at system startup and runs in the background."
@@ -766,8 +790,11 @@ msgstr ""
"работает в фоновом режиме. Если потребуется, пользователь может вывести " "работает в фоновом режиме. Если потребуется, пользователь может вывести "
"программу на экран, нажав на сочетание клавиш Win+F5." "программу на экран, нажав на сочетание клавиш Win+F5."
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:8
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:8 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:8
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:8
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:8
msgid "" msgid ""
"IMPORTANT: Upon pressing the combination Win+F5 the program memorises the " "IMPORTANT: Upon pressing the combination Win+F5 the program memorises the "
@@ -780,32 +807,50 @@ msgstr ""
"использования упомянутого сочетания клавиш, программа не знает, куда ввести " "использования упомянутого сочетания клавиш, программа не знает, куда ввести "
"желаемые знаки!" "желаемые знаки!"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:9
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:14
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:19
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:9 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:9
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:14 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:14
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:19 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:19
#: 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:9
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:14 #: MSIBuild/en_US.Win32.Release.Control-2.idtx:14
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:19 #: 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:9
#: MSIBuild/en_US.x64.Release.Control-2.idtx:14 #: MSIBuild/en_US.x64.Release.Control-2.idtx:14
#: MSIBuild/en_US.x64.Release.Control-2.idtx:19 #: MSIBuild/en_US.x64.Release.Control-2.idtx:19
msgid "&Continue" msgid "&Continue"
msgstr "&Продолжить" msgstr "&Продолжить"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:11
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:11 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:11
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:11
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:11
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition"
msgstr "[DlgTitleFont][SimpleProductName] Руководство по составлению" msgstr "[DlgTitleFont][SimpleProductName] Руководство по составлению"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:12
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:12 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:12
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:12
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:12
msgid "tutorial2.bmp" msgid "tutorial2.bmp"
msgstr "tutorial2.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:13
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:13 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:13
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:13
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:13
msgid "" msgid ""
"The string of basic and substitute characters is entered into the upper " "The string of basic and substitute characters is entered into the upper "
@@ -816,20 +861,29 @@ msgstr ""
" того, в нижнем окне появляются соответствующие специальные знаки. Для их " " того, в нижнем окне появляются соответствующие специальные знаки. Для их "
"ввода в текст нужно нажать клавишу F5." "ввода в текст нужно нажать клавишу F5."
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:16
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:16 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:16
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:16
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:16
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters"
msgstr "[DlgTitleFont][SimpleProductName] Руководство по вводу знаков" msgstr "[DlgTitleFont][SimpleProductName] Руководство по вводу знаков"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:17
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:17 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:17
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:17
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:17
msgid "tutorial3.bmp" msgid "tutorial3.bmp"
msgstr "tutorial3.bmp" msgstr ""
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:18
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:18 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:18
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:18
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:18
msgid "" msgid ""
"Characters can be entered using keyboard shortcuts, the character catalogue " "Characters can be entered using keyboard shortcuts, the character catalogue "
@@ -838,10 +892,16 @@ msgstr ""
"Знак можно ввести, употребляя сочетания клавиш на клавиатуре, список знаков " "Знак можно ввести, употребляя сочетания клавиш на клавиатуре, список знаков "
"(F4) или функцию \"Поиск знака\" (F8)." "(F4) или функцию \"Поиск знака\" (F8)."
#: MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4
#: 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.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-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.Feature-2.idtx:4
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
msgid "Input system for linguistic use" msgid "Input system for linguistic use"

View File

@@ -1,15 +1,16 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2021 # Simon Rozman <simon.rozman@amebis.si>, 2025
# Janoš Ježovnik, 2025
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola\n" "Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2021-12-21 14:45+0100\n" "POT-Creation-Date: 2025-11-14 16:23+0100\n"
"PO-Revision-Date: 2018-09-19 07:18+0000\n" "PO-Revision-Date: 2018-09-19 07:18+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2021\n" "Last-Translator: Janoš Ježovnik, 2025\n"
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91592/sl_SI/)\n" "Language-Team: Slovenian (Slovenia) (https://app.transifex.com/amebis/teams/91592/sl_SI/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -27,11 +28,17 @@ msgstr ""
msgid "© 2004-%s ZRC SAZU" msgid "© 2004-%s ZRC SAZU"
msgstr "© 2004-%s ZRC SAZU" msgstr "© 2004-%s ZRC SAZU"
#: zrcolaapp.cpp:60 zrcolafrm.cpp:118 zrcolagui.cpp:232 zrcolagui.cpp:943 #: zrcolaapp.cpp:60 zrcolafrm.cpp:110 zrcolagui.cpp:232 zrcolagui.cpp:943
#: zrcolagui.h:119 MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: zrcolagui.h:119 MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4
#: 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.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-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.Feature-2.idtx:4
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
msgid "ZRCola" msgid "ZRCola"
@@ -45,7 +52,7 @@ msgstr "Znak"
msgid "Context" msgid "Context"
msgstr "Kontekst" msgstr "Kontekst"
#: zrcolachrreq.cpp:50 zrcolagui.h:376 #: zrcolachrreq.cpp:50 zrcolagui.h:382
msgid "Request a New Character" msgid "Request a New Character"
msgstr "Zahtevaj nov znak" msgstr "Zahtevaj nov znak"
@@ -62,7 +69,7 @@ msgstr "Nesoglasje pri preverjanju"
msgid "Invalid character in Unicode found: %c" msgid "Invalid character in Unicode found: %c"
msgstr "Napačen znak v zapisu Unicode: %c" msgstr "Napačen znak v zapisu Unicode: %c"
#: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:874 #: zrcolachrslct.cpp:201 zrcolachrslct.cpp:377 zrcolachrslct.cpp:870
msgid "▸ Search Options" msgid "▸ Search Options"
msgstr "▸ Možnosti iskanja" msgstr "▸ Možnosti iskanja"
@@ -70,19 +77,19 @@ msgstr "▸ Možnosti iskanja"
msgid ", " msgid ", "
msgstr ", " msgstr ", "
#: zrcolachrslct.cpp:380 zrcolachrslct.cpp:871 #: zrcolachrslct.cpp:380 zrcolachrslct.cpp:867
msgid "▾ Search Options" msgid "▾ Search Options"
msgstr "▾ Možnosti iskanja" msgstr "▾ Možnosti iskanja"
#: zrcolafrm.cpp:84 #: zrcolafrm.cpp:76
msgid "No Translation" msgid "No Translation"
msgstr "Brez transliteracije" msgstr "Brez prečrkovanja"
#: zrcolafrm.cpp:97 #: zrcolafrm.cpp:89
msgid "Custom Translation..." msgid "Custom Translation..."
msgstr "Pretvorba po meri ..." msgstr "Prečrkovanje po meri ..."
#: zrcolafrm.cpp:217 #: zrcolafrm.cpp:209
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F5 could not be registered. Some functionality "
"will not be available." "will not be available."
@@ -90,11 +97,11 @@ msgstr ""
"ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj " "ZRColine bližnjice na tipkovnici Win+F5 ni mogoče registrirati. Nekaj "
"funkcionalnosti ne bo na voljo." "funkcionalnosti ne bo na voljo."
#: zrcolafrm.cpp:217 zrcolafrm.cpp:219 #: zrcolafrm.cpp:209 zrcolafrm.cpp:211
msgid "Warning" msgid "Warning"
msgstr "Opozorilo" msgstr "Opozorilo"
#: zrcolafrm.cpp:219 #: zrcolafrm.cpp:211
msgid "" msgid ""
"ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality " "ZRCola keyboard shortcut Win+F6 could not be registered. Some functionality "
"will not be available." "will not be available."
@@ -102,11 +109,11 @@ msgstr ""
"ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj " "ZRColine bližnjice na tipkovnici Win+F6 ni mogoče registrirati. Nekaj "
"funkcionalnosti ne bo na voljo." "funkcionalnosti ne bo na voljo."
#: zrcolafrm.cpp:513 #: zrcolafrm.cpp:505
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/" msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
msgstr "http://zrcola.zrc-sazu.si/info/instructions/" msgstr "http://zrcola.zrc-sazu.si/info/instructions/"
#: zrcolafrm.cpp:538 #: zrcolafrm.cpp:530
msgid "" msgid ""
"http://zrcola.zrc-sazu.si/wp-" "http://zrcola.zrc-sazu.si/wp-"
"content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf" "content/uploads/2016/06/ZRCola_tipkovnica_Jun2016.pdf"
@@ -180,7 +187,7 @@ msgstr ""
#: zrcolagui.cpp:126 #: zrcolagui.cpp:126
msgid "Abort (De)composition" msgid "Abort (De)composition"
msgstr "Prekini raz/sestavljanje" msgstr "Prekini raz-/sestavljanje"
#: zrcolagui.cpp:126 #: zrcolagui.cpp:126
msgid "Abort composition and return focus to source window" msgid "Abort composition and return focus to source window"
@@ -216,7 +223,7 @@ msgstr "(Raz-)sestavljanje znakov Unicode"
#: zrcolagui.cpp:151 #: zrcolagui.cpp:151
msgid "Tra&nslation" msgid "Tra&nslation"
msgstr "Tra&nsliteracija" msgstr "Prečrkova&nje"
#: zrcolagui.cpp:156 #: zrcolagui.cpp:156
msgid "&PUA Warning" msgid "&PUA Warning"
@@ -418,8 +425,8 @@ msgid "Shows/hides additional search options"
msgstr "Prikaže/skrije dodatne možnosti iskanja" msgstr "Prikaže/skrije dodatne možnosti iskanja"
#: zrcolagui.cpp:517 #: zrcolagui.cpp:517
msgid "List of Unicode character categories to search in" msgid "List of Unicode character blocks to search in"
msgstr "Seznam kategorij znaka Unicode za iskanje" msgstr "Seznam znakovnih blokov Unicode za iskanje"
#: zrcolagui.cpp:524 #: zrcolagui.cpp:524
msgid "All" msgid "All"
@@ -434,16 +441,16 @@ msgid "None"
msgstr "Nič" msgstr "Nič"
#: zrcolagui.cpp:530 #: zrcolagui.cpp:530
msgid "Clear category selection" msgid "Clear block selection"
msgstr "Počisti izbor kategorij" msgstr "Počisti izbor blokov"
#: zrcolagui.cpp:534 #: zrcolagui.cpp:534
msgid "Invert" msgid "Invert"
msgstr "Obrni" msgstr "Obrni"
#: zrcolagui.cpp:535 #: zrcolagui.cpp:535
msgid "Invert category selection" msgid "Invert block selection"
msgstr "Obrni izbor kategorij" msgstr "Obrni izbor blokov"
#: zrcolagui.cpp:574 #: zrcolagui.cpp:574
msgid "Character search results" msgid "Character search results"
@@ -486,8 +493,8 @@ msgid "Character tags"
msgstr "Oznake znaka" msgstr "Oznake znaka"
#: zrcolagui.cpp:691 #: zrcolagui.cpp:691
msgid "Unicode character category" msgid "Unicode character block"
msgstr "Kategorija znaka Unicode" msgstr "Znakovni blok Unicode"
#: zrcolagui.cpp:698 #: zrcolagui.cpp:698
msgid "« Back" msgid "« Back"
@@ -683,23 +690,23 @@ msgstr "↑"
msgid "↓" msgid "↓"
msgstr "↓" msgstr "↓"
#: zrcolagui.h:260 #: zrcolagui.h:262
msgid "Character Search" msgid "Character Search"
msgstr "Poišči znak" msgstr "Poišči znak"
#: zrcolagui.h:296 #: zrcolagui.h:299
msgid "Settings" msgid "Settings"
msgstr "Nastavitve" msgstr "Nastavitve"
#: zrcolagui.h:322 #: zrcolagui.h:326
msgid "About ZRCola" msgid "About ZRCola"
msgstr "O ZRColi" msgstr "O ZRColi"
#: zrcolagui.h:347 zrcolaupdater.cpp:81 #: zrcolagui.h:352 zrcolaupdater.cpp:81
msgid "Product Update" msgid "Product Update"
msgstr "Posodabljanje izdelka" msgstr "Posodabljanje izdelka"
#: zrcolagui.h:418 #: zrcolagui.h:425
msgid "Custom Translation Sequence" msgid "Custom Translation Sequence"
msgstr "Zaporedje pretvorb po meri" msgstr "Zaporedje pretvorb po meri"
@@ -711,7 +718,7 @@ msgstr ""
"Pritisnili ste tipko INS. Vtipkajte kodo Unicode želenega znaka (do štiri " "Pritisnili ste tipko INS. Vtipkajte kodo Unicode želenega znaka (do štiri "
"šestnajstiške števke: 09, AF), nato izpustite INS." "šestnajstiške števke: 09, AF), nato izpustite INS."
#: zrcolasettings.cpp:73 #: zrcolasettings.cpp:72
msgid "Start ZRCola automatically on logon" msgid "Start ZRCola automatically on logon"
msgstr "Samodejno zaženi ZRColo ob prijavi" msgstr "Samodejno zaženi ZRColo ob prijavi"
@@ -728,32 +735,50 @@ msgstr ""
"Program se bo zdaj zaprl in zagnala se bo posodobitev.\n" "Program se bo zdaj zaprl in zagnala se bo posodobitev.\n"
"Ali ste prepričani, da želite nadaljevati?" "Ali ste prepričani, da želite nadaljevati?"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:10
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:15
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:10 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:10
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:15 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:15
#: 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:4
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:10 #: MSIBuild/en_US.Win32.Release.Control-2.idtx:10
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:15 #: 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:4
#: MSIBuild/en_US.x64.Release.Control-2.idtx:10 #: MSIBuild/en_US.x64.Release.Control-2.idtx:10
#: MSIBuild/en_US.x64.Release.Control-2.idtx:15 #: MSIBuild/en_US.x64.Release.Control-2.idtx:15
msgid "UIHeader.bmp" msgid "UIHeader.bmp"
msgstr "UIHeader.bmp" msgstr "UIHeader.bmp"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:5
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:5 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:5
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:5
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:5
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Starting"
msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Zagon" msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Zagon"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:6
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:6 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:6
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:6
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:6
msgid "tutorial1.bmp" msgid "tutorial1.bmp"
msgstr "tutorial1.bmp" msgstr "tutorial1.bmp"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:7
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:7 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:7
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:7
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:7
msgid "" msgid ""
"When configured, ZRCola starts at system startup and runs in the background." "When configured, ZRCola starts at system startup and runs in the background."
@@ -762,8 +787,11 @@ msgstr ""
"Če jo tako nastavimo, se ZRCola zažene samodejno in teče v ozadju. V " "Č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." "ospredje jo prikličemo s pritiskom na bližnjico Win+F5."
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:8
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:8 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:8
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:8
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:8
msgid "" msgid ""
"IMPORTANT: Upon pressing the combination Win+F5 the program memorises the " "IMPORTANT: Upon pressing the combination Win+F5 the program memorises the "
@@ -775,32 +803,50 @@ msgstr ""
"besedilu. Če ZRColo povečamo brez pritiska na ti dve tipki, program ne bo " "besedilu. Če ZRColo povečamo brez pritiska na ti dve tipki, program ne bo "
"vedel, kam vstaviti želene znake!" "vedel, kam vstaviti želene znake!"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:9
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:14
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:19
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:9 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:9
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:14 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:14
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:19 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:19
#: 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:9
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:14 #: MSIBuild/en_US.Win32.Release.Control-2.idtx:14
#: MSIBuild/en_US.Win32.Release.Control-2.idtx:19 #: 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:9
#: MSIBuild/en_US.x64.Release.Control-2.idtx:14 #: MSIBuild/en_US.x64.Release.Control-2.idtx:14
#: MSIBuild/en_US.x64.Release.Control-2.idtx:19 #: MSIBuild/en_US.x64.Release.Control-2.idtx:19
msgid "&Continue" msgid "&Continue"
msgstr "&Nadaljuj" msgstr "&Nadaljuj"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:11
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:11 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:11
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:11
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:11
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Composition"
msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Sestavljanje" msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Sestavljanje"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:12
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:12 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:12
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:12
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:12
msgid "tutorial2.bmp" msgid "tutorial2.bmp"
msgstr "tutorial2.bmp" msgstr "tutorial2.bmp"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:13
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:13 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:13
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:13
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:13
msgid "" msgid ""
"The string of basic and substitute characters is entered into the upper " "The string of basic and substitute characters is entered into the upper "
@@ -811,20 +857,29 @@ msgstr ""
"programu. V spodnji vrstici se prikažejo sestavljeni znaki. V besedilo jih " "programu. V spodnji vrstici se prikažejo sestavljeni znaki. V besedilo jih "
"vnesemo s pritiskom na tipko F5." "vnesemo s pritiskom na tipko F5."
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:16
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:16 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:16
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:16
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:16
msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters" msgid "[DlgTitleFont][SimpleProductName] Tutorial : Entering Characters"
msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Vnos znakov" msgstr "[DlgTitleFont]Vadnica [SimpleProductName] : Vnos znakov"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:17
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:17 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:17
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:17
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:17
msgid "tutorial3.bmp" msgid "tutorial3.bmp"
msgstr "tutorial3.bmp" msgstr "tutorial3.bmp"
#: MSIBuild/en_US.ARM64.Debug.Control-2.idtx:18
#: MSIBuild/en_US.ARM64.Release.Control-2.idtx:18 #: MSIBuild/en_US.ARM64.Release.Control-2.idtx:18
#: MSIBuild/en_US.Win32.Debug.Control-2.idtx:18
#: MSIBuild/en_US.Win32.Release.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 #: MSIBuild/en_US.x64.Release.Control-2.idtx:18
msgid "" msgid ""
"Characters can be entered using keyboard shortcuts, the character catalogue " "Characters can be entered using keyboard shortcuts, the character catalogue "
@@ -833,10 +888,16 @@ msgstr ""
"Znake lahko v vnosno vrstico vstavljamo s pomočjo bližnjic na tipkovnici, iz" "Znake lahko v vnosno vrstico vstavljamo s pomočjo bližnjic na tipkovnici, iz"
" kataloga znakov (F4) ali z iskalnikom znakov (F8)." " kataloga znakov (F4) ali z iskalnikom znakov (F8)."
#: MSIBuild/en_US.ARM64.Debug.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Debug.Shortcut-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Feature-2.idtx:4
#: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.ARM64.Release.Shortcut-2.idtx:4
#: 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.Feature-2.idtx:4
#: MSIBuild/en_US.Win32.Release.Shortcut-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.Feature-2.idtx:4
#: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4 #: MSIBuild/en_US.x64.Release.Shortcut-2.idtx:4
msgid "Input system for linguistic use" msgid "Input system for linguistic use"

View File

@@ -21,6 +21,7 @@
#include <Updater/chkthread.h> #include <Updater/chkthread.h>
#include <wxex/common.h> #include <wxex/common.h>
#include <wxex/icon.h>
#include <wxex/url.h> #include <wxex/url.h>
#include <wxex/persist/auimanager.h> #include <wxex/persist/auimanager.h>
#include <wxex/persist/toplevel.h> #include <wxex/persist/toplevel.h>
@@ -46,7 +47,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <stdex/idrec> #include <zrcola/idrec.h>
#if defined(__WXMSW__) #if defined(__WXMSW__)
#include <Msi.h> #include <Msi.h>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018) // C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@@ -218,9 +218,9 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_toolEditPaste = m_toolbarEdit->AddTool( wxID_PASTE, _("Paste"), wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Paste"), _("Paste selection"), NULL ); m_toolEditPaste = m_toolbarEdit->AddTool( wxID_PASTE, _("Paste"), wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Paste"), _("Paste selection"), NULL );
m_toolbarEdit->Realize(); 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_mgr.AddPane( m_toolbarEdit, wxAuiPaneInfo() .Name( wxT("toolbarEdit") ).Top() .Caption( _("Edit") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Layer( 1 ).ToolbarPane() );
m_toolbarTranslate = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT ); m_toolbarTranslate = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORIZONTAL|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_CHECK, _("Find Character"), _("Toggle character search to select character to insert into text"), NULL ); m_toolCharSelect = m_toolbarTranslate->AddTool( wxID_CHARACTER_SELECTOR, _("Find Character"), wxIcon( wxT("char_select.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_CHECK, _("Find Character"), _("Toggle character search to select character to insert into text"), NULL );
m_toolSendDestination = m_toolbarTranslate->AddTool( wxID_SEND_DESTINATION, _("Send Composed"), wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Send composed text to source window"), NULL ); m_toolSendDestination = m_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 );
@@ -235,7 +235,7 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_toolComposition->SetSelection( 0 ); m_toolComposition->SetSelection( 0 );
m_toolbarTranslate->AddControl( m_toolComposition ); m_toolbarTranslate->AddControl( m_toolComposition );
wxArrayString m_toolTranslationSeqChoices; wxArrayString m_toolTranslationSeqChoices;
m_toolTranslationSeq = new wxChoice( m_toolbarTranslate, wxID_ANY, wxDefaultPosition, wxSize( 180,-1 ), m_toolTranslationSeqChoices, 0 ); m_toolTranslationSeq = new wxChoice( m_toolbarTranslate, wxID_ANY, wxDefaultPosition, wxSize( 200,-1 ), m_toolTranslationSeqChoices, 0 );
m_toolTranslationSeq->SetSelection( 0 ); m_toolTranslationSeq->SetSelection( 0 );
m_toolbarTranslate->AddControl( m_toolTranslationSeq ); m_toolbarTranslate->AddControl( m_toolTranslationSeq );
m_toolbarTranslate->AddSeparator(); m_toolbarTranslate->AddSeparator();
@@ -243,7 +243,7 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_toolWarnPUA = m_toolbarTranslate->AddTool( wxID_WARN_PUA, _("PUA Warning"), wxIcon( wxT("warn_pua.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_CHECK, _("Highlight Private Use Area Characters"), _("Highlight Private Use Area Characters"), NULL ); m_toolWarnPUA = m_toolbarTranslate->AddTool( wxID_WARN_PUA, _("PUA Warning"), wxIcon( wxT("warn_pua.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24 ), wxNullBitmap, wxITEM_CHECK, _("Highlight Private Use Area Characters"), _("Highlight Private Use Area Characters"), NULL );
m_toolbarTranslate->Realize(); 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_mgr.AddPane( m_toolbarTranslate, wxAuiPaneInfo() .Name( wxT("toolbarCompose") ).Top() .Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Layer( 1 ).ToolbarPane() );
m_panelChrCat = new wxZRColaCharacterCatalogPanel( this ); m_panelChrCat = new wxZRColaCharacterCatalogPanel( this );
@@ -382,7 +382,7 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
this->SetSizer( bSizerMain ); this->SetSizer( bSizerMain );
this->Layout(); this->Layout();
bSizerMain->Fit( this ); bSizerMain->Fit( this );
m_timerSave.SetOwner( this, wxID_TIMER_SAVE ); m_timerSave.SetOwner( this, m_timerSave.GetId() );
// Connect Events // Connect Events
m_source->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourcePaint ), NULL, this ); m_source->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourcePaint ), NULL, this );
@@ -391,7 +391,7 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
m_destination->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationPaint ), 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_destination->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDestinationText ), NULL, this );
m_destinationHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this ); m_destinationHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this );
this->Connect( wxID_TIMER_SAVE, wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) ); this->Connect( m_timerSave.GetId(), wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) );
} }
wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase() wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase()
@@ -403,7 +403,7 @@ wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase()
m_destination->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationPaint ), 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_destination->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDestinationText ), NULL, this );
m_destinationHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this ); m_destinationHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this );
this->Disconnect( wxID_TIMER_SAVE, wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) ); this->Disconnect( m_timerSave.GetId(), wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) );
} }
@@ -512,32 +512,32 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id,
wxBoxSizer* sbSizerSearch; wxBoxSizer* sbSizerSearch;
sbSizerSearch = new wxBoxSizer( wxVERTICAL ); sbSizerSearch = new wxBoxSizer( wxVERTICAL );
wxArrayString m_categoriesChoices; wxArrayString m_blocksChoices;
m_categories = new wxCheckListBox( m_search_panel, wxID_ANY, wxDefaultPosition, wxSize( -1,60 ), m_categoriesChoices, 0 ); m_blocks = new wxCheckListBox( m_search_panel, wxID_ANY, wxDefaultPosition, wxSize( -1,60 ), m_blocksChoices, 0 );
m_categories->SetToolTip( _("List of Unicode character categories to search in") ); m_blocks->SetToolTip( _("List of Unicode character blocks to search in") );
sbSizerSearch->Add( m_categories, 0, wxALL|wxEXPAND, 5 ); sbSizerSearch->Add( m_blocks, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerCategoriesCtrl; wxBoxSizer* bSizerBlocksCtrl;
bSizerCategoriesCtrl = new wxBoxSizer( wxHORIZONTAL ); bSizerBlocksCtrl = new wxBoxSizer( wxHORIZONTAL );
m_categoriesAll = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("All"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_blocksAll = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("All"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_categoriesAll->SetToolTip( _("Select all categories") ); m_blocksAll->SetToolTip( _("Select all categories") );
bSizerCategoriesCtrl->Add( m_categoriesAll, 0, wxALL, 5 ); bSizerBlocksCtrl->Add( m_blocksAll, 0, wxALL, 5 );
m_categoriesNone = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("None"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_blocksNone = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("None"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_categoriesNone->SetToolTip( _("Clear category selection") ); m_blocksNone->SetToolTip( _("Clear block selection") );
bSizerCategoriesCtrl->Add( m_categoriesNone, 0, wxALL, 5 ); bSizerBlocksCtrl->Add( m_blocksNone, 0, wxALL, 5 );
m_categoriesInvert = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("Invert"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_blocksInvert = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("Invert"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_categoriesInvert->SetToolTip( _("Invert category selection") ); m_blocksInvert->SetToolTip( _("Invert block selection") );
bSizerCategoriesCtrl->Add( m_categoriesInvert, 0, wxALL, 5 ); bSizerBlocksCtrl->Add( m_blocksInvert, 0, wxALL, 5 );
sbSizerSearch->Add( bSizerCategoriesCtrl, 0, wxALIGN_RIGHT, 5 ); sbSizerSearch->Add( bSizerBlocksCtrl, 0, wxALIGN_RIGHT, 5 );
m_search_panel->SetSizer( sbSizerSearch ); m_search_panel->SetSizer( sbSizerSearch );
@@ -687,10 +687,10 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id,
sbSizerPreview->Add( m_tags, 1, wxALL|wxEXPAND, 5 ); sbSizerPreview->Add( m_tags, 1, wxALL|wxEXPAND, 5 );
m_category = new wxTextCtrl( sbSizerPreview->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTER ); m_block = new wxTextCtrl( sbSizerPreview->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTER );
m_category->SetToolTip( _("Unicode character category") ); m_block->SetToolTip( _("Unicode character block") );
sbSizerPreview->Add( m_category, 0, wxALL|wxEXPAND, 5 ); sbSizerPreview->Add( m_block, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerNavigateButtons; wxBoxSizer* bSizerNavigateButtons;
bSizerNavigateButtons = new wxBoxSizer( wxHORIZONTAL ); bSizerNavigateButtons = new wxBoxSizer( wxHORIZONTAL );
@@ -780,10 +780,10 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id,
this->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) ); this->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) );
m_search->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this ); m_search->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this );
m_search_more->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this ); m_search_more->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this );
m_categories->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnCategoriesToggle ), NULL, this ); m_blocks->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnBlocksToggle ), NULL, this );
m_categoriesAll->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesAll ), NULL, this ); m_blocksAll->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksAll ), NULL, this );
m_categoriesNone->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesNone ), NULL, this ); m_blocksNone->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksNone ), NULL, this );
m_categoriesInvert->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesInvert ), NULL, this ); m_blocksInvert->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksInvert ), NULL, this );
m_gridResults->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this ); m_gridResults->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this );
m_gridResults->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this ); m_gridResults->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this );
m_gridResults->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this ); m_gridResults->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this );
@@ -805,10 +805,10 @@ wxZRColaCharSelectBase::~wxZRColaCharSelectBase()
this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) ); this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) );
m_search->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this ); m_search->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this );
m_search_more->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this ); m_search_more->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this );
m_categories->Disconnect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnCategoriesToggle ), NULL, this ); m_blocks->Disconnect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnBlocksToggle ), NULL, this );
m_categoriesAll->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesAll ), NULL, this ); m_blocksAll->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksAll ), NULL, this );
m_categoriesNone->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesNone ), NULL, this ); m_blocksNone->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksNone ), NULL, this );
m_categoriesInvert->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesInvert ), NULL, this ); m_blocksInvert->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksInvert ), NULL, this );
m_gridResults->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this ); m_gridResults->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this );
m_gridResults->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this ); m_gridResults->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this );
m_gridResults->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this ); m_gridResults->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this );

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018) // C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@@ -61,7 +61,7 @@ class wxZRColaFrameBase : public wxFrame
protected: protected:
enum enum
{ {
wxID_CHARACTER_SELECTOR = 1000, wxID_CHARACTER_SELECTOR = 6000,
wxID_SEND_DESTINATION, wxID_SEND_DESTINATION,
wxID_COPY_DESTINATION_AND_RETURN, wxID_COPY_DESTINATION_AND_RETURN,
wxID_SEND_SOURCE, wxID_SEND_SOURCE,
@@ -78,7 +78,7 @@ class wxZRColaFrameBase : public wxFrame
wxID_HELP_INSTRUCTIONS, wxID_HELP_INSTRUCTIONS,
wxID_HELP_SHORTCUTS, wxID_HELP_SHORTCUTS,
wxID_HELP_REQCHAR, wxID_HELP_REQCHAR,
wxID_HELP_UPDATE wxID_HELP_UPDATE,
}; };
wxMenuBar* m_menubar; wxMenuBar* m_menubar;
@@ -105,7 +105,7 @@ class wxZRColaFrameBase : public wxFrame
wxZRColaCharacterCatalogPanel* m_panelChrCat; wxZRColaCharacterCatalogPanel* m_panelChrCat;
wxStatusBar* m_statusBar; wxStatusBar* m_statusBar;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); } virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
@@ -116,7 +116,7 @@ class wxZRColaFrameBase : public wxFrame
public: public:
wxZRColaComposerPanel* m_panel; wxZRColaComposerPanel* m_panel;
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") ); wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,480 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
wxAuiManager m_mgr; wxAuiManager m_mgr;
~wxZRColaFrameBase(); ~wxZRColaFrameBase();
@@ -133,7 +133,7 @@ class wxZRColaComposerPanelBase : public wxPanel
protected: protected:
enum enum
{ {
wxID_TIMER_SAVE = 1000 wxID_TIMER_SAVE = 6000,
}; };
wxSplitterWindow* m_splitterSource; wxSplitterWindow* m_splitterSource;
@@ -146,7 +146,7 @@ class wxZRColaComposerPanelBase : public wxPanel
wxTextCtrl* m_destinationHex; wxTextCtrl* m_destinationHex;
wxTimer m_timerSave; wxTimer m_timerSave;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); } virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); } virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); } virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); }
@@ -161,6 +161,7 @@ class wxZRColaComposerPanelBase : public wxPanel
wxTextCtrl* m_destination; 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( 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(); ~wxZRColaComposerPanelBase();
void m_splitterSourceOnIdle( wxIdleEvent& ) void m_splitterSourceOnIdle( wxIdleEvent& )
@@ -189,7 +190,7 @@ class wxZRColaCharacterCatalogPanelBase : public wxPanel
wxZRColaCharGrid* m_grid; wxZRColaCharGrid* m_grid;
wxCheckBox* m_show_all; wxCheckBox* m_show_all;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); } virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); } virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); } virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
@@ -199,6 +200,7 @@ class wxZRColaCharacterCatalogPanelBase : public wxPanel
public: public:
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") ); wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
~wxZRColaCharacterCatalogPanelBase(); ~wxZRColaCharacterCatalogPanelBase();
}; };
@@ -214,10 +216,10 @@ class wxZRColaCharSelectBase : public wxDialog
wxSearchCtrl* m_search; wxSearchCtrl* m_search;
wxHyperlinkCtrl* m_search_more; wxHyperlinkCtrl* m_search_more;
wxPanel* m_search_panel; wxPanel* m_search_panel;
wxCheckListBox* m_categories; wxCheckListBox* m_blocks;
wxHyperlinkCtrl* m_categoriesAll; wxHyperlinkCtrl* m_blocksAll;
wxHyperlinkCtrl* m_categoriesNone; wxHyperlinkCtrl* m_blocksNone;
wxHyperlinkCtrl* m_categoriesInvert; wxHyperlinkCtrl* m_blocksInvert;
wxZRColaCharGrid* m_gridResults; wxZRColaCharGrid* m_gridResults;
wxZRColaCharGrid* m_gridRecent; wxZRColaCharGrid* m_gridRecent;
wxStaticText* m_labelUnicode; wxStaticText* m_labelUnicode;
@@ -226,20 +228,20 @@ class wxZRColaCharSelectBase : public wxDialog
wxGrid* m_gridPreview; wxGrid* m_gridPreview;
wxTextCtrl* m_description; wxTextCtrl* m_description;
wxTextCtrl* m_tags; wxTextCtrl* m_tags;
wxTextCtrl* m_category; wxTextCtrl* m_block;
wxHyperlinkCtrl* m_navigateBack; wxHyperlinkCtrl* m_navigateBack;
wxHyperlinkCtrl* m_navigateForward; wxHyperlinkCtrl* m_navigateForward;
wxZRColaCharGrid* m_gridRelated; wxZRColaCharGrid* m_gridRelated;
wxButton* m_buttonInsert; wxButton* m_buttonInsert;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); } virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSearchMore( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnSearchMore( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnCategoriesToggle( wxCommandEvent& event ) { event.Skip(); } virtual void OnBlocksToggle( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCategoriesAll( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBlocksAll( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnCategoriesNone( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBlocksNone( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnCategoriesInvert( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBlocksInvert( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnResultCellDClick( wxGridEvent& event ) { event.Skip(); } virtual void OnResultCellDClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); } virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); }
virtual void OnResultsKeyDown( wxKeyEvent& event ) { event.Skip(); } virtual void OnResultsKeyDown( wxKeyEvent& event ) { event.Skip(); }
@@ -258,6 +260,7 @@ class wxZRColaCharSelectBase : public wxDialog
public: public:
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") ); wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
~wxZRColaCharSelectBase(); ~wxZRColaCharSelectBase();
}; };
@@ -284,7 +287,7 @@ class wxZRColaSettingsBase : public wxDialog
wxButton* m_sdbSizerButtonsApply; wxButton* m_sdbSizerButtonsApply;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
@@ -294,6 +297,7 @@ class wxZRColaSettingsBase : public wxDialog
public: public:
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") ); wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
~wxZRColaSettingsBase(); ~wxZRColaSettingsBase();
}; };
@@ -320,6 +324,7 @@ class wxZRColaAboutBase : public wxDialog
public: public:
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") ); wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
~wxZRColaAboutBase(); ~wxZRColaAboutBase();
}; };
@@ -336,7 +341,7 @@ class wxZRColaUpdaterBase : public wxDialog
wxButton* m_buttonUpdate; wxButton* m_buttonUpdate;
wxButton* m_buttonClose; wxButton* m_buttonClose;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); }
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); } virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
@@ -345,6 +350,7 @@ class wxZRColaUpdaterBase : public wxDialog
public: public:
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") ); wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
~wxZRColaUpdaterBase(); ~wxZRColaUpdaterBase();
}; };
@@ -367,13 +373,14 @@ class wxZRColaCharRequestBase : public wxDialog
wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") ); wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
~wxZRColaCharRequestBase(); ~wxZRColaCharRequestBase();
}; };
@@ -399,7 +406,7 @@ class wxZRColaTranslationSeqBase : public wxDialog
wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); } virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); }
@@ -416,6 +423,7 @@ class wxZRColaTranslationSeqBase : public wxDialog
public: 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, const wxString& name = wxT("ZRColaTranslationSeq") ); 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, const wxString& name = wxT("ZRColaTranslationSeq") );
~wxZRColaTranslationSeqBase(); ~wxZRColaTranslationSeqBase();
}; };

View File

@@ -82,7 +82,7 @@ bool ZRColaApp::OnInit()
ZRCola::recordid_t id; ZRCola::recordid_t id;
if (!stdex::idrec::read_id(dat, id, size)) break; if (!stdex::idrec::read_id(dat, id, size)) break;
if (id == ZRCola::translation_rec::id) { if (id == ZRCola::translation_rec::id()) {
dat >> ZRCola::translation_rec(m_t_db); dat >> ZRCola::translation_rec(m_t_db);
if (dat.good()) { if (dat.good()) {
has_translation_data = true; has_translation_data = true;
@@ -90,61 +90,61 @@ bool ZRColaApp::OnInit()
wxFAIL_MSG(wxT("Error reading translation data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading translation data from ZRCola.zrcdb."));
m_t_db.clear(); m_t_db.clear();
} }
} else if (id == ZRCola::transet_rec::id) { } else if (id == ZRCola::transet_rec::id()) {
dat >> ZRCola::transet_rec(m_ts_db); dat >> ZRCola::transet_rec(m_ts_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading translation set data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading translation set data from ZRCola.zrcdb."));
m_ts_db.clear(); m_ts_db.clear();
} }
} else if (id == ZRCola::transeq_rec::id) { } else if (id == ZRCola::transeq_rec::id()) {
dat >> ZRCola::transeq_rec(m_tsq_db); dat >> ZRCola::transeq_rec(m_tsq_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading translation sequence data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading translation sequence data from ZRCola.zrcdb."));
m_tsq_db.clear(); m_tsq_db.clear();
} }
} else if (id == ZRCola::langchar_rec::id) { } else if (id == ZRCola::langchar_rec::id()) {
dat >> ZRCola::langchar_rec(m_lc_db); dat >> ZRCola::langchar_rec(m_lc_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading language character data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading language character data from ZRCola.zrcdb."));
m_lc_db.clear(); m_lc_db.clear();
} }
} else if (id == ZRCola::language_rec::id) { } else if (id == ZRCola::language_rec::id()) {
dat >> ZRCola::language_rec(m_lang_db); dat >> ZRCola::language_rec(m_lang_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading language character data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading language character data from ZRCola.zrcdb."));
m_lang_db.clear(); m_lang_db.clear();
} }
} else if (id == ZRCola::keyseq_rec::id) { } else if (id == ZRCola::keyseq_rec::id()) {
dat >> ZRCola::keyseq_rec(m_ks_db); dat >> ZRCola::keyseq_rec(m_ks_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading key sequences data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading key sequences data from ZRCola.zrcdb."));
m_ks_db.clear(); m_ks_db.clear();
} }
} else if (id == ZRCola::character_rec::id) { } else if (id == ZRCola::character_rec::id()) {
dat >> ZRCola::character_rec(m_chr_db); dat >> ZRCola::character_rec(m_chr_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading character data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading character data from ZRCola.zrcdb."));
m_chr_db.clear(); m_chr_db.clear();
} }
} else if (id == ZRCola::chrcat_rec::id) { } else if (id == ZRCola::chrblk_rec::id()) {
dat >> ZRCola::chrcat_rec(m_cc_db); dat >> ZRCola::chrblk_rec(m_cb_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading character category data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading character block data from ZRCola.zrcdb."));
m_cc_db.clear(); m_cb_db.clear();
} }
} else if (id == ZRCola::chrtag_rec::id) { } else if (id == ZRCola::chrtag_rec::id()) {
dat >> ZRCola::chrtag_rec(m_ct_db); dat >> ZRCola::chrtag_rec(m_ct_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading character tag data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading character tag data from ZRCola.zrcdb."));
m_ct_db.clear(); m_ct_db.clear();
} }
} else if (id == ZRCola::tagname_rec::id) { } else if (id == ZRCola::tagname_rec::id()) {
dat >> ZRCola::tagname_rec(m_tn_db); dat >> ZRCola::tagname_rec(m_tn_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading tag name data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading tag name data from ZRCola.zrcdb."));
m_tn_db.clear(); m_tn_db.clear();
} }
} else if (id == ZRCola::highlight_rec::id) { } else if (id == ZRCola::highlight_rec::id()) {
dat >> ZRCola::highlight_rec(m_h_db); dat >> ZRCola::highlight_rec(m_h_db);
if (!dat.good()) { if (!dat.good()) {
wxFAIL_MSG(wxT("Error reading highlight data from ZRCola.zrcdb.")); wxFAIL_MSG(wxT("Error reading highlight data from ZRCola.zrcdb."));

View File

@@ -70,7 +70,7 @@ public:
ZRCola::language_db m_lang_db; ///< Language database ZRCola::language_db m_lang_db; ///< Language database
ZRCola::keyseq_db m_ks_db; ///< Key sequence database ZRCola::keyseq_db m_ks_db; ///< Key sequence database
ZRCola::character_db m_chr_db; ///< Character database ZRCola::character_db m_chr_db; ///< Character database
ZRCola::chrcat_db m_cc_db; ///< Characted category database ZRCola::chrblk_db m_cb_db; ///< Character block database
ZRCola::chrtag_db m_ct_db; ///< Character tag database ZRCola::chrtag_db m_ct_db; ///< Character tag database
ZRCola::tagname_db m_tn_db; ///< Tag name database ZRCola::tagname_db m_tn_db; ///< Tag name database
ZRCola::highlight_db m_h_db; ///< Highlight database ZRCola::highlight_db m_h_db; ///< Highlight database
@@ -82,7 +82,7 @@ public:
protected: protected:
#ifdef __WXMSW__ #ifdef __WXMSW__
winstd::win_handle<NULL> m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running winstd::event m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running
#endif #endif
}; };

View File

@@ -148,11 +148,11 @@ void wxZRColaCharacterCatalogPanel::Update()
wxArrayShort(reinterpret_cast<const short*>(cg.chrshow()), reinterpret_cast<const short*>(cg.chrshow_end()))); wxArrayShort(reinterpret_cast<const short*>(cg.chrshow()), reinterpret_cast<const short*>(cg.chrshow_end())));
} else { } else {
// Select frequently used characters only. // Select frequently used characters only.
const wchar_t *src = cg.chrlst(); const auto *src = cg.chrlst();
const unsigned __int16 *shown = cg.chrshow(); const uint16_t *shown = cg.chrshow();
wxArrayString chars; wxArrayString chars;
for (size_t i = 0, i_end = cg.chrlst_len(), j = 0; i < i_end; j++) { 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) { for (uint16_t k = 0, mask = shown[j]; k < 16 && i < i_end; k++, mask >>= 1) {
size_t len = wcsnlen(src + i, i_end - i); size_t len = wcsnlen(src + i, i_end - i);
if (mask & 1) if (mask & 1)
chars.Add(wxString(src + i, len)); chars.Add(wxString(src + i, len));

View File

@@ -110,7 +110,7 @@ wxString wxZRColaCharGrid::GetToolTipText(int idx)
const auto &chr = m_chars[idx]; const auto &chr = m_chars[idx];
// See if this character has a key sequence registered. // See if this character has a key sequence registered.
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(wchar_t)*chr.length()]); std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::char_t)*chr.length()]);
ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, chr.data(), chr.length()); ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, chr.data(), chr.length());
ZRCola::keyseq_db::indexKey::size_type start; ZRCola::keyseq_db::indexKey::size_type start;
if (app->m_ks_db.idxChr.find(*ks, start)) { if (app->m_ks_db.idxChr.find(*ks, start)) {

View File

@@ -13,7 +13,7 @@
wxIMPLEMENT_DYNAMIC_CLASS(wxZRColaUTF16CharValidator, wxValidator); wxIMPLEMENT_DYNAMIC_CLASS(wxZRColaUTF16CharValidator, wxValidator);
wxZRColaUTF16CharValidator::wxZRColaUTF16CharValidator(wchar_t *val) : wxZRColaUTF16CharValidator::wxZRColaUTF16CharValidator(ZRCola::char_t *val) :
m_val(val), m_val(val),
wxValidator() wxValidator()
{ {
@@ -58,11 +58,11 @@ bool wxZRColaUTF16CharValidator::TransferFromWindow()
} }
bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, wchar_t *val_out) bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, ZRCola::char_t *val_out)
{ {
const wxStringCharType *buf = val_in; const wxStringCharType *buf = val_in;
wchar_t chr = 0; ZRCola::char_t chr = 0;
for (size_t i = i_start;;) { for (size_t i = i_start;;) {
if (i >= i_end) { if (i >= i_end) {
// End of Unicode found. // End of Unicode found.
@@ -156,7 +156,7 @@ bool wxZRColaUnicodeDumpValidator::Parse(const wxString &val_in, size_t i_start,
wxString str; wxString str;
for (size_t i = i_start;;) { for (size_t i = i_start;;) {
const wxStringCharType *buf_next; const wxStringCharType *buf_next;
wchar_t chr; ZRCola::char_t chr;
if ((buf_next = wmemchr(buf + i, L'+', i_end - i)) != NULL) { if ((buf_next = wmemchr(buf + i, L'+', i_end - i)) != NULL) {
// Unicode dump separator found. // Unicode dump separator found.
if (!wxZRColaUTF16CharValidator::Parse(val_in, i, buf_next - buf, ctrl, parent, &chr)) if (!wxZRColaUTF16CharValidator::Parse(val_in, i, buf_next - buf, ctrl, parent, &chr))
@@ -202,13 +202,13 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
m_unicode->SetValidator(wxZRColaUnicodeDumpValidator(&m_char)); m_unicode->SetValidator(wxZRColaUnicodeDumpValidator(&m_char));
// Fill categories. // Fill blocks.
auto app = dynamic_cast<ZRColaApp*>(wxTheApp); auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) { for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
const auto &cc = app->m_cc_db.idxRank[i]; const auto &cb = app->m_cb_db.idxFirst[i];
int idx = m_categories->Insert(wxGetTranslation(wxString(cc.name(), cc.name_len()), wxT("ZRCola-zrcdb")), (unsigned int)i); int idx = m_blocks->Insert(wxGetTranslation(wxString(cb.name(), cb.name_len()), wxT("ZRCola-zrcdb")), (unsigned int)i);
m_categories->Check(idx); m_blocks->Check(idx);
m_ccOrder.insert(std::make_pair(cc.cat, idx)); m_cbOrder.insert(std::make_pair(cb.id, idx));
} }
ResetResults(); ResetResults();
@@ -242,7 +242,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
m_gridPreview->SetCellValue(0, 0, m_char); m_gridPreview->SetCellValue(0, 0, m_char);
std::unique_ptr<ZRCola::character_db::character> ch((ZRCola::character_db::character*)new char[sizeof(ZRCola::character_db::character) + sizeof(wchar_t)*m_char.length()]); std::unique_ptr<ZRCola::character_db::character> ch((ZRCola::character_db::character*)new char[sizeof(ZRCola::character_db::character) + sizeof(ZRCola::char_t)*m_char.length()]);
ch->ZRCola::character_db::character::character(m_char.data(), m_char.length()); ch->ZRCola::character_db::character::character(m_char.data(), m_char.length());
ZRCola::character_db::indexChr::size_type ch_start; ZRCola::character_db::indexChr::size_type ch_start;
if (app->m_chr_db.idxChr.find(*ch, ch_start)) { if (app->m_chr_db.idxChr.find(*ch, ch_start)) {
@@ -251,7 +251,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
m_description->SetValue(wxString(chr.desc(), chr.desc_len())); m_description->SetValue(wxString(chr.desc(), chr.desc_len()));
{ {
// See if this character has a key sequence registered. // See if this character has a key sequence registered.
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()]); std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::char_t)*m_char.length()]);
ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, m_char.data(), m_char.length()); ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, m_char.data(), m_char.length());
ZRCola::keyseq_db::indexKey::size_type ks_start; ZRCola::keyseq_db::indexKey::size_type ks_start;
if (app->m_ks_db.idxChr.find(*ks, ks_start)) { if (app->m_ks_db.idxChr.find(*ks, ks_start)) {
@@ -265,26 +265,26 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
m_shortcut->SetValue(wxEmptyString); m_shortcut->SetValue(wxEmptyString);
} }
{ {
// Update character category. // Update character block.
ZRCola::chrcat_db::indexChrCat::size_type cc_start; ZRCola::chrblk_db::indexChrId::size_type cb_start;
if (app->m_cc_db.idxChrCat.find(ZRCola::chrcat_db::chrcat(chr.cat), cc_start)) { if (app->m_cb_db.idxChrId.find(ZRCola::chrblk_db::chrblk(chr.blk), cb_start)) {
const auto &cat = app->m_cc_db.idxChrCat[cc_start]; const auto &blk = app->m_cb_db.idxChrId[cb_start];
m_category->SetValue(wxGetTranslation(wxString(cat.name(), cat.name_len()), wxT("ZRCola-zrcdb"))); m_block->SetValue(wxGetTranslation(wxString(blk.name(), blk.name_len()), wxT("ZRCola-zrcdb")));
} else } else
m_category->SetValue(wxEmptyString); m_block->SetValue(wxEmptyString);
} }
// Update related characters. // Update related characters.
m_gridRelated->SetCharacters(wxString(chr.rel(), chr.rel_end())); m_gridRelated->SetCharacters(wxString(chr.rel(), chr.rel_end()));
} else { } else {
m_description->SetValue(wxEmptyString); m_description->SetValue(wxEmptyString);
m_shortcut->SetValue(wxEmptyString); m_shortcut->SetValue(wxEmptyString);
m_category->SetValue(wxEmptyString); m_block->SetValue(wxEmptyString);
m_gridRelated->ClearGrid(); m_gridRelated->ClearGrid();
} }
// Find character tags. // Find character tags.
std::list<std::wstring> tag_names; std::list<std::wstring> tag_names;
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()]); std::unique_ptr<ZRCola::chrtag_db::chrtag> ct((ZRCola::chrtag_db::chrtag*)new char[sizeof(ZRCola::chrtag_db::chrtag) + sizeof(ZRCola::char_t)*m_char.length()]);
ct->ZRCola::chrtag_db::chrtag::chrtag(m_char.data(), m_char.length()); ct->ZRCola::chrtag_db::chrtag::chrtag(m_char.data(), m_char.length());
ZRCola::chrtag_db::indexChr::size_type ct_start, ct_end; ZRCola::chrtag_db::indexChr::size_type ct_start, ct_end;
if (app->m_ct_db.idxChr.find(*ct, ct_start, ct_end)) { if (app->m_ct_db.idxChr.find(*ct, ct_start, ct_end)) {
@@ -301,7 +301,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
// Add name to the list. // Add name to the list.
tag_names.push_back(std::wstring(tn.name(), tn.name_end())); tag_names.push_back(std::wstring(tn.name(), tn.name_end()));
break; 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(), (uint16_t)name->length(), tn.name(), tn.name_len()) == 0)
// Name is already on the list. // Name is already on the list.
break; break;
} }
@@ -340,11 +340,11 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
m_searchThread->m_search.assign(val.c_str(), val.Length()); m_searchThread->m_search.assign(val.c_str(), val.Length());
// Select categories. // Select blocks.
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) { for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
const auto &cc = app->m_cc_db.idxRank[i]; const auto &cb = app->m_cb_db.idxFirst[i];
if (m_categories->IsChecked((unsigned int)i)) if (m_blocks->IsChecked((unsigned int)i))
m_searchThread->m_cats.insert(cc.cat); m_searchThread->m_blks.insert(cb.id);
} }
if (m_searchThread->Run() != wxTHREAD_NO_ERROR) { if (m_searchThread->Run() != wxTHREAD_NO_ERROR) {
@@ -384,43 +384,43 @@ void wxZRColaCharSelect::OnSearchMore(wxHyperlinkEvent& event)
} }
void wxZRColaCharSelect::OnCategoriesAll(wxHyperlinkEvent& event) void wxZRColaCharSelect::OnBlocksAll(wxHyperlinkEvent& event)
{ {
event.StopPropagation(); event.StopPropagation();
auto app = dynamic_cast<ZRColaApp*>(wxTheApp); auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++)
m_categories->Check((unsigned int)i, true); m_blocks->Check((unsigned int)i, true);
m_searchChanged = true; m_searchChanged = true;
} }
void wxZRColaCharSelect::OnCategoriesNone(wxHyperlinkEvent& event) void wxZRColaCharSelect::OnBlocksNone(wxHyperlinkEvent& event)
{ {
event.StopPropagation(); event.StopPropagation();
auto app = dynamic_cast<ZRColaApp*>(wxTheApp); auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++)
m_categories->Check((unsigned int)i, false); m_blocks->Check((unsigned int)i, false);
m_searchChanged = true; m_searchChanged = true;
} }
void wxZRColaCharSelect::OnCategoriesInvert(wxHyperlinkEvent& event) void wxZRColaCharSelect::OnBlocksInvert(wxHyperlinkEvent& event)
{ {
event.StopPropagation(); event.StopPropagation();
auto app = dynamic_cast<ZRColaApp*>(wxTheApp); auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++)
m_categories->Check((unsigned int)i, !m_categories->IsChecked((unsigned int)i)); m_blocks->Check((unsigned int)i, !m_blocks->IsChecked((unsigned int)i));
m_searchChanged = true; m_searchChanged = true;
} }
void wxZRColaCharSelect::OnCategoriesToggle(wxCommandEvent& event) void wxZRColaCharSelect::OnBlocksToggle(wxCommandEvent& event)
{ {
event.Skip(); event.Skip();
@@ -625,8 +625,8 @@ void wxZRColaCharSelect::ResetResults()
val.reserve(n); val.reserve(n);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
const auto &chr = app->m_chr_db.idxChr[i]; const auto &chr = app->m_chr_db.idxChr[i];
auto idx = m_ccOrder.find(chr.cat); auto idx = m_cbOrder.find(chr.blk);
if (idx == m_ccOrder.end() || m_categories->IsChecked(idx->second)) if (idx == m_cbOrder.end() || m_blocks->IsChecked(idx->second))
val.Add(wxString(chr.chr(), chr.chr_len())); val.Add(wxString(chr.chr(), chr.chr_len()));
} }
m_gridResults->SetCharacters(val); m_gridResults->SetCharacters(val);
@@ -718,15 +718,15 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
{ {
// Search by tags: Get tags with given names. Then, get characters of found tags. // Search by tags: Get tags with given names. Then, get characters of found tags.
std::map<ZRCola::tagid_t, unsigned __int16> hits_tag; std::map<ZRCola::tagid_t, uint16_t> hits_tag;
if (!app->m_tn_db.Search(m_search.c_str(), m_parent->m_locale, hits_tag, TestDestroyS, this)) return (wxThread::ExitCode)1; if (!app->m_tn_db.Search(m_search.c_str(), m_parent->m_locale, hits_tag, TestDestroyS, this)) return (wxThread::ExitCode)1;
if (!app->m_ct_db.Search(hits_tag, app->m_chr_db, m_cats, hits, TestDestroyS, this)) return (wxThread::ExitCode)1; if (!app->m_ct_db.Search(hits_tag, app->m_chr_db, m_blks, hits, TestDestroyS, this)) return (wxThread::ExitCode)1;
} }
{ {
// Search by description and merge results. // Search by description and merge results.
std::map<std::wstring, 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; if (!app->m_chr_db.Search(m_search.c_str(), m_blks, hits, hits_sub, TestDestroyS, this)) return (wxThread::ExitCode)1;
for (auto i = hits_sub.cbegin(), i_end = hits_sub.cend(); i != i_end; ++i) { for (auto i = hits_sub.cbegin(), i_end = hits_sub.cend(); i != i_end; ++i) {
if (TestDestroy()) return (wxThread::ExitCode)1; if (TestDestroy()) return (wxThread::ExitCode)1;
auto idx = hits.find(i->first); auto idx = hits.find(i->first);
@@ -766,14 +766,14 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
int __cdecl wxZRColaCharSelect::SearchThread::CompareHits(const void *a, const void *b) int __cdecl wxZRColaCharSelect::SearchThread::CompareHits(const void *a, const void *b)
{ {
const std::pair<ZRCola::charrank_t, wchar_t> *_a = (const std::pair<ZRCola::charrank_t, wchar_t>*)a; const std::pair<ZRCola::charrank_t, ZRCola::char_t> *_a = (const std::pair<ZRCola::charrank_t, ZRCola::char_t>*)a;
const std::pair<ZRCola::charrank_t, wchar_t> *_b = (const std::pair<ZRCola::charrank_t, wchar_t>*)b; const std::pair<ZRCola::charrank_t, ZRCola::char_t> *_b = (const std::pair<ZRCola::charrank_t, ZRCola::char_t>*)b;
if (_a->first > _b->first) return -1; if (_a->first > _b->first) return -1;
else if (_a->first < _b->first) return 1; if (_a->first < _b->first) return 1;
if (_a->second < _b->second) return -1; if (_a->second < _b->second) return -1;
else if (_a->second > _b->second) return 1; if (_a->second > _b->second) return 1;
return 0; return 0;
} }
@@ -820,11 +820,9 @@ void wxPersistentZRColaCharSelect::Save() const
SaveValue(wxT("recentChars" ), str ); // Save in legacy format for backward compatibility. SaveValue(wxT("recentChars" ), str ); // Save in legacy format for backward compatibility.
SaveValue(wxT("recentChars2"), str2); // Save in native format SaveValue(wxT("recentChars2"), str2); // Save in native format
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) { for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
const auto &cc = app->m_cc_db.idxRank[i]; const auto &cb = app->m_cb_db.idxFirst[i];
wxString name(wxT("category")); SaveValue(wxString::Format(wxT("block%u"), cb.id), wnd->m_blocks->IsChecked((unsigned int)i));
name.Append(cc.cat.data, _countof(cc.cat.data));
SaveValue(name, wnd->m_categories->IsChecked((unsigned int)i));
} }
SaveValue(wxT("searchPanel"), wnd->m_search_panel->IsShown()); SaveValue(wxT("searchPanel"), wnd->m_search_panel->IsShown());
@@ -843,7 +841,7 @@ bool wxPersistentZRColaCharSelect::Restore()
for (wxStringTokenizer tok(str, wxT("|")); tok.HasMoreTokens(); ) { for (wxStringTokenizer tok(str, wxT("|")); tok.HasMoreTokens(); ) {
wxString chr; wxString chr;
for (wxStringTokenizer tok_chr(tok.GetNextToken(), wxT("+")); tok_chr.HasMoreTokens(); ) for (wxStringTokenizer tok_chr(tok.GetNextToken(), wxT("+")); tok_chr.HasMoreTokens(); )
chr += (wchar_t)_tcstoul(tok_chr.GetNextToken().c_str(), NULL, 16); chr += (ZRCola::char_t)_tcstoul(tok_chr.GetNextToken().c_str(), NULL, 16);
val.Add(chr); val.Add(chr);
} }
wnd->m_gridRecent->SetCharacters(val); wnd->m_gridRecent->SetCharacters(val);
@@ -855,13 +853,11 @@ bool wxPersistentZRColaCharSelect::Restore()
wnd->m_gridRecent->SetCharacters(val); wnd->m_gridRecent->SetCharacters(val);
} }
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) { for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
const auto &cc = app->m_cc_db.idxRank[i]; const auto &cb = app->m_cb_db.idxFirst[i];
wxString name(wxT("category"));
name.Append(cc.cat.data, _countof(cc.cat.data));
bool val; bool val;
if (RestoreValue(name, &val)) if (RestoreValue(wxString::Format(wxT("block%u"), cb.id), &val))
wnd->m_categories->Check((unsigned int)i, val); wnd->m_blocks->Check((unsigned int)i, val);
} }
bool search_panel; bool search_panel;

View File

@@ -40,7 +40,7 @@ public:
/// ///
/// Construct the validator with a value to store data /// Construct the validator with a value to store data
/// ///
wxZRColaUTF16CharValidator(wchar_t *val = NULL); wxZRColaUTF16CharValidator(ZRCola::char_t *val = NULL);
/// ///
/// Copies this validator /// Copies this validator
@@ -140,10 +140,10 @@ protected:
virtual void OnIdle(wxIdleEvent& event); virtual void OnIdle(wxIdleEvent& event);
virtual void OnSearchText(wxCommandEvent& event); virtual void OnSearchText(wxCommandEvent& event);
virtual void OnSearchMore(wxHyperlinkEvent& event); virtual void OnSearchMore(wxHyperlinkEvent& event);
virtual void OnCategoriesAll(wxHyperlinkEvent& event); virtual void OnBlocksAll(wxHyperlinkEvent& event);
virtual void OnCategoriesNone(wxHyperlinkEvent& event); virtual void OnBlocksNone(wxHyperlinkEvent& event);
virtual void OnCategoriesInvert(wxHyperlinkEvent& event); virtual void OnBlocksInvert(wxHyperlinkEvent& event);
virtual void OnCategoriesToggle(wxCommandEvent& event); virtual void OnBlocksToggle(wxCommandEvent& event);
void OnSearchComplete(wxThreadEvent& event); void OnSearchComplete(wxThreadEvent& event);
virtual void OnResultSelectCell(wxGridEvent& event); virtual void OnResultSelectCell(wxGridEvent& event);
virtual void OnResultCellDClick(wxGridEvent& event); virtual void OnResultCellDClick(wxGridEvent& event);
@@ -168,8 +168,8 @@ public:
protected: protected:
LCID m_locale; ///< Locale for tag lookup LCID m_locale; ///< Locale for tag lookup
bool m_searchChanged; ///< Did Search field or category selection change? bool m_searchChanged; ///< Did Search field or block selection change?
std::map<ZRCola::chrcatid_t, int> m_ccOrder; ///< Character category order std::map<ZRCola::chrblkid_t, int> m_cbOrder; ///< Character block order
bool m_unicodeChanged; ///< Did Unicode field change? bool m_unicodeChanged; ///< Did Unicode field change?
@@ -188,7 +188,7 @@ protected:
public: public:
std::wstring m_search; ///< Search phrase std::wstring m_search; ///< Search phrase
std::set<ZRCola::chrcatid_t> m_cats; ///< Search categories std::set<ZRCola::chrblkid_t> m_blks; ///< Search blocks
std::vector<std::pair<ZRCola::charrank_t, std::wstring> > m_hits; ///< Search results std::vector<std::pair<ZRCola::charrank_t, std::wstring> > m_hits; ///< Search results
protected: protected:

View File

@@ -49,7 +49,7 @@ void wxZRColaComposerPanel::RestoreFromStateFile()
wxFFile file(fileName, wxT("rb")); wxFFile file(fileName, wxT("rb"));
if (file.IsOpened()) { if (file.IsOpened()) {
// Load source text. // Load source text.
unsigned __int64 n; uint64_t n;
file.Read(&n, sizeof(n)); file.Read(&n, sizeof(n));
if (!file.Error()) { if (!file.Error()) {
wxString source; wxString source;
@@ -98,9 +98,11 @@ void wxZRColaComposerPanel::SynchronizePanels()
// ZRCola decompose first, then re-compose. // ZRCola decompose first, then re-compose.
app->m_t_db.TranslateInv(app->m_mainWnd->m_composition_id, dst.data(), dst.size(), dst2, &map); app->m_t_db.TranslateInv(app->m_mainWnd->m_composition_id, dst.data(), dst.size(), dst2, &map);
m_mapping.push_back(std::move(map)); m_mapping.push_back(std::move(map));
map.clear();
app->m_t_db.Translate(app->m_mainWnd->m_composition_id, dst2.data(), dst2.size(), dst, &map); app->m_t_db.Translate(app->m_mainWnd->m_composition_id, dst2.data(), dst2.size(), dst, &map);
m_mapping.push_back(std::move(map)); m_mapping.push_back(std::move(map));
map.clear();
} }
// Other translations // Other translations
@@ -109,7 +111,9 @@ void wxZRColaComposerPanel::SynchronizePanels()
for (auto s = sets_begin; s != sets_end; ++s) { for (auto s = sets_begin; s != sets_end; ++s) {
app->m_t_db.Translate(*s, dst.data(), dst.size(), dst2, &map); app->m_t_db.Translate(*s, dst.data(), dst.size(), dst2, &map);
m_mapping.push_back(std::move(map)); m_mapping.push_back(std::move(map));
map.clear();
dst = std::move(dst2); dst = std::move(dst2);
dst2.clear();
} }
m_source->GetSelection(&m_selSource.first, &m_selSource.second); m_source->GetSelection(&m_selSource.first, &m_selSource.second);
@@ -144,18 +148,24 @@ void wxZRColaComposerPanel::SynchronizePanels()
for (auto s = sets_end; (s--) != sets_begin;) { for (auto s = sets_end; (s--) != sets_begin;) {
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), dst2, &map); app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), dst2, &map);
dst = std::move(dst2); dst = std::move(dst2);
dst2.clear();
map.invert(); for (auto& m : map)
m.invert();
m_mapping.push_back(std::move(map)); m_mapping.push_back(std::move(map));
map.clear();
} }
if (app->m_mainWnd->m_composition) { if (app->m_mainWnd->m_composition) {
// ZRCola decompose. // ZRCola decompose.
app->m_t_db.TranslateInv(app->m_mainWnd->m_composition_id, dst.data(), dst.size(), &app->m_lc_db, app->m_mainWnd->m_settings->m_lang, dst2, &map); app->m_t_db.TranslateInv(app->m_mainWnd->m_composition_id, dst.data(), dst.size(), &app->m_lc_db, app->m_mainWnd->m_settings->m_lang, dst2, &map);
dst = std::move(dst2); dst = std::move(dst2);
dst2.clear();
map.invert(); for (auto& m : map)
m.invert();
m_mapping.push_back(std::move(map)); m_mapping.push_back(std::move(map));
map.clear();
} }
m_destination->GetSelection(&m_selDestination.first, &m_selDestination.second); m_destination->GetSelection(&m_selDestination.first, &m_selDestination.second);
@@ -195,16 +205,16 @@ void wxZRColaComposerPanel::OnSourcePaint(wxPaintEvent& event)
m_selSource.second = to; m_selSource.second = to;
m_sourceHex->SetSelection( m_sourceHex->SetSelection(
m_selSourceHex.first = (long)m_mappingSourceHex.to_dst(from), m_selSourceHex.first = (long)stdex::src2dst<size_t>(m_mappingSourceHex, from),
m_selSourceHex.second = (long)m_mappingSourceHex.to_dst(to )); m_selSourceHex.second = (long)stdex::src2dst<size_t>(m_mappingSourceHex, to ));
m_destination->SetSelection( m_destination->SetSelection(
m_selDestination.first = (long)MapToDestination(from), m_selDestination.first = (long)MapToDestination(from),
m_selDestination.second = (long)MapToDestination(to )); m_selDestination.second = (long)MapToDestination(to ));
m_destinationHex->SetSelection( m_destinationHex->SetSelection(
m_selDestinationHex.first = (long)m_mappingDestinationHex.to_dst(m_selDestination.first ), m_selDestinationHex.first = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.first ),
m_selDestinationHex.second = (long)m_mappingDestinationHex.to_dst(m_selDestination.second)); m_selDestinationHex.second = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.second));
} }
} }
@@ -222,16 +232,16 @@ void wxZRColaComposerPanel::OnSourceHexPaint(wxPaintEvent& event)
m_selSourceHex.second = to; m_selSourceHex.second = to;
m_source->SetSelection( m_source->SetSelection(
m_selSource.first = (long)m_mappingSourceHex.to_src(from), m_selSource.first = (long)stdex::dst2src<size_t>(m_mappingSourceHex, from),
m_selSource.second = (long)m_mappingSourceHex.to_src(to )); m_selSource.second = (long)stdex::dst2src<size_t>(m_mappingSourceHex, to ));
m_destination->SetSelection( m_destination->SetSelection(
m_selDestination.first = (long)MapToDestination(m_selSource.first ), m_selDestination.first = (long)MapToDestination(m_selSource.first ),
m_selDestination.second = (long)MapToDestination(m_selSource.second)); m_selDestination.second = (long)MapToDestination(m_selSource.second));
m_destinationHex->SetSelection( m_destinationHex->SetSelection(
m_selDestinationHex.first = (long)m_mappingDestinationHex.to_dst(m_selDestination.first ), m_selDestinationHex.first = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.first ),
m_selDestinationHex.second = (long)m_mappingDestinationHex.to_dst(m_selDestination.second)); m_selDestinationHex.second = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.second));
} }
} }
@@ -268,16 +278,16 @@ void wxZRColaComposerPanel::OnDestinationPaint(wxPaintEvent& event)
m_selDestination.second = to; m_selDestination.second = to;
m_destinationHex->SetSelection( m_destinationHex->SetSelection(
m_selDestinationHex.first = (long)m_mappingDestinationHex.to_dst(from), m_selDestinationHex.first = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, from),
m_selDestinationHex.second = (long)m_mappingDestinationHex.to_dst(to )); m_selDestinationHex.second = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, to ));
m_source->SetSelection( m_source->SetSelection(
m_selSource.first = (long)MapToSource(from), m_selSource.first = (long)MapToSource(from),
m_selSource.second = (long)MapToSource(to )); m_selSource.second = (long)MapToSource(to ));
m_sourceHex->SetSelection( m_sourceHex->SetSelection(
m_selSourceHex.first = (long)m_mappingSourceHex.to_dst(m_selSource.first ), m_selSourceHex.first = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.first ),
m_selSourceHex.second = (long)m_mappingSourceHex.to_dst(m_selSource.second)); m_selSourceHex.second = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.second));
} }
} }
@@ -295,16 +305,16 @@ void wxZRColaComposerPanel::OnDestinationHexPaint(wxPaintEvent& event)
m_selDestinationHex.second = to; m_selDestinationHex.second = to;
m_destination->SetSelection( m_destination->SetSelection(
m_selDestination.first = (long)m_mappingDestinationHex.to_src(from), m_selDestination.first = (long)stdex::dst2src<size_t>(m_mappingDestinationHex, from),
m_selDestination.second = (long)m_mappingDestinationHex.to_src(to )); m_selDestination.second = (long)stdex::dst2src<size_t>(m_mappingDestinationHex, to ));
m_source->SetSelection( m_source->SetSelection(
m_selSource.first = (long)MapToSource(m_selDestination.first ), m_selSource.first = (long)MapToSource(m_selDestination.first ),
m_selSource.second = (long)MapToSource(m_selDestination.second)); m_selSource.second = (long)MapToSource(m_selDestination.second));
m_sourceHex->SetSelection( m_sourceHex->SetSelection(
m_selSourceHex.first = (long)m_mappingSourceHex.to_dst(m_selSource.first ), m_selSourceHex.first = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.first ),
m_selSourceHex.second = (long)m_mappingSourceHex.to_dst(m_selSource.second)); m_selSourceHex.second = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.second));
} }
} }
@@ -408,8 +418,8 @@ void wxZRColaComposerPanel::SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &
wnd->SetValue(hex); wnd->SetValue(hex);
wnd->SetSelection( wnd->SetSelection(
range.first = (long)mapping.to_dst(from), range.first = (long)stdex::src2dst<size_t>(mapping, from),
range.second = (long)mapping.to_dst(to )); range.second = (long)stdex::src2dst<size_t>(mapping, to ));
} }

View File

@@ -97,7 +97,7 @@ protected:
inline size_t wxZRColaComposerPanel::MapToDestination(_In_ size_t src) const 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) for (auto m = m_mapping.cbegin(), m_end = m_mapping.cend(); m != m_end; ++m)
src = m->to_dst(src); src = stdex::src2dst(*m, src);
return src; return src;
} }
@@ -106,7 +106,7 @@ inline size_t wxZRColaComposerPanel::MapToDestination(_In_ size_t src) const
inline size_t wxZRColaComposerPanel::MapToSource(_In_ size_t dst) const 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) for (auto m = m_mapping.crbegin(), m_end = m_mapping.crend(); m != m_end; ++m)
dst = m->to_src(dst); dst = stdex::dst2src(*m, dst);
return dst; return dst;
} }

View File

@@ -69,14 +69,6 @@ wxZRColaFrame::wxZRColaFrame() :
m_transeq(NULL), m_transeq(NULL),
wxZRColaFrameBase(NULL) wxZRColaFrameBase(NULL)
{ {
{
// wxFrameBuilder 3.5 does not support wxAUI_TB_HORIZONTAL flag. Add it manually.
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTranslate);
paneInfo.LeftDockable(false);
paneInfo.RightDockable(false);
m_toolbarTranslate->SetWindowStyleFlag(m_toolbarTranslate->GetWindowStyleFlag() | wxAUI_TB_HORIZONTAL);
}
// Populate list of translation sequences. // Populate list of translation sequences.
auto app = dynamic_cast<ZRColaApp*>(wxTheApp); auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
m_toolTranslationSeq->Clear(); m_toolTranslationSeq->Clear();

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018) // C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@@ -30,7 +30,7 @@ delete old;
static wxFBContextSensitiveHelpSetter s_wxFBSetTheHelpProvider; static wxFBContextSensitiveHelpSetter s_wxFBSetTheHelpProvider;
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, long style, const wxString& name ) : wxFrame( parent, id, title, pos, parent->FromDIP(wxSize(600, 400)), style, name ) wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, long style, const wxString& name ) : wxFrame( parent, id, title, pos, parent->FromDIP(wxSize(640, 480)), style, name )
{ {
this->SetSizeHints( FromDIP(wxSize( 150,150 )), wxDefaultSize ); this->SetSizeHints( FromDIP(wxSize( 150,150 )), wxDefaultSize );
m_mgr.SetManagedWindow(this); m_mgr.SetManagedWindow(this);
@@ -48,27 +48,27 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
wxMenuItem* m_menuItemEditCut; wxMenuItem* m_menuItemEditCut;
m_menuItemEditCut = new wxMenuItem( m_menuEdit, wxID_CUT, wxString( wxEmptyString ) , wxEmptyString, wxITEM_NORMAL ); m_menuItemEditCut = new wxMenuItem( m_menuEdit, wxID_CUT, wxString( wxEmptyString ) , wxEmptyString, wxITEM_NORMAL );
#ifdef __WXMSW__ #ifdef __WXMSW__
m_menuItemEditCut->SetBitmaps( wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemEditCut->SetBitmaps( wxIconEx( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemEditCut->SetBitmap( wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemEditCut->SetBitmap( wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemEditCut ); m_menuEdit->Append( m_menuItemEditCut );
wxMenuItem* m_menuItemEditCopy; wxMenuItem* m_menuItemEditCopy;
m_menuItemEditCopy = new wxMenuItem( m_menuEdit, wxID_COPY, wxString( wxEmptyString ) , wxEmptyString, wxITEM_NORMAL ); m_menuItemEditCopy = new wxMenuItem( m_menuEdit, wxID_COPY, wxString( wxEmptyString ) , wxEmptyString, wxITEM_NORMAL );
#ifdef __WXMSW__ #ifdef __WXMSW__
m_menuItemEditCopy->SetBitmaps( wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemEditCopy->SetBitmaps( wxIconEx( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemEditCopy->SetBitmap( wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemEditCopy->SetBitmap( wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemEditCopy ); m_menuEdit->Append( m_menuItemEditCopy );
wxMenuItem* m_menuItemEditPaste; wxMenuItem* m_menuItemEditPaste;
m_menuItemEditPaste = new wxMenuItem( m_menuEdit, wxID_PASTE, wxString( wxEmptyString ) , wxEmptyString, wxITEM_NORMAL ); m_menuItemEditPaste = new wxMenuItem( m_menuEdit, wxID_PASTE, wxString( wxEmptyString ) , wxEmptyString, wxITEM_NORMAL );
#ifdef __WXMSW__ #ifdef __WXMSW__
m_menuItemEditPaste->SetBitmaps( wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemEditPaste->SetBitmaps( wxIconEx( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemEditPaste->SetBitmap( wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemEditPaste->SetBitmap( wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemEditPaste ); m_menuEdit->Append( m_menuItemEditPaste );
@@ -89,45 +89,45 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
wxMenuItem* m_menuItemSendDestination; 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 ); 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__ #ifdef __WXMSW__
m_menuItemSendDestination->SetBitmaps( wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemSendDestination->SetBitmaps( wxIconEx( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemSendDestination->SetBitmap( wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemSendDestination->SetBitmap( wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemSendDestination ); m_menuEdit->Append( m_menuItemSendDestination );
wxMenuItem* m_menuItemCopyDestinationAndReturn; 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 ); 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__ #ifdef __WXMSW__
m_menuItemCopyDestinationAndReturn->SetBitmaps( wxIcon( wxT("copy_destination_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemCopyDestinationAndReturn->SetBitmaps( wxIconEx( wxT("copy_destination_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemCopyDestinationAndReturn->SetBitmap( wxIcon( wxT("copy_destination_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemCopyDestinationAndReturn->SetBitmap( wxIcon( wxT("copy_destination_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemCopyDestinationAndReturn ); m_menuEdit->Append( m_menuItemCopyDestinationAndReturn );
wxMenuItem* m_menuItemSendSource; 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 ); 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__ #ifdef __WXMSW__
m_menuItemSendSource->SetBitmaps( wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemSendSource->SetBitmaps( wxIconEx( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemSendSource->SetBitmap( wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemSendSource->SetBitmap( wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemSendSource ); m_menuEdit->Append( m_menuItemSendSource );
wxMenuItem* m_menuItemCopySourceAndReturn; 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 ); 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__ #ifdef __WXMSW__
m_menuItemCopySourceAndReturn->SetBitmaps( wxIcon( wxT("copy_source_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemCopySourceAndReturn->SetBitmaps( wxIconEx( wxT("copy_source_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemCopySourceAndReturn->SetBitmap( wxIcon( wxT("copy_source_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemCopySourceAndReturn->SetBitmap( wxIcon( wxT("copy_source_and_return.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16 ) );
#endif #endif
m_menuEdit->Append( m_menuItemCopySourceAndReturn ); m_menuEdit->Append( m_menuItemCopySourceAndReturn );
wxMenuItem* m_menuItemSendAbort; 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 ); 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 );
#ifdef __WXMSW__ #ifdef __WXMSW__
m_menuItemSendAbort->SetBitmaps( wxIcon( wxT("send_abort.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemSendAbort->SetBitmaps( wxIconEx( wxT("send_abort.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) #elif (defined( __WXGTK__ ) || defined( __WXOSX__ ))
m_menuItemSendAbort->SetBitmap( wxIcon( wxT("send_abort.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(16), FromDIP(16) ) ); m_menuItemSendAbort->SetBitmap( wxIconEx( wxT("send_abort.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16, this ) );
#endif #endif
m_menuEdit->Append( m_menuItemSendAbort ); m_menuEdit->Append( m_menuItemSendAbort );
@@ -211,21 +211,21 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
this->SetMenuBar( m_menubar ); this->SetMenuBar( m_menubar );
m_toolbarEdit = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT ); m_toolbarEdit = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT );
m_toolEditCut = m_toolbarEdit->AddTool( wxID_CUT, _("Cut"), wxIcon( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_NORMAL, _("Cut"), _("Cut selection"), NULL ); m_toolEditCut = m_toolbarEdit->AddTool( wxID_CUT, _("Cut"), wxIconEx( wxT("edit_cut.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_NORMAL, _("Cut"), _("Cut selection"), NULL );
m_toolEditCopy = m_toolbarEdit->AddTool( wxID_COPY, _("Copy"), wxIcon( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_NORMAL, _("Copy"), _("Copy selection"), NULL ); m_toolEditCopy = m_toolbarEdit->AddTool( wxID_COPY, _("Copy"), wxIconEx( wxT("edit_copy.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_NORMAL, _("Copy"), _("Copy selection"), NULL );
m_toolEditPaste = m_toolbarEdit->AddTool( wxID_PASTE, _("Paste"), wxIcon( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_NORMAL, _("Paste"), _("Paste selection"), NULL ); m_toolEditPaste = m_toolbarEdit->AddTool( wxID_PASTE, _("Paste"), wxIconEx( wxT("edit_paste.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_NORMAL, _("Paste"), _("Paste selection"), NULL );
m_toolbarEdit->Realize(); 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_mgr.AddPane( m_toolbarEdit, wxAuiPaneInfo() .Name( wxT("toolbarEdit") ).Top() .Caption( _("Edit") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Layer( 1 ).ToolbarPane() );
m_toolbarTranslate = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT ); m_toolbarTranslate = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORIZONTAL|wxAUI_TB_HORZ_LAYOUT );
m_toolCharSelect = m_toolbarTranslate->AddTool( wxID_CHARACTER_SELECTOR, _("Find Character"), wxIcon( wxT("char_select.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_CHECK, _("Find Character"), _("Toggle character search to select character to insert into text"), NULL ); m_toolCharSelect = m_toolbarTranslate->AddTool( wxID_CHARACTER_SELECTOR, _("Find Character"), wxIconEx( wxT("char_select.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_CHECK, _("Find Character"), _("Toggle character search to select character to insert into text"), NULL );
m_toolSendDestination = m_toolbarTranslate->AddTool( wxID_SEND_DESTINATION, _("Send Composed"), wxIcon( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Send composed text to source window"), NULL ); m_toolSendDestination = m_toolbarTranslate->AddTool( wxID_SEND_DESTINATION, _("Send Composed"), wxIconEx( wxT("send_destination.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_NORMAL, _("Send Composed"), _("Send composed text to source window"), NULL );
m_toolSendSource = m_toolbarTranslate->AddTool( wxID_SEND_SOURCE, _("Send Decomposed"), wxIcon( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_NORMAL, _("Send Decomposed"), _("Send decomposed text to source window"), NULL ); m_toolSendSource = m_toolbarTranslate->AddTool( wxID_SEND_SOURCE, _("Send Decomposed"), wxIconEx( wxT("send_source.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_NORMAL, _("Send Decomposed"), _("Send decomposed text to source window"), NULL );
m_toolbarTranslate->AddSeparator(); m_toolbarTranslate->AddSeparator();
@@ -235,15 +235,15 @@ wxZRColaFrameBase::wxZRColaFrameBase( wxWindow* parent, wxWindowID id, const wxS
m_toolComposition->SetSelection( 0 ); m_toolComposition->SetSelection( 0 );
m_toolbarTranslate->AddControl( m_toolComposition ); m_toolbarTranslate->AddControl( m_toolComposition );
wxArrayString m_toolTranslationSeqChoices; wxArrayString m_toolTranslationSeqChoices;
m_toolTranslationSeq = new wxChoice( m_toolbarTranslate, wxID_ANY, wxDefaultPosition, FromDIP(wxSize( 180,-1 )), m_toolTranslationSeqChoices, 0 ); m_toolTranslationSeq = new wxChoice( m_toolbarTranslate, wxID_ANY, wxDefaultPosition, FromDIP(wxSize( 200,-1 )), m_toolTranslationSeqChoices, 0 );
m_toolTranslationSeq->SetSelection( 0 ); m_toolTranslationSeq->SetSelection( 0 );
m_toolbarTranslate->AddControl( m_toolTranslationSeq ); m_toolbarTranslate->AddControl( m_toolTranslationSeq );
m_toolbarTranslate->AddSeparator(); m_toolbarTranslate->AddSeparator();
m_toolWarnPUA = m_toolbarTranslate->AddTool( wxID_WARN_PUA, _("PUA Warning"), wxIcon( wxT("warn_pua.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(24), FromDIP(24) ), wxNullBitmap, wxITEM_CHECK, _("Highlight Private Use Area Characters"), _("Highlight Private Use Area Characters"), NULL ); m_toolWarnPUA = m_toolbarTranslate->AddTool( wxID_WARN_PUA, _("PUA Warning"), wxIconEx( wxT("warn_pua.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24, this ), wxNullBitmap, wxITEM_CHECK, _("Highlight Private Use Area Characters"), _("Highlight Private Use Area Characters"), NULL );
m_toolbarTranslate->Realize(); 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_mgr.AddPane( m_toolbarTranslate, wxAuiPaneInfo() .Name( wxT("toolbarCompose") ).Top() .Caption( _("Compose") ).PinButton( true ).Dock().Resizable().FloatingSize( wxSize( -1,-1 ) ).LeftDockable( false ).RightDockable( false ).Layer( 1 ).ToolbarPane() );
m_panelChrCat = new wxZRColaCharacterCatalogPanel( this ); m_panelChrCat = new wxZRColaCharacterCatalogPanel( this );
@@ -382,7 +382,7 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
this->SetSizer( bSizerMain ); this->SetSizer( bSizerMain );
this->Layout(); this->Layout();
bSizerMain->Fit( this ); bSizerMain->Fit( this );
m_timerSave.SetOwner( this, wxID_TIMER_SAVE ); m_timerSave.SetOwner( this, m_timerSave.GetId() );
// Connect Events // Connect Events
m_source->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourcePaint ), NULL, this ); m_source->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnSourcePaint ), NULL, this );
@@ -391,7 +391,7 @@ wxZRColaComposerPanelBase::wxZRColaComposerPanelBase( wxWindow* parent, wxWindow
m_destination->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationPaint ), 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_destination->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDestinationText ), NULL, this );
m_destinationHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this ); m_destinationHex->Connect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this );
this->Connect( wxID_TIMER_SAVE, wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) ); this->Connect( m_timerSave.GetId(), wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) );
} }
wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase() wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase()
@@ -403,7 +403,7 @@ wxZRColaComposerPanelBase::~wxZRColaComposerPanelBase()
m_destination->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationPaint ), 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_destination->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaComposerPanelBase::OnDestinationText ), NULL, this );
m_destinationHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this ); m_destinationHex->Disconnect( wxEVT_PAINT, wxPaintEventHandler( wxZRColaComposerPanelBase::OnDestinationHexPaint ), NULL, this );
this->Disconnect( wxID_TIMER_SAVE, wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) ); this->Disconnect( m_timerSave.GetId(), wxEVT_TIMER, wxTimerEventHandler( wxZRColaComposerPanelBase::OnSaveTimer ) );
} }
@@ -512,32 +512,32 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id,
wxBoxSizer* sbSizerSearch; wxBoxSizer* sbSizerSearch;
sbSizerSearch = new wxBoxSizer( wxVERTICAL ); sbSizerSearch = new wxBoxSizer( wxVERTICAL );
wxArrayString m_categoriesChoices; wxArrayString m_blocksChoices;
m_categories = new wxCheckListBox( m_search_panel, wxID_ANY, wxDefaultPosition, FromDIP(wxSize( -1,60 )), m_categoriesChoices, 0 ); m_blocks = new wxCheckListBox( m_search_panel, wxID_ANY, wxDefaultPosition, FromDIP(wxSize( -1,60 )), m_blocksChoices, 0 );
m_categories->SetToolTip( _("List of Unicode character categories to search in") ); m_blocks->SetToolTip( _("List of Unicode character blocks to search in") );
sbSizerSearch->Add( m_categories, 0, wxALL|wxEXPAND, FromDIP(5) ); sbSizerSearch->Add( m_blocks, 0, wxALL|wxEXPAND, FromDIP(5) );
wxBoxSizer* bSizerCategoriesCtrl; wxBoxSizer* bSizerBlocksCtrl;
bSizerCategoriesCtrl = new wxBoxSizer( wxHORIZONTAL ); bSizerBlocksCtrl = new wxBoxSizer( wxHORIZONTAL );
m_categoriesAll = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("All"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_blocksAll = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("All"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_categoriesAll->SetToolTip( _("Select all categories") ); m_blocksAll->SetToolTip( _("Select all categories") );
bSizerCategoriesCtrl->Add( m_categoriesAll, 0, wxALL, FromDIP(5) ); bSizerBlocksCtrl->Add( m_blocksAll, 0, wxALL, FromDIP(5) );
m_categoriesNone = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("None"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_blocksNone = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("None"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_categoriesNone->SetToolTip( _("Clear category selection") ); m_blocksNone->SetToolTip( _("Clear block selection") );
bSizerCategoriesCtrl->Add( m_categoriesNone, 0, wxALL, FromDIP(5) ); bSizerBlocksCtrl->Add( m_blocksNone, 0, wxALL, FromDIP(5) );
m_categoriesInvert = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("Invert"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE ); m_blocksInvert = new wxHyperlinkCtrl( m_search_panel, wxID_ANY, _("Invert"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_categoriesInvert->SetToolTip( _("Invert category selection") ); m_blocksInvert->SetToolTip( _("Invert block selection") );
bSizerCategoriesCtrl->Add( m_categoriesInvert, 0, wxALL, FromDIP(5) ); bSizerBlocksCtrl->Add( m_blocksInvert, 0, wxALL, FromDIP(5) );
sbSizerSearch->Add( bSizerCategoriesCtrl, 0, wxALIGN_RIGHT, FromDIP(5) ); sbSizerSearch->Add( bSizerBlocksCtrl, 0, wxALIGN_RIGHT, FromDIP(5) );
m_search_panel->SetSizer( sbSizerSearch ); m_search_panel->SetSizer( sbSizerSearch );
@@ -687,10 +687,10 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id,
sbSizerPreview->Add( m_tags, 1, wxALL|wxEXPAND, FromDIP(5) ); sbSizerPreview->Add( m_tags, 1, wxALL|wxEXPAND, FromDIP(5) );
m_category = new wxTextCtrl( sbSizerPreview->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTER ); m_block = new wxTextCtrl( sbSizerPreview->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTER );
m_category->SetToolTip( _("Unicode character category") ); m_block->SetToolTip( _("Unicode character block") );
sbSizerPreview->Add( m_category, 0, wxALL|wxEXPAND, FromDIP(5) ); sbSizerPreview->Add( m_block, 0, wxALL|wxEXPAND, FromDIP(5) );
wxBoxSizer* bSizerNavigateButtons; wxBoxSizer* bSizerNavigateButtons;
bSizerNavigateButtons = new wxBoxSizer( wxHORIZONTAL ); bSizerNavigateButtons = new wxBoxSizer( wxHORIZONTAL );
@@ -780,10 +780,10 @@ wxZRColaCharSelectBase::wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id,
this->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) ); this->Connect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) );
m_search->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this ); m_search->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this );
m_search_more->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this ); m_search_more->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this );
m_categories->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnCategoriesToggle ), NULL, this ); m_blocks->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnBlocksToggle ), NULL, this );
m_categoriesAll->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesAll ), NULL, this ); m_blocksAll->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksAll ), NULL, this );
m_categoriesNone->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesNone ), NULL, this ); m_blocksNone->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksNone ), NULL, this );
m_categoriesInvert->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesInvert ), NULL, this ); m_blocksInvert->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksInvert ), NULL, this );
m_gridResults->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this ); m_gridResults->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this );
m_gridResults->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this ); m_gridResults->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this );
m_gridResults->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this ); m_gridResults->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this );
@@ -805,10 +805,10 @@ wxZRColaCharSelectBase::~wxZRColaCharSelectBase()
this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) ); this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaCharSelectBase::OnIdle ) );
m_search->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this ); m_search->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxZRColaCharSelectBase::OnSearchText ), NULL, this );
m_search_more->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this ); m_search_more->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnSearchMore ), NULL, this );
m_categories->Disconnect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnCategoriesToggle ), NULL, this ); m_blocks->Disconnect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( wxZRColaCharSelectBase::OnBlocksToggle ), NULL, this );
m_categoriesAll->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesAll ), NULL, this ); m_blocksAll->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksAll ), NULL, this );
m_categoriesNone->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesNone ), NULL, this ); m_blocksNone->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksNone ), NULL, this );
m_categoriesInvert->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnCategoriesInvert ), NULL, this ); m_blocksInvert->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( wxZRColaCharSelectBase::OnBlocksInvert ), NULL, this );
m_gridResults->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this ); m_gridResults->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( wxZRColaCharSelectBase::OnResultCellDClick ), NULL, this );
m_gridResults->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this ); m_gridResults->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( wxZRColaCharSelectBase::OnResultSelectCell ), NULL, this );
m_gridResults->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this ); m_gridResults->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( wxZRColaCharSelectBase::OnResultsKeyDown ), NULL, this );
@@ -934,7 +934,7 @@ wxZRColaAboutBase::wxZRColaAboutBase( wxWindow* parent, wxWindowID id, const wxS
wxBoxSizer* bSizerColumns; wxBoxSizer* bSizerColumns;
bSizerColumns = new wxBoxSizer( wxHORIZONTAL ); bSizerColumns = new wxBoxSizer( wxHORIZONTAL );
m_bitmapIcon = new wxStaticBitmap( this, wxID_ANY, wxIcon( wxT("00_zrcola.ico"), wxBITMAP_TYPE_ICO_RESOURCE, FromDIP(32), FromDIP(32) ), wxDefaultPosition, wxDefaultSize, 0 ); m_bitmapIcon = new wxStaticBitmap( this, wxID_ANY, wxIconEx( wxT("00_zrcola.ico"), wxBITMAP_TYPE_ICO_RESOURCE, 32, 32, this ), wxDefaultPosition, wxDefaultSize, 0 );
bSizerColumns->Add( m_bitmapIcon, 0, wxALL, FromDIP(5) ); bSizerColumns->Add( m_bitmapIcon, 0, wxALL, FromDIP(5) );
wxBoxSizer* bSizerText; wxBoxSizer* bSizerText;

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018) // C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@@ -61,7 +61,7 @@ class wxZRColaFrameBase : public wxFrame
protected: protected:
enum enum
{ {
wxID_CHARACTER_SELECTOR = 1000, wxID_CHARACTER_SELECTOR = 6000,
wxID_SEND_DESTINATION, wxID_SEND_DESTINATION,
wxID_COPY_DESTINATION_AND_RETURN, wxID_COPY_DESTINATION_AND_RETURN,
wxID_SEND_SOURCE, wxID_SEND_SOURCE,
@@ -78,7 +78,7 @@ class wxZRColaFrameBase : public wxFrame
wxID_HELP_INSTRUCTIONS, wxID_HELP_INSTRUCTIONS,
wxID_HELP_SHORTCUTS, wxID_HELP_SHORTCUTS,
wxID_HELP_REQCHAR, wxID_HELP_REQCHAR,
wxID_HELP_UPDATE wxID_HELP_UPDATE,
}; };
wxMenuBar* m_menubar; wxMenuBar* m_menubar;
@@ -105,7 +105,7 @@ class wxZRColaFrameBase : public wxFrame
wxZRColaCharacterCatalogPanel* m_panelChrCat; wxZRColaCharacterCatalogPanel* m_panelChrCat;
wxStatusBar* m_statusBar; wxStatusBar* m_statusBar;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); } virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
@@ -133,7 +133,7 @@ class wxZRColaComposerPanelBase : public wxPanel
protected: protected:
enum enum
{ {
wxID_TIMER_SAVE = 1000 wxID_TIMER_SAVE = 6000,
}; };
wxSplitterWindow* m_splitterSource; wxSplitterWindow* m_splitterSource;
@@ -146,7 +146,7 @@ class wxZRColaComposerPanelBase : public wxPanel
wxTextCtrl* m_destinationHex; wxTextCtrl* m_destinationHex;
wxTimer m_timerSave; wxTimer m_timerSave;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); } virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); } virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); } virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); }
@@ -161,6 +161,7 @@ class wxZRColaComposerPanelBase : public wxPanel
wxTextCtrl* m_destination; 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( 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(); ~wxZRColaComposerPanelBase();
void m_splitterSourceOnIdle( wxIdleEvent& ) void m_splitterSourceOnIdle( wxIdleEvent& )
@@ -189,7 +190,7 @@ class wxZRColaCharacterCatalogPanelBase : public wxPanel
wxZRColaCharGrid* m_grid; wxZRColaCharGrid* m_grid;
wxCheckBox* m_show_all; wxCheckBox* m_show_all;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); } virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); } virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); } virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
@@ -199,6 +200,7 @@ class wxZRColaCharacterCatalogPanelBase : public wxPanel
public: public:
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") ); wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
~wxZRColaCharacterCatalogPanelBase(); ~wxZRColaCharacterCatalogPanelBase();
}; };
@@ -214,10 +216,10 @@ class wxZRColaCharSelectBase : public wxDialog
wxSearchCtrl* m_search; wxSearchCtrl* m_search;
wxHyperlinkCtrl* m_search_more; wxHyperlinkCtrl* m_search_more;
wxPanel* m_search_panel; wxPanel* m_search_panel;
wxCheckListBox* m_categories; wxCheckListBox* m_blocks;
wxHyperlinkCtrl* m_categoriesAll; wxHyperlinkCtrl* m_blocksAll;
wxHyperlinkCtrl* m_categoriesNone; wxHyperlinkCtrl* m_blocksNone;
wxHyperlinkCtrl* m_categoriesInvert; wxHyperlinkCtrl* m_blocksInvert;
wxZRColaCharGrid* m_gridResults; wxZRColaCharGrid* m_gridResults;
wxZRColaCharGrid* m_gridRecent; wxZRColaCharGrid* m_gridRecent;
wxStaticText* m_labelUnicode; wxStaticText* m_labelUnicode;
@@ -226,20 +228,20 @@ class wxZRColaCharSelectBase : public wxDialog
wxGrid* m_gridPreview; wxGrid* m_gridPreview;
wxTextCtrl* m_description; wxTextCtrl* m_description;
wxTextCtrl* m_tags; wxTextCtrl* m_tags;
wxTextCtrl* m_category; wxTextCtrl* m_block;
wxHyperlinkCtrl* m_navigateBack; wxHyperlinkCtrl* m_navigateBack;
wxHyperlinkCtrl* m_navigateForward; wxHyperlinkCtrl* m_navigateForward;
wxZRColaCharGrid* m_gridRelated; wxZRColaCharGrid* m_gridRelated;
wxButton* m_buttonInsert; wxButton* m_buttonInsert;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); } virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSearchMore( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnSearchMore( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnCategoriesToggle( wxCommandEvent& event ) { event.Skip(); } virtual void OnBlocksToggle( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCategoriesAll( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBlocksAll( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnCategoriesNone( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBlocksNone( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnCategoriesInvert( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBlocksInvert( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnResultCellDClick( wxGridEvent& event ) { event.Skip(); } virtual void OnResultCellDClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); } virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); }
virtual void OnResultsKeyDown( wxKeyEvent& event ) { event.Skip(); } virtual void OnResultsKeyDown( wxKeyEvent& event ) { event.Skip(); }
@@ -258,6 +260,7 @@ class wxZRColaCharSelectBase : public wxDialog
public: public:
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") ); wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
~wxZRColaCharSelectBase(); ~wxZRColaCharSelectBase();
}; };
@@ -284,7 +287,7 @@ class wxZRColaSettingsBase : public wxDialog
wxButton* m_sdbSizerButtonsApply; wxButton* m_sdbSizerButtonsApply;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
@@ -294,6 +297,7 @@ class wxZRColaSettingsBase : public wxDialog
public: public:
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") ); wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
~wxZRColaSettingsBase(); ~wxZRColaSettingsBase();
}; };
@@ -320,6 +324,7 @@ class wxZRColaAboutBase : public wxDialog
public: public:
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") ); wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
~wxZRColaAboutBase(); ~wxZRColaAboutBase();
}; };
@@ -336,7 +341,7 @@ class wxZRColaUpdaterBase : public wxDialog
wxButton* m_buttonUpdate; wxButton* m_buttonUpdate;
wxButton* m_buttonClose; wxButton* m_buttonClose;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); }
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); } virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
@@ -345,6 +350,7 @@ class wxZRColaUpdaterBase : public wxDialog
public: public:
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") ); wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
~wxZRColaUpdaterBase(); ~wxZRColaUpdaterBase();
}; };
@@ -367,13 +373,14 @@ class wxZRColaCharRequestBase : public wxDialog
wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") ); wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
~wxZRColaCharRequestBase(); ~wxZRColaCharRequestBase();
}; };
@@ -399,7 +406,7 @@ class wxZRColaTranslationSeqBase : public wxDialog
wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizerButtonsCancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, override them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); } virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); }
@@ -416,6 +423,7 @@ class wxZRColaTranslationSeqBase : public wxDialog
public: 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, const wxString& name = wxT("ZRColaTranslationSeq") ); 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, const wxString& name = wxT("ZRColaTranslationSeq") );
~wxZRColaTranslationSeqBase(); ~wxZRColaTranslationSeqBase();
}; };

View File

@@ -12,7 +12,6 @@
wxZRColaSettings::wxZRColaSettings(wxWindow* parent) : wxZRColaSettings::wxZRColaSettings(wxWindow* parent) :
m_lang_auto(true), m_lang_auto(true),
m_lang(ZRCola::langid_t::blank),
wxZRColaSettingsBase(parent) wxZRColaSettingsBase(parent)
{ {
auto app = dynamic_cast<ZRColaApp*>(wxTheApp); auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
@@ -165,7 +164,7 @@ bool wxPersistentZRColaSettings::Restore()
} else if (!app->m_lang_db.idxLang.empty()) { } else if (!app->m_lang_db.idxLang.empty()) {
wnd->m_lang = app->m_lang_db.idxLang[0].lang; wnd->m_lang = app->m_lang_db.idxLang[0].lang;
} else } else
wnd->m_lang = ZRCola::langid_t::blank; wnd->m_lang = ZRCola::langid_t();
int guiLevel; int guiLevel;
return RestoreValue(wxT("guiLevel"), &guiLevel) && guiLevel == s_guiLevel ? wxPersistentTLWEx::Restore() : true; return RestoreValue(wxT("guiLevel"), &guiLevel) && guiLevel == s_guiLevel ? wxPersistentTLWEx::Restore() : true;

View File

@@ -26,7 +26,7 @@ void ZRCola::DBSource::character_bank::build_related()
for (DWORD i = 0; i < si.dwNumberOfProcessors; i++, chr_from = chr_to) { for (DWORD i = 0; i < si.dwNumberOfProcessors; i++, chr_from = chr_to) {
size_type to = MulDiv(i + 1, total, si.dwNumberOfProcessors); size_type to = MulDiv(i + 1, total, si.dwNumberOfProcessors);
for (chr_to = chr_from; from < to; from++, ++chr_to); for (chr_to = chr_from; from < to; from++, ++chr_to);
workers[i] = new build_related_worker(this, chr_from, chr_to); workers[i] = new build_related_worker(*this, chr_from, chr_to);
} }
// Wait for workers. // Wait for workers.
@@ -41,8 +41,9 @@ void ZRCola::DBSource::character_bank::build_related()
} }
ZRCola::DBSource::character_bank::build_related_worker::build_related_worker(_In_ const character_bank *cb, _In_ iterator from, _In_ iterator to) : _Use_decl_annotations_
win_handle<INVALID_HANDLE_VALUE>((HANDLE)_beginthreadex(NULL, 0, process, this, CREATE_SUSPENDED, NULL)), ZRCola::DBSource::character_bank::build_related_worker::build_related_worker(const character_bank &cb, iterator from, iterator to) :
winstd::thread((HANDLE)_beginthreadex(NULL, 0, process, this, CREATE_SUSPENDED, NULL)),
m_heap(HeapCreate(0, 0, 0)), m_heap(HeapCreate(0, 0, 0)),
m_cb(cb), m_cb(cb),
m_from(from), m_from(from),
@@ -59,24 +60,24 @@ unsigned int ZRCola::DBSource::character_bank::build_related_worker::process()
vector<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); set<wstring, less<wstring>, heap_allocator<wstring> > matching(less<wstring>(), al);
for (auto c = m_from; c != m_to; c++) { for (auto c = m_from; c != m_to; ++c) {
rel.clear(); rel.clear();
// Skip all unexisting, or self related characters. // Skip all inexistent, or self related characters.
auto m_cb_end = m_cb->cend(); 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) { 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; c_rel_next = c_rel + stdex::strnlen(c_rel, c_rel_end - c_rel) + 1;
if (m_cb->find(c_rel) != m_cb_end && c->first.compare(c_rel) != 0) if (m_cb.find(c_rel) != m_cb_end && c->first.compare(c_rel) != 0)
rel.insert(rel.end(), c_rel, c_rel_next); rel.insert(rel.end(), c_rel, c_rel_next);
} }
// Add all characters that share enough keywords. // Add all characters that share enough keywords.
for (auto c2 = m_cb->cbegin(), c2_end = m_cb->cend(); c2 != c2_end; ++c2) { for (auto c2 = m_cb.cbegin(), c2_end = m_cb.cend(); c2 != c2_end; ++c2) {
if (c == c2) if (c == c2)
continue; continue;
bool already_present = false; 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) { 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; c_rel_next = c_rel + stdex::strnlen(c_rel, c_rel_end - c_rel) + 1;
if (c2->first.compare(c_rel) == 0) { if (c2->first.compare(c_rel) == 0) {
already_present = true; already_present = true;
break; break;
@@ -104,6 +105,19 @@ unsigned int ZRCola::DBSource::character_bank::build_related_worker::process()
} }
c->second.rel.assign(rel.cbegin(), rel.cend()); c->second.rel.assign(rel.cbegin(), rel.cend());
if (!c->first.empty()) {
// Find the block this character belongs to.
char32_t ch = c->first.size() == 1 ? c->first[0] : stdex::surrogate_pair_to_ucs4(c->first.c_str());
if (auto it = m_cb.idxChrBlk.upper_bound(ch); it != m_cb.idxChrBlk.begin()) {
--it;
if (ch >= it->first && ch <= it->second.chr_end) {
c->second.blk = it->second.id;
// May un-const, as `used` field does not change the map sort order.
const_cast<chrblk_data&>(it->second).used = true;
}
}
}
} }
return 0; return 0;
@@ -186,7 +200,7 @@ void ZRCola::DBSource::character_desc_idx::add_keywords(const set<wstring> &term
} }
void ZRCola::DBSource::character_desc_idx::save(ZRCola::textindex<wchar_t, wchar_t, unsigned __int32> &idx) const void ZRCola::DBSource::character_desc_idx::save(ZRCola::textindex<wchar_t, wchar_t, uint32_t> &idx) const
{ {
idx .clear(); idx .clear();
idx.keys .clear(); idx.keys .clear();
@@ -205,7 +219,7 @@ void ZRCola::DBSource::character_desc_idx::save(ZRCola::textindex<wchar_t, wchar
// Convert the index. // Convert the index.
for (const_iterator i = cbegin(), i_end = cend(); i != i_end; ++i) { for (const_iterator i = cbegin(), i_end = cend(); i != i_end; ++i) {
ZRCola::mappair_t<unsigned __int32> p = { idx.keys.size(), idx.values.size() }; ZRCola::mappair_t<uint32_t> p = { idx.keys.size(), idx.values.size() };
idx.push_back(p); idx.push_back(p);
idx.keys.insert(idx.keys.end(), i->first.cbegin(), i->first.cend()); idx.keys.insert(idx.keys.end(), i->first.cbegin(), i->first.cend());
idx.values.insert(idx.values.end(), i->second.cbegin(), i->second.cend()); idx.values.insert(idx.values.end(), i->second.cbegin(), i->second.cend());
@@ -245,7 +259,7 @@ ZRCola::DBSource::~DBSource()
m_pHighlight1.free(); m_pHighlight1.free();
m_comHighlight.free(); m_comHighlight.free();
if (m_db) if (m_db.valid())
m_db->Close(); m_db->Close();
if (m_locale) if (m_locale)
@@ -255,7 +269,7 @@ ZRCola::DBSource::~DBSource()
bool ZRCola::DBSource::Open(LPCTSTR filename) bool ZRCola::DBSource::Open(LPCTSTR filename)
{ {
wxASSERT_MSG(!m_db, wxT("database already open")); wxASSERT_MSG(!m_db.valid(), wxT("database already open"));
// Create COM object. // Create COM object.
HRESULT hr = ::CoCreateInstance(CLSID_CADOConnection, NULL, CLSCTX_ALL, IID_IADOConnection, (LPVOID*)&m_db); HRESULT hr = ::CoCreateInstance(CLSID_CADOConnection, NULL, CLSCTX_ALL, IID_IADOConnection, (LPVOID*)&m_db);
@@ -276,9 +290,9 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
m_locale = _create_locale(LC_ALL, "Slovenian_Slovenia.1250"); m_locale = _create_locale(LC_ALL, "Slovenian_Slovenia.1250");
// Create ADO command(s). // Create ADO command(s).
wxASSERT_MSG(!m_comCharacterGroup, wxT("ADO command already created")); wxASSERT_MSG(!m_comCharacterGroup.valid(), wxT("ADO command already created"));
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comCharacterGroup))); 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_ActiveConnection(variant((IDispatch*)m_db))));
wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandType(adCmdText)));
wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandText(bstr(L"SELECT [VRS_SkupineZnakov].[Znak], [VRS_SkupineZnakov].[pogost] " wxVERIFY(SUCCEEDED(m_comCharacterGroup->put_CommandText(bstr(L"SELECT [VRS_SkupineZnakov].[Znak], [VRS_SkupineZnakov].[pogost] "
L"FROM [VRS_SkupineZnakov] " L"FROM [VRS_SkupineZnakov] "
@@ -289,14 +303,14 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
// Create and add command parameters. // Create and add command parameters.
com_obj<ADOParameters> params; com_obj<ADOParameters> params;
wxVERIFY(SUCCEEDED(m_comCharacterGroup->get_Parameters(&params))); wxVERIFY(SUCCEEDED(m_comCharacterGroup->get_Parameters(&params)));
wxASSERT_MSG(!m_pCharacterGroup1, wxT("ADO command parameter already created")); wxASSERT_MSG(!m_pCharacterGroup1.valid(), wxT("ADO command parameter already created"));
wxVERIFY(SUCCEEDED(m_comCharacterGroup->CreateParameter(bstr(L"@Skupina"), adVarWChar, adParamInput, 50, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pCharacterGroup1))); wxVERIFY(SUCCEEDED(m_comCharacterGroup->CreateParameter(bstr(L"@Skupina"), adVarWChar, adParamInput, 50, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pCharacterGroup1)));
wxVERIFY(SUCCEEDED(params->Append(m_pCharacterGroup1))); wxVERIFY(SUCCEEDED(params->Append(m_pCharacterGroup1)));
} }
wxASSERT_MSG(!m_comTranslation, wxT("ADO command already created")); wxASSERT_MSG(!m_comTranslation.valid(), wxT("ADO command already created"));
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comTranslation))); 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_ActiveConnection(variant((IDispatch*)m_db))));
wxVERIFY(SUCCEEDED(m_comTranslation->put_CommandType(adCmdText))); 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] " 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"FROM [VRS_ScriptRepl2] "
@@ -306,14 +320,14 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
// Create and add command parameters. // Create and add command parameters.
com_obj<ADOParameters> params; com_obj<ADOParameters> params;
wxVERIFY(SUCCEEDED(m_comTranslation->get_Parameters(&params))); wxVERIFY(SUCCEEDED(m_comTranslation->get_Parameters(&params)));
wxASSERT_MSG(!m_pTranslation1, wxT("ADO command parameter already created")); wxASSERT_MSG(!m_pTranslation1.valid(), wxT("ADO command parameter already created"));
wxVERIFY(SUCCEEDED(m_comTranslation->CreateParameter(bstr(L"@Script"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslation1))); wxVERIFY(SUCCEEDED(m_comTranslation->CreateParameter(bstr(L"@Script"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslation1)));
wxVERIFY(SUCCEEDED(params->Append(m_pTranslation1))); wxVERIFY(SUCCEEDED(params->Append(m_pTranslation1)));
} }
wxASSERT_MSG(!m_comTranslationSets, wxT("ADO command already created")); wxASSERT_MSG(!m_comTranslationSets.valid(), wxT("ADO command already created"));
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comTranslationSets))); 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_ActiveConnection(variant((IDispatch*)m_db))));
wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandType(adCmdText)));
wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandText(bstr(L"SELECT [Script] " wxVERIFY(SUCCEEDED(m_comTranslationSets->put_CommandText(bstr(L"SELECT [Script] "
L"FROM [VRS_Script2SeqScr] " L"FROM [VRS_Script2SeqScr] "
@@ -323,14 +337,14 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
// Create and add command parameters. // Create and add command parameters.
com_obj<ADOParameters> params; com_obj<ADOParameters> params;
wxVERIFY(SUCCEEDED(m_comTranslationSets->get_Parameters(&params))); wxVERIFY(SUCCEEDED(m_comTranslationSets->get_Parameters(&params)));
wxASSERT_MSG(!m_pTranslationSets1, wxT("ADO command parameter already created")); wxASSERT_MSG(!m_pTranslationSets1.valid(), wxT("ADO command parameter already created"));
wxVERIFY(SUCCEEDED(m_comTranslationSets->CreateParameter(bstr(L"@ID"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslationSets1))); wxVERIFY(SUCCEEDED(m_comTranslationSets->CreateParameter(bstr(L"@ID"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pTranslationSets1)));
wxVERIFY(SUCCEEDED(params->Append(m_pTranslationSets1))); wxVERIFY(SUCCEEDED(params->Append(m_pTranslationSets1)));
} }
wxASSERT_MSG(!m_comHighlight, wxT("ADO command already created")); wxASSERT_MSG(!m_comHighlight.valid(), wxT("ADO command already created"));
wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comHighlight))); wxVERIFY(SUCCEEDED(::CoCreateInstance(CLSID_CADOCommand, NULL, CLSCTX_ALL, IID_IADOCommand, (LPVOID*)&m_comHighlight)));
wxVERIFY(SUCCEEDED(m_comHighlight->put_ActiveConnection(variant(m_db)))); wxVERIFY(SUCCEEDED(m_comHighlight->put_ActiveConnection(variant((IDispatch*)m_db))));
wxVERIFY(SUCCEEDED(m_comHighlight->put_CommandType(adCmdText))); wxVERIFY(SUCCEEDED(m_comHighlight->put_CommandType(adCmdText)));
wxVERIFY(SUCCEEDED(m_comHighlight->put_CommandText(bstr(L"SELECT [komb] " wxVERIFY(SUCCEEDED(m_comHighlight->put_CommandText(bstr(L"SELECT [komb] "
L"FROM [VRS_HighlightChars2] " L"FROM [VRS_HighlightChars2] "
@@ -340,7 +354,7 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
// Create and add command parameters. // Create and add command parameters.
com_obj<ADOParameters> params; com_obj<ADOParameters> params;
wxVERIFY(SUCCEEDED(m_comHighlight->get_Parameters(&params))); wxVERIFY(SUCCEEDED(m_comHighlight->get_Parameters(&params)));
wxASSERT_MSG(!m_pHighlight1, wxT("ADO command parameter already created")); wxASSERT_MSG(!m_pHighlight1.valid(), wxT("ADO command parameter already created"));
wxVERIFY(SUCCEEDED(m_comHighlight->CreateParameter(bstr(L"@group"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pHighlight1))); wxVERIFY(SUCCEEDED(m_comHighlight->CreateParameter(bstr(L"@group"), adSmallInt, adParamInput, 0, variant(DISP_E_PARAMNOTFOUND, VT_ERROR), &m_pHighlight1)));
wxVERIFY(SUCCEEDED(params->Append(m_pHighlight1))); wxVERIFY(SUCCEEDED(params->Append(m_pHighlight1)));
} }
@@ -360,7 +374,7 @@ bool ZRCola::DBSource::Open(LPCTSTR filename)
void ZRCola::DBSource::LogErrors() const void ZRCola::DBSource::LogErrors() const
{ {
wxASSERT_MSG(m_db, wxT("database does not exist")); wxASSERT_MSG(m_db.valid(), wxT("database does not exist"));
// Get array of errors. // Get array of errors.
ADOErrors *errors = NULL; ADOErrors *errors = NULL;
@@ -393,7 +407,7 @@ void ZRCola::DBSource::LogErrors() const
bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, bool& val) const bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, bool& val) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -407,7 +421,7 @@ bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, bool& val) const
bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, short& val) const bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, short& val) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -421,7 +435,7 @@ bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, short& val) const
bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, string& val) const bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, string& val) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -438,7 +452,7 @@ bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, string& val) const
bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, wstring& val) const bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, wstring& val) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -454,9 +468,9 @@ bool ZRCola::DBSource::GetValue(const com_obj<ADOField>& f, wstring& val) const
} }
bool ZRCola::DBSource::GetUnicodeCharacter(const com_obj<ADOField>& f, wchar_t& chr) const bool ZRCola::DBSource::GetUnicodeCharacter(const com_obj<ADOField>& f, char32_t& chr) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -472,9 +486,9 @@ bool ZRCola::DBSource::GetUnicodeCharacter(const com_obj<ADOField>& f, wchar_t&
else if (L'a' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'f') chr = chr*0x10 + (V_BSTR(&v)[i] - L'a' + 10); else if (L'a' <= V_BSTR(&v)[i] && V_BSTR(&v)[i] <= L'f') chr = chr*0x10 + (V_BSTR(&v)[i] - L'a' + 10);
else break; else break;
} }
if (i <= 0 && 4 < i) { if (i <= 0 && 6 < i) {
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname))); bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
_ftprintf(stderr, wxT("%s: error ZCC0030: 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)); _ftprintf(stderr, wxT("%s: error ZCC0030: Syntax error in \"%.*ls\" field (\"%.*ls\"). Unicode code must be one to six hexadecimal characters long.\n"), m_filename.c_str(), fieldname.length(), (BSTR)fieldname, n, V_BSTR(&v));
return false; return false;
} else if (i != n) { } else if (i != n) {
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname))); bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
@@ -490,7 +504,7 @@ bool ZRCola::DBSource::GetUnicodeCharacter(const com_obj<ADOField>& f, wchar_t&
bool ZRCola::DBSource::GetUnicodeString(const com_obj<ADOField>& f, wstring& str) const bool ZRCola::DBSource::GetUnicodeString(const com_obj<ADOField>& f, wstring& str) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -527,7 +541,7 @@ bool ZRCola::DBSource::GetUnicodeString(const com_obj<ADOField>& f, wstring& str
bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADOField>& f, normperm& np) const bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADOField>& f, normperm& np) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -563,7 +577,7 @@ bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADOField>& f, normperm&
bool ZRCola::DBSource::GetLanguage(const com_obj<ADOField>& f, ZRCola::langid_t& lang) const bool ZRCola::DBSource::GetLanguage(const com_obj<ADOField>& f, ZRCola::langid_t& lang) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -599,47 +613,9 @@ bool ZRCola::DBSource::GetLanguage(const com_obj<ADOField>& f, ZRCola::langid_t&
} }
bool ZRCola::DBSource::GetChrCat(const com_obj<ADOField>& f, chrcatid_t& cc) 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);
// Parse the field.
size_t n = wcsnlen(V_BSTR(&v), ::SysStringLen(V_BSTR(&v)));
if (n < 1 || 2 < n) {
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
_ftprintf(stderr, wxT("%s: error ZCC0110: Syntax error in \"%.*ls\" field (\"%.*ls\"). Character category ID must be one (1) or two (2) characters long.\n"), m_filename.c_str(), fieldname.length(), (BSTR)fieldname, n, V_BSTR(&v));
return false;
}
for (size_t i = 0;; i++) {
if (i < sizeof(cc)) {
if (i < n) {
wchar_t c = V_BSTR(&v)[i];
if ((unsigned short)c > 0x7f) {
bstr fieldname; wxVERIFY(SUCCEEDED(f->get_Name(&fieldname)));
_ftprintf(stderr, wxT("%s: error ZCC0111: Syntax error in \"%.*ls\" field (\"%.*ls\"). Character category ID must contain ASCII characters only.\n"), m_filename.c_str(), fieldname.length(), (BSTR)fieldname, n, V_BSTR(&v));
return false;
}
cc.data[i] = (char)c;
} else
cc.data[i] = 0;
} else
break;
}
} else
memset(cc.data, 0, sizeof(cc));
return true;
}
bool ZRCola::DBSource::GetTagNames(const winstd::com_obj<ADOField>& f, LCID lcid, list<wstring>& names) const bool ZRCola::DBSource::GetTagNames(const winstd::com_obj<ADOField>& f, LCID lcid, list<wstring>& names) const
{ {
wxASSERT_MSG(f, wxT("field is empty")); wxASSERT_MSG(f.valid(), wxT("field is empty"));
variant v; variant v;
wxVERIFY(SUCCEEDED(f->get_Value(&v))); wxVERIFY(SUCCEEDED(f->get_Value(&v)));
@@ -670,7 +646,7 @@ bool ZRCola::DBSource::GetTagNames(const winstd::com_obj<ADOField>& f, LCID lcid
// Add name to the list. // Add name to the list.
names.push_back(std::move(name)); names.push_back(std::move(name));
break; break;
} else if (ZRCola::tagname_db::tagname::CompareName(lcid, n->data(), (unsigned __int16)n->length(), name.data(), (unsigned __int16)name.length()) == CSTR_EQUAL) { } else if (ZRCola::tagname_db::tagname::CompareName(lcid, n->data(), (uint16_t)n->length(), name.data(), (uint16_t)name.length()) == CSTR_EQUAL) {
// Name is already on the list. // Name is already on the list.
break; break;
} }
@@ -691,7 +667,7 @@ bool ZRCola::DBSource::SelectNormPermSets(winstd::com_obj<ADORecordset>& rs) con
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT [oblika], [oblike] " L"SELECT [oblika], [oblike] "
L"FROM [VRS_CharCanoOblike] " L"FROM [VRS_CharCanoOblike] "
L"ORDER BY [oblika], [oblike]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [oblika], [oblike]"), variant((IDispatch*)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()); _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(); LogErrors();
@@ -704,7 +680,7 @@ bool ZRCola::DBSource::SelectNormPermSets(winstd::com_obj<ADORecordset>& rs) con
bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADORecordset>& rs, std::string& norm, normperm& np) const bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADORecordset>& rs, std::string& norm, normperm& np) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -745,7 +721,7 @@ bool ZRCola::DBSource::SelectTranslations(com_obj<ADORecordset> &rs) const
L"SELECT [komb], [rang_komb], [Kano], [Kanoniziraj], [znak], [rang_znak] " L"SELECT [komb], [rang_komb], [Kano], [Kanoniziraj], [znak], [rang_znak] "
L"FROM [VRS_ReplChar] " L"FROM [VRS_ReplChar] "
L"WHERE [rang_komb]=1 " L"WHERE [rang_komb]=1 "
L"ORDER BY [znak], [rang_znak], [rang_komb], [komb]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [znak], [rang_znak], [rang_komb], [komb]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_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()); _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(); LogErrors();
@@ -767,7 +743,7 @@ bool ZRCola::DBSource::SelectTranslations(short set, winstd::com_obj<ADORecordse
// Open it. // Open it.
wxVERIFY(SUCCEEDED(m_pTranslation1->put_Value(variant(set)))); wxVERIFY(SUCCEEDED(m_pTranslation1->put_Value(variant(set))));
if (FAILED(rs->Open(variant(m_comTranslation), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { if (FAILED(rs->Open(variant((IDispatch*)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()); _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(); LogErrors();
return false; return false;
@@ -779,7 +755,7 @@ bool ZRCola::DBSource::SelectTranslations(short set, winstd::com_obj<ADORecordse
bool ZRCola::DBSource::GetTranslation(const com_obj<ADORecordset>& rs, ZRCola::DBSource::translation& t) const bool ZRCola::DBSource::GetTranslation(const com_obj<ADORecordset>& rs, ZRCola::DBSource::translation& t) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -835,7 +811,7 @@ bool ZRCola::DBSource::SelectTranlationSets(com_obj<ADORecordset> &rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [entCode], [Src_En], [Dst_En] " L"SELECT DISTINCT [entCode], [Src_En], [Dst_En] "
L"FROM [VRS_Script2] " L"FROM [VRS_Script2] "
L"ORDER BY [entCode], [Src_En], [Dst_En]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [entCode], [Src_En], [Dst_En]"), variant((IDispatch*)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()); _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(); LogErrors();
@@ -848,7 +824,7 @@ bool ZRCola::DBSource::SelectTranlationSets(com_obj<ADORecordset> &rs) const
bool ZRCola::DBSource::GetTranslationSet(const com_obj<ADORecordset>& rs, ZRCola::DBSource::transet& ts) const bool ZRCola::DBSource::GetTranslationSet(const com_obj<ADORecordset>& rs, ZRCola::DBSource::transet& ts) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -885,7 +861,7 @@ bool ZRCola::DBSource::SelectTranlationSeqs(com_obj<ADORecordset> &rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [ID], [Descr], [Rank] " L"SELECT DISTINCT [ID], [Descr], [Rank] "
L"FROM [VRS_Script2Seq] " L"FROM [VRS_Script2Seq] "
L"ORDER BY [Rank], [Descr]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [Rank], [Descr]"), variant((IDispatch*)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()); _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(); LogErrors();
@@ -898,7 +874,7 @@ bool ZRCola::DBSource::SelectTranlationSeqs(com_obj<ADORecordset> &rs) const
bool ZRCola::DBSource::GetTranslationSeq(const com_obj<ADORecordset>& rs, ZRCola::DBSource::transeq& ts) const bool ZRCola::DBSource::GetTranslationSeq(const com_obj<ADORecordset>& rs, ZRCola::DBSource::transeq& ts) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -928,7 +904,7 @@ bool ZRCola::DBSource::GetTranslationSeq(const com_obj<ADORecordset>& rs, ZRCola
wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient))); wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient)));
wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly))); wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly)));
wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly))); wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly)));
if (FAILED(rs_chars->Open(variant(m_comTranslationSets), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { if (FAILED(rs_chars->Open(variant((IDispatch*)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()); _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(); LogErrors();
return false; return false;
@@ -962,7 +938,7 @@ bool ZRCola::DBSource::SelectKeySequences(com_obj<ADORecordset> &rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [VRS_KeyCodes].[Znak], [VRS_CharGroup].[CharGroup], IIF([VRS_CharGroup].[Arg1] IS NOT NULL, [VRS_CharGroup].[Arg1], 0)+IIF([VRS_CharGroup].[Arg2] IS NOT NULL, [VRS_CharGroup].[Arg2], 0)+IIF([VRS_CharGroup].[Arg3] IS NOT NULL, [VRS_CharGroup].[Arg3], 0) AS [Modifiers], IIF([VRS_CharGroup].[Arg4] IS NOT NULL, [VRS_CharGroup].[Arg4], 0) AS [KeyCodePre], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift] " L"SELECT DISTINCT [VRS_KeyCodes].[Znak], [VRS_CharGroup].[CharGroup], IIF([VRS_CharGroup].[Arg1] IS NOT NULL, [VRS_CharGroup].[Arg1], 0)+IIF([VRS_CharGroup].[Arg2] IS NOT NULL, [VRS_CharGroup].[Arg2], 0)+IIF([VRS_CharGroup].[Arg3] IS NOT NULL, [VRS_CharGroup].[Arg3], 0) AS [Modifiers], IIF([VRS_CharGroup].[Arg4] IS NOT NULL, [VRS_CharGroup].[Arg4], 0) AS [KeyCodePre], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift] "
L"FROM [VRS_KeyCodes] LEFT JOIN [VRS_CharGroup] ON [VRS_CharGroup].[CharGroup]=[VRS_KeyCodes].[CharGroup] " L"FROM [VRS_KeyCodes] LEFT JOIN [VRS_CharGroup] ON [VRS_CharGroup].[CharGroup]=[VRS_KeyCodes].[CharGroup] "
L"ORDER BY [VRS_CharGroup].[CharGroup], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift], [VRS_KeyCodes].[Znak]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [VRS_CharGroup].[CharGroup], [VRS_KeyCodes].[KeyCode], [VRS_KeyCodes].[Shift], [VRS_KeyCodes].[Znak]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0050: Error loading key sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0050: Error loading key sequences from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -975,7 +951,7 @@ bool ZRCola::DBSource::SelectKeySequences(com_obj<ADORecordset> &rs) const
bool ZRCola::DBSource::GetKeySequence(const com_obj<ADORecordset>& rs, ZRCola::DBSource::keyseq& ks) const bool ZRCola::DBSource::GetKeySequence(const com_obj<ADORecordset>& rs, ZRCola::DBSource::keyseq& ks) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1050,7 +1026,7 @@ bool ZRCola::DBSource::SelectLanguages(com_obj<ADORecordset> &rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [entCode], [Jezik_En] " L"SELECT DISTINCT [entCode], [Jezik_En] "
L"FROM [VRS_Jezik] " L"FROM [VRS_Jezik] "
L"ORDER BY [entCode], [Jezik_En]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [entCode], [Jezik_En]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0060: Error loading languages from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0060: Error loading languages from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -1063,7 +1039,7 @@ bool ZRCola::DBSource::SelectLanguages(com_obj<ADORecordset> &rs) const
bool ZRCola::DBSource::GetLanguage(const com_obj<ADORecordset>& rs, ZRCola::DBSource::language& lang) const bool ZRCola::DBSource::GetLanguage(const com_obj<ADORecordset>& rs, ZRCola::DBSource::language& lang) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1094,7 +1070,7 @@ bool ZRCola::DBSource::SelectLanguageCharacters(com_obj<ADORecordset> &rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [znak], [lang] " L"SELECT DISTINCT [znak], [lang] "
L"FROM [VRS_CharLocal] " L"FROM [VRS_CharLocal] "
L"ORDER BY [znak], [lang]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [znak], [lang]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0090: Error loading language characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0090: Error loading language characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -1107,7 +1083,7 @@ bool ZRCola::DBSource::SelectLanguageCharacters(com_obj<ADORecordset> &rs) const
bool ZRCola::DBSource::GetLanguageCharacter(const com_obj<ADORecordset>& rs, ZRCola::DBSource::langchar& lc) const bool ZRCola::DBSource::GetLanguageCharacter(const com_obj<ADORecordset>& rs, ZRCola::DBSource::langchar& lc) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1138,7 +1114,7 @@ bool ZRCola::DBSource::SelectCharacterGroups(com_obj<ADORecordset>& rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [id], [Skupina], [opis_en], [Rang] " L"SELECT DISTINCT [id], [Skupina], [opis_en], [Rang] "
L"FROM [VRS_SkupinaZnakov] " L"FROM [VRS_SkupinaZnakov] "
L"ORDER BY [Rang], [opis_en]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [Rang], [opis_en]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0090: Error loading character groups from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0090: Error loading character groups from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -1151,7 +1127,7 @@ bool ZRCola::DBSource::SelectCharacterGroups(com_obj<ADORecordset>& rs) const
bool ZRCola::DBSource::GetCharacterGroup(const com_obj<ADORecordset>& rs, chrgrp& cg) const bool ZRCola::DBSource::GetCharacterGroup(const com_obj<ADORecordset>& rs, chrgrp& cg) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1188,7 +1164,7 @@ bool ZRCola::DBSource::GetCharacterGroup(const com_obj<ADORecordset>& rs, chrgrp
wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient))); wxVERIFY(SUCCEEDED(rs_chars->put_CursorLocation(adUseClient)));
wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly))); wxVERIFY(SUCCEEDED(rs_chars->put_CursorType(adOpenForwardOnly)));
wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly))); wxVERIFY(SUCCEEDED(rs_chars->put_LockType(adLockReadOnly)));
if (FAILED(rs_chars->Open(variant(m_comCharacterGroup), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { if (FAILED(rs_chars->Open(variant((IDispatch*)m_comCharacterGroup), 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()); _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(); LogErrors();
return false; return false;
@@ -1228,12 +1204,12 @@ bool ZRCola::DBSource::SelectCharacters(com_obj<ADORecordset>& rs) const
// Open it. // Open it.
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [znak], [opis_en], [kat], [znak_v], [znak_m] " L"SELECT DISTINCT [znak], [opis_en], [znak_v], [znak_m] "
L"FROM [VRS_CharList] " L"FROM [VRS_CharList] "
L"WHERE " L"WHERE "
L"[aktiven]=1 AND " // Active characters only L"[aktiven]=1 AND " // Active characters only
L"[kat]<>'g' " // Ignore "Other, Control" category! L"[kat]<>'g' " // Ignore "Other, Control" category!
L"ORDER BY [znak]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [znak]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0120: Error loading characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0120: Error loading characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -1246,7 +1222,7 @@ bool ZRCola::DBSource::SelectCharacters(com_obj<ADORecordset>& rs) const
bool ZRCola::DBSource::GetCharacter(const com_obj<ADORecordset>& rs, character& chr) const bool ZRCola::DBSource::GetCharacter(const com_obj<ADORecordset>& rs, character& chr) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1289,17 +1265,11 @@ bool ZRCola::DBSource::GetCharacter(const com_obj<ADORecordset>& rs, character&
} }
} }
{
com_obj<ADOField> f;
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"kat"), &f)));
wxCHECK(GetChrCat(f, chr.second.cat), false);
}
return true; return true;
} }
bool ZRCola::DBSource::SelectCharacterCategories(com_obj<ADORecordset>& rs) const bool ZRCola::DBSource::SelectCharacterBlocks(com_obj<ADORecordset>& rs) const
{ {
// Create a new recordset. // Create a new recordset.
rs.free(); rs.free();
@@ -1307,12 +1277,11 @@ bool ZRCola::DBSource::SelectCharacterCategories(com_obj<ADORecordset>& rs) cons
// Open it. // Open it.
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [kat], [opis_en], [Rang] " L"SELECT DISTINCT [blok], [znak_od], [znak_do], [opis_en], [Rang] "
L"FROM [VRS_CharCategory] " L"FROM [VRS_CharBlocks] "
L"WHERE [kat]<>'g' " // Ignore "Other, Control" category! L"ORDER BY [Rang], [opis_en]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
L"ORDER BY [Rang], [opis_en]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0130: Error loading character categories from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0130: Error loading character blocks from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
return false; return false;
} }
@@ -1321,29 +1290,41 @@ bool ZRCola::DBSource::SelectCharacterCategories(com_obj<ADORecordset>& rs) cons
} }
bool ZRCola::DBSource::GetCharacterCategory(const com_obj<ADORecordset>& rs, chrcat& cc) const bool ZRCola::DBSource::GetCharacterBlock(const com_obj<ADORecordset>& rs, chrblk& cb) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
{ {
com_obj<ADOField> f; com_obj<ADOField> f;
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"kat"), &f))); wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"blok"), &f)));
wxCHECK(GetChrCat(f, cc.cat), false); wxCHECK(GetValue(f, cb.second.id), false);
}
{
com_obj<ADOField> f;
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak_od"), &f)));
wxCHECK(GetUnicodeCharacter(f, cb.first), false);
}
{
com_obj<ADOField> f;
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"znak_do"), &f)));
wxCHECK(GetUnicodeCharacter(f, cb.second.chr_end), false);
} }
{ {
com_obj<ADOField> f; com_obj<ADOField> f;
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Rang"), &f))); wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"Rang"), &f)));
wxCHECK(GetValue(f, cc.rank), false); wxCHECK(GetValue(f, cb.second.rank), false);
} }
{ {
com_obj<ADOField> f; com_obj<ADOField> f;
wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"opis_en"), &f))); wxVERIFY(SUCCEEDED(flds->get_Item(variant(L"opis_en"), &f)));
wxCHECK(GetValue(f, cc.name), false); wxCHECK(GetValue(f, cb.second.name), false);
} }
return true; return true;
@@ -1360,7 +1341,7 @@ bool ZRCola::DBSource::SelectCharacterTags(winstd::com_obj<ADORecordset>& rs) co
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [znak], [oznaka] " L"SELECT DISTINCT [znak], [oznaka] "
L"FROM [VRS_CharTags] " L"FROM [VRS_CharTags] "
L"ORDER BY [znak], [oznaka]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [znak], [oznaka]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0130: Error loading character tags from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0130: Error loading character tags from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -1373,7 +1354,7 @@ bool ZRCola::DBSource::SelectCharacterTags(winstd::com_obj<ADORecordset>& rs) co
bool ZRCola::DBSource::GetCharacterTag(const winstd::com_obj<ADORecordset>& rs, chrtag& ct) const bool ZRCola::DBSource::GetCharacterTag(const winstd::com_obj<ADORecordset>& rs, chrtag& ct) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1404,7 +1385,7 @@ bool ZRCola::DBSource::SelectTagNames(winstd::com_obj<ADORecordset>& rs) const
if (FAILED(rs->Open(variant( if (FAILED(rs->Open(variant(
L"SELECT DISTINCT [oznaka], [opis_en], [opis_sl], [opis_ru] " L"SELECT DISTINCT [oznaka], [opis_en], [opis_sl], [opis_ru] "
L"FROM [VRS_Tags] " L"FROM [VRS_Tags] "
L"ORDER BY [oznaka]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText))) L"ORDER BY [oznaka]"), variant((IDispatch*)m_db), adOpenStatic, adLockReadOnly, adCmdText)))
{ {
_ftprintf(stderr, wxT("%s: error ZCC0130: Error loading tags from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0130: Error loading tags from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
@@ -1417,7 +1398,7 @@ bool ZRCola::DBSource::SelectTagNames(winstd::com_obj<ADORecordset>& rs) const
bool ZRCola::DBSource::GetTagName(const winstd::com_obj<ADORecordset>& rs, tagname& tn) const bool ZRCola::DBSource::GetTagName(const winstd::com_obj<ADORecordset>& rs, tagname& tn) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));
@@ -1471,7 +1452,7 @@ bool ZRCola::DBSource::SelectHighlights(short set, winstd::com_obj<ADORecordset>
// Open it. // Open it.
wxVERIFY(SUCCEEDED(m_pHighlight1->put_Value(variant(set)))); wxVERIFY(SUCCEEDED(m_pHighlight1->put_Value(variant(set))));
if (FAILED(rs->Open(variant(m_comHighlight), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) { if (FAILED(rs->Open(variant((IDispatch*)m_comHighlight), variant(DISP_E_PARAMNOTFOUND, VT_ERROR)))) {
_ftprintf(stderr, wxT("%s: error ZCC0101: Error loading highlights from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0101: Error loading highlights from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
LogErrors(); LogErrors();
return false; return false;
@@ -1483,7 +1464,7 @@ bool ZRCola::DBSource::SelectHighlights(short set, winstd::com_obj<ADORecordset>
bool ZRCola::DBSource::GetHighlight(const com_obj<ADORecordset>& rs, ZRCola::DBSource::highlight& h) const bool ZRCola::DBSource::GetHighlight(const com_obj<ADORecordset>& rs, ZRCola::DBSource::highlight& h) const
{ {
wxASSERT_MSG(rs, wxT("recordset is empty")); wxASSERT_MSG(rs.valid(), wxT("recordset is empty"));
com_obj<ADOFields> flds; com_obj<ADOFields> flds;
wxVERIFY(SUCCEEDED(rs->get_Fields(&flds))); wxVERIFY(SUCCEEDED(rs->get_Fields(&flds)));

View File

@@ -16,6 +16,7 @@
#include <WinStd/COM.h> #include <WinStd/COM.h>
#include <WinStd/Win.h> #include <WinStd/Win.h>
#include <stdex/string.hpp>
#include <wxex/common.h> #include <wxex/common.h>
#pragma warning(push) #pragma warning(push)
@@ -45,45 +46,41 @@ namespace ZRCola {
/// ///
/// Character sequence /// Character sequence
/// ///
class charseq { struct charseq {
public: short rank = 0; ///< Sequence rank
short rank; ///< Sequence rank
std::wstring str; ///< Sequence string std::wstring str; ///< Sequence string
inline charseq() : charseq() = default;
rank(0)
{
}
inline charseq(_In_ short _rank, _In_z_ const wchar_t *_str) : charseq(_In_ short _rank, _In_z_ const wchar_t *_str) :
rank(_rank), rank(_rank),
str (_str) str (_str)
{ {
} }
inline charseq(_In_ short _rank, _In_ const std::wstring &_str) : charseq(_In_ short _rank, _In_ const std::wstring &_str) :
rank(_rank), rank(_rank),
str (_str) str (_str)
{ {
} }
inline charseq(_In_ short _rank, _Inout_ std::wstring &&_str) : charseq(_In_ short _rank, _Inout_ std::wstring &&_str) :
rank(_rank), rank(_rank),
str (std::move(_str)) str (std::move(_str))
{ {
} }
inline bool operator==(_In_ const charseq &other) const bool operator==(_In_ const charseq &other) const
{ {
return rank == other.rank && str == other.str; return rank == other.rank && str == other.str;
} }
inline bool operator!=(_In_ const charseq &other) const bool operator!=(_In_ const charseq &other) const
{ {
return !operator==(other); return !operator==(other);
} }
inline bool operator<(_In_ const charseq &other) const bool operator<(_In_ const charseq &other) const
{ {
if (rank < other.rank) return true; if (rank < other.rank) return true;
else if (rank > other.rank) return false; else if (rank > other.rank) return false;
@@ -91,17 +88,17 @@ namespace ZRCola {
else return false; else return false;
} }
inline bool operator<=(_In_ const charseq &other) const bool operator<=(_In_ const charseq &other) const
{ {
return !operator>(other); return !operator>(other);
} }
inline bool operator>(_In_ const charseq &other) const bool operator>(_In_ const charseq &other) const
{ {
return other.operator<(*this); return other.operator<(*this);
} }
inline bool operator>=(_In_ const charseq &other) const bool operator>=(_In_ const charseq &other) const
{ {
return !operator<(other); return !operator<(other);
} }
@@ -111,44 +108,32 @@ namespace ZRCola {
/// ///
/// Translation /// Translation
/// ///
class translation { struct translation {
public: short set = (short)ZRCOLA_TRANSETID_DEFAULT; ///< Translation set ID
short set; ///< Translation set ID
charseq src; ///< Source sequence charseq src; ///< Source sequence
std::string norm; ///< Normalization footprint std::string norm; ///< Normalization footprint
charseq dst; ///< Destination sequence charseq dst; ///< Destination sequence
inline translation() : set((short)ZRCOLA_TRANSETID_DEFAULT) {}
}; };
/// ///
/// Translation set /// Translation set
/// ///
class transet { struct transet {
public: short set = (short)ZRCOLA_TRANSETID_DEFAULT; ///< ID
short set; ///< ID
std::wstring src; ///< Source name std::wstring src; ///< Source name
std::wstring dst; ///< Destination name std::wstring dst; ///< Destination name
inline transet() : set((short)ZRCOLA_TRANSETID_DEFAULT) {}
}; };
/// ///
/// Translation sequence /// Translation sequence
/// ///
class transeq { struct transeq {
public: short seq = 0; ///< ID
short seq; ///< ID short rank = 0; ///< Rank
short rank; ///< Rank
std::wstring name; ///< Name std::wstring name; ///< Name
std::vector<short> sets; ///< Sets std::vector<short> sets; ///< Sets
inline transeq() :
seq(0),
rank(0)
{}
}; };
@@ -161,8 +146,7 @@ namespace ZRCola {
/// ///
/// Key sequence /// Key sequence
/// ///
class keyseq { struct keyseq {
public:
/// ///
/// Key code /// Key code
/// ///
@@ -175,7 +159,7 @@ namespace ZRCola {
/// ///
/// Translates keycode from Slovenian to English keyboard /// Translates keycode from Slovenian to English keyboard
/// ///
inline static wchar_t translate_slen(_In_ wchar_t key) static wchar_t translate_slen(_In_ wchar_t key)
{ {
switch (key) { switch (key) {
case L'Z': return L'Y'; case L'Z': return L'Y';
@@ -187,7 +171,6 @@ namespace ZRCola {
} }
}; };
public:
std::wstring chr; ///< Character std::wstring chr; ///< Character
std::vector<keycode> seq; ///< Key sequence std::vector<keycode> seq; ///< Key sequence
}; };
@@ -196,74 +179,67 @@ namespace ZRCola {
/// ///
/// Language /// Language
/// ///
class language { struct language {
public:
ZRCola::langid_t lang; ///< Language ID ZRCola::langid_t lang; ///< Language ID
std::wstring name; ///< Name std::wstring name; ///< Name
inline language() : lang(ZRCola::langid_t::blank) {}
}; };
/// ///
/// Language Character /// Language Character
/// ///
class langchar { struct langchar {
public:
std::wstring chr; ///> Character std::wstring chr; ///> Character
ZRCola::langid_t lang; ///< Language ID ZRCola::langid_t lang; ///< Language ID
inline langchar() : lang(ZRCola::langid_t::blank) {}
}; };
/// ///
/// Character group /// Character group
/// ///
class chrgrp { struct chrgrp {
public: short grp = 0; ///< Character group ID
short grp; ///< Character group ID short rank = 0; ///< Rank
short rank; ///< Rank std::wstring name; ///< Name
std::wstring name; ///< Name std::vector<wchar_t> chars; ///< Characters (zero-delimited)
std::vector<wchar_t> chars; ///< Characters (zero-delimited) std::vector<uint16_t> show; ///< Bit vector if particular character from \c chars is displayed initially
std::vector<unsigned __int16> show; ///< Bit vector if particular character from \c chars is displayed initially
inline chrgrp() : grp(0), rank(0) {}
}; };
/// ///
/// Character data /// Character data
/// ///
class character_data { struct 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::wstring desc; ///< Character description
std::set<std::wstring> terms; ///< Search terms std::set<std::wstring> terms; ///< Search terms
std::set<std::wstring> terms_rel; ///< Relevant terms for relating characters std::set<std::wstring> terms_rel; ///< Relevant terms for relating characters
std::vector<wchar_t> rel; ///< Related characters (zero-delimited) std::vector<wchar_t> rel; ///< Related characters (zero-delimited)
short blk = 0; ///> Block ID
}; };
///
/// Character block
///
struct chrblk_data {
short id = 0; ///> Block ID
char32_t chr_end = 0; ///> Last character in the block
short rank = 0; ///< Rank
std::wstring name; ///< Name
bool used = false; ///< Are there any characters from this block
};
///
/// Character block
///
using chrblk = std::pair<char32_t, chrblk_data>;
/// ///
/// Character /// Character
/// ///
typedef std::pair<std::wstring, character_data> character; using character = std::pair<std::wstring, character_data>;
/// ///
@@ -275,12 +251,12 @@ namespace ZRCola {
void build_related(); void build_related();
protected: protected:
class build_related_worker : public winstd::win_handle<INVALID_HANDLE_VALUE> class build_related_worker : public winstd::thread
{ {
public: public:
build_related_worker(_In_ const character_bank *cb, _In_ iterator from, _In_ iterator to); build_related_worker(_In_ const character_bank &cb, _In_ iterator from, _In_ iterator to);
inline void join() void join()
{ {
if (m_h != invalid) if (m_h != invalid)
WaitForSingleObject(m_h, INFINITE); WaitForSingleObject(m_h, INFINITE);
@@ -298,29 +274,27 @@ namespace ZRCola {
static unsigned int __stdcall process(_In_ void *param); static unsigned int __stdcall process(_In_ void *param);
protected: protected:
const character_bank *m_cb; const character_bank &m_cb;
iterator m_from, m_to; iterator m_from, m_to;
winstd::heap m_heap; winstd::heap m_heap;
}; };
public:
std::map<char32_t, chrblk_data> idxChrBlk;
}; };
/// ///
/// Character description index key comparator /// Character comparator
/// ///
struct character_desc_idx_less : public std::binary_function<std::wstring, std::wstring, bool> struct character_less
{ {
inline bool operator()(const std::wstring& _Left, const std::wstring& _Right) const bool operator()(const std::wstring& a, const std::wstring& b) const
{ {
size_t auto &coll = std::use_facet<std::collate<wchar_t>>(std::locale());
_Left_len = _Left .size(), return coll.compare(
_Right_len = _Right.size(); a.data(), a.data() + a.size(),
b.data(), b.data() + b.size()) < 0;
int r = _wcsncoll(_Left.c_str(), _Right.c_str(), std::min<size_t>(_Left_len, _Right_len));
if (r != 0 ) return r < 0;
else if (_Left_len < _Right_len) return true;
return false;
} }
}; };
@@ -328,22 +302,22 @@ namespace ZRCola {
/// ///
/// Character description index /// Character description index
/// ///
class character_desc_idx : public std::map<std::wstring, std::vector<wchar_t>, character_desc_idx_less> class character_desc_idx : public std::map<std::wstring, std::vector<wchar_t>, character_less>
{ {
public: public:
static void parse_keywords(_In_ const wchar_t *str, _Inout_ std::set<std::wstring> &terms); static void parse_keywords(_In_ const wchar_t *str, _Inout_ std::set<std::wstring> &terms);
void add_keywords(const std::set<std::wstring> &terms, const std::wstring &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) void add_keywords(const wchar_t *str, const std::wstring &chr, size_t sub = 0)
{ {
std::set<std::wstring> terms; std::set<std::wstring> terms;
parse_keywords(str, terms); parse_keywords(str, terms);
add_keywords(terms, chr, sub); add_keywords(terms, chr, sub);
} }
void save(ZRCola::textindex<wchar_t, wchar_t, unsigned __int32> &idx) const; void save(ZRCola::textindex<wchar_t, wchar_t, uint32_t> &idx) const;
protected: protected:
inline void add_keyword(const std::wstring &term, const std::wstring &chr) void add_keyword(const std::wstring &term, const std::wstring &chr)
{ {
iterator idx = find(term); iterator idx = find(term);
if (idx == end()) { if (idx == end()) {
@@ -352,7 +326,7 @@ namespace ZRCola {
} else { } else {
// Append to existing keyword. // Append to existing keyword.
auto &val = idx->second; auto &val = idx->second;
for (mapped_type::size_type i = 0, n = val.size(); ; i += wcsnlen(val.data() + i, n - i) + 1) { for (mapped_type::size_type i = 0, n = val.size(); ; i += stdex::strnlen(val.data() + i, n - i) + 1) {
if (i >= n) { if (i >= n) {
// End-of-values reached. Append character. // End-of-values reached. Append character.
val.insert(val.end(), chr.data(), chr.data() + chr.length() + 1); val.insert(val.end(), chr.data(), chr.data() + chr.length() + 1);
@@ -367,52 +341,30 @@ namespace ZRCola {
}; };
///
/// Character category
///
class chrcat {
public:
ZRCola::chrcatid_t cat; ///> Category ID
short rank; ///< Rank
std::wstring name; ///< Name
inline chrcat() : cat(ZRCola::chrcatid_t::blank), rank(0) {}
};
/// ///
/// Character tag /// Character tag
/// ///
class chrtag { struct chrtag {
public:
std::wstring chr; ///> Character std::wstring chr; ///> Character
short tag; ///< Tag ID short tag = 0; ///< Tag ID
inline chrtag() : tag(0) {}
}; };
/// ///
/// Tag name /// Tag name
/// ///
class tagname { struct tagname {
public: short tag = 0; ///< Tag ID
short tag; ///< Tag ID
std::map<LCID, std::list<std::wstring> > names; ///< Names std::map<LCID, std::list<std::wstring> > names; ///< Names
inline tagname() : tag(0) {}
}; };
/// ///
/// Highlight /// Highlight
/// ///
class highlight { struct highlight {
public: short set = (short)ZRCOLA_HLGHTSETID_DEFAULT; ///< Highlight set ID
short set; ///< Highlight set ID std::wstring chr; ///< Character sequence
std::wstring chr; ///< Character sequence
inline highlight() : set((short)ZRCOLA_HLGHTSETID_DEFAULT) {}
}; };
@@ -445,7 +397,7 @@ namespace ZRCola {
/// - true when at end /// - true when at end
/// - false otherwise /// - false otherwise
/// ///
static inline bool IsEOF(const winstd::com_obj<ADORecordset>& rs) static bool IsEOF(const winstd::com_obj<ADORecordset>& rs)
{ {
VARIANT_BOOL eof = VARIANT_TRUE; VARIANT_BOOL eof = VARIANT_TRUE;
return FAILED(rs->get_EOF(&eof)) || eof ? true : false; return FAILED(rs->get_EOF(&eof)) || eof ? true : false;
@@ -458,7 +410,7 @@ namespace ZRCola {
/// ///
/// \returns Number of records /// \returns Number of records
/// ///
static inline size_t GetRecordsetCount(const winstd::com_obj<ADORecordset>& rs) static size_t GetRecordsetCount(const winstd::com_obj<ADORecordset>& rs)
{ {
ADO_LONGPTR count; ADO_LONGPTR count;
return SUCCEEDED(rs->get_RecordCount(&count)) ? count : (size_t)-1; return SUCCEEDED(rs->get_RecordCount(&count)) ? count : (size_t)-1;
@@ -522,10 +474,10 @@ namespace ZRCola {
/// - true when successful /// - true when successful
/// - false otherwise /// - false otherwise
/// ///
bool GetUnicodeCharacter(const winstd::com_obj<ADOField>& f, wchar_t& chr) const; bool GetUnicodeCharacter(const winstd::com_obj<ADOField>& f, char32_t& chr) const;
/// ///
/// Gets encoded Unicode string from ZRCola.zrc database /// Gets encoded UTF-16 string from ZRCola.zrc database
/// ///
/// \param[in] f Data field /// \param[in] f Data field
/// \param[out] str Output string /// \param[out] str Output string
@@ -560,18 +512,6 @@ namespace ZRCola {
/// ///
bool GetLanguage(const winstd::com_obj<ADOField>& f, langid_t& lang) const; bool GetLanguage(const winstd::com_obj<ADOField>& f, langid_t& lang) const;
///
/// Gets character category ID from ZRCola.zrc database
///
/// \param[in] f Data field
/// \param[out] cc Character category
///
/// \returns
/// - true when successful
/// - false otherwise
///
bool GetChrCat(const winstd::com_obj<ADOField>& f, chrcatid_t& cc) const;
/// ///
/// Gets tag names from ZRCola.zrc database /// Gets tag names from ZRCola.zrc database
/// ///
@@ -804,7 +744,7 @@ namespace ZRCola {
bool GetCharacter(const winstd::com_obj<ADORecordset>& rs, character& chr) const; bool GetCharacter(const winstd::com_obj<ADORecordset>& rs, character& chr) const;
/// ///
/// Returns character categories /// Returns character blocks
/// ///
/// \param[out] rs Recordset with results /// \param[out] rs Recordset with results
/// ///
@@ -812,19 +752,19 @@ namespace ZRCola {
/// - true when query succeeds /// - true when query succeeds
/// - false otherwise /// - false otherwise
/// ///
bool SelectCharacterCategories(winstd::com_obj<ADORecordset>& rs) const; bool SelectCharacterBlocks(winstd::com_obj<ADORecordset>& rs) const;
/// ///
/// Returns character category data /// Returns character block data
/// ///
/// \param[in] rs Recordset with results /// \param[in] rs Recordset with results
/// \param[out] cc Character category /// \param[out] cb Character block
/// ///
/// \returns /// \returns
/// - true when succeeded /// - true when succeeded
/// - false otherwise /// - false otherwise
/// ///
bool GetCharacterCategory(const winstd::com_obj<ADORecordset>& rs, chrcat& cc) const; bool GetCharacterBlock(const winstd::com_obj<ADORecordset>& rs, chrblk& cb) const;
/// ///
/// Returns character tags /// Returns character tags
@@ -841,7 +781,7 @@ namespace ZRCola {
/// Returns character tag data /// Returns character tag data
/// ///
/// \param[in] rs Recordset with results /// \param[in] rs Recordset with results
/// \param[out] cc Character tag /// \param[out] tc Character tag
/// ///
/// \returns /// \returns
/// - true when succeeded /// - true when succeeded
@@ -920,16 +860,16 @@ namespace ZRCola {
inline ZRCola::translation_db& operator<<(_Inout_ ZRCola::translation_db &db, _In_ const ZRCola::DBSource::translation &rec) inline ZRCola::translation_db& operator<<(_Inout_ ZRCola::translation_db &db, _In_ const ZRCola::DBSource::translation &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.set); db.data.push_back((uint16_t)rec.set);
db.data.push_back((unsigned __int16)rec.dst.rank); db.data.push_back((uint16_t)rec.dst.rank);
db.data.push_back((unsigned __int16)rec.src.rank); db.data.push_back((uint16_t)rec.src.rank);
std::wstring::size_type n = rec.dst.str.length(); std::wstring::size_type n = rec.dst.str.length();
wxASSERT_MSG(n <= 0xffff, wxT("destination overflow")); wxASSERT_MSG(n <= 0xffff, wxT("destination overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.src.str.length(); n += rec.src.str.length();
wxASSERT_MSG(n <= 0xffff, wxT("source overflow")); wxASSERT_MSG(n <= 0xffff, wxT("source overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.dst.str.cbegin(), rec.dst.str.cend()); 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.data.insert(db.data.end(), rec.src.str.cbegin(), rec.src.str.cend());
db.idxSrc.push_back(idx); db.idxSrc.push_back(idx);
@@ -941,14 +881,14 @@ inline ZRCola::translation_db& operator<<(_Inout_ ZRCola::translation_db &db, _I
inline ZRCola::transet_db& operator<<(_Inout_ ZRCola::transet_db &db, _In_ const ZRCola::DBSource::transet &rec) inline ZRCola::transet_db& operator<<(_Inout_ ZRCola::transet_db &db, _In_ const ZRCola::DBSource::transet &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.set); db.data.push_back((uint16_t)rec.set);
std::wstring::size_type n = rec.src.length(); std::wstring::size_type n = rec.src.length();
wxASSERT_MSG(n <= 0xffff, wxT("translation set source name overflow")); wxASSERT_MSG(n <= 0xffff, wxT("translation set source name overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.dst.length(); n += rec.dst.length();
wxASSERT_MSG(n <= 0xffff, wxT("translation set destination name overflow")); wxASSERT_MSG(n <= 0xffff, wxT("translation set destination name overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.src.cbegin(), rec.src.cend()); 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.data.insert(db.data.end(), rec.dst.cbegin(), rec.dst.cend());
db.idxTranSet.push_back(idx); db.idxTranSet.push_back(idx);
@@ -959,18 +899,18 @@ inline ZRCola::transet_db& operator<<(_Inout_ ZRCola::transet_db &db, _In_ const
inline ZRCola::transeq_db& operator<<(_Inout_ ZRCola::transeq_db &db, _In_ const ZRCola::DBSource::transeq &rec) inline ZRCola::transeq_db& operator<<(_Inout_ ZRCola::transeq_db &db, _In_ const ZRCola::DBSource::transeq &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.seq); db.data.push_back((uint16_t)rec.seq);
db.data.push_back((unsigned __int16)rec.rank); db.data.push_back((uint16_t)rec.rank);
std::wstring::size_type n = rec.name.length(); std::wstring::size_type n = rec.name.length();
wxASSERT_MSG(n <= 0xffff, wxT("translation sequence name overflow")); wxASSERT_MSG(n <= 0xffff, wxT("translation sequence name overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.sets.size(); n += rec.sets.size();
wxASSERT_MSG(n <= 0xffff, wxT("translation sequence sets overflow")); wxASSERT_MSG(n <= 0xffff, wxT("translation sequence sets overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend()); db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend());
for (auto s = rec.sets.cbegin(), s_end = rec.sets.cend(); s != s_end; ++s) for (auto s = rec.sets.cbegin(), s_end = rec.sets.cend(); s != s_end; ++s)
db.data.push_back((unsigned __int16)*s); db.data.push_back((uint16_t)*s);
db.idxTranSeq.push_back(idx); db.idxTranSeq.push_back(idx);
db.idxRank .push_back(idx); db.idxRank .push_back(idx);
@@ -980,13 +920,13 @@ inline ZRCola::transeq_db& operator<<(_Inout_ ZRCola::transeq_db &db, _In_ const
inline ZRCola::keyseq_db& operator<<(_Inout_ ZRCola::keyseq_db &db, _In_ const ZRCola::DBSource::keyseq &rec) inline ZRCola::keyseq_db& operator<<(_Inout_ ZRCola::keyseq_db &db, _In_ const ZRCola::DBSource::keyseq &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
std::wstring::size_type n = rec.chr.length(); std::wstring::size_type n = rec.chr.length();
wxASSERT_MSG(n <= 0xffff, wxT("character overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.seq.size() * sizeof(ZRCola::keyseq_db::keyseq::key_t) / sizeof(wchar_t); n += rec.seq.size() * sizeof(ZRCola::keyseq_db::keyseq::key_t) / sizeof(wchar_t);
wxASSERT_MSG(n <= 0xffff, wxT("key sequence overflow")); wxASSERT_MSG(n <= 0xffff, wxT("key sequence overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend()); 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) { 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->key);
@@ -1004,11 +944,11 @@ inline ZRCola::keyseq_db& operator<<(_Inout_ ZRCola::keyseq_db &db, _In_ const Z
inline ZRCola::language_db& operator<<(_Inout_ ZRCola::language_db &db, _In_ const ZRCola::DBSource::language &rec) inline ZRCola::language_db& operator<<(_Inout_ ZRCola::language_db &db, _In_ const ZRCola::DBSource::language &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t 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)); db.data.insert(db.data.end(), reinterpret_cast<const uint16_t*>(&rec.lang), reinterpret_cast<const uint16_t*>(&rec.lang + 1));
std::wstring::size_type n = rec.name.length(); std::wstring::size_type n = rec.name.length();
wxASSERT_MSG(n <= 0xffff, wxT("language name overflow")); wxASSERT_MSG(n <= 0xffff, wxT("language name overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend()); db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend());
db.idxLang.push_back(idx); db.idxLang.push_back(idx);
@@ -1018,11 +958,11 @@ inline ZRCola::language_db& operator<<(_Inout_ ZRCola::language_db &db, _In_ con
inline ZRCola::langchar_db& operator<<(_Inout_ ZRCola::langchar_db &db, _In_ const ZRCola::DBSource::langchar &rec) inline ZRCola::langchar_db& operator<<(_Inout_ ZRCola::langchar_db &db, _In_ const ZRCola::DBSource::langchar &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t 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)); db.data.insert(db.data.end(), reinterpret_cast<const uint16_t*>(&rec.lang), reinterpret_cast<const uint16_t*>(&rec.lang + 1));
std::wstring::size_type n = rec.chr.length(); std::wstring::size_type n = rec.chr.length();
wxASSERT_MSG(n <= 0xffff, wxT("character overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend()); db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend());
db.idxChr .push_back(idx); db.idxChr .push_back(idx);
#ifdef ZRCOLA_LANGCHAR_LANG_IDX #ifdef ZRCOLA_LANGCHAR_LANG_IDX
@@ -1035,15 +975,15 @@ inline ZRCola::langchar_db& operator<<(_Inout_ ZRCola::langchar_db &db, _In_ con
inline ZRCola::chrgrp_db& operator<<(_Inout_ ZRCola::chrgrp_db &db, _In_ const ZRCola::DBSource::chrgrp &rec) inline ZRCola::chrgrp_db& operator<<(_Inout_ ZRCola::chrgrp_db &db, _In_ const ZRCola::DBSource::chrgrp &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.grp); db.data.push_back((uint16_t)rec.grp);
db.data.push_back((unsigned __int16)rec.rank); db.data.push_back((uint16_t)rec.rank);
std::wstring::size_type n = rec.name.length(); std::wstring::size_type n = rec.name.length();
wxASSERT_MSG(n <= 0xffff, wxT("character group name overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character group name overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.chars.size(); n += rec.chars.size();
wxASSERT_MSG(n <= 0xffff, wxT("character group characters overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character group characters overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.name .cbegin(), rec.name .cend()); 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.chars.cbegin(), rec.chars.cend());
db.data.insert(db.data.end(), rec.show .cbegin(), rec.show .cend()); db.data.insert(db.data.end(), rec.show .cbegin(), rec.show .cend());
@@ -1055,17 +995,17 @@ inline ZRCola::chrgrp_db& operator<<(_Inout_ ZRCola::chrgrp_db &db, _In_ const Z
inline ZRCola::character_db& operator<<(_Inout_ ZRCola::character_db &db, _In_ const ZRCola::DBSource::character &rec) inline ZRCola::character_db& operator<<(_Inout_ ZRCola::character_db &db, _In_ const ZRCola::DBSource::character &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t 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)); db.data.push_back((uint16_t)rec.second.blk);
std::wstring::size_type n = rec.first.length(); std::wstring::size_type n = rec.first.length();
wxASSERT_MSG(n <= 0xffff, wxT("character overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.second.desc.length(); n += rec.second.desc.length();
wxASSERT_MSG(n <= 0xffff, wxT("character description overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character description overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
n += rec.second.rel.size(); n += rec.second.rel.size();
wxASSERT_MSG(n <= 0xffff, wxT("related characters overflow")); wxASSERT_MSG(n <= 0xffff, wxT("related characters overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.first .cbegin(), rec.first .cend()); 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.desc.cbegin(), rec.second.desc.cend());
db.data.insert(db.data.end(), rec.second.rel .cbegin(), rec.second.rel .cend()); db.data.insert(db.data.end(), rec.second.rel .cbegin(), rec.second.rel .cend());
@@ -1075,17 +1015,27 @@ inline ZRCola::character_db& operator<<(_Inout_ ZRCola::character_db &db, _In_ c
} }
inline ZRCola::chrcat_db& operator<<(_Inout_ ZRCola::chrcat_db &db, _In_ const ZRCola::DBSource::chrcat &rec) inline ZRCola::chrblk_db& operator<<(_Inout_ ZRCola::chrblk_db &db, _In_ const ZRCola::DBSource::chrblk &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t 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)); db.data.push_back((uint16_t)rec.second.id);
db.data.push_back((unsigned __int16)rec.rank); db.data.push_back((uint16_t)rec.second.rank);
std::wstring::size_type n = rec.name.length(); std::wstring::size_type n = rec.first >= 0x10000 ? 2 : 1;
wxASSERT_MSG(n <= 0xffff, wxT("character category name overflow")); db.data.push_back((uint16_t)n);
db.data.push_back((unsigned __int16)n); n += rec.second.name.length();
db.data.insert(db.data.end(), rec.name.cbegin(), rec.name.cend()); wxASSERT_MSG(n <= 0xffff, wxT("character block name overflow"));
db.idxChrCat.push_back(idx); db.data.push_back((uint16_t)n);
db.idxRank .push_back(idx); if (rec.first < 0x10000)
db.data.push_back((uint16_t)rec.first);
else {
stdex::utf16_t buf[2];
stdex::ucs4_to_surrogate_pair(buf, rec.first);
db.data.insert(db.data.end(), &buf[0], &buf[2]);
}
db.data.insert(db.data.end(), rec.second.name.cbegin(), rec.second.name.cend());
db.idxChrId.push_back(idx);
db.idxFirst.push_back(idx);
db.idxRank .push_back(idx);
return db; return db;
} }
@@ -1093,11 +1043,11 @@ inline ZRCola::chrcat_db& operator<<(_Inout_ ZRCola::chrcat_db &db, _In_ const Z
inline ZRCola::chrtag_db& operator<<(_Inout_ ZRCola::chrtag_db &db, _In_ const ZRCola::DBSource::chrtag &rec) inline ZRCola::chrtag_db& operator<<(_Inout_ ZRCola::chrtag_db &db, _In_ const ZRCola::DBSource::chrtag &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.tag); db.data.push_back((uint16_t)rec.tag);
std::wstring::size_type n = rec.chr.length(); std::wstring::size_type n = rec.chr.length();
wxASSERT_MSG(n <= 0xffff, wxT("character overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend()); db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend());
db.idxChr.push_back(idx); db.idxChr.push_back(idx);
db.idxTag.push_back(idx); db.idxTag.push_back(idx);
@@ -1110,13 +1060,13 @@ inline ZRCola::tagname_db& operator<<(_Inout_ ZRCola::tagname_db &db, _In_ const
{ {
for (auto ln = rec.names.cbegin(), ln_end = rec.names.cend(); ln != ln_end; ++ln) { 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) { for (auto nm = ln->second.cbegin(), nm_end = ln->second.cend(); nm != nm_end; ++nm) {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.tag); db.data.push_back((uint16_t)rec.tag);
db.data.push_back(LOWORD(ln->first)); db.data.push_back(LOWORD(ln->first));
db.data.push_back(HIWORD(ln->first)); db.data.push_back(HIWORD(ln->first));
std::wstring::size_type n = nm->length(); std::wstring::size_type n = nm->length();
wxASSERT_MSG(n <= 0xffff, wxT("tag name overflow")); wxASSERT_MSG(n <= 0xffff, wxT("tag name overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), nm->cbegin(), nm->cend()); db.data.insert(db.data.end(), nm->cbegin(), nm->cend());
db.idxName.push_back(idx); db.idxName.push_back(idx);
db.idxTag .push_back(idx); db.idxTag .push_back(idx);
@@ -1129,11 +1079,11 @@ inline ZRCola::tagname_db& operator<<(_Inout_ ZRCola::tagname_db &db, _In_ const
inline ZRCola::highlight_db& operator<<(_Inout_ ZRCola::highlight_db &db, _In_ const ZRCola::DBSource::highlight &rec) inline ZRCola::highlight_db& operator<<(_Inout_ ZRCola::highlight_db &db, _In_ const ZRCola::DBSource::highlight &rec)
{ {
unsigned __int32 idx = db.data.size(); uint32_t idx = db.data.size();
db.data.push_back((unsigned __int16)rec.set); db.data.push_back((uint16_t)rec.set);
std::wstring::size_type n = rec.chr.length(); std::wstring::size_type n = rec.chr.length();
wxASSERT_MSG(n <= 0xffff, wxT("character overflow")); wxASSERT_MSG(n <= 0xffff, wxT("character overflow"));
db.data.push_back((unsigned __int16)n); db.data.push_back((uint16_t)n);
db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend()); db.data.insert(db.data.end(), rec.chr.cbegin(), rec.chr.cend());
db.idxChr.push_back(idx); db.idxChr.push_back(idx);

View File

@@ -745,8 +745,6 @@ int _tmain(int argc, _TCHAR *argv[])
} }
} }
set<ZRCola::chrcatid_t> categories_used;
{ {
// Get characters. // Get characters.
com_obj<ADORecordset> rs; com_obj<ADORecordset> rs;
@@ -756,7 +754,32 @@ int _tmain(int argc, _TCHAR *argv[])
ZRCola::DBSource::character_desc_idx idxChrDsc, idxChrDscSub; ZRCola::DBSource::character_desc_idx idxChrDsc, idxChrDscSub;
ZRCola::DBSource::character_bank chrs; ZRCola::DBSource::character_bank chrs;
// Phase 1: Parse characters and build indexes. // Phase 1: Get character blocks.
com_obj<ADORecordset> rs2;
if (src.SelectCharacterBlocks(rs2)) {
size_t count2 = src.GetRecordsetCount(rs2);
if (count2 < 0xffffffff) { // 4G check (-1 is reserved for error condition)
// Parse character blocks and build index and data.
for (; !ZRCola::DBSource::IsEOF(rs2); rs2->MoveNext()) {
// Read character block from the database.
ZRCola::DBSource::chrblk cb;
if (src.GetCharacterBlock(rs2, cb))
chrs.idxChrBlk[cb.first] = std::move(cb.second);
else
has_errors = true;
}
}
else {
_ftprintf(stderr, wxT("%s: error ZCC0029: Error getting character block count from database or too many character blocks.\n"), (LPCTSTR)filenameIn.c_str());
has_errors = true;
}
}
else {
_ftprintf(stderr, wxT("%s: error ZCC0028: Error getting character blocks from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
has_errors = true;
}
// Phase 2: Parse characters and build indexes.
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) { for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
// Read character from the database. // Read character from the database.
ZRCola::DBSource::character chr; ZRCola::DBSource::character chr;
@@ -766,33 +789,63 @@ int _tmain(int argc, _TCHAR *argv[])
has_errors = true; has_errors = true;
} }
// Phase 2: Build related character lists. // Phase 3: Build related character lists.
chrs.build_related(); chrs.build_related();
ZRCola::character_db db; {
ZRCola::character_db db;
// Preallocate memory. // Preallocate memory.
db.idxChr.reserve(count); db.idxChr.reserve(count);
db.data .reserve(count*4); db.data.reserve(count * 4);
// Phase 3: Parse characters and build index and data. // Phase 4: Parse characters and build index and data.
for (auto chr = chrs.cbegin(), chr_end = chrs.cend(); chr != chr_end; ++chr) { for (auto chr = chrs.cbegin(), chr_end = chrs.cend(); chr != chr_end; ++chr) {
// Add character to index and data. // Add character to index and data.
db << *chr; db << *chr;
// Add description (and keywords) to index. // Add description (and keywords) to index.
idxChrDsc .add_keywords(chr->second.terms, chr->first, 0); idxChrDsc.add_keywords(chr->second.terms, chr->first, 0);
idxChrDscSub.add_keywords(chr->second.terms, chr->first, 3); idxChrDscSub.add_keywords(chr->second.terms, chr->first, 3);
}
// Mark category used. // Write characters to file.
categories_used.insert(chr->second.cat); db.idxChr.sort();
idxChrDsc.save(db.idxDsc);
idxChrDscSub.save(db.idxDscSub);
dst << ZRCola::character_rec(db);
} }
// Write characters to file. {
db.idxChr.sort(); ZRCola::chrblk_db db;
idxChrDsc .save(db.idxDsc );
idxChrDscSub.save(db.idxDscSub); // Preallocate memory.
dst << ZRCola::character_rec(db); db.idxChrId.reserve(chrs.idxChrBlk.size());
db.idxFirst.reserve(chrs.idxChrBlk.size());
db.idxRank.reserve(chrs.idxChrBlk.size());
db.data.reserve(chrs.idxChrBlk.size() * 16);
// Phase 5: Parse character blocks and build index and data.
for (auto& cb : chrs.idxChrBlk)
{
if (!cb.second.used) {
// Skip unused character blocks.
continue;
}
if (build_pot)
pot.insert(cb.second.name);
// Add character block to index and data.
db << cb;
}
// Write character blocks to file.
db.idxChrId.sort();
db.idxFirst.sort();
db.idxRank.sort();
dst << ZRCola::chrblk_rec(db);
}
} else { } else {
_ftprintf(stderr, wxT("%s: error ZCC0017: Error getting character count from database or too many characters.\n"), (LPCTSTR)filenameIn.c_str()); _ftprintf(stderr, wxT("%s: error ZCC0017: Error getting character count from database or too many characters.\n"), (LPCTSTR)filenameIn.c_str());
has_errors = true; has_errors = true;
@@ -803,52 +856,6 @@ int _tmain(int argc, _TCHAR *argv[])
} }
} }
{
// Get character categories.
com_obj<ADORecordset> rs;
if (src.SelectCharacterCategories(rs)) {
size_t count = src.GetRecordsetCount(rs);
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
ZRCola::DBSource::chrcat cc;
ZRCola::chrcat_db db;
// Preallocate memory.
db.idxChrCat.reserve(count);
db.idxRank .reserve(count);
db.data .reserve(count*4);
// Parse character categories and build index and data.
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
// Read character category from the database.
if (src.GetCharacterCategory(rs, cc)) {
if (build_pot)
pot.insert(cc.name);
if (categories_used.find(cc.cat) == categories_used.end()) {
// Skip empty character categories.
continue;
}
// Add character category to index and data.
db << cc;
} else
has_errors = true;
}
// Write character categories to file.
db.idxChrCat.sort();
db.idxRank .sort();
dst << ZRCola::chrcat_rec(db);
} else {
_ftprintf(stderr, wxT("%s: error ZCC0019: Error getting character category count from database or too many character categories.\n"), (LPCTSTR)filenameIn.c_str());
has_errors = true;
}
} else {
_ftprintf(stderr, wxT("%s: error ZCC0018: Error getting character categories from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
has_errors = true;
}
}
{ {
// Get characters tags. // Get characters tags.
com_obj<ADORecordset> rs; com_obj<ADORecordset> rs;
@@ -981,10 +988,10 @@ int _tmain(int argc, _TCHAR *argv[])
<< "\"Content-Transfer-Encoding: 8bit\\n\"" << endl << "\"Content-Transfer-Encoding: 8bit\\n\"" << endl
<< "\"X-Generator: ZRColaCompile\\n\"" << endl; << "\"X-Generator: ZRColaCompile\\n\"" << endl;
wstring_convert<codecvt_utf8<wchar_t>> conv; charset_encoder<wchar_t, char> conv(stdex::wchar_t_charset, charset_id::utf8);
for (auto p = pot.cbegin(); p != pot.cend(); ++p) { for (auto p = pot.cbegin(); p != pot.cend(); ++p) {
// Convert UTF-16 to UTF-8 and escape. // Convert UTF-16 to UTF-8 and escape.
string t(conv.to_bytes(*p)), u; string t(conv.convert(*p)), u;
for (size_t i = 0, n = t.size(); i < n; i++) { for (size_t i = 0, n = t.size(); i < n; i++) {
char c = t[i]; char c = t[i];
switch (c) { switch (c) {

View File

@@ -20,7 +20,7 @@
#include <wx/intl.h> #include <wx/intl.h>
#pragma warning(pop) #pragma warning(pop)
#include <stdex/idrec> #include <zrcola/idrec.h>
#include <WinStd/Common.h> #include <WinStd/Common.h>

View File

@@ -39,7 +39,7 @@
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<IntDir>temp\$(ProjectName).$(Platform).$(Configuration).$(PlatformToolset)\</IntDir> <IntDir>temp\$(ProjectName).$(Platform).$(Configuration)\</IntDir>
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir> <OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup> <ItemDefinitionGroup>

3
ZRColaWS/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/*.d
/*.o
/zrcolaws

91
ZRColaWS/Makefile Normal file
View File

@@ -0,0 +1,91 @@
CPPFLAGS := $(CPPFLAGS) -I../lib/libZRCola/include -I../lib/stdex/include -I../lib/oatpp-swagger/src -I../lib/oatpp/src
LDFLAGS := $(LDFLAGS) -L../lib/libZRCola/lib -L../lib/oatpp-swagger/build/src -L../lib/oatpp/build/src
LDLIBS := $(LDLIBS) -lZRCola -loatpp-swagger -loatpp -lstdc++
SRCS := zrcolaws.cpp
include ../include/props.mak
.PHONY: all
all: zrcolaws
zrcolaws: \
../lib/oatpp/build/src/liboatpp.a \
../lib/oatpp-swagger/build/src/liboatpp-swagger.a \
../lib/libZRCola/lib/libZRCola.a \
$(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LDLIBS)
../lib/oatpp/build/src/liboatpp.a: ../lib/oatpp/build/Makefile
$(MAKE) $(MFLAGS) -C ../lib/oatpp/build
../lib/oatpp/build/Makefile: ../lib/oatpp/CMakeLists.txt
cmake -D OATPP_INSTALL=OFF -D OATPP_BUILD_TESTS=OFF -D OATPP_LINK_TEST_LIBRARY=OFF -S ../lib/oatpp -B ../lib/oatpp/build
../lib/oatpp-swagger/build/src/liboatpp-swagger.a: ../lib/oatpp-swagger/build/Makefile
$(MAKE) $(MFLAGS) -C ../lib/oatpp-swagger/build
../lib/oatpp-swagger/build/Makefile: ../lib/oatpp-swagger/CMakeLists.txt
cmake -D OATPP_INSTALL=OFF -D OATPP_BUILD_TESTS=OFF -D OATPP_MODULES_LOCATION=CUSTOM -D OATPP_DIR_SRC=${CURDIR}/../lib/oatpp/src -D OATPP_DIR_LIB=${CURDIR}/../lib/oatpp/build/src -S ../lib/oatpp-swagger -B ../lib/oatpp-swagger/build
../lib/libZRCola/lib/libZRCola.a:
$(MAKE) $(MFLAGS) -C ../lib/libZRCola/build
.PHONY: install
install: zrcolaws ../output/data/ZRCola.zrcdb
install -d $(PREFIX)/bin/
install -m 755 zrcolaws $(PREFIX)/bin/
install -d $(PREFIX)/share/zrcola/
install -m 644 ../output/data/ZRCola.zrcdb $(PREFIX)/share/zrcola/
install -d $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/favicon-16x16.png $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/favicon-32x32.png $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/index.html $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/oauth2-redirect.html $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-bundle.js $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-bundle.js.map $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle-core.js $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle-core.js.map $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle.js $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle.js.map $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-standalone-preset.js $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-standalone-preset.js.map $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.css $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.css.map $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.js $(PREFIX)/share/zrcola/res/
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.js.map $(PREFIX)/share/zrcola/res/
install -d $(PREFIX)/etc/sysconfig/
{ echo '#!/bin/sh'; \
echo ''; \
echo '# Interface to listen on. Default: localhost'; \
echo '#HOST=0.0.0.0'; \
echo ''; \
echo '# Port to listen on. Default: 54591'; \
echo '#PORT=54591'; \
echo ''; \
echo '# Additional zrcolaws command line options'; \
echo '#OPTIONS=-4'; \
} > $(PREFIX)/etc/sysconfig/zrcolaws
install -d $(PREFIX)/lib/systemd/system/
{ echo '[Unit]'; \
echo 'Description=ZRCola Web Service'; \
echo 'After=network.target'; \
echo ''; \
echo '[Service]'; \
echo 'Environment="HOST=localhost" "PORT=54591"'; \
echo 'EnvironmentFile=-$(PREFIX)/etc/sysconfig/zrcolaws'; \
echo 'DynamicUser=yes'; \
echo 'ExecStart=/usr/local/bin/zrcolaws --host $$HOST --port $$PORT $$OPTIONS'; \
echo 'Type=exec'; \
echo 'Restart=always'; \
echo ''; \
echo '[Install]'; \
echo 'WantedBy=multi-user.target'; \
echo 'RequiredBy=network.target'; \
} > $(PREFIX)/lib/systemd/system/zrcolaws.service
.PHONY: clean
clean:
-rm -r *.{d,o} zrcolaws
include ../include/targets.mak
-include $(DEPS)

23
ZRColaWS/README.md Normal file
View File

@@ -0,0 +1,23 @@
# ZRCola Web Service
## Building and Installation
1. Install prerequisites: `sudo dnf install git cmake gcc gcc-c++ make libatomic`
2. Clone this Git repository: `git clone --recursive https://git.amebis.si/Amebis/ZRCola.git`
3. Build ZRColaWS: `make -C ZRCola/ZRColaWS`
4. Install ZRColaWS: `sudo make -C ZRCola/ZRColaWS install`
5. Configure ZRColaWS by editing _/usr/local/etc/sysconfig/zrcolaws_
6. Start ZRColaWS: `sudo systemctl start zrcolaws.service`
7. Configure ZRColaWS for auto-start: `sudo systemctl enable zrcolaws.service`
8. Remember to open webservice port in firewall, should the service require external access.
## Usage
Web service API documentation is available at _http://host:port/swagger/ui_.

73
ZRColaWS/appcomponent.hpp Normal file
View File

@@ -0,0 +1,73 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include "../include/version.h"
#include "controller.hpp"
#include <oatpp-swagger/Model.hpp>
#include <oatpp-swagger/Resources.hpp>
#include <oatpp/core/base/CommandLineArguments.hpp>
#include <oatpp/core/macro/component.hpp>
#include <oatpp/network/Server.hpp>
#include <oatpp/network/tcp/server/ConnectionProvider.hpp>
#include <oatpp/parser/json/mapping/ObjectMapper.hpp>
#include <oatpp/web/server/HttpConnectionHandler.hpp>
class AppComponent
{
protected:
oatpp::network::Address m_address;
public:
AppComponent(const oatpp::network::Address& address) : m_address(address) {}
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::network::ServerConnectionProvider>, serverConnectionProvider)([this] {
return oatpp::network::tcp::server::ConnectionProvider::createShared({m_address.host, m_address.port, m_address.family});
}());
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::web::server::HttpRouter>, httpRouter)([] {
return oatpp::web::server::HttpRouter::createShared();
}());
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::network::ConnectionHandler>, serverConnectionHandler)([] {
OATPP_COMPONENT(std::shared_ptr<oatpp::web::server::HttpRouter>, router);
return oatpp::web::server::HttpConnectionHandler::createShared(router);
}());
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, apiObjectMapper)([] {
auto serializerConfig = oatpp::parser::json::mapping::Serializer::Config::createShared();
serializerConfig->escapeFlags &= ~oatpp::parser::json::Utils::FLAG_ESCAPE_UTF8CHAR;
return oatpp::parser::json::mapping::ObjectMapper::createShared(
serializerConfig,
oatpp::parser::json::mapping::Deserializer::Config::createShared());
}());
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::network::Server>, server)([] {
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ServerConnectionProvider>, connectionProvider);
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ConnectionHandler>, connectionHandler);
return oatpp::network::Server::createShared(connectionProvider, connectionHandler);
}());
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::swagger::DocumentInfo>, swaggerDocumentInfo)([] {
oatpp::swagger::DocumentInfo::Builder builder;
builder
.setTitle("ZRCola Web Service")
.setDescription(
"ZRCola is an input system designed mainly, although not exclusively, for linguistic use. "
"It allows the user to combine basic letters with any diacritic marks and insert the resulting complex characters into the texts with ease.")
.setVersion(PRODUCT_VERSION_STR)
.setContactName("ZRCola")
.setContactUrl("https://zrcola.zrc-sazu.si/en/")
.setLicenseName("GNU General Public License, Version 3")
.setLicenseUrl("https://www.gnu.org/licenses/gpl-3.0.en.html");
return builder.build();
}());
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::swagger::Resources>, swaggerResources)([] {
return oatpp::swagger::Resources::loadResources(PREFIX "/share/zrcola/res");
}());
};

243
ZRColaWS/controller.hpp Normal file
View File

@@ -0,0 +1,243 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include "../include/version.h"
#include "dto.hpp"
#include "iconverter.hpp"
#include "zrcolaws.hpp"
#include <zrcola/translate.h>
#include <oatpp/core/macro/codegen.hpp>
#include <oatpp/core/macro/component.hpp>
#include <oatpp/web/server/api/ApiController.hpp>
#include OATPP_CODEGEN_BEGIN(ApiController)
class Controller : public oatpp::web::server::api::ApiController
{
public:
Controller(const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& defaultObjectMapper, const oatpp::String &routerPrefix = nullptr) :
oatpp::web::server::api::ApiController(defaultObjectMapper, routerPrefix)
{}
ADD_CORS(getAbout)
ENDPOINT_INFO(getAbout) {
info->summary = "Returns service information";
info->addResponse<Object<dto::About>>(Status::CODE_200, "application/json");
}
ENDPOINT("GET", "/about", getAbout)
{
auto dto = dto::About::createShared();
dto->vendor = PRODUCT_CFG_VENDOR;
dto->application = PRODUCT_CFG_APPLICATION;
dto->version = PRODUCT_VERSION_STR;
return createDtoResponse(Status::CODE_200, dto);
}
ADD_CORS(getTranset)
ENDPOINT_INFO(getTranset) {
info->summary = "Lists supported translation sets";
info->description = "Each translation set describes a set of replacements that are performed to translate text from one script or encoding to another. ";
info->addResponse<oatpp::Vector<oatpp::Object<dto::TranSet>>>(Status::CODE_200, "application/json");
}
ENDPOINT("GET", "/transet", getTranset)
{
try {
utf16toutf8 c;
auto result = oatpp::Vector<oatpp::Object<dto::TranSet>>::createShared();
auto dto = dto::TranSet::createShared();
dto->set = ZRCOLA_TRANSETID_DEFAULT;
dto->src = "ZRCola Decomposed";
dto->dst = "ZRCola Composed";
result->push_back(dto);
for (size_t i = 0, n = ts_db.idxTranSet.size(); i < n; i++) {
const auto &ts = ts_db.idxTranSet[i];
dto = dto::TranSet::createShared();
dto->set = ts.set;
dto->src = c.convert(ts.src(), ts.src_len());
dto->dst = c.convert(ts.dst(), ts.dst_len());
result->push_back(dto);
}
dto = dto::TranSet::createShared();
dto->set = ZRCOLA_TRANSETID_UNICODE;
dto->src = "ZRCola Decomposed";
dto->dst = "Unicode";
result->push_back(dto);
return createDtoResponse(Status::CODE_200, result);
} catch (std::exception &ex) {
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
}
}
ADD_CORS(getLanguage)
ENDPOINT_INFO(getLanguage) {
info->summary = "Lists supported languages";
info->description = "Each language describes a set of special characters that are specific to that language (e.g. č, š, ž in Slovenian, or ä, ö, ü in German).";
info->addResponse<oatpp::Vector<oatpp::Object<dto::Language>>>(Status::CODE_200, "application/json");
}
ENDPOINT("GET", "/language", getLanguage)
{
try {
utf16toutf8 c;
auto result = oatpp::Vector<oatpp::Object<dto::Language>>::createShared();
for (size_t i = 0, n = lang_db.idxLang.size(); i < n; i++) {
const auto &lang = lang_db.idxLang[i];
auto dto = dto::Language::createShared();
dto->lang = std::string(&lang.lang.data[0], strnlen(lang.lang.data, std::size(lang.lang.data)));
dto->name = c.convert(lang.name(), lang.name_len());
result->push_back(dto);
}
return createDtoResponse(Status::CODE_200, result);
} catch (std::exception &ex) {
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
}
}
ADD_CORS(postTranslate)
ENDPOINT_INFO(postTranslate) {
info->summary = "Translate text";
info->description =
"Performs any number of supported translations (see /transet) on a given input text in a sequence. "
"Together with the output text, it also returns character index mapping between input and output texts.";
auto transet = oatpp::Vector<UInt16>::createShared();
transet->push_back(ZRCOLA_TRANSETID_DEFAULT);
auto dto = dto::TranslateIn::createShared();
dto->transet = transet;
dto->text = "To je test.";
info->addConsumes<Object<dto::TranslateIn>>("application/json")
.addExample("Perform ZRCola composition", dto);
info->addResponse<Object<dto::TranslateOut>>(Status::CODE_200, "application/json");
}
ENDPOINT("POST", "/translate", postTranslate, BODY_DTO(Object<dto::TranslateIn>, input))
{
try {
utf8toutf16 cIn;
std::u16string dst, dst2;
if (input->text)
dst = cIn.convert(*input->text);
size_t src_len = dst.size();
std::vector<ZRCola::mapping_vector> mapping;
if (input->transet) {
ZRCola::mapping_vector map;
const auto ts_end = input->transet->cend();
for (auto ts = input->transet->cbegin(); ts != ts_end; ++ts) {
switch (*ts) {
case ZRCOLA_TRANSETID_DEFAULT:
case ZRCOLA_TRANSETID_UNICODE:
// Decompose first, then re-compose.
t_db.TranslateInv(*ts, dst.data(), dst.size(), dst2, &map);
mapping.push_back(std::move(map));
map.clear();
t_db.Translate(*ts, dst2.data(), dst2.size(), dst, &map);
mapping.push_back(std::move(map));
map.clear();
break;
default:
t_db.Translate(*ts, dst.data(), dst.size(), dst2, &map);
mapping.push_back(std::move(map));
map.clear();
dst = std::move(dst2);
dst2.clear();
}
}
}
utf16toutf8 cOut;
auto dto = dto::TranslateOut::createShared();
dto->text = cOut.convert(dst);
auto map = oatpp::Vector<oatpp::UInt32>::createShared();
auto m_end = mapping.cend();
for (size_t i = 0; i < src_len; ++i) {
auto j = i;
for (auto m = mapping.cbegin(); m != m_end; ++m)
j = m->to_dst(j);
map->push_back(j);
}
dto->map = map;
return createDtoResponse(Status::CODE_200, dto);
} catch (std::exception &ex) {
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
}
}
ADD_CORS(postTranslateInv)
ENDPOINT_INFO(postTranslateInv) {
info->summary = "Inverse translate text";
info->description =
"Performs any number of supported translations (see /transet) on a given input text in a sequence in reverse. "
"Together with the output text, it also returns character index mapping between input and output texts.";
auto transet = oatpp::Vector<UInt16>::createShared();
transet->push_back(ZRCOLA_TRANSETID_DEFAULT);
auto dto = dto::TranslateIn::createShared();
dto->transet = transet;
dto->text = "T  ťᵉⓢṭ.";
dto->lang = "slv";
info->addConsumes<Object<dto::TranslateIn>>("application/json")
.addExample("Perform ZRCola decomposition", dto);
info->addResponse<Object<dto::TranslateOut>>(Status::CODE_200, "application/json");
}
ENDPOINT("POST", "/translateInv", postTranslateInv, BODY_DTO(Object<dto::TranslateIn>, input))
{
try {
utf8toutf16 cIn;
std::u16string dst, dst2;
ZRCola::langid_t lang;
if (input->text)
dst = cIn.convert(*input->text);
lang = input->lang->c_str();
size_t src_len = dst.size();
std::vector<ZRCola::mapping_vector> mapping;
if (input->transet) {
ZRCola::mapping_vector map;
const auto ts_begin = input->transet->cbegin();
for (auto ts = input->transet->cend(); (ts--) != ts_begin; ) {
switch (*ts) {
case ZRCOLA_TRANSETID_DEFAULT:
case ZRCOLA_TRANSETID_UNICODE:
t_db.TranslateInv(*ts, dst.data(), dst.size(), &lc_db, lang, dst2, &map);
dst = std::move(dst2);
dst2.clear();
map.invert();
mapping.push_back(std::move(map));
map.clear();
break;
default:
t_db.TranslateInv(*ts, dst.data(), dst.size(), dst2, &map);
dst = std::move(dst2);
dst2.clear();
map.invert();
mapping.push_back(std::move(map));
map.clear();
}
}
}
utf16toutf8 cOut;
auto dto = dto::TranslateOut::createShared();
dto->text = cOut.convert(dst);
auto map = oatpp::Vector<oatpp::UInt32>::createShared();
auto m_end = mapping.crend();
for (size_t i = 0; i < src_len; ++i) {
auto j = i;
for (auto m = mapping.crbegin(); m != m_end; ++m)
j = m->to_src(j);
map->push_back(j);
}
dto->map = map;
return createDtoResponse(Status::CODE_200, dto);
} catch (std::exception &ex) {
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
}
}
};
#include OATPP_CODEGEN_END(ApiController)

90
ZRColaWS/dto.hpp Normal file
View File

@@ -0,0 +1,90 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include <oatpp/core/data/mapping/type/Object.hpp>
#include <oatpp/core/macro/codegen.hpp>
#include <oatpp/core/Types.hpp>
#include OATPP_CODEGEN_BEGIN(DTO)
namespace dto {
class About : public oatpp::DTO
{
DTO_INIT(About, DTO)
DTO_FIELD_INFO(vendor) { info->description = "Application vendor"; }
DTO_FIELD(String, vendor);
DTO_FIELD_INFO(application) { info->description = "Application name"; }
DTO_FIELD(String, application);
DTO_FIELD_INFO(version) { info->description = "Application version"; }
DTO_FIELD(String, version);
};
class TranSet : public oatpp::DTO
{
DTO_INIT(TranSet, DTO)
DTO_FIELD_INFO(set) { info->description = "Translation set ID"; }
DTO_FIELD(UInt16, set);
DTO_FIELD_INFO(src) { info->description = "Input transcript name in English"; }
DTO_FIELD(String, src);
DTO_FIELD_INFO(dst) { info->description = "Output transcript name in English"; }
DTO_FIELD(String, dst);
};
class Language : public oatpp::DTO
{
DTO_INIT(Language, DTO)
DTO_FIELD_INFO(lang) { info->description = "Language ID"; }
DTO_FIELD(String, lang);
DTO_FIELD_INFO(name) { info->description = "Language name in English"; }
DTO_FIELD(String, name);
};
class TranslateIn : public oatpp::DTO
{
DTO_INIT(TranslateIn, DTO)
DTO_FIELD_INFO(transet) {
info->description = "Array of one or multiple translation set IDs to perform translation on the text. When inverse translating, the translation sets are read in reverse order listed in this array. Use /transet to get IDs of all supported translation sets.";
info->required = true;
}
DTO_FIELD(Vector<UInt16>, transet);
DTO_FIELD_INFO(text) {
info->description = "Text to be translated";
info->required = true;
}
DTO_FIELD(String, text);
DTO_FIELD_INFO(lang) {
info->description = "Language ID of the text to be translated. This is used on inverse translating to skip decomposing language-specific common characters (e.g. č, š, ž in Slovenian, or ä, ö, ü in German). Use /language to get IDs of all supported languages.";
}
DTO_FIELD(String, lang) = "slv";
};
class TranslateOut : public oatpp::DTO
{
DTO_INIT(TranslateOut, DTO)
DTO_FIELD_INFO(text) { info->description = "Translated text"; }
DTO_FIELD(String, text);
DTO_FIELD_INFO(map) { info->description = "Character index mapping between input and translated text. The map[i] value represents the index of the beginning of a character (in translated text) that translated from the character (in the input text) beginning at index i. All input indexes are measured in characters after input string is translated to UTF-16, and all output indexes are measured in characters before output string is translated from UTF-16."; }
DTO_FIELD(Vector<UInt32>, map);
};
}
#include OATPP_CODEGEN_END(DTO)

75
ZRColaWS/iconverter.hpp Normal file
View File

@@ -0,0 +1,75 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include <stdex/compat.hpp>
#include <iconv.h>
#include <cstring>
#include <stdexcept>
#include <string>
inline static std::runtime_error errno_error(_In_z_ const char *file, _In_ int line, _In_z_ const char *func)
{
int _errno = errno;
return std::runtime_error(
std::string(file) + ":" + std::to_string(line) +
std::string(func) + " error " + std::to_string(_errno) + ": " +
std::strerror(_errno));
}
template <typename T_from, typename T_to>
class iconverter
{
public:
iconverter(_In_z_ const char* from, _In_z_ const char* to)
{
m_handle = iconv_open(to, from);
if (m_handle == (iconv_t)-1)
throw errno_error(__FILE__, __LINE__, __FUNCTION__);
}
~iconverter()
{
iconv_close(m_handle);
}
std::basic_string<T_to> convert(_In_z_count_(count) const T_from* input, _In_ size_t count) const
{
T_to buf[0x100];
std::basic_string<T_to> result;
size_t inSize = sizeof(T_from) * count;
do {
T_to* output = &buf[0];
size_t outSize = sizeof(buf);
errno = 0;
iconv(m_handle, (char**)&input, &inSize, (char**)&output, &outSize);
if (errno)
throw errno_error(__FILE__, __LINE__, __FUNCTION__);
result.insert(result.end(), buf, (T_to*)((char*)buf + sizeof(buf) - outSize));
} while (inSize);
return result;
}
std::basic_string<T_to> convert(_In_ const std::basic_string<T_from>& input)
{
return convert(input.c_str(), input.length());
}
protected:
iconv_t m_handle;
};
class utf16toutf8 : public iconverter<char16_t, char>
{
public:
utf16toutf8() : iconverter("UTF-16LE", "UTF-8") {}
};
class utf8toutf16 : public iconverter<char, char16_t>
{
public:
utf8toutf16() : iconverter("UTF-8", "UTF-16LE") {}
};

27
ZRColaWS/stdlogger.hpp Normal file
View File

@@ -0,0 +1,27 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include <oatpp/core/base/Environment.hpp>
#include <iostream>
#include <mutex>
class StdLogger : public oatpp::base::Logger
{
private:
std::mutex m_lock;
public:
StdLogger() {}
void log(v_uint32 priority, const std::string& tag, const std::string& message) override
{
if (!isLogPriorityEnabled(priority))
return;
std::lock_guard<std::mutex> guard(m_lock);
(priority < oatpp::base::Logger::PRIORITY_W ? std::cout : std::cerr) << tag << ": " << message << std::endl;
}
};

176
ZRColaWS/zrcolaws.cpp Normal file
View File

@@ -0,0 +1,176 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#include "appcomponent.hpp"
#include "controller.hpp"
#include "stdlogger.hpp"
#include "zrcolaws.hpp"
#include <oatpp-swagger/Controller.hpp>
#include <oatpp/core/base/CommandLineArguments.hpp>
#include <oatpp/network/Server.hpp>
#include <signal.h>
#include <fstream>
#include <iostream>
using namespace std;
using namespace ZRCola;
translation_db t_db;
transet_db ts_db;
// transeq_db tsq_db;
langchar_db lc_db;
language_db lang_db;
// character_db chr_db;
// chrblk_db cb_db;
// chrtag_db ct_db;
// tagname_db tn_db;
// highlight_db h_db;
static void load_database()
{
fstream dat(PREFIX "/share/zrcola/ZRCola.zrcdb", ios_base::in | ios_base::binary);
if (!dat.good())
throw runtime_error(PREFIX "/share/zrcola/ZRCola.zrcdb not found or cannot be opened.");
if (!stdex::idrec::find<recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN>(dat, ZRCOLA_DB_ID, sizeof(recordid_t)))
throw runtime_error(PREFIX "/share/zrcola/ZRCola.zrcdb is not a valid ZRCola database.");
recordsize_t size;
dat.read((char*)&size, sizeof(recordsize_t));
if (dat.good()) {
bool has_translation_data = false;
for (;;) {
recordid_t id;
if (!stdex::idrec::read_id(dat, id, size)) break;
if (id == translation_rec::id()) {
dat >> translation_rec(t_db);
if (dat.good()) {
has_translation_data = true;
} else {
OATPP_LOGE(__FUNCTION__, "Error reading translation data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
t_db.clear();
}
} else if (id == transet_rec::id()) {
dat >> transet_rec(ts_db);
if (!dat.good()) {
OATPP_LOGE(__FUNCTION__, "Error reading translation set data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
ts_db.clear();
}
// } else if (id == transeq_rec::id()) {
// dat >> transeq_rec(tsq_db);
// if (!dat.good()) {
// OATPP_LOGE(__FUNCTION__, "Error reading translation sequence data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
// tsq_db.clear();
// }
} else if (id == langchar_rec::id()) {
dat >> langchar_rec(lc_db);
if (!dat.good()) {
OATPP_LOGE(__FUNCTION__, "Error reading language character data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
lc_db.clear();
}
} else if (id == language_rec::id()) {
dat >> language_rec(lang_db);
if (!dat.good()) {
OATPP_LOGE(__FUNCTION__, "Error reading language character data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
lang_db.clear();
}
// } else if (id == character_rec::id()) {
// dat >> character_rec(chr_db);
// if (!dat.good()) {
// OATPP_LOGE(__FUNCTION__, "Error reading character data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
// chr_db.clear();
// }
// } else if (id == chrblk_rec::id()) {
// dat >> chrblk_rec(cb_db);
// if (!dat.good()) {
// OATPP_LOGE(__FUNCTION__, "Error reading character block data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
// cb_db.clear();
// }
// } else if (id == chrtag_rec::id()) {
// dat >> chrtag_rec(ct_db);
// if (!dat.good()) {
// OATPP_LOGE(__FUNCTION__, "Error reading character tag data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
// ct_db.clear();
// }
// } else if (id == tagname_rec::id()) {
// dat >> tagname_rec(tn_db);
// if (!dat.good()) {
// OATPP_LOGE(__FUNCTION__, "Error reading tag name data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
// tn_db.clear();
// }
// } else if (id == highlight_rec::id()) {
// dat >> highlight_rec(h_db);
// if (!dat.good()) {
// OATPP_LOGE(__FUNCTION__, "Error reading highlight data from " PREFIX "/share/zrcola/ZRCola.zrcdb.");
// h_db.clear();
// }
} else
stdex::idrec::ignore<recordsize_t, ZRCOLA_RECORD_ALIGN>(dat);
}
if (!has_translation_data)
throw runtime_error(PREFIX "/share/zrcola/ZRCola.zrcdb has no translation data.");
}
}
static void sig_handler(int s)
{
OATPP_LOGD(__FUNCTION__, "Caught signal %d", s);
OATPP_COMPONENT(std::shared_ptr<oatpp::network::Server>, server);
server->stop();
}
int main(int argc, const char* argv[])
{
auto logger = std::make_shared<StdLogger>();
oatpp::base::Environment::init(logger);
try {
{
oatpp::base::CommandLineArguments cmdArgs(argc, argv);
if (cmdArgs.hasArgument("-?") || cmdArgs.hasArgument("--help")) {
cerr << "ZRColaWS " << PRODUCT_VERSION_STR << " Copyright © 2022 Amebis" << endl;
cerr << endl;
cerr << argv[0] << " [--host <interface name>] [--port <port number>] [-4|-6]" << endl;
return 1;
}
load_database();
struct sigaction sigIntHandler;
sigIntHandler.sa_handler = sig_handler;
sigemptyset(&sigIntHandler.sa_mask);
sigIntHandler.sa_flags = 0;
sigaction(SIGINT, &sigIntHandler, NULL);
oatpp::String host = cmdArgs.getNamedArgumentValue("--host", "localhost");
v_uint16 port = oatpp::utils::conversion::strToInt32(cmdArgs.getNamedArgumentValue("--port", "54591"));
oatpp::network::Address::Family family = oatpp::network::Address::UNSPEC;
if (cmdArgs.hasArgument("-4"))
family = oatpp::network::Address::IP_4;
else if (cmdArgs.hasArgument("-6"))
family = oatpp::network::Address::IP_6;
AppComponent components({host, port, family});
OATPP_COMPONENT(std::shared_ptr<oatpp::web::server::HttpRouter>, router);
OATPP_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, objectMapper);
auto controller = std::make_shared<Controller>(objectMapper);
router->addController(controller);
auto swaggerController = oatpp::swagger::Controller::createShared(controller->getEndpoints());
router->addController(swaggerController);
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ServerConnectionProvider>, connectionProvider);
OATPP_LOGI(__FUNCTION__, "Server " PRODUCT_VERSION_STR " starting on %s:%s",
connectionProvider->getProperty("host").getData(), connectionProvider->getProperty("port").getData());
OATPP_COMPONENT(std::shared_ptr<oatpp::network::Server>, server);
server->run();
OATPP_LOGI(__FUNCTION__, "Server stopped");
}
oatpp::base::Environment::destroy();
} catch (exception &ex) {
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
return 1;
}
return 0;
}

24
ZRColaWS/zrcolaws.hpp Normal file
View File

@@ -0,0 +1,24 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include "../include/version.h"
#include <zrcola/idrec.h>
#ifndef PREFIX
#define PREFIX "/usr/local"
#endif
extern ZRCola::translation_db t_db;
extern ZRCola::transet_db ts_db;
// extern ZRCola::transeq_db tsq_db;
extern ZRCola::langchar_db lc_db;
extern ZRCola::language_db lang_db;
// extern ZRCola::character_db chr_db;
// extern ZRCola::chrblk_db cb_db;
// extern ZRCola::chrtag_db ct_db;
// extern ZRCola::tagname_db tn_db;
// extern ZRCola::highlight_db h_db;

1
include/.gitignore vendored
View File

@@ -1,2 +1 @@
/UpdaterKeypair.txt
/UpdaterKeyPrivate.bin /UpdaterKeyPrivate.bin

View File

@@ -20,11 +20,7 @@
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<EnableCOMDATFolding>false</EnableCOMDATFolding> <EnableCOMDATFolding>false</EnableCOMDATFolding>
<SetChecksum>true</SetChecksum>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Message Text="Signing output file..." />
<Exec Command="signtool.exe sign /du &quot;https://www.amebis.si&quot; /sha1 &quot;%ManifestCertificateThumbprint%&quot; /fd sha256 /q &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
</Target>
</Project> </Project>

View File

@@ -24,9 +24,12 @@
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign"> <Target Name="SignLocal" Condition="('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary') and '$(ManifestCertificateThumbprint)' != ''" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Message Text="Signing output file..." /> <Exec Command="signtool.exe sign /sha1 &quot;$(ManifestCertificateThumbprint)&quot; /fd SHA256 /tr &quot;$(ManifestTimestampRFC3161Url)&quot; /td SHA256 /q &quot;$(TargetPath)&quot;" />
<Exec Command="signtool.exe sign /sha1 &quot;%ManifestCertificateThumbprint%&quot; /fd sha256 /tr &quot;%ManifestTimestampRFC3161Url%&quot; /td sha256 /q &quot;$(TargetPath)&quot;" /> <Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
</Target>
<Target Name="SignAzure" Condition="('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary') and exists('$(APPDATA)\Microsoft.Trusted.Signing.Client.json')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
<Exec Command="signtool.exe sign /dlib &quot;$(USERPROFILE)\.nuget\packages\microsoft.trusted.signing.client\1.0.53\bin\$(PreferredToolArchitecture)\Azure.CodeSigning.Dlib.dll&quot; /dmdf &quot;$(APPDATA)\Microsoft.Trusted.Signing.Client.json&quot; /fd SHA256 /tr &quot;http://timestamp.acs.microsoft.com&quot; /td SHA256 /q &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" /> <Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
</Target> </Target>
</Project> </Project>

View File

@@ -12,8 +12,8 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<_PropertySheetDisplayName>ZRCola Common</_PropertySheetDisplayName> <_PropertySheetDisplayName>ZRCola Common</_PropertySheetDisplayName>
<IntDir>temp\$(MSBuildProjectName).$(Platform).$(Configuration).$(PlatformToolset)\</IntDir> <IntDir>temp\$(MSBuildProjectName).$(Platform).$(Configuration)\</IntDir>
<OutDir>temp\$(MSBuildProjectName).$(Platform).$(Configuration).$(PlatformToolset)\</OutDir> <OutDir>temp\$(MSBuildProjectName).$(Platform).$(Configuration)\</OutDir>
<IncludePath>$(WXWIN)\include\msvc;$(WXWIN)\include;$(IncludePath)</IncludePath> <IncludePath>$(WXWIN)\include\msvc;$(WXWIN)\include;$(IncludePath)</IncludePath>
<SourcePath>$(WXWIN)\src\aui;$(WXWIN)\src\cocoa;$(WXWIN)\src\common;$(WXWIN)\src\dfb;$(WXWIN)\src\expat;$(WXWIN)\src\generic;$(WXWIN)\src\gtk;$(WXWIN)\src\gtk1;$(WXWIN)\src\html;$(WXWIN)\src\jpeg;$(WXWIN)\src\motif;$(WXWIN)\src\msdos;$(WXWIN)\src\msw;$(WXWIN)\src\os2;$(WXWIN)\src\osx;$(WXWIN)\src\png;$(WXWIN)\src\propgrid;$(WXWIN)\src\regex;$(WXWIN)\src\ribbon;$(WXWIN)\src\richtext;$(WXWIN)\src\stc;$(WXWIN)\src\tiff;$(WXWIN)\src\univ;$(WXWIN)\src\unix;$(WXWIN)\src\x11;$(WXWIN)\src\xml;$(WXWIN)\src\xrc;$(WXWIN)\src\zlib;$(SourcePath)</SourcePath> <SourcePath>$(WXWIN)\src\aui;$(WXWIN)\src\cocoa;$(WXWIN)\src\common;$(WXWIN)\src\dfb;$(WXWIN)\src\expat;$(WXWIN)\src\generic;$(WXWIN)\src\gtk;$(WXWIN)\src\gtk1;$(WXWIN)\src\html;$(WXWIN)\src\jpeg;$(WXWIN)\src\motif;$(WXWIN)\src\msdos;$(WXWIN)\src\msw;$(WXWIN)\src\os2;$(WXWIN)\src\osx;$(WXWIN)\src\png;$(WXWIN)\src\propgrid;$(WXWIN)\src\regex;$(WXWIN)\src\ribbon;$(WXWIN)\src\richtext;$(WXWIN)\src\stc;$(WXWIN)\src\tiff;$(WXWIN)\src\univ;$(WXWIN)\src\unix;$(WXWIN)\src\x11;$(WXWIN)\src\xml;$(WXWIN)\src\xrc;$(WXWIN)\src\zlib;$(SourcePath)</SourcePath>
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
@@ -31,6 +31,7 @@
<DisableSpecificWarnings>4100;4505</DisableSpecificWarnings> <DisableSpecificWarnings>4100;4505</DisableSpecificWarnings>
<SupportJustMyCode>false</SupportJustMyCode> <SupportJustMyCode>false</SupportJustMyCode>
<EnablePREfast>true</EnablePREfast> <EnablePREfast>true</EnablePREfast>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile> </ClCompile>
<Link> <Link>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>

17
include/props.mak Normal file
View File

@@ -0,0 +1,17 @@
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
CPPFLAGS := $(CPPFLAGS) -MMD -MP -DPREFIX='"$(PREFIX)"'
ifeq ($(CFG),Debug)
CPPFLAGS := $(CPPFLAGS) -D_DEBUG
CFLAGS := $(CFLAGS) -Og -g
CXXFLAGS := $(CXXFLAGS) -Og -g
else
CPPFLAGS := $(CPPFLAGS) -DNDEBUG
CFLAGS := $(CFLAGS) -O3 -fdata-sections -ffunction-sections
CXXFLAGS := $(CXXFLAGS) -O3 -fdata-sections -ffunction-sections
LDFLAGS := $(LDFLAGS) -Wl,--gc-sections
endif
OBJS := $(SRCS:%=%.o)
DEPS := $(OBJS:.o=.d)

5
include/targets.mak Normal file
View File

@@ -0,0 +1,5 @@
%.h.gch: %.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header -o $@ -c $<
%.cpp.o: %.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<

View File

@@ -9,7 +9,7 @@
// Product version as a single DWORD // Product version as a single DWORD
// Note: Used for version comparison within C/C++ code. // Note: Used for version comparison within C/C++ code.
// //
#define PRODUCT_VERSION 0x02060000 #define PRODUCT_VERSION 0x02070200
// //
// Product version by components // Product version by components
@@ -18,27 +18,27 @@
// separately. // separately.
// //
#define PRODUCT_VERSION_MAJ 2 #define PRODUCT_VERSION_MAJ 2
#define PRODUCT_VERSION_MIN 6 #define PRODUCT_VERSION_MIN 7
#define PRODUCT_VERSION_REV 0 #define PRODUCT_VERSION_REV 2
#define PRODUCT_VERSION_BUILD 0 #define PRODUCT_VERSION_BUILD 0
// //
// Human readable product version and build year for UI // Human readable product version and build year for UI
// //
#define PRODUCT_VERSION_STR "2.6" #define PRODUCT_VERSION_STR "2.7.2"
#define PRODUCT_BUILD_YEAR_STR "2022" #define PRODUCT_BUILD_YEAR_STR "2025"
// //
// Numerical version presentation for ProductVersion propery in // Numerical version presentation for ProductVersion property in
// MSI packages (syntax: N.N[.N[.N]]) // MSI packages (syntax: N.N[.N[.N]])
// //
#define PRODUCT_VERSION_INST "2.6" #define PRODUCT_VERSION_INST "2.7.2"
// //
// The product code for ProductCode property in MSI packages // The product code for ProductCode property in MSI packages
// Replace with new on every version change, regardless how minor it is. // Replace with new on every version change, regardless how minor it is.
// //
#define PRODUCT_VERSION_GUID "{B7743708-2694-4BA7-8FC4-0797C071C4F8}" #define PRODUCT_VERSION_GUID "{4B9FEEBE-280F-414D-BC8D-CB091F00C48F}"
// //
// The product vendor and application name for configuration keeping. // The product vendor and application name for configuration keeping.

View File

@@ -0,0 +1,33 @@
CPPFLAGS := $(CPPFLAGS) -I../../stdex/include
SRCS := \
../src/character.cpp \
../src/common.cpp \
../src/highlight.cpp \
../src/language.cpp \
../src/mapping.cpp \
../src/pch.cpp \
../src/tag.cpp \
../src/translate.cpp
include ../../../include/props.mak
.PHONY: all
all: ../lib/libZRCola.a
../lib/libZRCola.a: ../src/pch.h.gch $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
.PHONY: test
test: ../test/test
../test/test
../test/test: ../lib/libZRCola.a
$(CXX) $(CPPFLAGS) -I../../stdex/include -I../include $(CXXFLAGS) -L../lib -o $@ ../test/test.cpp -lstdc++ -lZRCola
.PHONY: clean
clean:
-rm -r ../src/*.{d,gch,o} ../lib/libZRCola.a ../test/*.d ../test/test
include ../../../include/targets.mak
-include $(DEPS)
-include ../test/test.d

View File

@@ -66,7 +66,6 @@
<ClCompile Include="..\src\common.cpp" /> <ClCompile Include="..\src\common.cpp" />
<ClCompile Include="..\src\highlight.cpp" /> <ClCompile Include="..\src\highlight.cpp" />
<ClCompile Include="..\src\language.cpp" /> <ClCompile Include="..\src\language.cpp" />
<ClCompile Include="..\src\mapping.cpp" />
<ClCompile Include="..\src\pch.cpp"> <ClCompile Include="..\src\pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader> <PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile> </ClCompile>

View File

@@ -14,9 +14,6 @@
<ClCompile Include="..\src\pch.cpp"> <ClCompile Include="..\src\pch.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\mapping.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\translate.cpp"> <ClCompile Include="..\src\translate.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>

View File

@@ -7,15 +7,15 @@
#include "common.h" #include "common.h"
#include <stdex/idrec>
#include <assert.h> #include <assert.h>
#include <algorithm> #include <algorithm>
#include <istream> #include <istream>
#include <locale>
#include <map> #include <map>
#include <ostream> #include <ostream>
#include <vector>
#include <set> #include <set>
#include <string> #include <string>
#include <vector>
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4200) #pragma warning(disable: 4200)
@@ -29,140 +29,21 @@ namespace ZRCola {
/// ///
typedef double charrank_t; typedef double charrank_t;
inline bool ispua(_In_ wchar_t c) inline bool ispua(_In_ char_t c)
{ {
return L'\ue000' <= c && c <= L'\uf8ff'; return u'\ue000' <= c && c <= u'\uf8ff';
} }
#pragma pack(push) #ifndef _WIN32
#pragma pack(2) size_t wcslen(_In_z_ const char_t* str);
/// size_t wcsnlen(_In_z_count_(count) const char_t* str, _In_ size_t count);
/// Character category ID type #endif
/// Two letter abbreviation, non-terminated
///
struct chrcatid_t {
char data[2];
inline chrcatid_t& operator=(const chrcatid_t &src)
{
data[0] = src.data[0];
data[1] = src.data[1];
return *this;
}
inline chrcatid_t& operator=(const char *src)
{
data[1] = (data[0] = src[0]) != 0 ? src[1] : 0;
return *this;
}
///
/// Blank character category
///
static const chrcatid_t blank;
};
#pragma pack(pop)
/// ///
/// Compares two character category IDs /// Character block ID
/// ///
/// \param[in] a First character category ID typedef uint16_t chrblkid_t;
/// \param[in] b Second character category ID
///
/// \returns
/// - true when \p a == \p b
/// - false otherwise
///
inline bool operator==(const chrcatid_t &a, const chrcatid_t & b)
{
return
a.data[0] == b.data[0] &&
(a.data[0] == 0 || a.data[1] == b.data[1]);
}
///
/// Compares two character category IDs
///
/// \param[in] a First character category ID
/// \param[in] b Second character category ID
///
/// \returns
/// - true when \p a != \p b
/// - false otherwise
///
inline bool operator!=(const chrcatid_t &a, const chrcatid_t & b)
{
return !operator==(a, b);
}
///
/// Compares two character category IDs
///
/// \param[in] a First character category ID
/// \param[in] b Second character category ID
///
/// \returns
/// - true when \p a < \p b
/// - false otherwise
///
inline bool operator<(const chrcatid_t& a, const chrcatid_t& b)
{
if (a.data[0] < b.data[0]) return true;
else if (a.data[0] > b.data[0]) return false;
else if (a.data[1] < b.data[1]) return true;
else return false;
}
///
/// Compares two character category IDs
///
/// \param[in] a First character category ID
/// \param[in] b Second character category ID
///
/// \returns
/// - true when \p a > \p b
/// - false otherwise
///
inline bool operator>(const chrcatid_t& a, const chrcatid_t& b)
{
return operator<(b, a);
}
///
/// Compares two character category IDs
///
/// \param[in] a First character category ID
/// \param[in] b Second character category ID
///
/// \returns
/// - true when \p a <= \p b
/// - false otherwise
///
inline bool operator<=(const chrcatid_t &a, const chrcatid_t & b)
{
return !operator>(a, b);
}
///
/// Compares two character category IDs
///
/// \param[in] a First character category ID
/// \param[in] b Second character category ID
///
/// \returns
/// - true when \p a >= \p b
/// - false otherwise
///
inline bool operator>=(const chrcatid_t &a, const chrcatid_t & b)
{
return !operator<(a, b);
}
/// ///
@@ -177,17 +58,17 @@ namespace ZRCola {
/// ///
struct character { struct character {
public: public:
chrcatid_t cat; ///> Character category ID chrblkid_t blk; ///> Character block ID
protected: protected:
unsigned __int16 chr_to; ///< Character end in \c data uint16_t chr_to; ///< Character end in \c data
unsigned __int16 desc_to; ///< Character description end in \c data uint16_t desc_to; ///< Character description end in \c data
unsigned __int16 rel_to; ///< Related characters end in \c data uint16_t rel_to; ///< Related characters end in \c data
wchar_t data[]; ///< Character, character description char_t data[]; ///< Character, character description
private: private:
inline character(_In_ const character &other); character(_In_ const character &other);
inline character& operator=(_In_ const character &other); character& operator=(_In_ const character &other);
public: public:
/// ///
@@ -195,54 +76,54 @@ namespace ZRCola {
/// ///
/// \param[in] chr Character /// \param[in] chr Character
/// \param[in] chr_len Number of UTF-16 characters in \p chr /// \param[in] chr_len Number of UTF-16 characters in \p chr
/// \param[in] cat Category /// \param[in] blk Unicode block
/// \param[in] desc Description /// \param[in] desc Description
/// \param[in] desc_len Number of UTF-16 characters in \p desc /// \param[in] desc_len Number of UTF-16 characters in \p desc
/// \param[in] rel Related characters list (zero delimited) /// \param[in] rel Related characters list (zero delimited)
/// \param[in] rel_len Number of UTF-16 characters in \p rel (including zero delimiters) /// \param[in] rel_len Number of UTF-16 characters in \p rel (including zero delimiters)
/// ///
inline character( character(
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL, _In_opt_z_count_(chr_len) const char_t *chr = NULL,
_In_opt_ size_t chr_len = 0, _In_opt_ size_t chr_len = 0,
_In_opt_ chrcatid_t cat = chrcatid_t::blank, _In_opt_ chrblkid_t blk = 0,
_In_opt_z_count_(desc_len) const wchar_t *desc = NULL, _In_opt_z_count_(desc_len) const char_t *desc = NULL,
_In_opt_ size_t desc_len = 0, _In_opt_ size_t desc_len = 0,
_In_opt_z_count_(rel_len) const wchar_t *rel = NULL, _In_opt_z_count_(rel_len) const char_t *rel = NULL,
_In_opt_ size_t rel_len = 0) _In_opt_ size_t rel_len = 0)
{ {
this->cat = cat; this->blk = blk;
this->chr_to = static_cast<unsigned __int16>(chr_len); this->chr_to = static_cast<uint16_t>(chr_len);
if (chr && chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len); if (chr && chr_len) memcpy(this->data, chr, sizeof(char_t)*chr_len);
this->desc_to = static_cast<unsigned __int16>(this->chr_to + desc_len); this->desc_to = static_cast<uint16_t>(this->chr_to + desc_len);
if (desc && desc_len) memcpy(this->data + this->chr_to, desc, sizeof(wchar_t)*desc_len); if (desc && desc_len) memcpy(this->data + this->chr_to, desc, sizeof(char_t)*desc_len);
this->rel_to = static_cast<unsigned __int16>(this->desc_to + rel_len); this->rel_to = static_cast<uint16_t>(this->desc_to + rel_len);
if (rel && rel_len) memcpy(this->data + this->desc_to, rel, sizeof(wchar_t)*rel_len); if (rel && rel_len) memcpy(this->data + this->desc_to, rel, sizeof(char_t)*rel_len);
} }
inline const wchar_t* chr () const { return data; }; const char_t* chr () const { return data; };
inline wchar_t* chr () { return data; }; char_t* chr () { return data; };
inline const wchar_t* chr_end() const { return data + chr_to; }; const char_t* chr_end() const { return data + chr_to; };
inline wchar_t* chr_end() { return data + chr_to; }; char_t* chr_end() { return data + chr_to; };
inline unsigned __int16 chr_len() const { return chr_to; }; uint16_t chr_len() const { return chr_to; };
inline const wchar_t* desc () const { return data + chr_to; }; const char_t* desc () const { return data + chr_to; };
inline wchar_t* desc () { return data + chr_to; }; char_t* desc () { return data + chr_to; };
inline const wchar_t* desc_end() const { return data + desc_to; }; const char_t* desc_end() const { return data + desc_to; };
inline wchar_t* desc_end() { return data + desc_to; }; char_t* desc_end() { return data + desc_to; };
inline unsigned __int16 desc_len() const { return desc_to - chr_to; }; uint16_t desc_len() const { return desc_to - chr_to; };
inline const wchar_t* rel () const { return data + desc_to; }; const char_t* rel () const { return data + desc_to; };
inline wchar_t* rel () { return data + desc_to; }; char_t* rel () { return data + desc_to; };
inline const wchar_t* rel_end() const { return data + rel_to; }; const char_t* rel_end() const { return data + rel_to; };
inline wchar_t* rel_end() { return data + rel_to; }; char_t* rel_end() { return data + rel_to; };
inline unsigned __int16 rel_len() const { return rel_to - desc_to; }; uint16_t rel_len() const { return rel_to - desc_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Character index /// Character index
/// ///
class indexChr : public index<unsigned __int16, unsigned __int32, character> class indexChr : public index<uint16_t, uint32_t, character>
{ {
public: public:
/// ///
@@ -250,7 +131,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, character>(h) {} indexChr(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, character>(h) {}
/// ///
/// Compares two characters by ID (for searching) /// Compares two characters by ID (for searching)
@@ -272,20 +153,20 @@ namespace ZRCola {
} }
} idxChr; ///< Character index } idxChr; ///< Character index
textindex<wchar_t, wchar_t, unsigned __int32> idxDsc; ///< Description index textindex<char_t, char_t, uint32_t> idxDsc; ///< Description index
textindex<wchar_t, wchar_t, unsigned __int32> idxDscSub; ///< Description index (sub-terms) textindex<char_t, char_t, uint32_t> idxDscSub; ///< Description index (sub-terms)
std::vector<unsigned __int16> data; ///< Character data std::vector<uint16_t> data; ///< Character data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline character_db() : idxChr(data) {} character_db() : idxChr(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxChr .clear(); idxChr .clear();
idxDsc .clear(); idxDsc .clear();
@@ -294,97 +175,188 @@ namespace ZRCola {
} }
/// ///
/// Search for characters by description in given categories /// Search for characters by description in given blocks
/// ///
/// \param[in ] str Search string /// \param[in ] str Search string
/// \param[in ] cats Set of categories, character must be a part of /// \param[in ] blks Set of blocks, character must be a part of
/// \param[inout] hits (character, count) map to append full-word hits to /// \param[inout] hits (character, count) map to append full-word hits to
/// \param[inout] hits_sub (character, count) map to append partial-word hits to /// \param[inout] hits_sub (character, count) map to append partial-word hits to
/// \param[in ] fn_abort Pointer to function to periodically test for search cancellation /// \param[in ] fn_abort Pointer to function to periodically test for search cancellation
/// \param[in ] cookie Cookie for \p fn_abort call /// \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<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; bool Search(_In_z_ const char_t *str, _In_ const std::set<chrblkid_t> &blks, _Inout_ std::map<string_t, charrank_t> &hits, _Inout_ std::map<string_t, charrank_t> &hits_sub, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
/// ///
/// Get character category /// Get character block
/// ///
/// \param[in] chr Character /// \param[in] chr Character
/// \param[in] len Number of UTF-16 characters in \p chr /// \param[in] len Number of UTF-16 characters in \p chr
/// ///
/// \returns /// \returns
/// - Character category if character found /// - Character block if character found
/// - `ZRCola::chrcatid_t::blank` otherwise /// - 0 otherwise
/// ///
inline chrcatid_t GetCharCat(_In_z_count_(len) const wchar_t *chr, _In_ const size_t len) const chrblkid_t GetCharBlk(_In_z_count_(len) const char_t *chr, _In_ const size_t len) const
{ {
assert(len <= 0xffff); assert(len <= 0xffff);
std::unique_ptr<character> c((character*)new char[sizeof(character) + sizeof(wchar_t)*len]); std::unique_ptr<character> c((character*)new char[sizeof(character) + sizeof(char_t)*len]);
c->character::character(chr, len); new (c.get()) character(chr, len);
indexChr::size_type start; indexChr::size_type start;
return idxChr.find(*c, start) ? idxChr[start].cat : chrcatid_t::blank; return idxChr.find(*c, start) ? idxChr[start].blk : 0;
}
///
/// Writes character database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const character_db &db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
// Write description index.
if (!stream.good()) return stream;
stream << db.idxDsc;
// Write sub-term description index.
if (!stream.good()) return stream;
stream << db.idxDscSub;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ character_db& db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read description index.
stream >> db.idxDsc;
if (!stream.good()) return stream;
// Read sub-term description index.
stream >> db.idxDscSub;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
} }
}; };
typedef stdex::idrec::record<character_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> character_rec;
/// ///
/// Character category database /// Character block database
/// ///
class chrcat_db { class chrblk_db {
public: public:
#pragma pack(push) #pragma pack(push)
#pragma pack(2) #pragma pack(2)
/// ///
/// Character category data /// Character block data
/// ///
struct chrcat { struct chrblk {
public: public:
chrcatid_t cat; ///< Character category ID chrblkid_t id; ///< Character block ID
unsigned __int16 rank; ///< Character category rank uint16_t rank; ///< Character block rank
protected: protected:
unsigned __int16 name_to; ///< Character category name end in \c data uint16_t first_to; ///< Character block first character end in \c data
wchar_t data[]; ///< Character category name uint16_t name_to; ///< Character block name end in \c data
char_t data[]; ///< Character block name
private: private:
inline chrcat(_In_ const chrcat &other); chrblk(_In_ const chrblk &other);
inline chrcat& operator=(_In_ const chrcat &other); chrblk& operator=(_In_ const chrblk &other);
public: public:
/// ///
/// Constructs the character category /// Constructs the character block
/// ///
/// \param[in] cat Character category ID /// \param[in] id Character block ID
/// \param[in] rank Character category rank /// \param[in] rank Character block rank
/// \param[in] name Character category name /// \param[in] first Character block first character
/// \param[in] name_len Number of UTF-16 characters in \p name /// \param[in] first_len Number of UTF-16 characters in \p first
/// \param[in] name Character block name
/// \param[in] name_len Number of UTF-16 characters in \p name
/// ///
inline chrcat( chrblk(
_In_opt_ chrcatid_t cat = chrcatid_t::blank, _In_opt_ chrblkid_t id = 0,
_In_opt_ unsigned __int16 rank = 0, _In_opt_ uint16_t rank = 0,
_In_opt_z_count_(name_len) const wchar_t *name = NULL, _In_opt_z_count_(first_len) const char_t *first = NULL,
_In_opt_ size_t name_len = 0) _In_opt_ size_t first_len = 0,
_In_opt_z_count_(name_len) const char_t *name = NULL,
_In_opt_ size_t name_len = 0)
{ {
this->cat = cat; this->id = id;
this->rank = rank; this->rank = rank;
this->name_to = static_cast<unsigned __int16>(name_len); this->first_to = static_cast<uint16_t>(first_len);
if (name && name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len); if (first && first_len) memcpy(this->data, first, sizeof(char_t)*first_len);
this->name_to = static_cast<uint16_t>(this->first_to + name_len);
if (name && name_len) memcpy(this->data + this->first_to, name, sizeof(char_t)*name_len);
} }
inline const wchar_t* name () const { return data; }; const char_t* first () const { return data; };
inline wchar_t* name () { return data; }; char_t* first () { return data; };
inline const wchar_t* name_end() const { return data + name_to; }; const char_t* first_end() const { return data + first_to; };
inline wchar_t* name_end() { return data + name_to; }; char_t* first_end() { return data + first_to; };
inline unsigned __int16 name_len() const { return name_to; }; uint16_t first_len() const { return first_to; };
const char_t* name () const { return data + first_to; };
char_t* name () { return data + first_to; };
const char_t* name_end() const { return data + name_to; };
char_t* name_end() { return data + name_to; };
uint16_t name_len() const { return name_to - first_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Character category index /// Character block index
/// ///
class indexChrCat : public index<unsigned __int16, unsigned __int32, chrcat> class indexChrId : public index<uint16_t, uint32_t, chrblk>
{ {
public: public:
/// ///
@@ -392,10 +364,10 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexChrCat(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrcat>(h) {} indexChrId(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, chrblk>(h) {}
/// ///
/// Compares two character categories by ID (for searching) /// Compares two character blocks by ID (for searching)
/// ///
/// \param[in] a Pointer to first element /// \param[in] a Pointer to first element
/// \param[in] b Pointer to second element /// \param[in] b Pointer to second element
@@ -405,19 +377,52 @@ namespace ZRCola {
/// - =0 when a == b /// - =0 when a == b
/// - >0 when a > b /// - >0 when a > b
/// ///
virtual int compare(_In_ const chrcat &a, _In_ const chrcat &b) const virtual int compare(_In_ const chrblk &a, _In_ const chrblk &b) const
{ {
if (a.cat < b.cat) return -1; if (a.id < b.id) return -1;
else if (a.cat > b.cat) return 1; if (a.id > b.id) return 1;
return 0; return 0;
} }
} idxChrCat; ///< Character category index } idxChrId; ///< Character block index
///
/// First character index
///
class indexFirst : public index<uint16_t, uint32_t, chrblk>
{
public:
///
/// Constructs the index
///
/// \param[in] h Reference to vector holding the data
///
indexFirst(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, chrblk>(h) {}
///
/// Compares two character blocks by first character (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 chrblk &a, _In_ const chrblk &b) const
{
int r = ZRCola::CompareString(a.first(), a.first_len(), b.first(), b.first_len());
if (r != 0) return r;
return 0;
}
} idxFirst; ///< First character index
/// ///
/// Rank index /// Rank index
/// ///
class indexRank : public index<unsigned __int16, unsigned __int32, chrcat> class indexRank : public index<uint16_t, uint32_t, chrblk>
{ {
public: public:
/// ///
@@ -425,10 +430,10 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexRank(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrcat>(h) {} indexRank(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, chrblk>(h) {}
/// ///
/// Compares two character categories by ID (for searching) /// Compares two character blocks by ID (for searching)
/// ///
/// \param[in] a Pointer to first element /// \param[in] a Pointer to first element
/// \param[in] b Pointer to second element /// \param[in] b Pointer to second element
@@ -438,221 +443,136 @@ namespace ZRCola {
/// - =0 when a == b /// - =0 when a == b
/// - >0 when a > b /// - >0 when a > b
/// ///
virtual int compare(_In_ const chrcat &a, _In_ const chrcat &b) const virtual int compare(_In_ const chrblk &a, _In_ const chrblk &b) const
{ {
if (a.rank < b.rank) return -1; if (a.rank < b.rank) return -1;
else if (a.rank > b.rank) return +1; if (a.rank > b.rank) return +1;
return 0; return 0;
} }
/// ///
/// Compares two character categories by rank (for sorting) /// Compares two character blocks by rank (for sorting)
/// ///
/// \param[in] a Pointer to character category /// \param[in] a Pointer to character block
/// \param[in] b Pointer to second character category /// \param[in] b Pointer to second character block
/// ///
/// \returns /// \returns
/// - <0 when a < b /// - <0 when a < b
/// - =0 when a == b /// - =0 when a == b
/// - >0 when a > b /// - >0 when a > b
/// ///
virtual int compare_sort(_In_ const chrcat &a, _In_ const chrcat &b) const virtual int compare_sort(_In_ const chrblk &a, _In_ const chrblk &b) const
{ {
if (a.rank < b.rank) return -1; if (a.rank < b.rank) return -1;
else if (a.rank > b.rank) return +1; else if (a.rank > b.rank) return +1;
unsigned __int16 auto &coll = std::use_facet<std::collate<char_t>>(std::locale());
a_name_len = a.name_len(), return coll.compare(a.name(), a.name_end(), b.name(), b.name_end());
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 } idxRank; ///< Rank index
std::vector<unsigned __int16> data; ///< Character category data std::vector<uint16_t> data; ///< Character block data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline chrcat_db() : idxChrCat(data), idxRank(data) {} chrblk_db() : idxChrId(data), idxFirst(data), idxRank(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxChrCat.clear(); idxChrId.clear();
idxRank .clear(); idxFirst.clear();
data .clear(); idxRank .clear();
data .clear();
}
///
/// Writes character block database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character block database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const chrblk_db& db)
{
// Write character block index.
if (stream.fail()) return stream;
stream << db.idxChrId;
// Write first character index.
if (stream.fail()) return stream;
stream << db.idxFirst;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character block database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character block database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ chrblk_db& db)
{
// Read character block index.
stream >> db.idxChrId;
if (!stream.good()) return stream;
// Read first character index.
stream >> db.idxFirst;
if (!stream.good()) return stream;
// Read rank index.
stream >> db.idxRank;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
} }
}; };
typedef stdex::idrec::record<chrcat_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrcat_rec;
}; };
const ZRCola::recordid_t ZRCola::character_rec::id = *(ZRCola::recordid_t*)"CHR";
const ZRCola::recordid_t ZRCola::chrcat_rec ::id = *(ZRCola::recordid_t*)"CCT";
///
/// Reads character database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::character_db &db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read description index.
stream >> db.idxDsc;
if (!stream.good()) return stream;
// Read sub-term description index.
stream >> db.idxDscSub;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
///
/// Writes character database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::character_db &db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
// Write description index.
if (!stream.good()) return stream;
stream << db.idxDsc;
// Write sub-term description index.
if (!stream.good()) return stream;
stream << db.idxDscSub;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Writes character category database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character category database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::chrcat_db &db)
{
// Write character category index.
if (stream.fail()) return stream;
stream << db.idxChrCat;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character category database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character category database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::chrcat_db &db)
{
// Read character category index.
stream >> db.idxChrCat;
if (!stream.good()) return stream;
// Read rank index.
stream >> db.idxRank;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -9,8 +9,14 @@
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h. #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h.
#include <Windows.h> #include <Windows.h>
#endif #endif
#include <sal.h> #include <stdex/compat.hpp>
#include <stdex/mapping.hpp>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include <istream> #include <istream>
#include <memory>
#include <ostream> #include <ostream>
#include <utility> #include <utility>
#include <vector> #include <vector>
@@ -29,12 +35,39 @@
/// ///
/// Database IDs /// Database IDs
/// ///
#define ZRCOLA_DB_ID (*(ZRCola::recordid_t*)"ZRC") #define ZRCOLA_DB_ID 0x43525a // "ZRC"
#ifdef __GNUC__
#ifdef __i386__
#define __cdecl __attribute__((__cdecl__))
#else
#define __cdecl
#endif
#endif
namespace ZRCola { namespace ZRCola {
typedef unsigned __int32 recordid_t; typedef uint32_t recordid_t;
typedef unsigned __int32 recordsize_t; typedef uint32_t recordsize_t;
///
/// ZRCola database character type
///
#ifdef _WIN32
typedef wchar_t char_t;
#else
typedef char16_t char_t;
#endif
///
/// ZRCola database string type
///
#ifdef _WIN32
typedef std::wstring string_t;
#else
typedef std::u16string string_t;
#endif
#pragma pack(push) #pragma pack(push)
@@ -60,7 +93,15 @@ namespace ZRCola {
struct langid_t { struct langid_t {
char data[4]; char data[4];
inline langid_t& operator=(const langid_t &src) langid_t()
{
data[0] = 0;
data[1] = 0;
data[2] = 0;
data[3] = 0;
}
langid_t& operator=(_In_ const langid_t &src)
{ {
data[0] = src.data[0]; data[0] = src.data[0];
data[1] = src.data[1]; data[1] = src.data[1];
@@ -69,7 +110,7 @@ namespace ZRCola {
return *this; return *this;
} }
inline langid_t& operator=(const char *src) langid_t& operator=(_In_z_ const char *src)
{ {
data[3] = ( data[3] = (
data[2] = ( data[2] = (
@@ -80,11 +121,6 @@ namespace ZRCola {
src[3] : 0; src[3] : 0;
return *this; return *this;
} }
///
/// Blank language ID
///
static const langid_t blank;
}; };
#pragma pack(pop) #pragma pack(pop)
@@ -210,9 +246,14 @@ namespace ZRCola {
/// ///
/// Memory index /// Memory index
/// ///
template <class T_data, class T_idx = unsigned __int32, class T_el = T_data> template <class T_data, class T_idx = uint32_t, class T_el = T_data>
class index : public std::vector<T_idx> class index : public std::vector<T_idx>
{ {
typedef std::vector<T_idx> base_t;
public:
typedef size_t size_type;
protected: protected:
std::vector<T_data> &host; ///< Reference to host data std::vector<T_data> &host; ///< Reference to host data
@@ -232,9 +273,9 @@ namespace ZRCola {
/// ///
/// \returns Data reference /// \returns Data reference
/// ///
inline const T_el& at(size_type pos) const const T_el& at(size_type pos) const
{ {
return *reinterpret_cast<const T_el*>(&host[std::vector<T_idx>::at(pos)]); return *reinterpret_cast<const T_el*>(&host[base_t::at(pos)]);
} }
@@ -245,9 +286,9 @@ namespace ZRCola {
/// ///
/// \returns Data reference /// \returns Data reference
/// ///
inline T_el& at(size_type pos) T_el& at(size_type pos)
{ {
return *reinterpret_cast<T_el*>(&host[std::vector<T_idx>::at(pos)]); return *reinterpret_cast<T_el*>(&host[base_t::at(pos)]);
} }
@@ -258,9 +299,9 @@ namespace ZRCola {
/// ///
/// \returns Data reference /// \returns Data reference
/// ///
inline const T_el& operator[](size_type pos) const const T_el& operator[](size_type pos) const
{ {
return *reinterpret_cast<const T_el*>(&host[std::vector<T_idx>::operator[](pos)]); return *reinterpret_cast<const T_el*>(&host[base_t::operator[](pos)]);
} }
@@ -271,18 +312,18 @@ namespace ZRCola {
/// ///
/// \returns Data reference /// \returns Data reference
/// ///
inline T_el& operator[](size_type pos) T_el& operator[](size_type pos)
{ {
return *reinterpret_cast<T_el*>(&host[std::vector<T_idx>::operator[](pos)]); return *reinterpret_cast<T_el*>(&host[base_t::operator[](pos)]);
} }
/// ///
/// Sorts index /// Sorts index
/// ///
inline void sort() void sort()
{ {
qsort_s(data(), size(), sizeof(T_idx), compare_s, this); qsort_s(base_t::data(), base_t::size(), sizeof(T_idx), compare_s, this);
} }
@@ -333,21 +374,21 @@ namespace ZRCola {
bool find(_In_ const T_el &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. // Start with the full search area.
for (start = 0, end = size(); start < end; ) { for (start = 0, end = base_t::size(); start < end; ) {
size_type m = (start + end) / 2; auto m = (start + end) / 2;
int r = compare(el, at(m)); int r = compare(el, at(m));
if (r < 0) end = m; if (r < 0) end = m;
else if (r > 0) start = m + 1; else if (r > 0) start = m + 1;
else { else {
// Narrow the search area on the left to start at the first element in the run. // Narrow the search area on the left to start at the first element in the run.
for (size_type end2 = m; start < end2;) { for (auto end2 = m; start < end2;) {
size_type m2 = (start + end2) / 2; auto m2 = (start + end2) / 2;
if (compare(el, at(m2)) <= 0) end2 = m2; else start = m2 + 1; if (compare(el, at(m2)) <= 0) end2 = m2; else start = m2 + 1;
} }
// Narrow the search area on the right to end at the first element not in the run. // Narrow the search area on the right to end at the first element not in the run.
for (size_type start2 = m + 1; start2 < end;) { for (auto start2 = m + 1; start2 < end;) {
size_type m2 = (start2 + end) / 2; auto m2 = (start2 + end) / 2;
if (0 <= compare(el, at(m2))) start2 = m2 + 1; else end = m2; if (0 <= compare(el, at(m2))) start2 = m2 + 1; else end = m2;
} }
@@ -372,14 +413,14 @@ namespace ZRCola {
{ {
// Start with the full search area. // Start with the full search area.
size_t end; size_t end;
for (start = 0, end = size(); start < end; ) { for (start = 0, end = base_t::size(); start < end; ) {
size_type m = (start + end) / 2; auto m = (start + end) / 2;
int r = compare(el, at(m)); int r = compare(el, at(m));
if (r < 0) end = m; if (r < 0) end = m;
else if (r > 0) start = m + 1; else if (r > 0) start = m + 1;
else { else {
// Narrow the search area on the left to start at the first element in the run. // Narrow the search area on the left to start at the first element in the run.
for (size_type end2 = m; start < end2;) { for (auto end2 = m; start < end2;) {
m = (start + end2) / 2; m = (start + end2) / 2;
if (compare(el, at(m)) <= 0) end2 = m; else start = m + 1; if (compare(el, at(m)) <= 0) end2 = m; else start = m + 1;
} }
@@ -391,6 +432,68 @@ namespace ZRCola {
return false; return false;
} }
///
/// Writes index to a stream
///
/// \param[in] stream Output stream
/// \param[in] idx Index
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const index& idx)
{
// Write index count.
auto idx_count = idx.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
uint32_t count = (uint32_t)idx_count;
stream.write((const char*)&count, sizeof(count));
// Write index data.
if (stream.fail()) return stream;
stream.write((const char*)idx.data(), sizeof(T_idx) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads index from a stream
///
/// \param[in] stream Input stream
/// \param[out] idx Index
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ index& idx)
{
uint32_t count;
// Read index count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) {
idx.clear();
return stream;
}
if (count) {
// Read index data.
idx.resize(count);
stream.read((char*)idx.data(), sizeof(T_idx) * static_cast<std::streamsize>(count));
}
else
idx.clear();
return stream;
}
private: private:
static int __cdecl compare_s(void *p, const void *a, const void *b) static int __cdecl compare_s(void *p, const void *a, const void *b)
{ {
@@ -406,11 +509,13 @@ namespace ZRCola {
/// ///
/// Memory text index /// Memory text index
/// ///
template <class T_key, class T_val, class T_idx = unsigned __int32> template <class T_key, class T_val, class T_idx = uint32_t>
class textindex : public std::vector< mappair_t<T_idx> > class textindex : public std::vector< mappair_t<T_idx> >
{ {
public:
typedef std::vector< mappair_t<T_idx> > base_t; typedef std::vector< mappair_t<T_idx> > base_t;
public:
typedef size_t size_type;
std::vector<T_key> keys; ///< Key data std::vector<T_key> keys; ///< Key data
std::vector<T_val> values; ///< Index values std::vector<T_val> values; ///< Index values
@@ -424,7 +529,7 @@ namespace ZRCola {
/// ///
/// Clears the index /// Clears the index
/// ///
inline void clear() void clear()
{ {
std::vector< mappair_t<T_idx> >::clear(); std::vector< mappair_t<T_idx> >::clear();
keys .clear(); keys .clear();
@@ -446,15 +551,15 @@ namespace ZRCola {
/// ///
_Success_(return) bool find(_In_count_(key_len) const T_key *key, _In_ size_t key_len, _Out_ const T_val **val, _Out_ size_t *val_len) const _Success_(return) bool find(_In_count_(key_len) const T_key *key, _In_ size_t key_len, _Out_ const T_val **val, _Out_ size_t *val_len) const
{ {
for (size_type start = 0, end = size(); start < end; ) { for (size_type start = 0, end = base_t::size(); start < end; ) {
size_type m = (start + end) / 2; auto m = (start + end) / 2;
int r = compare(key, key_len, m); int r = compare(key, key_len, m);
if (r < 0) end = m; if (r < 0) end = m;
else if (r > 0) start = m + 1; else if (r > 0) start = m + 1;
else { else {
// Get values at position m. // Get values at position m.
start = base_t::at(m ).idx_val; start = base_t::at(m ).idx_val;
*val_len = (m < size() ? base_t::at(m + 1).idx_val : values.size()) - start; *val_len = (m < base_t::size() ? base_t::at(m + 1).idx_val : values.size()) - start;
*val = &values.at(start); *val = &values.at(start);
return true; return true;
} }
@@ -463,15 +568,145 @@ namespace ZRCola {
return false; return false;
} }
///
/// Writes text index to a stream
///
/// \param[in] stream Output stream
/// \param[in] idx Text index
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const textindex& idx)
{
uint32_t count;
// Write index count.
auto idx_count = idx.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
count = (uint32_t)idx_count;
stream.write((const char*)&count, sizeof(count));
// Write index data.
if (stream.fail()) return stream;
auto idx_data = idx.data();
stream.write((const char*)idx_data, sizeof(*idx_data) * static_cast<std::streamsize>(count));
// Write key count.
auto key_count = idx.keys.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
count = (uint32_t)key_count;
stream.write((const char*)&count, sizeof(count));
// Write key data.
if (stream.fail()) return stream;
auto idx_keys_data = idx.keys.data();
stream.write((const char*)idx_keys_data, sizeof(*idx_keys_data) * static_cast<std::streamsize>(count));
// Write value count.
auto value_count = idx.values.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
count = (uint32_t)value_count;
stream.write((const char*)&count, sizeof(count));
// Write value data.
if (stream.fail()) return stream;
auto idx_values_data = idx.values.data();
stream.write((const char*)idx_values_data, sizeof(*idx_values_data) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads text index from a stream
///
/// \param[in] stream Input stream
/// \param[out] idx Text index
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ textindex& idx)
{
uint32_t count;
// Read text index count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) {
idx.clear();
return stream;
}
if (count) {
// Read text index.
idx.resize(count);
auto p = idx.data();
stream.read((char*)p, sizeof(*p) * static_cast<std::streamsize>(count));
if (!stream.good()) return stream;
}
else
idx.clear();
// Read keys count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) return stream;
if (count) {
// Read keys.
idx.keys.resize(count);
auto p = idx.keys.data();
stream.read((char*)p, sizeof(*p) * static_cast<std::streamsize>(count));
if (!stream.good()) return stream;
}
else
idx.keys.clear();
// Read value count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) return stream;
if (count) {
// Read values.
idx.values.resize(count);
auto p = idx.values.data();
stream.read((char*)p, sizeof(*p) * static_cast<std::streamsize>(count));
}
else
idx.values.clear();
return stream;
}
protected: protected:
inline int compare(_In_count_(key_len) const T_key *key, _In_ size_t key_len, size_type pos) const int compare(_In_count_(key_len) const T_key *key, _In_ size_t key_len, size_type pos) const
{ {
// Get key at position pos. // Get key at position pos.
size_type pos_next = pos + 1; auto pos_next = pos + 1;
size_t size_t
start = base_t::at(pos ).idx_key, start = base_t::at(pos ).idx_key,
key2_len = (pos_next < size() ? base_t::at(pos_next).idx_key : keys.size()) - start; key2_len = (pos_next < base_t::size() ? base_t::at(pos_next).idx_key : keys.size()) - start;
std::vector<T_key>::const_pointer key2 = &keys.at(start); auto key2 = &keys.at(start);
// Compare keys. // Compare keys.
int r = memcmp(key, key2, sizeof(T_key)*std::min<size_t>(key_len, key2_len)); int r = memcmp(key, key2, sizeof(T_key)*std::min<size_t>(key_len, key2_len));
@@ -483,57 +718,15 @@ namespace ZRCola {
} }
}; };
/// ///
/// Source-destination index transformation mapping /// Source-destination index transformation mapping
/// ///
class __declspec(novtable) mapping { using mapping = stdex::mapping<size_t>;
public:
size_t src; ///< Character index in source string
size_t dst; ///< Character index in destination string
inline mapping() : src(0), dst(0) {};
inline mapping(_In_ size_t s, _In_ size_t d) : src(s), dst(d) {}
///
/// Reverses source and destination indexes
///
inline void invert() { size_t tmp = src; src = dst; dst = tmp; }
};
/// ///
/// A vector for destination-source index transformation mapping /// A vector for destination-source index transformation mapping
/// ///
class mapping_vector : public std::vector<mapping> { using mapping_vector = std::vector<mapping>;
public:
///
/// Transforms character index of destination to source
///
/// \param[in] decmp Character index in destination string
///
/// \returns Character index in source string
///
size_t to_src(_In_ size_t dst) const;
///
/// Transforms source index to destination index
///
/// \param[in] cmp Character index in source string
///
/// \returns Character index in destination string
///
size_t to_dst(_In_ size_t src) const;
///
/// Reverses source and destination indexes
///
inline void invert()
{
for (iterator i = begin(), iEnd = end(); i != iEnd; ++i)
i->invert();
}
};
/// ///
/// Binary compares two strings /// Binary compares two strings
@@ -552,16 +745,7 @@ namespace ZRCola {
/// The function does not treat \\0 characters as terminators for performance reasons. /// 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. /// 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) int CompareString(_In_ const char_t* str_a, _In_ size_t count_a, _In_ const char_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. /// Generates and returns Unicode representation of the string using hexadecimal codes.
@@ -570,21 +754,7 @@ namespace ZRCola {
/// \param[in] count Number of characters in string \p str /// \param[in] count Number of characters in string \p str
/// \param[in] sep Separator /// \param[in] sep Separator
/// ///
inline std::string GetUnicodeDumpA(_In_ const wchar_t *str, _In_ size_t count, _In_z_ const char *sep = "+") std::string GetUnicodeDumpA(_In_z_count_(count) const char_t* str, _In_ size_t count, _In_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. /// Generates and returns Unicode representation of the string using hexadecimal codes.
@@ -593,21 +763,7 @@ namespace ZRCola {
/// \param[in] count Number of characters in string \p str /// \param[in] count Number of characters in string \p str
/// \param[in] sep Separator /// \param[in] sep Separator
/// ///
inline std::wstring GetUnicodeDumpW(_In_ const wchar_t *str, _In_ size_t count, _In_z_ const wchar_t *sep = L"+") std::wstring GetUnicodeDumpW(_In_z_count_(count) const char_t* str, _In_ size_t count, _In_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 #ifdef _UNICODE
#define GetUnicodeDump GetUnicodeDumpW #define GetUnicodeDump GetUnicodeDumpW
@@ -616,190 +772,4 @@ namespace ZRCola {
#endif #endif
}; };
///
/// Writes index to a stream
///
/// \param[in] stream Output stream
/// \param[in] idx Index
///
/// \returns The stream \p stream
///
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();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
unsigned __int32 count = (unsigned __int32)idx_count;
stream.write((const char*)&count, sizeof(count));
// Write index data.
if (stream.fail()) return stream;
stream.write((const char*)idx.data(), sizeof(T_idx)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads index from a stream
///
/// \param[in] stream Input stream
/// \param[out] idx Index
///
/// \returns The stream \p stream
///
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;
// Read index count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) {
idx.clear();
return stream;
}
if (count) {
// Read index data.
idx.resize(count);
stream.read((char*)idx.data(), sizeof(T_idx)*static_cast<std::streamsize>(count));
} else
idx.clear();
return stream;
}
///
/// Writes text index to a stream
///
/// \param[in] stream Output stream
/// \param[in] idx Text index
///
/// \returns The stream \p stream
///
template <class T_key, class T_val, class T_idx>
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::textindex<T_key, T_val, T_idx> &idx)
{
unsigned __int32 count;
// Write index count.
auto idx_count = idx.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
count = (unsigned __int32)idx_count;
stream.write((const char*)&count, sizeof(count));
// Write index data.
if (stream.fail()) return stream;
stream.write((const char*)idx.data(), sizeof(ZRCola::textindex<T_key, T_val, T_idx>::value_type)*static_cast<std::streamsize>(count));
// Write key count.
auto key_count = idx.keys.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
count = (unsigned __int32)key_count;
stream.write((const char*)&count, sizeof(count));
// Write key data.
if (stream.fail()) return stream;
stream.write((const char*)idx.keys.data(), sizeof(std::vector<T_key>::value_type)*static_cast<std::streamsize>(count));
// Write value count.
auto value_count = idx.values.size();
#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__)
// 4G check
if (idx_count > 0xffffffff) {
stream.setstate(std::ios_base::failbit);
return stream;
}
#endif
if (stream.fail()) return stream;
count = (unsigned __int32)value_count;
stream.write((const char*)&count, sizeof(count));
// Write value data.
if (stream.fail()) return stream;
stream.write((const char*)idx.values.data(), sizeof(std::vector<T_val>::value_type)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads text index from a stream
///
/// \param[in] stream Input stream
/// \param[out] idx Text index
///
/// \returns The stream \p stream
///
template <class T_key, class T_val, class T_idx>
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::textindex<T_key, T_val, T_idx> &idx)
{
unsigned __int32 count;
// Read text index count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) {
idx.clear();
return stream;
}
if (count) {
// Read text index.
idx.resize(count);
stream.read((char*)idx.data(), sizeof(ZRCola::textindex<T_key, T_val, T_idx>::value_type)*static_cast<std::streamsize>(count));
if (!stream.good()) return stream;
} else
idx.clear();
// Read keys count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) return stream;
if (count) {
// Read keys.
idx.keys.resize(count);
stream.read((char*)idx.keys.data(), sizeof(std::vector<T_key>::value_type)*static_cast<std::streamsize>(count));
if (!stream.good()) return stream;
} else
idx.keys.clear();
// Read value count.
stream.read((char*)&count, sizeof(count));
if (!stream.good()) return stream;
if (count) {
// Read values.
idx.values.resize(count);
stream.read((char*)idx.values.data(), sizeof(std::vector<T_val>::value_type)*static_cast<std::streamsize>(count));
} else
idx.values.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -7,8 +7,6 @@
#include "common.h" #include "common.h"
#include <stdex/idrec>
#include <functional> #include <functional>
#pragma warning(push) #pragma warning(push)
@@ -29,7 +27,7 @@ namespace ZRCola {
/// ///
/// Highlight set ID /// Highlight set ID
/// ///
typedef unsigned __int16 hlghtsetid_t; typedef uint16_t hlghtsetid_t;
/// ///
/// Highlight database /// Highlight database
@@ -43,15 +41,15 @@ namespace ZRCola {
/// ///
struct highlight { struct highlight {
public: public:
hlghtsetid_t set; ///< Highlight set ID hlghtsetid_t set; ///< Highlight set ID
protected: protected:
unsigned __int16 chr_to; ///< Character end in \c data uint16_t chr_to; ///< Character end in \c data
wchar_t data[]; ///< Character char_t data[]; ///< Character
private: private:
inline highlight(_In_ const highlight &other); highlight(_In_ const highlight &other);
inline highlight& operator=(_In_ const highlight &other); highlight& operator=(_In_ const highlight &other);
public: public:
/// ///
@@ -61,23 +59,23 @@ namespace ZRCola {
/// \param[in] chr Character /// \param[in] chr Character
/// \param[in] chr_len Number of UTF-16 characters in \p chr /// \param[in] chr_len Number of UTF-16 characters in \p chr
/// ///
inline highlight( highlight(
_In_opt_ hlghtsetid_t set = 0, _In_opt_ hlghtsetid_t set = 0,
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL, _In_opt_z_count_(chr_len) const char_t *chr = NULL,
_In_opt_ size_t chr_len = 0) _In_opt_ size_t chr_len = 0)
{ {
this->set = set; this->set = set;
this->chr_to = static_cast<unsigned __int16>(chr_len); this->chr_to = static_cast<uint16_t>(chr_len);
if (chr && chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len); if (chr && chr_len) memcpy(this->data, chr, sizeof(char_t)*chr_len);
} }
inline const wchar_t* chr () const { return data; }; const char_t* chr () const { return data; };
inline wchar_t* chr () { return data; }; char_t* chr () { return data; };
inline const wchar_t* chr_end() const { return data + chr_to; }; const char_t* chr_end() const { return data + chr_to; };
inline wchar_t* chr_end() { return data + chr_to; }; char_t* chr_end() { return data + chr_to; };
inline unsigned __int16 chr_len() const { return chr_to; }; uint16_t chr_len() const { return chr_to; };
inline wchar_t chr_at(_In_ size_t i) const char_t chr_at(_In_ size_t i) const
{ {
return i < chr_to ? data[i] : 0; return i < chr_to ? data[i] : 0;
} }
@@ -87,7 +85,7 @@ namespace ZRCola {
/// ///
/// Highlight index /// Highlight index
/// ///
class indexChr : public index<unsigned __int16, unsigned __int32, highlight> class indexChr : public index<uint16_t, uint32_t, highlight>
{ {
public: public:
/// ///
@@ -95,7 +93,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, highlight>(h) {} indexChr(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, highlight>(h) {}
/// ///
/// Compares two highlights by string (for searching) /// Compares two highlights by string (for searching)
@@ -113,8 +111,8 @@ namespace ZRCola {
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len()); int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
if (r != 0) return r; if (r != 0) return r;
if (a.set < b.set) return -1; if (a.set < b.set) return -1;
else if (a.set > b.set) return +1; if (a.set > b.set) return +1;
return 0; return 0;
} }
@@ -138,18 +136,18 @@ namespace ZRCola {
} idxChr; ///< Highlight index } idxChr; ///< Highlight index
std::vector<unsigned __int16> data; ///< Highlight data std::vector<uint16_t> data; ///< Highlight data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline highlight_db() : idxChr(data) {} highlight_db() : idxChr(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxChr.clear(); idxChr.clear();
data .clear(); data .clear();
@@ -162,79 +160,73 @@ namespace ZRCola {
/// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated. /// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated.
/// \param[in] callback Function to be called on highlight switch /// \param[in] callback Function to be called on highlight switch
/// ///
void Highlight(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _In_ std::function<void (hlghtsetid_t set, size_t start, size_t end)> callback) const; void Highlight(_In_z_count_(inputMax) const char_t* input, _In_ size_t inputMax, _In_ std::function<void (hlghtsetid_t set, size_t start, size_t end)> callback) const;
///
/// Writes highlight database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Highlight database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const highlight_db& db)
{
// Write highlight index.
if (stream.fail()) return stream;
stream << db.idxChr;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads highlight database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Highlight database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ highlight_db& db)
{
// Read highlight index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<highlight_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> highlight_rec;
}; };
const ZRCola::recordid_t ZRCola::highlight_rec::id = *(ZRCola::recordid_t*)"HGH";
///
/// Writes highlight database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Highlight database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::highlight_db &db)
{
// Write highlight index.
if (stream.fail()) return stream;
stream << db.idxChr;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads highlight database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Highlight database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::highlight_db &db)
{
// Read highlight index.
stream >> db.idxChr;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -0,0 +1,27 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2022 Amebis
*/
#pragma once
#include "character.h"
#include "highlight.h"
#include "language.h"
#include "tag.h"
#include "translate.h"
#include <stdex/idrec.hpp>
namespace ZRCola {
typedef stdex::idrec::record<character_db, recordid_t, 0x524843 /*"CHR"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> character_rec;
typedef stdex::idrec::record<chrblk_db, recordid_t, 0x4c4243 /*"CBL"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> chrblk_rec;
typedef stdex::idrec::record<highlight_db, recordid_t, 0x484748 /*"HGH"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> highlight_rec;
typedef stdex::idrec::record<langchar_db, recordid_t, 0x432d4c /*"L-C"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> langchar_rec;
typedef stdex::idrec::record<language_db, recordid_t, 0x474e4c /*"LNG"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> language_rec;
typedef stdex::idrec::record<chrtag_db, recordid_t, 0x542d43 /*"C-T"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> chrtag_rec;
typedef stdex::idrec::record<tagname_db, recordid_t, 0x4e4754 /*"TGN"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> tagname_rec;
typedef stdex::idrec::record<translation_db, recordid_t, 0x4e5254 /*"TRN"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> translation_rec;
typedef stdex::idrec::record<transet_db, recordid_t, 0x455354 /*"TSE"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> transet_rec;
typedef stdex::idrec::record<transeq_db, recordid_t, 0x515354 /*"TSQ"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> transeq_rec;
}

View File

@@ -7,7 +7,6 @@
#include "common.h" #include "common.h"
#include <stdex/idrec>
#include <istream> #include <istream>
#include <ostream> #include <ostream>
#include <vector> #include <vector>
@@ -32,15 +31,15 @@ namespace ZRCola {
/// ///
struct langchar { struct langchar {
public: public:
langid_t lang; ///< Language ID langid_t lang; ///< Language ID
protected: protected:
unsigned __int16 chr_to; ///< Character end in \c data uint16_t chr_to; ///< Character end in \c data
wchar_t data[]; ///< Character char_t data[]; ///< Character
private: private:
inline langchar(_In_ const langchar &other); langchar(_In_ const langchar &other);
inline langchar& operator=(_In_ const langchar &other); langchar& operator=(_In_ const langchar &other);
public: public:
/// ///
@@ -50,28 +49,28 @@ namespace ZRCola {
/// \param[in] chr Character /// \param[in] chr Character
/// \param[in] chr_len Number of UTF-16 characters in \p chr /// \param[in] chr_len Number of UTF-16 characters in \p chr
/// ///
inline langchar( langchar(
_In_opt_ langid_t lang = langid_t::blank, _In_opt_ langid_t lang = langid_t(),
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL, _In_opt_z_count_(chr_len) const char_t *chr = NULL,
_In_opt_ size_t chr_len = 0) _In_opt_ size_t chr_len = 0)
{ {
this->lang = lang; this->lang = lang;
this->chr_to = static_cast<unsigned __int16>(chr_len); this->chr_to = static_cast<uint16_t>(chr_len);
if (chr && chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len); if (chr && chr_len) memcpy(this->data, chr, sizeof(char_t)*chr_len);
} }
inline const wchar_t* chr () const { return data; }; const char_t* chr () const { return data; };
inline wchar_t* chr () { return data; }; char_t* chr () { return data; };
inline const wchar_t* chr_end() const { return data + chr_to; }; const char_t* chr_end() const { return data + chr_to; };
inline wchar_t* chr_end() { return data + chr_to; }; char_t* chr_end() { return data + chr_to; };
inline unsigned __int16 chr_len() const { return chr_to; }; uint16_t chr_len() const { return chr_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Character index /// Character index
/// ///
class indexChr : public index<unsigned __int16, unsigned __int32, langchar> class indexChr : public index<uint16_t, uint32_t, langchar>
{ {
public: public:
/// ///
@@ -79,7 +78,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, langchar>(h) {} indexChr(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, langchar>(h) {}
/// ///
/// Compares two characters by ID (for searching) /// Compares two characters by ID (for searching)
@@ -97,8 +96,8 @@ namespace ZRCola {
int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len()); int r = ZRCola::CompareString(a.chr(), a.chr_len(), b.chr(), b.chr_len());
if (r != 0) return r; if (r != 0) return r;
if (a.lang < b.lang) return -1; if (a.lang < b.lang) return -1;
else if (a.lang > b.lang) return 1; if (a.lang > b.lang) return 1;
return 0; return 0;
} }
@@ -109,7 +108,7 @@ namespace ZRCola {
/// ///
/// Language Index /// Language Index
/// ///
class indexLang : public index<unsigned __int16, unsigned __int32, langchar> class indexLang : public index<uint16_t, uint32_t, langchar>
{ {
public: public:
/// ///
@@ -117,7 +116,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexLang(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, langchar>(h) {} indexLang(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, langchar>(h) {}
/// ///
/// Compares two languages by ID (for searching) /// Compares two languages by ID (for searching)
@@ -132,8 +131,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const langchar &a, _In_ const langchar &b) const virtual int compare(_In_ const langchar &a, _In_ const langchar &b) const
{ {
if (a.lang < b.lang) return -1; if (a.lang < b.lang) return -1;
else if (a.lang > b.lang) return 1; if (a.lang > b.lang) return 1;
int r = ZRCola::CompareString(a.chr, a.chr_len(), b.chr(), b.chr_len()); int r = ZRCola::CompareString(a.chr, a.chr_len(), b.chr(), b.chr_len());
if (r != 0) return r; if (r != 0) return r;
@@ -143,13 +142,13 @@ namespace ZRCola {
} idxLang; ///< Language index } idxLang; ///< Language index
#endif #endif
std::vector<unsigned __int16> data; ///< Character data std::vector<uint16_t> data; ///< Character data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline langchar_db() : idxChr(data) langchar_db() : idxChr(data)
#ifdef ZRCOLA_LANGCHAR_LANG_IDX #ifdef ZRCOLA_LANGCHAR_LANG_IDX
, idxLang(data) , idxLang(data)
#endif #endif
@@ -158,7 +157,7 @@ namespace ZRCola {
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxChr .clear(); idxChr .clear();
#ifdef ZRCOLA_LANGCHAR_LANG_IDX #ifdef ZRCOLA_LANGCHAR_LANG_IDX
@@ -177,13 +176,88 @@ namespace ZRCola {
/// \returns /// \returns
/// - \c true when character is used in language /// - \c true when character is used in language
/// - \c false otherwise /// - \c false otherwise
bool IsLocalCharacter(_In_ const wchar_t *chr, _In_ const wchar_t *chr_end, _In_ langid_t lang) const; bool IsLocalCharacter(_In_ const char_t *chr, _In_ const char_t *chr_end, _In_ langid_t lang) const;
///
/// Writes language character database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Language character database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const langchar_db& db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
// Write language index.
if (stream.fail()) return stream;
stream << db.idxLang;
#endif
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads language character database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Language character database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ langchar_db& db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
// Read language index.
stream >> db.idxLang;
if (!stream.good()) return stream;
#endif
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<langchar_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> langchar_rec;
/// ///
/// Language database /// Language database
/// ///
@@ -196,15 +270,15 @@ namespace ZRCola {
/// ///
struct language { struct language {
public: public:
langid_t lang; ///< Language ID langid_t lang; ///< Language ID
protected: protected:
unsigned __int16 name_to; ///< Language name end in \c data uint16_t name_to; ///< Language name end in \c data
wchar_t data[]; ///< Language name char_t data[]; ///< Language name
private: private:
inline language(_In_ const language &other); language(_In_ const language &other);
inline language& operator=(_In_ const language &other); language& operator=(_In_ const language &other);
public: public:
/// ///
@@ -214,28 +288,28 @@ namespace ZRCola {
/// \param[in] name Language name /// \param[in] name Language name
/// \param[in] name_len Number of UTF-16 characters in \p name /// \param[in] name_len Number of UTF-16 characters in \p name
/// ///
inline language( language(
_In_opt_ langid_t lang = langid_t::blank, _In_opt_ langid_t lang = langid_t(),
_In_opt_z_count_(name_len) const wchar_t *name = NULL, _In_opt_z_count_(name_len) const char_t *name = NULL,
_In_opt_ size_t name_len = 0) _In_opt_ size_t name_len = 0)
{ {
this->lang = lang; this->lang = lang;
this->name_to = static_cast<unsigned __int16>(name_len); this->name_to = static_cast<uint16_t>(name_len);
if (name && name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len); if (name && name_len) memcpy(this->data, name, sizeof(char_t)*name_len);
} }
inline const wchar_t* name () const { return data; }; const char_t* name () const { return data; };
inline wchar_t* name () { return data; }; char_t* name () { return data; };
inline const wchar_t* name_end() const { return data + name_to; }; const char_t* name_end() const { return data + name_to; };
inline wchar_t* name_end() { return data + name_to; }; char_t* name_end() { return data + name_to; };
inline unsigned __int16 name_len() const { return name_to; }; uint16_t name_len() const { return name_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Language index /// Language index
/// ///
class indexLang : public index<unsigned __int16, unsigned __int32, language> class indexLang : public index<uint16_t, uint32_t, language>
{ {
public: public:
/// ///
@@ -243,7 +317,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexLang(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, language>(h) {} indexLang(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, language>(h) {}
/// ///
/// Compares two languages by ID (for searching) /// Compares two languages by ID (for searching)
@@ -258,179 +332,96 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const language &a, _In_ const language &b) const virtual int compare(_In_ const language &a, _In_ const language &b) const
{ {
if (a.lang < b.lang) return -1; if (a.lang < b.lang) return -1;
else if (a.lang > b.lang) return 1; if (a.lang > b.lang) return 1;
return 0; return 0;
} }
} idxLang; ///< Language index } idxLang; ///< Language index
std::vector<unsigned __int16> data; ///< Language data std::vector<uint16_t> data; ///< Language data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline language_db() : idxLang(data) {} language_db() : idxLang(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxLang.clear(); idxLang.clear();
data .clear(); data .clear();
} }
///
/// Writes language database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Language database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const language_db& db)
{
// Write language index.
if (stream.fail()) return stream;
stream << db.idxLang;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads language database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Language database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ language_db& db)
{
// Read language index.
stream >> db.idxLang;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<language_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> language_rec;
}; };
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";
///
/// Writes language character database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Language character database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::langchar_db &db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
// Write language index.
if (stream.fail()) return stream;
stream << db.idxLang;
#endif
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads language character database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Language character database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::langchar_db &db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
// Read language index.
stream >> db.idxLang;
if (!stream.good()) return stream;
#endif
// 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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
///
/// Writes language database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Language database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::language_db &db)
{
// Write language index.
if (stream.fail()) return stream;
stream << db.idxLang;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads language database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Language database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::language_db &db)
{
// Read language index.
stream >> db.idxLang;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -7,7 +7,6 @@
#include "common.h" #include "common.h"
#include <stdex/idrec>
#include <assert.h> #include <assert.h>
#include <istream> #include <istream>
#include <ostream> #include <ostream>
@@ -21,7 +20,7 @@
namespace ZRCola { namespace ZRCola {
typedef unsigned __int16 tagid_t; typedef uint16_t tagid_t;
/// ///
/// Character Tag Database /// Character Tag Database
@@ -35,15 +34,15 @@ namespace ZRCola {
/// ///
struct chrtag { struct chrtag {
public: public:
tagid_t tag; ///< Tag ID tagid_t tag; ///< Tag ID
protected: protected:
unsigned __int16 chr_to; ///< Character end in \c data uint16_t chr_to; ///< Character end in \c data
wchar_t data[]; ///< Character char_t data[]; ///< Character
private: private:
inline chrtag(_In_ const chrtag &other); chrtag(_In_ const chrtag &other);
inline chrtag& operator=(_In_ const chrtag &other); chrtag& operator=(_In_ const chrtag &other);
public: public:
/// ///
@@ -53,28 +52,28 @@ namespace ZRCola {
/// \param[in] chr_len Number of UTF-16 characters in \p chr /// \param[in] chr_len Number of UTF-16 characters in \p chr
/// \param[in] tag Tag /// \param[in] tag Tag
/// ///
inline chrtag( chrtag(
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL, _In_opt_z_count_(chr_len) const char_t *chr = NULL,
_In_opt_ size_t chr_len = 0, _In_opt_ size_t chr_len = 0,
_In_opt_ tagid_t tag = 0) _In_opt_ tagid_t tag = 0)
{ {
this->tag = tag; this->tag = tag;
this->chr_to = static_cast<unsigned __int16>(chr_len); this->chr_to = static_cast<uint16_t>(chr_len);
if (chr && chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len); if (chr && chr_len) memcpy(this->data, chr, sizeof(char_t)*chr_len);
} }
inline const wchar_t* chr () const { return data; }; const char_t* chr () const { return data; };
inline wchar_t* chr () { return data; }; char_t* chr () { return data; };
inline const wchar_t* chr_end() const { return data + chr_to; }; const char_t* chr_end() const { return data + chr_to; };
inline wchar_t* chr_end() { return data + chr_to; }; char_t* chr_end() { return data + chr_to; };
inline unsigned __int16 chr_len() const { return chr_to; }; uint16_t chr_len() const { return chr_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Character Index /// Character Index
/// ///
class indexChr : public index<unsigned __int16, unsigned __int32, chrtag> class indexChr : public index<uint16_t, uint32_t, chrtag>
{ {
public: public:
/// ///
@@ -82,7 +81,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrtag>(h) {} indexChr(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, chrtag>(h) {}
/// ///
/// Compares two character tags by character (for searching) /// Compares two character tags by character (for searching)
@@ -130,7 +129,7 @@ namespace ZRCola {
/// ///
/// Tag Index /// Tag Index
/// ///
class indexTag : public index<unsigned __int16, unsigned __int32, chrtag> class indexTag : public index<uint16_t, uint32_t, chrtag>
{ {
public: public:
/// ///
@@ -138,7 +137,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexTag(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrtag>(h) {} indexTag(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, chrtag>(h) {}
/// ///
/// Compares two character tags by tag (for searching) /// Compares two character tags by tag (for searching)
@@ -153,8 +152,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const chrtag &a, _In_ const chrtag &b) const virtual int compare(_In_ const chrtag &a, _In_ const chrtag &b) const
{ {
if (a.tag < b.tag) return -1; if (a.tag < b.tag) return -1;
else if (a.tag > b.tag) return 1; if (a.tag > b.tag) return 1;
return 0; return 0;
} }
@@ -182,18 +181,18 @@ namespace ZRCola {
} }
} idxTag; ///< Tag index } idxTag; ///< Tag index
std::vector<unsigned __int16> data; ///< Character tags data std::vector<uint16_t> data; ///< Character tags data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline chrtag_db() : idxChr(data), idxTag(data) {} chrtag_db() : idxChr(data), idxTag(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxChr.clear(); idxChr.clear();
idxTag.clear(); idxTag.clear();
@@ -205,18 +204,89 @@ namespace ZRCola {
/// ///
/// \param[in ] tags Search tags /// \param[in ] tags Search tags
/// \param[in ] ch_db Character database /// \param[in ] ch_db Character database
/// \param[in ] cats Set of categories from \p ch_db, character must be a part of /// \param[in ] blks Set of blocks from \p ch_db, character must be a part of
/// \param[inout] hits (character, count) map to append hits to /// \param[inout] hits (character, count) map to append hits to
/// \param[in ] fn_abort Pointer to function to periodically test for search cancellation /// \param[in ] fn_abort Pointer to function to periodically test for search cancellation
/// \param[in ] cookie Cookie for \p fn_abort call /// \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<std::wstring, 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, uint16_t> &tags, _In_ const character_db &ch_db, _In_ const std::set<chrblkid_t> &blks, _Inout_ std::map<string_t, charrank_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
///
/// Writes character tag database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character tag database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const chrtag_db& db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
// Write tag index.
if (stream.fail()) return stream;
stream << db.idxTag;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character tag database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character tag database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ chrtag_db& db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read tag index.
stream >> db.idxTag;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<chrtag_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrtag_rec;
/// ///
/// Tag name database /// Tag name database
/// ///
@@ -229,16 +299,16 @@ namespace ZRCola {
/// ///
struct tagname { struct tagname {
public: public:
tagid_t tag; ///< Tag ID tagid_t tag; ///< Tag ID
LCID locale; ///< Locale ID uint32_t locale; ///< Locale ID
protected: protected:
unsigned __int16 name_to; ///< Tag name end in \c data uint16_t name_to; ///< Tag name end in \c data
wchar_t data[]; ///< Tag name char_t data[]; ///< Tag name
private: private:
inline tagname(_In_ const tagname &other); tagname(_In_ const tagname &other);
inline tagname& operator=(_In_ const tagname &other); tagname& operator=(_In_ const tagname &other);
public: public:
/// ///
@@ -249,23 +319,23 @@ namespace ZRCola {
/// \param[in] name Tag name /// \param[in] name Tag name
/// \param[in] name_len Number of UTF-16 characters in \p name /// \param[in] name_len Number of UTF-16 characters in \p name
/// ///
inline tagname( tagname(
_In_opt_ tagid_t tag = 0, _In_opt_ tagid_t tag = 0,
_In_opt_ LCID locale = MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT), _In_opt_ uint32_t locale = 0,
_In_opt_z_count_(name_len) const wchar_t *name = NULL, _In_opt_z_count_(name_len) const char_t *name = NULL,
_In_opt_ size_t name_len = 0) _In_opt_ size_t name_len = 0)
{ {
this->tag = tag; this->tag = tag;
this->locale = locale; this->locale = locale;
this->name_to = static_cast<unsigned __int16>(name_len); this->name_to = static_cast<uint16_t>(name_len);
if (name && name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len); if (name && name_len) memcpy(this->data, name, sizeof(char_t)*name_len);
} }
inline const wchar_t* name () const { return data; }; const char_t* name () const { return data; };
inline wchar_t* name () { return data; }; char_t* name () { return data; };
inline const wchar_t* name_end() const { return data + name_to; }; const char_t* name_end() const { return data + name_to; };
inline wchar_t* name_end() { return data + name_to; }; char_t* name_end() { return data + name_to; };
inline unsigned __int16 name_len() const { return name_to; }; uint16_t name_len() const { return name_to; };
/// ///
/// Compares two names /// Compares two names
@@ -285,14 +355,28 @@ namespace ZRCola {
/// The function does not treat \\0 characters as terminators for performance reasons. /// 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. /// Therefore \p count_a and \p count_b must represent exact string lengths.
/// ///
static inline int CompareName(LCID locale, const wchar_t *str_a, unsigned __int16 count_a, const wchar_t *str_b, unsigned __int16 count_b) static int CompareName(_In_ uint32_t locale, _In_z_count_(count_a) const char_t *str_a, _In_ uint16_t count_a, _In_z_count_(count_b) const char_t *str_b, _In_ uint16_t count_b)
{ {
#ifdef _WIN32
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_LESS_THAN : return -1;
case CSTR_EQUAL : return 0; case CSTR_EQUAL : return 0;
case CSTR_GREATER_THAN: return 1; case CSTR_GREATER_THAN: return 1;
default : assert(0); return -1; default : assert(0); return -1;
} }
#else
assert(0); // TODO: 1. Should honour locale. 2. Should use ICU for lowercase conversion. 3. Should be UTF-16-aware.
string_t
a(str_a, count_a),
b(str_b, count_b);
auto tolower = [](char_t c){ return std::towlower(c); };
std::transform(a.begin(), a.end(), a.begin(), tolower);
std::transform(b.begin(), b.end(), b.begin(), tolower);
auto &coll = std::use_facet<std::collate<char_t>>(std::locale());
return coll.compare(
a.data(), a.data() + a.size(),
b.data(), b.data() + b.size());
#endif
} }
}; };
#pragma pack(pop) #pragma pack(pop)
@@ -300,7 +384,7 @@ namespace ZRCola {
/// ///
/// Name index /// Name index
/// ///
class indexName : public index<unsigned __int16, unsigned __int32, tagname> class indexName : public index<uint16_t, uint32_t, tagname>
{ {
public: public:
/// ///
@@ -309,7 +393,7 @@ namespace ZRCola {
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// \param[in] locale Locale used to perform tag name comparison /// \param[in] locale Locale used to perform tag name comparison
/// ///
indexName(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, tagname>(h) {} indexName(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, tagname>(h) {}
/// ///
/// Compares two tag names by locale and name (for searching) /// Compares two tag names by locale and name (for searching)
@@ -324,8 +408,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const tagname &a, _In_ const tagname &b) const virtual int compare(_In_ const tagname &a, _In_ const tagname &b) const
{ {
if (a.locale < b.locale) return -1; if (a.locale < b.locale) return -1;
else if (a.locale > b.locale) return 1; 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 (r != 0) return r;
@@ -362,7 +446,7 @@ namespace ZRCola {
/// ///
/// Tag index /// Tag index
/// ///
class indexTag : public index<unsigned __int16, unsigned __int32, tagname> class indexTag : public index<uint16_t, uint32_t, tagname>
{ {
public: public:
/// ///
@@ -371,7 +455,7 @@ namespace ZRCola {
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// \param[in] locale Locale used to perform tag name comparison /// \param[in] locale Locale used to perform tag name comparison
/// ///
indexTag(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, tagname>(h) {} indexTag(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, tagname>(h) {}
/// ///
/// Compares two tag names by tag (for searching) /// Compares two tag names by tag (for searching)
@@ -386,28 +470,28 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const tagname &a, _In_ const tagname &b) const virtual int compare(_In_ const tagname &a, _In_ const tagname &b) const
{ {
if (a.locale < b.locale) return -1; if (a.locale < b.locale) return -1;
else if (a.locale > b.locale) return 1; if (a.locale > b.locale) return 1;
if (a.tag < b.tag) return -1; if (a.tag < b.tag) return -1;
else if (a.tag > b.tag) return 1; if (a.tag > b.tag) return 1;
return 0; return 0;
} }
} idxTag; ///< Tag index } idxTag; ///< Tag index
std::vector<unsigned __int16> data; ///< Tag data std::vector<uint16_t> data; ///< Tag data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline tagname_db() : idxName(data), idxTag(data) {} tagname_db() : idxName(data), idxTag(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxName.clear(); idxName.clear();
idxTag .clear(); idxTag .clear();
@@ -423,161 +507,82 @@ namespace ZRCola {
/// \param[in ] fn_abort Pointer to function to periodically test for search cancellation /// \param[in ] fn_abort Pointer to function to periodically test for search cancellation
/// \param[in ] cookie Cookie for \p fn_abort call /// \param[in ] cookie Cookie for \p fn_abort call
/// ///
bool Search(_In_z_ const wchar_t *str, _In_ LCID locale, _Inout_ std::map<tagid_t, unsigned __int16> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const; bool Search(_In_z_ const char_t *str, _In_ uint32_t locale, _Inout_ std::map<tagid_t, uint16_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie) = NULL, _In_opt_ void *cookie = NULL) const;
///
/// Writes tag database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Tag database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const tagname_db& db)
{
// Write name index.
if (stream.fail()) return stream;
stream << db.idxName;
// Write tag index.
if (stream.fail()) return stream;
stream << db.idxTag;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads tag database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Tag database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ tagname_db& db)
{
// Read name index.
stream >> db.idxName;
if (!stream.good()) return stream;
// Read tag index.
stream >> db.idxTag;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<tagname_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> tagname_rec;
}; };
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";
///
/// Writes character tag database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character tag database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::chrtag_db &db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
// Write tag index.
if (stream.fail()) return stream;
stream << db.idxTag;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character tag database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character tag database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::chrtag_db &db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read tag index.
stream >> db.idxTag;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
///
/// Writes tag database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Tag database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::tagname_db &db)
{
// Write name index.
if (stream.fail()) return stream;
stream << db.idxName;
// Write tag index.
if (stream.fail()) return stream;
stream << db.idxTag;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads tag database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Tag database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::tagname_db &db)
{
// Read name index.
stream >> db.idxName;
if (!stream.good()) return stream;
// Read tag index.
stream >> db.idxTag;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -8,7 +8,10 @@
#include "common.h" #include "common.h"
#include "language.h" #include "language.h"
#include <stdex/idrec> namespace ZRCola {
class translation_db;
}
#include <algorithm> #include <algorithm>
#include <istream> #include <istream>
#include <ostream> #include <ostream>
@@ -45,12 +48,12 @@ namespace ZRCola {
/// ///
/// Translation set ID /// Translation set ID
/// ///
typedef unsigned __int16 transetid_t; typedef uint16_t transetid_t;
/// ///
/// Translation sequence ID /// Translation sequence ID
/// ///
typedef unsigned __int16 transeqid_t; typedef uint16_t transeqid_t;
/// ///
/// Translation database /// Translation database
@@ -64,18 +67,18 @@ namespace ZRCola {
/// ///
struct translation { struct translation {
public: public:
transetid_t set; ///< Translation set ID transetid_t set; ///< Translation set ID
unsigned __int16 dst_rank; ///< Destination character rank uint16_t dst_rank; ///< Destination character rank
unsigned __int16 src_rank; ///< Source character rank uint16_t src_rank; ///< Source character rank
protected: protected:
unsigned __int16 dst_to; ///< Destination character end in \c data uint16_t dst_to; ///< Destination character end in \c data
unsigned __int16 src_to; ///< Source string end in \c data uint16_t src_to; ///< Source string end in \c data
wchar_t data[]; ///< Destination string and source character char_t data[]; ///< Destination string and source character
private: private:
inline translation(_In_ const translation &other); translation(_In_ const translation &other);
inline translation& operator=(_In_ const translation &other); translation& operator=(_In_ const translation &other);
public: public:
/// ///
@@ -89,42 +92,42 @@ namespace ZRCola {
/// \param[in] src Source character /// \param[in] src Source character
/// \param[in] src_len Number of UTF-16 characters in \p src /// \param[in] src_len Number of UTF-16 characters in \p src
/// ///
inline translation( translation(
_In_opt_ transetid_t set = 0, _In_opt_ transetid_t set = 0,
_In_opt_ unsigned __int16 dst_rank = 0, _In_opt_ uint16_t dst_rank = 0,
_In_opt_z_count_(dst_len) const wchar_t *dst = NULL, _In_opt_z_count_(dst_len) const char_t *dst = NULL,
_In_opt_ size_t dst_len = 0, _In_opt_ size_t dst_len = 0,
_In_opt_ unsigned __int16 src_rank = 0, _In_opt_ uint16_t src_rank = 0,
_In_opt_z_count_(src_len) const wchar_t *src = NULL, _In_opt_z_count_(src_len) const char_t *src = NULL,
_In_opt_ size_t src_len = 0) _In_opt_ size_t src_len = 0)
{ {
this->set = set; this->set = set;
this->dst_rank = dst_rank; this->dst_rank = dst_rank;
this->src_rank = src_rank; this->src_rank = src_rank;
this->dst_to = static_cast<unsigned __int16>(dst_len); this->dst_to = static_cast<uint16_t>(dst_len);
if (dst && dst_len) memcpy(this->data, dst, sizeof(wchar_t)*dst_len); if (dst && dst_len) memcpy(this->data, dst, sizeof(char_t)*dst_len);
this->src_to = static_cast<unsigned __int16>(this->dst_to + src_len); this->src_to = static_cast<uint16_t>(this->dst_to + src_len);
if (src && src_len) memcpy(this->data + this->dst_to, src, sizeof(wchar_t)*src_len); if (src && src_len) memcpy(this->data + this->dst_to, src, sizeof(char_t)*src_len);
} }
inline const wchar_t* dst () const { return data; }; const char_t* dst () const { return data; };
inline wchar_t* dst () { return data; }; char_t* dst () { return data; };
inline const wchar_t* dst_end() const { return data + dst_to; }; const char_t* dst_end() const { return data + dst_to; };
inline wchar_t* dst_end() { return data + dst_to; }; char_t* dst_end() { return data + dst_to; };
inline unsigned __int16 dst_len() const { return dst_to; }; uint16_t dst_len() const { return dst_to; };
inline wchar_t dst_at(_In_ size_t i) const char_t dst_at(_In_ size_t i) const
{ {
return i < dst_to ? data[i] : 0; return i < dst_to ? data[i] : 0;
} }
inline const wchar_t* src () const { return data + dst_to; }; const char_t* src () const { return data + dst_to; };
inline wchar_t* src () { return data + dst_to; }; char_t* src () { return data + dst_to; };
inline const wchar_t* src_end() const { return data + src_to; }; const char_t* src_end() const { return data + src_to; };
inline wchar_t* src_end() { return data + src_to; }; char_t* src_end() { return data + src_to; };
inline unsigned __int16 src_len() const { return src_to - dst_to; }; uint16_t src_len() const { return src_to - dst_to; };
inline wchar_t src_at(_In_ size_t i) const char_t src_at(_In_ size_t i) const
{ {
size_t ii = i + dst_to; // absolute index size_t ii = i + dst_to; // absolute index
return ii < src_to ? data[ii] : 0; return ii < src_to ? data[ii] : 0;
@@ -135,7 +138,7 @@ namespace ZRCola {
/// ///
/// Translation index /// Translation index
/// ///
class indexSrc : public index<unsigned __int16, unsigned __int32, translation> class indexSrc : public index<uint16_t, uint32_t, translation>
{ {
public: public:
/// ///
@@ -143,7 +146,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexSrc(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, translation>(h) {} indexSrc(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, translation>(h) {}
/// ///
/// Compares two transformations by string (for searching) /// Compares two transformations by string (for searching)
@@ -158,8 +161,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const translation &a, _In_ const translation &b) const virtual int compare(_In_ const translation &a, _In_ const translation &b) const
{ {
if (a.set < b.set) return -1; if (a.set < b.set) return -1;
else if (a.set > b.set) return +1; if (a.set > b.set) return +1;
int r = ZRCola::CompareString(a.src(), a.src_len(), b.src(), b.src_len()); int r = ZRCola::CompareString(a.src(), a.src_len(), b.src(), b.src_len());
if (r != 0) return r; if (r != 0) return r;
@@ -200,7 +203,7 @@ namespace ZRCola {
/// ///
/// Inverse translation index /// Inverse translation index
/// ///
class indexDst : public index<unsigned __int16, unsigned __int32, translation> class indexDst : public index<uint16_t, uint32_t, translation>
{ {
public: public:
/// ///
@@ -208,7 +211,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexDst(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, translation>(h) {} indexDst(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, translation>(h) {}
/// ///
/// Compares two transformations by character (for searching) /// Compares two transformations by character (for searching)
@@ -223,8 +226,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const translation &a, _In_ const translation &b) const virtual int compare(_In_ const translation &a, _In_ const translation &b) const
{ {
if (a.set < b.set) return -1; if (a.set < b.set) return -1;
else if (a.set > b.set) return +1; if (a.set > b.set) return +1;
int r = ZRCola::CompareString(a.dst(), a.dst_len(), b.dst(), b.dst_len()); int r = ZRCola::CompareString(a.dst(), a.dst_len(), b.dst(), b.dst_len());
if (r != 0) return r; if (r != 0) return r;
@@ -262,18 +265,18 @@ namespace ZRCola {
} idxDst; ///< Inverse translation index } idxDst; ///< Inverse translation index
std::vector<unsigned __int16> data; ///< Transformation data std::vector<uint16_t> data; ///< Transformation data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline translation_db() : idxSrc(data), idxDst(data) {} translation_db() : idxSrc(data), idxDst(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxSrc.clear(); idxSrc.clear();
idxDst.clear(); idxDst.clear();
@@ -289,7 +292,7 @@ namespace ZRCola {
/// \param[out] output Output string (UTF-16) /// \param[out] output Output string (UTF-16)
/// \param[out] map The vector of source to destination index mappings (optional) /// \param[out] map The vector of source to destination index mappings (optional)
/// ///
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; void Translate(_In_ transetid_t set, _In_z_count_(inputMax) const char_t* input, _In_ size_t inputMax, _Out_ string_t &output, _Out_opt_ std::vector<mapping>* map = NULL) const;
/// ///
/// Inverse translates string /// Inverse translates string
@@ -300,9 +303,9 @@ namespace ZRCola {
/// \param[out] output Output string (UTF-16) /// \param[out] output Output string (UTF-16)
/// \param[out] map The vector of source to destination index mappings (optional) /// \param[out] map The vector of source to destination index mappings (optional)
/// ///
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 void TranslateInv(_In_ transetid_t set, _In_z_count_(inputMax) const char_t* input, _In_ size_t inputMax, _Out_ string_t &output, _Out_opt_ std::vector<mapping>* map = NULL) const
{ {
TranslateInv(set, input, inputMax, NULL, langid_t::blank, output, map); TranslateInv(set, input, inputMax, NULL, langid_t(), output, map);
} }
/// ///
@@ -316,13 +319,84 @@ namespace ZRCola {
/// \param[out] output Output string (UTF-16) /// \param[out] output Output string (UTF-16)
/// \param[out] map The vector of source to destination index mappings (optional) /// \param[out] map The vector of source to destination index mappings (optional)
/// ///
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; void TranslateInv(_In_ transetid_t set, _In_z_count_(inputMax) const char_t* input, _In_ size_t inputMax, _In_opt_ const langchar_db *lc_db, _In_opt_ langid_t lang, _Out_ string_t &output, _Out_opt_ std::vector<mapping>* map = NULL) const;
///
/// Writes translation database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Translation database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::translation_db& db)
{
// Write translation index.
if (stream.fail()) return stream;
stream << db.idxSrc;
// Write inverse translation index.
if (stream.fail()) return stream;
stream << db.idxDst;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads translation database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Translation database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::translation_db& db)
{
// Read translation index.
stream >> db.idxSrc;
if (!stream.good()) return stream;
// Read inverse translation index.
stream >> db.idxDst;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<translation_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> translation_rec;
/// ///
/// Translation set database /// Translation set database
/// ///
@@ -335,16 +409,16 @@ namespace ZRCola {
/// ///
struct transet { struct transet {
public: public:
transetid_t set; ///< Translation set ID transetid_t set; ///< Translation set ID
protected: protected:
unsigned __int16 src_to; ///< Source name end in \c data uint16_t src_to; ///< Source name end in \c data
unsigned __int16 dst_to; ///< Sestination name end in \c data uint16_t dst_to; ///< Destination name end in \c data
wchar_t data[]; ///< Source and destination names char_t data[]; ///< Source and destination names
private: private:
inline transet(_In_ const transet &other); transet(_In_ const transet &other);
inline transet& operator=(_In_ const transet &other); transet& operator=(_In_ const transet &other);
public: public:
/// ///
@@ -356,38 +430,38 @@ namespace ZRCola {
/// \param[in] dst Translation set destination /// \param[in] dst Translation set destination
/// \param[in] dst_len Number of UTF-16 characters in \p dst /// \param[in] dst_len Number of UTF-16 characters in \p dst
/// ///
inline transet( transet(
_In_opt_ transetid_t set = 0, _In_opt_ transetid_t set = 0,
_In_opt_z_count_(src_len) const wchar_t *src = NULL, _In_opt_z_count_(src_len) const char_t *src = NULL,
_In_opt_ size_t src_len = 0, _In_opt_ size_t src_len = 0,
_In_opt_z_count_(dst_len) const wchar_t *dst = NULL, _In_opt_z_count_(dst_len) const char_t *dst = NULL,
_In_opt_ size_t dst_len = 0) _In_opt_ size_t dst_len = 0)
{ {
this->set = set; this->set = set;
this->src_to = static_cast<unsigned __int16>(src_len); this->src_to = static_cast<uint16_t>(src_len);
if (src && src_len) memcpy(this->data, src, sizeof(wchar_t)*src_len); if (src && src_len) memcpy(this->data, src, sizeof(char_t)*src_len);
this->dst_to = static_cast<unsigned __int16>(this->src_to + dst_len); this->dst_to = static_cast<uint16_t>(this->src_to + dst_len);
if (dst && dst_len) memcpy(this->data + this->src_to, dst, sizeof(wchar_t)*dst_len); if (dst && dst_len) memcpy(this->data + this->src_to, dst, sizeof(char_t)*dst_len);
} }
inline const wchar_t* src () const { return data; }; const char_t* src () const { return data; };
inline wchar_t* src () { return data; }; char_t* src () { return data; };
inline const wchar_t* src_end() const { return data + src_to; }; const char_t* src_end() const { return data + src_to; };
inline wchar_t* src_end() { return data + src_to; }; char_t* src_end() { return data + src_to; };
inline unsigned __int16 src_len() const { return src_to; }; uint16_t src_len() const { return src_to; };
inline const wchar_t* dst () const { return data + src_to; }; const char_t* dst () const { return data + src_to; };
inline wchar_t* dst () { return data + src_to; }; char_t* dst () { return data + src_to; };
inline const wchar_t* dst_end() const { return data + dst_to; }; const char_t* dst_end() const { return data + dst_to; };
inline wchar_t* dst_end() { return data + dst_to; }; char_t* dst_end() { return data + dst_to; };
inline unsigned __int16 dst_len() const { return dst_to - src_to; }; uint16_t dst_len() const { return dst_to - src_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Translation set index /// Translation set index
/// ///
class indexTranSet : public index<unsigned __int16, unsigned __int32, transet> class indexTranSet : public index<uint16_t, uint32_t, transet>
{ {
public: public:
/// ///
@@ -395,7 +469,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexTranSet(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, transet>(h) {} indexTranSet(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, transet>(h) {}
/// ///
/// Compares two translation sets by ID (for searching) /// Compares two translation sets by ID (for searching)
@@ -410,35 +484,98 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const transet &a, _In_ const transet &b) const virtual int compare(_In_ const transet &a, _In_ const transet &b) const
{ {
if (a.set < b.set) return -1; if (a.set < b.set) return -1;
else if (a.set > b.set) return 1; if (a.set > b.set) return 1;
return 0; return 0;
} }
} idxTranSet; ///< Translation set index } idxTranSet; ///< Translation set index
std::vector<unsigned __int16> data; ///< Translation set data std::vector<uint16_t> data; ///< Translation set data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline transet_db() : idxTranSet(data) {} transet_db() : idxTranSet(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxTranSet.clear(); idxTranSet.clear();
data .clear(); data .clear();
} }
///
/// Writes translation set database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Translation set database
///
/// \returns The stream \p stream
///
friend 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(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
///
friend 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.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<transet_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transet_rec;
/// ///
/// Translation sequence database /// Translation sequence database
/// ///
@@ -451,17 +588,17 @@ namespace ZRCola {
/// ///
struct transeq { struct transeq {
public: public:
transeqid_t seq; ///< Translation sequence ID transeqid_t seq; ///< Translation sequence ID
unsigned __int16 rank; ///< Translation sequence rank uint16_t rank; ///< Translation sequence rank
protected: protected:
unsigned __int16 name_to; ///< Translation sequence name end in \c data uint16_t name_to; ///< Translation sequence name end in \c data
unsigned __int16 sets_to; ///< Translation sequence sets end in \c data uint16_t sets_to; ///< Translation sequence sets end in \c data
wchar_t data[]; ///< Translation sequence name and sets char_t data[]; ///< Translation sequence name and sets
private: private:
inline transeq(_In_ const transeq &other); transeq(_In_ const transeq &other);
inline transeq& operator=(_In_ const transeq &other); transeq& operator=(_In_ const transeq &other);
public: public:
/// ///
@@ -471,43 +608,43 @@ namespace ZRCola {
/// \param[in] rank Translation sequence rank /// \param[in] rank Translation sequence rank
/// \param[in] name Translation sequence source /// \param[in] name Translation sequence source
/// \param[in] name_len Number of UTF-16 characters in \p src /// \param[in] name_len Number of UTF-16 characters in \p src
/// \param[in] sets Translation sequence destination /// \param[in] sets Translation sequence destination
/// \param[in] sets_len Number of UTF-16 characters in \p sets /// \param[in] sets_len Number of UTF-16 characters in \p sets
/// ///
inline transeq( transeq(
_In_opt_ transeqid_t seq = 0, _In_opt_ transeqid_t seq = 0,
_In_opt_ unsigned __int16 rank = 0, _In_opt_ uint16_t rank = 0,
_In_opt_z_count_(name_len) const wchar_t *name = NULL, _In_opt_z_count_(name_len) const char_t *name = NULL,
_In_opt_ size_t name_len = 0, _In_opt_ size_t name_len = 0,
_In_opt_count_ (sets_len) const transetid_t *sets = NULL, _In_opt_count_ (sets_len) const transetid_t *sets = NULL,
_In_opt_ size_t sets_len = 0) _In_opt_ size_t sets_len = 0)
{ {
this->seq = seq; this->seq = seq;
this->rank = rank; this->rank = rank;
this->name_to = static_cast<unsigned __int16>(name_len); this->name_to = static_cast<uint16_t>(name_len);
if (name && name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len); if (name && name_len) memcpy(this->data, name, sizeof(char_t)*name_len);
this->sets_to = static_cast<unsigned __int16>(this->name_to + sets_len); this->sets_to = static_cast<uint16_t>(this->name_to + sets_len);
if (sets && sets_len) memcpy(this->data + this->name_to, sets, sizeof(transetid_t)*sets_len); if (sets && sets_len) memcpy(this->data + this->name_to, sets, sizeof(transetid_t)*sets_len);
} }
inline const wchar_t* name () const { return data; }; const char_t* name () const { return data; };
inline wchar_t* name () { return data; }; char_t* name () { return data; };
inline const wchar_t* name_end() const { return data + name_to; }; const char_t* name_end() const { return data + name_to; };
inline wchar_t* name_end() { return data + name_to; }; char_t* name_end() { return data + name_to; };
inline unsigned __int16 name_len() const { return name_to; }; uint16_t name_len() const { return name_to; };
inline const transetid_t* sets () const { return reinterpret_cast<const transetid_t*>(data + name_to); }; 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); }; 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); }; 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); }; transetid_t* sets_end() { return reinterpret_cast< transetid_t*>(data + sets_to); };
inline unsigned __int16 sets_len() const { return sets_to - name_to; }; uint16_t sets_len() const { return sets_to - name_to; };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Translation sequence index /// Translation sequence index
/// ///
class indexTranSeq : public index<unsigned __int16, unsigned __int32, transeq> class indexTranSeq : public index<uint16_t, uint32_t, transeq>
{ {
public: public:
/// ///
@@ -515,7 +652,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexTranSeq(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, transeq>(h) {} indexTranSeq(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, transeq>(h) {}
/// ///
/// Compares two translation sequences by ID (for searching) /// Compares two translation sequences by ID (for searching)
@@ -530,8 +667,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const transeq &a, _In_ const transeq &b) const virtual int compare(_In_ const transeq &a, _In_ const transeq &b) const
{ {
if (a.seq < b.seq) return -1; if (a.seq < b.seq) return -1;
else if (a.seq > b.seq) return 1; if (a.seq > b.seq) return 1;
return 0; return 0;
} }
@@ -540,7 +677,7 @@ namespace ZRCola {
/// ///
/// Rank index /// Rank index
/// ///
class indexRank : public index<unsigned __int16, unsigned __int32, transeq> class indexRank : public index<uint16_t, uint32_t, transeq>
{ {
public: public:
/// ///
@@ -548,7 +685,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexRank(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, transeq>(h) {} indexRank(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, transeq>(h) {}
/// ///
/// Compares two translation sets by rank (for searching) /// Compares two translation sets by rank (for searching)
@@ -563,8 +700,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const transeq &a, _In_ const transeq &b) const virtual int compare(_In_ const transeq &a, _In_ const transeq &b) const
{ {
if (a.rank < b.rank) return -1; if (a.rank < b.rank) return -1;
else if (a.rank > b.rank) return +1; if (a.rank > b.rank) return +1;
return 0; return 0;
} }
@@ -585,255 +722,103 @@ namespace ZRCola {
if (a.rank < b.rank) return -1; if (a.rank < b.rank) return -1;
else if (a.rank > b.rank) return +1; else if (a.rank > b.rank) return +1;
unsigned __int16 auto &coll = std::use_facet<std::collate<char_t>>(std::locale());
a_name_len = a.name_len(), return coll.compare(a.name(), a.name_end(), b.name(), b.name_end());
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 } idxRank; ///< Rank index
std::vector<unsigned __int16> data; ///< Translation sequence data std::vector<uint16_t> data; ///< Translation sequence data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline transeq_db() : idxTranSeq(data), idxRank(data) {} transeq_db() : idxTranSeq(data), idxRank(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxTranSeq.clear(); idxTranSeq.clear();
idxRank .clear(); idxRank .clear();
data .clear(); data .clear();
} }
///
/// Writes translation sequence database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Translation sequence database
///
/// \returns The stream \p stream
///
friend 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(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
///
friend 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.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<transeq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transeq_rec;
}; };
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";
///
/// Writes translation database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Translation database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::translation_db &db)
{
// Write translation index.
if (stream.fail()) return stream;
stream << db.idxSrc;
// Write inverse translation index.
if (stream.fail()) return stream;
stream << db.idxDst;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads translation database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Translation database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::translation_db &db)
{
// Read translation index.
stream >> db.idxSrc;
if (!stream.good()) return stream;
// 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)*static_cast<std::streamsize>(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)*static_cast<std::streamsize>(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)*static_cast<std::streamsize>(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)*static_cast<std::streamsize>(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.
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

1
lib/libZRCola/lib/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/libZRCola.a

3
lib/libZRCola/src/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/*.d
/*.gch
/*.o

View File

@@ -6,10 +6,29 @@
#include "pch.h" #include "pch.h"
const ZRCola::chrcatid_t ZRCola::chrcatid_t::blank = {}; #ifndef _WIN32
_Use_decl_annotations_
size_t ZRCola::wcslen(const char_t *str)
{
for (size_t i = 0; ; ++i)
if (!str[i])
return i;
}
_Use_decl_annotations_
size_t ZRCola::wcsnlen(const char_t *str, size_t count)
{
for (size_t i = 0; ; ++i)
if (i >= count || !str[i])
return i;
}
#endif
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 _Use_decl_annotations_
bool ZRCola::character_db::Search(const char_t *str, const std::set<chrblkid_t> &blks, std::map<string_t, charrank_t> &hits, std::map<string_t, charrank_t> &hits_sub, bool (__cdecl *fn_abort)(void *cookie), void *cookie) const
{ {
assert(str); assert(str);
@@ -27,14 +46,14 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
} }
// Get term. // Get term.
std::wstring term; string_t term;
if (*str == L'"') { if (*str == u'"') {
const wchar_t *str_end = ++str; const auto *str_end = ++str;
for (;;) { for (;;) {
if (*str_end == 0) { if (*str_end == 0) {
term.assign(str, str_end); term.assign(str, str_end);
break; break;
} else if (*str_end == L'"') { } else if (*str_end == u'"') {
term.assign(str, str_end); term.assign(str, str_end);
str_end++; str_end++;
break; break;
@@ -43,7 +62,7 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
} }
str = str_end; str = str_end;
} else { } else {
const wchar_t *str_end = str + 1; const auto *str_end = str + 1;
for (; *str_end && !iswspace(*str_end); str_end++); for (; *str_end && !iswspace(*str_end); str_end++);
term.assign(str, str_end); term.assign(str, str_end);
str = str_end; str = str_end;
@@ -57,7 +76,7 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
if (fn_abort && fn_abort(cookie)) return false; if (fn_abort && fn_abort(cookie)) return false;
const wchar_t *val; const char_t *val;
size_t val_len; size_t val_len;
if (idxDsc.find(term.c_str(), term.size(), &val, &val_len)) { if (idxDsc.find(term.c_str(), term.size(), &val, &val_len)) {
@@ -65,8 +84,8 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
for (size_t i = 0, j = 0; i < val_len; i += j + 1) { for (size_t i = 0, j = 0; i < val_len; i += j + 1) {
if (fn_abort && fn_abort(cookie)) return false; if (fn_abort && fn_abort(cookie)) return false;
j = wcsnlen(val + i, val_len - i); j = wcsnlen(val + i, val_len - i);
if (cats.find(GetCharCat(val + i, j)) != cats.end()) { if (blks.find(GetCharBlk(val + i, j)) != blks.end()) {
std::wstring c(val + i, j); string_t c(val + i, j);
auto idx = hits.find(c); auto idx = hits.find(c);
if (idx == hits.end()) { if (idx == hits.end()) {
// New character. // New character.
@@ -84,8 +103,8 @@ bool ZRCola::character_db::Search(_In_z_ const wchar_t *str, _In_ const std::set
for (size_t i = 0, j = 0; i < val_len; i += j + 1) { for (size_t i = 0, j = 0; i < val_len; i += j + 1) {
if (fn_abort && fn_abort(cookie)) return false; if (fn_abort && fn_abort(cookie)) return false;
j = wcsnlen(val + i, val_len - i); j = wcsnlen(val + i, val_len - i);
if (cats.find(GetCharCat(val + i, j)) != cats.end()) { if (blks.find(GetCharBlk(val + i, j)) != blks.end()) {
std::wstring c(val + i, j); string_t c(val + i, j);
auto idx = hits_sub.find(c); auto idx = hits_sub.find(c);
if (idx == hits_sub.end()) { if (idx == hits_sub.end()) {
// New character. // New character.

View File

@@ -6,4 +6,70 @@
#include "pch.h" #include "pch.h"
const ZRCola::langid_t ZRCola::langid_t::blank = {}; _Use_decl_annotations_
int ZRCola::CompareString(const char_t* str_a, size_t count_a, const char_t* str_b, size_t count_b)
{
return stdex::strncmp(str_a, count_a, str_b, count_b);
}
_Use_decl_annotations_
inline std::string ZRCola::GetUnicodeDumpA(const char_t* str, size_t count, const char* sep)
{
std::string out;
size_t sep_len = strlen(sep);
size_t dump_len_max = sep_len + 4 + 1;
char* dump;
std::unique_ptr<char[]> dump_obj(dump = new char[dump_len_max]);
if (count && str[0]) {
size_t i = 0;
static const char error[] = "????";
int n = snprintf(dump, dump_len_max, "%04X", str[i++]);
if (n >= 0)
out.insert(out.end(), dump, dump + n);
else
out.insert(out.end(), error, error + std::size(error) - 1);
while (i < count && str[i]) {
n = snprintf(dump, dump_len_max, "%s%04X", sep, str[i++]);
if (n >= 0)
out.insert(out.end(), dump, dump + n);
else {
out.insert(out.end(), sep, sep + sep_len);
out.insert(out.end(), error, error + std::size(error) - 1);
}
}
}
return out;
}
_Use_decl_annotations_
std::wstring ZRCola::GetUnicodeDumpW(const char_t* str, size_t count, const wchar_t* sep)
{
std::wstring out;
size_t sep_len = ::wcslen(sep);
size_t dump_len_max = sep_len + 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;
static const wchar_t error[] = L"????";
int n = swprintf(dump, dump_len_max, L"%04X", str[i++]);
if (n >= 0)
out.insert(out.end(), dump, dump + n);
else
out.insert(out.end(), error, error + std::size(error) - 1);
while (i < count && str[i]) {
n = swprintf(dump, dump_len_max, L"%s%04X", sep, str[i++]);
if (n >= 0)
out.insert(out.end(), dump, dump + n);
else {
out.insert(out.end(), sep, sep + sep_len);
out.insert(out.end(), error, error + std::size(error) - 1);
}
}
}
return out;
}

View File

@@ -6,7 +6,7 @@
#include "pch.h" #include "pch.h"
_Use_decl_annotations_ _Use_decl_annotations_
void ZRCola::highlight_db::Highlight(const wchar_t* input, size_t inputMax, std::function<void (hlghtsetid_t set, size_t start, size_t end)> callback) const void ZRCola::highlight_db::Highlight(const char_t* input, size_t inputMax, std::function<void (hlghtsetid_t set, size_t start, size_t end)> callback) const
{ {
size_t start = 0; size_t start = 0;
hlghtsetid_t set = ZRCOLA_HLGHTSETID_DEFAULT; hlghtsetid_t set = ZRCOLA_HLGHTSETID_DEFAULT;
@@ -15,7 +15,7 @@ void ZRCola::highlight_db::Highlight(const wchar_t* input, size_t inputMax, std:
// Find the longest matching highlight at i-th character. // Find the longest matching highlight at i-th character.
size_t l_match = (size_t)-1; size_t l_match = (size_t)-1;
for (size_t l = 0, r = idxChr.size(), ii = i, j = 0; ii < inputMax && l < r; ii++, j++) { for (size_t l = 0, r = idxChr.size(), ii = i, j = 0; ii < inputMax && l < r; ii++, j++) {
wchar_t c = input[ii]; auto c = input[ii];
while (l < r) { while (l < r) {
// Test the highlight in the middle of the search area. // Test the highlight in the middle of the search area.
size_t m = (l + r) / 2; size_t m = (l + r) / 2;
@@ -23,7 +23,7 @@ void ZRCola::highlight_db::Highlight(const wchar_t* input, size_t inputMax, std:
// Get the j-th character of the highlight. // Get the j-th character of the highlight.
// All highlights that get short on characters are lexically ordered before. // All highlights that get short on characters are lexically ordered before.
// Thus the j-th character is considered 0. // Thus the j-th character is considered 0.
wchar_t s = idxChr[m].chr_at(j); auto s = idxChr[m].chr_at(j);
// Do the bisection test. // Do the bisection test.
if (c < s) r = m; if (c < s) r = m;

View File

@@ -57,12 +57,12 @@ void ZRCola::LangConvert(_In_ LANGID lang_win, _Inout_ ZRCola::langid_t &lang)
#endif #endif
bool ZRCola::langchar_db::IsLocalCharacter(_In_ const wchar_t *chr, _In_ const wchar_t *chr_end, _In_ ZRCola::langid_t lang) const bool ZRCola::langchar_db::IsLocalCharacter(_In_ const char_t *chr, _In_ const char_t *chr_end, _In_ ZRCola::langid_t lang) const
{ {
size_t n = chr_end - chr; size_t n = chr_end - chr;
assert(n <= 0xffff); assert(n <= 0xffff);
std::unique_ptr<langchar> lc((langchar*)new char[sizeof(langchar) + sizeof(wchar_t)*n]); std::unique_ptr<langchar> lc((langchar*)new char[sizeof(langchar) + sizeof(char_t)*n]);
lc->langchar::langchar(lang, chr, n); new (lc.get()) langchar(lang, chr, n);
indexChr::size_type start; indexChr::size_type start;
return idxChr.find(*lc, start); return idxChr.find(*lc, start);
} }

View File

@@ -1,68 +0,0 @@
/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2015-2022 Amebis
*/
#include "pch.h"
size_t ZRCola::mapping_vector::to_src(_In_ size_t dst) const
{
if (empty()) {
// One-to-one mapping.
return dst;
}
for (size_type l = 0, r = size();;) {
if (l < r) {
size_type m = (l + r) / 2;
const mapping &el = (*this)[m];
if ( dst < el.dst) r = m;
else if (el.dst < dst) l = m + 1;
else {
// An exact match found.
return el.src;
}
} else if (l) {
// We found a map interval.
const mapping &el = (*this)[l - 1];
return el.src + (dst - el.dst);
} else {
// The destination character index is left of the first transformation.
const mapping &el = (*this)[0];
return std::min<size_t>(dst, el.src);
}
}
}
size_t ZRCola::mapping_vector::to_dst(_In_ size_t src) const
{
if (empty()) {
// One-to-one mapping.
return src;
}
for (size_type l = 0, r = size();;) {
if (l < r) {
size_type m = (l + r) / 2;
const mapping &el = (*this)[m];
if ( src < el.src) r = m;
else if (el.src < src) l = m + 1;
else {
// An exact match found.
return el.dst;
}
} else if (l) {
// We found a map interval.
const mapping &el = (*this)[l - 1];
return el.dst + (src - el.src);
} else {
// The source character index is left of the first transformation.
const mapping &el = (*this)[0];
return std::min<size_t>(src, el.dst);
}
}
}

View File

@@ -3,7 +3,8 @@
Copyright © 2015-2022 Amebis Copyright © 2015-2022 Amebis
*/ */
#pragma once #ifndef __PCH_H__
#define __PCH_H__
#include "../../../include/version.h" #include "../../../include/version.h"
@@ -13,7 +14,11 @@
#include "../include/zrcola/translate.h" #include "../include/zrcola/translate.h"
#include "../include/zrcola/tag.h" #include "../include/zrcola/tag.h"
#include <stdex/string.hpp>
#include <assert.h> #include <assert.h>
#include <algorithm> #include <algorithm>
#include <cwctype> #include <cwctype>
#endif

View File

@@ -6,7 +6,7 @@
#include "pch.h" #include "pch.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<std::wstring, 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, uint16_t> &tags, _In_ const character_db &ch_db, _In_ const std::set<chrblkid_t> &blks, _Inout_ std::map<string_t, 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) { for (auto tag = tags.cbegin(), tag_end = tags.cend(); tag != tag_end; ++tag) {
if (fn_abort && fn_abort(cookie)) return false; if (fn_abort && fn_abort(cookie)) return false;
@@ -17,9 +17,9 @@ bool ZRCola::chrtag_db::Search(_In_ const std::map<tagid_t, unsigned __int16> &t
for (size_t i = start; i < end; i++) { for (size_t i = start; i < end; i++) {
if (fn_abort && fn_abort(cookie)) return false; if (fn_abort && fn_abort(cookie)) return false;
const chrtag &ct = idxTag[i]; const chrtag &ct = idxTag[i];
unsigned __int16 len = ct.chr_len(); uint16_t len = ct.chr_len();
if (cats.find(ch_db.GetCharCat(ct.chr(), len)) != cats.end()) { if (blks.find(ch_db.GetCharBlk(ct.chr(), len)) != blks.end()) {
std::wstring chr(ct.chr(), len); string_t chr(ct.chr(), len);
auto idx = hits.find(chr); auto idx = hits.find(chr);
if (idx == hits.end()) { if (idx == hits.end()) {
// New character. // New character.
@@ -37,7 +37,7 @@ bool ZRCola::chrtag_db::Search(_In_ const std::map<tagid_t, unsigned __int16> &t
} }
bool ZRCola::tagname_db::Search(_In_z_ const wchar_t *str, _In_ LCID locale, _Inout_ std::map<tagid_t, unsigned __int16> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie), _In_opt_ void *cookie) const bool ZRCola::tagname_db::Search(_In_z_ const char_t *str, _In_ uint32_t locale, _Inout_ std::map<tagid_t, uint16_t> &hits, _In_opt_ bool (__cdecl *fn_abort)(void *cookie), _In_opt_ void *cookie) const
{ {
assert(str); assert(str);
@@ -55,14 +55,14 @@ bool ZRCola::tagname_db::Search(_In_z_ const wchar_t *str, _In_ LCID locale, _In
} }
// Get name. // Get name.
std::wstring name; string_t name;
if (*str == L'"') { if (*str == u'"') {
const wchar_t *str_end = ++str; const auto *str_end = ++str;
for (;;) { for (;;) {
if (*str_end == 0) { if (*str_end == 0) {
name.assign(str, str_end); name.assign(str, str_end);
break; break;
} else if (*str_end == L'"') { } else if (*str_end == u'"') {
name.assign(str, str_end); name.assign(str, str_end);
str_end++; str_end++;
break; break;
@@ -71,7 +71,7 @@ bool ZRCola::tagname_db::Search(_In_z_ const wchar_t *str, _In_ LCID locale, _In
} }
str = str_end; str = str_end;
} else { } else {
const wchar_t *str_end = str + 1; const auto *str_end = str + 1;
for (; *str_end && !iswspace(*str_end); str_end++); for (; *str_end && !iswspace(*str_end); str_end++);
name.assign(str, str_end); name.assign(str, str_end);
str = str_end; str = str_end;
@@ -81,8 +81,8 @@ bool ZRCola::tagname_db::Search(_In_z_ const wchar_t *str, _In_ LCID locale, _In
if (fn_abort && fn_abort(cookie)) return false; if (fn_abort && fn_abort(cookie)) return false;
// Find the name. // Find the name.
std::unique_ptr<tagname> tn(reinterpret_cast<tagname*>(new char[sizeof(tagname) + sizeof(wchar_t)*name.length()])); std::unique_ptr<tagname> tn(reinterpret_cast<tagname*>(new char[sizeof(tagname) + sizeof(char_t)*name.length()]));
tn->tagname::tagname(0, locale, name.data(), name.length()); new (tn.get()) tagname(0, locale, name.data(), name.length());
size_t start, end; size_t start, end;
if (idxName.find(*tn, start, end)) { if (idxName.find(*tn, start, end)) {
// The name was found. // The name was found.
@@ -92,7 +92,7 @@ bool ZRCola::tagname_db::Search(_In_z_ const wchar_t *str, _In_ LCID locale, _In
auto idx = hits.find(val.tag); auto idx = hits.find(val.tag);
if (idx == hits.end()) { if (idx == hits.end()) {
// New tag. // New tag.
hits.insert(std::make_pair(val.tag, (unsigned __int16)1)); hits.insert(std::make_pair(val.tag, (uint16_t)1));
} else { } else {
// Increase count for existing tag. // Increase count for existing tag.
idx->second++; idx->second++;

View File

@@ -6,7 +6,7 @@
#include "pch.h" #include "pch.h"
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 void ZRCola::translation_db::Translate(_In_ transetid_t set, _In_z_count_(inputMax) const char_t* input, _In_ size_t inputMax, _Out_ string_t &output, _Out_opt_ std::vector<mapping>* map) const
{ {
assert(input || inputMax == 0); assert(input || inputMax == 0);
@@ -28,7 +28,7 @@ void ZRCola::translation_db::Translate(_In_ transetid_t set, _In_z_count_(inputM
// Find the longest matching translation at i-th character. // Find the longest matching translation at i-th character.
size_t l_match = (size_t)-1; size_t l_match = (size_t)-1;
for (size_t l = l_set, r = r_set, 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]; auto c = input[ii];
while (l < r) { while (l < r) {
// Test the translation in the middle of the search area. // Test the translation in the middle of the search area.
size_t m = (l + r) / 2; size_t m = (l + r) / 2;
@@ -36,7 +36,7 @@ void ZRCola::translation_db::Translate(_In_ transetid_t set, _In_z_count_(inputM
// Get the j-th character of the translation. // Get the j-th character of the translation.
// All translations that get short on characters are lexically ordered before. // All translations that get short on characters are lexically ordered before.
// Thus the j-th character is considered 0. // Thus the j-th character is considered 0.
wchar_t s = idxSrc[m].src_at(j); auto s = idxSrc[m].src_at(j);
// Do the bisection test. // Do the bisection test.
if (c < s) r = m; if (c < s) r = m;
@@ -84,7 +84,7 @@ void ZRCola::translation_db::Translate(_In_ transetid_t set, _In_z_count_(inputM
} }
void ZRCola::translation_db::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) const void ZRCola::translation_db::TranslateInv(_In_ transetid_t set, _In_z_count_(inputMax) const char_t* input, _In_ size_t inputMax, _In_opt_ const langchar_db *lc_db, _In_opt_ langid_t lang, _Out_ string_t &output, _Out_opt_ std::vector<mapping>* map) const
{ {
assert(input || inputMax == 0); assert(input || inputMax == 0);
@@ -106,7 +106,7 @@ void ZRCola::translation_db::TranslateInv(_In_ transetid_t set, _In_z_count_(inp
// Find the longest matching inverse translation at i-th character. // Find the longest matching inverse translation at i-th character.
size_t l_match = (size_t)-1; size_t l_match = (size_t)-1;
for (size_t l = l_set, r = r_set, 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]; auto c = input[ii];
while (l < r) { while (l < r) {
// Test the inverse translation in the middle of the search area. // Test the inverse translation in the middle of the search area.
size_t m = (l + r) / 2; size_t m = (l + r) / 2;
@@ -114,7 +114,7 @@ void ZRCola::translation_db::TranslateInv(_In_ transetid_t set, _In_z_count_(inp
// Get the j-th character of the inverse translation. // Get the j-th character of the inverse translation.
// All inverse translations that get short on characters are lexically ordered before. // All inverse translations that get short on characters are lexically ordered before.
// Thus the j-th character is considered 0. // Thus the j-th character is considered 0.
wchar_t s = idxDst[m].dst_at(j); auto s = idxDst[m].dst_at(j);
// Do the bisection test. // Do the bisection test.
if (c < s) r = m; if (c < s) r = m;
@@ -147,7 +147,7 @@ void ZRCola::translation_db::TranslateInv(_In_ transetid_t set, _In_z_count_(inp
if (l_match < r_set) { if (l_match < r_set) {
// The saved inverse translation was an exact match. // The saved inverse translation was an exact match.
const translation &trans = idxDst[l_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))) { if (trans.src_len() && trans.src()[0] != u'#' && (!lc_db || !lc_db->IsLocalCharacter(trans.dst(), trans.dst_end(), lang))) {
// Append source sequence. // Append source sequence.
output.append(trans.src(), trans.src_end()); output.append(trans.src(), trans.src_end());
i += trans.dst_len(); i += trans.dst_len();

2
lib/libZRCola/test/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/*.d
/test

129
lib/libZRCola/test/test.cpp Normal file
View File

@@ -0,0 +1,129 @@
#include <zrcola/idrec.h>
#include <fstream>
#include <iostream>
#include <typeinfo>
using namespace std;
using namespace ZRCola;
translation_db t_db;
transet_db ts_db;
transeq_db tsq_db;
langchar_db lc_db;
language_db lang_db;
character_db chr_db;
chrblk_db cb_db;
chrtag_db ct_db;
tagname_db tn_db;
highlight_db h_db;
static void load_database()
{
fstream dat("../../../output/data/ZRCola.zrcdb", ios_base::in | ios_base::binary);
if (!dat.good())
throw runtime_error("ZRCola.zrcdb not found or cannot be opened.");
if (!stdex::idrec::find<recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN>(dat, ZRCOLA_DB_ID, sizeof(recordid_t)))
throw runtime_error("ZRCola.zrcdb is not a valid ZRCola database.");
recordsize_t size;
dat.read((char*)&size, sizeof(recordsize_t));
if (dat.good()) {
bool has_translation_data = false;
for (;;) {
recordid_t id;
if (!stdex::idrec::read_id(dat, id, size)) break;
if (id == translation_rec::id()) {
dat >> translation_rec(t_db);
if (dat.good()) {
has_translation_data = true;
} else {
cerr << "Error reading translation data from ZRCola.zrcdb.\n";
t_db.clear();
}
} else if (id == transet_rec::id()) {
dat >> transet_rec(ts_db);
if (!dat.good()) {
cerr << "Error reading translation set data from ZRCola.zrcdb.\n";
ts_db.clear();
}
} else if (id == transeq_rec::id()) {
dat >> transeq_rec(tsq_db);
if (!dat.good()) {
cerr << "Error reading translation sequence data from ZRCola.zrcdb.\n";
tsq_db.clear();
}
} else if (id == langchar_rec::id()) {
dat >> langchar_rec(lc_db);
if (!dat.good()) {
cerr << "Error reading language character data from ZRCola.zrcdb.\n";
lc_db.clear();
}
} else if (id == language_rec::id()) {
dat >> language_rec(lang_db);
if (!dat.good()) {
cerr << "Error reading language character data from ZRCola.zrcdb.\n";
lang_db.clear();
}
} else if (id == character_rec::id()) {
dat >> character_rec(chr_db);
if (!dat.good()) {
cerr << "Error reading character data from ZRCola.zrcdb.\n";
chr_db.clear();
}
} else if (id == chrblk_rec::id()) {
dat >> chrblk_rec(cb_db);
if (!dat.good()) {
cerr << "Error reading character block data from ZRCola.zrcdb.\n";
cb_db.clear();
}
} else if (id == chrtag_rec::id()) {
dat >> chrtag_rec(ct_db);
if (!dat.good()) {
cerr << "Error reading character tag data from ZRCola.zrcdb.\n";
ct_db.clear();
}
} else if (id == tagname_rec::id()) {
dat >> tagname_rec(tn_db);
if (!dat.good()) {
cerr << "Error reading tag name data from ZRCola.zrcdb.\n";
tn_db.clear();
}
} else if (id == highlight_rec::id()) {
dat >> highlight_rec(h_db);
if (!dat.good()) {
cerr << "Error reading highlight data from ZRCola.zrcdb.\n";
h_db.clear();
}
} else
stdex::idrec::ignore<recordsize_t, ZRCOLA_RECORD_ALIGN>(dat);
}
if (!has_translation_data)
throw runtime_error("ZRCola.zrcdb has no translation data.");
}
}
int main()
{
try {
load_database();
u16string output;
vector<mapping> map;
t_db.Translate(ZRCOLA_TRANSETID_DEFAULT, u"", -1, output, &map);
if (!output.empty()) throw runtime_error("Empty string translated to nonempty output.");
if (!map.empty()) throw runtime_error("Empty string translation produced non-empty map.");
t_db.Translate(ZRCOLA_TRANSETID_DEFAULT, u"To je test.", -1, output, &map);
if (output != u"T  ťᵉⓢṭ.") throw runtime_error("Unexpected translation.");
cout << "Passed\n";
return 0;
} catch (exception &ex) {
cerr << typeid(ex).name() << ": " << ex.what() << endl;
return 1;
}
}

View File

@@ -7,10 +7,11 @@
#include <zrcola/common.h> #include <zrcola/common.h>
#include <stdex/idrec> #include <stdex/idrec.hpp>
#include <assert.h> #include <assert.h>
#include <algorithm> #include <algorithm>
#include <istream> #include <istream>
#include <locale>
#include <ostream> #include <ostream>
#include <vector> #include <vector>
@@ -24,7 +25,7 @@ namespace ZRCola {
/// ///
/// Character group ID /// Character group ID
/// ///
typedef unsigned __int16 chrgrpid_t; typedef uint16_t chrgrpid_t;
/// ///
@@ -39,13 +40,13 @@ namespace ZRCola {
/// ///
struct chrgrp { struct chrgrp {
public: public:
chrgrpid_t grp; ///< Character group ID chrgrpid_t grp; ///< Character group ID
unsigned __int16 rank; ///< Character group rank uint16_t rank; ///< Character group rank
protected: protected:
unsigned __int16 name_to; ///< Character group name end in \c data uint16_t name_to; ///< Character group name end in \c data
unsigned __int16 chrlst_to; ///< Character list end in \c data uint16_t chrlst_to; ///< Character list end in \c data
wchar_t data[]; ///< Character group name, character list, bit vector if particular character is displayed initially char_t data[]; ///< Character group name, character list, bit vector if particular character is displayed initially
public: public:
/// ///
@@ -60,49 +61,49 @@ namespace ZRCola {
/// \param[in] chrshow Binary vector which particular character is displayed initially /// \param[in] chrshow Binary vector which particular character is displayed initially
/// ///
inline chrgrp( inline chrgrp(
_In_opt_ chrgrpid_t grp = 0, _In_opt_ chrgrpid_t grp = 0,
_In_opt_ unsigned __int16 rank = 0, _In_opt_ uint16_t rank = 0,
_In_opt_z_count_(name_len) const wchar_t *name = NULL, _In_opt_z_count_(name_len) const char_t *name = NULL,
_In_opt_ size_t name_len = 0, _In_opt_ size_t name_len = 0,
_In_opt_z_count_(chrlst_len) const wchar_t *chrlst = NULL, _In_opt_z_count_(chrlst_len) const char_t *chrlst = NULL,
_In_opt_ size_t chrlst_len = 0, _In_opt_ size_t chrlst_len = 0,
_In_opt_count_x_((chrlst_len + 15)/16) const unsigned __int16 *chrshow = NULL) _In_opt_count_x_((chrlst_len + 15)/16) const uint16_t *chrshow = NULL)
{ {
this->grp = grp; this->grp = grp;
this->rank = rank; this->rank = rank;
this->name_to = static_cast<unsigned __int16>(name_len); this->name_to = static_cast<uint16_t>(name_len);
if (name && name_len) memcpy(this->data, name, sizeof(wchar_t)*name_len); if (name && name_len) memcpy(this->data, name, sizeof(char_t)*name_len);
this->chrlst_to = static_cast<unsigned __int16>(this->name_to + chrlst_len); this->chrlst_to = static_cast<uint16_t>(this->name_to + chrlst_len);
if (chrlst && chrshow && chrlst_len) { if (chrlst && chrshow && chrlst_len) {
memcpy(this->data + this->name_to, chrlst, sizeof(wchar_t)*chrlst_len); memcpy(this->data + this->name_to, chrlst, sizeof(char_t)*chrlst_len);
memcpy(this->data + this->chrlst_to, chrshow, (chrlst_len + sizeof(*data)*8 - 1)/8); memcpy(this->data + this->chrlst_to, chrshow, (chrlst_len + sizeof(*data)*8 - 1)/8);
} }
} }
inline const wchar_t* name () const { return data; }; inline const char_t* name () const { return data; };
inline wchar_t* name () { return data; }; inline char_t* name () { return data; };
inline const wchar_t* name_end() const { return data + name_to; }; inline const char_t* name_end() const { return data + name_to; };
inline wchar_t* name_end() { return data + name_to; }; inline char_t* name_end() { return data + name_to; };
inline unsigned __int16 name_len() const { return name_to; }; inline uint16_t name_len() const { return name_to; };
inline const wchar_t* chrlst () const { return data + name_to; }; inline const char_t* chrlst () const { return data + name_to; };
inline wchar_t* chrlst () { return data + name_to; }; inline char_t* chrlst () { return data + name_to; };
inline const wchar_t* chrlst_end() const { return data + chrlst_to; }; inline const char_t* chrlst_end() const { return data + chrlst_to; };
inline wchar_t* chrlst_end() { return data + chrlst_to; }; inline char_t* chrlst_end() { return data + chrlst_to; };
inline unsigned __int16 chrlst_len() const { return chrlst_to - name_to; }; inline uint16_t chrlst_len() const { return chrlst_to - name_to; };
inline const unsigned __int16* chrshow () const { return reinterpret_cast<const unsigned __int16*>(data + chrlst_to ); }; inline const uint16_t* chrshow () const { return reinterpret_cast<const uint16_t*>(data + chrlst_to ); };
inline unsigned __int16* chrshow () { return reinterpret_cast< unsigned __int16*>(data + chrlst_to ); }; inline uint16_t* chrshow () { return reinterpret_cast< uint16_t*>(data + chrlst_to ); };
inline const unsigned __int16* chrshow_end() const { return reinterpret_cast<const unsigned __int16*>(data + chrlst_to + chrshow_len()); }; inline const uint16_t* chrshow_end() const { return reinterpret_cast<const uint16_t*>(data + chrlst_to + chrshow_len()); };
inline unsigned __int16* chrshow_end() { return reinterpret_cast< unsigned __int16*>(data + chrlst_to + chrshow_len()); }; inline uint16_t* chrshow_end() { return reinterpret_cast< uint16_t*>(data + chrlst_to + chrshow_len()); };
inline unsigned __int16 chrshow_len() const { return (chrlst_len() + sizeof(*data)*8 - 1)/(sizeof(*data)*8); }; inline uint16_t chrshow_len() const { return (chrlst_len() + sizeof(*data)*8 - 1)/(sizeof(*data)*8); };
}; };
#pragma pack(pop) #pragma pack(pop)
/// ///
/// Rank index /// Rank index
/// ///
class indexRank : public index<unsigned __int16, unsigned __int32, chrgrp> class indexRank : public index<uint16_t, uint32_t, chrgrp>
{ {
public: public:
/// ///
@@ -110,7 +111,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexRank(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, chrgrp>(h) {} indexRank(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, chrgrp>(h) {}
/// ///
/// Compares two character groups by rank (for searching) /// Compares two character groups by rank (for searching)
@@ -125,8 +126,8 @@ namespace ZRCola {
/// ///
virtual int compare(_In_ const chrgrp &a, _In_ const chrgrp &b) const virtual int compare(_In_ const chrgrp &a, _In_ const chrgrp &b) const
{ {
if (a.rank < b.rank) return -1; if (a.rank < b.rank) return -1;
else if (a.rank > b.rank) return +1; if (a.rank > b.rank) return +1;
return 0; return 0;
} }
@@ -147,97 +148,88 @@ namespace ZRCola {
if (a.rank < b.rank) return -1; if (a.rank < b.rank) return -1;
else if (a.rank > b.rank) return +1; else if (a.rank > b.rank) return +1;
unsigned __int16 auto &coll = std::use_facet<std::collate<char_t>>(std::locale());
a_name_len = a.name_len(), return coll.compare(a.name(), a.name_end(), b.name(), b.name_end());
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 } idxRank; ///< Rank index
std::vector<unsigned __int16> data; ///< Character groups data std::vector<uint16_t> data; ///< Character groups data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline chrgrp_db() : idxRank(data) {} inline chrgrp_db() : idxRank(data) {}
///
/// Writes character group database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character group database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const chrgrp_db& db)
{
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character group database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character group database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ chrgrp_db& db)
{
// Read rank index.
stream >> db.idxRank;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<chrgrp_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrgrp_rec; typedef stdex::idrec::record<chrgrp_db, recordid_t, 0x524743 /*"CGR"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> chrgrp_rec;
}; };
const ZRCola::recordid_t ZRCola::chrgrp_rec::id = *(ZRCola::recordid_t*)"CGR";
///
/// Writes character group database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Character group database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::chrgrp_db &db)
{
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads character group database from a stream
///
/// \param[in ] stream Input stream
/// \param[out] db Character group database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::chrgrp_db &db)
{
// Read rank index.
stream >> db.idxRank;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -7,7 +7,7 @@
#include <zrcola/common.h> #include <zrcola/common.h>
#include <stdex/idrec> #include <stdex/idrec.hpp>
#include <wxex/common.h> #include <wxex/common.h>
#pragma warning(push) #pragma warning(push)
@@ -39,20 +39,20 @@ namespace ZRCola {
struct keyseq { struct keyseq {
public: public:
enum modifiers_t { enum modifiers_t {
SHIFT = 1<<0, ///< SHIFT key was pressed SHIFT = 1<<0, ///< SHIFT key was pressed
CTRL = 1<<1, ///< CTRL key was pressed CTRL = 1<<1, ///< CTRL key was pressed
ALT = 1<<2, ///< ALT key was pressed ALT = 1<<2, ///< ALT key was pressed
}; };
struct key_t { struct key_t {
wchar_t key; ///< Key char_t key; ///< Key
unsigned __int16 modifiers; ///< Modifiers (bitwise combination of SHIFT, CTRL and ALT) uint16_t modifiers; ///< Modifiers (bitwise combination of SHIFT, CTRL and ALT)
}; };
protected: protected:
unsigned __int16 chr_to; ///< Character end in \c data uint16_t chr_to; ///< Character end in \c data
unsigned __int16 seq_to; ///< Key sequence end in \c data uint16_t seq_to; ///< Key sequence end in \c data
wchar_t data[]; ///< Character and key sequence char_t data[]; ///< Character and key sequence
public: public:
/// ///
@@ -63,29 +63,29 @@ namespace ZRCola {
/// \param[in] chr Character /// \param[in] chr Character
/// \param[in] chr_len Number of UTF-16 characters in \p chr /// \param[in] chr_len Number of UTF-16 characters in \p chr
/// ///
inline keyseq( keyseq(
_In_opt_count_(seq_count) const key_t *seq = NULL, _In_opt_count_(seq_count) const key_t *seq = NULL,
_In_opt_ size_t seq_count = 0, _In_opt_ size_t seq_count = 0,
_In_opt_z_count_(chr_len) const wchar_t *chr = NULL, _In_opt_z_count_(chr_len) const char_t *chr = NULL,
_In_opt_ size_t chr_len = 0) _In_opt_ size_t chr_len = 0)
{ {
this->chr_to = static_cast<unsigned __int16>(chr_len); this->chr_to = static_cast<uint16_t>(chr_len);
if (chr && chr_len) memcpy(this->data, chr, sizeof(wchar_t)*chr_len); if (chr && chr_len) memcpy(this->data, chr, sizeof(char_t)*chr_len);
this->seq_to = static_cast<unsigned __int16>(this->chr_to + seq_count * sizeof(key_t) / sizeof(*data)); this->seq_to = static_cast<uint16_t>(this->chr_to + seq_count * sizeof(key_t) / sizeof(*data));
if (seq && seq_count) memcpy(this->data + this->chr_to, seq, sizeof(key_t)*seq_count); if (seq && seq_count) memcpy(this->data + this->chr_to, seq, sizeof(key_t)*seq_count);
} }
inline const wchar_t* chr () const { return data; }; const char_t* chr () const { return data; };
inline wchar_t* chr () { return data; }; char_t* chr () { return data; };
inline const wchar_t* chr_end() const { return data + chr_to; }; const char_t* chr_end() const { return data + chr_to; };
inline wchar_t* chr_end() { return data + chr_to; }; char_t* chr_end() { return data + chr_to; };
inline unsigned __int16 chr_len() const { return chr_to; }; uint16_t chr_len() const { return chr_to; };
inline const key_t* seq () const { return reinterpret_cast<const key_t*>(data + chr_to); }; 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); }; 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); }; 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); }; 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); }; uint16_t seq_len() const { return (seq_to - chr_to) * sizeof(*data) / sizeof(key_t); };
/// ///
/// Compares two key sequences /// Compares two key sequences
@@ -100,7 +100,7 @@ namespace ZRCola {
/// - =0 when seq_a == seq_b /// - =0 when seq_a == seq_b
/// - >0 when seq_a > seq_b /// - >0 when seq_a > seq_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) static 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 (size_t i = 0; ; i++) { for (size_t i = 0; ; i++) {
if (i >= len_a && i >= len_b) return 0; if (i >= len_a && i >= len_b) return 0;
@@ -118,7 +118,7 @@ namespace ZRCola {
/// ///
/// Character index /// Character index
/// ///
class indexChr : public index<unsigned __int16, unsigned __int32, keyseq> class indexChr : public index<uint16_t, uint32_t, keyseq>
{ {
public: public:
/// ///
@@ -126,7 +126,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexChr(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, keyseq>(h) {} indexChr(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, keyseq>(h) {}
/// ///
/// Compares two key sequences by character (for searching) /// Compares two key sequences by character (for searching)
@@ -174,7 +174,7 @@ namespace ZRCola {
/// ///
/// Key index /// Key index
/// ///
class indexKey : public index<unsigned __int16, unsigned __int32, keyseq> class indexKey : public index<uint16_t, uint32_t, keyseq>
{ {
public: public:
/// ///
@@ -182,7 +182,7 @@ namespace ZRCola {
/// ///
/// \param[in] h Reference to vector holding the data /// \param[in] h Reference to vector holding the data
/// ///
indexKey(_In_ std::vector<unsigned __int16> &h) : index<unsigned __int16, unsigned __int32, keyseq>(h) {} indexKey(_In_ std::vector<uint16_t> &h) : index<uint16_t, uint32_t, keyseq>(h) {}
/// ///
/// Compares two key sequences by key (for searching) /// Compares two key sequences by key (for searching)
@@ -226,18 +226,18 @@ namespace ZRCola {
} }
} idxKey; ///< Key index } idxKey; ///< Key index
std::vector<unsigned __int16> data; ///< Key sequences data std::vector<uint16_t> data; ///< Key sequences data
public: public:
/// ///
/// Constructs the database /// Constructs the database
/// ///
inline keyseq_db() : idxChr(data), idxKey(data) {} keyseq_db() : idxChr(data), idxKey(data) {}
/// ///
/// Clears the database /// Clears the database
/// ///
inline void clear() void clear()
{ {
idxChr.clear(); idxChr.clear();
idxKey.clear(); idxKey.clear();
@@ -265,91 +265,89 @@ namespace ZRCola {
/// ///
/// \returns Text representation of a \p seq key sequence /// \returns Text representation of a \p seq key sequence
/// ///
static inline wxString GetSequenceAsText(_In_count_(seq_len) const keyseq_db::keyseq::key_t *seq, _In_ size_t seq_len) static wxString GetSequenceAsText(_In_count_(seq_len) const keyseq_db::keyseq::key_t *seq, _In_ size_t seq_len)
{ {
wxString str; wxString str;
return GetSequenceAsText(seq, seq_len, str) ? str : wxEmptyString; return GetSequenceAsText(seq, seq_len, str) ? str : wxEmptyString;
} }
///
/// Writes key sequence database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Key sequence database
///
/// \returns The stream \p stream
///
friend std::ostream& operator <<(_In_ std::ostream& stream, _In_ const keyseq_db& db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
// Write key index.
if (stream.fail()) return stream;
stream << db.idxKey;
// 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;
uint32_t count = (uint32_t)data_count;
stream.write((const char*)&count, sizeof(count));
// Write data.
if (stream.fail()) return stream;
stream.write((const char*)db.data.data(), sizeof(uint16_t) * static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads key sequence database from a stream
///
/// \param[in] stream Input stream
/// \param[out] db Key sequence database
///
/// \returns The stream \p stream
///
friend std::istream& operator >>(_In_ std::istream& stream, _Out_ keyseq_db& db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read key index.
stream >> db.idxKey;
if (!stream.good()) return stream;
// Read data count.
uint32_t 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(uint16_t) * static_cast<std::streamsize>(count));
}
else
db.data.clear();
return stream;
}
}; };
typedef stdex::idrec::record<keyseq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> keyseq_rec; typedef stdex::idrec::record<keyseq_db, recordid_t, 0x59454b /*"KEY"*/, recordsize_t, ZRCOLA_RECORD_ALIGN> keyseq_rec;
}; };
const ZRCola::recordid_t ZRCola::keyseq_rec::id = *(ZRCola::recordid_t*)"KEY";
///
/// Writes key sequence database to a stream
///
/// \param[in] stream Output stream
/// \param[in] db Key sequence database
///
/// \returns The stream \p stream
///
inline std::ostream& operator <<(_In_ std::ostream& stream, _In_ const ZRCola::keyseq_db &db)
{
// Write character index.
if (stream.fail()) return stream;
stream << db.idxChr;
// Write key index.
if (stream.fail()) return stream;
stream << db.idxKey;
// 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)*static_cast<std::streamsize>(count));
return stream;
}
///
/// Reads key sequence database from a stream
///
/// \param[in] stream Input stream
/// \param[out] db Key sequence database
///
/// \returns The stream \p stream
///
inline std::istream& operator >>(_In_ std::istream& stream, _Out_ ZRCola::keyseq_db &db)
{
// Read character index.
stream >> db.idxChr;
if (!stream.good()) return stream;
// Read key index.
stream >> db.idxKey;
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)*static_cast<std::streamsize>(count));
} else
db.data.clear();
return stream;
}
#pragma warning(pop) #pragma warning(pop)

View File

@@ -1,167 +1,167 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2018 # Simon Rozman <simon.rozman@amebis.si>, 2018
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libZRColaUI\n" "Project-Id-Version: libZRColaUI\n"
"POT-Creation-Date: 2018-09-19 09:05+0200\n" "POT-Creation-Date: 2022-02-17 13:29+0100\n"
"PO-Revision-Date: 2018-09-19 07:21+0000\n" "PO-Revision-Date: 2018-09-19 07:21+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2018\n"
"Language-Team: German (Germany) (https://www.transifex.com/amebis/teams/91592/de_DE/)\n" "Language-Team: German (Germany) (https://app.transifex.com/amebis/teams/91592/de_DE/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n" "Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.1.1\n" "X-Generator: Poedit 2.4.2\n"
"X-Poedit-Basepath: ..\n" "X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n" "X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: src\n" "X-Poedit-SearchPath-0: src\n"
"X-Poedit-SearchPath-1: include\n" "X-Poedit-SearchPath-1: include\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: src/keyboard.cpp:30 src/keyboard.cpp:72 #: src/keyboard.cpp:16 src/keyboard.cpp:58
msgid "Ctrl" msgid "Ctrl"
msgstr "Strg" msgstr "Strg"
#: src/keyboard.cpp:31 src/keyboard.cpp:71 #: src/keyboard.cpp:17 src/keyboard.cpp:57
msgid "Alt" msgid "Alt"
msgstr "Alt" msgstr "Alt"
#: src/keyboard.cpp:32 src/keyboard.cpp:70 #: src/keyboard.cpp:18 src/keyboard.cpp:56
msgid "Shift" msgid "Shift"
msgstr "" msgstr ""
#: src/keyboard.cpp:45 #: src/keyboard.cpp:31
msgid "Esc" msgid "Esc"
msgstr "Esc" msgstr "Esc"
#: src/keyboard.cpp:47 #: src/keyboard.cpp:33
msgid "F1" msgid "F1"
msgstr "F1" msgstr "F1"
#: src/keyboard.cpp:48 #: src/keyboard.cpp:34
msgid "F2" msgid "F2"
msgstr "F2" msgstr "F2"
#: src/keyboard.cpp:49 #: src/keyboard.cpp:35
msgid "F3" msgid "F3"
msgstr "F3" msgstr "F3"
#: src/keyboard.cpp:50 #: src/keyboard.cpp:36
msgid "F4" msgid "F4"
msgstr "F4" msgstr "F4"
#: src/keyboard.cpp:51 #: src/keyboard.cpp:37
msgid "F5" msgid "F5"
msgstr "F5" msgstr "F5"
#: src/keyboard.cpp:52 #: src/keyboard.cpp:38
msgid "F6" msgid "F6"
msgstr "F6" msgstr "F6"
#: src/keyboard.cpp:53 #: src/keyboard.cpp:39
msgid "F7" msgid "F7"
msgstr "F7" msgstr "F7"
#: src/keyboard.cpp:54 #: src/keyboard.cpp:40
msgid "F8" msgid "F8"
msgstr "F8" msgstr "F8"
#: src/keyboard.cpp:55 #: src/keyboard.cpp:41
msgid "F9" msgid "F9"
msgstr "F9" msgstr "F9"
#: src/keyboard.cpp:56 #: src/keyboard.cpp:42
msgid "F10" msgid "F10"
msgstr "F10" msgstr "F10"
#: src/keyboard.cpp:57 #: src/keyboard.cpp:43
msgid "F11" msgid "F11"
msgstr "F11" msgstr "F11"
#: src/keyboard.cpp:58 #: src/keyboard.cpp:44
msgid "F12" msgid "F12"
msgstr "F12" msgstr "F12"
#: src/keyboard.cpp:60 #: src/keyboard.cpp:46
msgid "Print Screen" msgid "Print Screen"
msgstr "Druck" msgstr "Druck"
#: src/keyboard.cpp:61 #: src/keyboard.cpp:47
msgid "Scroll Lock" msgid "Scroll Lock"
msgstr "Rollen" msgstr "Rollen"
#: src/keyboard.cpp:62 #: src/keyboard.cpp:48
msgid "Pause" msgid "Pause"
msgstr "Pause" msgstr "Pause"
#: src/keyboard.cpp:64 #: src/keyboard.cpp:50
msgid "Backspace" msgid "Backspace"
msgstr "" msgstr ""
#: src/keyboard.cpp:65 #: src/keyboard.cpp:51
msgid "Tab" msgid "Tab"
msgstr "" msgstr ""
#: src/keyboard.cpp:66 #: src/keyboard.cpp:52
msgid "Caps Lock" msgid "Caps Lock"
msgstr "" msgstr ""
#: src/keyboard.cpp:67 #: src/keyboard.cpp:53
msgid "Return" msgid "Return"
msgstr "" msgstr ""
#: src/keyboard.cpp:68 #: src/keyboard.cpp:54
msgid "Space" msgid "Space"
msgstr "" msgstr ""
#: src/keyboard.cpp:73 #: src/keyboard.cpp:59
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
#: src/keyboard.cpp:75 #: src/keyboard.cpp:61
msgid "Insert" msgid "Insert"
msgstr "Einfg" msgstr "Einfg"
#: src/keyboard.cpp:76 #: src/keyboard.cpp:62
msgid "Delete" msgid "Delete"
msgstr "Entf" msgstr "Entf"
#: src/keyboard.cpp:77 #: src/keyboard.cpp:63
msgid "Page Up" msgid "Page Up"
msgstr "Bild↑" msgstr "Bild↑"
#: src/keyboard.cpp:78 #: src/keyboard.cpp:64
msgid "Page Down" msgid "Page Down"
msgstr "Bild↓" msgstr "Bild↓"
#: src/keyboard.cpp:79 #: src/keyboard.cpp:65
msgid "Home" msgid "Home"
msgstr "Pos1" msgstr "Pos1"
#: src/keyboard.cpp:80 #: src/keyboard.cpp:66
msgid "End" msgid "End"
msgstr "Ende" msgstr "Ende"
#: src/keyboard.cpp:82 #: src/keyboard.cpp:68
msgid "Left" msgid "Left"
msgstr "" msgstr ""
#: src/keyboard.cpp:83 #: src/keyboard.cpp:69
msgid "Up" msgid "Up"
msgstr "" msgstr ""
#: src/keyboard.cpp:84 #: src/keyboard.cpp:70
msgid "Right" msgid "Right"
msgstr "" msgstr ""
#: src/keyboard.cpp:85 #: src/keyboard.cpp:71
msgid "Down" msgid "Down"
msgstr "" msgstr ""
#: src/keyboard.cpp:87 #: src/keyboard.cpp:73
msgid "Num Lock" msgid "Num Lock"
msgstr "" msgstr ""

View File

@@ -1,167 +1,167 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2018 # Simon Rozman <simon.rozman@amebis.si>, 2018
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libZRColaUI\n" "Project-Id-Version: libZRColaUI\n"
"POT-Creation-Date: 2018-09-19 09:05+0200\n" "POT-Creation-Date: 2022-02-17 13:29+0100\n"
"PO-Revision-Date: 2018-09-19 07:21+0000\n" "PO-Revision-Date: 2018-09-19 07:21+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2018\n"
"Language-Team: Russian (Russia) (https://www.transifex.com/amebis/teams/91592/ru_RU/)\n" "Language-Team: Russian (Russia) (https://app.transifex.com/amebis/teams/91592/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: ru_RU\n" "Language: ru_RU\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
"X-Generator: Poedit 2.1.1\n" "X-Generator: Poedit 2.4.2\n"
"X-Poedit-Basepath: ..\n" "X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n" "X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: src\n" "X-Poedit-SearchPath-0: src\n"
"X-Poedit-SearchPath-1: include\n" "X-Poedit-SearchPath-1: include\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: src/keyboard.cpp:30 src/keyboard.cpp:72 #: src/keyboard.cpp:16 src/keyboard.cpp:58
msgid "Ctrl" msgid "Ctrl"
msgstr "Ctrl" msgstr "Ctrl"
#: src/keyboard.cpp:31 src/keyboard.cpp:71 #: src/keyboard.cpp:17 src/keyboard.cpp:57
msgid "Alt" msgid "Alt"
msgstr "Alt" msgstr "Alt"
#: src/keyboard.cpp:32 src/keyboard.cpp:70 #: src/keyboard.cpp:18 src/keyboard.cpp:56
msgid "Shift" msgid "Shift"
msgstr "Shift" msgstr "Shift"
#: src/keyboard.cpp:45 #: src/keyboard.cpp:31
msgid "Esc" msgid "Esc"
msgstr "Esc" msgstr "Esc"
#: src/keyboard.cpp:47 #: src/keyboard.cpp:33
msgid "F1" msgid "F1"
msgstr "F1" msgstr "F1"
#: src/keyboard.cpp:48 #: src/keyboard.cpp:34
msgid "F2" msgid "F2"
msgstr "F2" msgstr "F2"
#: src/keyboard.cpp:49 #: src/keyboard.cpp:35
msgid "F3" msgid "F3"
msgstr "F3" msgstr "F3"
#: src/keyboard.cpp:50 #: src/keyboard.cpp:36
msgid "F4" msgid "F4"
msgstr "F4" msgstr "F4"
#: src/keyboard.cpp:51 #: src/keyboard.cpp:37
msgid "F5" msgid "F5"
msgstr "F5" msgstr "F5"
#: src/keyboard.cpp:52 #: src/keyboard.cpp:38
msgid "F6" msgid "F6"
msgstr "F6" msgstr "F6"
#: src/keyboard.cpp:53 #: src/keyboard.cpp:39
msgid "F7" msgid "F7"
msgstr "F7" msgstr "F7"
#: src/keyboard.cpp:54 #: src/keyboard.cpp:40
msgid "F8" msgid "F8"
msgstr "F8" msgstr "F8"
#: src/keyboard.cpp:55 #: src/keyboard.cpp:41
msgid "F9" msgid "F9"
msgstr "F9" msgstr "F9"
#: src/keyboard.cpp:56 #: src/keyboard.cpp:42
msgid "F10" msgid "F10"
msgstr "F10" msgstr "F10"
#: src/keyboard.cpp:57 #: src/keyboard.cpp:43
msgid "F11" msgid "F11"
msgstr "F11" msgstr "F11"
#: src/keyboard.cpp:58 #: src/keyboard.cpp:44
msgid "F12" msgid "F12"
msgstr "F12" msgstr "F12"
#: src/keyboard.cpp:60 #: src/keyboard.cpp:46
msgid "Print Screen" msgid "Print Screen"
msgstr "Print Screen" msgstr "Print Screen"
#: src/keyboard.cpp:61 #: src/keyboard.cpp:47
msgid "Scroll Lock" msgid "Scroll Lock"
msgstr "Scroll Lock" msgstr "Scroll Lock"
#: src/keyboard.cpp:62 #: src/keyboard.cpp:48
msgid "Pause" msgid "Pause"
msgstr "Pause" msgstr "Pause"
#: src/keyboard.cpp:64 #: src/keyboard.cpp:50
msgid "Backspace" msgid "Backspace"
msgstr "Backspace" msgstr "Backspace"
#: src/keyboard.cpp:65 #: src/keyboard.cpp:51
msgid "Tab" msgid "Tab"
msgstr "Tab" msgstr "Tab"
#: src/keyboard.cpp:66 #: src/keyboard.cpp:52
msgid "Caps Lock" msgid "Caps Lock"
msgstr "Caps Lock" msgstr "Caps Lock"
#: src/keyboard.cpp:67 #: src/keyboard.cpp:53
msgid "Return" msgid "Return"
msgstr "Return" msgstr "Return"
#: src/keyboard.cpp:68 #: src/keyboard.cpp:54
msgid "Space" msgid "Space"
msgstr "Space" msgstr "Space"
#: src/keyboard.cpp:73 #: src/keyboard.cpp:59
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
#: src/keyboard.cpp:75 #: src/keyboard.cpp:61
msgid "Insert" msgid "Insert"
msgstr "Insert" msgstr "Insert"
#: src/keyboard.cpp:76 #: src/keyboard.cpp:62
msgid "Delete" msgid "Delete"
msgstr "Delete" msgstr "Delete"
#: src/keyboard.cpp:77 #: src/keyboard.cpp:63
msgid "Page Up" msgid "Page Up"
msgstr "Page Up" msgstr "Page Up"
#: src/keyboard.cpp:78 #: src/keyboard.cpp:64
msgid "Page Down" msgid "Page Down"
msgstr "Page Down" msgstr "Page Down"
#: src/keyboard.cpp:79 #: src/keyboard.cpp:65
msgid "Home" msgid "Home"
msgstr "Home" msgstr "Home"
#: src/keyboard.cpp:80 #: src/keyboard.cpp:66
msgid "End" msgid "End"
msgstr "End" msgstr "End"
#: src/keyboard.cpp:82 #: src/keyboard.cpp:68
msgid "Left" msgid "Left"
msgstr "Left" msgstr "Left"
#: src/keyboard.cpp:83 #: src/keyboard.cpp:69
msgid "Up" msgid "Up"
msgstr "Up" msgstr "Up"
#: src/keyboard.cpp:84 #: src/keyboard.cpp:70
msgid "Right" msgid "Right"
msgstr "Right" msgstr "Right"
#: src/keyboard.cpp:85 #: src/keyboard.cpp:71
msgid "Down" msgid "Down"
msgstr "Down" msgstr "Down"
#: src/keyboard.cpp:87 #: src/keyboard.cpp:73
msgid "Num Lock" msgid "Num Lock"
msgstr "Num Lock" msgstr "Num Lock"

View File

@@ -1,167 +1,167 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2018 # Simon Rozman <simon.rozman@amebis.si>, 2018
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libZRColaUI\n" "Project-Id-Version: libZRColaUI\n"
"POT-Creation-Date: 2018-09-19 09:05+0200\n" "POT-Creation-Date: 2022-02-17 13:29+0100\n"
"PO-Revision-Date: 2018-09-19 07:21+0000\n" "PO-Revision-Date: 2018-09-19 07:21+0000\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2018\n"
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91592/sl_SI/)\n" "Language-Team: Slovenian (Slovenia) (https://app.transifex.com/amebis/teams/91592/sl_SI/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: sl_SI\n" "Language: sl_SI\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-Generator: Poedit 2.1.1\n" "X-Generator: Poedit 2.4.2\n"
"X-Poedit-Basepath: ..\n" "X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: _\n" "X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: src\n" "X-Poedit-SearchPath-0: src\n"
"X-Poedit-SearchPath-1: include\n" "X-Poedit-SearchPath-1: include\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: src/keyboard.cpp:30 src/keyboard.cpp:72 #: src/keyboard.cpp:16 src/keyboard.cpp:58
msgid "Ctrl" msgid "Ctrl"
msgstr "Ctrl" msgstr "Ctrl"
#: src/keyboard.cpp:31 src/keyboard.cpp:71 #: src/keyboard.cpp:17 src/keyboard.cpp:57
msgid "Alt" msgid "Alt"
msgstr "Alt" msgstr "Alt"
#: src/keyboard.cpp:32 src/keyboard.cpp:70 #: src/keyboard.cpp:18 src/keyboard.cpp:56
msgid "Shift" msgid "Shift"
msgstr "Shift" msgstr "Shift"
#: src/keyboard.cpp:45 #: src/keyboard.cpp:31
msgid "Esc" msgid "Esc"
msgstr "Esc" msgstr "Esc"
#: src/keyboard.cpp:47 #: src/keyboard.cpp:33
msgid "F1" msgid "F1"
msgstr "F1" msgstr "F1"
#: src/keyboard.cpp:48 #: src/keyboard.cpp:34
msgid "F2" msgid "F2"
msgstr "F2" msgstr "F2"
#: src/keyboard.cpp:49 #: src/keyboard.cpp:35
msgid "F3" msgid "F3"
msgstr "F3" msgstr "F3"
#: src/keyboard.cpp:50 #: src/keyboard.cpp:36
msgid "F4" msgid "F4"
msgstr "F4" msgstr "F4"
#: src/keyboard.cpp:51 #: src/keyboard.cpp:37
msgid "F5" msgid "F5"
msgstr "F5" msgstr "F5"
#: src/keyboard.cpp:52 #: src/keyboard.cpp:38
msgid "F6" msgid "F6"
msgstr "F6" msgstr "F6"
#: src/keyboard.cpp:53 #: src/keyboard.cpp:39
msgid "F7" msgid "F7"
msgstr "F7" msgstr "F7"
#: src/keyboard.cpp:54 #: src/keyboard.cpp:40
msgid "F8" msgid "F8"
msgstr "F8" msgstr "F8"
#: src/keyboard.cpp:55 #: src/keyboard.cpp:41
msgid "F9" msgid "F9"
msgstr "F9" msgstr "F9"
#: src/keyboard.cpp:56 #: src/keyboard.cpp:42
msgid "F10" msgid "F10"
msgstr "F10" msgstr "F10"
#: src/keyboard.cpp:57 #: src/keyboard.cpp:43
msgid "F11" msgid "F11"
msgstr "F11" msgstr "F11"
#: src/keyboard.cpp:58 #: src/keyboard.cpp:44
msgid "F12" msgid "F12"
msgstr "F12" msgstr "F12"
#: src/keyboard.cpp:60 #: src/keyboard.cpp:46
msgid "Print Screen" msgid "Print Screen"
msgstr "Print Screen" msgstr "Print Screen"
#: src/keyboard.cpp:61 #: src/keyboard.cpp:47
msgid "Scroll Lock" msgid "Scroll Lock"
msgstr "Scroll Lock" msgstr "Scroll Lock"
#: src/keyboard.cpp:62 #: src/keyboard.cpp:48
msgid "Pause" msgid "Pause"
msgstr "Pause" msgstr "Pause"
#: src/keyboard.cpp:64 #: src/keyboard.cpp:50
msgid "Backspace" msgid "Backspace"
msgstr "Backspace" msgstr "Backspace"
#: src/keyboard.cpp:65 #: src/keyboard.cpp:51
msgid "Tab" msgid "Tab"
msgstr "Tab" msgstr "Tab"
#: src/keyboard.cpp:66 #: src/keyboard.cpp:52
msgid "Caps Lock" msgid "Caps Lock"
msgstr "Caps Lock" msgstr "Caps Lock"
#: src/keyboard.cpp:67 #: src/keyboard.cpp:53
msgid "Return" msgid "Return"
msgstr "Return" msgstr "Return"
#: src/keyboard.cpp:68 #: src/keyboard.cpp:54
msgid "Space" msgid "Space"
msgstr "preslednica" msgstr "preslednica"
#: src/keyboard.cpp:73 #: src/keyboard.cpp:59
msgid "Menu" msgid "Menu"
msgstr "Menu" msgstr "Menu"
#: src/keyboard.cpp:75 #: src/keyboard.cpp:61
msgid "Insert" msgid "Insert"
msgstr "Insert" msgstr "Insert"
#: src/keyboard.cpp:76 #: src/keyboard.cpp:62
msgid "Delete" msgid "Delete"
msgstr "Delete" msgstr "Delete"
#: src/keyboard.cpp:77 #: src/keyboard.cpp:63
msgid "Page Up" msgid "Page Up"
msgstr "Page Up" msgstr "Page Up"
#: src/keyboard.cpp:78 #: src/keyboard.cpp:64
msgid "Page Down" msgid "Page Down"
msgstr "Page Down" msgstr "Page Down"
#: src/keyboard.cpp:79 #: src/keyboard.cpp:65
msgid "Home" msgid "Home"
msgstr "Home" msgstr "Home"
#: src/keyboard.cpp:80 #: src/keyboard.cpp:66
msgid "End" msgid "End"
msgstr "End" msgstr "End"
#: src/keyboard.cpp:82 #: src/keyboard.cpp:68
msgid "Left" msgid "Left"
msgstr "Left" msgstr "Left"
#: src/keyboard.cpp:83 #: src/keyboard.cpp:69
msgid "Up" msgid "Up"
msgstr "Up" msgstr "Up"
#: src/keyboard.cpp:84 #: src/keyboard.cpp:70
msgid "Right" msgid "Right"
msgstr "Right" msgstr "Right"
#: src/keyboard.cpp:85 #: src/keyboard.cpp:71
msgid "Down" msgid "Down"
msgstr "Down" msgstr "Down"
#: src/keyboard.cpp:87 #: src/keyboard.cpp:73
msgid "Num Lock" msgid "Num Lock"
msgstr "Num Lock" msgstr "Num Lock"

1
lib/oatpp Submodule

Submodule lib/oatpp added at 06ce4516c4

1
lib/oatpp-swagger Submodule

Submodule lib/oatpp-swagger added at 8cb460b546

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -10,6 +10,9 @@ msgstr ""
msgid "Albanian" msgid "Albanian"
msgstr "" msgstr ""
msgid "Alphabetic Presentation Forms"
msgstr ""
msgid "Apostrophes 1" msgid "Apostrophes 1"
msgstr "" msgstr ""
@@ -19,24 +22,42 @@ msgstr ""
msgid "Arabic" msgid "Arabic"
msgstr "" msgstr ""
msgid "Armenian"
msgstr ""
msgid "Arrows" msgid "Arrows"
msgstr "" msgstr ""
msgid "Belarusian" msgid "Belarusian"
msgstr "" msgstr ""
msgid "Block Elements"
msgstr ""
msgid "Bosnian Cyrillic" msgid "Bosnian Cyrillic"
msgstr "" msgstr ""
msgid "Bosnian Latinic" msgid "Bosnian Latinic"
msgstr "" msgstr ""
msgid "Box Drawing"
msgstr ""
msgid "C0 Controls and Basic Latin (Basic Latin)"
msgstr ""
msgid "C1 Controls and Latin-1 Supplement (Latin-1 Supplement)"
msgstr ""
msgid "CAPITAL Case" msgid "CAPITAL Case"
msgstr "" msgstr ""
msgid "CAPITAL Case » small Case" msgid "CAPITAL Case » small Case"
msgstr "" msgstr ""
msgid "CJK Symbols and Punctuation"
msgstr ""
msgid "Combine" msgid "Combine"
msgstr "" msgstr ""
@@ -49,6 +70,18 @@ msgstr ""
msgid "Combine Over" msgid "Combine Over"
msgstr "" msgstr ""
msgid "Combining Diacritical Marks"
msgstr ""
msgid "Combining Diacritical Marks Supplement"
msgstr ""
msgid "Combining Diacritical Marks for Symbols"
msgstr ""
msgid "Combining Half Marks"
msgstr ""
msgid "Combining Marks" msgid "Combining Marks"
msgstr "" msgstr ""
@@ -58,6 +91,9 @@ msgstr ""
msgid "Currencies" msgid "Currencies"
msgstr "" msgstr ""
msgid "Currency Symbols"
msgstr ""
msgid "Cyrillic" msgid "Cyrillic"
msgstr "" msgstr ""
@@ -118,6 +154,12 @@ msgstr ""
msgid "Cyrillic BdC" msgid "Cyrillic BdC"
msgstr "" msgstr ""
msgid "Cyrillic Extended-B"
msgstr ""
msgid "Cyrillic Supplement"
msgstr ""
msgid "Cyrillic » Latin (GOST2000)" msgid "Cyrillic » Latin (GOST2000)"
msgstr "" msgstr ""
@@ -130,9 +172,15 @@ msgstr ""
msgid "Diacritics" msgid "Diacritics"
msgstr "" msgstr ""
msgid "Dingbats"
msgstr ""
msgid "Encircled Characters" msgid "Encircled Characters"
msgstr "" msgstr ""
msgid "Enclosed Alphanumerics"
msgstr ""
msgid "English" msgid "English"
msgstr "" msgstr ""
@@ -148,6 +196,12 @@ msgstr ""
msgid "Friulian" msgid "Friulian"
msgstr "" msgstr ""
msgid "General Punctuation"
msgstr ""
msgid "Geometric Shapes"
msgstr ""
msgid "Geometrical Shapes" msgid "Geometrical Shapes"
msgstr "" msgstr ""
@@ -169,12 +223,24 @@ msgstr ""
msgid "Greek (Old)" msgid "Greek (Old)"
msgstr "" msgstr ""
msgid "Greek Extended"
msgstr ""
msgid "Greek and Coptic"
msgstr ""
msgid "Gujarati"
msgstr ""
msgid "Hebrew" msgid "Hebrew"
msgstr "" msgstr ""
msgid "Hungarian" msgid "Hungarian"
msgstr "" msgstr ""
msgid "IPA Extensions"
msgstr ""
msgid "Irish Gaelic" msgid "Irish Gaelic"
msgstr "" msgstr ""
@@ -295,6 +361,21 @@ msgstr ""
msgid "Latin BdC" msgid "Latin BdC"
msgstr "" msgstr ""
msgid "Latin Extended Additional"
msgstr ""
msgid "Latin Extended-A"
msgstr ""
msgid "Latin Extended-B"
msgstr ""
msgid "Latin Extended-C"
msgstr ""
msgid "Latin Extended-D"
msgstr ""
msgid "Latin » Cyrillic (Belarusian)" msgid "Latin » Cyrillic (Belarusian)"
msgstr "" msgstr ""
@@ -418,19 +499,7 @@ msgstr ""
msgid "Letter u" msgid "Letter u"
msgstr "" msgstr ""
msgid "Letter, Lowercase" msgid "Letterlike Symbols"
msgstr ""
msgid "Letter, Modifier"
msgstr ""
msgid "Letter, Other"
msgstr ""
msgid "Letter, Titlecase"
msgstr ""
msgid "Letter, Uppercase"
msgstr "" msgstr ""
msgid "Ligatures" msgid "Ligatures"
@@ -445,21 +514,30 @@ msgstr ""
msgid "Maltese" msgid "Maltese"
msgstr "" msgstr ""
msgid "Mark, Enclosing"
msgstr ""
msgid "Mark, Non-Spacing"
msgstr ""
msgid "Mark, Spacing Combining"
msgstr ""
msgid "Mathematical And Physical Symbols" msgid "Mathematical And Physical Symbols"
msgstr "" msgstr ""
msgid "Mathematical Operators"
msgstr ""
msgid "Metric" msgid "Metric"
msgstr "" msgstr ""
msgid "Miscellaneous Mathematical Symbols-A"
msgstr ""
msgid "Miscellaneous Mathematical Symbols-B"
msgstr ""
msgid "Miscellaneous Symbols"
msgstr ""
msgid "Miscellaneous Symbols and Arrows"
msgstr ""
msgid "Miscellaneous Technical"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "" msgstr ""
@@ -505,13 +583,7 @@ msgstr ""
msgid "Number 9" msgid "Number 9"
msgstr "" msgstr ""
msgid "Number, Decimal Digit" msgid "Number Forms"
msgstr ""
msgid "Number, Letter"
msgstr ""
msgid "Number, Other"
msgstr "" msgstr ""
msgid "Numbers" msgid "Numbers"
@@ -523,45 +595,27 @@ msgstr ""
msgid "Other Modifiers" msgid "Other Modifiers"
msgstr "" msgstr ""
msgid "Other, Format"
msgstr ""
msgid "Other, Surrogate"
msgstr ""
msgid "Parentheses" msgid "Parentheses"
msgstr "" msgstr ""
msgid "Phonetic Extensions"
msgstr ""
msgid "Phonetic Extensions Supplement"
msgstr ""
msgid "Polish" msgid "Polish"
msgstr "" msgstr ""
msgid "Portuguese" msgid "Portuguese"
msgstr "" msgstr ""
msgid "Private Use Area"
msgstr ""
msgid "Punctuation" msgid "Punctuation"
msgstr "" msgstr ""
msgid "Punctuation, Close"
msgstr ""
msgid "Punctuation, Connector"
msgstr ""
msgid "Punctuation, Dash"
msgstr ""
msgid "Punctuation, Final quote"
msgstr ""
msgid "Punctuation, Initial quote"
msgstr ""
msgid "Punctuation, Open"
msgstr ""
msgid "Punctuation, Other"
msgstr ""
msgid "Quotes" msgid "Quotes"
msgstr "" msgstr ""
@@ -571,15 +625,6 @@ msgstr ""
msgid "Russian" msgid "Russian"
msgstr "" msgstr ""
msgid "Separator, Line"
msgstr ""
msgid "Separator, Paragraph"
msgstr ""
msgid "Separator, Space"
msgstr ""
msgid "Serbian Cyrillic" msgid "Serbian Cyrillic"
msgstr "" msgstr ""
@@ -607,19 +652,37 @@ msgstr ""
msgid "Spaces" msgid "Spaces"
msgstr "" msgstr ""
msgid "Spacing Modifier Letters"
msgstr ""
msgid "Spanish" msgid "Spanish"
msgstr "" msgstr ""
msgid "Special Characters" msgid "Special Characters"
msgstr "" msgstr ""
msgid "Specials"
msgstr ""
msgid "Strokes" msgid "Strokes"
msgstr "" msgstr ""
msgid "Subscript Characters" msgid "Subscript Characters"
msgstr "" msgstr ""
msgid "Superscript Sharacters" msgid "Superscript Characters"
msgstr ""
msgid "Superscripts and Subscripts"
msgstr ""
msgid "Supplemental Arrows-A"
msgstr ""
msgid "Supplemental Arrows-B"
msgstr ""
msgid "Supplemental Punctuation"
msgstr "" msgstr ""
msgid "Surrounded" msgid "Surrounded"
@@ -664,16 +727,7 @@ msgstr ""
msgid "Symbol ?" msgid "Symbol ?"
msgstr "" msgstr ""
msgid "Symbol, Currency" msgid "Syriac"
msgstr ""
msgid "Symbol, Math"
msgstr ""
msgid "Symbol, Modifier"
msgstr ""
msgid "Symbol, Other"
msgstr "" msgstr ""
msgid "Technical Characters" msgid "Technical Characters"
@@ -694,6 +748,9 @@ msgstr ""
msgid "Ukrainian" msgid "Ukrainian"
msgstr "" msgstr ""
msgid "Unified Canadian Aboriginal Syllabics"
msgstr ""
msgid "Units" msgid "Units"
msgstr "" msgstr ""

View File

@@ -2,7 +2,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola.zrcdb\n" "Project-Id-Version: ZRCola.zrcdb\n"
"Language-Team: German (Germany) (https://www.transifex.com/amebis/teams/91592/de_DE/)\n" "Language-Team: German (Germany) (https://app.transifex.com/amebis/teams/91592/de_DE/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -13,6 +13,9 @@ msgstr ""
msgid "Albanian" msgid "Albanian"
msgstr "" msgstr ""
msgid "Alphabetic Presentation Forms"
msgstr ""
msgid "Apostrophes 1" msgid "Apostrophes 1"
msgstr "" msgstr ""
@@ -22,24 +25,42 @@ msgstr ""
msgid "Arabic" msgid "Arabic"
msgstr "" msgstr ""
msgid "Armenian"
msgstr ""
msgid "Arrows" msgid "Arrows"
msgstr "" msgstr ""
msgid "Belarusian" msgid "Belarusian"
msgstr "" msgstr ""
msgid "Block Elements"
msgstr ""
msgid "Bosnian Cyrillic" msgid "Bosnian Cyrillic"
msgstr "" msgstr ""
msgid "Bosnian Latinic" msgid "Bosnian Latinic"
msgstr "" msgstr ""
msgid "Box Drawing"
msgstr ""
msgid "C0 Controls and Basic Latin (Basic Latin)"
msgstr ""
msgid "C1 Controls and Latin-1 Supplement (Latin-1 Supplement)"
msgstr ""
msgid "CAPITAL Case" msgid "CAPITAL Case"
msgstr "" msgstr ""
msgid "CAPITAL Case » small Case" msgid "CAPITAL Case » small Case"
msgstr "" msgstr ""
msgid "CJK Symbols and Punctuation"
msgstr ""
msgid "Combine" msgid "Combine"
msgstr "" msgstr ""
@@ -52,6 +73,18 @@ msgstr ""
msgid "Combine Over" msgid "Combine Over"
msgstr "" msgstr ""
msgid "Combining Diacritical Marks"
msgstr ""
msgid "Combining Diacritical Marks Supplement"
msgstr ""
msgid "Combining Diacritical Marks for Symbols"
msgstr ""
msgid "Combining Half Marks"
msgstr ""
msgid "Combining Marks" msgid "Combining Marks"
msgstr "" msgstr ""
@@ -61,6 +94,9 @@ msgstr ""
msgid "Currencies" msgid "Currencies"
msgstr "" msgstr ""
msgid "Currency Symbols"
msgstr ""
msgid "Cyrillic" msgid "Cyrillic"
msgstr "" msgstr ""
@@ -121,6 +157,12 @@ msgstr ""
msgid "Cyrillic BdC" msgid "Cyrillic BdC"
msgstr "" msgstr ""
msgid "Cyrillic Extended-B"
msgstr ""
msgid "Cyrillic Supplement"
msgstr ""
msgid "Cyrillic » Latin (GOST2000)" msgid "Cyrillic » Latin (GOST2000)"
msgstr "" msgstr ""
@@ -133,9 +175,15 @@ msgstr ""
msgid "Diacritics" msgid "Diacritics"
msgstr "" msgstr ""
msgid "Dingbats"
msgstr ""
msgid "Encircled Characters" msgid "Encircled Characters"
msgstr "" msgstr ""
msgid "Enclosed Alphanumerics"
msgstr ""
msgid "English" msgid "English"
msgstr "" msgstr ""
@@ -151,6 +199,12 @@ msgstr ""
msgid "Friulian" msgid "Friulian"
msgstr "" msgstr ""
msgid "General Punctuation"
msgstr ""
msgid "Geometric Shapes"
msgstr ""
msgid "Geometrical Shapes" msgid "Geometrical Shapes"
msgstr "" msgstr ""
@@ -172,12 +226,24 @@ msgstr ""
msgid "Greek (Old)" msgid "Greek (Old)"
msgstr "" msgstr ""
msgid "Greek Extended"
msgstr ""
msgid "Greek and Coptic"
msgstr ""
msgid "Gujarati"
msgstr ""
msgid "Hebrew" msgid "Hebrew"
msgstr "" msgstr ""
msgid "Hungarian" msgid "Hungarian"
msgstr "" msgstr ""
msgid "IPA Extensions"
msgstr ""
msgid "Irish Gaelic" msgid "Irish Gaelic"
msgstr "" msgstr ""
@@ -298,6 +364,21 @@ msgstr ""
msgid "Latin BdC" msgid "Latin BdC"
msgstr "" msgstr ""
msgid "Latin Extended Additional"
msgstr ""
msgid "Latin Extended-A"
msgstr ""
msgid "Latin Extended-B"
msgstr ""
msgid "Latin Extended-C"
msgstr ""
msgid "Latin Extended-D"
msgstr ""
msgid "Latin » Cyrillic (Belarusian)" msgid "Latin » Cyrillic (Belarusian)"
msgstr "" msgstr ""
@@ -421,19 +502,7 @@ msgstr ""
msgid "Letter u" msgid "Letter u"
msgstr "" msgstr ""
msgid "Letter, Lowercase" msgid "Letterlike Symbols"
msgstr ""
msgid "Letter, Modifier"
msgstr ""
msgid "Letter, Other"
msgstr ""
msgid "Letter, Titlecase"
msgstr ""
msgid "Letter, Uppercase"
msgstr "" msgstr ""
msgid "Ligatures" msgid "Ligatures"
@@ -448,21 +517,30 @@ msgstr ""
msgid "Maltese" msgid "Maltese"
msgstr "" msgstr ""
msgid "Mark, Enclosing"
msgstr ""
msgid "Mark, Non-Spacing"
msgstr ""
msgid "Mark, Spacing Combining"
msgstr ""
msgid "Mathematical And Physical Symbols" msgid "Mathematical And Physical Symbols"
msgstr "" msgstr ""
msgid "Mathematical Operators"
msgstr ""
msgid "Metric" msgid "Metric"
msgstr "" msgstr ""
msgid "Miscellaneous Mathematical Symbols-A"
msgstr ""
msgid "Miscellaneous Mathematical Symbols-B"
msgstr ""
msgid "Miscellaneous Symbols"
msgstr ""
msgid "Miscellaneous Symbols and Arrows"
msgstr ""
msgid "Miscellaneous Technical"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "" msgstr ""
@@ -508,13 +586,7 @@ msgstr ""
msgid "Number 9" msgid "Number 9"
msgstr "" msgstr ""
msgid "Number, Decimal Digit" msgid "Number Forms"
msgstr ""
msgid "Number, Letter"
msgstr ""
msgid "Number, Other"
msgstr "" msgstr ""
msgid "Numbers" msgid "Numbers"
@@ -526,45 +598,27 @@ msgstr ""
msgid "Other Modifiers" msgid "Other Modifiers"
msgstr "" msgstr ""
msgid "Other, Format"
msgstr ""
msgid "Other, Surrogate"
msgstr ""
msgid "Parentheses" msgid "Parentheses"
msgstr "" msgstr ""
msgid "Phonetic Extensions"
msgstr ""
msgid "Phonetic Extensions Supplement"
msgstr ""
msgid "Polish" msgid "Polish"
msgstr "" msgstr ""
msgid "Portuguese" msgid "Portuguese"
msgstr "" msgstr ""
msgid "Private Use Area"
msgstr ""
msgid "Punctuation" msgid "Punctuation"
msgstr "" msgstr ""
msgid "Punctuation, Close"
msgstr ""
msgid "Punctuation, Connector"
msgstr ""
msgid "Punctuation, Dash"
msgstr ""
msgid "Punctuation, Final quote"
msgstr ""
msgid "Punctuation, Initial quote"
msgstr ""
msgid "Punctuation, Open"
msgstr ""
msgid "Punctuation, Other"
msgstr ""
msgid "Quotes" msgid "Quotes"
msgstr "" msgstr ""
@@ -574,15 +628,6 @@ msgstr ""
msgid "Russian" msgid "Russian"
msgstr "" msgstr ""
msgid "Separator, Line"
msgstr ""
msgid "Separator, Paragraph"
msgstr ""
msgid "Separator, Space"
msgstr ""
msgid "Serbian Cyrillic" msgid "Serbian Cyrillic"
msgstr "" msgstr ""
@@ -610,19 +655,37 @@ msgstr ""
msgid "Spaces" msgid "Spaces"
msgstr "" msgstr ""
msgid "Spacing Modifier Letters"
msgstr ""
msgid "Spanish" msgid "Spanish"
msgstr "" msgstr ""
msgid "Special Characters" msgid "Special Characters"
msgstr "" msgstr ""
msgid "Specials"
msgstr ""
msgid "Strokes" msgid "Strokes"
msgstr "" msgstr ""
msgid "Subscript Characters" msgid "Subscript Characters"
msgstr "" msgstr ""
msgid "Superscript Sharacters" msgid "Superscript Characters"
msgstr ""
msgid "Superscripts and Subscripts"
msgstr ""
msgid "Supplemental Arrows-A"
msgstr ""
msgid "Supplemental Arrows-B"
msgstr ""
msgid "Supplemental Punctuation"
msgstr "" msgstr ""
msgid "Surrounded" msgid "Surrounded"
@@ -667,16 +730,7 @@ msgstr ""
msgid "Symbol ?" msgid "Symbol ?"
msgstr "" msgstr ""
msgid "Symbol, Currency" msgid "Syriac"
msgstr ""
msgid "Symbol, Math"
msgstr ""
msgid "Symbol, Modifier"
msgstr ""
msgid "Symbol, Other"
msgstr "" msgstr ""
msgid "Technical Characters" msgid "Technical Characters"
@@ -697,6 +751,9 @@ msgstr ""
msgid "Ukrainian" msgid "Ukrainian"
msgstr "" msgstr ""
msgid "Unified Canadian Aboriginal Syllabics"
msgstr ""
msgid "Units" msgid "Units"
msgstr "" msgstr ""

View File

@@ -1,12 +1,12 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2018 # Simon Rozman <simon.rozman@amebis.si>, 2018
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola.zrcdb\n" "Project-Id-Version: ZRCola.zrcdb\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n" "Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2018\n"
"Language-Team: Russian (Russia) (https://www.transifex.com/amebis/teams/91592/ru_RU/)\n" "Language-Team: Russian (Russia) (https://app.transifex.com/amebis/teams/91592/ru_RU/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -17,6 +17,9 @@ msgstr ""
msgid "Albanian" msgid "Albanian"
msgstr "албанский" msgstr "албанский"
msgid "Alphabetic Presentation Forms"
msgstr ""
msgid "Apostrophes 1" msgid "Apostrophes 1"
msgstr "апострофы 1" msgstr "апострофы 1"
@@ -26,24 +29,42 @@ msgstr "апострофы 2"
msgid "Arabic" msgid "Arabic"
msgstr "Арабские знаки" msgstr "Арабские знаки"
msgid "Armenian"
msgstr ""
msgid "Arrows" msgid "Arrows"
msgstr "Стрелки" msgstr "Стрелки"
msgid "Belarusian" msgid "Belarusian"
msgstr "белорусский" msgstr "белорусский"
msgid "Block Elements"
msgstr ""
msgid "Bosnian Cyrillic" msgid "Bosnian Cyrillic"
msgstr "боснийский кириллица" msgstr "боснийский кириллица"
msgid "Bosnian Latinic" msgid "Bosnian Latinic"
msgstr "боснийский латиница" msgstr "боснийский латиница"
msgid "Box Drawing"
msgstr ""
msgid "C0 Controls and Basic Latin (Basic Latin)"
msgstr ""
msgid "C1 Controls and Latin-1 Supplement (Latin-1 Supplement)"
msgstr ""
msgid "CAPITAL Case" msgid "CAPITAL Case"
msgstr "ПРОПИСНИЕ буквы" msgstr "ПРОПИСНИЕ буквы"
msgid "CAPITAL Case » small Case" msgid "CAPITAL Case » small Case"
msgstr "ПРОПИСНИЕ буквы » строчние буквы" msgstr "ПРОПИСНИЕ буквы » строчние буквы"
msgid "CJK Symbols and Punctuation"
msgstr ""
msgid "Combine" msgid "Combine"
msgstr "Средние замещающие знаки" msgstr "Средние замещающие знаки"
@@ -56,6 +77,18 @@ msgstr "Низжние замещающие знаки"
msgid "Combine Over" msgid "Combine Over"
msgstr "Неотдельные замещающие знаки" msgstr "Неотдельные замещающие знаки"
msgid "Combining Diacritical Marks"
msgstr ""
msgid "Combining Diacritical Marks Supplement"
msgstr ""
msgid "Combining Diacritical Marks for Symbols"
msgstr ""
msgid "Combining Half Marks"
msgstr ""
msgid "Combining Marks" msgid "Combining Marks"
msgstr "Модифицирующие символы" msgstr "Модифицирующие символы"
@@ -65,6 +98,9 @@ msgstr "хорватский"
msgid "Currencies" msgid "Currencies"
msgstr "Валюты" msgstr "Валюты"
msgid "Currency Symbols"
msgstr ""
msgid "Cyrillic" msgid "Cyrillic"
msgstr "Кириллические знаки" msgstr "Кириллические знаки"
@@ -125,6 +161,12 @@ msgstr "кириллица (украинский) » латиница (слов
msgid "Cyrillic BdC" msgid "Cyrillic BdC"
msgstr "кириллица (BdC)" msgstr "кириллица (BdC)"
msgid "Cyrillic Extended-B"
msgstr ""
msgid "Cyrillic Supplement"
msgstr ""
msgid "Cyrillic » Latin (GOST2000)" msgid "Cyrillic » Latin (GOST2000)"
msgstr "кириллица » латиница (ГОСТ2000)" msgstr "кириллица » латиница (ГОСТ2000)"
@@ -137,9 +179,15 @@ msgstr "датский"
msgid "Diacritics" msgid "Diacritics"
msgstr "Диакритики" msgstr "Диакритики"
msgid "Dingbats"
msgstr ""
msgid "Encircled Characters" msgid "Encircled Characters"
msgstr "Знаки в круге" msgstr "Знаки в круге"
msgid "Enclosed Alphanumerics"
msgstr ""
msgid "English" msgid "English"
msgstr "английский" msgstr "английский"
@@ -155,6 +203,12 @@ msgstr "французский"
msgid "Friulian" msgid "Friulian"
msgstr "фриульский" msgstr "фриульский"
msgid "General Punctuation"
msgstr ""
msgid "Geometric Shapes"
msgstr ""
msgid "Geometrical Shapes" msgid "Geometrical Shapes"
msgstr "Геометрические фигуры" msgstr "Геометрические фигуры"
@@ -177,12 +231,24 @@ msgstr ""
msgid "Greek (Old)" msgid "Greek (Old)"
msgstr "греческий алфавит (древнегреческий)" msgstr "греческий алфавит (древнегреческий)"
msgid "Greek Extended"
msgstr ""
msgid "Greek and Coptic"
msgstr ""
msgid "Gujarati"
msgstr ""
msgid "Hebrew" msgid "Hebrew"
msgstr "Еврейские знаки" msgstr "Еврейские знаки"
msgid "Hungarian" msgid "Hungarian"
msgstr "венгерский" msgstr "венгерский"
msgid "IPA Extensions"
msgstr ""
msgid "Irish Gaelic" msgid "Irish Gaelic"
msgstr "ирландский гэльский" msgstr "ирландский гэльский"
@@ -303,6 +369,21 @@ msgstr "латиница (ALE)"
msgid "Latin BdC" msgid "Latin BdC"
msgstr "латиница (BdC)" msgstr "латиница (BdC)"
msgid "Latin Extended Additional"
msgstr ""
msgid "Latin Extended-A"
msgstr ""
msgid "Latin Extended-B"
msgstr ""
msgid "Latin Extended-C"
msgstr ""
msgid "Latin Extended-D"
msgstr ""
msgid "Latin » Cyrillic (Belarusian)" msgid "Latin » Cyrillic (Belarusian)"
msgstr "латиница » кириллица (белорусский)" msgstr "латиница » кириллица (белорусский)"
@@ -426,20 +507,8 @@ msgstr "Буква о"
msgid "Letter u" msgid "Letter u"
msgstr "Буква у" msgstr "Буква у"
msgid "Letter, Lowercase" msgid "Letterlike Symbols"
msgstr "Буква, строчная" msgstr ""
msgid "Letter, Modifier"
msgstr "Буква, модификатор"
msgid "Letter, Other"
msgstr "Буква, остальное"
msgid "Letter, Titlecase"
msgstr "Буква, начальная"
msgid "Letter, Uppercase"
msgstr "Буква, прописная"
msgid "Ligatures" msgid "Ligatures"
msgstr "Лигатуры" msgstr "Лигатуры"
@@ -453,21 +522,30 @@ msgstr "македонский"
msgid "Maltese" msgid "Maltese"
msgstr "мальтийский" msgstr "мальтийский"
msgid "Mark, Enclosing"
msgstr "Метка, закрывающая"
msgid "Mark, Non-Spacing"
msgstr "Метка, несамостоятельная"
msgid "Mark, Spacing Combining"
msgstr "Метка, несамостоятельная ненулевой ширины"
msgid "Mathematical And Physical Symbols" msgid "Mathematical And Physical Symbols"
msgstr "Математические и физические знаки" msgstr "Математические и физические знаки"
msgid "Mathematical Operators"
msgstr ""
msgid "Metric" msgid "Metric"
msgstr "Метрические знаки" msgstr "Метрические знаки"
msgid "Miscellaneous Mathematical Symbols-A"
msgstr ""
msgid "Miscellaneous Mathematical Symbols-B"
msgstr ""
msgid "Miscellaneous Symbols"
msgstr ""
msgid "Miscellaneous Symbols and Arrows"
msgstr ""
msgid "Miscellaneous Technical"
msgstr ""
msgid "Modified" msgid "Modified"
msgstr "Изменяющие знаки" msgstr "Изменяющие знаки"
@@ -513,14 +591,8 @@ msgstr "Число 8"
msgid "Number 9" msgid "Number 9"
msgstr "Число 9" msgstr "Число 9"
msgid "Number, Decimal Digit" msgid "Number Forms"
msgstr "Число, децималная цифра" msgstr ""
msgid "Number, Letter"
msgstr "Число, буква"
msgid "Number, Other"
msgstr "Число, другое"
msgid "Numbers" msgid "Numbers"
msgstr "Числа" msgstr "Числа"
@@ -531,45 +603,27 @@ msgstr "Числа в круге"
msgid "Other Modifiers" msgid "Other Modifiers"
msgstr "Остальные замещающие знаки" msgstr "Остальные замещающие знаки"
msgid "Other, Format"
msgstr "Другое, формат"
msgid "Other, Surrogate"
msgstr "Другое, суррогат"
msgid "Parentheses" msgid "Parentheses"
msgstr "Скобкы" msgstr "Скобкы"
msgid "Phonetic Extensions"
msgstr ""
msgid "Phonetic Extensions Supplement"
msgstr ""
msgid "Polish" msgid "Polish"
msgstr "польский" msgstr "польский"
msgid "Portuguese" msgid "Portuguese"
msgstr "португальский" msgstr "португальский"
msgid "Private Use Area"
msgstr ""
msgid "Punctuation" msgid "Punctuation"
msgstr "Знаки препинания" msgstr "Знаки препинания"
msgid "Punctuation, Close"
msgstr "Пунктуация, заключительная"
msgid "Punctuation, Connector"
msgstr "Пунктуация, соединитель"
msgid "Punctuation, Dash"
msgstr "Пунктуация, черта"
msgid "Punctuation, Final quote"
msgstr "Пунктуация, окончательная кавычка"
msgid "Punctuation, Initial quote"
msgstr "Пунктуация, начальная кавычка"
msgid "Punctuation, Open"
msgstr "Пунктуация, открывающая"
msgid "Punctuation, Other"
msgstr "Пунктуация, остальное"
msgid "Quotes" msgid "Quotes"
msgstr "Кавычки" msgstr "Кавычки"
@@ -579,15 +633,6 @@ msgstr "румынский"
msgid "Russian" msgid "Russian"
msgstr "русский" msgstr "русский"
msgid "Separator, Line"
msgstr "Сепаратор, строчка"
msgid "Separator, Paragraph"
msgstr "Сепаратор, абзац"
msgid "Separator, Space"
msgstr "Сепаратор, пробел"
msgid "Serbian Cyrillic" msgid "Serbian Cyrillic"
msgstr "сербский кириллица" msgstr "сербский кириллица"
@@ -615,20 +660,38 @@ msgstr "лужицкий"
msgid "Spaces" msgid "Spaces"
msgstr "Пробелы" msgstr "Пробелы"
msgid "Spacing Modifier Letters"
msgstr ""
msgid "Spanish" msgid "Spanish"
msgstr "испанский" msgstr "испанский"
msgid "Special Characters" msgid "Special Characters"
msgstr "Специальные знаки" msgstr "Специальные знаки"
msgid "Specials"
msgstr ""
msgid "Strokes" msgid "Strokes"
msgstr "Перечертка" msgstr "Перечертка"
msgid "Subscript Characters" msgid "Subscript Characters"
msgstr "Форматирование нижнего индекса" msgstr "Форматирование нижнего индекса"
msgid "Superscript Sharacters" msgid "Superscript Characters"
msgstr "Форматирование надстрочного индекса" msgstr ""
msgid "Superscripts and Subscripts"
msgstr ""
msgid "Supplemental Arrows-A"
msgstr ""
msgid "Supplemental Arrows-B"
msgstr ""
msgid "Supplemental Punctuation"
msgstr ""
msgid "Surrounded" msgid "Surrounded"
msgstr "В круге" msgstr "В круге"
@@ -672,17 +735,8 @@ msgstr "Симбол >"
msgid "Symbol ?" msgid "Symbol ?"
msgstr "Симбол ?" msgstr "Симбол ?"
msgid "Symbol, Currency" msgid "Syriac"
msgstr "Симбол, валюта" msgstr ""
msgid "Symbol, Math"
msgstr "Симбол, математический"
msgid "Symbol, Modifier"
msgstr "Симбол, модификатор"
msgid "Symbol, Other"
msgstr "Симбол, остальное"
msgid "Technical Characters" msgid "Technical Characters"
msgstr "Технические символы" msgstr "Технические символы"
@@ -702,6 +756,9 @@ msgstr "турецкий"
msgid "Ukrainian" msgid "Ukrainian"
msgstr "украинский" msgstr "украинский"
msgid "Unified Canadian Aboriginal Syllabics"
msgstr ""
msgid "Units" msgid "Units"
msgstr "Единицы" msgstr "Единицы"

View File

@@ -1,12 +1,13 @@
# #
# Translators: # Translators:
# Simon Rozman <simon@rozman.si>, 2018 # Simon Rozman <simon.rozman@amebis.si>, 2025
# Janoš Ježovnik, 2025
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ZRCola.zrcdb\n" "Project-Id-Version: ZRCola.zrcdb\n"
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n" "Last-Translator: Janoš Ježovnik, 2025\n"
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91592/sl_SI/)\n" "Language-Team: Slovenian (Slovenia) (https://app.transifex.com/amebis/teams/91592/sl_SI/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@@ -15,28 +16,46 @@ msgstr ""
"X-Generator: ZRColaCompile\n" "X-Generator: ZRColaCompile\n"
msgid "Albanian" msgid "Albanian"
msgstr "albanščina" msgstr "Albanščina"
msgid "Alphabetic Presentation Forms"
msgstr "Abecedne predstavnostne oblike"
msgid "Apostrophes 1" msgid "Apostrophes 1"
msgstr "apostrofi 1" msgstr "Apostrofi 1"
msgid "Apostrophes 2" msgid "Apostrophes 2"
msgstr "apostrofi 2" msgstr "Apostrofi 2"
msgid "Arabic" msgid "Arabic"
msgstr "Arabski znaki" msgstr "Arabščina"
msgid "Armenian"
msgstr "Armenščina"
msgid "Arrows" msgid "Arrows"
msgstr "Puščice" msgstr "Puščice"
msgid "Belarusian" msgid "Belarusian"
msgstr "beloruščina" msgstr "Beloruščina"
msgid "Block Elements"
msgstr "Blokovni elementi"
msgid "Bosnian Cyrillic" msgid "Bosnian Cyrillic"
msgstr "bosanščina cirilica" msgstr "Bosanščina cirilica"
msgid "Bosnian Latinic" msgid "Bosnian Latinic"
msgstr "bosanščina latinica" msgstr "Bosanščina latinica"
msgid "Box Drawing"
msgstr "Risanje okvirjev"
msgid "C0 Controls and Basic Latin (Basic Latin)"
msgstr "Osnovna latinica (Latin-1)"
msgid "C1 Controls and Latin-1 Supplement (Latin-1 Supplement)"
msgstr "Dopolnitev osnovne latinice"
msgid "CAPITAL Case" msgid "CAPITAL Case"
msgstr "VELIKE črke" msgstr "VELIKE črke"
@@ -44,6 +63,9 @@ msgstr "VELIKE črke"
msgid "CAPITAL Case » small Case" msgid "CAPITAL Case » small Case"
msgstr "VELIKE črke » male črke" msgstr "VELIKE črke » male črke"
msgid "CJK Symbols and Punctuation"
msgstr "Simboli in ločila KJK"
msgid "Combine" msgid "Combine"
msgstr "Srednji nadomestni znaki" msgstr "Srednji nadomestni znaki"
@@ -56,110 +78,143 @@ msgstr "Spodnji nadomestni znaki"
msgid "Combine Over" msgid "Combine Over"
msgstr "Neločljivi nadomestni znaki" msgstr "Neločljivi nadomestni znaki"
msgid "Combining Diacritical Marks"
msgstr "Sestavljiva naglasna znamenja"
msgid "Combining Diacritical Marks Supplement"
msgstr "Dopolnilna sestavljiva naglasna znamenja"
msgid "Combining Diacritical Marks for Symbols"
msgstr "Sestavljiva naglasna znamenja za simbole"
msgid "Combining Half Marks"
msgstr "Sestavljiva večznakovna znamenja"
msgid "Combining Marks" msgid "Combining Marks"
msgstr "Sestavljiva ločevalna znamenja" msgstr "Sestavljiva ločevalna znamenja"
msgid "Croatian" msgid "Croatian"
msgstr "hrvaščina" msgstr "Hrvaščina"
msgid "Currencies" msgid "Currencies"
msgstr "Valute" msgstr "Valute"
msgid "Currency Symbols"
msgstr "Simboli valut"
msgid "Cyrillic" msgid "Cyrillic"
msgstr "Cirilski znaki" msgstr "Cirilica"
msgid "Cyrillic (Belarusian)" msgid "Cyrillic (Belarusian)"
msgstr "cirilica (beloruščina)" msgstr "Cirilica (beloruščina)"
msgid "Cyrillic (Belarusian) » Latin (English)" msgid "Cyrillic (Belarusian) » Latin (English)"
msgstr "cirilica (beloruščina) » latinica (angleščina)" msgstr "Cirilica (beloruščina) » latinica (angleščina)"
msgid "Cyrillic (Belarusian) » Latin (Slovenian)" msgid "Cyrillic (Belarusian) » Latin (Slovenian)"
msgstr "cirilica (beloruščina) » latinica (slovenščina)" msgstr "Cirilica (beloruščina) » latinica (slovenščina)"
msgid "Cyrillic (Bulgarian)" msgid "Cyrillic (Bulgarian)"
msgstr "cirilica (bolgarščina)" msgstr "Cirilica (bolgarščina)"
msgid "Cyrillic (Bulgarian) » Latin (English)" msgid "Cyrillic (Bulgarian) » Latin (English)"
msgstr "cirilica (bolgarščina) » latinica (angleščina)" msgstr "Cirilica (bolgarščina) » latinica (angleščina)"
msgid "Cyrillic (Bulgarian) » Latin (Slovenian)" msgid "Cyrillic (Bulgarian) » Latin (Slovenian)"
msgstr "cirilica (bolgarščina) » latinica (slovenščina)" msgstr "Cirilica (bolgarščina) » latinica (slovenščina)"
msgid "Cyrillic (GOST2000)" msgid "Cyrillic (GOST2000)"
msgstr "cirilica (GOST2000)" msgstr "Cirilica (GOST2000)"
msgid "Cyrillic (Macedonian)" msgid "Cyrillic (Macedonian)"
msgstr "cirilica (makedonščina)" msgstr "Cirilica (makedonščina)"
msgid "Cyrillic (Macedonian) » Latin (English)" msgid "Cyrillic (Macedonian) » Latin (English)"
msgstr "cirilica (makedonščina) » latinica (angleščina)" msgstr "Cirilica (makedonščina) » latinica (angleščina)"
msgid "Cyrillic (Macedonian) » Latin (Slovenian)" msgid "Cyrillic (Macedonian) » Latin (Slovenian)"
msgstr "cirilica (makedonščina) » latinica (slovenščina)" msgstr "Cirilica (makedonščina) » latinica (slovenščina)"
msgid "Cyrillic (Russian)" msgid "Cyrillic (Russian)"
msgstr "cirilica (ruščina)" msgstr "Cirilica (ruščina)"
msgid "Cyrillic (Russian) » Latin (English)" msgid "Cyrillic (Russian) » Latin (English)"
msgstr "cirilica (ruščina) » latinica (angleščina)" msgstr "Cirilica (ruščina) » latinica (angleščina)"
msgid "Cyrillic (Russian) » Latin (Slovenian)" msgid "Cyrillic (Russian) » Latin (Slovenian)"
msgstr "cirilica (ruščina) » latinica (slovenščina)" msgstr "Cirilica (ruščina) » latinica (slovenščina)"
msgid "Cyrillic (Serbian)" msgid "Cyrillic (Serbian)"
msgstr "cirilica (srbščina)" msgstr "Cirilica (srbščina)"
msgid "Cyrillic (Serbian) » Latin" msgid "Cyrillic (Serbian) » Latin"
msgstr "cirilica (srbščina) » latinica" msgstr "Cirilica (srbščina) » latinica"
msgid "Cyrillic (Ukrainian)" msgid "Cyrillic (Ukrainian)"
msgstr "cirilica (ukrajinščina)" msgstr "Cirilica (ukrajinščina)"
msgid "Cyrillic (Ukrainian) » Latin (English)" msgid "Cyrillic (Ukrainian) » Latin (English)"
msgstr "cirilica (ukrajinščina) » latinica (angleščina)" msgstr "Cirilica (ukrajinščina) » latinica (angleščina)"
msgid "Cyrillic (Ukrainian) » Latin (Slovenian)" msgid "Cyrillic (Ukrainian) » Latin (Slovenian)"
msgstr "cirilica (ukrajinščina) » latinica (slovenščina)" msgstr "Cirilica (ukrajinščina) » latinica (slovenščina)"
msgid "Cyrillic BdC" msgid "Cyrillic BdC"
msgstr "cirilica (BdC)" msgstr "Cirilica (BdC)"
msgid "Cyrillic Extended-B"
msgstr "Razširitev cirilice B"
msgid "Cyrillic Supplement"
msgstr "Dopolnitev cirilice"
msgid "Cyrillic » Latin (GOST2000)" msgid "Cyrillic » Latin (GOST2000)"
msgstr "cirilica » latinica (GOST2000)" msgstr "Cirilica » latinica (GOST2000)"
msgid "Czech" msgid "Czech"
msgstr "češčina" msgstr "Češčina"
msgid "Danish" msgid "Danish"
msgstr "danščina" msgstr "Danščina"
msgid "Diacritics" msgid "Diacritics"
msgstr "Ločevalna znamenja" msgstr "Ločevalna znamenja"
msgid "Dingbats"
msgstr "Ornamenti"
msgid "Encircled Characters" msgid "Encircled Characters"
msgstr "Obkroženi znaki" msgstr "Obkroženi znaki"
msgid "Enclosed Alphanumerics"
msgstr "Obkrožene črke in številke"
msgid "English" msgid "English"
msgstr "angleščina" msgstr "Angleščina"
msgid "Estonian" msgid "Estonian"
msgstr "estonščina" msgstr "Estonščina"
msgid "Eva" msgid "Eva"
msgstr "Eva" msgstr "Eva"
msgid "French" msgid "French"
msgstr "francoščina" msgstr "Francoščina"
msgid "Friulian" msgid "Friulian"
msgstr "furlanščina" msgstr "Furlanščina"
msgid "General Punctuation"
msgstr "Splošna ločila"
msgid "Geometric Shapes"
msgstr "Geometrijske oblike"
msgid "Geometrical Shapes" msgid "Geometrical Shapes"
msgstr "Geometrijski liki" msgstr "Geometrijski liki"
msgid "German" msgid "German"
msgstr "nemščina" msgstr "Nemščina"
msgid "Glagolitic" msgid "Glagolitic"
msgstr "Glagolski znaki" msgstr "Glagolski znaki"
@@ -168,169 +223,196 @@ msgid "Greek"
msgstr "Grški znaki" msgstr "Grški znaki"
msgid "Greek (Modern)" msgid "Greek (Modern)"
msgstr "grški alfabet (nova grščina)" msgstr "Grški alfabet (nova grščina)"
msgid "Greek (Modern) » Greek (Old)" msgid "Greek (Modern) » Greek (Old)"
msgstr "grški alfabet (nova grščina) » grški alfabet (stara grščina)" msgstr "Grški alfabet (nova grščina) » grški alfabet (stara grščina)"
msgid "Greek (Old)" msgid "Greek (Old)"
msgstr "grški alfabet (stara grščina)" msgstr "Grški alfabet (stara grščina)"
msgid "Greek Extended"
msgstr "Razširitev grščine"
msgid "Greek and Coptic"
msgstr "Grščina in koptščina"
msgid "Gujarati"
msgstr "Gudžarati"
msgid "Hebrew" msgid "Hebrew"
msgstr "Hebrejski znaki" msgstr "Hebrejščina"
msgid "Hungarian" msgid "Hungarian"
msgstr "madžarščina" msgstr "Madžarščina"
msgid "IPA Extensions"
msgstr "Razširitve IPA"
msgid "Irish Gaelic" msgid "Irish Gaelic"
msgstr "irščina" msgstr "Irščina"
msgid "Joined" msgid "Joined"
msgstr "Povezajni nadomestni znaki" msgstr "Povezovalni nadomestni znaki"
msgid "Joined strings with A" msgid "Joined strings with A"
msgstr "Povezajni nizi z A" msgstr "Povezani nizi z A"
msgid "Joined strings with B" msgid "Joined strings with B"
msgstr "Povezajni nizi z B" msgstr "Povezani nizi z B"
msgid "Joined strings with C" msgid "Joined strings with C"
msgstr "Povezajni nizi s C" msgstr "Povezani nizi s C"
msgid "Joined strings with D" msgid "Joined strings with D"
msgstr "Povezajni nizi z D" msgstr "Povezani nizi z D"
msgid "Joined strings with E" msgid "Joined strings with E"
msgstr "Povezajni nizi z E" msgstr "Povezani nizi z E"
msgid "Joined strings with F" msgid "Joined strings with F"
msgstr "Povezajni nizi s F" msgstr "Povezani nizi s F"
msgid "Joined strings with G" msgid "Joined strings with G"
msgstr "Povezajni nizi z G" msgstr "Povezani nizi z G"
msgid "Joined strings with H" msgid "Joined strings with H"
msgstr "Povezajni nizi s H" msgstr "Povezani nizi s H"
msgid "Joined strings with I" msgid "Joined strings with I"
msgstr "Povezajni nizi z I" msgstr "Povezani nizi z I"
msgid "Joined strings with J" msgid "Joined strings with J"
msgstr "Povezajni nizi z J" msgstr "Povezani nizi z J"
msgid "Joined strings with K" msgid "Joined strings with K"
msgstr "Povezajni nizi s K" msgstr "Povezani nizi s K"
msgid "Joined strings with L" msgid "Joined strings with L"
msgstr "Povezajni nizi z L" msgstr "Povezani nizi z L"
msgid "Joined strings with M" msgid "Joined strings with M"
msgstr "Povezajni nizi z M" msgstr "Povezani nizi z M"
msgid "Joined strings with N" msgid "Joined strings with N"
msgstr "Povezajni nizi z N" msgstr "Povezani nizi z N"
msgid "Joined strings with O" msgid "Joined strings with O"
msgstr "Povezajni nizi z O" msgstr "Povezani nizi z O"
msgid "Joined strings with P" msgid "Joined strings with P"
msgstr "Povezajni nizi s P" msgstr "Povezani nizi s P"
msgid "Joined strings with Q" msgid "Joined strings with Q"
msgstr "Povezajni nizi z Q" msgstr "Povezani nizi z Q"
msgid "Joined strings with R" msgid "Joined strings with R"
msgstr "Povezajni nizi z R" msgstr "Povezani nizi z R"
msgid "Joined strings with S" msgid "Joined strings with S"
msgstr "Povezajni nizi s S" msgstr "Povezani nizi s S"
msgid "Joined strings with T" msgid "Joined strings with T"
msgstr "Povezajni nizi s T" msgstr "Povezani nizi s T"
msgid "Joined strings with U" msgid "Joined strings with U"
msgstr "Povezajni nizi z U" msgstr "Povezani nizi z U"
msgid "Joined strings with V" msgid "Joined strings with V"
msgstr "Povezajni nizi z V" msgstr "Povezani nizi z V"
msgid "Joined strings with W" msgid "Joined strings with W"
msgstr "Povezajni nizi z W" msgstr "Povezani nizi z W"
msgid "Joined strings with X" msgid "Joined strings with X"
msgstr "Povezajni nizi z X" msgstr "Povezani nizi z X"
msgid "Joined strings with Y" msgid "Joined strings with Y"
msgstr "Povezajni nizi z Y" msgstr "Povezani nizi z Y"
msgid "Joined strings with Z" msgid "Joined strings with Z"
msgstr "Povezajni nizi z Z" msgstr "Povezani nizi z Z"
msgid "Joined strings with a" msgid "Joined strings with a"
msgstr "Povezajni nizi z a" msgstr "Povezani nizi z a"
msgid "Joined strings with e" msgid "Joined strings with e"
msgstr "Povezajni nizi z e" msgstr "Povezani nizi z e"
msgid "Joined strings with i" msgid "Joined strings with i"
msgstr "Povezajni nizi z i" msgstr "Povezani nizi z i"
msgid "Joined strings with o" msgid "Joined strings with o"
msgstr "Povezajni nizi z o" msgstr "Povezani nizi z o"
msgid "Joined strings with u" msgid "Joined strings with u"
msgstr "Povezajni nizi z u" msgstr "Povezani nizi z u"
msgid "Kashubian" msgid "Kashubian"
msgstr "kašubščina" msgstr "Kašubščina"
msgid "Latin" msgid "Latin"
msgstr "latinščina" msgstr "Latinica"
msgid "Latin (English)" msgid "Latin (English)"
msgstr "latinica (angleščina)" msgstr "Latinica (angleščina)"
msgid "Latin (GOST2000)" msgid "Latin (GOST2000)"
msgstr "latinica (GOST2000)" msgstr "Latinica (GOST2000)"
msgid "Latin (Slovenian)" msgid "Latin (Slovenian)"
msgstr "latinica (slovenščina)" msgstr "Latinica (slovenščina)"
msgid "Latin ALE" msgid "Latin ALE"
msgstr "latinščina (ALE)" msgstr "Latinica (ALE)"
msgid "Latin BdC" msgid "Latin BdC"
msgstr "latinščina (BdC)" msgstr "Latinica (BdC)"
msgid "Latin Extended Additional"
msgstr "Dodatna razširitev latinice"
msgid "Latin Extended-A"
msgstr "Razširitev latinice A"
msgid "Latin Extended-B"
msgstr "Razširitev latinice B"
msgid "Latin Extended-C"
msgstr "Razširitev latinice C"
msgid "Latin Extended-D"
msgstr "Razširitev latinice D"
msgid "Latin » Cyrillic (Belarusian)" msgid "Latin » Cyrillic (Belarusian)"
msgstr "latinica » cirilica (beloruščina)" msgstr "Latinica » cirilica (beloruščina)"
msgid "Latin » Cyrillic (Bulgarian)" msgid "Latin » Cyrillic (Bulgarian)"
msgstr "latinica » cirilica (bolgarščina)" msgstr "Latinica » cirilica (bolgarščina)"
msgid "Latin » Cyrillic (GOST2000)" msgid "Latin » Cyrillic (GOST2000)"
msgstr "latinica » cirilica (GOST2000)" msgstr "Latinica » cirilica (GOST2000)"
msgid "Latin » Cyrillic (Macedonian)" msgid "Latin » Cyrillic (Macedonian)"
msgstr "latinica » cirilica (makedonščina)" msgstr "Latinica » cirilica (makedonščina)"
msgid "Latin » Cyrillic (Russian)" msgid "Latin » Cyrillic (Russian)"
msgstr "latinica » cirilica (ruščina)" msgstr "Latinica » cirilica (ruščina)"
msgid "Latin » Cyrillic (Serbian)" msgid "Latin » Cyrillic (Serbian)"
msgstr "latinica » cirilica (srbščina)" msgstr "Latinica » cirilica (srbščina)"
msgid "Latin » Cyrillic (Ukrainian)" msgid "Latin » Cyrillic (Ukrainian)"
msgstr "latinica » cirilica (ukrajinščina)" msgstr "Latinica » cirilica (ukrajinščina)"
msgid "Latin » Greek (modern)" msgid "Latin » Greek (modern)"
msgstr "latinica » grški alfabet (nova grščina)" msgstr "Latinica » grški alfabet (nova grščina)"
msgid "Latin » Greek (old)" msgid "Latin » Greek (old)"
msgstr "latinica » grški alfabet (stara grščina)" msgstr "Latinica » grški alfabet (stara grščina)"
msgid "Latvian" msgid "Latvian"
msgstr "letonščina" msgstr "Latvijščina"
msgid "Letter A" msgid "Letter A"
msgstr "Črka A" msgstr "Črka A"
@@ -425,62 +507,59 @@ msgstr "Črka o"
msgid "Letter u" msgid "Letter u"
msgstr "Črka u" msgstr "Črka u"
msgid "Letter, Lowercase" msgid "Letterlike Symbols"
msgstr "Črka, mala" msgstr "Simboli iz črk"
msgid "Letter, Modifier"
msgstr "Črka, spreminjevalo"
msgid "Letter, Other"
msgstr "Črka, drugo"
msgid "Letter, Titlecase"
msgstr "Črka, naslovna"
msgid "Letter, Uppercase"
msgstr "Črka, velika"
msgid "Ligatures" msgid "Ligatures"
msgstr "Ligature" msgstr "Ligature"
msgid "Lithuanian" msgid "Lithuanian"
msgstr "litovščina" msgstr "Litovščina"
msgid "Macedonian" msgid "Macedonian"
msgstr "makedonščina" msgstr "Makedonščina"
msgid "Maltese" msgid "Maltese"
msgstr "malteščina" msgstr "Malteščina"
msgid "Mark, Enclosing"
msgstr "Ločevalo, obdajajoče"
msgid "Mark, Non-Spacing"
msgstr "Ločevalo, neločljivo"
msgid "Mark, Spacing Combining"
msgstr "Ločevalo, ločljivo"
msgid "Mathematical And Physical Symbols" msgid "Mathematical And Physical Symbols"
msgstr "Matematični in fizikalni simboli" msgstr "Matematični in fizikalni simboli"
msgid "Mathematical Operators"
msgstr "Matematični operatorji"
msgid "Metric" msgid "Metric"
msgstr "Metrično" msgstr "Metrično"
msgid "Miscellaneous Mathematical Symbols-A"
msgstr "Razni matematični simboli A"
msgid "Miscellaneous Mathematical Symbols-B"
msgstr "Razni matematični simboli B"
msgid "Miscellaneous Symbols"
msgstr "Razni simboli"
msgid "Miscellaneous Symbols and Arrows"
msgstr "Razni simboli in puščice"
msgid "Miscellaneous Technical"
msgstr "Razno tehnika"
msgid "Modified" msgid "Modified"
msgstr "Spreminjevalni nadomestni znaki" msgstr "Spreminjevalni nadomestni znaki"
msgid "Moldavian Cyrillic" msgid "Moldavian Cyrillic"
msgstr "moldavščina cirilica" msgstr "Moldavščina cirilica"
msgid "Moldavian Latinic" msgid "Moldavian Latinic"
msgstr "moldavščina latinica" msgstr "Moldavščina latinica"
msgid "Musical Characters" msgid "Musical Characters"
msgstr "Glasbeni znaki" msgstr "Glasbeni znaki"
msgid "Norwegian" msgid "Norwegian"
msgstr "norveščina" msgstr "Norveščina"
msgid "Number 0" msgid "Number 0"
msgstr "Številka 0" msgstr "Številka 0"
@@ -512,14 +591,8 @@ msgstr "Številka 8"
msgid "Number 9" msgid "Number 9"
msgstr "Številka 9" msgstr "Številka 9"
msgid "Number, Decimal Digit" msgid "Number Forms"
msgstr "Številka, desetiška števka" msgstr "Oblike števnikov"
msgid "Number, Letter"
msgstr "Številka, črka"
msgid "Number, Other"
msgstr "Številka, drugo"
msgid "Numbers" msgid "Numbers"
msgstr "Številke" msgstr "Številke"
@@ -530,110 +603,101 @@ msgstr "Številka, obkrožena"
msgid "Other Modifiers" msgid "Other Modifiers"
msgstr "Ostali nadomestni znaki" msgstr "Ostali nadomestni znaki"
msgid "Other, Format"
msgstr "Drugo, oblikovni znaki"
msgid "Other, Surrogate"
msgstr "Drugo, nadomestni znaki"
msgid "Parentheses" msgid "Parentheses"
msgstr "Oklepaji" msgstr "Oklepaji"
msgid "Phonetic Extensions"
msgstr "Fonetične razširitve"
msgid "Phonetic Extensions Supplement"
msgstr "Dopolnitev fonetične razširitve"
msgid "Polish" msgid "Polish"
msgstr "poljščina" msgstr "Poljščina"
msgid "Portuguese" msgid "Portuguese"
msgstr "portugalščina" msgstr "Portugalščina"
msgid "Private Use Area"
msgstr "Območje zasebne rabe"
msgid "Punctuation" msgid "Punctuation"
msgstr "Ločila" msgstr "Ločila"
msgid "Punctuation, Close"
msgstr "Ločilo, zapiralno"
msgid "Punctuation, Connector"
msgstr "Ločilo, povezaj"
msgid "Punctuation, Dash"
msgstr "Ločilo, pomišljaj"
msgid "Punctuation, Final quote"
msgstr "Ločilo, zaključni narekovaj"
msgid "Punctuation, Initial quote"
msgstr "Ločilo, uvodni narekovaj"
msgid "Punctuation, Open"
msgstr "Ločilo, odpiralno"
msgid "Punctuation, Other"
msgstr "Ločilo, drugo"
msgid "Quotes" msgid "Quotes"
msgstr "Narekovaji" msgstr "Narekovaji"
msgid "Romanian" msgid "Romanian"
msgstr "romunščina" msgstr "Romunščina"
msgid "Russian" msgid "Russian"
msgstr "ruščina" msgstr "Ruščina"
msgid "Separator, Line"
msgstr "Ločilo, vrstica"
msgid "Separator, Paragraph"
msgstr "Ločilo, odstavek"
msgid "Separator, Space"
msgstr "Ločilo, presledek"
msgid "Serbian Cyrillic" msgid "Serbian Cyrillic"
msgstr "srbščina cirilica" msgstr "Srbščina cirilica"
msgid "Serbian Latinic" msgid "Serbian Latinic"
msgstr "srbščina latinica" msgstr "Srbščina latinica"
msgid "Sigma Final" msgid "Sigma Final"
msgstr "sigma (končna)" msgstr "Sigma (končna)"
msgid "Sigma Nav" msgid "Sigma Nav"
msgstr "sigma (navadna)" msgstr "Sigma (navadna)"
msgid "Slovak" msgid "Slovak"
msgstr "slovaščina" msgstr "Slovaščina"
msgid "Slovene Historical Writings" msgid "Slovene Historical Writings"
msgstr "Slovenske zgodovinske pisave" msgstr "Slovenske zgodovinske pisave"
msgid "Slovenian" msgid "Slovenian"
msgstr "slovenščina" msgstr "Slovenščina"
msgid "Sorbian" msgid "Sorbian"
msgstr "lužiščini" msgstr "Lužiška srbščina"
msgid "Spaces" msgid "Spaces"
msgstr "Presledki" msgstr "Presledki"
msgid "Spacing Modifier Letters"
msgstr "Nesestavljive nadomestne črke"
msgid "Spanish" msgid "Spanish"
msgstr "španščina" msgstr "Španščina"
msgid "Special Characters" msgid "Special Characters"
msgstr "Posebni znaki" msgstr "Posebni znaki"
msgid "Specials"
msgstr "Posebno"
msgid "Strokes" msgid "Strokes"
msgstr "Poševnice" msgstr "Poševnice"
msgid "Subscript Characters" msgid "Subscript Characters"
msgstr "Podpisani znaki" msgstr "Podpisani znaki"
msgid "Superscript Sharacters" msgid "Superscript Characters"
msgstr "Nadpisani znaki" msgstr "Nadpisani znaki"
msgid "Superscripts and Subscripts"
msgstr "Nadpisano in podpisano"
msgid "Supplemental Arrows-A"
msgstr "Dopolnilne puščice A"
msgid "Supplemental Arrows-B"
msgstr "Dopolnilne puščice B"
msgid "Supplemental Punctuation"
msgstr "Dopolnilna ločila"
msgid "Surrounded" msgid "Surrounded"
msgstr "Obkrožajni nadomestni znaki" msgstr "Obkrožajni nadomestni znaki"
msgid "Swedish" msgid "Swedish"
msgstr "švedščina" msgstr "Švedščina"
msgid "Symbol !" msgid "Symbol !"
msgstr "Simbol !" msgstr "Simbol !"
@@ -671,17 +735,8 @@ msgstr "Simbol >"
msgid "Symbol ?" msgid "Symbol ?"
msgstr "Simbol ?" msgstr "Simbol ?"
msgid "Symbol, Currency" msgid "Syriac"
msgstr "Simbol, valuta" msgstr "Sirščina"
msgid "Symbol, Math"
msgstr "Simbol, matematični"
msgid "Symbol, Modifier"
msgstr "Simbol, ločevalo"
msgid "Symbol, Other"
msgstr "Simbol, drugo"
msgid "Technical Characters" msgid "Technical Characters"
msgstr "Tehnični znaki" msgstr "Tehnični znaki"
@@ -696,10 +751,13 @@ msgid "Transliterating Marks"
msgstr "Prečrkovalni nadomestni znaki" msgstr "Prečrkovalni nadomestni znaki"
msgid "Turkish" msgid "Turkish"
msgstr "turščina" msgstr "Turščina"
msgid "Ukrainian" msgid "Ukrainian"
msgstr "ukrajinščina" msgstr "Ukrajinščina"
msgid "Unified Canadian Aboriginal Syllabics"
msgstr "Združeni kanadski staroselski zlogovni znaki"
msgid "Units" msgid "Units"
msgstr "Enote" msgstr "Enote"