This repository has been archived by the owner on Mar 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
192 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from 'react'; | ||
import { useRecoilState } from "recoil"; | ||
import { useTranslation } from 'react-i18next'; | ||
import MuiToggleButton from '@mui/material/ToggleButton'; | ||
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; | ||
import { styled } from "@mui/material/styles"; | ||
import { languageState } from "@store/theme"; | ||
|
||
const ToggleButton = styled(MuiToggleButton)({ | ||
"&.Mui-selected, &.Mui-selected:hover": { | ||
color: "white" | ||
} | ||
}); | ||
|
||
export default function ChangeLanguage() { | ||
const { i18n } = useTranslation(); | ||
const [language, setLanguage] = useRecoilState(languageState); | ||
const handleChangeLanguage = (event, newLanguage) => { | ||
if (newLanguage) { | ||
i18n.changeLanguage(newLanguage); | ||
setLanguage(newLanguage); | ||
} | ||
}; | ||
|
||
return ( | ||
<ToggleButtonGroup | ||
size="small" | ||
value={language} | ||
exclusive | ||
onChange={handleChangeLanguage} | ||
> | ||
<ToggleButton value="en">EN</ToggleButton> | ||
<ToggleButton value="ko">KO</ToggleButton> | ||
</ToggleButtonGroup> | ||
); | ||
} |
2 changes: 1 addition & 1 deletion
2
src/components/header/MoreButton.jsx → src/components/header/MoreActions.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
src/components/main/RandomWords.jsx → src/components/main/RandomWord.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "Smart Shuffle Words", | ||
"input": "Input", | ||
"output": "Output", | ||
"shuffle & copy": "Shuffle & Copy", | ||
"set additional string": "Set additional string", | ||
"prepend to string": "Prepend to string", | ||
"append after string": "Append after string", | ||
"random word": "Random Word", | ||
"characters used": "Characters Used", | ||
"characters length": "Characters Length", | ||
"stop words": "Stop Words", | ||
"please enter text": "Please enter text", | ||
"seperated by comma": "Seperated by comma" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import i18n from "i18next"; | ||
import { initReactI18next } from "react-i18next"; | ||
import translationEn from "@locales/en/translation"; | ||
import translationKo from "@locales/ko/translation"; | ||
|
||
i18n | ||
.use(initReactI18next) // passes i18n down to react-i18next | ||
.init({ | ||
// the translations | ||
// (tip move them in a JSON file and import them, | ||
// or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui) | ||
resources: { | ||
en: { | ||
translations: translationEn | ||
}, | ||
ko: { | ||
translations: translationKo | ||
} | ||
}, | ||
|
||
lng: "ko", // if you're using a language detector, do not define the lng option | ||
fallbackLng: "ko", | ||
|
||
ns: "translations", // string or array of namespaces to load | ||
defaultNS: "translations", // default namespace used if not passed to the translation function | ||
|
||
// char to separate keys. If working with a flat JSON, | ||
// it's recommended to set this to false. | ||
keySeparator: false, // (default) '.' | ||
|
||
interpolation: { | ||
escapeValue: false // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape | ||
} | ||
}); | ||
|
||
export default i18n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "스마트 셔플 워드", | ||
"input": "상품명", | ||
"output": "상품명 수정", | ||
"shuffle & copy": "상품명 변경 후 자동 복사", | ||
"set additional string": "추가 문자열 설정", | ||
"prepend to string": "문자열 앞에 추가", | ||
"append after string": "문자열 뒤에 추가", | ||
"random word": "무작위 단어", | ||
"characters used": "사용된 문자", | ||
"characters length": "문자 길이", | ||
"stop words": "금칙어", | ||
"please enter text": "텍스트를 입력 하십시오", | ||
"seperated by comma": "쉼표로 구분 합니다" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.