#10005 closed enhancement (duplicate)
Some strings need "no HTML entities" translator comments
Reported by: | xibe | Owned by: | nbachiyski |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 2.7.1 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
I've been putting a specific set of custom comments in my PO for some time now, and since WP is now able to handle translator comments very graciously, I think it would be nice to switch them over there.
The following strings need to have an indication warning translators against the inclusion of HTML entities within their translation, because of where the strings are user (RSS feeds, e-mail...). For instance, "Protected Comments: " should be translated to "Commentaires protégés : ", but since it is used in feeds, it breaks them...
Suggestions comment: "Do not add HTML entities ( , etc): used in [context]".
Here they are (sorry, raw list out of my PO file).
Used in feeds:
- "Comments on: %s", wp-includes/feed-atom-comments.php:19 and wp-includes/feed-rss2-comments.php:22
- "By: %s", wp-includes/feed-atom-comments.php:56 and wp-includes/feed-rss2-comments.php:48
- "Protected Comments: Please enter your password to view comments.", wp-includes/feed-rss2-comments.php:56
Used in e-mail:
- "Your new WordPress blog has been successfully set up at: ...", wp-admin/includes/upgrade.php:229
- "New comment on your post #%1$s \"%2$s\"", wp-includes/pluggable.php:968
- "Author : %1$s (IP: %2$s , %3$s)", wp-includes/pluggable.php:970 and wp-includes/pluggable.php:1072
- "E-mail : %s", wp-includes/pluggable.php:971 and wp-includes/pluggable.php:1073
- "URL : %s", wp-includes/pluggable.php:972, wp-includes/pluggable.php:983, wp-includes/pluggable.php:993, wp-includes/pluggable.php:1059, wp-includes/pluggable.php:1066 and wp-includes/pluggable.php:1074
- "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s" and wp-includes/pluggable.php:973 and wp-includes/pluggable.php:1075
- "Comment: ", wp-includes/pluggable.php:974 and wp-includes/pluggable.php:1076
- "You can see all comments on this post here: ", wp-includes/pluggable.php:975
- "[%1$s] Comment: \"%2$s\"", wp-includes/pluggable.php:977
- "New trackback on your post #%1$s \"%2$s\"", wp-includes/pluggable.php:980
- "Website: %1$s (IP: %2$s , %3$s)", wp-includes/pluggable.php:982 and wp-includes/pluggable.php:992
- "Excerpt: ", wp-includes/pluggable.php:984 and wp-includes/pluggable.php:994
- "You can see all trackbacks on this post here: ", wp-includes/pluggable.php:985
- "[%1$s] Trackback: \"%2$s\"", wp-includes/pluggable.php:987
- "New pingback on your post #%1$s \"%2$s\"", wp-includes/pluggable.php:990
- "You can see all pingbacks on this post here: ", wp-includes/pluggable.php:995
- "[%1$s] Pingback: \"%2$s\"", wp-includes/pluggable.php:997
- "Delete it: %s", wp-includes/pluggable.php:1000 and wp-includes/pluggable.php:1081
- "Spam it: %s", wp-includes/pluggable.php:1001 and wp-includes/pluggable.php:1082
- "A new trackback on the post #%1$s \"%2$s\" is waiting for your approval", wp-includes/pluggable.php:1056
- "Website : %1$s (IP: %2$s , %3$s)", wp-includes/pluggable.php:1058 and wp-includes/pluggable.php:1065
- "Trackback excerpt: ", wp-includes/pluggable.php:1060
- "A new pingback on the post #%1$s \"%2$s\" is waiting for your approval", wp-includes/pluggable.php:1063
- "Pingback excerpt: ", wp-includes/pluggable.php:1067
- "A new comment on the post #%1$s \"%2$s\" is waiting for your approval", wp-includes/pluggable.php:1070
- "Approve it: %s", wp-includes/pluggable.php:1080
- "Currently %s comment is waiting for approval. Please visit the moderation panel:", wp-includes/pluggable.php:1084
- "[%1$s] Please moderate: \"%2$s\"", wp-includes/pluggable.php:1088
- "Password Lost and Changed for user: %s", wp-includes/pluggable.php:1114
- "[%s] Password Lost/Changed", wp-includes/pluggable.php:1115
- "New user registration on your blog %s:", wp-includes/pluggable.php:1135
- "Username: %s", wp-includes/pluggable.php:1136, wp-includes/pluggable.php:1144
- "E-mail: %s", wp-includes/pluggable.php:1137
- "[%s] New User Registration", wp-includes/pluggable.php:1139
- "Password: %s", wp-includes/pluggable.php:1145
- "[%s] Your username and password", wp-includes/pluggable.php:1148
Used in visual editor (entities break it):
- "Edit Image", wp-includes/js/tinymce/langs/wp-langs.php:421
- "Delete Image", wp-includes/js/tinymce/langs/wp-langs.php:422
Used in an alert() message:
- "Enter a word to look up:", wp-includes/script-loader.php:76
Obviously these were marked for my locale's need, I think all the strings pertaining to these context should be properly commented about this.
Hopefully it is not too late (and is quick enough) for inclusion with 2.8.
Attachments (4)
Change History (24)
#3
follow-up:
↓ 4
@
16 years ago
- Keywords has-patch needs-testing dev-feedback added; needs-patch removed
- Milestone changed from 2.9 to 2.8
Hello there. Long time commenter, first time patcher. Trying to get this into 2.8 if I can. Patches are all against latest trunk.
I tried my hand at make patches for 3 of the 4 contexts I wrote about. Since I'm not sure I'm doing anything well, I'd like to submit those for consideration by the core-devs, before digging into the 4th, much longer one.
As far as I can tell, I've followed the "translators comments" way to the letter, but if Nikolay has advices about it, or if the warning message itself is not too great, I'm willing to amend the patches as needed.
#4
in reply to:
↑ 3
@
16 years ago
Replying to xibe:
Hello there. Long time commenter, first time patcher. Trying to get this into 2.8 if I can. Patches are all against latest trunk.
You're doing great imo. :-)
#5
follow-up:
↓ 6
@
16 years ago
Looks good to me too. There are several files where all strings are used either in a feed or in js (feed-atom-comments.php, feed-rss2-comments.php, wp-langs.php, script-loader.php, ...), perhaps we need to add the warning once at the top in them.
#6
in reply to:
↑ 5
@
16 years ago
Replying to azaozz:
...perhaps we need to add the warning once at the top in them.
Well, that might take some thinking, hence time, hence miss the 2.8 release.
Until then, here goes the full patch for all the strings of all noted files. Please make sure I didn't make any glaring mistake in pluggable.php, such as adding a second semi-colon to already-existing translators comments.
I have slightly amended the text, going from "do not use HTML entities ( , etc.): string is used in[context]" to "Note: do not use ...".
Apart from that, the other files haven't seen much change since their first pages.
Note that I can't proclaim to have touched upon all need strings, only as many as I thought were necessary.
Discuss :)
#8
@
16 years ago
- Owner changed from azaozz to nbachiyski
All strings in script-loader.php and wp-langs.php are used in js (they are inside <script> tags). Don't think adding a comment to each string there is a good idea, may need a better way to mark them.
#9
@
16 years ago
- Milestone changed from 2.8 to 2.9
We have computers on our side and we can do better than telling the translators not to use entities. In all cases we can properly escape entities if they aren't allowed. It can wait until next version, though.
#12
@
10 years ago
- Keywords close added; needs-patch removed
- Resolution set to duplicate
- Status changed from reviewing to closed
#13
@
10 years ago
- Keywords close removed
- Milestone changed from Future Release to 3.4
- Resolution changed from duplicate to fixed
#14
@
9 years ago
Hello! It's been a long time :)
So, I didn't take a close at the email-fix ticket (#13488) listed by @chriscct7, but as it turns out now, that ticket only removed the HTML entities from the English email strings, whereas I requested a context so that translators wouldn't add their own entities (namely, in French, we'd have a
before any double sign: ?
;
!
:
).
Should I open another ticket about this?
#16
@
9 years ago
@xibe Whoops, sorry about that. I'd recommend opening a new ticket and link it back to this one. That way we can keep it focused
#17
@
9 years ago
- Resolution changed from fixed to duplicate
Marking as a duplicate of newly opened #33073, since this was never fixed.
This kind of stuff usually depends on whether a patch is around on the spot...