MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / addTranslations

Method addTranslations

src/i18n.ts:83–88  ·  view source on GitHub ↗

* 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>)

Source from the content-addressed store, hash-verified

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

Callers 1

i18n.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected