Skip to content

Date picker not displays on event creation in other language like Chinese Simplified #50

Description

@Ecss11

Description

The code can be found in js/src/forum/components

The date picker does not loaded when forum language is Chinese Simplified because const userLang = app.translator.getLocale(); return zh-Hans instead of zh, this caused the JS not loaded correctly when calling flatpickr's functions. In nutshell, flatpickr requires zh, while the flarum method return zh-Hans.

Possible Fix

Currently, we replace the const userLang with zh to solve the problem. In alternative, I think the problem can also be solved by creating a mapping to these particular languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions