Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/locales/en/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"image-picker.prompt": "Tap to upload an image",
"image-picker.unsupported-file-type-error": "Unsupported file type.",
"time-wheel-picker.hour-period": "Hour",
"time-wheel-picker.hour": "h",
"time-wheel-picker.minute": "min"
}
12 changes: 12 additions & 0 deletions src/locales/en/createCategory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"createGoal": "Create Goal",
"goalName": "Goal name",
"goalNameHint": "Please enter the name of the goal you want to create",
"goalDescription": "Goal description",
"goalDescriptionHint": "Please enter a description of the goal",
"goalTimeLabel": "Goal time",
"goalTimeHint": "Please enter the daily goal time for the new goal",
"selectDayBelong": "Select days",
"selectDayBelongHint": "Please select the days to work on this goal",
"goalTimeValue": "{{hours}}h {{minutes}}min"
Comment on lines +2 to +11
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The keys in this file use camelCase (e.g., createGoal, goalName), while most other new locale files, including related ones for goals (manageCategory.json, editCategory.json), use kebab-case. To ensure consistency across localization files, it's recommended to use kebab-case for all keys.

Note that this is a breaking change and will require updating all usages in the codebase (e.g., t('createGoal.goalName') would need to be changed to t('createGoal.goal-name')).

Suggested change
"createGoal": "Create Goal",
"goalName": "Goal name",
"goalNameHint": "Please enter the name of the goal you want to create",
"goalDescription": "Goal description",
"goalDescriptionHint": "Please enter a description of the goal",
"goalTimeLabel": "Goal time",
"goalTimeHint": "Please enter the daily goal time for the new goal",
"selectDayBelong": "Select days",
"selectDayBelongHint": "Please select the days to work on this goal",
"goalTimeValue": "{{hours}}h {{minutes}}min"
"create-goal": "Create Goal",
"goal-name": "Goal name",
"goal-name-hint": "Please enter the name of the goal you want to create",
"goal-description": "Goal description",
"goal-description-hint": "Please enter a description of the goal",
"goal-time-label": "Goal time",
"goal-time-hint": "Please enter the daily goal time for the new goal",
"select-day-belong": "Select days",
"select-day-belong-hint": "Please select the days to work on this goal",
"goal-time-value": "{{hours}}h {{minutes}}min"

}
20 changes: 20 additions & 0 deletions src/locales/en/createGroup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"create-group": "Create Group",
"group-name-label": "Group name",
"group-name-description": "Enter the name of the group.",
"group-tag-label": "Group tag",
"group-tag-description": "Set tags that describe the group.",
"max-member-label": "Maximum members",
"max-member-description": "Set the maximum number of members who can join this group (up to 99).",
"max-member-exceed-error": "Maximum members cannot exceed 99.",
"make-publicity-private": "Make this a private group",
"publicity-description-public": "If set to public, anyone can search for and join this group.",
"publicity-description-private": "If set to private, members can join only through an invite code.",
"group-image-label": "Group image",
"group-image-description": "Upload an image that represents your group.",
"hashtags-label": "Hashtags",
"hashtags-description": "Add hashtags related to your group.",
"create-button": "Create Group",
"create-success-message": "Group has been created successfully.",
"create-failure-message": "An error occurred while creating the group. Please try again."
}
3 changes: 3 additions & 0 deletions src/locales/en/createGroupCategory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"create-group-goal-label": "Create Group Goal"
}
6 changes: 6 additions & 0 deletions src/locales/en/createGroupEntryCode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"create-entry-code": "Create Group Invite Code",
"touch-to-copy": "Tap the invite code below to copy.",
"copy-finished": "Copied to clipboard.",
"code-will-expire-in-two-weeks": "This invite code will expire in 2 weeks."
}
11 changes: 11 additions & 0 deletions src/locales/en/editCategory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"edit-goal": "Edit Goal",
"goal-name": "Goal name",
"goal-name-hint": "Please enter the goal name",
"goal-description": "Goal description",
"goal-description-hint": "Please enter a description of the goal",
"goal-time": "Goal time",
"goal-time-hint": "Please enter the daily goal time",
"select-day-belong": "Select days",
"select-day-belong-hint": "Please select the days to work on this goal"
}
3 changes: 3 additions & 0 deletions src/locales/en/editGroupCategory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"edit-group-goal-label": "Edit Group Goal"
}
10 changes: 10 additions & 0 deletions src/locales/en/editProfile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"edit-profile-title": "Edit Profile",
"edit-profile-image-label": "Change profile image",
"edit-nickname-label": "Nickname",
"edit-birthday-label": "Birthday",
"edit-position-label": "Job/Position",
"edit-save-button": "Save Profile",
"edit-success-message": "Profile has been updated successfully.",
"edit-error-message": "An error occurred while updating your profile. Please try again."
}
18 changes: 18 additions & 0 deletions src/locales/en/general.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"public": "Public",
"private": "Private",
"unlimited": "Unlimited",
"dow": "Day",
"sun": "Sun",
"mon": "Mon",
"tue": "Tue",
"wed": "Wed",
"thu": "Thu",
"fri": "Fri",
"sat": "Sat",
"confirm": "Confirm",
"close": "Close",
"cancel": "Cancel",
"rank": "Rank",
"unknown": "Unknown"
}
4 changes: 4 additions & 0 deletions src/locales/en/groupChat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"write-message": "Write a message",
"group-member-list": "Group member list"
}
26 changes: 26 additions & 0 deletions src/locales/en/groupDetail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"back": "Back",
"public-group": "Public Group",
"private-group": "Private Group",
"ranking": "Ranking",
"color": "Color",
"chat": "Chat",
"setting": "Settings",
"member-list": "Member list",
"today-goals": "Today's goals",
"group-routine-title": "Group Routine",
"group-routine-daily": "Daily Routine",
"request-participation": "Request to join",
"total-achievement-progress": "Total achievement rate",
"achieved": "Achieved",
"no-group-goals-today": "There are no group goals today",
"no-group-goals-today-description": "Add group goals and achieve them together with your members!",
"can-use-after-joining": "Available after joining the group.",
"join-group": "Join Group",
"send-group-join-request": "Send join request",
"cannot-join-your-group": "You cannot join a group you already belong to.",
"group-join-success": "Successfully joined the group.",
"group-join-request-sent": "Group join request has been sent.",
"failed-to-join-group": "Failed to join the group. Please try again.",
"group-color-picker-title": "Select Group Theme Color"
}
7 changes: 7 additions & 0 deletions src/locales/en/groupEntryCodeSubmit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"enter-group-entry-code": "Enter Group Invite Code",
"please-enter-group-entry-code": "Please enter the invite code you received.",
"group-entry-code-placeholder": "Enter group invite code",
"confirm-group-is-right": "Please make sure this is the group you were invited to.",
"sign-up-for-group": "Join Group"
}
10 changes: 10 additions & 0 deletions src/locales/en/groupRanking.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"group-ranking": "Group Ranking",
"total-study-time-std": "Based on total study time",
"daily": "Daily",
"weekly": "Weekly",
"monthly": "Monthly",
"ranking-period-monthly": "{{month}} Monthly Ranking",
"ranking-period-weekly": "{{month}} Week {{week}} Ranking",
"ranking-period-daily": "Today's Ranking"
}
8 changes: 8 additions & 0 deletions src/locales/en/groupSearch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"search-group": "Search Groups",
"search-via-group-name": "Search by group name",
"search-via-tag": "Search by tag",
"search-via-group-name-placeholder": "Search by group name",
"search-via-tag-placeholder": "Search by group tags",
"search-result": "Search results"
}
18 changes: 18 additions & 0 deletions src/locales/en/groupSetting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"group-setting": "Group Settings",
"group-manage": "Group Management",
"edit-group-info": "Edit Group Info",
"publicity-setting": "Visibility Settings",
"publicity-open": "Public",
"publicity-closed": "Private",
"add-announcement": "Post Announcement",
"member-manage": "Member Management",
"pending-join-request": "Pending Join Requests",
"member-detailed-manage": "Detailed Member Management",
"delete-group": "Delete Group",
"transfer-host-authority": "Transfer Owner Authority",
"create-entry-code": "Create Group Invite Code",
"group-goal-manage": "Goal Management",
"group-goal-add": "Add Group Goal",
"group-goal-edit": "Edit Group Goal"
}
10 changes: 10 additions & 0 deletions src/locales/en/groups.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"my-participated-groups": "Groups I Joined",
"today-achieved-goal": "Completed {{completedCount}} out of {{totalCount}} goals today",
"create-new-group": "Create New Group",
"find-group": "Find Group",
"search-directly": "Search directly",
"enter-invite-code": "Enter invite code",
"empty-group-prompt": "You haven't joined any groups yet!",
"empty-group-subprompt": "Create a new group and achieve more together"
}
27 changes: 18 additions & 9 deletions src/locales/en/home.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
{
"welcome": "Hello! Shall we start our day today?",
"goalsLeftPrefix": "There are ",
"goalsLeftCount": "{{count}} goals ",
"goalsLeftSuffix": "left for today",
"welcome": "Hello!\nShall we start the day today?",
"goalsLeftPrefix": "Goals left today:",
"goalsLeftCount": " {{count}}",
"goalsLeftSuffix": "",
"startStudyButton": "Start Studying",
"todayGoal": "today's goals",
"yesterdayGoal": "yesterday's goals",
"upcomingGoal": "upcoming goals",
"pastGoal": "past goals"
}
"endStudyButton": "Stop Studying",
"todayGoal": "Today's goals",
"yesterdayGoal": "Yesterday's goals",
"tomorrowGoal": "Tomorrow's goals",
"upcomingGoal": "Upcoming goals",
"pastGoal": "Past goals",
"addNewGoal": "Add new goal",
"noTodayGoal": "No goals yet!",
"shouldAddGoal": "Add a new goal and start studying",
"leftTimeToAchieveGoal": "{{time}} left to hit your goal time",
"studyingWithPetName": "Studying with {{petName}}",
"studying": "in progress...",
"today-goal-complete": "Goal time achieved!"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This file mostly uses camelCase for keys, but today-goal-complete uses kebab-case. For consistency within this file, it's better to use camelCase.

