def getDescChar(c, lang="Windows", start="", end=""): method = config.conf["brailleExtender"]["undefinedCharsRepr"]["method"] if lang == "Windows": lang = languageHandler.getLanguage() desc = characterProcessing.processSpeechSymbols( lang, c, characterProcessing.SYMLVL_CHAR).replace(' ', '').strip() if not desc or desc == c: return getAlternativeDescChar(c, method) return f"{start}{desc}{end}"
def getSpeechSymbols(text=None): if not text: text = getTextSelection() if not text: return ui.message(_("No text selected")) locale = languageHandler.getLanguage() return characterProcessing.processSpeechSymbols( locale, text, characterProcessing.SYMLVL_CHAR).strip()