Remove responsive speech frame width, fix generator
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
This commit is contained in:
parent
ab820ccf7e
commit
d1fa5a6bc7
7 changed files with 15 additions and 12069 deletions
|
@ -92,7 +92,12 @@ const splitFirst = (text: string, delimiter: string) => {
|
|||
|
||||
// for each page from tolgee
|
||||
for (const tolgeeKey of translations) {
|
||||
addonData[tolgeeKey.keyName] = {
|
||||
let key = tolgeeKey.keyName;
|
||||
if (key.startsWith('n')) {
|
||||
key = key.split('_')[1];
|
||||
}
|
||||
|
||||
addonData[key] = {
|
||||
...addonData[tolgeeKey.keyName],
|
||||
...(tolgeeKey.keyNamespace === 'name' && {
|
||||
names: [
|
||||
|
@ -193,7 +198,8 @@ const splitFirst = (text: string, delimiter: string) => {
|
|||
if (czechQuest.speeches) {
|
||||
let luaQuestRecord = '';
|
||||
const key = splitFirst(normalizeTranslation(czechQuest.speeches?.[2]) ?? '', ':').trim();
|
||||
luaQuestRecord += `addon.data.speech["${key}"] = {\n`;
|
||||
const npcNameKey = normalizeTranslation(czechQuest.name).trim();
|
||||
luaQuestRecord += `addon.data.speech["${npcNameKey}_${key}"] = {\n`;
|
||||
luaQuestRecord += '\ttext = "' + normalizeTranslation(czechQuest.speeches?.[0]).trim() + '", \n';
|
||||
luaQuestRecord += `}\n`;
|
||||
fs.appendFileSync(fileName, luaQuestRecord, 'utf8');
|
||||
|
|
|
@ -10,6 +10,7 @@ local function CreateCzechFont(frame, name, size, flags)
|
|||
font:SetTextColor(0, 0, 0, 1)
|
||||
font:SetJustifyH("LEFT")
|
||||
font:SetWidth(frame:GetWidth())
|
||||
font:SetWordWrap(true)
|
||||
font:SetFont(FontPath ..name, size, flags or "")
|
||||
return font
|
||||
end
|
||||
|
|
|
@ -7,12 +7,6 @@ local function ShowSpeech(Frame, offsetY)
|
|||
Frame:ClearAllPoints()
|
||||
Frame:SetPoint("BOTTOMLEFT", addon.SpeechFrame, "BOTTOMLEFT", 0, offsetY)
|
||||
Frame:SetHeight(Frame.Message:GetStringHeight() + 10)
|
||||
local stringWidth = Frame.Message:GetStringWidth() + 20
|
||||
if (stringWidth > CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH) then
|
||||
Frame:SetWidth(CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH)
|
||||
else
|
||||
Frame:SetWidth(stringWidth)
|
||||
end
|
||||
return Frame
|
||||
end
|
||||
|
||||
|
@ -82,7 +76,7 @@ end
|
|||
addon.API.AddSpeechMessage = AddMessage
|
||||
|
||||
local function ShowSpeechTranslation(sender, message)
|
||||
local text = CzechQuestsAddon:GetData("speech", message)
|
||||
local text = CzechQuestsAddon:GetData("speech", sender .. "_" .. message)
|
||||
if text == nil and CzechQuestsAddon_Store.config.SPEECH_ORIGINAL_WHEN_MISSING then
|
||||
text = message
|
||||
end
|
||||
|
|
|
@ -2,7 +2,8 @@ local _, addon = ...
|
|||
|
||||
local function BuildIndex(text)
|
||||
local numberMarks = text:gsub("%d+%.?%d*", "#?")
|
||||
return numberMarks
|
||||
local normalized = numberMarks:gsub('"', "'")
|
||||
return normalized
|
||||
end
|
||||
|
||||
local function FillNumbers(text, sourceText)
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -11,6 +11,9 @@ CzechQuests.lua
|
|||
|
||||
Addon/Data/0.lua
|
||||
Addon/Data/1.lua
|
||||
Addon/Data/2.lua
|
||||
Addon/Data/3.lua
|
||||
Addon/Data/4.lua
|
||||
|
||||
Addon/Data/other.lua
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue