Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function TOOL:RightClick( trace )
net.WriteUInt( 1, 1 )
net.WriteVector( Dupe.Mins )
net.WriteVector( Dupe.Maxs )
net.WriteString( "Unsaved dupe" )
net.WriteString( "#duplicator.dupe_unsaved" )
net.WriteUInt( table.Count( Dupe.Entities ), 24 )
net.WriteUInt( 0, 16 )
net.Send( self:GetOwner() )
Expand Down Expand Up @@ -149,13 +149,13 @@ if ( CLIENT ) then
if ( !tool && IsValid( LocalPlayer() ) ) then tool = LocalPlayer():GetTool( "duplicator" ) end
if ( !tool || !tool.CurrentDupeName ) then return end

local info = "Name: " .. tool.CurrentDupeName
info = info .. "\nEntities: " .. tool.CurrentDupeEntCount
local info = language.GetPhrase( "duplicator.dupe_name" ) .. " " .. language.GetPhrase( tool.CurrentDupeName )
info = info .. "\n" .. language.GetPhrase( "duplicator.dupe_entities" ) .. " " .. tool.CurrentDupeEntCount

CPanel:Help( info )

if ( tool.CurrentDupeWSIDs && #tool.CurrentDupeWSIDs > 0 ) then
CPanel:Help( "Required workshop content:" )
CPanel:Help( "#duplicator.dupe_required_content" )
for _, wsid in pairs( tool.CurrentDupeWSIDs ) do
local subbed = ""
if ( steamworks.IsSubscribed( wsid ) ) then subbed = " (Subscribed)" end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spawnmenu.AddCreationTab( "#spawnmenu.category.saves", function()
file = "saves/" .. v,
name = v:StripExtension(),
preview = "saves/" .. v:StripExtension() .. ".jpg",
description = "Local map saves stored on your computer. Local content can be deleted in the main menu."
description = language.GetPhrase( "saves.local_description" )
}

table.insert( saves, entry )
Expand Down Expand Up @@ -72,12 +72,12 @@ spawnmenu.AddCreationTab( "#spawnmenu.category.saves", function()
if ( mapFile == game.GetMap() ) then
RunConsoleCommand( "gm_load", filename )
else
local msg = string.format( "Loading this save will force a map change to %s. Do you wish to continue?", mapFile )
local msg = string.format( language.GetPhrase( "saves.mapchange_message" ), mapFile )

Derma_Query( msg,
"Please confirm loading this save",
"Load", function() RunConsoleCommand( "gm_load", filename ) end,
"Cancel" )
language.GetPhrase( "saves.confirm_load_title" ),
language.GetPhrase( "saves.dialog_load" ), function() RunConsoleCommand( "gm_load", filename ) end,
language.GetPhrase( "dialog.cancel" ) )
end

end
Expand Down
6 changes: 3 additions & 3 deletions garrysmod/lua/derma/derma_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function Derma_Message( strText, strTitle, strButtonText )
ButtonPanel:SetPaintBackground( false )

local Button = vgui.Create( "DButton", ButtonPanel )
Button:SetText( strButtonText or "OK" )
Button:SetText( strButtonText or "#dialog.ok" )
Button:SizeToContents()
Button:SetTall( 20 )
Button:SetWide( Button:GetWide() + 20 )
Expand Down Expand Up @@ -219,15 +219,15 @@ function Derma_StringRequest( strTitle, strText, strDefaultText, fnEnter, fnCanc
ButtonPanel:SetPaintBackground( false )

local Button = vgui.Create( "DButton", ButtonPanel )
Button:SetText( strButtonText or "OK" )
Button:SetText( strButtonText or "#dialog.ok" )
Button:SizeToContents()
Button:SetTall( 20 )
Button:SetWide( Button:GetWide() + 20 )
Button:SetPos( 5, 5 )
Button.DoClick = function() Window:Close() fnEnter( TextEntry:GetValue() ) end

local ButtonCancel = vgui.Create( "DButton", ButtonPanel )
ButtonCancel:SetText( strButtonCancelText or "Cancel" )
ButtonCancel:SetText( strButtonCancelText or "#dialog.cancel" )
ButtonCancel:SizeToContents()
ButtonCancel:SetTall( 20 )
ButtonCancel:SetWide( Button:GetWide() + 20 )
Expand Down
8 changes: 4 additions & 4 deletions garrysmod/lua/menu/mainmenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ function GetServers( category, id )
local version = string.JavascriptSafe( tostring( VERSION ) )

SendServer( pnlMainMenu, category, id,
2000, language.GetPhrase("server_noresponse"):format(address), language.GetPhrase("server_gamemode_unreachable"), "no_map", 0, 2, 0, "false", 0, address, "unkn", "0",
2000, language.GetPhrase( "server_noresponse" ):format( address ), language.GetPhrase( "server_gamemode_unreachable" ), "no_map", 0, 2, 0, "false", 0, address, "unkn", "0",
"true", version, tostring( serverlist.IsServerFavorite( address ) ), "", "" )

return !ShouldStop[ category ]
Expand Down Expand Up @@ -658,11 +658,11 @@ hook.Add( "GameContentChanged", "RefreshMainMenu", function()

end )

hook.Add( "LoadGModSaveFailed", "LoadGModSaveFailed", function( str, wsid )
hook.Add( "LoadGModSaveFailed", "HandleUGCLoadFailure", function( str, wsid )
local button2 = nil
if ( wsid and wsid:len() > 0 and wsid != "0" ) then button2 = "Open map on Steam Workshop" end
if ( wsid and wsid:len() > 0 and wsid != "0" ) then button2 = "#ugc.open_map" end

Derma_Query( str, "Failed to load save!", "OK", nil, button2, function() steamworks.ViewFile( wsid ) end )
Derma_Query( str, "#ugc.load_failed", "#dialog.ok", nil, button2, function() steamworks.ViewFile( wsid ) end )
gui.ActivateGameUI()
end )

Expand Down
8 changes: 4 additions & 4 deletions garrysmod/lua/menu/menu_demo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function demo:FetchLocal( offset, perpage )
file = "demos/" .. v,
name = v:StripExtension(),
preview = "demos/" .. v:StripExtension() .. ".jpg",
description = "Local demo stored on your computer. Local content can be deleted in the main menu."
description = language.GetPhrase( "demos.local_description" )
}

table.insert( saves, entry )
Expand All @@ -36,7 +36,7 @@ end
function demo:DownloadAndPlay( id )

steamworks.DownloadUGC( id, function( name )
if ( !name ) then hook.Call( "LoadGModSaveFailed", nil, "Failed to download demo from Steam Workshop!" ) return end
if ( !name ) then hook.Call( "LoadGModSaveFailed", nil, language.GetPhrase( "ugc.download_failed" ) ) return end

self:Play( name )

Expand All @@ -54,7 +54,7 @@ end
function demo:DownloadAndToVideo( id )

steamworks.DownloadUGC( id, function( name )
if ( !name ) then hook.Call( "LoadGModSaveFailed", nil, "Failed to download demo from Steam Workshop!" ) return end
if ( !name ) then hook.Call( "LoadGModSaveFailed", nil, language.GetPhrase( "ugc.download_failed" ) ) return end

self:ToVideo( name )

Expand All @@ -72,7 +72,7 @@ end
function demo:FinishPublish( filename, imagename, name, desc, chosenTag, other )

local info = GetDemoFileDetails( filename )
if ( !info ) then return "Couldn't get demo information!" end
if ( !info ) then return "#ugc_upload.error.demo_info" end

steamworks.Publish( filename, imagename, name, desc, { "demo", info.mapname }, other.Callback, other.WorkshopID, other.ChangeNotes )

Expand Down
2 changes: 1 addition & 1 deletion garrysmod/lua/menu/menu_dupe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function ws_dupe:FetchLocal( offset, perpage )
file = "dupes/" .. v,
name = v:StripExtension(),
preview = "dupes/" .. v:StripExtension() .. ".jpg",
description = "Local duplication stored on your computer. Local content can be deleted in the main menu."
description = language.GetPhrase( "dupes.local_description" )
}

table.insert( saves, entry )
Expand Down
6 changes: 3 additions & 3 deletions garrysmod/lua/menu/menu_save.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function ws_save:FetchLocal( offset, perpage )
file = "saves/" .. v,
name = v:StripExtension(),
preview = "saves/" .. v:StripExtension() .. ".jpg",
description = "Local map save stored on your computer. Local content can be deleted in the main menu."
description = language.GetPhrase( "saves.local_description" )
}

table.insert( saves, entry )
Expand All @@ -37,7 +37,7 @@ function ws_save:DownloadAndLoad( id )

steamworks.DownloadUGC( id, function( name )

if ( !name ) then hook.Call( "LoadGModSaveFailed", nil, "Failed to download save from Steam Workshop!" ) return end
if ( !name ) then hook.Call( "LoadGModSaveFailed", nil, language.GetPhrase( "ugc.download_failed" ) ) return end

ws_save:Load( name )

Expand All @@ -54,7 +54,7 @@ end
function ws_save:FinishPublish( filename, imagename, name, desc, chosenTag, other )

local info = GetSaveFileDetails( filename )
if ( !info ) then return "Couldn't get save information!" end
if ( !info ) then return "#ugc_upload.error.save_info" end

steamworks.Publish( filename, imagename, name, desc, { "save", info.map, chosenTag }, other.Callback, other.WorkshopID, other.ChangeNotes )

Expand Down
2 changes: 1 addition & 1 deletion garrysmod/lua/menu/openurl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function PANEL_Browser:Init()
self.HTML:Dock( FILL )
--self.HTML:SetOpenLinksExternally( true )

self:SetTitle( "Steam overlay replacement" )
self:SetTitle( "#openurl.overlay_replacement_title" )
self:SetSize( ScrW() * 0.75, ScrH() * 0.75 )
self:SetSizable( true )
self:Center()
Expand Down
1 change: 1 addition & 0 deletions garrysmod/resource/localization/en/community.properties
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ sort.newest=Newest
sort.oldest=Oldest
category.featured=Featured
dialog.ok=OK
dialog.cancel=Cancel

#Singular of main_menu's "saves=Saves". Not the concept of saving, but the concept of a singluar Save.
saves.singular=Save
Expand Down
13 changes: 13 additions & 0 deletions garrysmod/resource/localization/en/main_menu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ saves.machines=Machines
saves.courses=Courses
saves.buildings=Buildings
saves.others=Others
saves.local_description=Local map save stored on your computer. Local content can be deleted in the main menu.
saves.mapchange_message=Loading this save will force a map change to %s. Do you wish to continue?
saves.confirm_load_title=Please confirm loading this save
saves.dialog_load=Load
save.savegame=Save Game

ugc.install=install
Expand All @@ -269,6 +273,9 @@ ugc.XoutofY=%s of %s
ugc.mounting=Mounting Workshop content, please wait...
ugc.fetching=Fetching Subscriptions...
ugc.disabled=Workshop content is disabled by -noworkshop launch option!
ugc.download_failed=Failed to download the file from Steam Workshop!
ugc.load_failed=Failed to load Steam Workshop content
ugc.open_map=Open map on Steam Workshop

demos=Demos
demos.local=My Demos
Expand Down Expand Up @@ -297,6 +304,7 @@ demos.followed=Followed
demos.followed.subtitle=The latest demos from your favorite Workshop creators
demos.favorite=Favorites
demos.favorite.subtitle=Your favorite demos
demos.local_description=Local demo stored on your computer. Local content can be deleted in the main menu.

addons.subscribed=Subscribed
addons.subscribed.subtitle=Addons that you're subscribed to
Expand Down Expand Up @@ -433,6 +441,7 @@ dupes.others=Others
dupes.subscribed_ugc=Subscribed
dupes.subscribed_ugc.subtitle=Dupes that you're subscribed to
dupes.openfolder=Open Dupes Folder
dupes.local_description=Local duplication stored on your computer. Local content can be deleted in the main menu.

motionsensor.showcolor=Show Video Box
motionsensor.colorpos=Video Position\:
Expand All @@ -456,6 +465,8 @@ openurl.yes_remember=Don't ask again for this server
openurl.nope=Nope
openurl.disconnect=Disconnect

openurl.overlay_replacement_title=Steam overlay replacement

ugc_upload.frametitle=Publish creation to Steam Workshop
ugc_upload.title=Title\:
ugc_upload.description=Description\:
Expand All @@ -478,6 +489,8 @@ ugc_upload.tag_courses=Course
ugc_upload.tag_posed=Pose / Ragdoll
ugc_upload.publishing=Publishing your content, please wait...
ugc_upload.error.title=Error while publishing content!
ugc_upload.error.save_info=Couldn't get save information!
ugc_upload.error.demo_info=Couldn't get demo information!

option_crosshair.title=Default Crosshair Setup
option_crosshair.style_hl2=Half-Life 2
Expand Down
5 changes: 5 additions & 0 deletions garrysmod/resource/localization/en/tool.properties
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ tool.duplicator.left=Paste duplication
tool.duplicator.right=Copy contraption
tool.duplicator.showsaves=Show Saved Duplications

duplicator.dupe_unsaved=Unsaved duplication
duplicator.dupe_name=Name\:
duplicator.dupe_entities=Entities\:
duplicator.dupe_required_content=Required Steam Workshop content\:

tool.creator.name=Creator
tool.creator.desc=A generic creator. It makes things. That's all you need to know.
tool.creator.left=Create the object
Expand Down