This change will require updating its usage in the code from t('home.today-goal-complete') to t('home.todayGoalComplete').

Suggested change
"today-goal-complete": "Goal time achieved!"
"todayGoalComplete": "Goal time achieved!"

}
59 changes: 58 additions & 1 deletion src/locales/en/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,65 @@
import { default as componentsEN } from './components.json';
import { default as createCategoryEN } from './createCategory.json';
import { default as createGroupEN } from './createGroup.json';
import { default as createGroupCategoryEN } from './createGroupCategory.json';
import { default as createGroupEntryCodeEN } from './createGroupEntryCode.json';
import { default as editCategoryEN } from './editCategory.json';
import { default as editGroupCategoryEN } from './editGroupCategory.json';
import { default as editProfileEN } from './editProfile.json';
import { default as generalEN } from './general.json';
import { default as groupChatEN } from './groupChat.json';
import { default as groupDetailEN } from './groupDetail.json';
import { default as groupEntryCodeSubmitEN } from './groupEntryCodeSubmit.json';
import { default as groupRankingEN } from './groupRanking.json';
import { default as groupsEN } from './groups.json';
import { default as groupSearchEN } from './groupSearch.json';
import { default as groupSettingEN } from './groupSetting.json';
import { default as homeEN } from './home.json';
import { default as loginEN } from './login.json';
import { default as manageCategoryEN } from './manageCategory.json';
import { default as pendingGroupJoinRequestEN } from './pendingGroupJoinRequest.json';
import { default as settingsEN } from './settings.json';
import { default as signUpAccountEN } from './signUpAccount.json';
import { default as signUpAccountCompleteEN } from './signUpAccountComplete.json';
import { default as signUpBirthDateEN } from './signUpBirthDate.json';
import { default as signUpPositionEN } from './signUpPosition.json';
import { default as signUpProfileCompleteEN } from './signUpProfileComplete.json';
import { default as signUpProfileImageEN } from './signUpProfileImage.json';
import { default as statsEN } from './stats.json';
import { default as tasksEN } from './tasks.json';
import { default as unitEN } from './unit.json';

