Fix key for entities
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
908f45eb9b
commit
f2d35d65d5
13 changed files with 3206 additions and 3200 deletions
|
@ -3,7 +3,9 @@ import { writeAlsoFemaleTranslation } from '../translation';
|
|||
|
||||
export const writeBook = (tolgeeKey: TolgeeKey): string => {
|
||||
let luaRecord = '';
|
||||
luaRecord += `addon.data.book["${tolgeeKey.keyName}"] = {\n`;
|
||||
const isName = tolgeeKey.keyName.endsWith('_name');
|
||||
const key = isName ? '_name' : '_page_' + tolgeeKey.keyName.split('_')[2];
|
||||
luaRecord += `addon.data.book["${tolgeeKey.keyDescription}${key}"] = {\n`;
|
||||
luaRecord += writeAlsoFemaleTranslation(tolgeeKey.translations);
|
||||
luaRecord += `}\n`;
|
||||
return luaRecord;
|
||||
|
|
|
@ -3,7 +3,8 @@ import { normalize, writeMaleTranslation } from '../translation';
|
|||
|
||||
export const writeSpeech = (tolgeeKey: TolgeeKey): string => {
|
||||
let luaRecord = '';
|
||||
luaRecord += `addon.data.speech["${normalize(tolgeeKey.keyDescription)}_${tolgeeKey.keyName}"] = {\n`;
|
||||
const en = tolgeeKey.translations.en.text.split(': ')[1].trim();
|
||||
luaRecord += `addon.data.speech["${normalize(tolgeeKey.keyDescription)}_${normalize(en)}"] = {\n`;
|
||||
luaRecord += writeMaleTranslation(tolgeeKey.translations);
|
||||
luaRecord += `}\n`;
|
||||
return luaRecord;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue