* Add or update translations for a specific locale * @param locale - Target locale * @param translations - Translation object to merge
(locale: 'zh' | 'en', translations: Record<string, string>)
| 81 | * @param translations - Translation object to merge |
| 82 | */ |
| 83 | addTranslations(locale: 'zh' | 'en', translations: Record<string, string>) { |
| 84 | this.translations[locale] = { |
| 85 | ...this.translations[locale], |
| 86 | ...translations, |
| 87 | }; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | // Create singleton instance |