Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self):
import a2plib
self.__class__.Icon = a2plib.pathOfModule() + "/icons/a2p_Workbench.svg"
self.__class__.MenuText = 'A2plus '+A2P_VERSION
self.__class__.ToolTip = 'An other assembly workbench for FreeCAD.'
self.__class__.ToolTip = QT_TRANSLATE_NOOP("A2plus_solversystem", "An other assembly workbench for FreeCAD.")

def Initialize(self):
import sys
Expand Down
9 changes: 5 additions & 4 deletions a2p_MuxAssembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
#***************************************************************************

import FreeCAD, FreeCADGui
from a2plib import *
from FreeCAD.Qt import translate
from PySide import QtGui
import Part
import os, copy, numpy
from random import random, choice
from FreeCAD import Base
import time
import a2plib
from PySide import QtGui
from a2plib import *

from a2p_importedPart_class import Proxy_muxAssemblyObj # for compat

Expand Down Expand Up @@ -167,8 +168,8 @@ class a2p_SimpleAssemblyShapeCommand():
def GetResources(self):
import a2plib
return {'Pixmap' : a2plib.path_a2p +'/icons/a2p_SimpleAssemblyShape.svg',
'MenuText': "Create or refresh simple shape of complete assembly",
'ToolTip': toolTip
'MenuText': QT_TRANSLATE_NOOP("A2plus_MuxAssembly", "Create or refresh simple shape of complete assembly"),
'ToolTip' : toolTip
}

def Activated(self):
Expand Down
7 changes: 4 additions & 3 deletions a2p_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import FreeCADGui,FreeCAD
from PySide import QtGui, QtCore
from FreeCAD.Qt import translate
import Spreadsheet
import os
import string
Expand Down Expand Up @@ -259,9 +260,9 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_PartsList.svg',
'MenuText': 'Create a spreadsheet with a parts list of this file',
'ToolTip': toolTip
'Pixmap' : ':/icons/a2p_PartsList.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_CreatePartlist", "Create a spreadsheet with a parts list of this file"),
'ToolTip' : toolTip
}

FreeCADGui.addCommand('a2p_CreatePartlist', a2p_CreatePartlist())
Expand Down
14 changes: 7 additions & 7 deletions a2p_constraintDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import os, sys, math, copy
#from a2p_viewProviderProxies import *
from FreeCAD import Base

from FreeCAD.Qt import translate
from a2plib import *
from a2p_solversystem import solveConstraints
import a2p_constraints
Expand Down Expand Up @@ -1034,9 +1034,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_DefineConstraints.svg',
'MenuText': 'Define constraints',
'ToolTip': toolTipText
'Pixmap' : ':/icons/a2p_DefineConstraints.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintDialog", "Define constraints"),
'ToolTip' : toolTipText
}

FreeCADGui.addCommand('a2p_ConstraintDialogCommand', a2p_ConstraintDialogCommand())
Expand Down Expand Up @@ -1085,9 +1085,9 @@ def onDeleteConstraint(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_EditConstraint.svg',
'MenuText': 'Edit selected constraint',
'ToolTip': toolTipText
'Pixmap' : ':/icons/a2p_EditConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintDialog", "Edit selected constraint"),
'ToolTip' : toolTipText
}

FreeCADGui.addCommand('a2p_EditConstraintCommand', a2p_EditConstraintCommand())
Expand Down
5 changes: 3 additions & 2 deletions a2p_constraintServices.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import FreeCAD
import FreeCADGui
from PySide import QtGui
from FreeCAD.Qt import translate
import a2plib
import a2p_constraints

Expand Down Expand Up @@ -100,8 +101,8 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ReAdjustConstraints.svg',
'MenuText': 'Readjust directions of all constraints',
'ToolTip': 'Readjust directions of all constraints to fit best'
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintServices", "Re-adjust directions of all constraints"),
'ToolTip' : QT_TRANSLATE_NOOP("A2plus_constraintServices", "Re-adjust directions of all constraints to fit best")
}
FreeCADGui.addCommand('a2p_reAdjustConstraintDirectionsCommand', a2p_reAdjustConstraintDirectionsCommand())
#==============================================================================
Expand Down
83 changes: 42 additions & 41 deletions a2p_constraintcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from PySide import QtGui, QtCore
import os, sys, math, copy
from a2p_viewProviderProxies import *
from FreeCAD import Base
from FreeCAD import Base
from FreeCAD.Qt import translate