const translationEN = {
tasks: tasksEN,
home: homeEN,
settings: settingsEN,
signUp: signUpAccountEN,
general: generalEN,
createGoal: createCategoryEN,
groups: groupsEN,
groupDetail: groupDetailEN,
unit: unitEN,
groupSearch: groupSearchEN,
groupEntryCodeSubmit: groupEntryCodeSubmitEN,
groupSetting: groupSettingEN,
groupRanking: groupRankingEN,
groupChat: groupChatEN,
stats: statsEN,
manageCategory: manageCategoryEN,
editCategory: editCategoryEN,
signUpBirthDate: signUpBirthDateEN,
signUpPosition: signUpPositionEN,
signUpProfileImage: signUpProfileImageEN,
signUpProfileComplete: signUpProfileCompleteEN,
signUpAccountComplete: signUpAccountCompleteEN,
createGroupEntryCode: createGroupEntryCodeEN,
login: loginEN,
createGroup: createGroupEN,
editProfile: editProfileEN,
components: componentsEN,
createGroupCategory: createGroupCategoryEN,
editGroupCategory: editGroupCategoryEN,
pendingGroupJoinRequest: pendingGroupJoinRequestEN,
};
Comment on lines 32 to 63
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The properties in the translationEN object are not alphabetically sorted. Sorting them makes the code more readable and helps developers find namespaces more easily as the project grows.

