- WIP for internationalization
This commit is contained in:
parent
94d2fb23e2
commit
934d971002
|
@ -278,10 +278,6 @@ class App(QtCore.QObject):
|
|||
self.FC_light_blue = '#a5a5ffbf'
|
||||
self.FC_dark_blue = '#0000ffbf'
|
||||
|
||||
# needs to install the app default language before the GUI is initialized otherwise we get errors
|
||||
# because FlatCAM will not understand the _() funtion
|
||||
self.on_language_apply(lang='English')
|
||||
|
||||
QtCore.QObject.__init__(self)
|
||||
self.ui = FlatCAMGUI(self.version, self.beta, self)
|
||||
|
||||
|
@ -3278,8 +3274,6 @@ class App(QtCore.QObject):
|
|||
|
||||
:return:
|
||||
"""
|
||||
self.report_usage("on_language_apply()")
|
||||
|
||||
name = ''
|
||||
|
||||
if lang is None:
|
||||
|
|
|
@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||
- made showing a shape when hovering over objects, optional, by adding a Preferences -> General parameter
|
||||
- starting to work in internationalization using gettext()
|
||||
- Finished adding _() in FlatCAM Tools
|
||||
-
|
||||
|
||||
6.03.2019
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@ from GUIElements import FCEntry
|
|||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
import math
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class ToolCalculator(FlatCAMTool):
|
||||
|
|
|
@ -2,6 +2,11 @@ from FlatCAMTool import FlatCAMTool
|
|||
from ObjectCollection import *
|
||||
from FlatCAMApp import *
|
||||
from shapely.geometry import box
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class CutOut(FlatCAMTool):
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@ from FlatCAMObj import *
|
|||
from shapely.geometry import Point
|
||||
from shapely import affinity
|
||||
from PyQt5 import QtCore
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class DblSidedTool(FlatCAMTool):
|
||||
|
|
|
@ -2,6 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
|||
|
||||
from GUIElements import RadioSet, FCEntry
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class Film(FlatCAMTool):
|
||||
|
|
|
@ -2,6 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
|||
|
||||
from GUIElements import RadioSet, FloatEntry, FCComboBox, IntEntry
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class ToolImage(FlatCAMTool):
|
||||
|
|
|
@ -4,6 +4,10 @@ from VisPyVisuals import *
|
|||
|
||||
from copy import copy
|
||||
from math import sqrt
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
class Measurement(FlatCAMTool):
|
||||
|
||||
|
|
|
@ -4,6 +4,10 @@ from VisPyVisuals import *
|
|||
|
||||
from io import StringIO
|
||||
from copy import copy
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class ToolMove(FlatCAMTool):
|
||||
|
|
|
@ -2,6 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
|||
from copy import copy,deepcopy
|
||||
from ObjectCollection import *
|
||||
import time
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class NonCopperClear(FlatCAMTool, Gerber):
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
from FlatCAMTool import FlatCAMTool
|
||||
from copy import copy,deepcopy
|
||||
from ObjectCollection import *
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class ToolPaint(FlatCAMTool, Gerber):
|
||||
|
|
|
@ -2,6 +2,10 @@ from FlatCAMTool import FlatCAMTool
|
|||
from copy import copy, deepcopy
|
||||
from ObjectCollection import *
|
||||
import time
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class Panelize(FlatCAMTool):
|
||||
|
|
|
@ -2,6 +2,10 @@ from PyQt5 import QtGui, QtCore, QtWidgets
|
|||
from PyQt5.QtCore import Qt
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class Properties(FlatCAMTool):
|
||||
|
|
|
@ -12,6 +12,10 @@ from PyQt5.QtGui import QTextCursor
|
|||
from PyQt5.QtWidgets import QVBoxLayout, QWidget
|
||||
from GUIElements import _BrowserTextEdit, _ExpandableTextEdit
|
||||
import html
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class TermWidget(QWidget):
|
||||
|
|
|
@ -16,6 +16,10 @@ from shapely.ops import cascaded_union
|
|||
|
||||
import traceback
|
||||
from io import StringIO
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class SolderPaste(FlatCAMTool):
|
||||
|
|
|
@ -3,6 +3,10 @@ from PyQt5.QtCore import Qt
|
|||
from GUIElements import FCEntry, FCButton, OptionalInputSection
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMObj import *
|
||||
import gettext
|
||||
|
||||
def _(text):
|
||||
return text
|
||||
|
||||
|
||||
class ToolTransform(FlatCAMTool):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
pass
|
Loading…
Reference in New Issue