String translation issue with 2.0.1
-
Hello!
Since you added a regexp check for
wpm_translate_string
some strings that previously were translated might not longer be translated.
This may be especially true for those using an editor like UX Builder who likes to encapsulate text blocks with<p>[en:]</p>
for example.
Not sure how common it is for the different builders to insert html code into the strings though.Performance-wise the current regexp is the best. Not sure of any performance hit if the regexp would change to remove the ^ in front, though I guess it still would be a lot better than parsing all strings for language data.
My site is pretty small, so I didn’t get any performance hit though…File: /includes/wpm-translation-functions.php
1023: return preg_match( '#^(<!--:[a-z-]+-->|\[:[a-z-]+\]|\{:[a-z-]+\}).+#ism', $string );
to
return preg_match( '#(<!--:[a-z-]+-->|\[:[a-z-]+\]|\{:[a-z-]+\}).+#ism', $string );
Best Regards,
Andreas
- The topic ‘String translation issue with 2.0.1’ is closed to new replies.