You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
564 B
18 lines
564 B
/** |
|
* Optional plain text used for the next read-aloud instead of deriving text from the event |
|
* (e.g. after translating in the advanced lab). One-shot per event id. |
|
*/ |
|
const overrides = new Map<string, string>() |
|
|
|
export function setReadAloudTranslationForEvent(eventId: string, plainText: string): void { |
|
overrides.set(eventId, plainText) |
|
} |
|
|
|
export function takeReadAloudTranslationForEvent(eventId: string): string | undefined { |
|
const v = overrides.get(eventId) |
|
if (v !== undefined) { |
|
overrides.delete(eventId) |
|
return v |
|
} |
|
return undefined |
|
}
|
|
|