Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk i18n of epicmenu widget options #5237

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 47 additions & 66 deletions LuaUI/Configs/lang/epicmenu.en.json

Large diffs are not rendered by default.

17 changes: 7 additions & 10 deletions LuaUI/Widgets/cmd_newton_firezone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ local alwaysDrawFireZones = false
local transportPredictLevel = 1
local transportPredictionSpeedSq = 5^2

i18nPrefix = 'newtonfirezone_'
options_path = 'Settings/Interface/Falling Units'--/Formations'
options_order = { 'lbl_newton', 'predictNewton', 'alwaysDrawZones', 'jumpOnPrediction', 'lbl_transports', 'predictDrop', 'transportSpeed'}
options = {
lbl_newton = { name = 'Newton Launchers', type = 'label'},
lbl_newton = {
type = 'label',
},
predictNewton = {
type='radioButton',
name='Predict impact location for',
items = {
{name = 'All units', key = 'all', desc = "All units will have their impact predicted whenever they take damge."},
{name = 'Launched units', key = 'newton', desc = "Units hit by a gravity gun will have their impact predited."},
Expand All @@ -134,24 +136,21 @@ options = {
end,
},
alwaysDrawZones = {
name = "Always draw firezones",
desc = "Enable to always draw Newton firezones. Otherwise they are only drawn on selection.",
type = 'bool',
value = false,
OnChange = function(self)
alwaysDrawFireZones = self.value
end,
},
jumpOnPrediction = {
name = "Jump on prediction",
desc = "Enable to have jumpjet units jump to the predicted land location.",
type = 'bool',
value = true,
},
lbl_transports = { name = 'Transports', type = 'label'},
lbl_transports = {
type = 'label'
},
predictDrop = {
type='radioButton',
name='Predict transport drop location for',
items = {
{name = 'All units', key = 'all', desc = "All units will have their drop location predicted."},
{name = 'Bombs only', key = 'bomb', desc = "Crawling bombs will have their drop loction predicted."},
Expand All @@ -170,8 +169,6 @@ options = {
end,
},
transportSpeed = {
name = "Drop prediction speed threshold",
desc = "Draw prediction for transports above this speed.",
type = 'number',
min = 0, max = 8, step = 0.2,
value = 5,
Expand Down
13 changes: 6 additions & 7 deletions LuaUI/Widgets/gfx_commands_fx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,22 @@ local spGetTeamColor = Spring.GetTeamColor
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

i18nPrefix = 'commandsfx_'
options_path = 'Settings/Interface/Command Visibility'--/Formations'
options_order = { 'lblformations', 'indicate_cf_v2', 'onClick'}
options = {
lblformations = { name = 'Formations', type = 'label'},
lblformations = {
type = 'label',
},
indicate_cf_v2 = {
name = "Indicate for custom formations",
desc = "Draw the command indication for commands given with custom formations.",
type = 'bool',
noHotkey = true,
value = true
value = true,
},
onClick = {
name = "Indicate for clicks",
desc = "Draw the command indication for every click.",
type = 'bool',
noHotkey = true,
value = false
value = false,
}
}
--------------------------------------------------------------------------------
Expand Down
27 changes: 23 additions & 4 deletions LuaUI/Widgets/gfx_deferred_rendering.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,37 @@ local spGetSmoothMeshHeight = Spring.GetSmoothMeshHeight

local GLSLRenderer = true

i18nPrefix = 'deferredrendering_'
options_path = 'Settings/Graphics/HDR (experimental)'
options_order = {'enableHDR', 'enableBloom', 'illumThreshold', 'maxBrightness'}

options = {
enableHDR = {type = 'bool', name = 'Use High Dynamic Range Color', value = true,},
enableBloom = {type = 'bool', name = 'Apply Bloom Effect (HDR Only)', value = true,},
enableHDR = {
type = 'bool',
alue = true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alue. Extra scary because there could be more errors like this lurking around the patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this.

Maybe the answer is: run script on another copy of ZK, review differences?
For ~100 files there should be no change.

Or maybe review only added/changed lines and assume deleted are OK, if there's a way to do that.

},
enableBloom = {
type = 'bool',
value = true,
},

-- how bright does a fragment need to be before being considered a glow source? [0, 1]
illumThreshold = {type = 'number', name = 'Illumination Threshold', value = 0.85, min = 0, max = 1, step = 0.05,},
illumThreshold = {
type = 'number',
value = 0.85,
min = 0,
max = 1,
step = 0.05,
},

-- maximum brightness of bloom additions [1, n]
maxBrightness = {type = 'number', name = 'Maximum Highlight Brightness', value = 0.35, min = 0.05, max = 1, step = 0.05,},
maxBrightness = {
type = 'number',
value = 0.35,
min = 0.05,
max = 1,
step = 0.05,
},
}

for key,option in pairs(options) do
Expand Down
18 changes: 4 additions & 14 deletions LuaUI/Widgets/gfx_stereo3d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,18 @@ local function UpdateConvSep()
conv = options.conv.value * swap
end

i18nPrefix = 'stereo3d_'
options_path = 'Settings/Graphics/Effects/Stereo3D'
options_order = { 'toggle3d', 'helpwindow', 'lblblank1', 'lblsettings', 'swapeyes', 'lasersight', 'hidecursor', 'sep', 'conv', 'lblblank2', 's3dmode', 'lblblank3', }
options = {

toggle3d = {
name = 'Enable Stereo 3D',
type = 'bool',
value = false,
desc = 'Turn Stereo3D vision on or off.',
noHotkey = true,
},

helpwindow = {
name = 'Stereo3D Help',
type = 'text',
value = [[
- Press alt+ctrl+shift to toggle the mouse cursor (doesn't work if gui is hidden).
Expand All @@ -287,51 +285,44 @@ options = {
]],
},

lblsettings = {name='Settings', type='label'},
lblsettings = {
type='label',
},

swapeyes = {
name = 'Swap Eyes',
type = 'bool',
value = false,
OnChange = UpdateConvSep,
noHotkey = true,
},
lasersight = {
name = 'Laser Sight',
type = 'bool',
value = true,
desc = 'Enable Laser sight for cursor.',
noHotkey = true,
},

hidecursor = {
name = 'Hide Cursor',
type = 'bool',
value = false,
noHotkey = true,
},

sep = {
name = 'Separation',
type = 'number',
value = sep,
min=0,max=30,step=0.1,
desc = 'How far apart your eyes are.',
OnChange = UpdateConvSep,
},

conv = {
name = 'Convergence',
type = 'number',
value = conv,
min=0,max=0.05,step=0.001,
desc = 'How crosseyed you are.',
OnChange = UpdateConvSep,
},


s3dmode = {
name = '3D Modes',
type = 'list',
items = possibleRenderer,
OnChange = function()
Expand All @@ -349,7 +340,6 @@ options = {

--[[
camera = {
name = 'Camera Type',
type = 'list',
items = {
{name = 'Default', key = 'viewta'},
Expand Down
34 changes: 9 additions & 25 deletions LuaUI/Widgets/gui_chili_core_selector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ local defaultFacHotkeys = {
{key='T', mod='alt+'},
}

i18nPrefix = 'chilicoreselector_'
options_path = 'Settings/HUD Panels/Quick Selection Bar'
options_order = { 'showCoreSelector', 'vertical', 'buttonSizeLong', 'background_opacity', 'monitoridlecomms','monitoridlenano', 'monitorInbuiltCons', 'leftMouseCenter', 'lblSelectionIdle', 'selectprecbomber', 'selectidlecon', 'selectidlecon_all', 'lblSelection', 'selectcomm', 'horPaddingLeft', 'horPaddingRight', 'vertPadding', 'buttonSpacing', 'minButtonSpaces', 'specSpaceOverride', 'fancySkinning', 'leftsideofscreen'}
options = {
showCoreSelector = {
name = 'Selection Bar Visibility',
type = 'radioButton',
value = 'specHide',
items = {
Expand All @@ -205,21 +205,18 @@ options = {
noHotkey = true,
},
vertical = {
name = 'Vertical Bar',
type = 'bool',
value = false,
noHotkey = true,
OnChange = OptionsUpdateLayout,
},
buttonSizeLong = {
name = 'Button Size',
type = 'number',
value = 58,
min = 10, max = 200, step = 1,
OnChange = OptionsUpdateLayout,
},
background_opacity = {
name = "Opacity",
type = "number",
value = 0, min = 0, max = 1, step = 0.01,
OnChange = function(self)
Expand All @@ -230,100 +227,89 @@ options = {
end
},
monitoridlecomms = {
name = 'Track idle commanders',
type = 'bool',
value = true,
noHotkey = true,
},
monitoridlenano = {
name = 'Track idle nanotowers',
type = 'bool',
value = true,
noHotkey = true,
},
monitorInbuiltCons = {
name = 'Track constructors being built',
type = 'bool',
value = false,
noHotkey = true,
},
leftMouseCenter = {
name = 'Swap Camera Center Button',
desc = 'When enabled left click a commander or factory to center the camera on it. When disabled right click centers.',
type = 'bool',
value = false,
noHotkey = true,
},
lblSelectionIdle = { type='label', name='Idle Units', path='Hotkeys/Selection', },
lblSelectionIdle = {
type='label',
path='Hotkeys/Selection',
},
selectprecbomber = { type = 'button',
name = 'Select idle precision bomber',
desc = 'Selects an idle, armed precision bomber. Use multiple times to select more. Deselects any units which are not idle, armed precision bombers.',
action = 'selectprecbomber',
path = 'Hotkeys/Selection',
dontRegisterAction = true,
},
selectidlecon = { type = 'button',
name = 'Select idle constructor',
desc = 'Selects an idle constructor. Use multiple times to select more. Deselects any units which are not idle constructors.',
action = 'selectidlecon',
path = 'Hotkeys/Selection',
dontRegisterAction = true,
},
selectidlecon_all = { type = 'button',
name = 'Select all idle constructors',
action = 'selectidlecon_all',
path = 'Hotkeys/Selection',
dontRegisterAction = true,
},
lblSelection = { type='label', name='Quick Selection Bar', path='Hotkeys/Selection', },
lblSelection = {
type='label',
path='Hotkeys/Selection',
},
selectcomm = { type = 'button',
name = 'Select Commander',
action = 'selectcomm',
path = 'Hotkeys/Selection',
dontRegisterAction = true,
},
horPaddingLeft = {
name = 'Horizontal Padding Left',
type = 'number',
value = 0,
advanced = true,
min = 0, max = 100, step = 0.25,
OnChange = OptionsUpdateLayout,
},
horPaddingRight = {
name = 'Horizontal Padding Right',
type = 'number',
value = 0,
advanced = true,
min = 0, max = 100, step = 0.25,
OnChange = OptionsUpdateLayout,
},
vertPadding = {
name = 'Vertical Padding',
type = 'number',
value = 0,
advanced = true,
min = 0, max = 100, step = 0.25,
OnChange = OptionsUpdateLayout,
},
buttonSpacing = {
name = 'Button Spacing',
type = 'number',
value = 0,
advanced = true,
min = 0, max = 100, step = 0.25,
OnChange = OptionsUpdateLayout,
},
minButtonSpaces = {
name = 'Minimum Button Space',
type = 'number',
value = 0,
advanced = true,
min = 0, max = 16, step = 1,
OnChange = OptionsUpdateLayout,
},
specSpaceOverride = {
name = 'Spectating Space Override',
desc = 'Size of the spacer which is present while spectating with "Only keep space when spectating".',
type = 'number',
value = 50,
Expand All @@ -332,7 +318,6 @@ options = {
OnChange = OptionsUpdateLayout,
},
fancySkinning = {
name = 'Fancy Skinning',
type = 'radioButton',
value = 'panel',
items = {
Expand All @@ -349,7 +334,6 @@ options = {
noHotkey = true,
},
leftsideofscreen = {
name = 'Left side of screen',
type = 'bool',
value = true,
hidden = true,
Expand Down
Loading