Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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.unsaved_dupename" )
net.WriteUInt( table.Count( Dupe.Entities ), 24 )
net.WriteUInt( 0, 16 )
net.Send( self:GetOwner() )
Expand Down Expand Up @@ -149,16 +149,16 @@ 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 = string.format( language.GetPhrase( "duplicator.dupename_X" ), language.GetPhrase( tool.CurrentDupeName ) or tool.CurrentDupeName )
info = info .. string.format( language.GetPhrase( "duplicator.dupeentities_X" ), tool.CurrentDupeEntCount )

CPanel:Help( info )

if ( tool.CurrentDupeWSIDs && #tool.CurrentDupeWSIDs > 0 ) then
CPanel:Help( "Required workshop content:" )
CPanel:Help( "#duplicator.workshop_items_need" )
for _, wsid in pairs( tool.CurrentDupeWSIDs ) do
local subbed = ""
if ( steamworks.IsSubscribed( wsid ) ) then subbed = " (Subscribed)" end
if ( steamworks.IsSubscribed( wsid ) ) then subbed = language.GetPhrase( "duplicator.dupe_subscribed_label" ) end
local b = CPanel:Button( wsid .. subbed )
b.DoClick = function( s, ... ) steamworks.ViewFile( wsid ) end
steamworks.FileInfo( wsid, function( result )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if ( SERVER ) then
net.WriteUInt( 0, 1 ) -- Can save
net.WriteVector( Dupe.Mins )
net.WriteVector( Dupe.Maxs )
net.WriteString( "Loaded dupe" )
net.WriteString( "#duplicator.loaded_dupename" )
net.WriteUInt( table.Count( Dupe.Entities ), 24 )
net.WriteUInt( workshopCount, 16 )
if ( Dupe.RequiredAddons ) then
Expand Down
4 changes: 2 additions & 2 deletions garrysmod/gamemodes/sandbox/gamemode/cl_hints.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ local function LookupBinding( group )
local key = input.LookupBinding( group )

if ( !key ) then
return "'" .. string.lower( group ) .. " not bound'"
return string.format( language.GetPhrase( "hint_keynotfoundquotations" ), string.lower( group ) )
end

return "'" .. string.upper( key ) .. "'"
return string.format( language.GetPhrase( "hint_keyquotations" ), string.upper( key ) )

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_mapsave_notice" )
}

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.other_mapsave_message" ), mapFile )

Derma_Query( msg,
"Please confirm loading this save",
"Load", function() RunConsoleCommand( "gm_load", filename ) end,
"Cancel" )
language.GetPhrase( "saves.other_mapsave_title" ),
language.GetPhrase( "saves.other_mapsave_load" ), function() RunConsoleCommand( "gm_load", filename ) end,
language.GetPhrase( "saves.other_mapsave_cancel" ) )
end

end
Expand Down
4 changes: 2 additions & 2 deletions garrysmod/html/js/menu/control.Servers.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function ControllerServers( $scope, $element, $rootScope, $location )

$scope.GamemodeName = function( gm )
{
if ( !gm ) return "Unknown Gamemode";
if ( !gm ) return "#gamemodename_unknown";

if ( gm.info && gm.info.title )
return StripWeirdSymbols( gm.info.title );
Expand Down Expand Up @@ -385,7 +385,7 @@ function pad( num ) { return ( num < 10 ? "0" : "" ) + num.toString(); }

function FormatVersion( ver )
{
if ( !ver ) return "Unknown version";
if ( !ver ) return "#gameversionname_unknown";

var y = Math.floor( ver / 10000 );
var m = Math.floor( ( ver - y * 10000 ) / 100 );
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 "#preset.derma_okay" )
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 "#preset.derma_okay" )
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 "#preset.derma_cancel" )
ButtonCancel:SizeToContents()
ButtonCancel:SetTall( 20 )
ButtonCancel:SetWide( Button:GetWide() + 20 )
Expand Down
2 changes: 1 addition & 1 deletion garrysmod/lua/menu/cef_credits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function PANEL:Init()
self.HTML:OpenURL( "chrome://credits/" )
self.HTML:SetOpenLinksExternally( true )

self:SetTitle( "Chromium Embedded Framework Credits" )
self:SetTitle( "#openurl.chromium_credits_title" )
self:SetPos( 16, 16 )
self:SetSize( 720, 400 )
self:SetSizable( true )
Expand Down
2 changes: 1 addition & 1 deletion 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" ), language.GetPhrase( "server_no_map" ), 0, 2, 0, "false", 0, address, "unkn", "0",
"true", version, tostring( serverlist.IsServerFavorite( address ) ), "", "" )

return !ShouldStop[ category ]
Expand Down
6 changes: 3 additions & 3 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_demo_notice" )
}

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( "demos.demo_download_failed_notice" ) ) 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( "demos.demo_download_failed_notice" ) ) return end

self:ToVideo( name )

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_dupe_notice" )
}

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_mapsave_notice" )
}

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( "saves.mapsave_download_failed_notice" ) ) 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 "#saves.mapsave_save_info_failed_notice" 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
2 changes: 1 addition & 1 deletion garrysmod/lua/menu/problems/problems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ local function FireError( str, realm, stack, addontitle, addonid )
errorText = string.Replace( errorText, "\t", ( " " ):rep( 12 ) ) -- Ew

for i, t in pairs( stack ) do
if ( !t.Function or t.Function == "" ) then t.Function = "unknown" end
if ( !t.Function or t.Function == "" ) then t.Function = language.GetPhrase( "problems.function_error_unknown" ) end

