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

[Bug]: locale not displayed correctly #31890

Open
4 of 8 tasks
wivaku opened this issue Apr 8, 2022 · 12 comments
Open
4 of 8 tasks

[Bug]: locale not displayed correctly #31890

wivaku opened this issue Apr 8, 2022 · 12 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug feature: language l10n and translations needs review Needs review to determine if still applicable

Comments

@wivaku
Copy link

wivaku commented Apr 8, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • 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 wivaku added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 8, 2022
@xeruf
Copy link

xeruf commented May 6, 2022

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.

@politas
Copy link

politas commented May 22, 2022

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

@lindhe
Copy link

lindhe commented Jul 2, 2022

@politas the issue for incorrect week day is #21614

@lyallp
Copy link

lyallp commented Jan 5, 2023

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

@szaimen

This comment was marked as resolved.

@politas
Copy link

politas commented Jan 23, 2023

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.

@lyallp
Copy link

lyallp commented Jan 23, 2023

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

@adripo
Copy link

adripo commented Jun 14, 2023

Still having the same problem on v26.0.2

Also, there was already a related issue: #24134

@szaimen can you have a look please?

@lyallp
Copy link

lyallp commented Jun 14, 2023

Nextcloud 25.0.4 and Calendar 4.4.2 still exhibit this behavior.

@politas
Copy link

politas commented Jul 14, 2023

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?

@lyallp
Copy link

lyallp commented Jul 15, 2023

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!

@politas
Copy link

politas commented Jul 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug feature: language l10n and translations needs review Needs review to determine if still applicable
Projects
None yet
Development

No branches or pull requests

8 participants