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); SPACE.platform.setRound(true);
Object.assign(UI, { Object.assign(UI, {
container: container, container: container,
ctrlLeft: $('control-left'), ctrlLeft: $('control-left'),
ctrlRight: $('control-right'), ctrlRight: $('control-right'),
layerView: $('layer-view'), layerView: $('layer-view'),
layerSlider: $('layer-slider'), layerSlider: $('layer-slider'),
modelOpacity: $('opacity'), modelOpacity: $('opacity'),
assets: assets, assets: assets,
control: control, control: control,
modal: $('modal'), modal: $('modal'),
print: $('print'), print: $('print'),
local: $('local'), local: $('local'),
help: $('help'), help: $('help'),
alert: { alert: {
dialog: $('alert-area'), dialog: $('alert-area'),
text: $('alert-text') text: $('alert-text')
}, },
devices: $('devices'), devices: $('devices'),
deviceAdd: $('device-add'), deviceAdd: $('device-add'),
deviceDelete: $('device-del'), deviceDelete: $('device-del'),
deviceSave: $('device-save'), deviceSave: $('device-save'),
deviceClose: $('device-close'), deviceClose: $('device-close'),
deviceSelect: $('device-select'), deviceSelect: $('device-select'),
deviceFavorites: $('device-favorites'), deviceFavorites: $('device-favorites'),
deviceAll: $('device-all'), deviceAll: $('device-all'),
device: UC.newGroup(LANG.dv_gr_dev, $('device')), device: UC.newGroup(LANG.dv_gr_dev, $('device')),
deviceName: UC.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:20, text:true}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), setDeviceRound: UC.newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, modes:FDM}),
setDevice: UC.newGroup(LANG.dv_gr_gco, $('device')), setDevice: UC.newGroup(LANG.dv_gr_gco, $('device')),
setDeviceFan: UC.newInput(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, size:17}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), 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}), setDevicePost: UC.newText(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:ALL, size:14, height:3}),
tools: $('tools'), tools: $('tools'),
toolsSave: $('tools-save'), toolsSave: $('tools-save'),
toolsClose: $('tools-close'), toolsClose: $('tools-close'),
toolSelect: $('tool-select'), toolSelect: $('tool-select'),
toolAdd: $('tool-add'), toolAdd: $('tool-add'),
toolDelete: $('tool-del'), toolDelete: $('tool-del'),
toolType: $('tool-type'), toolType: $('tool-type'),
toolName: $('tool-name'), toolName: $('tool-name'),
toolNum: $('tool-num'), toolNum: $('tool-num'),
toolFluteDiam: $('tool-fdiam'), toolFluteDiam: $('tool-fdiam'),
toolFluteLen: $('tool-flen'), toolFluteLen: $('tool-flen'),
toolShaftDiam: $('tool-sdiam'), toolShaftDiam: $('tool-sdiam'),
toolShaftLen: $('tool-slen'), toolShaftLen: $('tool-slen'),
// toolTaperAngle: $('tool-tangle'), // toolTaperAngle: $('tool-tangle'),
toolTaperTip: $('tool-ttip'), toolTaperTip: $('tool-ttip'),
toolMetric: $('tool-metric'), toolMetric: $('tool-metric'),
catalog: $('catalog'), catalog: $('catalog'),
catalogBody: $('catalogBody'), catalogBody: $('catalogBody'),
catalogList: $('catalogList'), catalogList: $('catalogList'),
settings: $('settings'), settings: $('settings'),
settingsBody: $('settingsBody'), settingsBody: $('settingsBody'),
settingsList: $('settingsList'), settingsList: $('settingsList'),
layerID: $('layer-id'), layerID: $('layer-id'),
layerSpan: $('layer-span'), layerSpan: $('layer-span'),
layerRange: $('layer-range'), layerRange: $('layer-range'),
loading: $('loading').style, loading: $('loading').style,
progress: $('progress').style, progress: $('progress').style,
prostatus: $('prostatus'), prostatus: $('prostatus'),
selection: $('selection'), selection: $('selection'),
selWidth: $('sel_width'), selWidth: $('sel_width'),
selHeight: $('sel_height'), selHeight: $('sel_height'),
selDepth: $('sel_depth'), selDepth: $('sel_depth'),
scaleX: $('scale_x'), scaleX: $('scale_x'),
scaleY: $('scale_y'), scaleY: $('scale_y'),
scaleZ: $('scale_z'), scaleZ: $('scale_z'),
scaleUniform: $('scale_uni'), scaleUniform: $('scale_uni'),
stock: $('stock'), stock: $('stock'),
stockWidth: $('stock-width'), stockWidth: $('stock-width'),
stockDepth: $('stock-width'), stockDepth: $('stock-width'),
stockHeight: $('stock-width'), stockHeight: $('stock-width'),
mode: UC.newGroup(LANG.mo_menu, assets), mode: UC.newGroup(LANG.mo_menu, assets),
modeTable: UC.newTableRow([ modeTable: UC.newTableRow([
@ -249,61 +249,61 @@ var gs_kiri_init = exports;
] ]
]), ]),
layout: UC.newGroup('options'), layout: UC.newGroup(LANG.op_menu),
showOrigin: UC.newBoolean("show origin", booleanSave, {title:"show device or process origin"}), showOrigin: UC.newBoolean(LANG.op_show_s, booleanSave, {title:LANG.op_show_l}),
alignTop: UC.newBoolean("align top", booleanSave, {title:"align parts to the\ntallest part when\nno stock is set", modes:CAM}), alignTop: UC.newBoolean(LANG.op_alig_s, booleanSave, {title:LANG.op_alig_l, modes:CAM}),
autoLayout: UC.newBoolean("auto layout", booleanSave, {title:"automatically layout platform\nwhen new items added\nor when arrange clicked\nmore than once"}), autoLayout: UC.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
freeLayout: UC.newBoolean("free layout", booleanSave, {title:"permit dragable layout"}), freeLayout: UC.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
reverseZoom: UC.newBoolean("invert zoom", booleanSave, {title:"invert mouse wheel\nscroll zoom"}), reverseZoom: UC.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
units: UC.newSelectField("units", {modes:CAM}, "units"), 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")), layers: UC.setGroup($("layers")),
layerOutline: UC.newBoolean("outline", onLayerToggle, {modes:LOCAL ? ALL : FDM_LASER}), layerOutline: UC.newBoolean(LANG.la_olin, onLayerToggle, {modes:LOCAL ? ALL : FDM_LASER}),
layerTrace: UC.newBoolean("trace", onLayerToggle, {modes:FDM_LASER}), layerTrace: UC.newBoolean(LANG.la_trce, onLayerToggle, {modes:FDM_LASER}),
layerFacing: UC.newBoolean("facing", onLayerToggle, {modes:CAM}), layerFacing: UC.newBoolean(LANG.la_face, onLayerToggle, {modes:CAM}),
layerRough: UC.newBoolean("roughing", onLayerToggle, {modes:CAM}), layerRough: UC.newBoolean(LANG.la_ruff, onLayerToggle, {modes:CAM}),
layerFinish: UC.newBoolean("finishing", onLayerToggle, {modes:CAM}), layerFinish: UC.newBoolean(LANG.la_fini, onLayerToggle, {modes:CAM}),
layerFinishX: UC.newBoolean("finish x", onLayerToggle, {modes:CAM}), layerFinishX: UC.newBoolean(LANG.la_finx, onLayerToggle, {modes:CAM}),
layerFinishY: UC.newBoolean("finish y", onLayerToggle, {modes:CAM}), layerFinishY: UC.newBoolean(LANG.la_finy, onLayerToggle, {modes:CAM}),
layerDelta: UC.newBoolean("delta", onLayerToggle, {modes:FDM}), layerDelta: UC.newBoolean(LANG.la_dlta, onLayerToggle, {modes:FDM}),
layerSolid: UC.newBoolean("solids", onLayerToggle, {modes:FDM}), layerSolid: UC.newBoolean(LANG.la_slds, onLayerToggle, {modes:FDM}),
layerFill: UC.newBoolean("solid fill", onLayerToggle, {modes:FDM}), layerFill: UC.newBoolean(LANG.la_fill, onLayerToggle, {modes:FDM}),
layerSparse: UC.newBoolean("sparse fill", onLayerToggle, {modes:FDM}), layerSparse: UC.newBoolean(LANG.la_sprs, onLayerToggle, {modes:FDM}),
layerSupport: UC.newBoolean("support", onLayerToggle, {modes:FDM}), layerSupport: UC.newBoolean(LANG.la_sprt, onLayerToggle, {modes:FDM}),
layerPrint: UC.newBoolean("print", onLayerToggle), layerPrint: UC.newBoolean(LANG.la_prnt, onLayerToggle),
layerMoves: UC.newBoolean("moves", onLayerToggle), layerMoves: UC.newBoolean(LANG.la_move, onLayerToggle),
settingsGroup: UC.newGroup("settings", control), settingsGroup: UC.newGroup(LANG.se_menu, control),
settingsTable: UC.newTableRow([ settingsTable: UC.newTableRow([
[ [
UI.settingsLoad = UI.settingsLoad =
UC.newButton("load", settingsLoad), UC.newButton(LANG.se_load, settingsLoad),
UI.settingsSave = UI.settingsSave =
UC.newButton("save", settingsSave) UC.newButton(LANG.se_save, settingsSave)
],[ ],[
UI.settingsExpert = 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 = 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}),
sliceHeight: UC.newInput("layer height", {title:"millimeters", convert:UC.toFloat, modes:FDM}), sliceShells: UC.newInput("shell count", {convert:UC.toInt, 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}),
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}),
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}),
sliceBottomLayers: UC.newInput("base layers", {title:"bottom solid layer count", convert:UC.toInt, modes:FDM}),
process: UC.newGroup("fill", control, {modes:FDM}), process: UC.newGroup("fill", control, {modes:FDM}),
sliceFillType: UC.newSelectField("type", {modes:FDM}, "infill"), 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}), 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}), 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}), 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}), 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}), 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 // WORKSPACE menu
ws_menu: "workspace", ws_menu: "workspace",
ws_save: "Save", 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" }; LANG['test'] = { bogus: "not a valid key" };