05-21-2017, 05:40 AM | #136 | |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
Quote:
For the creation of the .POT and .PO files I used Poedit. And apparently I didn't configure it properly so the update isn't working as intended... I did it again it should work this time, I will push it to github. Actually you just have to click on update in the toolbar or you can use update from POT file when you are in the PO file. (to configure the source you need to go to catalogue -> properties -> sources paths and add the path to the .py files to translate, but I've done it) And the MO files are automatically created by Poedit so I think the translators can produce it easily enough. For future updates I can update the translations if you like (I will follow this thread but feel free to PM me here or on github). The easiest thing is probably to update the .po files so that translators just have to add the missing strings. Last edited by Nicolas F; 05-21-2017 at 06:29 AM. |
|
05-21-2017, 06:29 AM | #137 | ||
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
Quote:
|
||
Advert | |
|
05-21-2017, 06:34 AM | #138 | |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
Code:
ls *.py > salida xgettext -f salida rm salida if [ -f messages.po ] then mv messages.po translations/Trad.pot fi Last edited by Terisa de morgan; 05-21-2017 at 06:37 AM. |
|
05-21-2017, 07:18 AM | #139 | |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
Quote:
And if you think it's not necessary for the po files, I won't bother Last edited by Nicolas F; 05-21-2017 at 07:22 AM. |
|
05-21-2017, 08:36 AM | #140 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
My plan was to auto generate the .pot file with xgettext (similar to Teresa's suggestion), and then update any existing .po files with msgmerge. That way, translators would only need to open their .po file and verify that nothing new needs to be addressed. But you guys are the ones doing the work, so if you tell me the second step is unnecessary, I'll surely listen.
The source-code line-numbers in the .po files aren't necessarily critical to make things work, but if they can stay accurate with a little scripting (which will include the added bonus of not requiring translators to regenerate their .po file from the template each time), then that's what I'd probably prefer. I can also script the compilation of the .mo files, so there's no real need for translators to provide those. Last edited by DiapDealer; 05-21-2017 at 08:49 AM. |
Advert | |
|
05-22-2017, 04:01 AM | #141 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
05-22-2017, 04:35 AM | #142 |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
|
05-22-2017, 09:45 AM | #143 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I may set up the github repository to ignore .mo files in that case. They don't really need to be a part of the source. They can be generated when preparing a release of the plugin. Translators will still be able to test locally using the .mo files they generate if they like (and if they use github), but git just won't track them.
|
05-22-2017, 10:18 AM | #144 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
OK, I'm going to test the translation this evening at home and I hope to push it tonight or tomorrow morning.
|
05-22-2017, 10:41 AM | #145 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks. Nicolas made one small change that I need to pull in yet, but it shouldn't really matter. In fact, it might make a good opportunity for me to update the .pot ... merge the changes into the existing .po files and see if the workflow makes sense.
|
05-22-2017, 10:51 AM | #146 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Probably overkill. I really don't foresee the translatable strings changing all that much. But I like to be prepared.
|
05-22-2017, 10:57 AM | #147 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
05-23-2017, 10:16 AM | #148 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for the Spanish translation file, Teresa. Nicolas' latest update modified the template a tiny bit (mostly source-code line-numbers), but I was able to merge those changes into your .po file with msgmerge. I haven't pushed that change yet, but when I do ... that will explain why the .po file in the repo is slightly different than yours.
So from this point on ... I'll take responsibility for updating the template, merging any changes into the .po files, and then compiling the .mo files. I'm also going to delete any .mo files from the repo and tell git not to track that file-type. We should be good to go now. I'll let you know if there's ever new translatable strings, or if any existing ones need updated. New .po files can be generated from the template, and existing ones should be edited directly. Thanks again! Last edited by DiapDealer; 05-23-2017 at 10:27 AM. |
05-23-2017, 11:27 AM | #149 |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
Ah yes, I should have deleted those since you said you were going to script it...
But I don't think it will matter. Thanks for your work! |
05-23-2017, 11:44 AM | #150 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Yes, thank you for your work, @DiapDealer and @Nicolas F
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sample Plugin for the Editor | DiapDealer | Editor | 77 | 12-10-2014 07:16 AM |
Diaps Editing Toolbag.zip Index Error | phossler | Editor | 2 | 10-01-2014 08:05 PM |
Editor plugin question | DiapDealer | Development | 2 | 07-28-2014 10:23 PM |
japi - a text editor capable of editing ePub directly | hekkel | ePub | 5 | 02-20-2009 08:46 AM |