The EventGhost project is looking for translators!

If you have a question or need help, this is the place to be.
maopequena
Posts: 5
Joined: Sun Aug 25, 2019 1:23 am

Re: The EventGhost project is looking for translators!

Post by maopequena » Sun Aug 25, 2019 4:20 am

Hi, I am updating the translation for pt_BR and I have a few questions:

- In "WinUsb", "installMsg" says: "You need to install the proper driver for this %s device. Should EventGhost start the driver installation for you now?". What does the placeholder "%s" stands for in this? Version? Type of device?

- Do I have to check all Hotkeys, or do you have a way to check them later? And if I do have to check them, how do I apply the translations to the actual program so I can check them in context?

- How do I export the file and all of its translations? I'd like to work on one of my translation tools so I can reuse the repeated segments.

Thanks in advance.

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: The EventGhost project is looking for translators!

Post by kgschlosser » Sun Aug 25, 2019 5:29 am

there are string formatters in some of the text.. here is a good site that shows you some of the string formatters and what they do.

https://pyformat.info/

there are 2 ways to "inject" into the middle of a string one of them being the % and the other is using {}. on that webiste they state new and old. which is true. but both still apply. you do not want to change the formatters at all otherwise it will cause errors in whatever is using the translation.

in WinUsb that specific formatter is for the name of the device as supplied by Windows. so whatever Windows has stored is what gets placed there.

You cannot export per say.when you save the translation it will write it to a file in the languages folder where you installed EventGhost to.
The file that contains the translations is a python source code file. and has the strings that you added.

This is really an oversimplified description of how the translation system works in EventGhost.
there is a class called TranslatableStrings if this class gets sub classed (meaning added to another class) when the file that contains the subclass gets compiled and the class gets created into an object the TranslatableStrings class will then grab the locale from EG and check to see if there is a language file. If there is one then it will read that language file and ckeck to see if the subclass name is in that file. if it is it will use the information from that class instead.
If you like the work I have been doing then feel free to Image

maopequena
Posts: 5
Joined: Sun Aug 25, 2019 1:23 am

Re: The EventGhost project is looking for translators!

Post by maopequena » Sun Aug 25, 2019 7:54 am

Thank you very much for answering the question about the formatters (I call them placeholders because I never know what they're meant to be :P )!

Just to clarify: there is no way to extract these into XML or XLIFF or ANY other format for me to use it in another program? The thing is: I am a professional translator and I have tools here that would greatly simplify this job for me and for future translators, maybe even for other languages (I could create a glossary, for instance).

If not, I thank you in advance for the time you spent answering my repeated questions :oops:

maopequena
Posts: 5
Joined: Sun Aug 25, 2019 1:23 am

Re: The EventGhost project is looking for translators!

Post by maopequena » Sun Aug 25, 2019 7:41 pm

Thanks for answering my question about the formatters.

Just to clarify: it is *not* possible to export the english UI to any other format (XML, XLIFF, anything at all)?

What about the Hotkeys, i.e. &Copy and &Paste? Do I have to check them, and if so, how do I check them in context?

Again, thanks for taking the time to answer my repeated questions :oops:

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: The EventGhost project is looking for translators!

Post by kgschlosser » Mon Aug 26, 2019 8:04 am

the hotkeys are pretty simple. where ever you see the & the following letter is the hotkey. so whatever you changer them to should map to the keyboard correctly You may need to move the & symbol to a new letter so you do not have conflicting keys. and to check them open EventGhost. change to your translation. save and restart EventGhost. then open up a dropdown menu from the top of EG.. verify the letter that is underlined. then press Alt + and that letter and see if the correct thing opens up.

and NO there is no export function. I have not messed around with different language files enough to be able to make one easily. I would have to put on my nerd cap and start reading..
If you like the work I have been doing then feel free to Image

maopequena
Posts: 5
Joined: Sun Aug 25, 2019 1:23 am

Re: The EventGhost project is looking for translators!

Post by maopequena » Mon Aug 26, 2019 7:52 pm

No need to put on the nerd cap! Thanks for the answer! :D It's just I don't know Python at all, and I thought maybe there would be something easy...

User avatar
kgschlosser
Site Admin
Posts: 5504
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: The EventGhost project is looking for translators!

Post by kgschlosser » Mon Aug 26, 2019 9:59 pm

not really. You do know about the translation gui right? the one built into EG?


if you run eventghost from the command line or create a shortcut to it and add the -translate switch to it. this is going to taunch a GUI for making the translations.. This may be easier for ya if you didn't know about it.

You do not need to know a thing about python to be able to use this. and it also allows for making translations for the plugins as well.
If you like the work I have been doing then feel free to Image

maopequena
Posts: 5
Joined: Sun Aug 25, 2019 1:23 am

Re: The EventGhost project is looking for translators!

Post by maopequena » Wed Aug 28, 2019 12:42 am

Yes, that's what I'm using. Thanks!

Can I make a suggestion for the Language Editor? It would be nice to have a command for automatically copying the source (i.e. the English original) into the target (the language we're translating to), even better if you could copy all untranslated segments at once. You could even provide a hotkey to it (say Ctrl+Ins, for instance).
As is, we have to manually hit Ctrl+C and Ctrl+V in almost every segment, specially the big ones, and that takes a lot of time...

Post Reply