-
Notifications
You must be signed in to change notification settings - Fork 76
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
Continue translation support - tooltips #468
base: development
Are you sure you want to change the base?
Continue translation support - tooltips #468
Conversation
7bb5ebc
to
d671749
Compare
da4cb73
to
d5cd5cb
Compare
I hope individual commits are easy to review. |
d5cd5cb
to
ed5284b
Compare
I'd like to merge this, unfortunately I'm not good at git/GitHub to pick only what I like. For example: the workbench name will not be translated. Non-negotiable. Or: if I understand correctly, the purpose of the BaseCommand class is to get rid of the function GetRessources(). All other stuff needs to be defined anyway. So that's one layer more for not much gain. Or is there another advantage ? Also: I insist, but I don't want to translate the command names yet, only the tooltips, that way people can better search for help on Internet. Please, that's very important. What I mean is that once this is working, everybody will come with translations in German, Italian, Japanese and WhatNot, so it MUST be practical and fast for me. I understand that what I ask is annoying for you, but for me it's make-or-break |
In short: could you please make 1 PR with the current development branch as starting point, with a minimal set of changes (no white-space clean-ups) to translate the tooltips for the commands I don't have the time to review and understand all your code, sorry |
Yes, to simplify the structure of the code and make it easier to read
Could be some residuals from first PR. Have you though on creating pages on the Wiki?
Done |
ed5284b
to
523b948
Compare
Hello, I merged your previous code, adapted it to my liking, and made a new version release (v0.50.9) : could you please update and see if that works as you expect-it ? If it works well, I'll merge this part of your code, thanx Note : I changed the name of TranslationUtils to Asm4_Translate back |
Hi, I tested from the addon manager and the strings that were marked translated are working as expected. |
68f58a8
to
fca67f0
Compare
This class is used to assign the resources from `self.pixmap`, `self.menutext`, `self.tooltip` instance variables. Variables are assigned on `__init__()` methods. The code is more readable than previous dictionary returns.
This commit applies the `translation()` function to more tooltips. Also make the classes to be child of BaseCommand class to inherit GetResources() method which facilitates process.
Commands from the 2nd group.
Commands from the 3rd group.
Commands from the 4th group.
Commands from the 5th group.
Commands from the 6th group.
FreeCADGui.addLanguagePath(Asm4_trans) & FreeCADGui.updateLocale() need to be moved over the workbench class to be able to translate the WB tooltip
The script was updated to enable the update of the `asm4.ts` file every time any other translation file is created or updated. This is made with the objective of having this file updated with the most current changes. If a translator doesn't have access to `pylupdate` command it can start translating based on the `asm4.ts` file, it's only needed to replace <TS version="2.1"> for <TS version="2.1" language="es-AR" sourcelanguage="en"> using their language code (must be supported on FreeCAD).
fca67f0
to
4bb9c8b
Compare
@Zolko-123 Would you be interested to join the FreeCAD-addons on the Crowdin platform? Essentially you could create an account there and manage the translations OR let us do that part and you will only need to accept PRs with updates. CC. @kaktusus From what I have seen on the main FreeCAD Crowdin project almost every day FreeCAD is being translated, on the addons project 6 external WB were officially added last weeks. The point is that having the same people that translates main FreeCAD translating the addons will help end users by having a level of consistency on the whole FreeCAD environment. I'm sure doing it will get more attention from translators. Meanwhile the translation support in the WB is done we can create a test directory to alert translators. Regarding this PR would you prefer another one without the |
#254