andy-z / ged2doc

Tools for converting GEDCOM data into document formats.
MIT License
6 stars 2 forks source link

Czech Translation #20

Closed Mejstro closed 6 years ago

Mejstro commented 6 years ago

Hello, I would like to translate the html output to the czech language. Would it be possible? Thanks a lot for your answer. Jan

andy-z commented 6 years ago

Hi Jan, I cannot do that translation myself but I'd be happy to accept pull request for Czech translation. If you want to help with translation we can certainly work together on that. How comfortable are you with some Python development and Github? I could provide simple instructions for how to fork and build the project and add new translation files to it. If you have little experience with that I can just point you to a file that needs to be translated into Czech and I could integrate the result into the project if you can translate just that one file.

Mejstro commented 6 years ago

Hi Andy Thanks a lot for your quick response. To tell the true, I am not developper, so my knowledge of python and Github is very poor (but I can learn something new, if you provide me some instruction :) ) But I understand, the translation of strings in the text file could be quicker... In any case, I would be very glad to help you with the translation...

andy-z commented 6 years ago

OK, if you can do just a translation of few phrases it could still work, I'll take care of integrating translation into the project. Start with this file: https://raw.githubusercontent.com/andy-z/ged2doc/master/ged2doc/data.in/lang/en/ged2doc.po

If a translation is gender-dependent then you have an option to provide different translation based on person sex by appending #F or #M to msgid string, here for example

msgid "CHILD.BORN {child}"
msgstr "Родился {child}"

msgid "CHILD.BORN {child}#F"
msgstr "Родилась дочь {child}"

msgid "CHILD.BORN {child}#M"
msgstr "Родился сын {child}"

First option is used for child of unknown sex, second option is used for daughter and third option is for son.

When you are happy with translation you can send me an email with translation file, we'll work then on testing it on some GEDCOM files (my email is in AUTHORS.rst file)

There are also Polish and Russian translations you may want to consult: https://github.com/andy-z/ged2doc/blob/master/ged2doc/data.in/lang/pl/ged2doc.po https://github.com/andy-z/ged2doc/blob/master/ged2doc/data.in/lang/ru/ged2doc.po

Mejstro commented 6 years ago

Hello Andy, I have translated all the strings into czech langugage.. Except the strings like MONTH_FRE. and MONTH_HEBR. I realy do not know what does it mean (I suppose some "other callendar months name", but I am not sure...) I enclose the text file into ZIP file. Please feel free to send me any comment and I can make requasted changes anytime...

http://mejstrik.eu/temp/ged2doc.zip

Thanks a lot and have a nice day Jan

andy-z commented 6 years ago

Thanks @Mejstro, I'll look at it later this week, likely over weekend (busy week here).

andy-z commented 6 years ago

Hi @Mejstro,

as for MONTH_FRE. and MONTH_HEBR. - these are the names of the months in French Revolutionary calendar and Hebrew calendar (GEDCOM supports these two calendars). I did a quick search on Czech wikipedia and I think that French months should be OK as they are and Hebrew months are also probably OK. Besides I'm not sure anyone is going to use those calendars, but we can fix them later if someone gives better/exact translation for those.

I have committed your translation to tickets-20-czech-tr branch and I'd like you to test it before making new ged2doc release. Do you know how to install ged2doc from that branch or do you prefer me to build a Windows executable for you from that branch instead?

Mejstro commented 6 years ago

Hi Andy, Thanks for your answer...If you dont mind, I would prefer windows binary installation... Thanks a lot Jan

Dne so 2. 6. 2018 8:00 uživatel Andy notifications@github.com napsal:

Hi @Mejstro https://github.com/Mejstro,

as for MONTH_FRE. and MONTH_HEBR. - these are the names of the months in French Revolutionary calendar and Hebrew calendar (GEDCOM supports these two calendars). I did a quick search on Czech wikipedia and I think that French months should be OK as they are and Hebrew months are also probably OK. Besides I'm not sure anyone is going to use those calendars, but we can fix them later if someone gives better/exact translation for those.

I have committed your translation to tickets-20-czech-tr branch and I'd like you to test it before making new ged2doc release. Do you know how to install ged2doc from that branch or do you prefer me to build a Windows executable for you from that branch instead?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andy-z/ged2doc/issues/20#issuecomment-394061515, or mute the thread https://github.com/notifications/unsubscribe-auth/AHRLReFsixN6rvYzvaNu6yw6D6o3Preuks5t4infgaJpZM4URl2J .

