Fix: some traduction and fix height / weight of element

This commit is contained in:
Linventif 2024-09-16 00:07:29 +00:00
parent 18c494c71a
commit 82e01ef55e
10 changed files with 20 additions and 14 deletions

View File

@ -213,12 +213,12 @@ function gmInte.openConfigMenu(data)
scrollPanel:Dock(FILL) scrollPanel:Dock(FILL)
local messagePanel = vgui.Create("DPanel", scrollPanel) local messagePanel = vgui.Create("DPanel", scrollPanel)
messagePanel:Dock(TOP) messagePanel:Dock(TOP)
messagePanel:SetSize(300, 60) messagePanel:SetSize(300, 80)
messagePanel:DockMargin(10, 0, 10, 10) messagePanel:DockMargin(10, 0, 10, 10)
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("admin.server_id_description", "Here you can configure your server settings.\nServer ID and Token are available on the webpanel in the server settings.\nThe documentation is available at {1}\nIf you need help, please contact us on our discord server.", "https://docs.gmod-integration.com")) messageLabel:SetText(gmInte.getTranslation("admin.server_id_description2", "Here you can configure your server settings.\nServer ID and Token are available on the webpanel in the server settings.\nThe documentation is available at {1}\nIf you need help, please contact us on our discord server.", "https://docs.gmod-integration.com"))
messageLabel:SetWrap(true) messageLabel:SetWrap(true)
for k, catName in ipairs(configCat) do for k, catName in ipairs(configCat) do
local collapsibleCategory = vgui.Create("DCollapsibleCategory", scrollPanel) local collapsibleCategory = vgui.Create("DCollapsibleCategory", scrollPanel)
@ -247,7 +247,7 @@ function gmInte.openConfigMenu(data)
panel:SetBackgroundColor(Color(0, 0, 0, 0)) panel:SetBackgroundColor(Color(0, 0, 0, 0))
local label = vgui.Create("DLabel", panel) local label = vgui.Create("DLabel", panel)
label:Dock(LEFT) label:Dock(LEFT)
label:SetSize(140, 25) label:SetSize(190, 25)
label:SetText(actualConfig.label) label:SetText(actualConfig.label)
label:SetContentAlignment(4) label:SetContentAlignment(4)
local input local input
@ -276,8 +276,8 @@ function gmInte.openConfigMenu(data)
elseif actualConfig.type == "checkbox" then elseif actualConfig.type == "checkbox" then
input = vgui.Create("DComboBox", panel) input = vgui.Create("DComboBox", panel)
if actualConfig.condition && !actualConfig.condition(data) then input:SetEnabled(false) end if actualConfig.condition && !actualConfig.condition(data) then input:SetEnabled(false) end
input:AddChoice("Enabled") input:AddChoice(gmInte.getTranslation("admin.enabled", "Enabled"))
input:AddChoice("Disabled") input:AddChoice(gmInte.getTranslation("admin.disabled", "Disabled"))
input:SetText(actualConfig.value(actualConfig.id, data[actualConfig.id]) && gmInte.getTranslation("admin.enabled", "Enabled") || gmInte.getTranslation("admin.disabled", "Disabled")) input:SetText(actualConfig.value(actualConfig.id, data[actualConfig.id]) && gmInte.getTranslation("admin.enabled", "Enabled") || gmInte.getTranslation("admin.disabled", "Disabled"))
input.OnSelect = function(self, index, value) input.OnSelect = function(self, index, value)
if actualConfig.restart then needRestart = true end if actualConfig.restart then needRestart = true end

View File

