Localize radio channel names (#9256)
* Add localized channel names * Full names
This commit is contained in:
@@ -44,7 +44,7 @@ namespace Content.Server.Ghost.Components
|
|||||||
Channel = ChatChannel.Radio,
|
Channel = ChatChannel.Radio,
|
||||||
Message = message,
|
Message = message,
|
||||||
//Square brackets are added here to avoid issues with escaping
|
//Square brackets are added here to avoid issues with escaping
|
||||||
MessageWrap = Loc.GetString("chat-radio-message-wrap", ("color", channel.Color), ("channel", $"\\[{channel.Name}\\]"), ("name", _entMan.GetComponent<MetaDataComponent>(speaker).EntityName))
|
MessageWrap = Loc.GetString("chat-radio-message-wrap", ("color", channel.Color), ("channel", $"\\[{channel.LocalizedName}\\]"), ("name", _entMan.GetComponent<MetaDataComponent>(speaker).EntityName))
|
||||||
};
|
};
|
||||||
|
|
||||||
_netManager.ServerSendMessage(msg, playerChannel);
|
_netManager.ServerSendMessage(msg, playerChannel);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Content.Server.Headset
|
|||||||
Channel = ChatChannel.Radio,
|
Channel = ChatChannel.Radio,
|
||||||
Message = message,
|
Message = message,
|
||||||
//Square brackets are added here to avoid issues with escaping
|
//Square brackets are added here to avoid issues with escaping
|
||||||
MessageWrap = Loc.GetString("chat-radio-message-wrap", ("color", channel.Color), ("channel", $"\\[{channel.Name}\\]"), ("name", _entMan.GetComponent<MetaDataComponent>(source).EntityName))
|
MessageWrap = Loc.GetString("chat-radio-message-wrap", ("color", channel.Color), ("channel", $"\\[{channel.LocalizedName}\\]"), ("name", _entMan.GetComponent<MetaDataComponent>(source).EntityName))
|
||||||
};
|
};
|
||||||
|
|
||||||
_netManager.ServerSendMessage(msg, playerChannel);
|
_netManager.ServerSendMessage(msg, playerChannel);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace Content.Server.Headset
|
|||||||
args.PushMarkup(Loc.GetString("examine-headset-channel",
|
args.PushMarkup(Loc.GetString("examine-headset-channel",
|
||||||
("color", proto.Color),
|
("color", proto.Color),
|
||||||
("key", proto.KeyCode),
|
("key", proto.KeyCode),
|
||||||
("id", proto.Name),
|
("id", proto.LocalizedName),
|
||||||
("freq", proto.Frequency)));
|
("freq", proto.Frequency)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace Content.Shared.Radio
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty;
|
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty;
|
||||||
|
|
||||||
|
[ViewVariables(VVAccess.ReadOnly)] public string LocalizedName => Loc.GetString(Name);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Single-character prefix to determine what channel a message should be sent to.
|
/// Single-character prefix to determine what channel a message should be sent to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -7,3 +7,14 @@ examine-headset = A small screen on the headset displays the following available
|
|||||||
examine-headset-channel = [color={$color}]:{$key} for {$id} ({$freq})[/color]
|
examine-headset-channel = [color={$color}]:{$key} for {$id} ({$freq})[/color]
|
||||||
|
|
||||||
examine-headset-chat-prefix = Use {$prefix} for the currently tuned frequency.
|
examine-headset-chat-prefix = Use {$prefix} for the currently tuned frequency.
|
||||||
|
|
||||||
|
chat-radio-common = Common
|
||||||
|
chat-radio-centcom = CentCom
|
||||||
|
chat-radio-command = Command
|
||||||
|
chat-radio-engineering = Engineering
|
||||||
|
chat-radio-medical = Medical
|
||||||
|
chat-radio-science = Science
|
||||||
|
chat-radio-security = Security
|
||||||
|
chat-radio-service = Service
|
||||||
|
chat-radio-supply = Supply
|
||||||
|
chat-radio-syndicate = Syndicate
|
||||||
|
|||||||
@@ -1,69 +1,69 @@
|
|||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Common
|
id: Common
|
||||||
name: "Common"
|
name: chat-radio-common
|
||||||
keycode: ";"
|
keycode: ";"
|
||||||
frequency: 1459
|
frequency: 1459
|
||||||
color: "#1ecc43"
|
color: "#1ecc43"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: CentCom
|
id: CentCom
|
||||||
name: "CentCom"
|
name: chat-radio-centcom
|
||||||
keycode: 'y'
|
keycode: 'y'
|
||||||
frequency: 1337
|
frequency: 1337
|
||||||
color: "#2681a5"
|
color: "#2681a5"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Command
|
id: Command
|
||||||
name: "Command"
|
name: chat-radio-command
|
||||||
keycode: 'c'
|
keycode: 'c'
|
||||||
frequency: 1353
|
frequency: 1353
|
||||||
color: "#fcdf03"
|
color: "#fcdf03"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Engineering
|
id: Engineering
|
||||||
name: "Engineering"
|
name: chat-radio-engi
|
||||||
keycode: 'e'
|
keycode: 'e'
|
||||||
frequency: 1357
|
frequency: 1357
|
||||||
color: "#f37746"
|
color: "#f37746"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Medical
|
id: Medical
|
||||||
name: "Medical"
|
name: chat-radio-med
|
||||||
keycode: 'm'
|
keycode: 'm'
|
||||||
frequency: 1355
|
frequency: 1355
|
||||||
color: "#57b8f0"
|
color: "#57b8f0"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Science
|
id: Science
|
||||||
name: "Science"
|
name: chat-radio-sci
|
||||||
keycode: 'n'
|
keycode: 'n'
|
||||||
frequency: 1351
|
frequency: 1351
|
||||||
color: "#c68cfa"
|
color: "#c68cfa"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Security
|
id: Security
|
||||||
name: "Security"
|
name: chat-radio-sec
|
||||||
keycode: 's'
|
keycode: 's'
|
||||||
frequency: 1359
|
frequency: 1359
|
||||||
color: "#dd3535"
|
color: "#dd3535"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Service
|
id: Service
|
||||||
name: "Service"
|
name: chat-radio-serv
|
||||||
keycode: 'v'
|
keycode: 'v'
|
||||||
frequency: 1349
|
frequency: 1349
|
||||||
color: "#6ca729"
|
color: "#6ca729"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Supply
|
id: Supply
|
||||||
name: "Supply"
|
name: chat-radio-sup
|
||||||
keycode: 'u'
|
keycode: 'u'
|
||||||
frequency: 1347
|
frequency: 1347
|
||||||
color: "#b88646"
|
color: "#b88646"
|
||||||
|
|
||||||
- type: radioChannel
|
- type: radioChannel
|
||||||
id: Syndicate
|
id: Syndicate
|
||||||
name: "Syndicate"
|
name: chat-radio-syndie
|
||||||
keycode: 't'
|
keycode: 't'
|
||||||
frequency: 1213
|
frequency: 1213
|
||||||
color: "#8f4a4b"
|
color: "#8f4a4b"
|
||||||
|
|||||||
Reference in New Issue
Block a user