andy-z commented 6 years ago

OK, here is a setup file which includes new translation, it should install as a separate application (ged2doc-test-cz) which you can remove later: ged2doc-test-cz-setup-pre-0.1.15.zip

Try torun it with option -l cz option and see if you like the output. IF it looks OK I can build new release soon.

Mejstro commented 6 years ago

Hi Andy I have tested the new version with czech translation and found some characters issue. I enclose image with description. Jan czech_characters_issue

Mejstro commented 6 years ago

I enclose another image with not translated string "spouse"

not_translated

andy-z commented 6 years ago

@Mejstro, there were issues with the encoding of the .po file that you sent me, I was expecting UTF-8 but apparently it was in Windows encoding (I did not expect in modern era people doing non-UTF, sorry). Anyways, I tried to convert it to UTF-8 and I have rebuilt it once again, please reinstall new version (attached) and give it another try: ged2doc-test-cz-setup-pre-0.1.15-1.zip

Mejstro commented 6 years ago

Thanks a lot for your quick response Andy, After short testing everything seems to be working without any issue (HTML as well as ODT output) I have just repaired one small mistake and send you new language file (hope that correctly in UTF) http://mejstrik.eu/temp/ged2doc.zip

If you want to make the change by yourself, I have replaced:

msgid "Male Name Frequency" msgstr "Výskyt mužských jmeny"

with

msgid "Male Name Frequency" msgstr "Výskyt mužských jmen"

so 2. 6. 2018 v 18:18 odesílatel Andy notifications@github.com napsal:

@Mejstro https://github.com/Mejstro, there were issues with the encoding of the .po file that you sent me, I was expecting UTF-8 but apparently it was in Windows encoding (I did not expect in modern era people doing non-UTF, sorry). Anyways, I tried to convert it to UTF-8 and I have rebuilt it once again, please reinstall new version (attached) and give it another try: ged2doc-test-cz-setup-pre-0.1.15-1.zip https://github.com/andy-z/ged2doc/files/2065149/ged2doc-test-cz-setup-pre-0.1.15-1.zip

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andy-z/ged2doc/issues/20#issuecomment-394098408, or mute the thread https://github.com/notifications/unsubscribe-auth/AHRLRbsBtr1vSME0riQJrJ_aUQhQKKUeks5t4rndgaJpZM4URl2J .

Mejstro commented 6 years ago

Hi Andy Just a brief information (I am not sure, if it is a bug) If I see the content (people lis), the alphabetical sorting is not corresponding with the Czech Alphabet. All the charracters with the "hook" (Č, Š...) are located at the end of content, but should be next the charracter without "hook" (A, B, C, Č, ....

andy-z commented 6 years ago

@Mejstro, here is another attempt. I have added your update for "Male Name Frequency" and also tried to make name ordering to be locale-aware (for those fancy characters in your alphabet). Please try new version: ged2doc-test-cz-setup-pre-0.1.15-2.zip

By default in this new version ordering is based on system-wide locale settings. If your system settings do not correspond to your preferred language you can now change locale from command line using for example option --locale=Czech. The name of locale is system-dependent, I think Czech should work on Windows (it's called differently on Linux). I'm not big Windows expert, so there is no guarantee that it's going to work. If you still see ordering problem let me know and maybe send me a log file - add option --log=ged2doc.log and then attach ged2doc.log file here.

Mejstro commented 6 years ago

Hello Andy, Name Ordering (html and odt output) is now correct (tested with both --locale switch and without it). Unfortunately the "Male Name Frequency" Czech string has not been repaired. I can still see incorrect string (Výskyt mužských jmeny) - should be (Výskyt mužských jmen) Thanks a lot Jan

andy-z commented 6 years ago

@Mejstro, thanks for noticing "Male Name Frequency" issue, I forgot to recompile language files. I have done that now and made a new release with all these updates: https://github.com/andy-z/ged2doc/releases/tag/v0.1.15 Please test and complain 😺

Thanks a lot for you help with improving ged2doc!

Mejstro commented 6 years ago

Thanks a lot Andy...! Everything seems to be working fine now...There is no complain any more :) If I could help in the future, I am available.... Best regards Jan

andy-z commented 6 years ago

As there are no more complains I'm going to close the issue.