Skip to content

Changed incorrect language code de_CH of es_CL #299

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

Merged
merged 4 commits into from
Sep 5, 2020

Conversation

dgmouris
Copy link
Contributor

@dgmouris dgmouris commented Sep 4, 2020

Fixes #297

@Andrew-Chen-Wang
Copy link
Member

Andrew-Chen-Wang commented Sep 4, 2020

Just edited your comment for automatic resolving of issue. Thanks for double checking!

Edit: Just took a look at the .mo file. It turns out that there is a language code in there as well (that's also incorrect). I'm not looking forward to tampering a partially non UTF-8 file that may be binary, so do you mind recompiling the files according to documentation? https://docs.djangoproject.com/en/3.1/topics/i18n/translation/#message-files

Thanks!

This is what I'm seeing in the de_CH django.mo file:

fi��ï������������Ã�������|����������<���Ò���,���.���(���[���2���Ñ���O���∑���������������$���3���4�������h�������Ä�������ê�������¢�������∑�������Ã��� ���Ë�������	�����������
���)���
���4�������?�������C���.���H���G���w���>���ø���*���˛���5���)���X���_���"���∏�������€���6���Î�������"�������<�������O�������d�����������#���ù�������¡�������·�������Ù���������������������%�������)�����������
���������������	���������������������������
���������������������������������������������������������������Authorization header must contain two space-delimited values�Cannot create token with no type or lifetime�Given token not valid for any token type�No active account found with the given credentials�The '{}' setting has been removed. Please refer to '{}' for available settings.�Token '{}' claim has expired�Token Blacklist�Token contained no recognizable user identification�Token has no '{}' claim�Token has no id�Token has no type�Token has wrong type�Token is blacklisted�Token is invalid or expired�Unrecognized algorithm type '{}'�User is inactive�User not found�created at�expires at�jti�user�Project-Id-Version: djangorestframework_simplejwt
Report-Msgid-Bugs-To: 
POT-Creation-Date: 2020-01-04 10:30-0300
Last-Translator: rene <[email protected]>
Language: es_CL
MIME-Version: 1.0

@Andrew-Chen-Wang Andrew-Chen-Wang changed the title Changed language code to de_CH Changed incorrect language code de_CH of es_CL Sep 4, 2020
@Andrew-Chen-Wang
Copy link
Member

Cool, turns out .mo files also needs to be regenerated. I think django-admin makemessages -l de_CH is good enough to update it. @dgmouris

Copy link
Member

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks @dgmouris !

Actually is there a reason why all the paths had to include the package name?

@dgmouris
Copy link
Contributor Author

dgmouris commented Sep 4, 2020

Hey @Andrew-Chen-Wang,

I took a look at some docs (https://docs.djangoproject.com/en/3.1/topics/i18n/translation/) and It looks like I needed to run a couple of things.

  1. django-admin.py makemessages -l de_CH
  2. django-admin.py compilemessages -l de_CH

As well I ran the "makemessages" and compilemessages" and it seems like the mo files for es_CL and ru_RU aren't updated.

UPDATE:
I just compiled them and added them to this PR because it might cause issues to others...

@Andrew-Chen-Wang
Copy link
Member

@dgmouris I took a look at dj-stripe's repo. They don't even have the .mo file and I believe it's because Django will create the .mo file if the developer chooses to support i18n. (i.e. the devs need to run the compile messages or other commands). In this case, it's fine but I'm curious as to why the .po files changed the paths for all of them

@dgmouris
Copy link
Contributor Author

dgmouris commented Sep 4, 2020

@Andrew-Chen-Wang I moved into the rest_framework_simplejwt and it fixed all of the paths to what was expected.

My apologies:) It should be all good now.

Cheers,

Dan

@Andrew-Chen-Wang Andrew-Chen-Wang merged commit 3ed51dc into jazzband:master Sep 5, 2020
@Andrew-Chen-Wang
Copy link
Member

Thanks for the help @dgmouris!

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

Successfully merging this pull request may close these issues.

Incorrect language code
2 participants