Opened 2 years ago
Closed 2 years ago
#15798 closed defect (bug) (fixed)
The word „Comment“ is not translated in the dashboard
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | I18N | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch commit dev-reviewed |
| Cc: |
Description
I am translating Wordpress into lithuanian using Poedit. And I noticed that there is a conflict with plural form.
In the /wp-includes/theme-compat/comments-popup.php I found a line (56)
<p><cite><?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> <?php printf(__('by %1$s — %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
So I decided to change that line into
<p><cite><?php comment_type(_x('Comment'), __('Trackback'), __('Pingback')); ?> <?php printf(__('by %1$s — %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
_x('Comment') instead of __('Comment')
Now Poedit finds the plural form of „Comment“ and translates it in the Dashboard.
It works, but I don't know if it is a correct decision.
Attachments (1)
Change History (9)
comment:2
SergeyBiryukov — 2 years ago
- Keywords has-patch commit added; Comment removed
I'm not sure if this fixes the bug here (I don't see a bug here) but we should simply call comment_type() without arguments. That way "Comment" is then translated like so: _x( 'Comment', 'noun' ).
I'm not a big fan of fixing the file in theme-compat because they were meant to be frozen in time.
But this looks like a sensible change to them as it is for I18N purposes only.

Don't you use .pot files for translation? They provide more accurate results when searching for new strings than updating from source files.