![]() |
|
ZP doesn't read my theme locale - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Translating (https://forum.zenphoto.org/forum-8.html) +--- Thread: ZP doesn't read my theme locale (/thread-3773.html) Pages:
1
2
|
ZP doesn't read my theme locale - DrSlony - 16-09-2008 Help, I created a Polish locale for my theme but I cannot get ZP to read it. My theme is called pp When I select the Polish language then ZP uses my Polish descriptions and other Polish image data I entered in the admin panel, and it uses some of the gettext() things found in the zp-core/blabla/zenphoto.mo file, but things that are not in that file are left as English in my gallery! I read the translation guide several times and checked my dir names and it all looks fine. Example of a string that does get translated: It gets it from the main polish translation zenphoto.mo Example of a string that doesn't: This one isnt in zenphoto.mo but it doesn't read my pp.mo What did I do wrong? ZP doesn't read my theme locale - acrylian - 16-09-2008 If I get it right you want a separate translation for your theme. This feature has been added after 1.2 so you need a current nightly or svn version for that. Btw, the same is possible with plugins ( ZP doesn't read my theme locale - DrSlony - 16-09-2008 I did read that whole tutorial several times before doing my site, as I wrote. "you need then to add setThemeDomain("pp") on top of each of your theme files" I didn't know that I needed a nightly build, I will try this tomorrow, thank you very much! ZP doesn't read my theme locale - acrylian - 16-09-2008 [i]you need then to add setThemeDomain("pp") on top of each of your theme files" ZP doesn't read my theme locale - DrSlony - 16-09-2008 Right, thanks! This needs to be added to that theme section in the tutorial! ZP doesn't read my theme locale - acrylian - 16-09-2008 It will, but it is a svn feature right now..:-) ZP doesn't read my theme locale - DrSlony - 18-09-2008 Works great! I do have one problem though. I use zenPaypal and I cannot get the following words to use my translated versions: I created a zenPaypal.po and mo file in: I also added to the beginning of zenPaypal.php in /zp-core/plugins/zenPaypal.php Note that those words are translated in two places: So even if the plugin didn't read its specific translation file, it should find them in the main zenphoto.po I also tried adding to my theme's image.php but that didnt help. What do I need to do to fix this? ZP doesn't read my theme locale - DrSlony - 18-09-2008 When my friend from the UK tries to view an image in my gallery, he gets this error: Nobody else whom I tried my gallery with gets it. This is the url I sent him: ps. I use the nightly build from 2008-09-17 and my zp-core/locale/ dir has only these two: ZP doesn't read my theme locale - acrylian - 18-09-2008 First, actually the zenpaypal translation is included within the Zenphoto's main translation files since it's an official plugin. Regarding en_GB. First I discovered that we have the none existing en_UK in our list. but that should actually not do any harm since no separate language files are for that. I am not sure but that the error you reported should actually been fixed. You did actually everything correctly. I have no real idea now. I visited your site, could you please install the German language, so that I can check if I get any German translations for that? (I assume the dynamic locale plugin is enabled). PS: I visited your site, you should check the size of the div in the middle, I get an ugly scrollbar in Safari 3. ZP doesn't read my theme locale - jlang - 18-09-2008 Re en_GB - I expect you're seeing the same issue I reported in ticket #763 which was speedily rectified by sbillard for last night's nightly. (My personal issue is now why I was using en_GB at all, given that my server is in the US. Patriotism and curiosity now dictate that I find out how to get on to en_IE!) ZP doesn't read my theme locale - jlang - 18-09-2008 Solved my curiosity - it's a browser thing. I'm using the British version of Firefox and have no desire to create issues for myself by changing that. ZP doesn't read my theme locale - DrSlony - 18-09-2008 I just updated zenPhoto to the latest nightly build, 2008-09-17 Acrylian: "PS: I visited your site, you should check the size of the div in the middle, I get an ugly scrollbar in Safari 3." "First, actually the zenpaypal translation is included within the Zenphoto's main translation files since it's an official plugin. The items you mentioned are gettexted in around line 38 and should work." Hmm, so those translations are in two places: I deleted "" from zenPhoto.php (reason below). If I add "" to my image.php then the following get translated: If I delete "" from image.php then the following get translated: I obviously need my theme to use several translation files at the same time - pp.po with my own theme polish text translations, the main zenphoto.po with general polish translations, and zenPaypal.po with zenPaypal's "media canvas gloss etc" translations. How do I get my theme to use them at the same time? Note that I deleted "" because it didn't add any new translations, and in fact without it the word "Media" got translated, with it it didn't. Screenshots: "could you please install the German language, so that I can check if I get any German translations for that?" jlang: how do I find ticket 763? I tried adding 763 to ?id= but that didnt point me to the right ticket. ZP doesn't read my theme locale - jlang - 18-09-2008 I don't think there's any information of value for you on this particular ticket, but the ticket is an entry on the Trac issue tracker for Zenphoto: This is seperate from the support forum software. ZP doesn't read my theme locale - acrylian - 18-09-2008 [i] deleted "" from zenPhoto.php (reason below).[/i] May I ask how you generated the po file for your theme. Just to be sure, you need to set up Poedit to only parse the folder of your theme. Sorry, I never used this plugin myself, but maybe I have an idea: You probably added you custom price list in the text field in the options, right? These will not be gettexted because they have already been printed. Gettext translations happens before printing. This way they are printed directly as they are stored in the db. To be gettexted you need to change the array directly in the zenPayPal.php plugin file. We probably need to turn the field into a multilanguage field. ZP doesn't read my theme locale - DrSlony - 18-09-2008 Argh! it was supposed to be setPluginDomain("zenPaypal");... all those zen's mixed me up, typo. You are right, this is my zenPaypal pricelist: The pp.po file for my theme was made using only my theme files: The zenphoto.po file I made using the latest nightly build, I downloaded the outdated incomplete polish translation, i set it to use the zp-core dir and I ran 'update from sources'. Then I made sure that words like "size", "Size", "Stock", "Price List" etc. are all translated. But the problem with my translation still exists: ZP doesn't read my theme locale - acrylian - 18-09-2008 So again: The question is did you modify your pricelist in the plugin file zenpaypal.php itself or within the options? Because whatever you enter in those admin fields will not be translated. It does currently only work if the list is gettext in the plugin itself before being printed in the field. I hope that does help for now. ZP doesn't read my theme locale - DrSlony - 18-09-2008 acrylian the price list is not the point, the "canvas" "matte" "gloss" issue is resolved, I understand that it shows whatever I entered in the admin panel. If you look again at my gallery (image.php) I changed it a bit so its displayed in both languages at once. I wrote that still things like "size" "stock" "price list" etc are not translated. See this screenshot: http://bayimg.com/image/lakpfaabi.jpg Because that didn't work, I ALSO made a zenPaypal.po file where I again translated those things and I tried adding so zenPaypal.php but that didn't help. ZP doesn't read my theme locale - sbillard - 18-09-2008 Tonight's build will enable multi-lingual price lists for the zenPaypal options. ZP doesn't read my theme locale - DrSlony - 18-09-2008 Thank you. How do I get that image.php to use two po files? ZP doesn't read my theme locale - sbillard - 18-09-2008 The items in the price list are taken from the zenPaypal price list option. You will need to provide the translations when you set the option. |