• Resolved themefour

    (@themefour)


    I noticed, your dokan plugin has a lot of translation problems! The translations you put into javascript files will not be translated at all.

    Translated but not applied! Do you understand For example with Arabic WordPress, I have translated a full .po file (poedit soft), but many sections are still displayed in English. While I have translated them!

    vue-admin.js
    vue-vendor.js

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter themefour

    (@themefour)

    Even I found out there is a problem in your pro and free version of the plugin!

    Thread Starter themefour

    (@themefour)

    Notice my example:

    in vue-admin.js:
    _vm._v(_vm._s(_vm.__(“Last Name”, “dokan-lite”)))

    Although I translated this, it still appears in English. I have to manually change it to another language which is not true. Must be called through po file.

    Hello @themefour,

    Please check and make sure you have followed the procedure :

    1. Download the Dokan lite Language file : https://translate.ww.wp.xz.cn/projects/wp-plugins/dokan-lite

    2. You need to make sure both Lite and Pro .po files are 100 translated.

    3. Use proper file name (File names are very important. For example:

    Dokan FREE: dokan-lite-ar.mo and dokan-lite-ar.po

    Dokan pro: dokan-ar.mo and dokan-ar.po)

    4. Set them on the right location. (/wp-content/languages/plugins/)

    Following the above steps should solve the issue. Let me know your progress on the matter.In case there are some strings not translated on the plugin contact here and we will check the files in details.

    Best Regards πŸ™‚

    • This reply was modified 6 years, 5 months ago by roshni07.
    Thread Starter themefour

    (@themefour)

    I know all this. I knew you were unaware of this issue and therefore did not take any action to resolve it. I’ll show you the picture

    • This reply was modified 6 years, 5 months ago by themefour.

    Hello @themefour,

    Please share the screenshots. I will wait for them.

    Thread Starter themefour

    (@themefour)

    I did 100% translations for a project. But I saw that many of the parts were translated but not applied. Let me know the developer team, you can optimize this plugin very much.

    screenshots:
    http://s000.tinyupload.com/index.php?file_id=54358647699922099166

    Thread Starter themefour

    (@themefour)

    I noticed, the sources of these two files are very similar! I think the calling functions of the language strings cannot be called because of this complex coding.

    For example, I noticed that the Poedit software has some strings that you have defined (on js files) but have failed to .po file, Add .

    vue-bootstrap.js
    vue-admin. js

    Hello,

    It seems like you are right. Some of the new implement strings are not included in the POT file. We have created an issue and reported our development team. We will implement the strings in the translation files soon. As most of your queries and issue related to the pro plugin, I will request you to create a ticket and if you have more trouble with the free plugin you can continue this thread. The forum allows us to discuss the free plugin issue only.

    Thanks πŸ™‚

    Thread Starter themefour

    (@themefour)

    It’s great that you want to work on this! Although you have defined these translations and I have translated them with poedit, the translation in backend does not seem strange. Thank you for your good team. I’ll wait for the update.

    • This reply was modified 6 years, 5 months ago by themefour.

    there is problem in i18n translation loading in this class :
    class-assets.php in dokan-lite/includes
    there is not any load for dokan pro version as it’s a different domain , there is two domain in project :
    1- dokan-lite
    2- dokan <- for pro version

    after checking code i figured that in class-assets.php there is a variable called $localize_script that load stuff into vue , in i18n key it is contain only dokan-lite, take a look :
    ‘i18n’ => array( ‘dokan-lite’ => dokan_get_jed_locale_data( ‘dokan-lite’ ) )

    it must change to this to all translation work like a charm :

    ‘i18n’ => ! dokan()->is_pro_exists() ?
    array( ‘dokan-lite’ => dokan_get_jed_locale_data( ‘dokan-lite’ ) ) :
    array(
    ‘dokan-lite’ => dokan_get_jed_locale_data( ‘dokan-lite’ ) ,
    ‘dokan’ => dokan_get_jed_locale_data( ‘dokan’ ) )

    almost finished , now there is place in js code that developers injected this domains to function called setLocaleData ( dokan-lie/assets/js/vue-admin.js ), and it’s look like this:

    var Vue = dokan_get_lib(‘Vue’);
    new Vue({
    el: ‘#dokan-vue-admin’,
    router: __WEBPACK_IMPORTED_MODULE_1__router__[“a” /* default */],
    render: function render(h) {
    return h(__WEBPACK_IMPORTED_MODULE_0__App_vue__[“a” /* default */]);
    },
    created: function created() {
    this.setLocaleData(dokan.i18n[‘dokan-lite’]);
    }
    }); // fix the admin menu for the slug “vue-app”

    you must change this section to inject dokan domain too :

    var Vue = dokan_get_lib(‘Vue’);
    new Vue({
    el: ‘#dokan-vue-admin’,
    router: __WEBPACK_IMPORTED_MODULE_1__router__[“a” /* default */],
    render: function render(h) {
    return h(__WEBPACK_IMPORTED_MODULE_0__App_vue__[“a” /* default */]);
    },
    created: function created() {
    this.setLocaleData(dokan.i18n[‘dokan-lite’]);
    if(dokan.hasPro){
    this.setLocaleData(dokan.i18n[‘dokan’]);
    }
    }
    }); // fix the admin menu for the slug “vue-app”

    hope it work for someone πŸ™‚

    Thread Starter themefour

    (@themefour)

    It looks like you didn’t follow up! The translation problem still exists. I’ve translated the strings, but does not apply

    https://ibb.co/cxKkt9N
    https://ibb.co/rG45pWM

    Thread Starter themefour

    (@themefour)

    Please solve the translation problem. JavaScript file translations This plugin is not properly applied!!!

    Thread Starter themefour

    (@themefour)

    @sorroshsaket

    If this problem can be easily solved, why doesn’t the dokan development team do it?

    Hello @themefour,

    We have already added localization for the mentioned file. So, the translation should work fine. Now, we need to check with a 100% translated file. If you have the translated .po and .mo file then kindly send those files to us via our website contact form.

    Then we will check and solve the problem for you πŸ™‚

    Thread Starter themefour

    (@themefour)

Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘Js translation files do not work!’ is closed to new replies.