addon/.support/utils/entities/speech.ts

12 lines
461 B
TypeScript
Raw Normal View History

import { TolgeeKey } from '../../types';
import { normalize, writeMaleTranslation } from '../translation';
export const writeSpeech = (tolgeeKey: TolgeeKey): string => {
let luaRecord = '';
2025-04-17 19:52:26 +02:00
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;
};