• Hi,
    I’ve tried to translate your plugin a bit, and stumbled upon several things that may be improved.
    – Don’t include unnecessary surrounding tags in a string. For example, you have several strings on the format %1$s Some text here %2$s, when I look at the code, I can see that these placeholders simply get replaced by a pair of H3-tags. First of all, in that case there should be no space between the placeholder and the surrounding text, but even better is to echo them outside of the string.
    – In many places you’ve used placeholders in order to inject various formatting tags. In these cases, it’s better to leave the tags in the string – then the translator will understand better what you want to achieve and create the corresponding translated string.
    – Please really avoid situations where you start or end a tag pair inside a string but the other end of the tag pair is located directly in your code (or in a different string).
    – Don’t put space in the beginning or end of a string. (If you feel an urge to add a space in the beginning or the end of a string, then that’s an obvious sign that you’re trying to form a sentence by gluing various strings together, which in many cases will make your code impossible to translate in a good way.)
    – You have several strings that could be combined to one common string if you use a placeholder in a smart way: “Error: cannot write %s, permission denied”. In this case, you can inject various filenames, and even format them for easier readability.
    – Don’t take for granted that the target language always has the same overall structure. For instance, the string “Error: cannot create ” (which currently ends on a space…) would be much better to present as “Error: cannot create %s.” Then the translator will have more freedom to make the result sound logical.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please make it easier to translate your plugin’ is closed to new replies.