• Resolved patrick2997

    (@patrick2997)


    Hi,

    We’re using loco translate and earlier I tried to translate our plugin after making all the strings translatable. But, it was showing old cached data. After several tries, I deleted the .pot file and added a new language and it worked, it showed all the translatable strings. I translated all of that. Now, I added a few more strings in code and made it translatable but, it is not showing even when I click “Sync” . This has to do with the .pot file. What is the issue? I can’t delete it now because I have added all the translations for 200 strings.

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

    (@timwhitlock)

    I’m not sure what you mean about a POT file cache, but my plugin has no such feature.

    If you add new source strings into your code and Sync your POT from the editor, then new strings should be picked up immediately. If they’re not, then either (1) the source files are being skipped due to your config, or (2) there’s a problem with your code.

     I can’t delete it now because I have added all the translations for 200 strings.

    Deleting a POT file won’t delete any translations.

    Thread Starter patrick2997

    (@patrick2997)

    Hi,

    Thanks for the reply. I’ll link the screenshot link from awesomescreenshot:

    https://tinyurl.com/27savpp6

    This is the contents of boat-register.pot which is in the main plugin directory. I deleted it before and it deleted all the available translations, but after that I could add all the strings. I have added several more strings but I can’t see it even when I sync (likely until I delete this ).

    It most definitely has to do with this file. If it is not being generated by locotranslate, do you have any idea what could be causing it? Any help would be appreciated. Thanks.

    Best Regards,
    Patrick

    Plugin Author Tim W

    (@timwhitlock)

    What is this screenshot intended to demonstrate?

    I can’t think of any way that deleting a POT file could make any difference to the string extraction process. You will have to show me steps to reproduce this problem.

    If a POT file is absent, then creating it via the Loco Translate dashboard will run the string extraction process and create a new file with all the extracted strings. If the file already exists, then running Sync from the editor will run the exact same string extraction process, but merge any new strings into the editor in an unsaved state. Only when you save the editor state will they be committed to the POT file.

    Thread Starter patrick2997

    (@patrick2997)

    It works! I deleted the .pot file like you said (after taking backup) and it didn’t delete the translations, but now the sync is working whenever I add a new string. Everything is almost done.

    I still don’t know what this .pot file is and where it is coming from. Also I get a warning about this. Should I be concerned about this?

    https://tinyurl.com/2dby5n2d

    Why was there a .pot file to begin with? If it isn’t part of your plugin, could it be coming from the plugin or theme code?

    You can mark as resolved after the next reply.

    Plugin Author Tim W

    (@timwhitlock)

    ?Also I get a warning about this.

    It’s telling you that your Swedish PO file is syncing directly from the source code, and not via a POT file. This makes sense, because you deleted it. Should you be concerned? Not if everything is working fine for you.

    Why was there a .pot file to begin with?

    I can’t tell you who created the POT, or why. But see Working with templates to understand the purpose of POT files.

    Thread Starter patrick2997

    (@patrick2997)

    Done.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘.pot File Cache Issue’ is closed to new replies.