1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-11-24 17:23:37 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

add logic to support multi language (#11)

* add logic to support multi language

* Update en.ts

* Update en.ts

---------

Co-authored-by: Sunny Luo <sunnylqm@gmail.com>
This commit is contained in:
波仔糕
2025-04-13 17:02:52 +08:00
committed by GitHub
parent d853918d8d
commit 9cb8d458ad
8 changed files with 170 additions and 57 deletions

View File

@@ -1,4 +1,5 @@
import { plugins } from './plugin-config';
import { t } from './i18n';
interface BundleParams {
sentry: boolean;
@@ -17,10 +18,10 @@ export async function checkPlugins(): Promise<BundleParams> {
const isEnabled = await plugin.detect();
if (isEnabled && plugin.bundleParams) {
Object.assign(params, plugin.bundleParams);
console.log(`detected ${plugin.name} plugin`);
console.log(t('pluginDetected', { name: plugin.name }));
}
} catch (err) {
console.warn(`error while detecting ${plugin.name} plugin:`, err);
console.warn(t('pluginDetectionError', { name: plugin.name, error: err }));
}
}