errorText = errorText .. "\n" .. (" "):rep( i ) .. i .. ". " .. t.Function .. " - " .. t.File .. ":" .. t.Line
end
Expand Down
3 changes: 3 additions & 0 deletions garrysmod/resource/localization/en/hints.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Hint_ColorRoom=Change the color of the white room using the color tool\!
Hint_EditingSpawnlists=You can edit your spawnlists by drag and dropping icons around and inbetween spawnlists\!
Hint_EditingSpawnlistsSave=Press \"Save Changes\" to save any changes made to your spawnlists\!

hint_keyquotations='%s'
Copy link
Collaborator

Choose a reason for hiding this comment

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

We absolutely do not need to "localize" single quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why? I've seen Russian translates it as guillemets (« »). Or maybe it would look better when completely removed in translated version

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's fine as is. There's no need to change it. This would be at best a visual change that serves no purpose of localization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But that's the point of localization(?). I don't know if it will overload localization system, so if it really matters i can change it in a few

Copy link
Collaborator

Choose a reason for hiding this comment

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

No? The point of localization is not to randomly use fancy quotation marks only for some languages, it's to translate to languages people know?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay i'm not gonna argue that because quotation marks is a part of text as words are...
I'm just gonna apply your changes then

hint_keynotfoundquotations='%s not bound'

hint.unfrozeX=Unfrozen %i objects
hint.undoneX=Undone \"%s\"
hint.hitXlimit=You have hit the \"%s\" limit!
Expand Down
10 changes: 10 additions & 0 deletions garrysmod/resource/localization/en/main_menu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ problems.quick_fix=Quick fix
problems.no_quick_fix=No quick fix available
problems.quick_nofix_ingame=Quick fix is not available while in-game
lua_strict=Enable strict Lua mode (For developers, unhides certain warnings and Lua errors)
problems.function_error_unknown=unknown

problem_grp.other=Other
problem_grp.config=Configuration
Expand Down Expand Up @@ -177,6 +178,9 @@ favorite_this_server=Favorite this server
unfavorite_this_server=Unfavorite this server
servers_find_title=Search for servers by address to add to favorites
servers_find=Find servers at given address
gamemodename_unknown=Unknown Gamemode
gameversionname_unknown=Unknown version
server_no_map=no_map
Copy link
Collaborator

Choose a reason for hiding this comment

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

Map names (server_no_map) do not need translation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's still shows up to client so i will leave it localizable 😄

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, then I can't really merge the Pull Request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not? Key name is not that long and it shows to the player...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because it sets a precedent for map names to be translated. There are already cases of people perhaps taking it too far.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of map names are just file names so, i'm assuring that i won't be making this happen. Plus on this case it's just a static text of a map file name that not even exist, sorry for my zeal to add most of the text to localization files.


gmsort_players=Player count
gmsort_servers=Server count
Expand Down Expand Up @@ -400,6 +404,9 @@ addon.disable=disable
addon.subscribe=install
addon.unsubscribe=uninstall

addons.load_error_unknown=unknown
addons.author_unknown=[unknown]

dupes=Dupes
dupes.popular=Top Rated
dupes.popular.subtitle=The most popular dupes on Workshop
Expand Down Expand Up @@ -456,6 +463,9 @@ openurl.yes_remember=Don't ask again for this server
openurl.nope=Nope
openurl.disconnect=Disconnect

openurl.chromium_credits_title=Chromium Embedded Framework Credits
openurl.overlay_replacement_title=Steam overlay replacement

ugc_upload.frametitle=Publish creation to Steam Workshop
ugc_upload.title=Title\:
ugc_upload.description=Description\:
Expand Down
24 changes: 24 additions & 0 deletions garrysmod/resource/localization/en/spawnmenu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,27 @@ undo.generic.entity=Entity
undo.generic.weapon=Weapon
undo.generic.vehicle=Vehicle
undo.duplication=Duplication

# Saves Menu
saves.local_mapsave_notice=Local map save stored on your computer. Local content can be deleted in the main menu.
saves.other_mapsave_message=Loading this save will force a map change to %s. Do you wish to continue?
saves.other_mapsave_title=Please confirm loading this save
saves.other_mapsave_load=Load
saves.other_mapsave_cancel=Cancel
saves.mapsave_download_failed_notice=Failed to download save from Steam Workshop!
saves.mapsave_save_info_failed_notice=Couldn't get save information!

# Duplicator Menu
duplicator.unsaved_dupename=Unsaved dupe
duplicator.loaded_dupename=Loaded dupe
duplicator.dupename_X=Name\: %s
duplicator.dupeentities_X=\nEntities\: %s
duplicator.dupe_subscribed_label= (Subscribed)
duplicator.workshop_items_need=Required workshop content\:

# Dupes Menu
dupes.local_dupe_notice=Local duplication stored on your computer. Local content can be deleted in the main menu.

# Demos Menu
demos.local_demo_notice=Local demo stored on your computer. Local content can be deleted in the main menu.
demos.demo_download_failed_notice=Failed to download demo from Steam Workshop!
3 changes: 3 additions & 0 deletions garrysmod/resource/localization/en/tool.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ preset.addnew_field=Choose a name for a new preset with current tool values (not
preset.badname_title=Bad preset name
preset.badname_desc=You've entered an invalid preset name\! Your preset was not saved\!

preset.derma_okay=OK
preset.derma_cancel=Cancel

tool.axis.name=Axis
tool.axis.desc=Create axis constraints
tool.axis.help=An axis constraint is what connects wheels to a car. The connected objects will be free to rotate on one axis. You can make the objects spin less freely by increasing friction.
Expand Down