- some strings updated; update on the Romanian translate

This commit is contained in:
Marius Stanciu 2019-12-13 18:36:57 +02:00
parent f6c0741d3d
commit e397e26484
14 changed files with 5478 additions and 5305 deletions

View File

@ -4314,23 +4314,41 @@ class App(QtCore.QObject):
# self.inform.emit('[selected] %s created & selected: %s' % # self.inform.emit('[selected] %s created & selected: %s' %
# (str(obj.kind).capitalize(), str(obj.options['name']))) # (str(obj.kind).capitalize(), str(obj.options['name'])))
if obj.kind == 'gerber': if obj.kind == 'gerber':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format( self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(), color='green', name=str(obj.options['name']))) kind=obj.kind.capitalize(),
color='green',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'excellon': elif obj.kind == 'excellon':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format( self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(), color='brown', name=str(obj.options['name']))) kind=obj.kind.capitalize(),
color='brown',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'cncjob': elif obj.kind == 'cncjob':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format( self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(), color='blue', name=str(obj.options['name']))) kind=obj.kind.capitalize(),
color='blue',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'geometry': elif obj.kind == 'geometry':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format( self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(), color='red', name=str(obj.options['name']))) kind=obj.kind.capitalize(),
color='red',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'script': elif obj.kind == 'script':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format( self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(), color='orange', name=str(obj.options['name']))) kind=obj.kind.capitalize(),
color='orange',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'document': elif obj.kind == 'document':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format( self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(), color='darkCyan', name=str(obj.options['name']))) kind=obj.kind.capitalize(),
color='darkCyan',
name=str(obj.options['name']), tx=_("created/selected"))
)
# update the SHELL auto-completer model with the name of the new object # update the SHELL auto-completer model with the name of the new object
self.shell._edit.set_model_data(self.myKeywords) self.shell._edit.set_model_data(self.myKeywords)
@ -8856,17 +8874,29 @@ class App(QtCore.QObject):
def selected_message(self, curr_sel_obj): def selected_message(self, curr_sel_obj):
if curr_sel_obj: if curr_sel_obj:
if curr_sel_obj.kind == 'gerber': if curr_sel_obj.kind == 'gerber':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='green', name=str(curr_sel_obj.options['name']))) color='green',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
elif curr_sel_obj.kind == 'excellon': elif curr_sel_obj.kind == 'excellon':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='brown', name=str(curr_sel_obj.options['name']))) color='brown',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
elif curr_sel_obj.kind == 'cncjob': elif curr_sel_obj.kind == 'cncjob':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='blue', name=str(curr_sel_obj.options['name']))) color='blue',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
elif curr_sel_obj.kind == 'geometry': elif curr_sel_obj.kind == 'geometry':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='red', name=str(curr_sel_obj.options['name']))) color='red',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
def delete_hover_shape(self): def delete_hover_shape(self):
self.hover_shapes.clear() self.hover_shapes.clear()
@ -10166,8 +10196,10 @@ class App(QtCore.QObject):
try: try:
filename, _f = QtWidgets.QFileDialog.getSaveFileName( filename, _f = QtWidgets.QFileDialog.getSaveFileName(
caption=_("Save Project As ..."), caption=_("Save Project As ..."),
directory=_('{l_save}/Project_{date}').format(l_save=str(self.get_last_save_folder()), date=self.date), directory=('{l_save}/{proj}_{date}').format(l_save=str(self.get_last_save_folder()), date=self.date,
filter=filter_) proj=_("Project")),
filter=filter_
)
except TypeError: except TypeError:
filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Project As ..."), filter=filter_) filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Project As ..."), filter=filter_)
@ -10208,7 +10240,7 @@ class App(QtCore.QObject):
try: try:
obj_active = self.collection.get_active() obj_active = self.collection.get_active()
obj_name = obj_active.options['name'] obj_name = _(str(obj_active.options['name']))
except AttributeError as err: except AttributeError as err:
log.debug("App.on_file_save_object_pdf() --> %s" % str(err)) log.debug("App.on_file_save_object_pdf() --> %s" % str(err))
self.inform.emit('[ERROR_NOTCL] %s' % _("No object selected.")) self.inform.emit('[ERROR_NOTCL] %s' % _("No object selected."))
@ -10218,10 +10250,11 @@ class App(QtCore.QObject):
try: try:
filename, _f = QtWidgets.QFileDialog.getSaveFileName( filename, _f = QtWidgets.QFileDialog.getSaveFileName(
caption=_("Save Object as PDF ..."), caption=_("Save Object as PDF ..."),
directory=_('{l_save}/{obj_name}_{date}').format(l_save=str(self.get_last_save_folder()), directory=('{l_save}/{obj_name}_{date}').format(l_save=str(self.get_last_save_folder()),
obj_name=obj_name, obj_name=obj_name,
date=self.date), date=self.date),
filter=filter_) filter=filter_
)
except TypeError: except TypeError:
filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Object as PDF ..."), filter=filter_) filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Object as PDF ..."), filter=filter_)

