2025-04-17 19:04:49 +02:00
|
|
|
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`;
|
2025-04-17 19:04:49 +02:00
|
|
|
luaRecord += writeMaleTranslation(tolgeeKey.translations);
|
|
|
|
luaRecord += `}\n`;
|
|
|
|
return luaRecord;
|
|
|
|
};
|