• Hi,

    I modified the core files of one plugin (Product Vendors) to translate some texts. However, later I discover Loco Translate I decided to continue my translations there.

    What happens now is that I have translated text from already translated core files. I big mess.

    In order to fix this i decided to download the LocoTranslation files and delete my plugin and reinstall it again so could just translate the plugin without any modifications in the core files.

    My issue is that even though I have both deleted the translation files and the plugin, when I reinstall the plugin, Loco Translate keep reading those old texts I modified in the core files… So its translating texts that no longer exist. I assume this texts are located somewhere else (Database? FTP folders?).

    I just would like to know how to delete all plugin files Loco Translate might have from my older plugin version so I can start from 0 again with the translations of that plugin.

    Thanks for your time!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Tim W

    (@timwhitlock)

    PO files don’t automatically update when you make changes to the files inside your plugin.

    Have you tried pressing the Sync button above the editor to fix your translation files?

    If you really need to delete your translation files, just use the delete function. Did you not find that?

    Thread Starter Guillermo Figueredo

    (@cleftune)

    I did sync and delete the translation files. However, Loco Translate still displays the old texts that I modified through FTP instead of the new ones not modified.

    Plugin Author Tim W

    (@timwhitlock)

    What is it syncing to?

    Either it’s pulling strings from your source code or it’s pulling from a configured template. There’s nowhere else it would be getting them from.

    If the latter (and you have old strings in the template) then you’ll have to open the template and sync that first.

    Thread Starter Guillermo Figueredo

    (@cleftune)

    The template is already modified. But Loco is still reading old texts from that template, just the older version that does no longer exist. Really wierd

    Plugin Author Tim W

    (@timwhitlock)

    If it’s finding old texts in the template, then they’re in the template. There’s no caching implemented by Loco Translate when it comes to opening files.

    If you need any further help, I’ll need you to provide a full download of all your files so I can see for myself.

    Thread Starter Guillermo Figueredo

    (@cleftune)

    My current class-wc-product-vendors-registration.php has one field called Vendor Name:

    }
    if ( empty( $form_items[‘vendor_name’] ) ) {
    $errors[] = __( ‘Vendor Name is a required field.’, ‘woocommerce-product-vendors’ );
    }

    On LocoTransalate, the field is called Cleftune Vendor Name. Thats what I had in my old template.

    My current shortcode-registration-form.php has this sentence modified:

    <p><?php esc_html_e( ‘Complete the following form to gain access to your teacher dahsboard. Here you will manage your bookings and offer your lessons.’ ); ?></p>

    LocoTranslate doesnt find this sentence… It just find the old modification.

    Plugin Author Tim W

    (@timwhitlock)

    You’ve not added the text domain argument. That’s why it’s not being extracted.

    Thread Starter Guillermo Figueredo

    (@cleftune)

    What code and Where do I have to add that? Thanks!

    Thread Starter Guillermo Figueredo

    (@cleftune)

    I never had to add any text domain argument for any other translation. Why do I have to do it for this plugin? I don’t get it, sorry.

    Plugin Author Tim W

    (@timwhitlock)

    Your esc_html_e function call requires the second argument, as per your first example. WordPress won’t load any translations from any file without it.

    Please read up on how to Internationalize your code.. If you want to extract strings from your code into POT files, then Loco Translate requires that the code is written according to these WordPress conventions.

    If you have a valid and up-to-date template file (provided by the author, or otherwise) then string extraction is a non-issue. I always recommend to use official POT files whenever possible, and to avoid generating your own templates unless you know what you’re doing.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Delete Plugin Files’ is closed to new replies.