Opened 7 years ago
Closed 7 years ago
#3244 closed defect (bug) (fixed)
tiny i18n fix
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | lowest | Milestone: | 2.1 |
| Component: | General | Version: | 2.0.4 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
comments_number function is not outputting internationalized strings.
Attachments (5)
Change History (9)
comment:1
Viper007Bond — 7 years ago
comment:2
markjaquith — 7 years ago
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
Hm, don't think so. And for more than one, we need to use __ngettext()
See patch. I also re-ordered the logic, removed the last test (after all, if a positive integer isn't greater than one, and isn't zero, it MUST be one), and passed the number of comments to the filter at the end, to make it easier for plugin authors to use the filter (no need to preg_match() the number).
Passing variable strings to ngettext() is sketchy. The variable names can end up in the catalog.
Note: See
TracTickets for help on using
tickets.

I believe it is assumed that the inputted strings are already internationalized.