#36790 closed defect (bug) (fixed)
Wrong month name declension
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.6 | Priority: | normal |
| Severity: | normal | Version: | 4.4 |
| Component: | I18N | Keywords: | needs-unit-tests |
| Focuses: | Cc: |
Description
Previously #11226.
Czech month names:
June - Červen - června (declension)
July - Červenec - července (declension)
When I use j. F Y date format, website displays for example 10/7/2015 as 10. červnaec 2015 instead of 10. července 2015.
You can try to Google červnaec, there are many results for this wrong declension.
Attachments (3)
Change History (16)
#3
@
10 years ago
@SergeyBiryukov: Hi, there are many reports related to this problem and July is slowly coming :-( All websites with particular date format are affected in our language. Should I create plugin for filtering date or localization cs_CZ.php file?
#6
@
10 years ago
- Keywords needs-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 4.6
- Owner SergeyBiryukov deleted
- Status changed from assigned to reviewing
#7
@
10 years ago
Hi everyone,
I would like to notice bug in function wp_maybe_decline_date for preg_replace pattern.
In our czech language we have 2 months with similar root word so it detects previous month and replace this root word.
Solutions is update pattern for preg_replace from
'#' . $month . '#'
to
'/\b' . $month . '\b/u'
Best regards,
Jan
#9
@
10 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from reviewing to closed
In 37717:
Problem is actually in
preg_replace()function here: https://core.trac.wordpress.org/browser/tags/4.5.2/src/wp-includes/functions.php#L192