Added notification translation
这个提交包含在:
父节点
aa2fad344a
当前提交
65eb4dd77b
共有 1 个文件被更改,包括 5 次插入 和 4 次删除
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import {checkNotifications, requestNotifications, RESULTS} from 'react-native-permissions';
|
import {checkNotifications, requestNotifications, RESULTS} from 'react-native-permissions';
|
||||||
import AsyncStorageManager from "../managers/AsyncStorageManager";
|
import AsyncStorageManager from "../managers/AsyncStorageManager";
|
||||||
|
import i18n from "i18n-js";
|
||||||
|
|
||||||
const PushNotification = require("react-native-push-notification");
|
const PushNotification = require("react-native-push-notification");
|
||||||
|
|
||||||
|
@ -38,8 +39,8 @@ function createNotifications(machineID: string, date: Date) {
|
||||||
let reminderDate = new Date(date);
|
let reminderDate = new Date(date);
|
||||||
reminderDate.setMinutes(reminderDate.getMinutes() - reminder);
|
reminderDate.setMinutes(reminderDate.getMinutes() - reminder);
|
||||||
PushNotification.localNotificationSchedule({
|
PushNotification.localNotificationSchedule({
|
||||||
title: "Title",
|
title: i18n.t("proxiwashScreen.notifications.machineRunningTitle", {time: reminder}),
|
||||||
message: "Message",
|
message: i18n.t("proxiwashScreen.notifications.machineRunningBody", {number: machineID}),
|
||||||
id: id.toString(),
|
id: id.toString(),
|
||||||
date: reminderDate,
|
date: reminderDate,
|
||||||
});
|
});
|
||||||
|
@ -48,8 +49,8 @@ function createNotifications(machineID: string, date: Date) {
|
||||||
console.log("Setting up notifications for ", date);
|
console.log("Setting up notifications for ", date);
|
||||||
|
|
||||||
PushNotification.localNotificationSchedule({
|
PushNotification.localNotificationSchedule({
|
||||||
title: "Title",
|
title: i18n.t("proxiwashScreen.notifications.machineFinishedTitle"),
|
||||||
message: "Message",
|
message: i18n.t("proxiwashScreen.notifications.machineFinishedBody", {number: machineID}),
|
||||||
id: machineID,
|
id: machineID,
|
||||||
date: date,
|
date: date,
|
||||||
});
|
});
|
||||||
|
|
正在加载…
在新工单中引用