• Resolved jacques83300

    (@jacques83300)


    Hello,
    I’m using this very useful plugin since a short time. Everything is working fine but I’m missing the internationalization of the plugin. When do you plan to implement it? It is really mandatory for my customer.

    Thanks for your answer.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Mark Tomlinson

    (@marktomlinson)

    It is ready to go now. I was cleaning up the instructions to make the plugin more understandable, but I can hold off on that and publish the new release before the end of the week.

    It will NOT come with translations, though. What it will come with is a template file (POT file) that can be used to generate translations. I will also update the FAQ with instructions so that people who are not familiar with POT files can still send me translations and I will generate the necessary files and make them available.

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    I just published version 3.0 with the appropriate POT file.

    Wordpress provides a translation interface at https://translate.wordpress.org/projects/wp-plugins/markup-by-attribute-for-woocommerce/dev, but I’m really unfamiliar with it. I’ve used plugin Loco Translate to get this far, and you might do the same.

    But I’m thinking the best approach would be to download the POT file from GitHub (https://github.com/Mark-Tomlinson/markup-by-attribute-for-woocommerce/blob/master/languages/markup-by-attribute.pot). Then send any translations to me at markupbyattribute@mail.com.

    Thread Starter jacques83300

    (@jacques83300)

    Hello,
    many thanks for this release.
    I have tried to translate the front-end texts but it appears
    – the “Product price” is not internationalized in src\class-mt2mba-backend-product.php:line 223
    – you have defined the function format_description_markup() twice (in src\class-mt2mba-utility.php: line 250 and in src\utility\general.php:line211) and make use of the wrong ones.

    Can you please have a look?

    Today, I don’t plan to translate the settings of the plugin. Maybe later…

    Thanks for all.

    Thread Starter jacques83300

    (@jacques83300)

    After looking more in details, I have seen your zip file is not correct as it contains old files in the src directory. I have tried to download the plugin from GitHub but it gives the same issue (translation is not done).

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    I will certainly look into this!

    Trying to locate and clean up all those issues is what has been taking so long. Thank you for pointing them out.

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    Closing issue

    Thread Starter jacques83300

    (@jacques83300)

    Any idea when it will be fixed ?

    Kind regards

    Plugin Author Mark Tomlinson

    (@marktomlinson)

    Sorry I wasn’t clear when I closed the issue. Version 3.1 should fix the issue. The POT file in the /languages directory contains all the strings that need to be translated. And the ZIP file no longer contains extraneous, unused code.

    Thread Starter jacques83300

    (@jacques83300)

    Hi Mark,
    Thanks for your answer.
    My current version is well 3.1.
    I tried again to translate few texts (like “Product price” in French by using Loco but it is not translated on my pages.
    I don’t understand the problem 🙁
    Can you please have a quick look ?

    • This reply was modified 5 years, 5 months ago by jacques83300.
    • This reply was modified 5 years, 5 months ago by jacques83300.
    Plugin Author Mark Tomlinson

    (@marktomlinson)

    I’m not sure what the problem would be. To test, I went to Loco Translate and started my own French translation.

    • I translated ‘Product price’ to ‘Prix ​du produit’, ‘Add %1$s for %2$s’, to ‘Ajouter %1$s pour %2$s’, and ‘Subtract %1$s for %2$s’ to ‘Soustraire %1$s pour %2$s’.
    • Then I set the WordPress language to ‘Français’. (I didn’t bother changing the WooCommerce currency for this test).
    • I went to a test product and used the ‘Set regular prices’ function to set the base price to $44.95.

    This is what ended up in the description,

    <span id="mbainfo">Prix ​​du produit $44.95
    Ajouter $1.12 pour Blue
    Soustraire $2.25 pour X-Small
    </span>

    So it appears to be working.

    I really don’t know that much about translation files other than what I’ve been able to pick up while adding internationalization. I may be doing something completely different than you.

    Thread Starter jacques83300

    (@jacques83300)

    Hi Mark,

    The way you described is exactly the same way I’m following but I always get the same wrong result:

    <span id="mbainfo">Product price 90,00€<br>
    Ajouter 25,00€ for un bourdon<br>
    Ajouter 45,00€ for Avec broderie personnalisée<br>
    </span>

    What I don’t understand is the reason why we have the text ‘Ajouter 25,00€ for …’ which is a partial translation of the text: only the ‘Add’ word is translated but not the expression.
    I tried to re-install the downloaded version by using FTP but I get the same result.
    Maybe I can try to uninstall and re-install the plugin from the plugin menu but I first need to be sure the existing attribute markup will not be removed and will still work after the re-installation. Can you please confirm?
    I’m using Loco for other plugins and didn’t meet such issue 🙁

    Thread Starter jacques83300

    (@jacques83300)

    I just tried to uninstall et re-install the plugin via WordPress but I get the same result.
    I also tried to duplicate the polish translation file and rename it with the extension fr_FR (and changing internally the language names) but it is still not seen.
    I’m lost…

    Thread Starter jacques83300

    (@jacques83300)

    I think I understood the problem. It seems after having translated the text, I need to reuse the Set regular price to apply again the markup and update the description of the variations. This is not really good as it requires an effort just for a translation change. How do you manage the multilanguage?
    Another problem I’m facing is some products have an attribute used in the variatons with a specific price set for each term but which cannot be not managed by markup. How do you fix that as the Set regular price is applies to each variation and does not allow to have a specific price for an attribute?
    Thanks for your help.

    • This reply was modified 5 years, 5 months ago by jacques83300.
    Plugin Author Mark Tomlinson

    (@marktomlinson)

    I wish I could help you here, but I can’t.

    Markup by Attribute works by calculating the variation prices during the [Set regular price] and [Set sale price] functions. It then writes the result into the variation on the database. For that reason, all variations need to be in the database and you must run the [Set regular price] function again to change the markup amount and the text.

    I could have taken the approach of changing the product price in the store when the customer selects different options. This would have been more dynamic and would give what you are looking for. But there are advantages and disadvantages with both approaches, and I selected the approach of writing to the database.

    Sorry that I can’t be more helpful.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Internationalization’ is closed to new replies.