mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:27:34 +00:00
Fix: some null key translation
This commit is contained in:
parent
ebfef087ac
commit
6248aa6853
|
@ -17,9 +17,9 @@ end
|
||||||
|
|
||||||
function gmInte.showTestConnection(data)
|
function gmInte.showTestConnection(data)
|
||||||
if data && data.id then
|
if data && data.id then
|
||||||
gmInte.chatAddText(Color(89, 194, 89), gmInte.getTranslation("gmod_integration.chat.authentication_success", "Successfully Authenticated"), Color(255, 255, 255), gmInte.getTranslation("gmod_integration.chat.server_link", ", server linked as {1}.", data.name))
|
gmInte.chatAddText(Color(89, 194, 89), gmInte.getTranslation("chat.authentication_success", "Successfully Authenticated"), Color(255, 255, 255), gmInte.getTranslation("chat.server_link", ", server linked as {1}.", data.name))
|
||||||
else
|
else
|
||||||
gmInte.chatAddText(Color(228, 81, 81), gmInte.getTranslation("gmod_integration.chat.authentication_failed", "Failed to Authenticate"), Color(255, 255, 255), gmInte.getTranslation("gmod_integration.chat.server_fail", ", check your ID and Token."))
|
gmInte.chatAddText(Color(228, 81, 81), gmInte.getTranslation("chat.authentication_failed", "Failed to Authenticate"), Color(255, 255, 255), gmInte.getTranslation("chat.server_fail", ", check your ID and Token."))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ local function openReportBug()
|
||||||
messagePanel:SetBackgroundColor(Color(0, 0, 0, 0))
|
messagePanel:SetBackgroundColor(Color(0, 0, 0, 0))
|
||||||
local messageLabel = vgui.Create("DLabel", messagePanel)
|
local messageLabel = vgui.Create("DLabel", messagePanel)
|
||||||
messageLabel:Dock(FILL)
|
messageLabel:Dock(FILL)
|
||||||
messageLabel:SetText(gmInte.getTranslation("gmod_integration.report_bug.description.full", "Hey, your about to report a bug to the owners of this server.\nPlease provide as much information as possible to help us fix the issue.\nThank you for helping us improve the server.\n\nIf you have a issue with Gmod Integration, please use our discord server."))
|
messageLabel:SetText(gmInte.getTranslation("report_bug.description.full", "Hey, your about to report a bug to the owners of this server.\nPlease provide as much information as possible to help us fix the issue.\nThank you for helping us improve the server.\n\nIf you have a issue with Gmod Integration, please use our discord server."))
|
||||||
messageLabel:SetWrap(true)
|
messageLabel:SetWrap(true)
|
||||||
local elements = {}
|
local elements = {}
|
||||||
for _ = 1, #Fields do
|
for _ = 1, #Fields do
|
||||||
|
|
|
@ -2,7 +2,7 @@ local default = include("gmod_integration/shared/languages/sh_en.lua")
|
||||||
local translationTable = default
|
local translationTable = default
|
||||||
function gmInte.getTranslation(key, defaultTranslation, ...)
|
function gmInte.getTranslation(key, defaultTranslation, ...)
|
||||||
local translation = translationTable[key]
|
local translation = translationTable[key]
|
||||||
if !translation then return defaultTranslation end
|
if !translation then translation = defaultTranslation end
|
||||||
if ... then
|
if ... then
|
||||||
for i = 1, select("#", ...) do
|
for i = 1, select("#", ...) do
|
||||||
translation = string.Replace(translation, "{" .. i .. "}", select(i, ...))
|
translation = string.Replace(translation, "{" .. i .. "}", select(i, ...))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user