from a2plib import *
from a2p_solversystem import solveConstraints
Expand Down Expand Up @@ -76,9 +77,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PointIdentity.svg',
'MenuText': 'Add pointIdentity constraint',
'ToolTip': a2p_constraints.PointIdentityConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_PointIdentity.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add pointIdentity constraint"),
'ToolTip' : a2p_constraints.PointIdentityConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_PointIdentityConstraintCommand', a2p_PointIdentityConstraintCommand())
Expand All @@ -103,9 +104,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PointOnLineConstraint.svg',
'MenuText': 'Add pointOnLine constraint',
'ToolTip': a2p_constraints.PointOnLineConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_PointOnLineConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add pointOnLine constraint"),
'ToolTip' : a2p_constraints.PointOnLineConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_PointOnLineConstraintCommand', a2p_PointOnLineConstraintCommand())
Expand All @@ -130,9 +131,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PointOnPlaneConstraint.svg',
'MenuText': 'Add pointOnPlane constraint',
'ToolTip': a2p_constraints.PointOnPlaneConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_PointOnPlaneConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add pointOnPlane constraint"),
'ToolTip' : a2p_constraints.PointOnPlaneConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_PointOnPlaneConstraintCommand', a2p_PointOnPlaneConstraintCommand())
Expand All @@ -157,7 +158,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_SphericalSurfaceConstraint.svg',
'MenuText': 'Add sphereCenterIdent constraint',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add sphereCenterIdent constraint"),
'ToolTip': a2p_constraints.SphericalConstraint.getToolTip()
}

Expand All @@ -182,9 +183,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_CircularEdgeConstraint.svg' ,
'MenuText': 'Add circularEdge constraint',
'ToolTip': a2p_constraints.CircularEdgeConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_CircularEdgeConstraint.svg' ,
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add circularEdge constraint"),
'ToolTip' : a2p_constraints.CircularEdgeConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_CircularEdgeConnection', a2p_CircularEdgeConnectionCommand())
Expand All @@ -208,9 +209,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_AxialConstraint.svg',
'MenuText': 'Add axis Coincident constraint',
'ToolTip': a2p_constraints.AxialConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_AxialConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add axis Coincident constraint"),
'ToolTip' : a2p_constraints.AxialConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_AxialConstraintCommand', a2p_AxialConstraintCommand())
Expand All @@ -234,9 +235,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_AxisParallelConstraint.svg',
'MenuText': 'Add axisParallel constraint',
'ToolTip': a2p_constraints.AxisParallelConstraint.getToolTip()
'Pixmap' : ':/icons/a2p_AxisParallelConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add axisParallel constraint"),
'ToolTip' : a2p_constraints.AxisParallelConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_AxisParallelConstraintCommand', a2p_AxisParallelConstraintCommand())
Expand All @@ -260,9 +261,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_AxisPlaneParallelConstraint.svg',
'MenuText': 'Add axisPlaneParallel constraint',
'ToolTip': a2p_constraints.AxisPlaneParallelConstraint.getToolTip()
'Pixmap' : ':/icons/a2p_AxisPlaneParallelConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add axisPlaneParallel constraint"),
'ToolTip' : a2p_constraints.AxisPlaneParallelConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_AxisPlaneParallelCommand', a2p_AxisPlaneParallelCommand())
Expand All @@ -286,9 +287,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_AxisPlaneAngleConstraint.svg',
'MenuText': 'Add axisPlaneAngle constraint',
'ToolTip': a2p_constraints.AxisPlaneAngleConstraint.getToolTip()
'Pixmap' : ':/icons/a2p_AxisPlaneAngleConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add axisPlaneAngle constraint"),
'ToolTip' : a2p_constraints.AxisPlaneAngleConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_AxisPlaneAngleCommand', a2p_AxisPlaneAngleCommand())
Expand All @@ -312,9 +313,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : ':/icons/a2p_AxisPlaneNormalConstraint.svg',
'MenuText': 'Add axisPlaneNormal constraint',
'ToolTip': a2p_constraints.AxisPlaneNormalConstraint.getToolTip()
'Pixmap' : ':/icons/a2p_AxisPlaneNormalConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add axisPlaneNormal constraint"),
'ToolTip' : a2p_constraints.AxisPlaneNormalConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_AxisPlaneNormalCommand', a2p_AxisPlaneNormalCommand())
Expand All @@ -338,9 +339,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PlanesParallelConstraint.svg',
'MenuText': 'Add planesParallel constraint',
'ToolTip': a2p_constraints.PlanesParallelConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_PlanesParallelConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add planesParallel constraint"),
'ToolTip' : a2p_constraints.PlanesParallelConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_PlanesParallelConstraintCommand', a2p_PlanesParallelConstraintCommand())
Expand All @@ -364,9 +365,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
'MenuText': 'Add planeCoincident constraint',
'ToolTip': a2p_constraints.PlaneConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add planeCoincident constraint"),
'ToolTip' : a2p_constraints.PlaneConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_PlaneCoincidentConstraintCommand', a2p_PlaneCoincidentConstraintCommand())
Expand All @@ -391,9 +392,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_AngleConstraint.svg',
'MenuText': 'Add angledPlanes constraint',
'ToolTip': a2p_constraints.AngledPlanesConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_AngleConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add angledPlanes constraint"),
'ToolTip' : a2p_constraints.AngledPlanesConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_AngledPlanesConstraintCommand', a2p_AngledPlanesConstraintCommand())
Expand All @@ -419,9 +420,9 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_CenterOfMassConstraint.svg',
'MenuText': 'Add centerOfMass constraint',
'ToolTip': a2p_constraints.CenterOfMassConstraint.getToolTip()
'Pixmap' : path_a2p + '/icons/a2p_CenterOfMassConstraint.svg',
'MenuText': QT_TRANSLATE_NOOP("A2plus_constraintcommands", "Add centerOfMass constraint"),
'ToolTip' : a2p_constraints.CenterOfMassConstraint.getToolTip()
}

