translate <title>Gallery2 Order Status</title>

smilem

Joined: 2009-02-25
Posts: 118
Posted: Wed, 2010-01-27 14:02

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
Posted: Thu, 2010-01-28 13:56

Into which language do you want to translate it?

 
smilem

Joined: 2009-02-25
Posts: 118
Posted: Thu, 2010-01-28 15:53
alecmyers wrote:
Into which language do you want to translate it?

into lithuanian

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-01-28 16:47

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
Posted: Thu, 2010-01-28 18:21

It's already translated

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-01-28 18:37

You have to translate all the blank strings too, or they'll just come out in English:

Example:

Quote:
msgid "Currency formatting string"
msgstr ""

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
msgid "Order No. %d Confirmed"
msgstr "Užsakymo Nr. %d Gautas"

#, c-format
msgid "Order No. %d Payment Received"
msgstr "Užsakymo Nr. %d Apmokėjimas gautas"

#, c-format
msgid "Order No. %d Completed"
msgstr "Užsakymo Nr. %d Įvygdytas"

Oh, and please make sure your text editor is set to use UTF-8 encoding.

 
smilem

Joined: 2009-02-25
Posts: 118
Posted: Thu, 2010-01-28 20:28

here is zipped file

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2010-01-29 00:40

That's still not going to work - it's still full of blanks:

Quote:
msgid "[checkout] Purchase album"
msgstr ""

msgid "Checkout Configuration"
msgstr ""

msgid "Checkout Orders"
msgstr ""

Everything needs to be translated!

 
smilem

Joined: 2009-02-25
Posts: 118
Posted: Fri, 2010-01-29 01:36

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.
Step 1 is on, word "Checkout" is translated
Step2 is wrong, word "Checkout" is not translated
Step3 is wrong, word "Customer details" is not translated
"Order status" is not translated

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
Posted: Fri, 2010-01-29 01:41
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
Posted: Fri, 2010-01-29 10:48

Well it seems there is slight misunderstanding. Let me clear thing out.

I have translated the checkout, checkoutemail modules, front-end only.
As you said "place it in the g2data/lt/LC_MESSAGES/ directory" I've done that too.

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
Posted: Fri, 2010-01-29 11:01

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
Posted: Fri, 2010-01-29 13:23

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
Posted: Fri, 2010-01-29 13:42

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
Posted: Fri, 2010-01-29 14:58

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).
So it was some code missing. How do fix step2 and 3, the same code won't work?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2010-01-29 17:53

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
Posted: Sat, 2010-01-30 18:20

How do I perform the update, what files to update and where to get them?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sat, 2010-01-30 18:35

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
Posted: Sat, 2010-01-30 22:44

You mean I should click update in my gallery2 admin interface?
I tried to find updates fir (checkout) and (checkoutemail) here http://fisheye3.atlassian.com/browse/gallery/trunk/gallery2/modules
But there is no such thing.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Sun, 2010-01-31 00:47

site admin -> plugins -> get more plugins -> update plugin list

then

checkout -> upgrade (to revision 1917)
checkout by email -> upgrade (to revision 1918)

 
smilem

Joined: 2009-02-25
Posts: 118
Posted: Sun, 2010-01-31 01:31

Is this normal:

Failed to download the following packages for the Checkout plugin:

* modules/checkout-lang-lt-1712-.package
Checkout plugin updated.
Checkout by Email plugin updated.

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
Posted: Sun, 2010-01-31 06:55
Quote:
Checkout plugin updated.
Checkout by Email plugin updated.

That sounds helpful.

Re: 2.3.1 - it's up to you to choose when to upgrade.