WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#6797 closed defect (bug) (fixed)

Link to comments in default i18n theme are not fully localizable

Reported by: RanYanivHartstein Owned by:
Milestone: 2.5.1 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

The i18n theme in the polyglot repos does not support translation of the
string "Comments Closed" in comment links.

The comment link function looks like this:

<?php comments_popup_link(__('No Comments &#187;', 'kubrick'), 
__('1 Comment &#187;', 'kubrick'), 
__('% Comments &#187;', 'kubrick')); ?>

To allow localization of the "Comments Closed" string, it should look (for e.g.) like
this:

<?php comments_popup_link(__('No Comments &#187;', 'kubrick'), 
__('1 Comment &#187;', 'kubrick'), 
__('% Comments &#187;', 'kubrick'), 
_c('comments-link|HTML class for comments link', 'kubrick'), 
__('Comments Closed', 'kubrick') ); ?>

These functions appear in index.php, archive.php and search.php. More information about the comments_popup_link function is available in the codex:

http://codex.wordpress.org/Template_Tags/comments_popup_link

I included a patch to fix the comments links in the above files. Patch also adds an HTML class for the comments link, but this is not required and not related to the issue mentioned above.

Attachments (1)

comments-l10n-for-i18n-theme.zip (1.5 KB) - added by RanYanivHartstein 6 years ago.
Patch to allow localization of "Comments Closed" string in default i18n theme

Download all attachments as: .zip

Change History (2)

RanYanivHartstein6 years ago

Patch to allow localization of "Comments Closed" string in default i18n theme

comment:1 nbachiyski6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in revision 4118 of wordpress-i18n.

I didn't add the CSS class, because most of the translators won't need to edit the CSS.

Note: See TracTickets for help on using tickets.