Problem with expiry date field on French sites
danjjohnson opened this issue · comments
2723110-t
Was working fine recently. Maybe due to an update of WP Job Manager or Wordpress?
I fixed it on my site by removing the translation with Loco Translate. But this fix will be canceled by each update...
This happens with Italian localization as well:
But the field placeholder appears to be correctly localized:
Also, I believe the error causes the datetime picker to be misplaced when editing the page (it then moves back to the proper position after clicking the field):
Of the many datepickers in my installation, this is the only one behaving that way.
I have no errors in my js console.
Confirmed this happens when a translation changes the yy-mm-dd format to something else (e.g. Italian aa-mm-gg) This breaks the datepicker
Temporary workaround is to install Loco Translate and change that string back to yy-mm-dd
You can then move the language file to the wp-content/languages/plugins directory to prevent it being updated.
I changed the language of my test site to French but the date picker in the post editor behaved correctly on a new job and while editing an existing job.
I tried Italian too, but that showed "aa-11-gg" in the datepicker of the post editor.
The French .po now has this translation:
msgctxt "Date format for jQuery datepicker"
msgid "yy-mm-dd"
msgstr "yy-mm-dd"
While the Italian one is:
msgctxt "Date format for jQuery datepicker"
msgid "yy-mm-dd"
msgstr "aa-mm-gg"
jQuery doesn't understand aa and gg. Here's the date format in jQuery which does not include aa or gg. I'll update the description of that strings and link to that page.
@akirk has suggested changes to the French and Italian translations on WordPress.org to fix these errors, and I have checked in translator comments linking to the documentation for the date formats in PHP and Javascript where they're needed.