-
Notifications
You must be signed in to change notification settings - Fork 1k
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
updated german translation #1150
Conversation
Hmm, wasn't the utils file fixed in #1146 by @DivingDuck? |
locale/de/LC_MESSAGES/pronterface.po
Outdated
msgid "Dis&connect" | ||
msgstr "Trennen" | ||
msgstr "Trennen&Verbinden" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what's happening here?
locale/de/LC_MESSAGES/pronterface.po
Outdated
@@ -2321,27 +2320,27 @@ msgstr "" | |||
|
|||
#: printrun/settings.py:333 | |||
msgid "Custom device pattern: for example /dev/3DP_* " | |||
msgstr "" | |||
msgstr "Individuelle Geräte Struktur: zum Beispiel /dev/3DP_* " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use Muster rather than Struktur for this
locale/de/LC_MESSAGES/pronterface.po
Outdated
|
||
#: printrun/settings.py:333 | ||
msgid "Device name pattern" | ||
msgstr "" | ||
msgstr "Struktur des Gerätenamen" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I'd use Muster rather than Struktur here
for me its not working on Debian GNU/Linux bullseye/sid x86_64 |
We merged @DivingDuck's version of the file into this repository's master in #1146 so the current utils.py in this repo should be the same now. |
and are not the same. |
Oh I see! @DivingDuck can you have a look at this when you have a chance? |
Hi @kliment, Side note, my old Gauges branch will change hopefully this week as this was based on RC5. I will soon start to rebuild a new Gauges branch in my repository with the actual master RC7+ branch from here. So the merged version from yesterday should be the correct one. @freddii, I saw you did some updates for the German translation. Did you generate a new general .po file from the actual source files and then updated this? |
I am running pronterface inside the git repo folder with: if i print the variable shared_locale_dir from line 39 in line 40 from file utils.py with: i get the output: Of course that path exists, but its not the correct path to pronterface translations that gets checked in line 43 If i print out that translation variable with: i get the output: Expected behaviour in my case would be: Removing lines 43-45 (if...else:) and bringing the line after that in the correct position, fixed it for me. |
@freddii , what is your OS? |
Debian GNU/Linux bullseye/sid x86_64 |
I can confirm the described behaviour (also on a Debian Sid machine). However I believe '/usr/share/locale' is the right place where the program should look for translations. When properly installed on a Linux system, that's where the translations should be. Instead of checking whether 'shared_locale_dir' exists I would check for the existence of {pronterface,plater}.mo in 'shared_local_dir'. If not, then search in './locale'. |
Yes but right now the file Another idea for fix: |
Well, the relative location ./locale is originally for windows installations. The extension of the path .../country code/LC_MESSAGES/... is done by the gettext library. In the past we had hard coded locations that was proofed for Linus/OSX and Windows: '/usr/share/locale' (Linux ?) What should we do? I can do the hard coding again for the translation, but I'm not happy about this as I like the idea not to have hard coding for different paths. @hroncok , any thoughts? Testing for each possible translation isn't a realistic option for me as I want to have translations open for everyone to add w/o the need of compiling pronterface new with each additional language. I'm open for your suggestions. |
this fixed it for me. Maybe you can confirm if its still working on windows. |
How about we first try to get the translation from the 'shared_locade_dir', and if that fails, default to './locale'. I haven't checked what error (if any) are thrown by 'gettext'.
|
The fix from @freddii works for windows as the fallback is now the first check. No change for windows users in the end. A question, that is still open for me, will it work for OS-X and other Linux distributions? Edit: |
@rockstorm101 version is working here too and seams to be more professional. |
german translation only works with an fixed utils file:
https://github.com/DivingDuck/Printrun/blob/3b0ea8224c1913ad13aa3dbf46049f0907dfd992/printrun/utils.py