Describe the problem
My program loads translations from Windows resources using wxResourceTranslationsLoader, however some language identifications contains charactor @, which is not a valid token in .rc files.
For example:
foo_sr@latin MOFILE "sr@latin/foo.mo"
windres will not compile it.
Are there any solutions?
Platform and version information
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
We'd need to implement some kind of escaping schema for @ here, e.g. replace __at__ with it or something like this. Alternatively, we could just replace any non-alphanumeric characters with _, as it's probably not going to create any ambiguity here.
In any case, it shouldn't be difficult to add this to wxResourceTranslationsLoader::LoadCatalog(). If you decide to do it, please document the chosen schema in the class docs in interface/wx/translation.h and make a PR with your changes. TIA!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
After some investigations, I found that it should be valid to write like
"foo_sr@latin" MOFILE "sr@latin/foo.mo"
in .rc file as it's valid in Microsoft rc.exe.
It's llvm-rc not supporting the syntax(llvm/llvm-project#56338), and GNU windres has some parser bugs that will cause rc compilation 99% likely to fail.
So that's not wxWidgets' flaw. Even though, I made a PR to avoid these headaches.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #22589 as completed via d8eddbd.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()