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.
GitHub is a free-to-use platform, is there a specific reason you don't want to follow through with this step?
Unfortunately, outside of the options I have shared, I know there are no other ways to help you achieve this desired outcome. Please verify that you are using WPML as intended as using it outside its expected usage could yield undesired results.
I'm using Azure DevOps as a Git repository, doesn't really make sense to migrate my whole repository and CI/CD because of one feature, that doesn't cover all my needs.
Can you tell me what is the purpose of String Translation plugin? I feel like translating standardized .po files should be one of them - and updating them per each new addition of strings.
I understand. WPML String Translation is meant to help you translate strings that originate from your theme/plugins.
In order for strings to be picked up by the plugin they need to be localization-ready per this documentation if the theme/plugin is not localized by it's author.
The WPML String Translation plugin also gives you the feature to import .po files and link them to existing strings.
However, if you need to update the translation you can either do it manually or re-upload the new .po file to update them.
The topic ‘[Closed] Custom plugin and theme translation from existing .pot files’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.