server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: locale not displayed correctly

Open wivaku opened this issue 3 years ago • 9 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

Issue relates to the UI preview (https:///settings/user), not sure about the rest of the system.

The Nextcloud documentation refers to Momentjs locales. When I check the e.g. UK momentjs locale, it seems to be close to the one I am looking for: dd-mm-yyyy, 24h, Monday. But, it is now shown/used as expected.

There are multiple issues:

  1. the format shown for a country seems to change / is not updated in the UI when I tried just now Canada showed as a preview “yyyy-mm-dd 12h Sunday” (before: Monday), when I select Netherlands it shows 12h even though the momentjs locale is 24h, when I select UK it shows up as dd/mm/yyyy 12h in the Nextcloud UI, instead of the momentjs dd-mm-yyyy 24h format.

  2. the Nextcloud locale combines language and format, but the momentjs locale is for one specific language E.g. momentjs Germany shows the days/months/relative time in German. So when I select in Nextcloud “English (Germany)” I expect Nextcloud picks from the German momentjs definition all the settings except the language related ones and from the English momentjs definition all the language related ones (names of days/months/relative time).

Steps to reproduce

  1. go to the user settings (https:///settings/user)
  2. select / change the locale

Expected behavior

see bug description

Installation method

Official Docker image

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [ ] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "...",
        "overwriteprotocol": "https",
        "trusted_domains": [
            "...",
            "..."
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.3.2",
        "overwrite.cli.url": "...",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "default_phone_region": "...",
        "maintenance": false,
        "enable_previews": true,
        "simpleSignUpLink.shown": false
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.9.0
  - activity: 2.15.0
  - bruteforcesettings: 2.3.0
  - calendar: 3.2.2
  - circles: 23.1.0
  - cloud_federation_api: 1.6.0
  - comments: 1.13.0
  - contactsinteraction: 1.4.0
  - dashboard: 7.3.0
  - dav: 1.21.0
  - federatedfilesharing: 1.13.0
  - federation: 1.13.0
  - files: 1.18.0
  - files_external: 1.15.0
  - files_pdfviewer: 2.4.0
  - files_rightclick: 1.2.0
  - files_sharing: 1.15.0
  - files_trashbin: 1.13.0
  - files_versions: 1.16.0
  - files_videoplayer: 1.12.0
  - firstrunwizard: 2.12.0
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - maps: 0.1.10
  - nextcloud_announcements: 1.12.0
  - notifications: 2.11.1
  - oauth2: 1.11.0
  - password_policy: 1.13.0
  - photos: 1.5.0
  - privacy: 1.7.0
  - provisioning_api: 1.13.0
  - recommendations: 1.2.0
  - richdocuments: 5.0.3
  - richdocumentscode: 21.11.204
  - serverinfo: 1.13.0
  - settings: 1.5.0
  - sharebymail: 1.13.0
  - support: 1.6.0
  - systemtags: 1.13.0
  - text: 3.4.1
  - theming: 1.14.0
  - twofactor_backupcodes: 1.12.0
  - twofactor_totp: 6.2.0
  - twofactor_u2f: 6.3.0
  - updatenotification: 1.13.0
  - user_status: 1.3.1
  - viewer: 1.7.0
  - workflowengine: 2.5.0
Disabled:
  - admin_audit
  - contacts: 4.1.0
  - encryption
  - mail: 1.11.7
  - spreed: 13.0.4
  - survey_client: 1.11.0
  - user_ldap
  - weather_status: 1.3.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

[08/Apr/2022:11:21:22 +0000] "PUT /ocs/v2.php/cloud/users/userxyz HTTP/1.1" 200 922
[08/Apr/2022:11:21:22 +0000] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 1307

Additional info

No response

wivaku avatar Apr 08 '22 11:04 wivaku

Yes, this is also confusing me, and in the documentation it says "default_locale" => "en_US", even though en-us weirdly enough is not available in moment.

The format for English (Germany) is also completely off, basically showing US format, and I cannot find where the locale settings are even respected to check if this is only a preview issue. It is also sorted into a point at the list where it should be called English (Deutschland)

For example the notification date format for calendar entries does not update if I change the locale - at least for some locales, e.g. image But wait, the calendar uses the correct one? image

Now I switched to German, where the notifications are formatted correctly but the calendar uses US date format? Wat? image

Something is seriously wrong here.

Amendment: Okay so apparently the calendar top bar in the weekly view ignores the locale, but everything else there respects the locale. On the other hand, the formatting in the notifications is indeed off sometimes.

xeruf avatar May 06 '22 12:05 xeruf

"Week starts on" seems to coming up as Sunday for all locales, too, which is nonsense. The ISO standard is Monday

politas avatar May 22 '22 10:05 politas

@politas the issue for incorrect week day is #21614

lindhe avatar Jul 02 '22 13:07 lindhe

Changing locale to en-au (Australia) and does not show Monday as first day of week. Chaning to locale en europe and it does say Monday is the first day, but calendar still shows Sunday. I am unable to have Calendar show Monday as the first day of the week, no matter what locale I use. (this is a regression, it used to work).

lyallp avatar Jan 05 '23 10:01 lyallp

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

szaimen avatar Jan 23 '23 13:01 szaimen

I'm on Nextcloud 25.0.2 at the moment, and I'm still seeing the calendar starting on Sunday when my locale is set to English (World), which claims to use Week Starts on Monday.

politas avatar Jan 23 '23 21:01 politas

I am on nextclound 25.0.2 - I will upgrade as soon as I can....

lyallp avatar Jan 23 '23 22:01 lyallp

Still having the same problem on v26.0.2

Also, there was already a related issue: #24134

@szaimen can you have a look please?

adripo avatar Jun 14 '23 10:06 adripo

Nextcloud 25.0.4 and Calendar 4.4.2 still exhibit this behavior.

lyallp avatar Jun 14 '23 11:06 lyallp

Now on Nextcloud 27.0.0 and English (Australia) is putting the dates around the right way, though English (Europe) is still making it the US format, presumably because "Europe" doesn't match any particular country?

politas avatar Jul 14 '23 22:07 politas

Australia now shows DD/MM/YYYY, which is good in NextCloud 27 It would be nice if I could configure the start of week, as in Monday, not Sunday, separately from the locale.

FYI: as a user, not an administrator, I do not know how to find out what version of NextCloud I am using!

lyallp avatar Jul 15 '23 03:07 lyallp

@lyallp Follow #21614 For the start of week bug.

politas avatar Jul 15 '23 20:07 politas