Fill in version in a sketch validator message

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Fill in version in a sketch validator message

Post by DeepSOIC »

Please cherry-pick this commit:
git commit eabc25d70f00907ab5e67456e5efed136283da8d

The commit is:
I've put question marks in FreeCAD version contained in a message, that was to be put in after the code is merged. I'm filling it in.

I've done it in a way that the actual message is not changed, to not affect translations.

PS. I wonder, why github says "Sorry, diff information is unavailable." That's why I've attached a screenshot.
Attachments
commit eabc25d70f00907ab5e67456e5efed136283da8d.png
commit eabc25d70f00907ab5e67456e5efed136283da8d.png (132.3 KiB) Viewed 3676 times
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Fill in version in a sketch validator message

Post by shoogen »

DeepSOIC wrote:I've done it in a way that the actual message is not changed, to not affect translations.
The 0.15 is translated and the 4585 is not translated? Sounds not very useful to me. If the string will never change again, it can be included in the translation. In the long run i want to search for (exact) error messages in the source code (and ts-files).
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Fill in version in a sketch validator message

Post by wmayer »

Also the "???" could be problematic. For the translator it's not obvious that the translated string must also have three question marks. In case he uses only one or two the message will be broken at runtime. You better have did it like this:

Code: Select all

"... in FreeCAD older than %3").arg(...).arg(...).arg(QString::fromLatin1(v0.15.4585))
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Fill in version in a sketch validator message

Post by shoogen »

DeepSOIC wrote:PS. I wonder, why github says "Sorry, diff information is unavailable."
https://github.com/FreeCAD/FreeCAD_sf_m ... -squashed2
Maybe because the branch is not properly rebased?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Fill in version in a sketch validator message

Post by DeepSOIC »

Then just type the version directly into the message.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Fill in version in a sketch validator message

Post by DeepSOIC »

shoogen wrote:
DeepSOIC wrote:PS. I wonder, why github says "Sorry, diff information is unavailable."
https://github.com/FreeCAD/FreeCAD_sf_m ... -squashed2
Maybe because the branch is not properly rebased?
I don't think so, since it doesn't stop other commits from being displayed. The branch is not rebased at all :oops: , I've just done this small change on top of the branch as it was for my previous pull request.
Post Reply