Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2014, 07:00 AM   #31
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,554
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by kovidgoyal View Post
I have created a separate project for calibre plugins translation.
Do you know if there is a way, as a plugin author, to download all non-empty translations for a given plugin (other than one by one from the resources->plugin name page)?
Jellby is offline   Reply With Quote
Old 08-23-2014, 07:02 AM   #32
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,397
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
transifex has a command line client that might be able to do it. It will probably download all .po file and then you can use msgfmt --statistics to filter out those without translations.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-23-2014, 09:45 AM   #33
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by kovidgoyal View Post
transifex has a command line client that might be able to do it. It will probably download all .po file and then you can use msgfmt --statistics to filter out those without translations.
I've been using their 'tx' command tool to semi-automatically pull translations for my plugins. First I setup a .tx/config file in the plugin source directory I run my script from:

Code:
[main]
host = https://www.transifex.com

[calibre-plugins.fanfictiondownloader]
file_filter = translations/<lang>.po
source_lang = en
type = PO
Then I have a dos/windows batch file I run:

Code:
set PYTHONIOENCODING=UTF-8
c:\Python27\tx.exe pull --minimum-perc=90 -f -a

cd translations
for %%f in (*.po) do (
    "C:\Program Files (x86)\Calibre2\calibre-debug.exe" -c "from calibre.translations.msgfmt import main; main()" %%~nf
)

cd ..
That specifies only languages that are 90% or more complete and uses calibre to convert them to .mo files. I have different config files and translation directories for each plugin.

Since I also setup Transifix to automatically update from the .pot files in my source repositories, that's all I need to do, aside from check for new translations periodically.
JimmXinu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thesis survey for authors, graphical designers, translators and editors Yves Gorat Writers' Corner 2 02-16-2013 07:22 AM
PRS-T1 Using a reader in co-operative text processing (editors, translators, academics?) Janie Jones Sony Reader 7 01-12-2012 02:48 PM
Call for translators kovidgoyal Calibre 104 11-13-2011 06:39 AM
Active german translators? Manichean Calibre 7 04-21-2011 07:34 AM
Translators Wanted eBookLuke Writer2ePub 5 01-26-2011 08:57 AM


All times are GMT -4. The time now is 02:31 AM.


MobileRead.com is a privately owned, operated and funded community.