Streamline usage of g-code (vs. GCode, Gcode, G-code, gcode, etc.)

This makes it all the same. It is something that came up in our translation pass this time.

Contributes to issue CURA-4883.
This commit is contained in:
Ghostkeeper 2018-02-13 15:50:33 +01:00
parent 6eeaab3c12
commit f91c990fed
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
10 changed files with 30 additions and 30 deletions

View file

@ -55,19 +55,19 @@ class GcodeStartEndFormatter(Formatter):
extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack
except (KeyError, ValueError):
# either the key does not exist, or the value is not an int
Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end gcode, using global stack", key_fragments[1], key_fragments[0])
Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0])
elif len(key_fragments) != 1:
Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end gcode", key)
Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key)
return "{" + str(key) + "}"
key = key_fragments[0]
try:
return kwargs[str(extruder_nr)][key]
except KeyError:
Logger.log("w", "Unable to replace '%s' placeholder in start/end gcode", key)
Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key)
return "{" + key + "}"
else:
Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end gcode", key)
Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key)
return "{" + str(key) + "}"
@ -308,7 +308,7 @@ class StartSliceJob(Job):
settings["default_extruder_nr"] = default_extruder_nr
return str(fmt.format(value, **settings))
except:
Logger.logException("w", "Unable to do token replacement on start/end gcode")
Logger.logException("w", "Unable to do token replacement on start/end g-code")
return str(value)
## Create extruder message from stack

View file

@ -71,7 +71,7 @@ class GCodeProfileReader(ProfileReader):
try:
json_data = json.loads(serialized)
except Exception as e:
Logger.log("e", "Could not parse serialized JSON data from GCode %s, error: %s", file_name, e)
Logger.log("e", "Could not parse serialized JSON data from g-code %s, error: %s", file_name, e)
return None
profiles = []

View file

@ -1,5 +1,5 @@
{
"name": "GCode Profile Reader",
"name": "G-code Profile Reader",
"author": "Ultimaker B.V.",
"version": "1.0.0",
"description": "Provides support for importing profiles from g-code files.",

View file

@ -56,7 +56,7 @@ class GCodeWriter(MeshWriter):
# file. This must always be text mode.
def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode):
if mode != MeshWriter.OutputMode.TextMode:
Logger.log("e", "GCode Writer does not support non-text mode.")
Logger.log("e", "GCodeWriter does not support non-text mode.")
return False
active_build_plate = Application.getInstance().getBuildPlateModel().activeBuildPlate
@ -108,7 +108,7 @@ class GCodeWriter(MeshWriter):
container_with_profile = stack.qualityChanges
if container_with_profile.getId() == "empty_quality_changes":
Logger.log("e", "No valid quality profile found, not writing settings to GCode!")
Logger.log("e", "No valid quality profile found, not writing settings to g-code!")
return ""
flat_global_container = self._createFlattenedContainerInstance(stack.getTop(), container_with_profile)

View file

@ -13,7 +13,7 @@ def getMetaData():
"mesh_writer": {
"output": [{
"extension": "gcode",
"description": catalog.i18nc("@item:inlistbox", "GCode File"),
"description": catalog.i18nc("@item:inlistbox", "G-code File"),
"mime_type": "text/x-gcode",
"mode": GCodeWriter.GCodeWriter.OutputMode.TextMode
}]

View file

@ -1,8 +1,8 @@
{
"name": "GCode Writer",
"name": "G-code Writer",
"author": "Ultimaker B.V.",
"version": "1.0.0",
"description": "Writes GCode to a file.",
"description": "Writes g-code to a file.",
"api": 4,
"i18n-catalog": "cura"
}

View file

@ -165,7 +165,7 @@ Cura.MachineAction
id: gcodeFlavorComboBox
sourceComponent: comboBoxWithOptions
property string settingKey: "machine_gcode_flavor"
property string label: catalog.i18nc("@label", "Gcode flavor")
property string label: catalog.i18nc("@label", "G-code flavor")
property bool forceUpdateOnChange: true
property var afterOnActivate: manager.updateHasMaterialsMetadata
}
@ -307,7 +307,7 @@ Cura.MachineAction
width: settingsTabs.columnWidth
Label
{
text: catalog.i18nc("@label", "Start Gcode")
text: catalog.i18nc("@label", "Start G-code")
font.bold: true
}
Loader
@ -317,7 +317,7 @@ Cura.MachineAction
property int areaWidth: parent.width
property int areaHeight: parent.height - y
property string settingKey: "machine_start_gcode"
property string tooltip: catalog.i18nc("@tooltip", "Gcode commands to be executed at the very start.")
property string tooltip: catalog.i18nc("@tooltip", "G-code commands to be executed at the very start.")
}
}
@ -326,7 +326,7 @@ Cura.MachineAction
width: settingsTabs.columnWidth
Label
{
text: catalog.i18nc("@label", "End Gcode")
text: catalog.i18nc("@label", "End G-code")
font.bold: true
}
Loader
@ -336,7 +336,7 @@ Cura.MachineAction
property int areaWidth: parent.width
property int areaHeight: parent.height - y
property string settingKey: "machine_end_gcode"
property string tooltip: catalog.i18nc("@tooltip", "Gcode commands to be executed at the very end.")
property string tooltip: catalog.i18nc("@tooltip", "G-code commands to be executed at the very end.")
}
}
}
@ -441,7 +441,7 @@ Cura.MachineAction
width: settingsTabs.columnWidth
Label
{
text: catalog.i18nc("@label", "Extruder Start Gcode")
text: catalog.i18nc("@label", "Extruder Start G-code")
font.bold: true
}
Loader
@ -459,7 +459,7 @@ Cura.MachineAction
width: settingsTabs.columnWidth
Label
{
text: catalog.i18nc("@label", "Extruder End Gcode")
text: catalog.i18nc("@label", "Extruder End G-code")
font.bold: true
}
Loader

