Update naming consistency and improve JSON module resolution
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
d1fa5a6bc7
commit
45b919a41e
5 changed files with 5 additions and 7 deletions
|
@ -93,9 +93,6 @@ const splitFirst = (text: string, delimiter: string) => {
|
|||
// for each page from tolgee
|
||||
for (const tolgeeKey of translations) {
|
||||
let key = tolgeeKey.keyName;
|
||||
if (key.startsWith('n')) {
|
||||
key = key.split('_')[1];
|
||||
}
|
||||
|
||||
addonData[key] = {
|
||||
...addonData[tolgeeKey.keyName],
|
||||
|
@ -197,7 +194,7 @@ const splitFirst = (text: string, delimiter: string) => {
|
|||
|
||||
if (czechQuest.speeches) {
|
||||
let luaQuestRecord = '';
|
||||
const key = splitFirst(normalizeTranslation(czechQuest.speeches?.[2]) ?? '', ':').trim();
|
||||
const key = splitFirst(normalizeTranslation(czechQuest.speeches?.[2]) ?? '', ': ').trim();
|
||||
const npcNameKey = normalizeTranslation(czechQuest.name).trim();
|
||||
luaQuestRecord += `addon.data.speech["${npcNameKey}_${key}"] = {\n`;
|
||||
luaQuestRecord += '\ttext = "' + normalizeTranslation(czechQuest.speeches?.[0]).trim() + '", \n';
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue