Gutenberg: DateTimePicker: Localize Weekdays

Created on 17 Jan 2018  路  8Comments  路  Source: WordPress/gutenberg

Issue Overview

I use a locale 'de_DE' WordPress version.
The month is translated correctly, but the weekdays should start on Monday (Montag) and should be localized Mo, Di, Mi, Do, Fr, Sa, So.

weekday

Internationalization (i18n) [Feature] Document Settings [Status] In Progress [Type] Bug

All 8 comments

I believe this is inherited from the ReactDatePicker component. If so, we'll need to figure out how to pass localization through. I believe this is where the names are being generated: https://github.com/Hacker0x01/react-datepicker/blob/master/src/calendar.jsx#L273-L281

_This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs._

Related to #1311

One user just pointed out in a support ticket that he expected the date-picker to adhere to the "Week Starts On" - choice
screen shot 2018-08-17 at 5 37 27 pm
set via WP-Admin > Settings > General.
When it's set to Monday, the date-picker in Gutenberg also should start on Monday.

Also reported here #9109

Tested and confirmed that strings in the date picker (and also the "Status & Visibility" sidebar panel) do not appear to be translated even though the strings do appear to have translations at https://translate.wordpress.org/ (such as "Status & Visibility" and "October", though I couldn't find the option to translate short weekdays like "Fri" in a search).

  1. Go to Users > Your Profile > Language, set the language to Site Default, and save changes.
  2. Go to Settings > General > Site Language, set the language to Deutsch, and save changes.
  3. Go to Beitr盲ge > Erstellen.
  4. Go to Settings > Document > Status & Visibility > Publish.
  5. Click "Immediately" (or the date) to open the DatePicker.
  6. Check to see if the strings in the date picker are localized.

Result: strings such as "October" that have translations at https://translate.wordpress.org/ do not show up as translated in the date picker and strings for short weekdays such as "Fri" do not appear to have entries at https://translate.wordpress.org/ at all.

screen shot 2018-11-01 at 4 17 55 pm
Seen at http://alittletestblog.com/wp-admin/post-new.php with site language set to de_DE (screenshot) and profile language set to site default language (screenshot) running WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 using Firefox 63.0 on macOS 10.13.6.

@Soean are you seeing the same thing? and are these now two separate issues that should be filed separately?

Yes, I see the same, we don't need a separate issue.
The datepicker has changed since I reported the bug, but it is still not localized.

When a post gets scheduled or published, the shown date under "Publish" is also not localized.

Gutenberg 4.3
WordPress 4.9.8

I'm looking to see if we can localize the datepicker

Was this page helpful?
0 / 5 - 0 ratings