translate <title>Gallery2 Order Status</title>
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
How to translate title, of checkout module? I searched the po file and lines 39, 369, 703, 886, are translated. If it's hard coded what file should I change. I looked at OrderStatus.tpl and StatusInfo.tpl can't seem to find it. |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Into which language do you want to translate it? |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
alecmyers wrote:
Into which language do you want to translate it? into lithuanian |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Take the checkout.po file, and translate it into lithuanian (instructions here: http://codex.gallery2.org/Gallery2:Localization) When you have the li.po file ready, attach it to this thread and I'll do the rest. |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
It's already translated |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
You have to translate all the blank strings too, or they'll just come out in English: Example: Quote:
msgid "Currency formatting string" The reason they're not translated in the file you picked is because the British English is the same as the American English. Also don't convert to text, zip your file and post the zipped version. Otherwise it all comes out like this: Quote:
#, c-format Oh, and please make sure your text editor is set to use UTF-8 encoding. |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
here is zipped file |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
That's still not going to work - it's still full of blanks: Quote:
msgid "[checkout] Purchase album" Everything needs to be translated! |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
But I don't need the admin interface to be translated. I want to use it in english instead. I have attached a file for the checkout process. Keep in mind those words are translated in the po file i attached above, why in one step they show ok, and in the next step translation is not working. The last 2,3,4 steps are not showing the translated words at all. |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Quote:
But I don't need the admin interface to be translated. I want to use it in english instead. I'm not suggesting it's what you want; I'm asking you for a Lithuanian translation of the whole module, for the benefit of the user community. If you translate the whole file I will include it with the module otherwise, for your own custom part-translation this is what you have to do: after you have the po file, you must compile it to a .mo file, rename it to modules_checkout.mo then place it in the g2data/lt/LC_MESSAGES/ directory. Obviously you also have to do the same for checkoutpaypal, checkoutemail and any other modules you want to use. |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
Well it seems there is slight misunderstanding. Let me clear thing out. I have translated the checkout, checkoutemail modules, front-end only. My problem is that on checkout step1 translations works, on other steps as you see from attached image does not. My question is how can I fix it if the words a translated why aren't they being shown? |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Probably a caching issue then. Clear the template cache, restart apache if you can, etc. Other than that I don't know. |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
Well I cleared my template and database cache and still for first checkout step everything is ok, translated, for second, third and order status, the words are not translated but they must be. I installed Deutsch as it has checkout translated, It seems that the word "checkout" is not translated there. I changed it to "Test" and it appeared like in my case only for 1st checkout step. So can you perhaps take a look at template files or whatever reads the translation, it seems like {g->text text=""} Is missing. I tried looking myself but could not find how the title is read from translated mo file. |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Try changing modules/checkout/OrderStatus.inc line 131 onwards so it reads as follows: list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'checkout'); if ($ret) { return array($ret, null); } $template->title($tpl['busname'] . ' ' . $module->translate('Order Status')); Let me know if that works. |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
I changed the code line: (please post line code because it seems dreamweaver shows 1 line less than you specify) Quote:
$template->title($tpl['busname'] . ' ' . $gallery->i18n('Order Status')); to the one that you gave me and now it works (last step order status in now translated). |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
I'll update the relevant places in the code and upload it to the repository. Thanks for pointing out the problem; I'll repost when you can download the new version (it will be several hours). |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
How do I perform the update, what files to update and where to get them? |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
I've updated the files; you should be able to get them from the repository (it can take up to 6 hours for the update to work). You are looking for file revisions 1917 (checkout) and 1918 (checkoutemail). Please update, test, and let me know if it works. |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
You mean I should click update in my gallery2 admin interface? |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
site admin -> plugins -> get more plugins -> update plugin list then checkout -> upgrade (to revision 1917) |
|
smilem
Joined: 2009-02-25
Posts: 118 |
![]() |
Is this normal: Failed to download the following packages for the Checkout plugin: * modules/checkout-lang-lt-1712-.package Also it seems there are updates for other plugins, should I install gallery2 v2.3.1 and then check for update again, or how to do this the right way? |
|
alecmyers
Joined: 2006-08-01
Posts: 4342 |
![]() |
Quote:
Checkout plugin updated. That sounds helpful. Re: 2.3.1 - it's up to you to choose when to upgrade. |
|