View File

@ -785,23 +785,41 @@ class ObjectCollection(QtCore.QAbstractItemModel):
self.item_selected.emit(obj.options['name']) self.item_selected.emit(obj.options['name'])
if obj.kind == 'gerber': if obj.kind == 'gerber':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='green', name=str(obj.options['name']))) color='green',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'excellon': elif obj.kind == 'excellon':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='brown', name=str(obj.options['name']))) color='brown',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'cncjob': elif obj.kind == 'cncjob':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='blue', name=str(obj.options['name']))) color='blue',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'geometry': elif obj.kind == 'geometry':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='red', name=str(obj.options['name']))) color='red',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'script': elif obj.kind == 'script':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='orange', name=str(obj.options['name']))) color='orange',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'document': elif obj.kind == 'document':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format( self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='darkCyan', name=str(obj.options['name']))) color='darkCyan',
name=str(obj.options['name']),
tx=_("selected"))
)
except IndexError: except IndexError:
self.item_selected.emit('none') self.item_selected.emit('none')
# FlatCAMApp.App.log.debug("on_list_selection_change(): Index Error (Nothing selected?)") # FlatCAMApp.App.log.debug("on_list_selection_change(): Index Error (Nothing selected?)")

View File

@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
- HPGL2 import: added support for circles, arcs and 3-point arcs. Everything works only for absolute coordinates. - HPGL2 import: added support for circles, arcs and 3-point arcs. Everything works only for absolute coordinates.
- removed the .plt extension from Gcode extensions - removed the .plt extension from Gcode extensions
- some strings updated; update on the Romanian translate
12.12.2019 12.12.2019

View File

