- 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' %
# (str(obj.kind).capitalize(), str(obj.options['name'])))
if obj.kind == 'gerber':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
kind=obj.kind.capitalize(), color='green', name=str(obj.options['name'])))
self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(),
color='green',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'excellon':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
kind=obj.kind.capitalize(), color='brown', name=str(obj.options['name'])))
self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(),
color='brown',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'cncjob':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
kind=obj.kind.capitalize(), color='blue', name=str(obj.options['name'])))
self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(),
color='blue',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'geometry':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
kind=obj.kind.capitalize(), color='red', name=str(obj.options['name'])))
self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(),
color='red',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'script':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
kind=obj.kind.capitalize(), color='orange', name=str(obj.options['name'])))
self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
kind=obj.kind.capitalize(),
color='orange',
name=str(obj.options['name']), tx=_("created/selected"))
)
elif obj.kind == 'document':
self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
kind=obj.kind.capitalize(), color='darkCyan', name=str(obj.options['name'])))
self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
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
self.shell._edit.set_model_data(self.myKeywords)
@ -8856,17 +8874,29 @@ class App(QtCore.QObject):
def selected_message(self, curr_sel_obj):
if curr_sel_obj:
if curr_sel_obj.kind == 'gerber':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='green', name=str(curr_sel_obj.options['name'])))
self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='green',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
elif curr_sel_obj.kind == 'excellon':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='brown', name=str(curr_sel_obj.options['name'])))
self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='brown',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
elif curr_sel_obj.kind == 'cncjob':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='blue', name=str(curr_sel_obj.options['name'])))
self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='blue',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
elif curr_sel_obj.kind == 'geometry':
self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='red', name=str(curr_sel_obj.options['name'])))
self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='red',
name=str(curr_sel_obj.options['name']),
tx=_("selected"))
)
def delete_hover_shape(self):
self.hover_shapes.clear()
@ -10166,8 +10196,10 @@ class App(QtCore.QObject):
try:
filename, _f = QtWidgets.QFileDialog.getSaveFileName(
caption=_("Save Project As ..."),
directory=_('{l_save}/Project_{date}').format(l_save=str(self.get_last_save_folder()), date=self.date),
filter=filter_)
directory=('{l_save}/{proj}_{date}').format(l_save=str(self.get_last_save_folder()), date=self.date,
proj=_("Project")),
filter=filter_
)
except TypeError:
filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Project As ..."), filter=filter_)
@ -10208,7 +10240,7 @@ class App(QtCore.QObject):
try:
obj_active = self.collection.get_active()
obj_name = obj_active.options['name']
obj_name = _(str(obj_active.options['name']))
except AttributeError as err:
log.debug("App.on_file_save_object_pdf() --> %s" % str(err))
self.inform.emit('[ERROR_NOTCL] %s' % _("No object selected."))
@ -10218,10 +10250,11 @@ class App(QtCore.QObject):
try:
filename, _f = QtWidgets.QFileDialog.getSaveFileName(
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,
date=self.date),
filter=filter_)
filter=filter_
)
except TypeError:
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'])
if obj.kind == 'gerber':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='green', name=str(obj.options['name'])))
self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='green',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'excellon':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='brown', name=str(obj.options['name'])))
self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='brown',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'cncjob':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='blue', name=str(obj.options['name'])))
self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='blue',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'geometry':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='red', name=str(obj.options['name'])))
self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='red',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'script':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='orange', name=str(obj.options['name'])))
self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='orange',
name=str(obj.options['name']),
tx=_("selected"))
)
elif obj.kind == 'document':
self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
color='darkCyan', name=str(obj.options['name'])))
self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
color='darkCyan',
name=str(obj.options['name']),
tx=_("selected"))
)
except IndexError:
self.item_selected.emit('none')
# 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.
- removed the .plt extension from Gcode extensions
- some strings updated; update on the Romanian translate
12.12.2019

View File

