<div dir="ltr">I actually believe that there are lots of tools that don't 'compile' code in order to get it translated and only use the string 'as is' and that makes it more platform/tool independent. While within a variable or a constant there are additional checks and iterations and some apps don't go that deeper for different purposes (performance for instance).<br>
<br>All the best,<br clear="all"><div dir="ltr"><br>Mario Peshev<br>Training and Consulting Services @ DevriX<div><a href="http://www.linkedin.com/in/mpeshev" target="_blank" class="vt-p">http://www.linkedin.com/in/mpeshev</a><br>
<a href="http://peshev.net/blog" target="_blank" class="vt-p">http://peshev.net/blog</a><br></div></div><br>
<br><br><div class="gmail_quote">On Thu, Oct 6, 2011 at 3:37 PM, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Absolutely, and I appreciate the clarification. :)<div><br></div><div>So, is this an accurate summary: POEdit (etc.) won't care what the textdomain string is, for a given Theme/Plugin, provided that the string is consistent throughout the Theme/Plugin. But, *best practice* is to use an *actual string*, in order to play nicely in an environment where several textdomains are being declared (such as within WordPress)?</div>
<div><br></div><div><font color="#888888">Chip</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Thu, Oct 6, 2011 at 7:32 AM, Dion Hulse (dd32) <span dir="ltr"><<a href="mailto:wordpress@dd32.id.au" target="_blank" class="vt-p">wordpress@dd32.id.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Always use a string.. Don't use a variable, Don't use a Constant.<br></div><div><br></div><div>Gettext applications look at the php files as an onlooker, It can't tell what the contents of $lang is, it can't tell the contents of CONSTANT_MY_LANG, It just knows the first param is a string, and the second is the text domain for it. It's basically the same as running a regex over an unknown string, or scanning through a French document looking for the word which comes after XYZ..</div>
<div><br></div><div>When you're generating a .pot file from a single theme/plugin, you can specify the text domain you want the resulting file to use.. when you're automating translations for thousands of items (like WordPress.org will do one day..) then you can't guess.. the authors need to be specific for maximum compatibility!</div>
<div><br></div><div>Does that help at all Chip? :)</div><div><div></div><div><div><br></div><div><br></div><div class="gmail_quote">On 6 October 2011 23:23, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net" target="_blank" class="vt-p">chip@chipbennett.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for passing this along, Mike!<div><br></div><div>There seems to be some discussion/disagreement in the comments and via Twitter. What's the consensus?</div>
<div><br></div><div><font color="#888888">Chip</font><div><div><br><br><div class="gmail_quote">
On Thu, Oct 6, 2011 at 1:24 AM, Michael Fields <span dir="ltr"><<a href="mailto:michael@mfields.org" target="_blank" class="vt-p">michael@mfields.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<br>
This just came through my Twitter feed:<br>
<a href="http://markjaquith.wordpress.com/2011/10/06/translating-wordpress-plugins-and-themes-dont-get-clever/" target="_blank" class="vt-p">http://markjaquith.wordpress.com/2011/10/06/translating-wordpress-plugins-and-themes-dont-get-clever/</a><br>
<br>
Thought it might make a pretty good addition to the requirements.<br>
It also might be a pretty easy check to work into the Theme Check plugin.<br>
<br>
I'm guilty of this myself in plugins and think that's it's really great to have an explanation of why this is wrong :)<br>
<br>
Just wanted to pass it along!<br>
<br>
- Mike<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank" class="vt-p">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank" class="vt-p">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank" class="vt-p">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank" class="vt-p">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank" class="vt-p">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank" class="vt-p">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" class="vt-p">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank" class="vt-p">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div>