View file

@ -51,8 +51,8 @@
},
"machine_start_gcode":
{
"label": "Start GCode",
"description": "Gcode commands to be executed at the very start - separated by \\n.",
"label": "Start G-code",
"description": "G-code commands to be executed at the very start - separated by \\n.",
"default_value": "G28 ;Home\nG1 Z15.0 F6000 ;Move the platform down 15mm\n;Prime the extruder\nG92 E0\nG1 F200 E3\nG92 E0",
"type": "str",
"settable_per_mesh": false,
@ -61,8 +61,8 @@
},
"machine_end_gcode":
{
"label": "End GCode",
"description": "Gcode commands to be executed at the very end - separated by \\n.",
"label": "End G-code",
"description": "G-code commands to be executed at the very end - separated by \\n.",
"default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84",
"type": "str",
"settable_per_mesh": false,
@ -312,8 +312,8 @@
},
"machine_gcode_flavor":
{
"label": "Gcode flavour",
"description": "The type of gcode to be generated.",
"label": "G-code flavour",
"description": "The type of g-code to be generated.",
"type": "enum",
"options":
{
@ -4947,7 +4947,7 @@
"meshfix_keep_open_polygons":
{
"label": "Keep Disconnected Faces",
"description": "Normally Cura tries to stitch up small holes in the mesh and remove parts of a layer with big holes. Enabling this option keeps those parts which cannot be stitched. This option should be used as a last resort option when everything else fails to produce proper GCode.",
"description": "Normally Cura tries to stitch up small holes in the mesh and remove parts of a layer with big holes. Enabling this option keeps those parts which cannot be stitched. This option should be used as a last resort option when everything else fails to produce proper g-code.",
"type": "bool",
"default_value": false,
"settable_per_mesh": true
@ -5162,7 +5162,7 @@
"relative_extrusion":
{
"label": "Relative Extrusion",
"description": "Use relative extrusion rather than absolute extrusion. Using relative E-steps makes for easier post-processing of the Gcode. However, it's not supported by all printers and it may produce very slight deviations in the amount of deposited material compared to absolute E-steps. Irrespective of this setting, the extrusion mode will always be set to absolute before any Gcode script is output.",
"description": "Use relative extrusion rather than absolute extrusion. Using relative E-steps makes for easier post-processing of the g-code. However, it's not supported by all printers and it may produce very slight deviations in the amount of deposited material compared to absolute E-steps. Irrespective of this setting, the extrusion mode will always be set to absolute before any g-code script is output.",
"type": "bool",
"default_value": false,
"value": "machine_gcode_flavor==\"RepRap (RepRap)\"",

View file

@ -117,7 +117,7 @@ UM.Dialog
{
projectsModel.append({ name:"Cura", description: catalog.i18nc("@label", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" });
projectsModel.append({ name:"Uranium", description: catalog.i18nc("@label", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" });
projectsModel.append({ name:"CuraEngine", description: catalog.i18nc("@label", "GCode generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" });
projectsModel.append({ name:"CuraEngine", description: catalog.i18nc("@label", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" });
projectsModel.append({ name:"libArcus", description: catalog.i18nc("@label", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" });
projectsModel.append({ name:"Python", description: catalog.i18nc("@label", "Programming language"), license: "Python", url: "http://python.org/" });

View file

@ -413,7 +413,7 @@ UM.PreferencesPage
width: childrenRect.width;
height: childrenRect.height;
text: catalog.i18nc("@info:tooltip","Show caution message in gcode reader.")
text: catalog.i18nc("@info:tooltip","Show caution message in g-code reader.")
CheckBox
{
@ -422,7 +422,7 @@ UM.PreferencesPage
checked: boolCheck(UM.Preferences.getValue("gcodereader/show_caution"))
onClicked: UM.Preferences.setValue("gcodereader/show_caution", checked)
text: catalog.i18nc("@option:check","Caution message in gcode reader");
text: catalog.i18nc("@option:check","Caution message in g-code reader");
}
}