Shun Miyazawa 3 лет назад
Родитель
Сommit
543033a63f

+ 2 - 2
packages/app/src/components/BookmarkButtons.tsx

@@ -44,9 +44,9 @@ const BookmarkButtons: FC<Props> = (props: Props) => {
     }
 
     if (isBookmarked) {
-      return 'cancel_bookmark';
+      return 'tooltip.cancel_bookmark';
     }
-    return 'bookmark';
+    return 'tooltip.bookmark';
   }, [isGuestUser, isBookmarked]);
 
   return (

+ 2 - 2
packages/app/src/components/LikeButtons.tsx

@@ -40,9 +40,9 @@ const LikeButtons: FC<LikeButtonsProps> = (props: LikeButtonsProps) => {
     }
 
     if (isLiked) {
-      return 'cancel_like';
+      return 'tooltip.cancel_like';
     }
-    return 'Like!';
+    return 'tooltip.like';
   }, [isGuestUser, isLiked]);
 
   return (

+ 2 - 2
packages/app/src/components/SubscribeButton.tsx

@@ -27,9 +27,9 @@ const SubscribeButton: FC<Props> = (props: Props) => {
     }
 
     if (isSubscribing) {
-      return 'cancel_subscribe';
+      return 'tooltip.cancel_subscribe';
     }
-    return 'subscribe';
+    return 'tooltip.subscribe';
   }, [isGuestUser, isSubscribing]);
 
   return (

+ 6 - 1
packages/app/src/components/User/SeenUserInfo.tsx

@@ -1,7 +1,8 @@
 import React, { FC, useState } from 'react';
 
-import { Popover, PopoverBody } from 'reactstrap';
 import { FootstampIcon } from '@growi/ui';
+import { useTranslation } from 'react-i18next';
+import { UncontrolledTooltip, Popover, PopoverBody } from 'reactstrap';
 
 import { IUser } from '~/interfaces/user';
 
@@ -14,6 +15,7 @@ interface Props {
 }
 
 const SeenUserInfo: FC<Props> = (props: Props) => {
+  const { t } = useTranslation();
   const [isPopoverOpen, setIsPopoverOpen] = useState(false);
 
   const { seenUsers, sumOfSeenUsers, disabled } = props;
@@ -35,6 +37,9 @@ const SeenUserInfo: FC<Props> = (props: Props) => {
           </div>
         </PopoverBody>
       </Popover>
+      <UncontrolledTooltip placement="top" target="btn-seen-user" fade={false}>
+        {t('tooltip.footprints')}
+      </UncontrolledTooltip>
     </div>
   );
 };