@ -4,7 +4,8 @@ function gmInte.saveSetting(setting, value)
return return
end end
if setting == "language" && !file.Exists("gmod_integration/shared/languages/sh_" .. lang .. ".json", "LUA") then print("Setting: " .. setting .. " Value: " .. value)
if setting == "language" && !file.Exists("gmod_integration/shared/languages/sh_" .. lang .. ".lua", "LUA") then
gmInte.log("Unknown Language") gmInte.log("Unknown Language")
return return
end end
@ -15,6 +16,7 @@ function gmInte.saveSetting(setting, value)
// Number // Number
if tonumber(value) != nil then value = tonumber(value) end if tonumber(value) != nil then value = tonumber(value) end
gmInte.config[setting] = value gmInte.config[setting] = value
print(gmInte.config[setting])
file.Write("gm_integration/config.json", util.TableToJSON(gmInte.config, true)) file.Write("gm_integration/config.json", util.TableToJSON(gmInte.config, true))
gmInte.log("Setting Saved") gmInte.log("Setting Saved")
if setting == "websocketFQDN" || setting == "id" || setting == "token" then gmInte.resetWebSocket() end if setting == "websocketFQDN" || setting == "id" || setting == "token" then gmInte.resetWebSocket() end

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Ingeschakeld", ["admin.enabled"] = "Ingeschakeld",
["admin.disabled"] = "Uitgeschakeld", ["admin.disabled"] = "Uitgeschakeld",
["admin.click_to_show"] = "*** Klik om te tonen ***", ["admin.click_to_show"] = "*** Klik om te tonen ***",
["admin.server_id_description"] = "Hier kun je je serverinstellingen configureren.\nServer ID en Token zijn beschikbaar op het webpaneel in de serverinstellingen.\nDe documentatie is beschikbaar op {1}\nAls je hulp nodig hebt, neem dan contact met ons op via onze discord-server.", ["admin.server_id_description2"] = "Hier kun je je serverinstellingen configureren.\nServer ID en Token zijn beschikbaar op het webpaneel in de serverinstellingen.\nDe documentatie is beschikbaar op {1}\nAls je hulp nodig hebt, neem dan contact met ons op via onze discord-server.",
["admin.server_config"] = "Server Configuratie", ["admin.server_config"] = "Server Configuratie",
["admin.server_token"] = "Server Token", ["admin.server_token"] = "Server Token",
["admin.server_token_description"] = "Server Token gevonden op het webpaneel.", ["admin.server_token_description"] = "Server Token gevonden op het webpaneel.",

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Enabled", ["admin.enabled"] = "Enabled",
["admin.disabled"] = "Disabled", ["admin.disabled"] = "Disabled",
["admin.click_to_show"] = "*** Click to show ***", ["admin.click_to_show"] = "*** Click to show ***",
["admin.server_id_description"] = "Here you can configure your server settings.\nServer ID and Token are available on the webpanel in the server settings.\nThe documentation is available at {1}\nIf you need help, please contact us on our discord server.", ["admin.server_id_description2"] = "Here you can configure your server settings.\nServer ID and Token are available on the webpanel in the server settings.\nThe documentation is available at {1}\nIf you need help, please contact us on our discord server.",
["admin.server_config"] = "Server Config", ["admin.server_config"] = "Server Config",
["admin.server_token"] = "Server Token", ["admin.server_token"] = "Server Token",
["admin.server_token_description"] = "Server Token foundforce_player_link on the webpanel.", ["admin.server_token_description"] = "Server Token foundforce_player_link on the webpanel.",

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Habilitado", ["admin.enabled"] = "Habilitado",
["admin.disabled"] = "Deshabilitado", ["admin.disabled"] = "Deshabilitado",
["admin.click_to_show"] = "*** Haz clic para mostrar ***", ["admin.click_to_show"] = "*** Haz clic para mostrar ***",
["admin.server_id_description"] = "Aquí puedes configurar los ajustes de tu servidor.\nEl ID del servidor y el Token están disponibles en el panel web en los ajustes del servidor.\nLa documentación está disponible en {1}\nSi necesitas ayuda, por favor contáctanos en nuestro servidor de Discord.", ["admin.server_id_description2"] = "Aquí puedes configurar los ajustes de tu servidor.\nEl ID del servidor y el Token están disponibles en el panel web en los ajustes del servidor.\nLa documentación está disponible en {1}\nSi necesitas ayuda, por favor contáctanos en nuestro servidor de Discord.",
["admin.server_config"] = "Configuración del Servidor", ["admin.server_config"] = "Configuración del Servidor",
["admin.server_token"] = "Token del Servidor", ["admin.server_token"] = "Token del Servidor",
["admin.server_token_description"] = "Token del servidor encontrado en el panel web.", ["admin.server_token_description"] = "Token del servidor encontrado en el panel web.",

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Activé", ["admin.enabled"] = "Activé",
["admin.disabled"] = "Désactivé", ["admin.disabled"] = "Désactivé",
["admin.click_to_show"] = "*** Cliquez pour afficher ***", ["admin.click_to_show"] = "*** Cliquez pour afficher ***",
["admin.server_id_description"] = "Ici, vous pouvez configurer les paramètres de votre serveur.\nL'ID du serveur et le jeton sont disponibles sur le panneau web dans les paramètres du serveur.\nLa documentation est disponible sur {1}\nSi vous avez besoin d'aide, veuillez nous contacter sur notre serveur Discord.", ["admin.server_id_description2"] = "Ici, vous pouvez configurer les paramètres de votre serveur.\nL'ID du serveur et le jeton sont disponibles sur le panneau web dans les paramètres du serveur.\nLa documentation est disponible sur {1}\nSi vous avez besoin d'aide, veuillez nous contacter sur notre serveur Discord.",
["admin.server_config"] = "Configuration du serveur", ["admin.server_config"] = "Configuration du serveur",
["admin.server_token"] = "Jeton du serveur", ["admin.server_token"] = "Jeton du serveur",
["admin.server_token_description"] = "Jeton du serveur trouvé sur le panneau web.", ["admin.server_token_description"] = "Jeton du serveur trouvé sur le panneau web.",

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Abilitato", ["admin.enabled"] = "Abilitato",
["admin.disabled"] = "Disabilitato", ["admin.disabled"] = "Disabilitato",
["admin.click_to_show"] = "*** Clicca per mostrare ***", ["admin.click_to_show"] = "*** Clicca per mostrare ***",
["admin.server_id_description"] = "Qui puoi configurare le impostazioni del tuo server.\nL'ID Server e il Token sono disponibili sul pannello web nelle impostazioni del server.\nLa documentazione è disponibile su {1}\nSe hai bisogno di aiuto, contattaci sul nostro server Discord.", ["admin.server_id_description2"] = "Qui puoi configurare le impostazioni del tuo server.\nL'ID Server e il Token sono disponibili sul pannello web nelle impostazioni del server.\nLa documentazione è disponibile su {1}\nSe hai bisogno di aiuto, contattaci sul nostro server Discord.",
["admin.server_config"] = "Configurazione Server", ["admin.server_config"] = "Configurazione Server",
["admin.server_token"] = "Token Server", ["admin.server_token"] = "Token Server",
["admin.server_token_description"] = "Token Server trovato sul pannello web.", ["admin.server_token_description"] = "Token Server trovato sul pannello web.",

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Включено", ["admin.enabled"] = "Включено",
["admin.disabled"] = "Отключено", ["admin.disabled"] = "Отключено",
["admin.click_to_show"] = "*** Нажмите, чтобы показать ***", ["admin.click_to_show"] = "*** Нажмите, чтобы показать ***",
["admin.server_id_description"] = "Здесь вы можете настроить настройки сервера.\nID сервера и токен доступны на веб-панели в настройках сервера.\nДокументация доступна по адресу {1}\nЕсли вам нужна помощь, пожалуйста, свяжитесь с нами на нашем сервере Discord.", ["admin.server_id_description2"] = "Здесь вы можете настроить настройки сервера.\nID сервера и токен доступны на веб-панели в настройках сервера.\nДокументация доступна по адресу {1}\nЕсли вам нужна помощь, пожалуйста, свяжитесь с нами на нашем сервере Discord.",
["admin.server_config"] = "Конфигурация сервера", ["admin.server_config"] = "Конфигурация сервера",
["admin.server_token"] = "Токен сервера", ["admin.server_token"] = "Токен сервера",
["admin.server_token_description"] = "Токен сервера, найденный на веб-панели.", ["admin.server_token_description"] = "Токен сервера, найденный на веб-панели.",

