// Token: 0x06000F50 RID: 3920 RVA: 0x00067F70 File Offset: 0x00066370 public virtual string translate(string token) { TranslationLeaf leaf = this.getLeaf(token); if (leaf != null) { return(leaf.text); } return(null); }
public static string translate(TranslationReference reference) { TranslationLeaf leaf = Translator.getLeaf(reference); if (leaf != null) { return(leaf.text); } return(reference.ToString()); }
// Token: 0x06000F36 RID: 3894 RVA: 0x00067C48 File Offset: 0x00066048 public virtual void endListening() { if (!this.isListening) { return; } this.isListening = false; Translator.languageChanged -= this.handleLanguageChanged; TranslationLeaf leaf = Translator.getLeaf(this.reference); if (leaf != null) { leaf.textChanged -= this.handleLeafTextChanged; } }
// Token: 0x06000F32 RID: 3890 RVA: 0x00067B68 File Offset: 0x00065F68 protected virtual void handleLanguageChanged(string oldLanguage, string newLanguage) { TranslationLeaf leaf = Translator.getLeaf(oldLanguage, this.reference); if (leaf != null) { leaf.textChanged -= this.handleLeafTextChanged; } TranslationLeaf leaf2 = Translator.getLeaf(newLanguage, this.reference); if (leaf2 != null) { leaf2.textChanged += this.handleLeafTextChanged; } this.format(); }
// Token: 0x06000F6B RID: 3947 RVA: 0x00068315 File Offset: 0x00066715 public virtual void addLeaf() { this.leaf = new TranslationLeaf(this.translation, this); }
// Token: 0x06000F31 RID: 3889 RVA: 0x00067B5E File Offset: 0x00065F5E protected virtual void handleLeafTextChanged(TranslationLeaf leaf, string oldText, string newText) { this.format(); }