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

TechDraw → Constrain vertical distance (tool) #183

Open
kaktusus opened this issue Jul 5, 2022 · 4 comments
Open

TechDraw → Constrain vertical distance (tool) #183

kaktusus opened this issue Jul 5, 2022 · 4 comments

Comments

@kaktusus
Copy link
Contributor

kaktusus commented Jul 5, 2022

OS: Debian GNU/Linux bookworm/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.29365 (Git) AppImage
Build type: Release
Branch: master
Hash: 59b945dcc329303ad781075ecf30544aab909415
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: Polish/Poland (pl_PL)
Installed mods: 

No translations in the message window.

obraz

  1. Negative datum values are not valid for the constraint with index - no string in Crowdin
    https://crowdin.com/translate/freecad/all/en-pl?filter=basic&value=0#q=Negative%20datum%20values%20are%20not%20valid
@chennes
Copy link
Member

chennes commented Apr 17, 2023

This is all being generated in SketchObjectPyImp.cpp, and there are a ton of untranslated user-facing strings in there. I've started a forums discussion about this file: https://forum.freecad.org/viewtopic.php?t=77673

@kaktusus
Copy link
Contributor Author

Thank you for your inquisitiveness and not belittling the subject.

@abdullahtahiriyo
Copy link

I think I have come with a solution for the dynamically generated strings:

image

I need to beautify the code, but I should be able to PR it for the weekend.

@abdullahtahiriyo
Copy link

abdullahtahiriyo commented May 31, 2023

Any number of parameters:

       else if (err == -2) {
            PyError_SetEnhancedString(
                QT_TRANSLATE_NOOP("Notifications",
                                  "Datum {} for the constraint with index {}  is invalid"),
                (const char*)Quantity.getUserString().toUtf8(),
                Index);
        }
        else if (err == -4) {
            PyError_SetEnhancedString(
                QT_TRANSLATE_NOOP(
                    "Notifications",
                    "Negative datum values are not valid for the constraint with index {}"),
                Index);
        }

Parameters can be strings and then, they will be translated too (if marked for translation).

I uses the format style placeholders.

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

3 participants