• Resolved fimo66

    (@fimo66)


    Hi,

    i have a follow up question for this how to translate “as soon as possible”
    After an update of this plugin, my prevs translatations has been overwritten,
    so now its says “as soon as possible” instead of my translated text.

    How can i translate this again and keep it from being overwrited when future updates comes ?

    Right now i have these files here, which one should i not touch and which to edit and keep ?

    1) wp-content\plugins\order-delivery-date-for-woocommerce\languages
    order-delivery-date.po.pot.mo

    2) wp-content\languages\plugins
    order-delivery-date-for-woocommerce-sv_SE.mo
    order-delivery-date-for-woocommerce-sv_SE.po

    im using poedit

    thanks for all the help

    https://www.ads-software.com/support/topic/as-soon-as-possible/

    • This topic was modified 3 years, 1 month ago by fimo66.
Viewing 9 replies - 1 through 9 (of 9 total)
  • @tobifjellner here from the Swedish team of volunteer translators.

    The “official” Swedish translation is located at https://translate.www.ads-software.com/locale/sv/default/wp-plugins/order-delivery-date-for-woocommerce/

    Any logged-in user is welcome to suggest new strings, especially for untranslated strings and strings with errors.

    After the first language pack has been created (which happens when at least 90% of the strings have been translated and approved), a new language pack gets created every time there are changes in the source strings (usually when a new version of the plugin is released), or whenever changes have been made to the translations. (I just had a quick look at the current translations by @cyclonecode and updated a few strings, so there will be a new language pack within one hour from now.)

    Your WordPress-installation will automatically get these updated language packs and install them in /wp-content/languages/plugins/. If you edit the translations inside that folder, then your changes get “washed away” as soon as a new language pack arrives.

    If you want/need to locally change translations, then (either one of) a couple of plugins may help you:
    – “Loco Translate” lets you handle and modify your local translations, and offers a possibility to install them in such a way that they don’t disappear during updates. But you may need to manually
    – “Say What” lets you specifically change a few strings, leaving the other translations unchanged.

    But: In the current “Stable” version of this plugin, I didn’t see any string that contains “As soon as possible”.

    .po files are text-files that are convenient for editing the translations. These files usually also contain references and links to where the string occurs in the software.
    .mo files are the compiled version of the same translation. This is the file that is used when PHP fetches translations.

    If you want to contribute to the Swedish WordPress translations, then you’ll find a lot of information to get you started in https://wpsv.se/engagera-dig/stilguide-for-oversattningar/

    Thread Starter fimo66

    (@fimo66)

    Thanks for the help & assist with my question BUT last time i wrote about this issue
    Mr Chetna Bhutka gave me an updated .pot file where i could change the “as soon as poosible” issue but i can see thats not possible in the updates after the one he gave me or did i miss something ?

    I think an updated .pot file with the choice to change this field would help me alot
    and perhaps other aswell in the future ?

    “…For translating the ‘As soon as possible’ string, we will first have to update .pot file of the plugin. So, can you please create the ticket here? I will give you the updated .pot file that you will have to upload on your site. After that, you will be able to translate ‘As soon as possible’ string on your site.

    Regards,
    Chetna Bhutka

    • This reply was modified 3 years, 1 month ago by fimo66.

    @fimo66
    The platform translate.www.ads-software.com doesn’t use the .pot files. Whenever the plugin code is updated, it will scan the plugin code itself and build an updated list of source strings that need to be translated.
    Right now there is no such string available for translation on the translation platform.
    It’s still possible that such a string is present somewhere in the plugin, but in a place that’s disregarded during the “import scan”, for instance if the file path contains /vendor/ or if it’s used in Javascript and the translations aren’t correctly loaded by the plugin (or if the string is only present in minified files – those are also disregarded).
    (By the way, if the translation is used by Javascript, then Loco Translate may not be able to do the trick, since such translations aren’t distributed via .mo files, but in .json files.)

    So: Are you able to tell where in the source code this string exists? If it’s in PHP and the translation is correctly called, then you could manually add it to your translation package, no need to have a .pot for that. The “translation key” is the exact wording of the source string. (uppercase vs. lowercase are different strings, even extra space characters make a difference, or even normal space vs. hard space.)

    Thread Starter fimo66

    (@fimo66)

    hi again,

    thanks for taking your time to help me :o)

    i found this file: order-delivery-date.po

    #: order_delivery_date.php:418 includes/class-orddd-lite-process.php:325
    msgid "Select a time slot"
    msgstr ""
    
    #: order_delivery_date.php:419 includes/class-orddd-lite-common.php:749
    msgid "As Soon As Possible"
    msgstr "S? fort som m?jligt"

    but nothing happens when i try to change the words here:

    #: order_delivery_date.php:419 includes/class-orddd-lite-common.php:749
    msgid “As Soon As Possible”
    msgstr “S? fort som m?jligt”`

    And again im not sure which folders, files i should keep of these two

    ….

    1) wp-content\plugins\order-delivery-date-for-woocommerce\languages
    order-delivery-date.po.pot.mo
    
    2) wp-content\languages\plugins
    order-delivery-date-for-woocommerce-sv_SE.mo
    order-delivery-date-for-woocommerce-sv_SE.po

    And if i try for test purpose to delete both files in folder 1 + 2
    it still shows “As Soon As Possible” on my checkout page, how is that possible when i have deleted the files for test ?

    sorry if i have to many questions / stupid one….

    • This reply was modified 3 years, 1 month ago by fimo66.
    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @fimo66,

    Please don’t edit any files available in below folder:

    wp-content\plugins\order-delivery-date-for-woocommerce\languages

    We provide the .po file of our plugin from which you can translate the strings of our plugin into any language. The same file is located at the wp-content / plugins / order-delivery-date-for-woocommerce / languages folder.

    Following are the instructions which you can follow to translate it into your localized language.

    i) Open the ‘order-delivery-date.po’ file in poedit and translate the strings.
    ii) Save the file with the required language code suffix (for example: es-ES.po) which in turn will generate the .mo file(es_ES). After saving, the .po and .mo files are ready to use.
    iii) Upload the files in the languages folder of our plugin( wp-content / plugins / order-delivery-date-for-woocommerce / languages ) and in wp-content/languages folder.

    If you do not wish to use .po file of our plugin then you can use the Loco Translation plugin for translating our plugin strings. Our plugin is compatible with that.

    Please let me know if you have any questions.

    Thread Starter fimo66

    (@fimo66)

    Hi @tychesoftwares

    Thanks for the guide but im been sitting here all morning to get it to work without any luck, i must be doing something wrong somewhere ?
    I tried to uninstall the plugin – reinstalled it again but with the same result, no changes after the translation with poedit.

    my org files is here in a new fresh plugin installation:

    1) wp-content/languages/plugins/
    order-delivery-date-for-woocommerce-sv_SE.mo
    order-delivery-date-for-woocommerce-sv_SE.po

    2) wp-content/plugins/order-delivery-date-for-woocommerce/languages
    order-delivery-date.mo
    order-delivery-date.po
    order-delivery-date.pot

    Then i translated the “order-delivery-date.po’ file in poedit and translate the strings.

    Then i got two files:
    sv_SE.mo
    sv_SE.po

    which i uploaded here:
    wp-content / plugins / order-delivery-date-for-woocommerce / languages ) and in wp-content/languages folder

    clear cache and then reloaded my webpage and still i see the english words like this:
    https://ibb.co/G31f3zj
    after my translation of “as soon as possible” + “time slot”

    hope you are able to guide me a little bit more to solve this and how i can avoid when its been fixed not to have my translated be overwritten by a new version of this plugin in the future. :o)

    Thread Starter fimo66

    (@fimo66)

    Now its working, i think it might have something to do with my naming of the files,
    by default my 2 translated files wad named sv_SE without any name in front of it but when i named them order-delivery-date-sv_SE, then it seemed to work…

    But again how do i avoid my translated files to be overwritten with future updates ?

    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @fimo66,

    To avoid your translated files being overwritten with future updates, you can add your translated .po and .mo files in wp-content/languages folder of the site.

    Thread Starter fimo66

    (@fimo66)

    Thanks ..tychesoftwares (@tychesoftwares)

    Great support as always :o)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘As soon as possible’ is closed to new replies.