@ -455,8 +455,6 @@ class PaintOptionsTool(FlatCAMTool):
ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate')) ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
ovlabel.setToolTip( ovlabel.setToolTip(
_("How much (fraction) of the tool width to overlap each tool pass.\n" _("How much (fraction) of the tool width to overlap each tool pass.\n"
"Example:\n"
"A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
"Adjust the value starting with lower values\n" "Adjust the value starting with lower values\n"
"and increasing it if areas that should be painted are still \n" "and increasing it if areas that should be painted are still \n"
"not painted.\n" "not painted.\n"

View File

@ -1910,7 +1910,7 @@ class CNCObjectUI(ObjectUI):
self.prepend_text = FCTextArea() self.prepend_text = FCTextArea()
self.prepend_text.setPlaceholderText( self.prepend_text.setPlaceholderText(
_("Type here any G-Code commands you would " _("Type here any G-Code commands you would\n"
"like to add at the beginning of the G-Code file.") "like to add at the beginning of the G-Code file.")
) )
self.custom_box.addWidget(self.prepend_text) self.custom_box.addWidget(self.prepend_text)
@ -1926,8 +1926,8 @@ class CNCObjectUI(ObjectUI):
self.append_text = FCTextArea() self.append_text = FCTextArea()
self.append_text.setPlaceholderText( self.append_text.setPlaceholderText(
_("Type here any G-Code commands you would " _("Type here any G-Code commands you would\n"
"like to append to the generated file. " "like to append to the generated file.\n"
"I.e.: M2 (End of program)") "I.e.: M2 (End of program)")
) )
self.custom_box.addWidget(self.append_text) self.custom_box.addWidget(self.append_text)
@ -1958,12 +1958,12 @@ class CNCObjectUI(ObjectUI):
self.toolchange_text = FCTextArea() self.toolchange_text = FCTextArea()
self.toolchange_text.setPlaceholderText( self.toolchange_text.setPlaceholderText(
_( _(
"Type here any G-Code commands you would " "Type here any G-Code commands you would\n"
"like to be executed when Toolchange event is encountered. " "like to be executed when Toolchange event is encountered.\n"
"This will constitute a Custom Toolchange GCode, " "This will constitute a Custom Toolchange GCode,\n"
"or a Toolchange Macro. " "or a Toolchange Macro.\n"
"The FlatCAM variables are surrounded by '%' symbol.\n" "The FlatCAM variables are surrounded by '%' symbol.\n"
"WARNING: it can be used only with a preprocessor file " "WARNING: it can be used only with a preprocessor file\n"
"that has 'toolchange_custom' in it's name." "that has 'toolchange_custom' in it's name."
) )
) )

View File

@ -3780,7 +3780,7 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
self.prepend_text = FCTextArea() self.prepend_text = FCTextArea()
self.prepend_text.setPlaceholderText( self.prepend_text.setPlaceholderText(
_("Type here any G-Code commands you would " _("Type here any G-Code commands you would\n"
"like to add at the beginning of the G-Code file.") "like to add at the beginning of the G-Code file.")
) )
self.layout.addWidget(self.prepend_text) self.layout.addWidget(self.prepend_text)
@ -3797,8 +3797,8 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
self.append_text = FCTextArea() self.append_text = FCTextArea()
self.append_text.setPlaceholderText( self.append_text.setPlaceholderText(
_("Type here any G-Code commands you would " _("Type here any G-Code commands you would\n"
"like to append to the generated file. " "like to append to the generated file.\n"
"I.e.: M2 (End of program)") "I.e.: M2 (End of program)")
) )
self.layout.addWidget(self.append_text) self.layout.addWidget(self.append_text)
@ -3850,12 +3850,12 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.toolchange_text = FCTextArea() self.toolchange_text = FCTextArea()
self.toolchange_text.setPlaceholderText( self.toolchange_text.setPlaceholderText(
_( _(
"Type here any G-Code commands you would " "Type here any G-Code commands you would\n"
"like to be executed when Toolchange event is encountered. " "like to be executed when Toolchange event is encountered.\n"
"This will constitute a Custom Toolchange GCode, " "This will constitute a Custom Toolchange GCode,\n"
"or a Toolchange Macro. " "or a Toolchange Macro.\n"
"The FlatCAM variables are surrounded by '%' symbol.\n" "The FlatCAM variables are surrounded by '%' symbol.\n"
"WARNING: it can be used only with a preprocessor file " "WARNING: it can be used only with a preprocessor file\n"
"that has 'toolchange_custom' in it's name." "that has 'toolchange_custom' in it's name."
) )
) )
@ -4852,7 +4852,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.orientation_label = QtWidgets.QLabel('%s:' % _("Page Orientation")) self.orientation_label = QtWidgets.QLabel('%s:' % _("Page Orientation"))
self.orientation_label.setToolTip(_("Can be:\n" self.orientation_label.setToolTip(_("Can be:\n"
"- Portrait\n" "- Portrait\n"
"- Lanscape")) "- Landscape"))
self.orientation_radio = RadioSet([{'label': _('Portrait'), 'value': 'p'}, self.orientation_radio = RadioSet([{'label': _('Portrait'), 'value': 'p'},
{'label': _('Landscape'), 'value': 'l'}, {'label': _('Landscape'), 'value': 'l'},

View File

@ -884,8 +884,9 @@ class Excellon(Geometry):
log.error("Excellon PARSING FAILED. Line %d: %s" % (line_num, eline)) log.error("Excellon PARSING FAILED. Line %d: %s" % (line_num, eline))
msg = '[ERROR_NOTCL] %s' % \ msg = '[ERROR_NOTCL] %s' % \
_("An internal error has ocurred. See shell.\n") _("An internal error has ocurred. See shell.\n")
msg += _('{e_code} Excellon Parser error.\nParsing Failed. Line {l_nr}: {line}\n').format( msg += ('{e_code} {tx} {l_nr}: {line}\n').format(
e_code='[ERROR]', e_code='[ERROR]',
tx=_("Excellon Parser error.\nParsing Failed. Line"),
l_nr=line_num, l_nr=line_num,
line=eline) line=eline)
msg += traceback.format_exc() msg += traceback.format_exc()

View File

@ -759,7 +759,7 @@ class ToolCalibration(FlatCAMTool):
self.set_tool_ui() self.set_tool_ui()
self.app.ui.notebook.setTabText(2, _("Calibrate Tool")) self.app.ui.notebook.setTabText(2, _("Calibration Tool"))
def install(self, icon=None, separator=None, **kwargs): def install(self, icon=None, separator=None, **kwargs):
FlatCAMTool.install(self, icon, separator, shortcut='ALT+E', **kwargs) FlatCAMTool.install(self, icon, separator, shortcut='ALT+E', **kwargs)
@ -952,7 +952,7 @@ class ToolCalibration(FlatCAMTool):
gcode = '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \ gcode = '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \
(str(self.app.version), str(self.app.version_date)) + '\n' (str(self.app.version), str(self.app.version_date)) + '\n'
gcode += '(Name: ' + _('Verification GCode for FlatCAM Calibrate Tool') + ')\n' gcode += '(Name: ' + _('Verification GCode for FlatCAM Calibration Tool') + ')\n'
gcode += '(Units: ' + self.units.upper() + ')\n\n' gcode += '(Units: ' + self.units.upper() + ')\n\n'
gcode += '(Created on ' + time_str + ')\n\n' gcode += '(Created on ' + time_str + ')\n\n'

View File

@ -349,7 +349,10 @@ class Distance(FlatCAMTool):
d = math.sqrt(dx ** 2 + dy ** 2) d = math.sqrt(dx ** 2 + dy ** 2)
self.stop_entry.set_value("(%.*f, %.*f)" % (self.decimals, pos[0], self.decimals, pos[1])) self.stop_entry.set_value("(%.*f, %.*f)" % (self.decimals, pos[0], self.decimals, pos[1]))
self.app.inform.emit(_("MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}").format( self.app.inform.emit("{tx1}: {tx2} D(x) = {d_x} | D(y) = {d_y} | (tx3} = {d_z}".format(
tx1=_("MEASURING"),
tx2=_("Result"),
tx3=_("Distance"),
d_x='%*f' % (self.decimals, abs(dx)), d_x='%*f' % (self.decimals, abs(dx)),
d_y='%*f' % (self.decimals, abs(dy)), d_y='%*f' % (self.decimals, abs(dy)),
d_z='%*f' % (self.decimals, abs(d))) d_z='%*f' % (self.decimals, abs(d)))

View File

@ -278,7 +278,10 @@ class DistanceMin(FlatCAMTool):
) )
if d != 0: if d != 0:
self.app.inform.emit(_("MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}").format( self.app.inform.emit("{tx1}: {tx2} D(x) = {d_x} | D(y) = {d_y} | (tx3} = {d_z}".format(
tx1=_("MEASURING"),
tx2=_("Result"),
tx3=_("Distance"),
d_x='%*f' % (self.decimals, abs(dx)), d_x='%*f' % (self.decimals, abs(dx)),
d_y='%*f' % (self.decimals, abs(dy)), d_y='%*f' % (self.decimals, abs(dy)),
d_z='%*f' % (self.decimals, abs(d))) d_z='%*f' % (self.decimals, abs(d)))

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff