Open fishcu opened 6 years ago
I have also found some errors in the original English strings, what would be the best way to correct them?
Hi!
Thanks for the German translation, this is so cool! I just added it to GRP.
Regarding errors in the original English strings, please fix them directly into the python code and submit PR, I will take care of the PO files later. I have made a small python script that uses gettext to update those PO files and help find out new/missing/extra translations string. I will push that as well with some instructions on how to use it.
Thanks! I tested it and there are some small things I would like to correct -- Some translations depend on context that's much easier to see when the application is actually running.
From what I understood, you will make it easier to help you with added / changed translations?
Yes, so I just pushed the python script I use to help keeping the translation files updated:
So way to use it is as follow:
cd translations/
python check.py
It is necessary to have installed the xgettext utility first. xgettext will check the python files for strings that are passed to the _() function (like _("hello world")
and list all those sentence into a en.po file. Then the python script checks the content of the en.po file against the fr.po and de.po to output all missing/extra translations.
Later I will modify it so that it's possible to display only one language, something like python check.py de
Apparently, gettext is a pretty common suit of tool in the open source world. I only re-used one part of it and scripted the rest myself because I was annoyed at xgettext updating the line numbers in PO files at every change, which was detected by git as a source code change. Plus, I like to have all the sentences grouped by thematic inside the PO files. Their must be a way to avoid this issue with gettext, but I could not find it :(
Don't rush to complete the German translation of the newly added live_analysis.py file, I am still not sure of the final form of this part.
Hi, I have updated check.py so that it can be used with a language parameter.
So in my case, when running python check.py fr I get:
================================================================
================================================================
================================================================
Loading translation file: en.po
Selection of lang= fr
============= Checking language=fr =============
Loading translation file: fr.po
==== English sentences missing in fr.po ====
msgid "Score estimation"
msgstr ""
msgid "Black win"
msgstr ""
msgid "White win"
msgstr ""
msgid "Move %i (%s), estimated score: "
msgstr ""
msgid "Black to play, in the game, white played %s"
msgstr ""
msgid "Black player"
msgstr ""
msgid "Bot used for analysis"
msgstr ""
msgid "Human"
msgstr ""
msgid "White player"
msgstr ""
msgid "Board size"
msgstr ""
msgid "Komi"
msgstr ""
msgid "Handicap stones"
msgstr ""
msgid "SGF file name"
msgstr ""
msgid "No overlap thinking time"
msgstr ""
msgid "Game"
msgstr ""
msgid "Currently at move %i"
msgstr ""
msgid "Pass"
msgstr ""
msgid "Pause"
msgstr ""
msgid "Analysis"
msgstr ""
msgid "Analysis by %s"
msgstr ""
msgid "Analysis status:"
msgstr ""
msgid "Ready to start"
msgstr ""
msgid "Waiting for next move"
msgstr ""
msgid "Place %i handicap stones on the board"
msgstr ""
msgid "Now closing, please wait"
msgstr ""
msgid "Resume"
msgstr ""
msgid "The game is now starting"
msgstr ""
msgid "Run a live analysis"
msgstr ""
msgid "The config.ini file does not contain %s entry for %s !"
msgstr ""
msgid "The config.ini file %s entry for %s is empty!"
msgstr ""
msgid "Reviewed SGF file"
msgstr ""
msgid "PNG image"
msgstr ""
==== Extra sentences in fr.po ====
SGF file reviewed
The config.ini file does not contain entry for %s command line!
The config.ini file does not contain command line for %s!
Black to play, in the game, black played %s
The first part ==== English sentences missing in fr.po ==== indicates English strings (ie _("Black to play")
) that have no equivalent into fr.po (yes, I am late on the french traduction)
The second part ==== Extra sentences in fr.po ==== are sentences in the fr.po file that have no English equivalent in the code. This happens when the English sentence in the code has been modified, there should be an equivalent sentence in the first part that need to be updated.
It looks cool. Will try to provide an updated German translation soon.
Hi, If it's ok for you, I can grant you write access to that de.po file (or the complete source code) if it's more convenient for you. I won't be able to review the German translation anyway :)
Dear @fishcu ,
I made a big cleaning of the translation files for French/German/Korean because admittedly it was quite messy (some translations were not in used anymore...) and I also made a visual guide to help other add support for new languages: https://github.com/pnprog/goreviewpartner/blob/master/translations/translation_help.pdf
So now, the .po files have all sentences properly grouped, and labelled with a number. Example for the de.po file:
############ Main panel
#1.1
msgid "This is GoReviewPartner"
msgstr "Das ist Go Review Partner"
#1.2
msgid "Run a SGF file analysis"
msgstr "Eine SGF-Datei analysieren"
#1.3
msgid "Run a live analysis"
#translation missing:
msgstr ""
#1.4
msgid "Open a RSGF file for review"
msgstr "Eine RSGF-Datei öffnen"
The number refers to the pdf file that contains screenshots of (almost all) English sentences to give some context for the translation. for Example 1.4 refers to page 1, label 4:
So this way, it is easy to see where and for what purpose an English sentence is used. The de.po file also indicates if a sentence is missing, so they are easy to spot.
Starting from now, I will do my best to:
I really appreciate the work you did, I know preparing a translation is hard work (I know because I do the french one).
If this is ok with you, I would like to give you direct writing access to this GitHub project, so that you can directly fix/update the de.po file without having to make pull request. What do you think?
Also, my English is far from perfect, so if you notice mistakes in the English sentences, please let me know :)
(similar issue: https://github.com/pnprog/goreviewpartner/issues/42)
Hey pnprog
Thanks a lot for the continued support! I have been quiet for a while as I have been busy with another personal project that will likely still last for a couple of weeks.
I should have the capacity to maintain the German translation in the future, though. Feel free to give me permissions.
I will update the translation ASAP.
Cheers fishcu
Hi!
I just sent you an invitation :)
So basically:
Thanks. Not having to do a pull request and just being able to push a new version lowers the barrier quite a bit!
Thanks for maintaining the PDF, it's a great help!
Just to make sure: When adding translations, should I remove the #translation missing:
string?
Some comments on the original strings. In the case of typos, I directly write my proposed version.
1.8: "The file %s has been converted to %s". I also added quotation marks around the %s in the German translation.
2.10: What's the meaning of this string? The value of Komi can be changed. I would maybe change this to just "Value of komi" or "Komi".
2.16: it should be "e.g." (exempli gratia), not "i.e." (id est), since you're giving an example rather than clarifying the previous statement. The German "z.B." translates as "for example".
3.3: I would say "could not open the URL".
3.4: Maybe "not a valid SGF file"?
4.2: "Remaining time: %ih, %im, %is"
5.13 & 5.14: ctrl-q commonly means "quit the application" and ctrl-w commonly means "close the current window". I strongly suggest changing these shortcuts, for example to ctrl-s (commonly used as "save") and ctrl-shift-s (to save the right image). Maybe add "save left/right goban" to clarify.
6.12: would maybe clarify as "Let the bot take both sides and play against itself"
7.13: would re-arrange as "win rate of white's move: %s; win rate of computer move: %s"
7.14 & 7.15: I would put "%" there instead of "pp". Maybe you have to escape the character with a backslash ()? I put a backslash in the German translation.
7.17 & 71.8: I propose "Win for black/white".
7.19: Same issue as 5.13.
8.6: "Only keep variations where"
8.9: I translated this as "natural stone placement", as there is no straightforward translation otherwise. Maybe add "placement" to emphasize?
8.10: What is the meaning of this setting? Is it how deep the game variation is displayed on the left side?
8.11: Again, not sure what the meaning of this parameter is. I translated it as "Ratio of goban to screen size"
8.18: Maybe "Win rate > 50% in blue"?
8.20: Maybe "Win rates" or "Percentages"?
9.7: Is the meaning along the lines of "Features available in %s"?
9.14 (among others) I generally put quotation marks around filenames.
10.2: Would add a period: "White to play. In the game, ..."
10.20: Should I escape "%" as "%%" or as "\%"? Is the "%%" a typo?
10.25: To be consistent with 9.2, the two should be identical.
11.4: I think the term would be "No pondering" -- is that correct?
11.9: "Human player"?
11.10 & 11.11: I would add punctuation, it feels more "polite": "Please place %i handicap stones on the board." "The game is now starting!"
12.6: I would just write "status" -- "analysis" is given by context.
in "error messages": "%s did not reply as expected..." (twice), "did not identify itself..."
I would also change a few things in the good-bye message: "GoReviewPartner is closing Hope you enjoyed the experience!
List of contributors pnprog Boris NA Wonsik Kim chermes Adam Bender Brandon Sloane Isaac Deutsch Michael Kelley
You are welcome to support GoReviewPartner (bug repports, code fixes, translations, ideas...). If you are interested, get in touch through Github, Reddit, or Lifein19x19!"
It seems like you added quite a few features :) will try them out soon. Thank you very much!
@fishcu , thanks a lot for updating the translation!
Just to make sure: When adding translations, should I remove the #translation missing: string?
Yes, you can delete those, I will add them to help you find out quickly what is missing.
So basically, when running python2 check.py de
the result is now:
========================
language: de:
total: 209
missing: 0
empty: 0
extra: 6
missing means I did not do my homework, there are some English sentences in the source code that are not in de.po. Most probably there are not in the other po files, neither labelled in the pdf. Currently at 0, so good for me.
empty means I added the new english strings into that de.po file and (hopefully) other po file, and I should have labelled it properly in the pdf file (that when I add #translation missing) and it is waiting for you to add a translation. Currently at 0, so good for you.
extra are old english strings that are not used anymore, and should or could be deleted. There is no harm in letting those strings inside, it could be useful again in the future for other translators, or for other projects?
OMG my English is terrible :)
2.10: What's the meaning of this string? The value of Komi can be changed. I would maybe change this to just "Value of komi" or "Komi".
Some SGF record give komi=750 when komi=7.5 for instance. Some SGF record don't provide the komi value (so it becomes komi=0) so it is really meant for the user to double check the komi value that was extracted from the SGF and fix it if necessary.
7.14 & 7.15: I would put "%" there instead of "pp". Maybe you have to escape the character with a backslash ()? I put a backslash in the German translation.
In fact, pp stands for percentage point and it's not really equivalent to % here, because those delta are subtraction of two % values. Maybe I am a bit pedantic for this :) I think wikipedia phrases it very clearly:
For example, moving up from 40% to 44% is a 4 percentage point increase, but is an actual 10 percent increase in what is being measured.
8.9: I translated this as "natural stone placement", as there is no straightforward translation otherwise. Maybe add "placement" to emphasize?
Good point. Funny, my french translation also means natural stone placement. I don't remember where I saw that "fuzzy" term, maybe an article on Sensei Library.
8.10: What is the meaning of this setting? Is it how deep the game variation is displayed on the left side?
Yes!
8.11: Again, not sure what the meaning of this parameter is. I translated it as "Ratio of goban to screen size"
Your translation is good. With the changes of the graphical interface that are underway, this parameter is becoming less and less relevant. I am considering saving the size of those goban every time the user resizes them, so next time the user open GRP, they are at the same size.
9.7: Is the meaning along the lines of "Features available in %s"?
In fact, it indicates where the bot will be available and under what profile. I will use the last one as an example (When opening a position for manual play): This tells GRP what bot to get ready when clicking on "Open positions" (from review or live).
On my computer I have all bots configured for both profiles (for testing purpose), if "both profiles" are available "when opening a position for manual play", then GRP will launch 5bots x 2profils every time I open a new position. So it consumes all my RAM and freezes my computer for the next 100seconds... So I use this to tell exactly what bot to get ready in open position (in my case, Leela-fast and gnugo-fast are enough).
It also tells GRP how to populate the selection menu to avoid having very long menus like this: Maybe in 1 year, there will be support for more strong bots (ELF, minigo, pachi... Alphago?) then the selection menu will grow too long. So this will help de-clutter the interface.
10.20: Should I escape "%" as "%%" or as "%"? Is the "%%" a typo?
Not a typo. I don't quite understand the meaning of RAVE, but from Leela's author:
(R: x% y) means y RAVE traversals with an average winrate of x%. RAVE (Rapid Action Value Estimation) is an older Go programming technique. Leela doesn't actually use it any more in 19x19. It may disappear from the output eventually.
So the formatting should be ok (RAVE(x%% : y) for this variation: %s). It's only used in size others that 19x19
11.4: I think the term would be "No pondering" -- is that correct?
Not exactly: When a bot is selected as black or white, that is not the same as the bot used for live analysis then that option appears, that indicates to GRP to make sure the bots are no thinking at the same time, so that your computer processing power (CPU, GPU, RAM) does not becomes a shared resource.
For instance, GRP will wait for the analyzer to complete the analysis for one move before asking black bot for next move, and vice versa. While black is thinking for its next move, then the analyzer is kept on standby by GRP. Then, black plays, and it's your turn to play as white. If you are taking your time to play, then GRP will let the analyzer go ahead an analyze one move. When you finally play as white, if the analyzer still hasn't completed that move, then GRP keeps black bot on standby until the analyzer is done. (if the bots use pondering, then this becomes ineffective)
I agree for other comments, I will see to make the modifications in the coming days. Thanks a lot!
Thank you for the explanations! I will make some changes accordingly.
About the "pp": today I learned something. ;) It's a sharp observation and I 100% agree with you. I will change the German translation again to "pp" instead.
About the "%%" in the "RAVE" string: I still don't see why double % is needed. I know about the RAVE algorithm and "%" would make more sense AFAICT.
Cheers!
In fact, it indicates where the bot will be available and under what profile. I will use the last one as an example (When opening a position for manual play): This tells GRP what bot to get ready when clicking on "Open positions" (from review or live).
I have now translated this string as "make %s available for". For 9.18, I translated it as "not available" instead of "none".
Not exactly: When a bot is selected as black or white, that is not the same as the bot used for live analysis then that option appears, that indicates to GRP to make sure the bots are no thinking at the same time, so that your computer processing power (CPU, GPU, RAM) does not becomes a shared resource.
I see. I have now translated it literally as "no concurrent calculation of analysis and game moves". I think the English string is missing something, I would put it as "No overlap of thinking time", or "No overlapping thinking time".
@fishcu
I just fixed all the English string, except for the keyboard shortcut (I will make a separate commit) and for this one:
10.25: To be consistent with 9.2, the two should be identical.
It's about the difference between command and command line
For me, command is just the name if executable, e.g. Leela.exe white command line also include all the parameters e.g. Leela.exe --gtp
I guess it's not that important anyway :)
Thanks for your help!
I have created a German translation. Please integrate it in the software.
If you can tell me any issues with my translation (some strings might be too long, etc.), I can make changes.
Cheers!
de.po.zip