Problem/Motivation

There's no way to translate messages

Proposed resolution

Implement i18n_variable module hooks for module variables

Remaining tasks

none

User interface changes

no

API changes

no

Data model changes

no

Original summary
How to translate messages on the multilingual web?

Comments

martinpetracek.com created an issue. See original summary.

gaydabura’s picture

Component: User interface » Code
Status: Active » Needs review
StatusFileSize
new3.91 KB

Status: Needs review » Needs work

The last submitted patch, 2: how_translate_messages-2581177-2.patch, failed testing.

andypost’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

Status: Needs work » Needs review
andypost’s picture

Title: How translate Messages? » Add i18n_variable mosule support to translate Messages
Category: Support request » Bug report

Actually that's a bug because no way to translate

+++ b/commerce_free_shipping.info
@@ -11,6 +11,7 @@ dependencies[] = commerce_order
+dependencies[] = i18n_variable

this should be pointed in readme
not required

Status: Needs review » Needs work

The last submitted patch, 2: how_translate_messages-2581177-2.patch, failed testing.

gaydabura’s picture

Status: Needs work » Needs review
StatusFileSize
new3.92 KB

patch updated

Status: Needs review » Needs work

The last submitted patch, 8: add_i18n_variable-2581177-7.patch, failed testing.

Status: Needs work » Needs review
gaydabura’s picture

StatusFileSize
new3.23 KB

The last submitted patch, 8: add_i18n_variable-2581177-7.patch, failed testing.

andypost’s picture

+++ b/commerce_free_shipping.module
@@ -63,6 +63,51 @@ function commerce_free_shipping_commerce_shipping_service_info_alter(&$shipping_
+ * Define variables used by a module.

Implements hook_variable_info().

gaydabura’s picture

StatusFileSize
new3.23 KB
andypost’s picture

Title: Add i18n_variable mosule support to translate Messages » Add i18n_variable module support to translate Messages
Assigned: mandus.cz » Unassigned
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Suppose project page should be updated as well, and it makes sense to roll new release

  • 1ccedfb committed on 7.x-1.x
    Issue #2581177 by martinpetracek.com, gaydabura, andypost: Add...
delta’s picture

Status: Reviewed & tested by the community » Fixed

Commited, thanks.

Will roll a new release, and update the module page accordingly soon.

delta’s picture

Issue summary: View changes
delta’s picture

Version: 7.x-1.x-dev » 7.x-1.1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mariskath’s picture

Hello,

Thank you for this module. Really nice.

I applied the patch in #14. I found the following lines in the translation interface:

%rate will be replaced by the price left to obtain a free shipping
%rate will be replaced by the limit price to obtain free shipping

and translated them.

However, when I go to the checkout then the messages are not translated.

I did change the messages in the Free shipping UI. Could that cause the problem? I replaced one by the original message, but that didn't help. And normally it is no problem to change messages and then translate them. But that is the only problem I can think of.

How can I find out what is going wrong? The module itself it working great, the only problem is the translation.

Best regards,
Mariska.

mariskath’s picture

Status: Closed (fixed) » Active
delta’s picture

These strings

%rate will be replaced by the price left to obtain a free shipping
%rate will be replaced by the limit price to obtain free shipping

are those of the admin of the module not the one displayed to the customer.

You should have variable_i18n module enabled. After that you should have a language selector on the top of the administration page of this module.

delta’s picture

Status: Active » Closed (fixed)

Please re-open the issue only if you know what you are doing. You can ask for support in another issue, if you have some trouble to translate the message to the customer.

mariskath’s picture

Hello,

I have everything installed as it should. However, I expected the translation in here /admin/config/regional/translate/translate. But now it is clear to me that I should enable the variables of Free shipping.

It will work now. Thank you for your answers.

Mariska.

delta’s picture

Issue summary: View changes