-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add localization support #24
Comments
Yes, localisation support would be a really nice feature to have.
|
It's not as difficult as it sounds, but you're right. Here we will need to make many changes.
I will try to make edits, and if it works out, I’ll throw you the code. |
I tried to add a translation. To do this, you need to make some edits. Add to each file in which you want to translate: Create file awlsim/common/locale.py:
Add underscore in each place of translation like this: Also in Poedit do the import of Python files and put the result of the translation into awlsim/locales/ru/LC_MESSAGES/base.mo |
Ok, yes. There are a couple of things that need clarification, though:
That can lead to crashes, if it translates do %d. It should work independently of the string expansion being used. Say printf-style, format-style of f-string-style.
|
The application searches for files on the specified path:
I have not worked with github before, I’ll try not to mess too much. |
As I understand it, the error message code is not optimized to create localization. There is no great need for this, but it would be nice to add this feature too.
Just add "_ ()":
Also need to be added at the beginning:
and something like this:
The text was updated successfully, but these errors were encountered: