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

Chinese Traditional(Taiwan) "繁体中文(台湾)" doesn't work. #4277

Closed
rankun203 opened this issue Sep 12, 2016 · 5 comments · Fixed by #6575
Closed

Chinese Traditional(Taiwan) "繁体中文(台湾)" doesn't work. #4277

rankun203 opened this issue Sep 12, 2016 · 5 comments · Fixed by #6575
Assignees
Milestone

Comments

@rankun203
Copy link

rankun203 commented Sep 12, 2016

Your Rocket.Chat version: (0.39.0)

After I check the language of "繁体中文(台湾)", it backs to Chinese Simplified(中文) instead of Chinese Traditional language(繁体).

I've checked the translation file, it's already there, but the interface failed to use it.

@MartinSchoeler MartinSchoeler added this to the Important milestone Sep 13, 2016
@MartinSchoeler
Copy link
Contributor

I think it might have something to do with the uppercase in the "zh-TW" since this happens with other languages that have "-" after its name

@MartinSchoeler
Copy link
Contributor

capture2

@rankun203
Copy link
Author

rankun203 commented Sep 16, 2016

Yes, the server got the zh-TW language setting, but the frontend just loads the part before -.

@setLanguage = (language) ->
    if !language
        return

    if loadedLanguages.indexOf(language) > -1
        return

    loadedLanguages.push language

    if isRtl language
        $('html').addClass "rtl"
    else
        $('html').removeClass "rtl"

    language = language.split('-').shift() # startup.coffee#42
    TAPi18n.setLanguage(language)

    language = language.toLowerCase()
    if language isnt 'en'
        Meteor.call 'loadLocale', language, (err, localeFn) ->
            Function(localeFn)()
            moment.locale(language)

What would this split('-').shift() use for? Will something break if I remove this line? If remove it can fix this, I'll be happy to make the pull request. Thanks.

@rankun203
Copy link
Author

Is there any update on this?

@garychapman
Copy link
Contributor

garychapman commented Jan 30, 2017

@RocketChat/core Could we get some clarification on this please? We're about to utilise this functionality with both mainland and Taiwanese Chinese customers. Thanks!

@rodrigok @Sing-Li Any insights on this? It's about to become a critical issue for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants