Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with expiry date field on French sites #697

Closed
danjjohnson opened this issue Jun 21, 2016 · 7 comments
Closed

Problem with expiry date field on French sites #697

danjjohnson opened this issue Jun 21, 2016 · 7 comments

Comments

@danjjohnson
Copy link
Contributor

When site language is set to Français, the date field doesn't work properly, it displays letters instead of the day and year:

image

May affect other locales, but I tried a few and only found French to be an issue.

2701237-t

@danjjohnson
Copy link
Contributor Author

2723110-t

@paramedicquebec
Copy link

Was working fine recently. Maybe due to an update of WP Job Manager or Wordpress?

@matthieubrunet
Copy link

I fixed it on my site by removing the translation with Loco Translate. But this fix will be canceled by each update...

@pgmassari
Copy link

This happens with Italian localization as well:

screenshot-2016-08-05 12-04-24

But the field placeholder appears to be correctly localized:

screenshot-2016-08-05 12-17-31

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):

screenshot-2016-08-05 12-05-30

Of the many datepickers in my installation, this is the only one behaving that way.
I have no errors in my js console.

@chaselivingston chaselivingston added this to the 1.25.1 milestone Aug 5, 2016
@danjjohnson
Copy link
Contributor Author

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

screen shot 2016-08-09 at 16 00 43

You can then move the language file to the wp-content/languages/plugins directory to prevent it being updated.

@donnchawp
Copy link
Contributor

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.

donnchawp added a commit that referenced this issue Oct 17, 2016
Fixes #697
The Italian and French translations are incorrect as the translators changed the date form from "yyyy" and "dd" to the first letter of the words in those languages. I'm adding a link to the official documentation for the date format in PHP and Javascript respectively for each of these to help translation.
donnchawp added a commit that referenced this issue Oct 17, 2016
Fixes #697
The translators comment tells the translator what to use when translating these date formats, rather than using the local word for a given time period.
donnchawp added a commit that referenced this issue Oct 17, 2016
* Add link to date format to avoid confusion

Fixes #697
The Italian and French translations are incorrect as the translators changed the date form from "yyyy" and "dd" to the first letter of the words in those languages. I'm adding a link to the official documentation for the date format in PHP and Javascript respectively for each of these to help translation.
@donnchawp
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants