diff --git a/lua/weapons/gmod_tool/stools/acfsound.lua b/lua/weapons/gmod_tool/stools/acfsound.lua index b3825972..30f39a1a 100644 --- a/lua/weapons/gmod_tool/stools/acfsound.lua +++ b/lua/weapons/gmod_tool/stools/acfsound.lua @@ -1,6 +1,6 @@ local cat = ((ACF.CustomToolCategory and ACF.CustomToolCategory:GetBool()) and "ACF" or "Construction") TOOL.Category = cat -TOOL.Name = "#Tool.acfsound.name" +TOOL.Name = "#tool.acfsound.name" TOOL.Command = nil TOOL.ConfigName = "" TOOL.ClientConVar["pitch"] = "1" @@ -12,16 +12,6 @@ TOOL.Information = { { name = "info" } } -if CLIENT then - language.Add("Tool.acfsound.name", "ACF Sound Replacer") - language.Add("Tool.acfsound.desc", "Change sounds of ACF entities") - - language.Add("Tool.acfsound.left", "Apply sound") - language.Add("Tool.acfsound.right", "Copy sound") - language.Add("Tool.acfsound.reload", "Set default sound") - language.Add("Tool.acfsound.0", "Use an empty sound path to disable sound") -end - ACF.SoundToolSupport = ACF.SoundToolSupport or {} local Sounds = ACF.SoundToolSupport @@ -147,9 +137,9 @@ local function IsReallyValid(trace, ply) if not ACF.SoundToolSupport[class] then if string.StartWith(class, "acf_") then - ACF.SendNotify(ply, false, class .. " is not supported by the sound tool!") + ACF.SendNotify(ply, false, "#tool.acfsound.unsupported_class") else - ACF.SendNotify(ply, false, "Only ACF entities are supported by the ACF sound tool!") + ACF.SendNotify(ply, false, "#tool.acfsound.unsupported_ent") end return false @@ -212,7 +202,7 @@ if CLIENT then function TOOL.BuildCPanel(panel) local wide = panel:GetWide() - local Desc = panel:Help("Replace default sounds of certain ACF entities with this tool.\n") + local Desc = panel:Help("#tool.acfsound.help") Desc:SetFont("ACF_Control") local SoundNameText = vgui.Create("DTextEntry", ValuePanel) @@ -226,7 +216,7 @@ if CLIENT then panel:AddItem(SoundNameText) local SoundBrowserButton = vgui.Create("DButton") - SoundBrowserButton:SetText("Open Sound Browser") + SoundBrowserButton:SetText("#tool.acfsound.open_browser") SoundBrowserButton:SetFont("ACF_Control") SoundBrowserButton:SetWide(wide) SoundBrowserButton:SetTall(20) @@ -243,7 +233,7 @@ if CLIENT then SoundPre:SetVisible(true) local SoundPrePlay = vgui.Create("DButton", SoundPre) - SoundPrePlay:SetText("Play") + SoundPrePlay:SetText("#tool.acfsound.play") SoundPrePlay:SetFont("ACF_Control") SoundPrePlay:SetVisible(true) SoundPrePlay:SetIcon("icon16/sound.png") @@ -252,7 +242,7 @@ if CLIENT then end local SoundPreStop = vgui.Create("DButton", SoundPre) - SoundPreStop:SetText("Stop") + SoundPreStop:SetText("#tool.acfsound.stop") SoundPreStop:SetFont("ACF_Control") SoundPreStop:SetVisible(true) SoundPreStop:SetIcon("icon16/sound_mute.png") @@ -272,7 +262,7 @@ if CLIENT then end local CopyButton = vgui.Create("DButton") - CopyButton:SetText("Copy to Clipboard") + CopyButton:SetText("#tool.acfsound.copy") CopyButton:SetFont("ACF_Control") CopyButton:SetWide(wide) CopyButton:SetTall(20) @@ -284,7 +274,7 @@ if CLIENT then panel:AddItem(CopyButton) local ClearButton = vgui.Create("DButton") - ClearButton:SetText("Clear Sound") + ClearButton:SetText("#tool.acfsound.clear") ClearButton:SetFont("ACF_Control") ClearButton:SetWide(wide) ClearButton:SetTall(20) @@ -296,10 +286,11 @@ if CLIENT then end panel:AddItem(ClearButton) - panel:NumSlider("Volume", "acfsound_volume", 0.1, 2, 2) - panel:NumSlider("Pitch", "acfsound_pitch", 0.1, 2, 2) + panel:NumSlider("#tool.acfsound.volume", "acfsound_volume", 0.1, 2, 2) + panel:NumSlider("#tool.acfsound.pitch", "acfsound_pitch", 0.1, 2, 2) - panel:ControlHelp("Adjust the volume and pitch of the sound. Support available for guns and engines only.") + local SettingsHelp = panel:ControlHelp("#tool.acfsound.settings_help") + SettingsHelp:SetFont("ACF_Control") end --[[ diff --git a/resource/localization/en/acf_tool_sound.properties b/resource/localization/en/acf_tool_sound.properties new file mode 100644 index 00000000..50c06f47 --- /dev/null +++ b/resource/localization/en/acf_tool_sound.properties @@ -0,0 +1,22 @@ +# Strings for the ACF Sound Replacer tool +tool.acfsound.name=ACF Sound Replacer +tool.acfsound.desc=Change sounds of ACF entities + +tool.acfsound.left=Apply sound +tool.acfsound.right=Copy sound +tool.acfsound.reload=Set default sound +tool.acfsound.0=Use an empty sound path to disable sound + +tool.acfsound.unsupported_class=This ACF entity class is not supported by the sound tool! +tool.acfsound.unsupported_ent=Only ACF entities are supported by the ACF sound tool! + +tool.acfsound.help=Replace default sounds of certain ACF entities with this tool.\n +tool.acfsound.open_browser=Open Sound Browser +tool.acfsound.play=Play +tool.acfsound.stop=Stop +tool.acfsound.copy=Copy to Clipboard +tool.acfsound.clear=Clear Sound + +tool.acfsound.volume=Volume +tool.acfsound.pitch=Pitch +tool.acfsound.settings_help=Adjust the volume and pitch of the sound. Support available for guns and engines only. \ No newline at end of file