View File

@ -25,7 +25,7 @@ return {
["admin.enabled"] = "Etkin", ["admin.enabled"] = "Etkin",
["admin.disabled"] = "Devre Dışı", ["admin.disabled"] = "Devre Dışı",
["admin.click_to_show"] = "*** Göstermek için tıklayın ***", ["admin.click_to_show"] = "*** Göstermek için tıklayın ***",
["admin.server_id_description"] = "Burada sunucu ayarlarını yapılandırabilirsiniz.\nSunucu Kimliği ve Token, sunucu ayarlarında web panelinde mevcuttur.\nDökümantasyon {1} adresinde mevcuttur.\nYardıma ihtiyacınız varsa, lütfen discord sunucumuzda bize ulaşın.", ["admin.server_id_description2"] = "Burada sunucu ayarlarını yapılandırabilirsiniz.\nSunucu Kimliği ve Token, sunucu ayarlarında web panelinde mevcuttur.\nDökümantasyon {1} adresinde mevcuttur.\nYardıma ihtiyacınız varsa, lütfen discord sunucumuzda bize ulaşın.",
["admin.server_config"] = "Sunucu Yapılandırması", ["admin.server_config"] = "Sunucu Yapılandırması",
["admin.server_token"] = "Sunucu Token", ["admin.server_token"] = "Sunucu Token",
["admin.server_token_description"] = "Web panelinde bulunan sunucu tokenı.", ["admin.server_token_description"] = "Web panelinde bulunan sunucu tokenı.",

View File

@ -24,7 +24,11 @@ function gmInte.loadTranslations()
end end
end end
print("Translations Loaded for " .. lang) if !gmInte.log then
print(" | Translations | Loaded " .. lang .. " translations")
else
gmInte.log("Loaded " .. lang .. " translations")
end
end end
if SERVER then gmInte.loadTranslations() end if SERVER then gmInte.loadTranslations() end