const translationEN = {
  components: componentsEN,
  createGoal: createCategoryEN,
  createGroup: createGroupEN,
  createGroupCategory: createGroupCategoryEN,
  createGroupEntryCode: createGroupEntryCodeEN,
  editCategory: editCategoryEN,
  editGroupCategory: editGroupCategoryEN,
  editProfile: editProfileEN,
  general: generalEN,
  groupChat: groupChatEN,
  groupDetail: groupDetailEN,
  groupEntryCodeSubmit: groupEntryCodeSubmitEN,
  groupRanking: groupRankingEN,
  groupSearch: groupSearchEN,
  groupSetting: groupSettingEN,
  groups: groupsEN,
  home: homeEN,
  login: loginEN,
  manageCategory: manageCategoryEN,
  pendingGroupJoinRequest: pendingGroupJoinRequestEN,
  settings: settingsEN,
  signUp: signUpAccountEN,
  signUpAccountComplete: signUpAccountCompleteEN,
  signUpBirthDate: signUpBirthDateEN,
  signUpPosition: signUpPositionEN,
  signUpProfileComplete: signUpProfileCompleteEN,
  signUpProfileImage: signUpProfileImageEN,
  stats: statsEN,
  tasks: tasksEN,
  unit: unitEN,
};

export default translationEN;

export default translationEN;
10 changes: 10 additions & 0 deletions src/locales/en/login.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id-label": "Username",
"id-placeholder": "Enter your username",
"password-label": "Password",
"password-placeholder": "Enter your password",
"login-button": "Log In",
"forgot-password": "Find ID / Password",
"signup-prompt": "Sign Up",
"login-error": "Login failed. Please check your username and password."
}
12 changes: 12 additions & 0 deletions src/locales/en/manageCategory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"manage-my-goals": "Manage My Goals",
"my-goals": "My goals",
"group-goals": "Group goals",
"goal-count": "Total {{count}}",
"goal-time": "Goal time {{time}}",
"goal-time-null": "No goal time",
"deletion-alert-title": "Delete Goal",
"deletion-alert-message": "Are you sure you want to delete this goal?\nThis action cannot be undone.",
"deletion-alert-confirm-button": "Delete",
"deletion-alert-cancel-button": "Cancel"
}
3 changes: 3 additions & 0 deletions src/locales/en/pendingGroupJoinRequest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pending-group-join-request": "Pending Group Join Requests"
}
20 changes: 20 additions & 0 deletions src/locales/en/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"social-and-settings": "Social & Settings",
"days-together": "{{count}} days together",
"position-label": "Job/Position",
"birthday-label": "Birthday",
"edit-profile": "Edit Profile",
"manage-account": "Manage Account",
"profile-public-setting": "Profile Visibility",
"logout": "Log Out",
"delete-account": "Delete Account",
"manage-device": "Device Settings",
"notification-setting": "Notification Settings",
"language-setting": "Language Settings",
"service-info": "Service Info",
"terms-of-service": "Terms of Service",
"privacy-policy": "Privacy Policy",
"customer-inquiry": "Customer Support",
"app-info": "App Info",
"version": "Version"
}
17 changes: 17 additions & 0 deletions src/locales/en/signUpAccount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"register": "Sign Up",
"username": "Username",
"password": "Password",
"password-confirm": "Confirm password",
"nickname": "Nickname",
"signup-username-hint": "Enter the username to use for login.",
"signup-password-hint": "Enter the password to use for login.",
"signup-password-confirm-hint": "Enter your password again.",
"signup-nickname-hint": "Enter a nickname shown to other users.",
"duplicate-identity-error": "Username or nickname is already in use.",
"short-password-error": "Password must be at least 8 characters.",
"weak-password-error": "Password must include at least one letter, one number, and one special character.",
"password-mismatch-error": "Passwords do not match.",
"required-input": "This field is required.",
"create-account": "Create Account"
}
6 changes: 6 additions & 0 deletions src/locales/en/signUpAccountComplete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"register-completed-prompt": "Your account has been created!",
"register-completed-description": "Would you like to set up your profile now?",
"register-profile": "Set Up Profile",
"register-later": "Later"
}
6 changes: 6 additions & 0 deletions src/locales/en/signUpBirthDate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"birthdate-prompt": "Tell us your birth date!",
"birthdate-description": "We'll prepare a gift on your birthday 🎁",
"next-button": "Next",
"skip-button": "Skip"
}
6 changes: 6 additions & 0 deletions src/locales/en/signUpPosition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"position-prompt": "Tell us your current status!",
"next-button": "Next",
"skip-button": "Skip",
"position-placeholder": "High school student, college student, office worker, ..."
}
5 changes: 5 additions & 0 deletions src/locales/en/signUpProfileComplete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"register-completed-prompt": "Sign-up complete!",
"register-completed-description": "Start studying together right now",
"start-button": "Get Started"
}
5 changes: 5 additions & 0 deletions src/locales/en/signUpProfileImage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"profile-image-prompt": "Upload your profile photo!",
"next-button": "Next",
"skip-button": "Skip"
}
4 changes: 4 additions & 0 deletions src/locales/en/stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"selected-date-header-title": "{{month}}/{{day}}",
"total-study-time": "Studied for {{time}} in total"
}
Loading
Loading