uli These are the scripts that I'm currently using
Thank you very much!
I have plans to bring BASIC Engine to the attention of the Russian-speaking community and I have some resources for that.
I am the founder and administrator of the main Russian-language forum about ZX-Spectrum and other retro-compatibles (zx-pk.ru). But first I want to add Russian to the system and I want to do it in the best possible way. But, unfortunately, I have come across the fact that there are some errors in the translation code. And without fixing the code in the repository it is impossible to do what I want. But, as I realize, any changes will affect other languages as well.
I've been struggling for a long time to get a PO file with the most complete contents of the lines for translation. As a result, I came to your help.py script. This script uses the Python translate library to create json files for different languages, which are then used by the system to output help on commands. I captured everything that is sent to translate. This helped me to overcome some problems and find out why some strings were not being translated.
For example, the line
volume envelope [characters from
CHR$(0)to
CHR$(15), default: constant volume]
is actually the string
volume envelope\t[characters from
CHR$(0)to
CHR$(15), default: constant volume]
i.e. there is an extra tab character in the middle.
The line is cut off
* [[unclear]] Some key definitions are not well-defined. The kbd:[Pipe2] key is documented as belonging to a US layout keyboard, but US layouts do not have a separate kbd:[|] key.
by the “|” character, because it consider by script as tab.
There are three strings related to the table in the code:
\table
\table header
\endtable
This code will corrupt the “\table header” tag, turning it into an untranslatable “=== header” tag:
def
colorize_code(d):
d = re.sub('`([^`]+)`', '\\\\\\\\Fn\g<1>\\\\\\\\Ff', d)
d = re.sub('<<([^`]+)>>', '\\\\\\\\Fn\g<1>\\\\\\\\Ff', d)
d = re.sub('(IMPORTANT:)', '\\\\\\\\Fp\g<1>\\\\\\\\Ff', d)
d = re.sub('(WARNING:)', '\\\\\\\\Fp\g<1>\\\\\\\\Ff', d)
d = re.sub('kbd:\[([^\]]*)]', '\\\\\\\\Fp[\g<1>]\\\\\\\\Ff', d)
d = re.sub('\\\\endtable', '===', d)
d = re.sub('\\\\table', '===', d)
d = re.sub('====\n----\n', '\\\\\\\\Fn', d)
d = re.sub('----\n====\n', '\\\\\\\\Ff\\n', d)
return d
And some strings are not sent for translation at all because of a script error, but are written to the json file as they are (in English).
Frankly speaking, my hands are down, because I see that without the participation of the author of the project I can not achieve a good result. And this forum is not the best place to solve issues promptly.
I found other problems and bugs that I didn't mention. I would like them to be fixed.
I think that while I have a lot of enthusiasm, we could work on the project together. If you are interested, write to me in Telegram @CityAceE