diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index c24028c..355e663 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -42,5 +42,11 @@ "gettingStartedWithExample": "Try with namae", "pressEnterToSearch": "Press Enter to search", "available": "Available", - "unavailable": "Unavailable" + "unavailable": "Unavailable", + "language": "Language", + "community": "Community", + "about": "About", + "contributors": "Contributors", + "issues": "Issues", + "blog": "Blog Article" } diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index 01457f7..4e2942e 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -42,5 +42,11 @@ "gettingStartedWithExample": "namae を調べる", "pressEnterToSearch": "エンターキーで検索", "available": "取得できます", - "unavailable": "取得できません" + "unavailable": "取得できません", + "language": "言語", + "community": "コミュニティ", + "about": "概要", + "contributors": "貢献者", + "issues": "Issues", + "blog": "ブログ" } diff --git a/public/locales/zh-Hans/translation.json b/public/locales/zh-Hans/translation.json index d76728a..261509a 100644 --- a/public/locales/zh-Hans/translation.json +++ b/public/locales/zh-Hans/translation.json @@ -42,5 +42,11 @@ "gettingStartedWithExample": "试试 namae", "pressEnterToSearch": "按Enter键搜索", "available": "可获得", - "unavailable": "买不到" + "unavailable": "不可获得", + "language": "语言", + "community": "社区", + "about": "关于", + "contributors": "贡献者", + "issues": "问题", + "blog": "博客" } diff --git a/public/locales/zh-Hant/translation.json b/public/locales/zh-Hant/translation.json new file mode 100644 index 0000000..0fe8be0 --- /dev/null +++ b/public/locales/zh-Hant/translation.json @@ -0,0 +1,52 @@ +{ + "title": "為您的新應用取個好聽的名字", + "description": "namae可讓您給您的應用程序、Web服務或組織起一個好名字。", + "placeholder": "檢驗", + "providers": { + "domains": "域名", + "github": "GitHub 組織", + "gitlab": "GitLab", + "npm": "npm", + "pypi": "PyPI", + "rubygems": "RubyGems", + "rust": "Rust", + "homebrew": "Homebrew", + "linux": "Linux", + "instagram": "Instagram", + "twitter": "推特", + "slack": "Slack", + "s3": "AWS S3", + "jsorg": "js.org", + "githubSearch": "GitHub 倉庫", + "appStore": "App Store", + "google": "谷歌", + "spectrum": "Spectrum", + "heroku": "Heroku", + "now": "Vercel", + "netlify": "Netlify", + "nta": "在日本的公司", + "ocaml": "OCaml", + "firebase": "Firebase" + }, + "uniqueness": { + "high": "超級獨特", + "moderate": "有點獨特", + "low": "普通", + "description": "UNIQ表示名稱的獨特性(0-100)" + }, + "countryCode": "jp", + "try": "這個呢?", + "showMore": "更多", + "noResult": "無結果", + "gettingStarted": "起步", + "gettingStartedWithExample": "試試 namae", + "pressEnterToSearch": "按Enter鍵搜索", + "available": "可獲得", + "unavailable": "不可獲得", + "language": "語言", + "community": "社區", + "about": "關於", + "contributors": "貢獻者", + "issues": "問題", + "blog": "博客" +} diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 56e9883..234bef6 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -9,137 +9,152 @@ import { tablet } from '../util/css'; import Contributors from '../components/Contributors'; const Footer: React.FC = () => { - const { t } = useTranslation(); - return ( - - Language - - - - - 🇬🇧 - - - - - 🇯🇵 - - - - - 🇨🇳 - - - - - - - - Community - - - - GitHub - - - - - Issues - - - - - Blog Article - - - - - Contributors - - - - - - About - - Made with{' '} - - ☕️ - {' '} - by{' '} - - Yasuaki Uechi - - - - - - - - - - - - - - - - - Sponsor - - - - - + + + ); }; export default Footer; +const Languages = () => { + const { t } = useTranslation(); + + return ( + + {t('language')} + + + English + + + 日本語 + + + 简体中文 + + + 繁体中文 + + + + ); +}; + +const Community = () => { + const { t } = useTranslation(); + + return ( + + {t('community')} + + + + GitHub + + + + + {t('issues')} + + + + + {t('blog')} + + + + + {t('contributors')} + + + + ); +}; + +const About = () => { + const { t } = useTranslation(); + + return ( + + {t('about')} + + Made with{' '} + + ☕️ + {' '} + by{' '} + + Yasuaki Uechi + + + + + + + + + + + + + + + + + Sponsor + + + + + + ); +}; + const Container = styled(Section)` --text: #bdbdbd; --background: #404040; @@ -197,17 +212,6 @@ const Links = styled.div` } `; -const LangBox = styled.div` - line-height: 1em; - font-size: 2rem; - - ${Links} { - a { - margin-right: 5px; - } - } -`; - const ShareBox = styled.div` margin-top: 15px; line-height: 1em; diff --git a/src/util/i18n.ts b/src/util/i18n.ts index 71ac783..a8cc5ed 100644 --- a/src/util/i18n.ts +++ b/src/util/i18n.ts @@ -5,7 +5,7 @@ import XHR from 'i18next-xhr-backend'; import LanguageDetector from 'i18next-browser-languagedetector'; import { initReactI18next } from 'react-i18next'; -const TRANSLATION_VERSION = '1.19'; +const TRANSLATION_VERSION = '2'; i18n .use(Backend) @@ -20,6 +20,7 @@ i18n en: TRANSLATION_VERSION, ja: TRANSLATION_VERSION, 'zh-Hans': TRANSLATION_VERSION, + 'zh-Hant': TRANSLATION_VERSION, }, }, ],
- Made with{' '} - - ☕️ - {' '} - by{' '} - - Yasuaki Uechi - -
+ Made with{' '} + + ☕️ + {' '} + by{' '} + + Yasuaki Uechi + +