• Hi

    I am having some difficulties with translating my “Highend” theme from english to norwegian (default theme language is English). The template pot file only has 72 strings to translate, and the strings I specifically want translated is not there. However the strings are found in the English PO file, which I just duplicate and change language to Norwegian. There I can translate all the strings I need translated, but upon syncing it says “1700 absolete strings were removed, and 50 new strings were added”, leaving me with the 72 strings that dont really need translating for my website.

    Any clue to what I should do? All tips are most welcome!

    • This topic was modified 6 years, 2 months ago by Kristian G.

    The page I need help with: [log in to see the link]

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

    (@timwhitlock)

    The template pot file only has 72 strings to translate

    Who generated this? The theme author/vendor?

    However the strings are found in the English PO file, which I just duplicate and change language to Norwegian

    Did you do this manually? or using Loco Translate “copy” function? You should do the latter.

    but upon syncing it says “1700 absolete strings were removed, and 50 new strings were added”, leaving me with the 72 strings

    Because the bad POT is still your configured template. If you use the proper “copy” function on your the English PO then this should be used for future syncs. This is explained in this guide.

    Alternatively (without having to start again) go into the bundle config Advanced tab and enter the English PO as the “official” “template to use. You might also want to add the bad POT to the ignore list. See Bundle configuration.

    Thread Starter Kristian G

    (@kglomset)

    “Who generated this? The theme author/vendor?”
    I’m guessing the theme author generated the POT file. It has not been replaced or edited by me.

    “Did you do this manually? or using Loco Translate “copy” function? You should do the latter.”
    I did the latter and used the Loco Translate “copy” function, just poorly explained on my part. Still, the 1700 strings were removed and 50 were added.

    I also tried configuring the the English PO as the official template, also put the bad POT on the ignore list. Everything seems to check out in the Loco Translate app, but no changes are being made in the acutal website. Am I missing something here?

    Do I need to make a new template? And also, do I have to change the “Text Domain” section?

    Plugin Author Tim W

    (@timwhitlock)

    Firstly, if you’ve paid $50+ for a theme I’d expect the author to ship a valid POT file. You should complain about that.

    I did the latter and used the Loco Translate “copy” function … Still, the 1700 strings were removed and 50 were added.

    Did you also tick the option that said “Use ‘en_US’ as template when running Sync”? The resulting PO should have a custom header called X-Loco-Template. If this isn’t in your PO file, it won’t sync back to the stand-in template.

    You will also see what file was used as the template when the Sync success message appears.

    I also tried configuring the the English PO as the official template …. Everything seems to check out in the Loco Translate app

    Ok, so this has solved the original Sync problem?

    but no changes are being made in the acutal website. Am I missing something here?

    Where is the file saved? Loco Translate’s custom directory, or elsewhere?

    Do I need to make a new template?

    If the English PO is valid and up to date, then no. That is effectively the template. However, based on the bad POT I don’t trust the author enough. See Do I need a template?

    And also, do I have to change the “Text Domain” section?

    Not unless its wrong.

    Thread Starter Kristian G

    (@kglomset)

    Yes, I ticked off the option that said “Use ‘en_US’ as template when running Sync”. This is also confirmed when i sync the norwegian PO file, and thus the sync problem seem to be resolved.

    I cannot, however, find that “The resulting PO should have a custom header called X-Loco-Template” as you describe. Also, when I go to file info in the nb_NO.po file, it says “Out of sync with template. PO file has different source strings to “en_US.po”. Try running Sync before making any changes.”
    I find that caonfusing because when I sync it says already up to date with en_US.po

    The file is saved at Loco Translate’s custom directory.

    Still no changes are being made to the actual site.

    Plugin Author Tim W

    (@timwhitlock)

    Ok moving on from the original Sync issue then….

    The file is saved at Loco Translate’s custom directory.
    Still no changes are being made to the actual site.

    Please try with the file in a standard location as per this FAQ.

    Thread Starter Kristian G

    (@kglomset)

    Tried with the file in standard location too. Still not showing any edits in the actual page.

    Also, when I go to “File info” in nb_NO.po in Loco Translate, it says “Out of sync with template. PO file has different source strings to “en_US.po”. Try running Sync before making any changes.” I find that a bit strange, since it is copied from en_US.po in Loco Translate (should it not be the same?), but it also says it is synced in the “editor” section. Does this still mean the sync issue is resolved and has nothing to do with the translations not appearing?

    Plugin Author Tim W

    (@timwhitlock)

    This thread is becoming very confusing.

    If Loco Translate says the file is not in sync with your configured template then it isn’t. I can’t account for why you’re saying it should be. You will have to post all your files and your bundle config if you want me to examine that.

    My guess is you’ve done things in the wrong order, or are expecting things to happen automatically when they don’t

    1. Establish a VALID PO or POT file that contains ALL strings in the theme, and none that aren’t.

    2. Configure this as the default template for the bundle.

    3. Create your language file OR sync an existing one. And make sure that the file it’s being synced WITH is the right one.

    Plugin Author Tim W

    (@timwhitlock)

    Regarding your file location. We can (from your test) eliminate Loco Translate’s file loader as an issue.

    If your strings don’t show up, it’s probably because your files are not in sync with the theme’s code. As your theme is commercial, you should demand a valid POT from the vendor so you can do your translations.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Strings I want translated does not appear in template POT file’ is closed to new replies.