Skip to content

Added Translation support and Spanish translation. - #6

Open
EdgarJRobles wants to merge 269 commits into
oddtopus:masterfrom
EdgarJRobles:master
Open

Added Translation support and Spanish translation.#6
EdgarJRobles wants to merge 269 commits into
oddtopus:masterfrom
EdgarJRobles:master

Conversation

@EdgarJRobles

Copy link
Copy Markdown

Menu bar were translated.
object name were translated.

@luzpaz

luzpaz commented May 20, 2020

Copy link
Copy Markdown

@EdgarJRobles does the translation work correctly ?

Comment thread translations/Update code.txt Outdated
@@ -0,0 +1 @@
pylupdate5 ./../InitGui.py ./../fCmd.py ./../CPipe.py ./../CUtils.py ./../dodoDialogs.py ./../dodoPM.py ./../fForms.py ./../fObservers.py ./../CFrame.py ./../pFeatures.py ./../pCmd.py -ts ./dodo_es-ES.ts No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update code.txt ?
@EdgarJRobles Is this file name auto-generated or what you named it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a comamnd that use to upgrade and generate TS file from python files.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It comes from Pyqt5

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update code.txt ?
@EdgarJRobles Is this file name auto-generated or what you named it?

It is not auto-generated, i do it manually

@luzpaz luzpaz mentioned this pull request Apr 2, 2026
25 tasks
@EdgarJRobles

EdgarJRobles commented Mar 14, 2024

Copy link
Copy Markdown
Author

I can confirm the translation works on FreeCAD 0.22.0, Libs: 0.22.0devR36338 @luzpaz @hasecilu
Screenshot_20240313_214213
Screenshot_20240313_215658

@hasecilu

Copy link
Copy Markdown

Same here, translation working as expected, there are still some strings on dialogs missing like self.labName = QtGui.QLabel("(seleziona un oggetto)", self).

@oddtopus We would love your feedback to make translation support happen.

@hasecilu
hasecilu force-pushed the master branch 4 times, most recently from b0a2205 to b1ee9e3 Compare March 15, 2024 02:00
@hasecilu

Copy link
Copy Markdown

STATS:

  • 49 PrintMessage()
  • 19 PrintWarning()
  • 55 PrintError()
  • 51 openTransaction()
  • 129 setText()

hasecilu and others added 20 commits October 20, 2024 08:13
Addobject name translated
Release last revision es-ES QM file
Wrong typo syntax
Added locale update function
The previous way on which the files were updated is done is by creating
some temporal files and then merging them to the original file.

Doing this merge would let us to NOT lost the translations already done.

It was done like that because we got the string from Python files and UI
files because `lupdate` from Qt5 couldn't extract strings from Python
files.

Now the `lupdate` from Qt6 can do, so we have no need to merge different
temp files, instead, we can do the update in a single command.

The new advantage is that the `<location>` tag is updated with all new
occurrences.
Intended to be used in conjunction with Neovim & LazyVim.
The default LazyVim's Python specification use ruff-lsp to format files,
this file let you configure ruff, mainly, the line width to 100 chars.
Using the ones are used on main FreeCAD plus codespell
EdgarJRobles and others added 30 commits April 11, 2026 18:18
feat(dodoDialogs): add rotation on valves
fix(trimOrExtend): fix AttachmentOffset direction
fix(addBeams): fix nest new beam into existing frameBranch object
feat(FrameBranch): Allow FrameBranch object to toggle Visibility
The init_toolbar function has been removed from the Draft code.
Two independent defects stopped pFeatures/pCmd being driven from a headless
process. Both are small; neither touches geometry.

1. NameError in Valve._execute_legacy

   `rating` was read but never bound, so constructing a butterfly, globe,
   wafer-check or generic ball valve raised NameError before it could build a
   shape -- 30 catalogue rows dead. Introduced by the "Add gate valve support"
   change, which replaced `fp.PRating.find(...)` with a bare `rating.find(...)`
   without binding the local. Knife gate and pinch survived only because they
   early-return above the fault.

   Fixed by binding `rating = fp.PRating.lower()` before use, which also makes
   the comparison case-insensitive as the surrounding early-returns already are.

2. ViewProvider assumed a GUI

   In console mode DocumentObject.ViewObject is None -- FreeCAD returns
   Py::None when FreeCADGui holds no Gui::Document for the App document -- so
   `obj.Proxy = self` raised AttributeError and every make*() factory died
   before returning. Guarding once inside ViewProvider covers all 17 call sites
   and any added later. Two direct ViewObject attribute writes (makeTank's
   colour/transparency, makePypeLine2's provider) are guarded the same way, on
   the pattern fFeatures.py already uses for Draft.

   The geometry itself never needed the GUI: pFeatures is pure Part/BRep.

Verified under FreeCAD 1.1.0 with QT_QPA_PLATFORM=offscreen, FreeCAD.GuiUp=0:
butterfly/globe/wafer-check/ball now build valid solids, and pCmd.makeElbow
returns a valid 4-face shell with both ports.
Both only bite without a GUI, which is why they have gone unnoticed.

Flange.execute sets fp.ViewObject.Deviation unconditionally. ViewObject is None
in console mode, the resulting AttributeError is swallowed by recompute, and
every Flange comes back with a NULL shape and no error to explain it.
Tessellation quality is a display setting, so it is now set only when there
is a GUI to set it on.

Tee's fillet fallback crashes inside itself. fillet_r is a Base.Quantity and
"{:.2f}".format(Quantity) raises TypeError, so the handler written to keep a
failed fillet from taking down the recompute is the thing taking down the
recompute. float() at the format site.

Also: the flange neck is built from ODp/T1 even when both are zero. They are
documented OPTIONAL, and Part.makeCylinder(0, 0, ...) fuses a degenerate solid
that leaves the flange isValid() False. Built only when the dimensions are real.

Reproduced under FreeCAD 1.1.0 with QT_QPA_PLATFORM=offscreen: before, Flange
returns a null shape and Tee raises TypeError; after, both build valid solids.
Thanks to vorteccpi@carolina.rr.com Paul Bercker
and also added a 2d drawings markdown files to explain CVS estructure
and variables
merge missing changes from remote master
Updated image paths in the Nomeclature.md file to use relative paths instead of absolute paths.
…InitGui.py

Remove call to init_toolbar from InitGui.py
Fix three defects that stop pFeatures being used without a GUI
-Remove old qt form variable from previous dialog versions
-Added extra CVS files for Tee category thank again to Paul Becker vorteccpi@carolina.rr.com
Add catalog-backed pipe reducer schedules
only BIM profiles were extrated during profile selection
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

Successfully merging this pull request may close these issues.