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 #27

Closed
silberzwiebel opened this issue Dec 6, 2018 · 3 comments
Closed

translations #27

silberzwiebel opened this issue Dec 6, 2018 · 3 comments

Comments

@silberzwiebel
Copy link
Contributor

I'd like to have this nice poll plugin in languages different than English (in particular: in German). Happy to translate it to German but not sure if and how this works. It would be great if the poll can "just" use the same mattermost's language setting. Thanks!

@M-Mueller
Copy link
Owner

I wanted to learn how internationalization works in Python anyway, so I'm happy to do that.

Figuring out the correct language for each user could be tricky though, since it is not part of the request send by Mattermost. Maybe there is something in the API.

M-Mueller added a commit that referenced this issue Dec 10, 2018
Add German translation
M-Mueller added a commit that referenced this issue Dec 13, 2018
* Add localization support (#27)

Add German translation

* Update travis configuration

Fix tests using from settings module

* Add option to overwrite locale

Simplify parse_slash_command
@M-Mueller
Copy link
Owner

The poll is now using the account's language setting. The language will be the same for everyone seeing the poll. E.g. if you create a poll in German, English users will see it in German as well. This is a restriction of the Mattermost slash command but I think it makes sense anyway since the message the user enters is not translated in the first place.
The user can also force a certain language with the --locale command.

@silberzwiebel
Copy link
Contributor Author

Thanks, that was quick :)

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

No branches or pull requests

2 participants