Skip to content

Commit 56ad500

Browse files
committed
chore: add translation for code push forced update
1 parent 5b9f83f commit 56ad500

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
import { registerRootComponent } from 'expo';
1+
import { registerRootComponent } from "expo";
22
import codePush from "react-native-code-push";
3-
import App from './App';
3+
import App from "./App";
44
import { CODE_PUSH_DEPLOYMENT_KEY } from "@env";
5-
import { AppI18n } from './localize';
5+
import { AppI18n } from "./localize";
66

77
const codePushOptions = {
88
updateDialog: {
9-
optionalUpdateMessage : AppI18n.t('update.optionalUpdateMessage'),
10-
optionalInstallButtonLabel : AppI18n.t('update.optionalInstallButtonLabel'),
11-
optionalIgnoreButtonLabel : AppI18n.t('update.optionalIgnoreButtonLabel'),
12-
title: AppI18n.t('update.title'),
9+
optionalUpdateMessage: AppI18n.t("update.optionalUpdateMessage"),
10+
optionalInstallButtonLabel: AppI18n.t("update.optionalInstallButtonLabel"),
11+
optionalIgnoreButtonLabel: AppI18n.t("update.optionalIgnoreButtonLabel"),
12+
title: AppI18n.t("update.title"),
13+
mandatoryUpdateMessage: AppI18n.t("update.mandatoryUpdateMessage"),
14+
mandatoryContinueButtonLabel: AppI18n.t("update.mandatoryContinueButtonLabel"),
1315
},
1416
deploymentKey: CODE_PUSH_DEPLOYMENT_KEY,
1517
};

lang/en-us.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"optionalUpdateMessage": "An update is available. Would you like to install it?",
4444
"optionalInstallButtonLabel": "Install",
4545
"optionalIgnoreButtonLabel ": "Ignore",
46-
"downloadLatestVersion": "Download latest version"
46+
"downloadLatestVersion": "Download latest version",
47+
"mandatoryUpdateMessage": "An update is available that must be installed.",
48+
"mandatoryContinueButtonLabel": "Continue"
4749
}
4850
}

lang/zh-cn.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"optionalUpdateMessage": "有新版本可用,你想安装吗?",
4444
"optionalInstallButtonLabel": "安装",
4545
"optionalIgnoreButtonLabel": "忽略",
46-
"downloadLatestVersion": "下载最新版本"
46+
"downloadLatestVersion": "下载最新版本",
47+
"mandatoryUpdateMessage": "有个必须要安装的更新。",
48+
"mandatoryContinueButtonLabel": "继续"
4749
}
4850
}

0 commit comments

Comments
 (0)