Please use placeholders in translation strings

After 2.2 release I sense that there would be some new strings to translate and I’m right. Unfortunately I got kind of stuck.

There’s a reason why WordPress always used placeholders even if there doesn’t seem to be a necessity.

Take this as an example:

In Simplified Chinese, this line should be something like this:

cp_add_object_relationships() 期望参数2的值为......中的一个。

If there’s a placeholder %s, then I can just use %s, no issue.

Unfortunately there’s no placeholder. I then must use a workaround by using colons, which is not something that sounds optimal to me.

And did I mention Simplified Chinese doesn’t use spaces? Again, if there’s a placeholder, I can easily get rid of any spaces. But this is unfortunately not the case, and that would make the final translation looks funny.

So please add placeholders in translation strings, which makes life easier especially for us eastern language speakers.

Those for reference are also called tags @timkaye. The dreaded tags that in Crowdin can be somewhat out of place.
And yes, the more we learn to use them correctly like suggested her the better.

Thanks for pointing this out.

1 Like

Duly noted: thanks, both of you! I have now submitted a PR at Update object-relationships.php to use placeholders in translatable strings by KTS915 · Pull Request #1582 · ClassicPress/ClassicPress · GitHub

2 Likes

PR has been merged for this so will be fixed in nightly builds and the next official release.

2 Likes