FreeCADGui.addCommand('a2p_CenterOfMassConstraintCommand', a2p_CenterOfMassConstraintCommand())
Expand Down
1 change: 1 addition & 0 deletions a2p_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#* *
#***************************************************************************

from FreeCAD.Qt import translate
import FreeCAD
import Part
import a2plib
Expand Down
5 changes: 3 additions & 2 deletions a2p_convertPart.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import FreeCADGui
import FreeCAD
from PySide import QtGui
from FreeCAD.Qt import translate
import copy
import time
import a2plib
Expand Down Expand Up @@ -124,8 +125,8 @@ class a2p_ConvertPartCommand():

def GetResources(self):
return {'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ConvertPart.svg',
# 'Accel' : "Shift+C", # a default shortcut (optional)
'MenuText': "Convert a part to A2plus",
# 'Accel' : "Shift+C", # a default shortcut (optional)
'MenuText': QT_TRANSLATE_NOOP("A2plus_convertPart", "Convert a part to A2plus"),
'ToolTip' : toolTip
}

Expand Down
1 change: 1 addition & 0 deletions a2p_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import math
import FreeCAD, FreeCADGui, Part
from FreeCAD import Base
from FreeCAD.Qt import translate
import a2plib
from a2plib import (
getObjectEdgeFromName,
Expand Down
1 change: 1 addition & 0 deletions a2p_fcdocumentreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#***************************************************************************

import FreeCAD, FreeCADGui, os
from FreeCAD.Qt import translate

import zipfile
try:
Expand Down
1 change: 1 addition & 0 deletions a2p_filecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import Part
from PySide import QtGui
from PySide import QtCore
from FreeCAD.Qt import translate
import os
import sys
import a2plib
Expand Down
1 change: 1 addition & 0 deletions a2p_importedPart_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import numpy
from FreeCAD import Base
from PySide import QtGui
from FreeCAD.Qt import translate
import a2plib
from a2p_versionmanagement import A2P_VERSION
#==============================================================================
Expand Down
Loading