Author Topic: Translate order status  (Read 19246 times)

patrik60

  • Guest
Translate order status
« on: April 21, 2012, 16:09:17 pm »
Is there any way to translate order status?

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: Translate order status
« Reply #1 on: April 22, 2012, 22:39:10 pm »
You can rename it in BE.

patrik60

  • Guest
Re: Translate order status
« Reply #2 on: April 22, 2012, 23:34:33 pm »
Thank you,but this makes no sense in a bilingual shop.

patrik60

  • Guest
Re: Translate order status
« Reply #3 on: April 23, 2012, 12:28:52 pm »
It can be done by using language strings (language override). It works then fine in Virtuemart->Account Maintenace->Order Information->Order History.

But it doesn't work in "your orders" tab and confirmation E-Mail.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3756
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Translate order status
« Reply #4 on: April 30, 2012, 21:54:51 pm »
Hi,
You can use a language Key as joomla , but it's possible in some view the function jText is not in all template files.

patrik60

  • Guest
Re: Translate order status
« Reply #5 on: July 15, 2012, 13:56:56 pm »
Will there be any solution? It is somehow curious: in the same document I get once a correct translation and on the other side just the language string. See attached pic, it is from the confirm email. Once you can see "In Bearbeitung" (=correct translation) and once you see just the string BEARBEITUNG.


[attachment cleanup by admin]

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3440
  • using Matomo instead of Google Analytics
Re: Translate order status
« Reply #6 on: July 15, 2012, 15:32:38 pm »
Might be a typo in your 'Downloadable products' plugin language file. (Can't check that, because I don't have that plugin)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

patrik60

  • Guest
Re: Translate order status
« Reply #7 on: July 15, 2012, 15:39:28 pm »
No, I don't think so. See the attached pic. There are problems also in other parts of VM.

[attachment cleanup by admin]

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3440
  • using Matomo instead of Google Analytics
Re: Translate order status
« Reply #8 on: July 15, 2012, 16:03:27 pm »
"Bearbeitung" is not part of the VM2 source code/language files. So I suppose it is somewhere in your 3rd party template.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

patrik60

  • Guest
Re: Translate order status
« Reply #9 on: July 15, 2012, 16:12:30 pm »
"Bearbeitung" is a language override of "Pending". My question was, why this is working on some parts of VM and on others not.

Since I'm using a bilingual shop, I need to translate order status for both, English and German versions.

There are also other things like e.g. cart attributes which do not work on every part of VM.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3440
  • using Matomo instead of Google Analytics
Re: Translate order status
« Reply #10 on: July 15, 2012, 20:26:28 pm »
Got a hint from the lead devloper  ;)
Go to VM2 'Configuration' - 'Order Statuses' and select 'Pending'. In the field 'Order Status Name' enter "COM_VIRTUEMART_ORDER_STATUS_PENDING" (without the quotes) and click on 'Save'. Now it should pick the order status name from the language files. Do the same with the other order statuses. (Don't forget to delete your override)

This is similar to the translation of custom fields.

Update:
Initially works in the backend, but now the emails contain for example: Your order status is COM_VIRTUEMART_ORDER_STATUS_CONFIRMED. Didn't figure out yet how to adjust this now.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

patrik60

  • Guest
Re: Translate order status
« Reply #11 on: July 16, 2012, 09:59:04 am »
Quote
Update:
Initially works in the backend, but now the emails contain for example: Your order status is COM_VIRTUEMART_ORDER_STATUS_CONFIRMED. Didn't figure out yet how to adjust this now.
Now you are as far as I am  ;) Have a look at my fourth post in this topic.

It doesn't matter wether I use COM_VIRTUEMART_ORDER_STATUS_PENDING or BEARBEITUNG. The result remains the same.

The problems with the translation of the custom fields (cart variant) are similar. It doesn't work on the details page of a product: There you will see e.g. COLOR_GREEN. In the cart and the invoice it is translated correctly: green.

patrik60

  • Guest
Re: Translate order status
« Reply #12 on: July 16, 2012, 14:54:41 pm »
I have seen now that the order status has been updated in rev 6282. It works fine now in the confirm email.

It still not works in the order list (user -> edit_orderlist.php and orders -> list.php). The code there is

Code: [Select]
<?php echo ShopFunctions::getOrderStatusName($row->order_status); ?>
Could it be completed with a JText function?

patrik60

  • Guest
Re: Translate order status
« Reply #13 on: July 16, 2012, 15:11:20 pm »
The line must be changed into

Code: [Select]
<?php echo JText::_(ShopFunctions::getOrderStatusName($row->order_status)); ?>
This way it works also in list.php and edit_orderlist.php

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2047
    • alatak.net
Re: Translate order status
« Reply #14 on: July 16, 2012, 19:01:00 pm »
Hello,

I have fixed it by adding the JText in the getOrderStatusName function. It will be added in the 2.0.8.e release.