• Resolved themefour wp

    (@masouddarvishi1992)


    Hello. I want to translate the plugin into another language. But the strings you defined in the javascript files are not added to the poedit software! I also checked the smart-manager-for-wp-e-commerce.pot file, I saw that these strings are not in this file. It seems you forgot something. please check it.

    JavaScript file strings:

    admin.js
    smart-manager.js
    smart-manager-product.js

    tnx.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author storeapps

    (@storeapps)

    @masouddarvishi1992 ,

    Ideally Smart Manager should show all the strings from JavaScript files in smart-manager-for-wp-e-commerce.pot file. Could you please update the Smart Manager plugin to latest version – v7.0.0 if you haven’t already and then let us know how it goes for you?

    If still some of the strings are not available then request you to please get back to us with list of JavaScript strings that are missed in smart-manager-for-wp-e-commerce.pot file.

    Thread Starter themefour wp

    (@masouddarvishi1992)

    @storeapps

    Hello. I also tested with version 7.0. None of the strings related to js files are added to the language file! This problem does not exist in other plugins. But in your plugin, there is this problem. Even your default smart-manager-for-wp-e-commerce.pot file does not contain js file strings.

    • This reply was modified 3 years, 7 months ago by themefour wp.
    Plugin Author storeapps

    (@storeapps)

    @masouddarvishi1992,

    That’s strange.

    Could you please get back with list of JavaScript strings that are missing in smart-manager-for-wp-e-commerce.pot file? So that we can have check and resolve the issue for you.

    Thread Starter themefour wp

    (@masouddarvishi1992)

    You can check yourself that in the smart-manager-for-wp-e-commerce.pot file, none of the strings in the files:
    admin.js
    smart-manager.js
    smart-manager-product.js
    do not exist!
    Poedit software does not add the text strings of those files.

    Plugin Author storeapps

    (@storeapps)

    @masouddarvishi1992 ,

    Thank you for getting back to us.

    As rechecked, even using the Poedit application we are able to translate all the JavaScript strings in Smart Manager plugin.

    Could you try using the Loco Translate plugin for translating the same strings and do let us know if that works for your you or not. Click here for further reference on the same.

    Thread Starter themefour wp

    (@masouddarvishi1992)

    @storeapps
    I guess you manually removed the js option in the poedit software so that all strings of js files are added to the language file.

    Yes, strings are added with this! But if we translate the strings, the translation will not be applied to the plugin! Translate several js strings into one language with this software, then refresh the settings or plugin editor, see if the translation is applied or not! I’m sure, translation is not applied. I tested several times. I’m sure your plugin has a bug.

    https://ibb.co/GPkcQcx

    I downloaded the new version of the plugin and tested it again with poedit software. It doesn’t add any js strings!!

    https://ibb.co/GpScH15

    • This reply was modified 3 years, 6 months ago by themefour wp.
    • This reply was modified 3 years, 6 months ago by themefour wp.
    Plugin Author storeapps

    (@storeapps)

    Hi there,

    Would like to update you that in order to translate JavaScript strings, you need to have JSON files along with .po and .mo files as described here. Poedit software only includes .po and .mo files.

    Explaining further, so it seems like Poedit is not automatically generating the same JSON files. As suggested in our earlier response, suggest you to use Loco Translate for the same translations as it does handle JavaScript strings without any issues.

    Request you to have a check with the above steps and do let us know if that works for you or not.

    Thread Starter themefour wp

    (@masouddarvishi1992)

    @storeapps
    You can’t generate the json file?

    Plugin Author storeapps

    (@storeapps)

    @masouddarvishi1992 ,

    We can surely generate the JSON files. But as you are trying to update the plugin into another language, its advised that you generate the same JSON file when generating the ‘.po’ and ‘.mo’ files for the same language else it would not be in sync.

    So, if you are finding it difficult using WP-CLI (as described here), hence we are suggesting you to use plugins like Loco Translate for the same translations as it will automatically generate the required JSON files when generating the ‘.po’ and ‘.mo’ files for the same language.

    Request you to kindly give it a try and do let us know your views.

    Thread Starter themefour wp

    (@masouddarvishi1992)

    @storeapps
    I tested. Only by translating from within the Loco Translate plugin, the texts and strings of your plugin can be translated.

    I think it is better to put the json files in the plugin folder yourself. Like dokan and yoast plugins

    • This reply was modified 3 years, 6 months ago by themefour wp.
    Plugin Author storeapps

    (@storeapps)

    @masouddarvishi1992 ,

    Thank you for the update! 🙂

    Yes, we do understand your concerns and have made a note of adding JSON files for existing translated languages within the plugin itself and will surely update you once we have added support for the same.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Textdomain JS’ is closed to new replies.