kaori 4 سال پیش
والد
کامیت
f44a6cf915

+ 2 - 1
packages/app/resource/locales/en_US/translation.json

@@ -258,7 +258,8 @@
   },
   },
   "in_app_notification": {
   "in_app_notification": {
     "notification_list": "In-App Notification List",
     "notification_list": "In-App Notification List",
-    "see_all": "See All"
+    "see_all": "See All",
+    "no_notification": "You don't have any notificatios."
   },
   },
   "in_app_notification_settings": {
   "in_app_notification_settings": {
     "in_app_notification_settings": "In-App Notification Settings",
     "in_app_notification_settings": "In-App Notification Settings",

+ 2 - 1
packages/app/resource/locales/ja_JP/translation.json

@@ -260,7 +260,8 @@
   },
   },
   "in_app_notification": {
   "in_app_notification": {
     "notification_list": "アプリ内通知一覧",
     "notification_list": "アプリ内通知一覧",
-    "see_all": "通知一覧を見る"
+    "see_all": "通知一覧を見る",
+    "no_notification": "通知は一つもありません。"
   },
   },
   "in_app_notification_settings": {
   "in_app_notification_settings": {
     "in_app_notification_settings": "アプリ内通知設定",
     "in_app_notification_settings": "アプリ内通知設定",

+ 2 - 1
packages/app/resource/locales/zh_CN/translation.json

@@ -239,7 +239,8 @@
   },
   },
   "in_app_notification": {
   "in_app_notification": {
     "notification_list": "应用内通知列表",
     "notification_list": "应用内通知列表",
-    "see_all": "查看通知列表"
+    "see_all": "查看通知列表",
+    "no_notification": "您没有任何通知"
   },
   },
   "in_app_notification_settings": {
   "in_app_notification_settings": {
     "in_app_notification_settings": "在应用程序通知设置",
     "in_app_notification_settings": "在应用程序通知设置",

+ 4 - 1
packages/app/src/components/InAppNotification/InAppNotificationList.tsx

@@ -1,14 +1,17 @@
 import React, { FC } from 'react';
 import React, { FC } from 'react';
 
 
 import { PaginateResult } from 'mongoose';
 import { PaginateResult } from 'mongoose';
+import { useTranslation } from 'react-i18next';
 import { IInAppNotification } from '../../interfaces/in-app-notification';
 import { IInAppNotification } from '../../interfaces/in-app-notification';
 import InAppNotificationElm from './InAppNotificationElm';
 import InAppNotificationElm from './InAppNotificationElm';
 
 
+
 type Props = {
 type Props = {
   inAppNotificationData: PaginateResult<IInAppNotification> | undefined;
   inAppNotificationData: PaginateResult<IInAppNotification> | undefined;
 };
 };
 
 
 const InAppNotificationList: FC<Props> = (props: Props) => {
 const InAppNotificationList: FC<Props> = (props: Props) => {
+  const { t } = useTranslation();
   const { inAppNotificationData } = props;
   const { inAppNotificationData } = props;
 
 
   if (inAppNotificationData == null) {
   if (inAppNotificationData == null) {
@@ -37,7 +40,7 @@ const InAppNotificationList: FC<Props> = (props: Props) => {
 
 
   return (
   return (
     <>
     <>
-      {notifications.length === 0 ? <>You had no notifications, yet.</> : renderInAppNotificationList()}
+      {notifications.length === 0 ? <>{t('in_app_notification.no_notification')}</> : renderInAppNotificationList()}
     </>
     </>
   );
   );
 };
 };