Skip to content

Commit

Permalink
impl: i18n (#77)
Browse files Browse the repository at this point in the history
* impl: i18n
  • Loading branch information
chiol authored Nov 15, 2023
1 parent 7bcb2c1 commit bec5411
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
28 changes: 9 additions & 19 deletions apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
},
"reset-password": {
"title": "Resest Password",
"button": {
"send-email": "Send email"
}
"button": { "send-email": "Send email" }
}
},
"link": {
Expand Down Expand Up @@ -164,9 +162,7 @@
"preview-description": "You can check it after selecting <preview>Preview</preview>."
},
"dialog": {
"edit-user": {
"title": "Edit User"
},
"edit-user": { "title": "Edit User" },
"delete-project": {
"title": "Delete Project",
"description": "Deleting a project will delete all issue/feedback data.\nPlease enter the text below to proceed with the deletion."
Expand Down Expand Up @@ -195,22 +191,14 @@
"title": "Edit Member",
"description": "Role varies from the menu accessible to functions available.\nPlease check the member and select the correct Role."
},
"register-member": {
"title": "Register Member"
},
"register-member": { "title": "Register Member" },
"delete-member": {
"title": "Delete Member",
"description": "Are you sure you want to delete the Member?"
},
"add-field": {
"title": "Add Field"
},
"edit-field": {
"title": "Edit Field"
},
"invite-user": {
"title": "Invite User"
}
"add-field": { "title": "Add Field" },
"edit-field": { "title": "Edit Field" },
"invite-user": { "title": "Invite User" }
}
}
},
Expand Down Expand Up @@ -267,7 +255,9 @@
"date-range-over-max-days": "The inquiry period can only be entered up to {{maxDays}} days"
},
"equal-search": "Equal",
"like-search": "Like"
"like-search": "Like",
"more": "more",
"shrink": "shrink"
},
"toast": {
"sign-in": "Login Successful",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/public/locales/ja/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@
"tenant-info": "Tenant情報",
"sign-up-mgmt": "Login &Signup管理",
"user-mgmt": "User管理",

"project-info": "Project情報",
"member-mgmt": "Member管理",
"role-mgmt": "Role管理",
"api-key-mgmt": "API Key管理",
"ticket-mgmt": "Issue Tracker管理",
"delete-project": "Project削除",

"channel-info": "Channel情報",
"field-mgmt": "Field管理",
"delete-channel": "Channel削除"
Expand Down Expand Up @@ -257,7 +255,9 @@
"date-range-over-max-days": "照会期間は最大{{maxDays}}日まで入力可能です。"
},
"equal-search": "完全一致",
"like-search": "部分一致"
"like-search": "部分一致",
"more": "もっと",
"shrink": "縮む"
},
"toast": {
"sign-in": "ログイン成功",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/public/locales/ko/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@
"tenant-info": "Tenant 정보",
"sign-up-mgmt": "Login & Signup 관리",
"user-mgmt": "User 관리",

"project-info": "Project 정보",
"member-mgmt": "Member 관리",
"role-mgmt": "Role 관리",
"api-key-mgmt": "API Key 관리",
"ticket-mgmt": "Issue Tracker 관리",
"delete-project": "Project 삭제",

"channel-info": "Channel 정보",
"field-mgmt": "Field 관리",
"delete-channel": "Channel 삭제"
Expand Down Expand Up @@ -257,7 +255,9 @@
"date-range-over-max-days": "조회 기간은 최대 {{maxDays}}일까지만 입력 가능합니다."
},
"equal-search": "완전 일치",
"like-search": "부분 일치"
"like-search": "부분 일치",
"more": "더보기",
"shrink": "줄이기"
},
"toast": {
"sign-in": "로그인 성공",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* under the License.
*/
import { useRef } from 'react';
import { useTranslation } from 'react-i18next';

import { Icon } from '@ufb/ui';

Expand All @@ -22,6 +23,7 @@ import { useTruncatedElement } from '@/hooks';
interface IProps extends React.PropsWithChildren {}

const FeedbackDetailCell: React.FC<IProps> = ({ children }) => {
const { t } = useTranslation();
const ref = useRef<HTMLTableCellElement>(null);
const { isTruncated, isShowingMore, toggleIsShowingMore } =
useTruncatedElement({ ref });
Expand All @@ -41,7 +43,7 @@ const FeedbackDetailCell: React.FC<IProps> = ({ children }) => {
onClick={toggleIsShowingMore}
className="text-blue-primary flex items-center gap-1"
>
{isShowingMore ? '줄이기' : '더보기'}
{isShowingMore ? t('text.shrink') : t('text.more')}
<Icon
name="ChevronDown"
size={12}
Expand Down

0 comments on commit bec5411

Please sign in to comment.