nextcloud / nextcloud/server

[Bug]: locale not displayed correctly

Open
#31,890 12 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback bug feature: language/translations (l10n/i18n) feature: settings needs review
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the locale preview issue at /settings/user, then compare the Nextcloud language-configuration documentation with the referenced Moment.js locale definitions. Trace the locale handling from the user-settings entry point; done means country-specific date, time, and week settings display correctly while language-specific names remain appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
frontend, internationalization, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.