Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2015, 08:46 AM   #1
hapla
Junior Member
hapla began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2015
Device: Kobo Touch
Problem loading po file

Hi,

I'm planning the contribute to Finnish translation of Calibre, but I'm having problems testing the existing translation. I tried following the instructions from http://calibre-ebook.com/get-involved#translationsfaq, but I don't get the translation loaded.

I downloaded the .po file from Transifex. I tried using both for_use_calibre_main_fi.po and for_translation_calibre_main_fi.po (I renamed the file fi.po). I started Calibre from the directory where the fi.po file is, but the UI language does not change and Finnish is not added into list of languages in Preferences. I tried in Linux and in OS X with Calibre 2.38.

So, am I doing something wrong or are the instructions are out of date?

best regards,
- hannu
hapla is offline   Reply With Quote
Advert
Old 09-13-2015, 09:04 AM   #2
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: 31,874
Karma: 8697816
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cannot test translations for a language that is unknown to calibre. You'd need to wait till the first release of calibre with the language and then the testing via fi.po will work.

What you can do is use a hack. Name the file de.po and use

CALIBRE_OVERRIDE_LANG=de calibre

You might need to edit the header int he po file to change it to german as well, though I dont think that should be neccesasry.
kovidgoyal is offline   Reply With Quote
Old 09-13-2015, 09:21 AM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,223
Karma: 83049275
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Alternatively build the translations from source. Only supported on linux, and it isn't exactly the easiest (waiting).
(Easier if you planned to run from source anyway.)

http://manual.calibre-ebook.com/develop.html

Checkout your source code, then run python2 setup.py bootstrap, add your translation to the translations dir that appears, and rerun to create (among others) the all-new locales.zip

Alternatively, copy locales.zip from the installation location, unzip it, add your compiled (msgfmt) translation file, and store it in $CALIBRE_CONFIG_DIRECTORY (somewhere in ~/Library/ I think? or ~/XDG_CONFIG_HOME/calibre) in the resources/localization folder. You will need to create those folders, most probably.

Last edited by eschwartz; 09-13-2015 at 12:54 PM. Reason: localizations --> locales
eschwartz is offline   Reply With Quote
Old 09-13-2015, 09:29 AM   #4
hapla
Junior Member
hapla began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2015
Device: Kobo Touch
The renaming hack works for me in both Linux and OS X. Thanks, I'll go with this.
hapla is offline   Reply With Quote
Old 09-13-2015, 12:55 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,223
Karma: 83049275
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Alternatively, Kovid added a new environment variable for specifying the location of a .po file. This will be in next week's release.

https://github.com/kovidgoyal/calibr...d6e6112e9e78da
eschwartz is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading external file via Ajax. BenTrafford Development 1 04-27-2015 11:50 PM
K4 Loading a png file dragon123 Kindle Developer's Corner 1 12-06-2013 01:22 PM
Books loading into document file Mumgod Kindle Fire 14 02-07-2012 06:37 AM
iPad 60MB PDF file is loading nothing but white pages Philippe Lemay Apple Devices 5 09-03-2010 04:07 AM
Large sony file not loading markiehill Sony Reader 3 10-10-2008 01:10 PM


All times are GMT -4. The time now is 07:31 PM.


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