@ -455,8 +455,6 @@ class PaintOptionsTool(FlatCAMTool):
ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
ovlabel.setToolTip(
_("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"
"and increasing it if areas that should be painted are still \n"
"not painted.\n"

View File

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

View File

@ -3780,7 +3780,7 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
self.prepend_text = FCTextArea()
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.")
)
self.layout.addWidget(self.prepend_text)
@ -3797,8 +3797,8 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
self.append_text = FCTextArea()
self.append_text.setPlaceholderText(
_("Type here any G-Code commands you would "
"like to append to the generated file. "
_("Type here any G-Code commands you would\n"
"like to append to the generated file.\n"
"I.e.: M2 (End of program)")
)
self.layout.addWidget(self.append_text)
@ -3850,12 +3850,12 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
self.toolchange_text = FCTextArea()
self.toolchange_text.setPlaceholderText(
_(
"Type here any G-Code commands you would "
"like to be executed when Toolchange event is encountered. "
"This will constitute a Custom Toolchange GCode, "
"or a Toolchange Macro. "
"The FlatCAM variables are surrounded by '%' symbol. \n"
"WARNING: it can be used only with a preprocessor file "
"Type here any G-Code commands you would\n"
"like to be executed when Toolchange event is encountered.\n"
"This will constitute a Custom Toolchange GCode,\n"
"or a Toolchange Macro.\n"
"The FlatCAM variables are surrounded by '%' symbol.\n"
"WARNING: it can be used only with a preprocessor file\n"
"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.setToolTip(_("Can be:\n"
"- Portrait\n"
"- Lanscape"))
"- Landscape"))
self.orientation_radio = RadioSet([{'label': _('Portrait'), 'value': 'p'},
{'label': _('Landscape'), 'value': 'l'},
@ -6123,7 +6123,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
], orientation='vertical', stretch=False)
self.reference_label = QtWidgets.QLabel(_("Reference:"))
self.reference_label.setToolTip(
_("- 'Itself' - the copper Thieving extent is based on the object that is copper cleared.\n "
_("- 'Itself' - the copper Thieving extent is based on the object that is copper cleared.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be filled.\n"
"- 'Reference Object' - will do copper thieving within the area specified by another object.")
)
@ -6137,7 +6137,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
], stretch=False)
self.bbox_type_label = QtWidgets.QLabel(_("Box Type:"))
self.bbox_type_label.setToolTip(
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n "
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n"
"- 'Minimal' - the bounding box will be the convex hull shape.")
)
grid_lay.addWidget(self.bbox_type_label, 5, 0)
@ -6157,7 +6157,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
], orientation='vertical', stretch=False)
self.fill_type_label = QtWidgets.QLabel(_("Fill Type:"))
self.fill_type_label.setToolTip(
_("- 'Solid' - copper thieving will be a solid polygon.\n "
_("- 'Solid' - copper thieving will be a solid polygon.\n"
"- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n"
"- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n"
"- 'Lines Grid' - the empty area will be filled with a pattern of lines.")

View File

@ -884,8 +884,9 @@ class Excellon(Geometry):
log.error("Excellon PARSING FAILED. Line %d: %s" % (line_num, eline))
msg = '[ERROR_NOTCL] %s' % \
_("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]',
tx=_("Excellon Parser error.\nParsing Failed. Line"),
l_nr=line_num,
line=eline)
msg += traceback.format_exc()

View File

@ -759,7 +759,7 @@ class ToolCalibration(FlatCAMTool):
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):
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' % \
(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 += '(Created on ' + time_str + ')\n\n'

View File

@ -349,7 +349,10 @@ class Distance(FlatCAMTool):
d = math.sqrt(dx ** 2 + dy ** 2)
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_y='%*f' % (self.decimals, abs(dy)),
d_z='%*f' % (self.decimals, abs(d)))

View File

@ -278,7 +278,10 @@ class DistanceMin(FlatCAMTool):
)
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_y='%*f' % (self.decimals, abs(dy)),
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