From 8c7749532b026620d10a16689fbdc027350ceb40 Mon Sep 17 00:00:00 2001 From: Airyzz <36567925+Airyzz@users.noreply.github.com> Date: Wed, 15 Jun 2022 13:02:39 +0930 Subject: [PATCH] Revert "Added translation to Tabs" This reverts commit 1ed9d6de782a5c5a96f73d3d27748ecf9efa12d6. --- public/locales/en/translation.json | 7 ------- public/locales/jp/translation.json | 7 ------- src/app/atoms/tabs/Tabs.jsx | 7 +------ src/app/organisms/space-settings/SpaceSettings.jsx | 9 +++------ 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index d2ee9a50..11cdca01 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -30,12 +30,5 @@ "uncategorize_subspaces": "Uncategorize subspaces", "pin_sidebar": "Pin to sidebar", "unpin_sidebar": "Unpin from sidebar" - }, - "settings":{ - "tabs": { - "general": "General", - "members": "Members", - "permission": "Permissions" - } } } \ No newline at end of file diff --git a/public/locales/jp/translation.json b/public/locales/jp/translation.json index cbbfac1b..6191885d 100644 --- a/public/locales/jp/translation.json +++ b/public/locales/jp/translation.json @@ -5,12 +5,5 @@ }, "welcome":{ "heading": "いらっしゃいませ" - }, - "settings":{ - "tabs": { - "general": "一般", - "members": "ユーザー", - "permission": "許可" - } } } \ No newline at end of file diff --git a/src/app/atoms/tabs/Tabs.jsx b/src/app/atoms/tabs/Tabs.jsx index 2c87cebe..39800ce3 100644 --- a/src/app/atoms/tabs/Tabs.jsx +++ b/src/app/atoms/tabs/Tabs.jsx @@ -5,9 +5,6 @@ import './Tabs.scss'; import Button from '../button/Button'; import ScrollView from '../scroll/ScrollView'; -import '../../i18n.jsx' -import { useTranslation } from 'react-i18next'; - function TabItem({ selected, iconSrc, onClick, children, disabled, @@ -44,8 +41,6 @@ TabItem.propTypes = { function Tabs({ items, defaultSelected, onSelect }) { const [selectedItem, setSelectedItem] = useState(items[defaultSelected]); - const { t } = useTranslation(); - const handleTabSelection = (item, index) => { if (selectedItem === item) return; setSelectedItem(item); @@ -64,7 +59,7 @@ function Tabs({ items, defaultSelected, onSelect }) { disabled={item.disabled} onClick={() => handleTabSelection(item, index)} > - {(item.translate != undefined && item.translate) ? t(item.text) : item.text} + {item.text} ))} diff --git a/src/app/organisms/space-settings/SpaceSettings.jsx b/src/app/organisms/space-settings/SpaceSettings.jsx index bcc01ee1..8ac561ee 100644 --- a/src/app/organisms/space-settings/SpaceSettings.jsx +++ b/src/app/organisms/space-settings/SpaceSettings.jsx @@ -44,26 +44,23 @@ import '../../i18n.jsx' import { useTranslation } from 'react-i18next'; const tabText = { - GENERAL: 'settings.tabs.general', - MEMBERS: 'settings.tabs.members', - PERMISSIONS: 'settings.tabs.permission', + GENERAL: 'General', + MEMBERS: 'Members', + PERMISSIONS: 'Permissions', }; const tabItems = [{ iconSrc: SettingsIC, text: tabText.GENERAL, - translate: true, disabled: false, }, { iconSrc: UserIC, text: tabText.MEMBERS, - translate: true, disabled: false, }, { iconSrc: ShieldUserIC, text: tabText.PERMISSIONS, disabled: false, - translate: true }]; function GeneralSettings({ roomId }) {