mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 16:23:22 +00:00
FIX - complete phone locale fallback
Resolve configured and regional locales through a centralized English fallback for Lua and NUI consumers. Complete the German and English app translation keys, localize remaining picker and attachment copy, and add contract tests that detect missing locale entries.
This commit is contained in:
@@ -263,7 +263,7 @@ local function canonical_crewlink_invite(device, invite_code)
|
||||
if not group then
|
||||
return nil
|
||||
end
|
||||
local locale = (Locales[Config.Bridge.Locale] or Locales["en"]).Phone.Apps.crewlink
|
||||
local locale = SkyPhoneLocales.Resolve(Config.Bridge.Locale).Nui.Apps.crewlink
|
||||
local title = locale.shareInviteTitle:gsub("{group}", function() return group.name end)
|
||||
local copy_text = locale.shareInviteBody
|
||||
:gsub("{code}", function() return group.invite_code end)
|
||||
|
||||
@@ -914,7 +914,7 @@ Bridge.Callbacks.Register("sky_phone:fliptok:delete", function(source, data)
|
||||
end)
|
||||
|
||||
RegisterCommand(Config.FlipTok.VerifyCommand, function(source, arguments)
|
||||
local command_locale = (Locales[Config.Bridge.Locale] or Locales["en"]).FlipTokCommand
|
||||
local command_locale = SkyPhoneLocales.Resolve(Config.Bridge.Locale).FlipTokCommand
|
||||
local function command_message(template, values)
|
||||
return template:gsub("{(%w+)}", function(key) return values[key] or "" end)
|
||||
end
|
||||
|
||||
@@ -1435,7 +1435,7 @@ Bridge.Callbacks.Register("sky_phone:picstagram:admin-resolve-report", function(
|
||||
end)
|
||||
|
||||
RegisterCommand(Config.Picstagram.VerifyCommand, function(source, args)
|
||||
local command_locale = (Locales[Config.Bridge.Locale] or Locales["en"]).PicstagramCommand
|
||||
local command_locale = SkyPhoneLocales.Resolve(Config.Bridge.Locale).PicstagramCommand
|
||||
local function command_message(template, values)
|
||||
return template:gsub("{(%w+)}", function(key)
|
||||
return values[key] or ""
|
||||
|
||||
Reference in New Issue
Block a user