-
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
Update for translation strings and translation files #1406
Conversation
I'm happy to merge this PR already, great work, many thanks. I'll wait in case you want to add anything else.
Very good point. I didn't even realize we weren't shipping translations. There's probably a way to include them using the 'setup.py' process? However, since we should migrate away from |
locale/de/LC_MESSAGES/pronterface.po
Outdated
|
||
#: printrun\projectlayer.py:1150 | ||
msgid "Continue" | ||
msgstr "Fortsetzten" |
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.
typo: Fortsetzen
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.
Good catch, corrected. Thanks a lot
locale/de/LC_MESSAGES/pronterface.po
Outdated
msgid "Fit to plate" | ||
msgstr "Auf Druckplatte platzieren" | ||
|
||
#: printrun\gcview.py:440 | ||
#: printrun\gcview.py:444 | ||
msgid "Fit to plate [F]" | ||
msgstr "Auf Druckplatte platzieren [F]" |
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.
This command zooms camera to the gcode-object until it fits the view of the 3d panel. Maybe "An Ansicht anpassen" describes this better.
Tbh now that I see it, I think "Fit to plate" should be "Fit to view" or something similar
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.
Good catch as well! You are correct, I just check our readme.md:
3D VIEWER CONTROLS: F key: fit view to display entire print
I will change the string in source code and update all templates and translation files.
Hi, |
Yes please. I want to take a bit more time for looking around in case there are more missing translations or maybe needed corrections like those of @neofelis2X pointed to. Lets say for the next week.
This is a good idea. There is still a point that I didn't understand. Back in the days there was a distributed translation package with .mo files. There was a decision taken not to distribute those files. Did you know what the problem was with those files? I was thinking about weather it is possible to automate the whole generation process but I actually think this is maybe not the best idea too (beside the point that I don't know how to do that for now). On the other side, asking a normal user to download a locale folder from github manually, then expecting he is able to use a 3rd party application like Poedit for building his own .mo file set will possible overextend those users. In addition the translation folder needs to be located at a dedicated place depending on the used operating system. This is maybe the reason why translations are not used or most users do not know about it. Anyway, guess, we will find a solution somehow. :) |
The issue with the I had a go at automating the creation of I totally agree that we must handle the translations instead of asking end users to generate anything. |
Ok, I got it. The explanation helps to understand the problem. I haven't an idea for solving it for now but try to find a way. |
Interesting, I was also wondering why the .mo files are such a hassle and why almost all discussions about them are somewhat outdated or more than 10 years old. There must be some other cross-platform python projects that have found an elegant solution for this :] |
I did some more translations and fix an keyboard shortcut. In detail: readme.md:
viz.py:
gcodeplater.py:
gcview.py:
stltool.py
stlplatter.py
Over all the translations strings increased from 603 to 792 up to now. I must say I'm surprised about the amount we already have (and it is still not complete (eg. gcoder.py what I will left open for now) Some observations My fault, I shouldn't do such tests :)
For all of those quirks I do not have a solution, |
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.
Apart from a single style comment I'm happy to merge whenever you want.
printrun/gcview.py
Outdated
@@ -64,13 +64,13 @@ def set_gcview_params(self, path_width, path_height): | |||
for obj in self.objects[1:]: | |||
if isinstance(obj.model, actors.GcodeModel): | |||
obj.model.set_path_size(self.path_halfwidth, self.path_halfheight) | |||
has_changed = True | |||
has_changed = True |
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.
Spurious spaces where introduced here. Could you delete them?
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.
Ups. Yes, this is corrected with the next update.
Oh no, that's awesome we want the program to be as complete and bug-free as possible :) I've opened bug #1410 to keep track of these. |
…tion, add folder local (translation files) to distribution package, build windows binary files with capital first letter
@rockstorm101, #74fa0c2:
The last point missing in my list is how to generate the *.mo files within the actions, that is the next thing I try to solve now. Reminder to my self: You need to update all translation files once more as soon everything is done here. |
…re, make the consequences of exit a print more transparent kliment#1415
Hi @DivingDuck, what's the status on this? I guess no luck with producing the .mo files? Was that the only pending matter? If yes, what are your thoughts on merging this PR "as-is" and leave the .mo issue for another PR? |
Hi @rockstorm101, Anyway, it looks like I have introduce a bug with the translation activities. Guess there was a string I translate sometime ago that I better shouldn't translate (stopping a print do not stop printing activities). The error do not happen when I deactivate the translation and use the original language instead. I wasn't able to find the error before my break but planed to search for the error this weekend. As soon I find and repair this quirk I will update all translation files and we can release this PR. The .mo generation can be done later. |
No worries, there's no rush, I've been away for a while as well which is always a sane thing to do.
Great stuff, sounds like a plan. Let us know if you need any help. |
Some more updates... Move user inquiry on first place before initializing the exit procedure, make the consequences of exit a print more transparent #1415 6e79eba: e25a971: |
This PR is now complete, at least I didn't find any new show stopper since my last update. What is still missing is the .mo generation. Users can generate this manually with e.g. the free version of Poedit. The translations files are bundled with the distribution files for Windows since this PR (ba3b293). |
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.
Awesome work. Thanks. I did a quick review and found these two very minor typos. Happy to merge otherwise.
The translations need an update to reflect all the changes that happen during the past year. In addition I extended the translations especially for Pronsole as this is now part of the binary distribution.
The general translation template was generated with pygettext.py and all translation files was updated with Poedit.
Modifications in detail:
pronterface.py:
projectlayer.py:
pronsole.py:
Translation files:
Removed plater localization files for all languages
Updated general translation template
Updated translation files and deleted unused translation strings for all existing localization's.
German translation is 100% complete. Review is welcome.
All other language translations need an update from translators.
.gitignore:
Slightly updated.
Something we may should think about is whether and how we should bundle translation files to an official release. I recognized that older versions of translations are partly not compatible with actual state of source code (and vice versa). Maybe we can add automatically a zipped locale folder via action chain to the distribution.
A user then can download a compatible file set if needed and will possibly contribute a more completed / updated translation or add additional translations.