• Resolved romashah62

    (@romashah62)


    Hello ,

    I am using your plugin and it is detecting only those strings which have been added in theme when i have created translation , after then which ever strings i am adding custom in any of the theme files , loco is not able to detect and display them in back-end and so that i am not able to translate them.

    I have gone through and tried all these :
    https://localise.biz/wordpress/plugin/faqs/custom-folder

    to solve but didn’t work for me.

    Can you please find a solution for this?

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

    (@timwhitlock)

    New strings added in the code won’t just be detected automatically. You will have to re-sync your files to use the new strings.

    It sounds like you’re not familiar with the Gettext workflow. See working with templates.

    Thread Starter romashah62

    (@romashah62)

    I have clicked on “sync” to sync strings many times but it seems like it was not working because of already defined .pot file.

    I have deleted .pot file and then clicked on sync and now all new strings come up in list and also if i translate new strings , those translations are working good.

    So , I think I solved my problem.

    Plugin Author Tim W

    (@timwhitlock)

    PO files sync to POT when there is one, but this does not automatically update the POT in the process. This is quite deliberate.

    If you delete the POT, then the PO will sync directly to the source code. This is not the recommended approach as explained in the link I gave above. But if it works for you and you have good reason for not wanting a POT file, then there is no harm continuing.

    Thread Starter romashah62

    (@romashah62)

    but if I keep pot file then I have to enter each string including its location information in POT file manually , right?

    This is why i don’t want to keep it , if you know other ways to sync , then let me know.

    Thanks.

    Plugin Author Tim W

    (@timwhitlock)

    but if I keep pot file then I have to enter each string including its location information in POT file manually, right?

    No. You don’t need to maintain the POT manually.

    Click “Edit template” to open the POT and sync it to your source code. Once your POT is up to date, you can then sync any PO files you wish to the updated POT.

    This is the fundamental Gettext workflow.
    * Update POT from code.
    * Then update POs from POT.

    This is why i don’t want to keep it , if you know other ways to sync , then let me know.

    As I said before, if the templateless approach is working for you then keep doing it. My advice remains the same.

    Hi @timwhitlock

    i am also lost as romashah62

    i understand the process, but the problem is, taht i do not see any way, how can i sync the POT with the source code and i believe i have walked it all through several times

    When i click edit template, so when i am on
    /wp-admin/admin.php?path=themes%2Ffutureportprague%2Fcs_CZ.po&bundle=futureportprague&domain=futureportprague&page=loco-theme&action=file-edit
    so i am in the Editor, there is only one Sync and that sync with the pot. I do not see any sync or anything else that is syncing source to the pot.
    There is no problem with the files, i can save them etc. So i am completely blind or there is some problem with the plugin

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Loco Translate does not find strings in any theme files’ is closed to new replies.