-
Notifications
You must be signed in to change notification settings - Fork 732
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
Wrong date format on non-English locales #9042
Comments
can you paste the output of |
Also, write down in Chinese the expected date and explain its components (month, week, day..) so we can troubleshoot what's happening. |
My libcinnamon-desktop4 version is 4.4.1, the locale command shows zh_CN.UTF-8 is on strings except LANGUAGE (zh_CN) and LC_ALL (blank) . The expected date in Chinese with Ruby date syntax is: %Y年%b%d日 %A (a la YYYY/MM/DD *day) |
I can confirm a similar bug for locale LC_TIME=sr_RS@latin. I have the interface language set to en_US UTF-8 and the Region and Time Format set to sr_RS@latin. I have the same version of libcinnamon-desktop4 (4.4.1). The expected date format in Serbian (Latin) is correct in /usr/share/i18n/locales/sr_RS@latin (%A, %d. %B %Y.), but in Calendar applet (and tooltip) it shows the en_US date format (%A %B %e %Y) literally translated into Serbian (Latin) language |
Similar bug for |
Same bug in Polish, its now: "DayOfTheWeek monthName, dayNumber, yearNumber", dunno how it was in 19.2 but it should be: "DayOfTheWeek dayNumber monthName yearNumber" |
I didn’t know that the comma was a mistake. That’s what it shows on mine with the french canadian language with 19.3 |
Wrong date format here as well. In the calendar pop-up/applet it's "day month date, year" when it should be "day, date month year". And directly in the system tray the year was missing. Reference: IBM Knowledge Center
|
OK back to the drawing board on this one... I'll troubleshoot my own locale:
Source code: The relevant code in the applet is:
Which calls these two functions in libcinnamon-desktop:
and
Translations: The relevant translation here is Cinnamon's FR mo file in
In the resulting file, we look up
Execution: When we call Anyway, so when we call this, According to our translations, this should return By the time we call So in the case of @claudiux and @gillcar here, this isn't a bug. |
It looks like the issue is with incomplete translations. All I'm getting is this:
For any other languages, if there's no translation for |
Here's zh_CN not translated for instance: https://translations.launchpad.net/linuxmint/latest/+pots/cinnamon/zh_CN/443/+translate. Note that it might be translated in some languages in Launchpad and not yet pushed towards cinnamon-translations (cinnamon-l10n). In cinnamon-l10n 4.4.1, only translations for da, de, fr, fr_CA, hr, hu, lt and tr are present apparently. |
Thank you Clem for clearing this out. I am not a coder, but as I used to translate a lot from English into Serbian and vice versa, I took the liberty to sign up to the Serbian Translation Team for Linux Mint and proposed a missing translation for line 443 in Template "cinnamon" for Serbian Latin (sr@latin) language. By the way, I had no idea how much translation is missing for this specific language. I'll have to make a New Year's resolution to translate as much as I can in 2020 :) |
Thanks, I started updating the Romanian translation. 😁 |
I have 19.3, but I feel that I have this format "issue" since 18.2 when I started using linux. I have the time format (in Language Settings) set to English, United Kingdom, even though I live in Czech Republic, I like my system in English. |
I was just checking what seems the standard date format in Quebec, Canada and found a few examples like this one https://www.timeanddate.com/worldclock/canada/quebec |
The French translation (fr_FR) has just been modified: https://translations.launchpad.net/linuxmint/latest/+pots/cinnamon/fr_FR/443/+translate |
@claudiux you made a mistake.. it should be %A %e %B %Y |
@clefebvre Sorry. This is corrected. |
I'll go through the main locales today and issue an update. |
I'll use the formats available at http://www.localeplanet.com/icu/en/ as a reference. |
Following the information available at https://www.localeplanet.com/compare/date-pattern.html?pat=FULL, I came up with the following formats:
|
Great... |
I didn't really understand how to translate the Thai format into strftime... the year in particular, if anyone from Thailand can help with that, we can add it in before the next update. |
Is it just me, or is there an extra p. at the end? That would be just an extra am/pm right? |
%-e means non-padded and no leading zero. The p. comes from http://www.localeplanet.com/compare/date-pattern.html?pat=FULL |
Fixed in cinnamon 4.4.7 and cinnamon-l10n 4.4.2 for the following locales:
for any other locale, please translate at https://translations.launchpad.net/linuxmint/latest/+pots/cinnamon |
After the update and even restart, with the new update to cinnamon 4.4.7, with a UK time format in my language settings, the header and hover on the calendar app is still "Monday January 6, 2020" |
Sadly, here also the issue remains, for language Serbian, Serbia UTF8@latin... BTW, even the Cyrillic version of the Serbian language, which is 99.9% translated, has this same bug. |
You fixed it for https://translations.launchpad.net/linuxmint/latest/+pots/cinnamon/fr/443/+translate https://translations.launchpad.net/linuxmint/latest/+pots/cinnamon/fr_FR/443/+translate |
no, fr should be enough... we don't need fr_FR. |
I must have missed something.. you're still getting the old en_US msgid.. this changed to having two comas in 4.4.7. |
|
yes, but we don't need fr_FR mo files... fr_XX should match fr.mo if it doesn't match fr_XX.mo specifically. So for instance, we only need an fr_CA to define strings which aren't the same as in fr... and we never need an fr_FR, since fr itself covers it entirely. |
I can reproduce the issue, I'll get it fixed tomorrow. |
OK, it's silly, it's a missing change in the clock applet itself. I can't do it tonight, but it'll be an easy fix tomorrow morning. |
Fixed in Cinnamon 4.4.8 |
Yesss! It works well, now. |
Ah, yes, on the calendar app it works. I was hoping it would work also on "world clock calendar" ^^ It looked the same there. I guess it's an app specific thing...? Well, can't be helped. |
Issue
![2019-12-21 18-06-14屏幕截图](https://user-images.githubusercontent.com/2002796/71306793-ff0f4b80-241f-11ea-90ac-8ae8a2b86ae2.png)
Wrong date format, not as per LC_TIME=zh_CN.UTF-8
Steps to reproduce
*Change locale other than English (US)
*Check the calendar applet or uncheck "Internet time" box on Date & Time setting to see the date format
Expected behaviour
The previous Cinnamon version that shipped with 19.2 DOES NOT occur with this bug.
The text was updated successfully, but these errors were encountered: