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

Translations. Chinese zh-cn should become zh-hans. #2688

Closed
larryhq opened this issue Mar 13, 2015 · 20 comments
Closed

Translations. Chinese zh-cn should become zh-hans. #2688

larryhq opened this issue Mar 13, 2015 · 20 comments
Labels

Comments

@larryhq
Copy link

larryhq commented Mar 13, 2015

zh-cn will expired in Django1.9, the new format is zh-hans, but drf3.1.0 does not support this type of language.

@tomchristie
Copy link
Member

Are you able to provide any more info, links, what we need to do exactly?
Is this just a case of changing the language code / file names?

@larryhq
Copy link
Author

larryhq commented Mar 16, 2015

In drf3.1's Internationalization, i want to translationed the error response . In dango now chinese is config in settings.py like this:

LANGUAGES = (
    ('zh-hans', _('Simplified Chinese')),
    ('zh-hant', _('Traditional Chinese'))
)

but zh-hans is not support in drf3.1.so, I can't translationed the error response to chinese

@tomchristie
Copy link
Member

Which of the two language dialects do our current translations match best?

@larryhq
Copy link
Author

larryhq commented Mar 17, 2015

both can, but because of zh-cn is expired in django1.9,so, my settings.py's language config is zh-hans.

@tomchristie
Copy link
Member

Okay, so let's plan to update zh-cn to zh-hans then?
In 1.9 does Django simply drop the previous language key? What about users who have that currently in their cookie language settings or whatever?

@tomchristie tomchristie changed the title drf3.1.0 not support language with zh-hans Translations. Chinese zh-cn should become zh-hans. Mar 23, 2015
@tomchristie
Copy link
Member

Updated the title of this to reflect what sounds like the right action based on this conversation.

@deronnax
Copy link
Contributor

deronnax commented Apr 3, 2015

zh-cn will become zh-hans ("simplified", mostly used in China), and zh-tw will become zh-hant ("traditional", mostly used in Taïwan). https://docs.djangoproject.com/fr/1.7/internals/deprecation/#deprecation-removed-in-1-9
I don't have the answers to the other question :)

@tomchristie
Copy link
Member

Thanks @deronnax - that's really helpful.

@nyssance
Copy link
Contributor

Will this be update at 3.3.0?

@xordoquy
Copy link
Collaborator

This will be added once we have Django 1.9 support

@xordoquy
Copy link
Collaborator

oh wait, this is already ongoing with Django, my bad.
I just added the two languages to the transifex platform. Feel free to join then.

@nyssance
Copy link
Contributor

Can not join the team.

@wtx358
Copy link

wtx358 commented Dec 17, 2015

In version 3.3.2, I found zh-Hans and zh-Hant in locale folder, but when I set LANGUAGE_CODE = 'zh-hans' in django settings, the API response is not Chinese.

So I look up django's locale folder, I can see zh_Hans and zh_Hant, but in drf3.3.2's locale folder, they are zh-Hans and zh-Hant.

@xordoquy
Copy link
Collaborator

Already solved in #3739 thanks to @nypisces

@nyssance
Copy link
Contributor

Need update from tx,rename folder 'zh-Hans' to 'zh_Hans', and 'zh-Hant' to 'zh-Hant'. now the folder name still error.

@xordoquy
Copy link
Collaborator

Bumping this issue.
@nypisces sorry to bother you. Our transifex issues should now be fixed but my understanding of the translation is extremely basic.
Do we still have issues with zh-Hans and zh_Hant ?

@nyssance
Copy link
Contributor

nyssance commented Mar 27, 2017

@xordoquy like Django locale, zh_Hans & zh_Hant are correct, DRF locale still have wrong folder(zh-Hans & zh-Hant)

@xordoquy
Copy link
Collaborator

That's weird, folder name seems to be correct. Could this be this line: https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/locale/zh_Hant/LC_MESSAGES/django.po#L17 ?

@xordoquy
Copy link
Collaborator

@nypisces thanks a lot for your guidance !

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

No branches or pull requests

6 participants