language pack checkpoint

This commit is contained in:
Stewart Allen 2020-03-16 12:11:30 -04:00
commit 1a59d7a491
2 changed files with 182 additions and 139 deletions

View file

@ -72,108 +72,108 @@ var gs_kiri_init = exports;
SPACE.platform.setRound(true);
Object.assign(UI, {
container: container,
ctrlLeft: $('control-left'),
ctrlRight: $('control-right'),
layerView: $('layer-view'),
layerSlider: $('layer-slider'),
modelOpacity: $('opacity'),
container: container,
ctrlLeft: $('control-left'),
ctrlRight: $('control-right'),
layerView: $('layer-view'),
layerSlider: $('layer-slider'),
modelOpacity: $('opacity'),
assets: assets,
control: control,
modal: $('modal'),
print: $('print'),
local: $('local'),
help: $('help'),
assets: assets,
control: control,
modal: $('modal'),
print: $('print'),
local: $('local'),
help: $('help'),
alert: {
dialog: $('alert-area'),
text: $('alert-text')
dialog: $('alert-area'),
text: $('alert-text')
},
devices: $('devices'),
deviceAdd: $('device-add'),
deviceDelete: $('device-del'),
deviceSave: $('device-save'),
deviceClose: $('device-close'),
deviceSelect: $('device-select'),
devices: $('devices'),
deviceAdd: $('device-add'),
deviceDelete: $('device-del'),
deviceSave: $('device-save'),
deviceClose: $('device-close'),
deviceSelect: $('device-select'),
deviceFavorites: $('device-favorites'),
deviceAll: $('device-all'),
deviceAll: $('device-all'),
device: UC.newGroup(LANG.dv_gr_dev, $('device')),
deviceName: UC.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:20, text:true}),
setDeviceFilament: UC.newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:UC.toFloat, modes:FDM}),
setDeviceNozzle: UC.newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:UC.toFloat, modes:FDM}),
setDeviceWidth: UC.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:UC.toInt}),
setDeviceDepth: UC.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:UC.toInt}),
setDeviceHeight: UC.newInput(LANG.dv_bedh_s, {title:LANG.dv_bedh_l, convert:UC.toInt, modes:FDM}),
device: UC.newGroup(LANG.dv_gr_dev, $('device')),
deviceName: UC.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:20, text:true}),
setDeviceFilament: UC.newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:UC.toFloat, modes:FDM}),
setDeviceNozzle: UC.newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:UC.toFloat, modes:FDM}),
setDeviceWidth: UC.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:UC.toInt}),
setDeviceDepth: UC.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:UC.toInt}),
setDeviceHeight: UC.newInput(LANG.dv_bedh_s, {title:LANG.dv_bedh_l, convert:UC.toInt, modes:FDM}),
setDeviceMaxSpindle: UC.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:UC.toInt, modes:CAM}),
setDeviceExtrusion: UC.newBoolean(LANG.dv_xtab_s, onBooleanClick, {title:LANG.dv_xtab_l}),
setDeviceOrigin: UC.newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l}),
setDeviceOriginTop: UC.newBoolean(LANG.dv_orgt_s, onBooleanClick, {title:LANG.dv_orgt_l, modes:CAM}),
setDeviceRound: UC.newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, modes:FDM}),
setDeviceExtrusion: UC.newBoolean(LANG.dv_xtab_s, onBooleanClick, {title:LANG.dv_xtab_l}),
setDeviceOrigin: UC.newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l}),
setDeviceOriginTop: UC.newBoolean(LANG.dv_orgt_s, onBooleanClick, {title:LANG.dv_orgt_l, modes:CAM}),
setDeviceRound: UC.newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, modes:FDM}),
setDevice: UC.newGroup(LANG.dv_gr_gco, $('device')),
setDeviceFan: UC.newInput(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, size:17}),
setDeviceTrack: UC.newInput(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, size:17}),
setDeviceLayer: UC.newText(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, size:14, height: 2}),
setDeviceToken: UC.newBoolean(LANG.dv_tksp_s, null, {title:LANG.dv_tksp_l, modes:CAM_LASER}),
setDeviceStrip: UC.newBoolean(LANG.dv_strc_s, null, {title:LANG.dv_strc_l, modes:CAM}),
setDeviceFExt: UC.newInput(LANG.dv_fext_s, {title:LANG.dv_fext_l, modes:CAM_LASER, size:7}),
setDeviceDwell: UC.newText(LANG.dv_dwll_s, {title:LANG.dv_dwll_l, modes:CAM, size:14, height:2}),
setDeviceChange: UC.newText(LANG.dv_tool_s, {title:LANG.dv_tool_l, modes:CAM, size:14, height:2}),
setDeviceSpindle: UC.newText(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, size:14, height:2}),
setDevicePause: UC.newText(LANG.dv_paus_s, {title:LANG.dv_paus_l, modes:FDM, size:14, height:3}),
setDeviceLaserOn: UC.newText(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, size:14, height:3}),
setDeviceLaserOff: UC.newText(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, size:14, height:3}),
setDevicePre: UC.newText(LANG.dv_head_s, {title:LANG.dv_head_l, modes:ALL, size:14, height:3}),
setDevicePost: UC.newText(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:ALL, size:14, height:3}),
setDevice: UC.newGroup(LANG.dv_gr_gco, $('device')),
setDeviceFan: UC.newInput(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, size:17}),
setDeviceTrack: UC.newInput(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, size:17}),
setDeviceLayer: UC.newText(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, size:14, height: 2}),
setDeviceToken: UC.newBoolean(LANG.dv_tksp_s, null, {title:LANG.dv_tksp_l, modes:CAM_LASER}),
setDeviceStrip: UC.newBoolean(LANG.dv_strc_s, null, {title:LANG.dv_strc_l, modes:CAM}),
setDeviceFExt: UC.newInput(LANG.dv_fext_s, {title:LANG.dv_fext_l, modes:CAM_LASER, size:7}),
setDeviceDwell: UC.newText(LANG.dv_dwll_s, {title:LANG.dv_dwll_l, modes:CAM, size:14, height:2}),
setDeviceChange: UC.newText(LANG.dv_tool_s, {title:LANG.dv_tool_l, modes:CAM, size:14, height:2}),
setDeviceSpindle: UC.newText(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, size:14, height:2}),
setDevicePause: UC.newText(LANG.dv_paus_s, {title:LANG.dv_paus_l, modes:FDM, size:14, height:3}),
setDeviceLaserOn: UC.newText(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, size:14, height:3}),
setDeviceLaserOff: UC.newText(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, size:14, height:3}),
setDevicePre: UC.newText(LANG.dv_head_s, {title:LANG.dv_head_l, modes:ALL, size:14, height:3}),
setDevicePost: UC.newText(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:ALL, size:14, height:3}),
tools: $('tools'),
toolsSave: $('tools-save'),
toolsClose: $('tools-close'),
toolSelect: $('tool-select'),
toolAdd: $('tool-add'),
toolDelete: $('tool-del'),
toolType: $('tool-type'),
toolName: $('tool-name'),
toolNum: $('tool-num'),
toolFluteDiam: $('tool-fdiam'),
toolFluteLen: $('tool-flen'),
toolShaftDiam: $('tool-sdiam'),
toolShaftLen: $('tool-slen'),
tools: $('tools'),
toolsSave: $('tools-save'),
toolsClose: $('tools-close'),
toolSelect: $('tool-select'),
toolAdd: $('tool-add'),
toolDelete: $('tool-del'),
toolType: $('tool-type'),
toolName: $('tool-name'),
toolNum: $('tool-num'),
toolFluteDiam: $('tool-fdiam'),
toolFluteLen: $('tool-flen'),
toolShaftDiam: $('tool-sdiam'),
toolShaftLen: $('tool-slen'),
// toolTaperAngle: $('tool-tangle'),
toolTaperTip: $('tool-ttip'),
toolMetric: $('tool-metric'),
toolTaperTip: $('tool-ttip'),
toolMetric: $('tool-metric'),
catalog: $('catalog'),
catalogBody: $('catalogBody'),
catalogList: $('catalogList'),
catalog: $('catalog'),
catalogBody: $('catalogBody'),
catalogList: $('catalogList'),
settings: $('settings'),
settingsBody: $('settingsBody'),
settingsList: $('settingsList'),
settings: $('settings'),
settingsBody: $('settingsBody'),
settingsList: $('settingsList'),
layerID: $('layer-id'),
layerSpan: $('layer-span'),
layerRange: $('layer-range'),
layerID: $('layer-id'),
layerSpan: $('layer-span'),
layerRange: $('layer-range'),
loading: $('loading').style,
progress: $('progress').style,
prostatus: $('prostatus'),
loading: $('loading').style,
progress: $('progress').style,
prostatus: $('prostatus'),
selection: $('selection'),
selWidth: $('sel_width'),
selHeight: $('sel_height'),
selDepth: $('sel_depth'),
scaleX: $('scale_x'),
scaleY: $('scale_y'),
scaleZ: $('scale_z'),
scaleUniform: $('scale_uni'),
stock: $('stock'),
stockWidth: $('stock-width'),
stockDepth: $('stock-width'),
stockHeight: $('stock-width'),
selection: $('selection'),
selWidth: $('sel_width'),
selHeight: $('sel_height'),
selDepth: $('sel_depth'),
scaleX: $('scale_x'),
scaleY: $('scale_y'),
scaleZ: $('scale_z'),
scaleUniform: $('scale_uni'),
stock: $('stock'),
stockWidth: $('stock-width'),
stockDepth: $('stock-width'),
stockHeight: $('stock-width'),
mode: UC.newGroup(LANG.mo_menu, assets),
modeTable: UC.newTableRow([
@ -249,61 +249,61 @@ var gs_kiri_init = exports;
]
]),
layout: UC.newGroup('options'),
showOrigin: UC.newBoolean("show origin", booleanSave, {title:"show device or process origin"}),
alignTop: UC.newBoolean("align top", booleanSave, {title:"align parts to the\ntallest part when\nno stock is set", modes:CAM}),
autoLayout: UC.newBoolean("auto layout", booleanSave, {title:"automatically layout platform\nwhen new items added\nor when arrange clicked\nmore than once"}),
freeLayout: UC.newBoolean("free layout", booleanSave, {title:"permit dragable layout"}),
reverseZoom: UC.newBoolean("invert zoom", booleanSave, {title:"invert mouse wheel\nscroll zoom"}),
units: UC.newSelectField("units", {modes:CAM}, "units"),
layout: UC.newGroup(LANG.op_menu),
showOrigin: UC.newBoolean(LANG.op_show_s, booleanSave, {title:LANG.op_show_l}),
alignTop: UC.newBoolean(LANG.op_alig_s, booleanSave, {title:LANG.op_alig_l, modes:CAM}),
autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
freeLayout: UC.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
reverseZoom: UC.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
units: UC.newSelectField(LANG.op_unit_s, {title: LANG.op_unit_l, modes:CAM}, "units"),
appendLeft: UC.checkpoint(),
// allow modules to insert new items at the bottom of the left menu
appendLeft: UC.checkpoint(),
layers: UC.setGroup($("layers")),
layerOutline: UC.newBoolean("outline", onLayerToggle, {modes:LOCAL ? ALL : FDM_LASER}),
layerTrace: UC.newBoolean("trace", onLayerToggle, {modes:FDM_LASER}),
layerFacing: UC.newBoolean("facing", onLayerToggle, {modes:CAM}),
layerRough: UC.newBoolean("roughing", onLayerToggle, {modes:CAM}),
layerFinish: UC.newBoolean("finishing", onLayerToggle, {modes:CAM}),
layerFinishX: UC.newBoolean("finish x", onLayerToggle, {modes:CAM}),
layerFinishY: UC.newBoolean("finish y", onLayerToggle, {modes:CAM}),
layerDelta: UC.newBoolean("delta", onLayerToggle, {modes:FDM}),
layerSolid: UC.newBoolean("solids", onLayerToggle, {modes:FDM}),
layerFill: UC.newBoolean("solid fill", onLayerToggle, {modes:FDM}),
layerSparse: UC.newBoolean("sparse fill", onLayerToggle, {modes:FDM}),
layerSupport: UC.newBoolean("support", onLayerToggle, {modes:FDM}),
layerPrint: UC.newBoolean("print", onLayerToggle),
layerMoves: UC.newBoolean("moves", onLayerToggle),
layers: UC.setGroup($("layers")),
layerOutline: UC.newBoolean(LANG.la_olin, onLayerToggle, {modes:LOCAL ? ALL : FDM_LASER}),
layerTrace: UC.newBoolean(LANG.la_trce, onLayerToggle, {modes:FDM_LASER}),
layerFacing: UC.newBoolean(LANG.la_face, onLayerToggle, {modes:CAM}),
layerRough: UC.newBoolean(LANG.la_ruff, onLayerToggle, {modes:CAM}),
layerFinish: UC.newBoolean(LANG.la_fini, onLayerToggle, {modes:CAM}),
layerFinishX: UC.newBoolean(LANG.la_finx, onLayerToggle, {modes:CAM}),
layerFinishY: UC.newBoolean(LANG.la_finy, onLayerToggle, {modes:CAM}),
layerDelta: UC.newBoolean(LANG.la_dlta, onLayerToggle, {modes:FDM}),
layerSolid: UC.newBoolean(LANG.la_slds, onLayerToggle, {modes:FDM}),
layerFill: UC.newBoolean(LANG.la_fill, onLayerToggle, {modes:FDM}),
layerSparse: UC.newBoolean(LANG.la_sprs, onLayerToggle, {modes:FDM}),
layerSupport: UC.newBoolean(LANG.la_sprt, onLayerToggle, {modes:FDM}),
layerPrint: UC.newBoolean(LANG.la_prnt, onLayerToggle),
layerMoves: UC.newBoolean(LANG.la_move, onLayerToggle),
settingsGroup: UC.newGroup("settings", control),
settingsGroup: UC.newGroup(LANG.se_menu, control),
settingsTable: UC.newTableRow([
[
UI.settingsLoad =
UC.newButton("load", settingsLoad),
UC.newButton(LANG.se_load, settingsLoad),
UI.settingsSave =
UC.newButton("save", settingsSave)
UC.newButton(LANG.se_save, settingsSave)
],[
UI.settingsExpert =
UC.newButton("expert", () => { UC.setExpert(true); SDB.setItem('expert', true) }, {modes:FDM, expert: false}),
UC.newButton(LANG.se_xprt, () => { UC.setExpert(true); SDB.setItem('expert', true) }, {modes:FDM, expert: false}),
UI.settingsExpert =
UC.newButton("basic", () => { UC.setExpert(false); SDB.removeItem('expert') }, {modes:FDM, expert: true})
UC.newButton(LANG.se_bsic, () => { UC.setExpert(false); SDB.removeItem('expert') }, {modes:FDM, expert: true})
]
]),
process: UC.newGroup("slicing", control, {modes:FDM_LASER}),
process: UC.newGroup(LANG.sl_menu, control, {modes:FDM_LASER}),
// 3d print
sliceHeight: UC.newInput("layer height", {title:"millimeters", convert:UC.toFloat, modes:FDM}),
sliceShells: UC.newInput("shell count", {convert:UC.toInt, modes:FDM}),
sliceTopLayers: UC.newInput("top layers", {title:"top solid layer count", convert:UC.toInt, modes:FDM}),
sliceSolidLayers: UC.newInput("solid layers", {title:"flat area fill projections\nbased on layer deltas", convert:UC.toInt, modes:FDM}),
sliceBottomLayers: UC.newInput("base layers", {title:"bottom solid layer count", convert:UC.toInt, modes:FDM}),
sliceHeight: UC.newInput("layer height", {title:"millimeters", convert:UC.toFloat, modes:FDM}),
sliceShells: UC.newInput("shell count", {convert:UC.toInt, modes:FDM}),
sliceTopLayers: UC.newInput("top layers", {title:"top solid layer count", convert:UC.toInt, modes:FDM}),
sliceSolidLayers: UC.newInput("solid layers", {title:"flat area fill projections\nbased on layer deltas", convert:UC.toInt, modes:FDM}),
sliceBottomLayers: UC.newInput("base layers", {title:"bottom solid layer count", convert:UC.toInt, modes:FDM}),
process: UC.newGroup("fill", control, {modes:FDM}),
sliceFillType: UC.newSelectField("type", {modes:FDM}, "infill"),
sliceFillSparse: UC.newInput("percentage", {title:"for infill areas\n0.0 - 1.0", convert:UC.toFloat, bound:UC.bound(0.0,1.0), modes:FDM}),
sliceFillAngle: UC.newInput("solid angle", {title:"base angle in degrees", convert:UC.toFloat, modes:FDM, expert:true}),
sliceFillOverlap: UC.newInput("overlap", {title:"overlap with shell and fill\nas % of nozzle width\nhigher bonds better\n0.0 - 1.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM, expert:true}),
process: UC.newGroup("fill", control, {modes:FDM}),
sliceFillType: UC.newSelectField("type", {modes:FDM}, "infill"),
sliceFillSparse: UC.newInput("percentage", {title:"for infill areas\n0.0 - 1.0", convert:UC.toFloat, bound:UC.bound(0.0,1.0), modes:FDM}),
sliceFillAngle: UC.newInput("solid angle", {title:"base angle in degrees", convert:UC.toFloat, modes:FDM, expert:true}),
sliceFillOverlap: UC.newInput("overlap", {title:"overlap with shell and fill\nas % of nozzle width\nhigher bonds better\n0.0 - 1.0", convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM, expert:true}),
firstLayer: UC.newGroup("first layer", null, {modes:FDM}),
firstSliceHeight: UC.newInput("layer height", {title:"in millimeters\nshould be >= slice height", convert:UC.toFloat, modes:FDM}),

View file

@ -144,7 +144,50 @@ let gs_kiri_lang = exports;
// WORKSPACE menu
ws_menu: "workspace",
ws_save: "Save",
ws_cler: "Clear"
ws_cler: "Clear",
// OPTIONS menu
op_menu: "options",
op_show_s: "show origin",
op_show_l: "show device or process origin",
op_alig_s: "align top",
op_alig_l: "align parts to the\ntallest part when\nno stock is set",
op_auto_s: "auto layout",
op_auto_l: "automatically layout platform\nwhen new items added\nor when arrange clicked\nmore than once",
op_free_s: "free layout",
op_free_l: "permit dragable layout",
op_invr_s: "invert zoom",
op_invr_l: "invert mouse wheel\nscroll zoom",
op_unit_s: "units",
op_unit_l: "workspace units affects\nspeeds and distances",
// LAYERS pop-menu
la_menu: "layers",
la_olin: "outline",
la_trce: "trace",
la_face: "facing",
la_ruff: "roughing",
la_fini: "finishing",
la_finx: "finish x",
la_finy: "finish y",
la_dlta: "delta",
la_slds: "solids",
la_fill: "solid fill",
la_sprs: "sparse",
la_sprt: "support",
la_prnt: "print",
la_move: "moves",
// SETTINGS menu
se_menu: "settings",
se_load: "load",
se_save: "save",
se_xprt: "expert",
se_bsic: "basic",
// SLICING menu
sl_menu: "slicing"
};
LANG['test'] = { bogus: "not a valid key" };