Background of the issue:
I'm trying to translate our custom plugin and theme with WPML. Because we use files other than the standard ones, like .twig files, I'm unable to use 'Themes and Plugins localization' option to scan our plugin and theme. Because of that, I've manually generated .pot files for both plugin and theme (different text-domains) that I want to import to WPML to load so that we can translate it manually. .pot files are just templates, they don't have translations, so import would just update the list of all the strings, and we would add translations for those.
Symptoms:
I can successfully import my .pot file strings and translate them, but when I update my .pot file in the code and add additional strings, I go and import the .pot file once again to the same text-domain, but no new strings are added.
Questions:
Is this a bug or is there no way to import twice (to update) to the same text-domain?
Can you please try to go to WPML -> String Translation and enable the option: Look for strings while pages are rendered.
Then try to access the site somewhere that text is available and go back to the String Translation screen to see if those texts will be available for translation now.
Don't forget to uncheck that option once you're done.
Hi, that sounds like it could work, but I'm asking if there's an option for me to upload my .pot file for my theme and plugin that I'm generating automatically on each website version build. I want to automate this process, your solution requires me to turn on this option each time I add some new text on the website (as it sounds it's to slow to be turned on all the time).
Hi, I'm translating my .pot files at the moment and I assume this will work. But this doesn't solve the problems I'm having:
- there's no option to translate my .pot files to all languages we're using on the website on the PTC website
- I have to do this outside of the whole website WP plugin area, familiarize my client with the different translation flow than what they're used to
- every new string added to .pot file requires manual work to upload the files to that website, add .po and .mo files to code and deploy
- no ability to edit these translations through WPML plugins
- can't add new languages dynamically without generating new .po and .mo files manually etc.
My translations have just finished with the PTC and I can't seem to download the .po/.mo file that were generated. It logs me in to PTC dashboard and requires me to connect it to the Git repository which I don't want. Even if I would want that, I don't use any of the Gitlab/Bitbucket or Github, so I can't do that.