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

FullCalendar locales limited, lang / locale mixup in fullcalendar, implement custom Fc Intl backend #1844

Closed
ongun-kanat opened this issue Jan 18, 2020 · 11 comments · Fixed by #2498
Labels
2. developing Work in progress bug
Milestone

Comments

@ongun-kanat
Copy link

ongun-kanat commented Jan 18, 2020

I use English (Ireland) locale for my user in my Nextcloud. The display language is English US However, the new calendar app shows Sunday as the first day of the week which is wrong for English Ireland.

Steps to reproduce

  1. Set locale English (Ireland) in user settings
  2. Open calendar app

Expected behaviour

The first day of the week is Sunday

Actual behaviour

The first day of the week should be Monday

Calendar app

Calendar app version: 2.0.0

Client configuration

Browser: Firefox 72.0.1

Operating system: Linux

Server configuration

Operating system: openSUSE

Web server: Apache

Database: MariaDB

PHP version: 7.3.13

Nextcloud Version: 17.0.2

Updated from an older installed version or fresh install: Update

List of activated apps:

Enabled:
  - accessibility: 1.3.0
  - activity: 2.10.1
  - admin_audit: 1.7.0
  - apporder: 0.9.0
  - bookmarks: 2.3.4
  - bruteforcesettings: 1.4.0
  - calendar: 2.0.0
  - checksum: 0.4.3
  - cloud_federation_api: 1.0.0
  - comments: 1.7.0
  - contacts: 3.1.6
  - dav: 1.13.0
  - federatedfilesharing: 1.7.0
  - federation: 1.7.0
  - files: 1.12.0
  - files_external: 1.8.0
  - files_frommail: 0.3.0
  - files_markdown: 2.2.0
  - files_pdfviewer: 1.6.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.9.0
  - files_trashbin: 1.7.0
  - files_versions: 1.10.0
  - files_videoplayer: 1.6.0
  - firstrunwizard: 2.6.0
  - gallery: 18.4.0
  - logreader: 2.2.0
  - lookup_server_connector: 1.5.0
  - mail: 1.0.0
  - metadata: 0.10.0
  - nextcloud_announcements: 1.6.0
  - notes: 3.1.1
  - notifications: 2.5.0
  - oauth2: 1.5.0
  - password_policy: 1.7.0
  - passwords: 2020.1.0
  - privacy: 1.1.0
  - provisioning_api: 1.7.0
  - recommendations: 0.5.0
  - serverinfo: 1.7.0
  - sharebymail: 1.7.0
  - socialsharing_email: 1.0.6
  - spreed: 7.0.2
  - support: 1.0.1
  - survey_client: 1.5.0
  - systemtags: 1.7.0
  - tasks: 0.11.3
  - text: 1.1.1
  - theming: 1.8.0
  - twofactor_backupcodes: 1.6.0
  - updatenotification: 1.7.0
  - viewer: 1.2.0
  - workflowengine: 1.7.0
Disabled:
  - encryption
  - user_ldap

Nextcloud configuration:

{
    "system": {
        "dbtype": "mysql",
        "version": "17.0.2.1",
        "dbport": "",
        "dbtableprefix": "oc_",
        "installed": true,
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "tls",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable"
    }
}



Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ongun-kanat ongun-kanat added 0. to triage Pending approval or rejection bug labels Jan 18, 2020
@georgehrke georgehrke changed the title Calendar 2.0.0 displays Sunday as the first day of the week in non-American locale English (Ireland) locale not properly resolved Jan 18, 2020
@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of and removed 0. to triage Pending approval or rejection labels Jan 18, 2020
@georgehrke
Copy link
Member

Indeed it seems to be unable to resolve en_ie and falls back to english us.

@georgehrke georgehrke added this to the 2.0.1 milestone Jan 18, 2020
@georgehrke
Copy link
Member

It's actually loading the correct chunk:

http://nextcloud.local/apps/calendar/js/chunks/calendar.94.4bcded322b2bff7589d3.js

Will need some debugging.

@georgehrke
Copy link
Member

The problem is that fullcalendar itself does not have a locale for ireland:
/~https://github.com/fullcalendar/fullcalendar/tree/master/packages/core/src/locales

We should try to build the locale ourselves based on the information we get from moment in that case.

@georgehrke georgehrke modified the milestones: 2.0.1, 2.1.0 Jan 18, 2020
@georgehrke georgehrke changed the title English (Ireland) locale not properly resolved FullCalendar locales limited, consider using moment plugin. Jan 18, 2020
@georgehrke georgehrke changed the title FullCalendar locales limited, consider using moment plugin. FullCalendar locales limited, lang / locale mixup in fullcalendar, implement custom Fc Intl backend Apr 10, 2020
@m33rc47
Copy link

m33rc47 commented Apr 16, 2020

I think my bug is related to it, if it is not the same.
In my case the full calendar starts with Monday, but the popup calendar starts at Sunday.

Language: English (US)
Locale: German (Germany)

example

@georgehrke
Copy link
Member

@dalins No, it doesn't seem to be related. Can you please open a new issue (filling the entire issue template)

@jgonsior
Copy link

I thought this here is the same as #2175 ? Because if not, I would put the picture from @dalins into #2175 and reopen it?

@georgehrke
Copy link
Member

@jgonsior You talked about "KW" and Ganztägig in the calendar grid, that is a duplicate of this issue.

What @dalins is talking about is not the calendar grid, but the date-picker inside the editor.

@jgonsior
Copy link

I'd say the question is, what is wrong and what is right. Are the German names for the weekdays correct (which I mentioned as well next to "KW" and "Ganztägig") because of the locale setting of the system, or are the English names in the date-picker correct because the language setting of Nextcloud was set to English. So are the displayed German names in the calendar grid correct, and the displayed English names in the date-picker wrong, or is it the other way around?
My intuition would actually be to respect the language setting of Nextcloud and use English names and not the locale setting of the user's system.

@georgehrke
Copy link
Member

The locale should only influence the first day of the week and date formatting like DD.MM.YYYY, MM/DD/YYYY. (and also how to calculate the calendar week, because like for everything, the USA has its desperate need for their own standard ¯\_(ツ)_/¯)

Day names and month names should be in the user's preferred language.

Taking @dalins's example:
Language: English (US)
Locale: German (Germany)

Weekdays: Monday, Tuesday, Wednesday, ...
Month names: January, February, ...

Date format: 16.04.2020 (DD.MM.YYYY)
First day of week: Monday
Time format: 14:01 (HH:MM - 24 hours based)

@jgonsior
Copy link

Perfect, that's what I wanted to report in #2175, but apparently @dalins image was more understandable than my text.

@georgehrke georgehrke added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels May 5, 2020
@georgehrke georgehrke linked a pull request May 5, 2020 that will close this issue
3 tasks
@jkelly99
Copy link

I have the same issue with setting Ireland as my locale and still having Sunday as the first day of the week instead of Monday.
Nextcloud 19.0.0
Calendar app 2.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug
Projects
None yet
5 participants