Ignore certain domain (e.g. via an options.dontUpdateDomains)
See original GitHub issueIt would be great to be able to set certain text domains to be left alone, something along
options: {
dontUpdateDomains: [ 'thirpartydomain' ]
}
My use case is that my theme does some slight modifications of markup via a plugin hook, but although the order of things shifts the actual string to translate remains the same as in the plugin. So it doesn’t really make sense to move/duplicate that string in my plugin.
Now I could just ignore that file in target
but that is an issue as the file does have other translatable strings with my own textdomain in it.
I know this probably is an edge case, but maybe I am not the only one having this issue. 😄
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Example of Filtering to Exclude Domains - VMware Docs
Extend the search exclusion list to exclude the DEPTX domain and all its trusted domains from the domain search for all Connection Server ......
Read more >Windows HOSTS File PowerShell Script To Block Bad Domains
This article shows you how to use a free PowerShell script to block bad domain names by modifying the HOSTS file on Windows...
Read more >window.open() parameters ignored when opening cross ...
open() when url is a different origin than the current domain. But works it works fine in Chrome and Firefox, and when the...
Read more >Create and manage domains—ArcGIS Pro | Documentation
Using the Domains view, you can view existing domains and edit their properties and values, delete domains, and create domains. Learn more about...
Read more >Geodatabase Domains in ArcGIS Pro - YouTube
This tutorial will demonstrate a workflow for establishing a domain within a geodatabase then applying the domain to an attribute within a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That option would be to support a non-best practice.
No, it provides very little burden - change a few extra textdomains and that’s it.
Any extra burden is on theme translators, and that’s just a few extra strings. And, if the strings are the same as the default WooCommerce templates, they can copy the translated strings from those language files. It’s literally just a few minutes extra work.
Sure - it could be in 100 locales, but that bears no relevance on the number of locales the theme is available in, so I don’t see what your point is here.
How is it unrealistic? Practically, the only extra work is to change the textdomain on the strings in the template.
Theme translators would still need to translate the other strings in the theme anyway, so there’s no point having the strings from WooCommerce magically translated if the rest of the theme strings are still in English.
You’ve only got to look at Twenty Seventeen, Twenty Sixteen et al, to see that they also use WP Core strings, but with their own textdomain.
Same goes for Akismet using core strings but with its own textdomain as well.
For TGM Plugin Activation, the generator asks for the theme’s / plugin’s textdomain, so that the TGMPA file has strings that use that textdomain when used in a WordPress.org environment.
I get that we’d all prefer to keep everything DRY, but that’s not the best approach in this circumstance, and adapting this
grunt-wp-i18n
tool to facilitate folks making this mistake, would be a mistake in itself IMO.+1 for this.
Use case: Develop a theme / plugin for the woocommerce plugin. If you duplicate the woocommerce templates to your theme or using filters / actions to change the layout you may want to use the already translated strings from woocommerce itself.
Currently these strings get into your .pot file, but they are already translated, so no need to use them.
I would suggest (maybe additional to @kraftner idea) to be able to explicit set a domain which to process. So that only the strings from my theme / plugin gets added.