1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-17 12:30:32 +09:00

feat: add zh-Hant (#120)

This commit is contained in:
uetchy 2020-07-31 11:32:54 +09:00 committed by GitHub
parent 815e29dddf
commit e1b2e6f41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 214 additions and 139 deletions

View File

@ -42,5 +42,11 @@
"gettingStartedWithExample": "Try with namae", "gettingStartedWithExample": "Try with namae",
"pressEnterToSearch": "Press Enter to search", "pressEnterToSearch": "Press Enter to search",
"available": "Available", "available": "Available",
"unavailable": "Unavailable" "unavailable": "Unavailable",
"language": "Language",
"community": "Community",
"about": "About",
"contributors": "Contributors",
"issues": "Issues",
"blog": "Blog Article"
} }

View File

@ -42,5 +42,11 @@
"gettingStartedWithExample": "namae を調べる", "gettingStartedWithExample": "namae を調べる",
"pressEnterToSearch": "エンターキーで検索", "pressEnterToSearch": "エンターキーで検索",
"available": "取得できます", "available": "取得できます",
"unavailable": "取得できません" "unavailable": "取得できません",
"language": "言語",
"community": "コミュニティ",
"about": "概要",
"contributors": "貢献者",
"issues": "Issues",
"blog": "ブログ"
} }

View File

@ -42,5 +42,11 @@
"gettingStartedWithExample": "试试 namae", "gettingStartedWithExample": "试试 namae",
"pressEnterToSearch": "按Enter键搜索", "pressEnterToSearch": "按Enter键搜索",
"available": "可获得", "available": "可获得",
"unavailable": "买不到" "unavailable": "不可获得",
"language": "语言",
"community": "社区",
"about": "关于",
"contributors": "贡献者",
"issues": "问题",
"blog": "博客"
} }

View File

@ -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": "博客"
}

View File

@ -9,35 +9,46 @@ import { tablet } from '../util/css';
import Contributors from '../components/Contributors'; import Contributors from '../components/Contributors';
const Footer: React.FC = () => { const Footer: React.FC = () => {
return (
<Container>
<Languages />
<Community />
<About />
</Container>
);
};
export default Footer;
const Languages = () => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Container>
<Pane> <Pane>
<Title>Language</Title> <Title>{t('language')}</Title>
<LangBox> <ul>
<Links> <li>
<a href="/?lng=en"> <a href="/?lng=en">English</a>
<span role="img" aria-label="English"> </li>
🇬🇧 <li>
</span> <a href="/?lng=ja"></a>
</a> </li>
<a href="/?lng=ja"> <li>
<span role="img" aria-label="Japanese"> <a href="/?lng=zh-Hans"></a>
🇯🇵 </li>
</span> <li>
</a> <a href="/?lng=zh-Hant"></a>
<a href="/?lng=zh-Hans"> </li>
<span role="img" aria-label="Simplified Chinese"> </ul>
🇨🇳
</span>
</a>
</Links>
</LangBox>
</Pane> </Pane>
);
};
const Community = () => {
const { t } = useTranslation();
return (
<Pane> <Pane>
<Title>Community</Title> <Title>{t('community')}</Title>
<ul> <ul>
<li> <li>
<OutboundLink <OutboundLink
@ -56,7 +67,7 @@ const Footer: React.FC = () => {
aria-label="Go to GitHub Issues" aria-label="Go to GitHub Issues"
target="_blank" target="_blank"
> >
Issues {t('issues')}
</OutboundLink> </OutboundLink>
</li> </li>
<li> <li>
@ -66,18 +77,24 @@ const Footer: React.FC = () => {
aria-label="Go to blog" aria-label="Go to blog"
target="_blank" target="_blank"
> >
Blog Article {t('blog')}
</OutboundLink> </OutboundLink>
</li> </li>
</ul> </ul>
<Box> <Box>
<Subtitle>Contributors</Subtitle> <Subtitle>{t('contributors')}</Subtitle>
<Contributors /> <Contributors />
</Box> </Box>
</Pane> </Pane>
);
};
const About = () => {
const { t } = useTranslation();
return (
<Pane> <Pane>
<Title>About</Title> <Title>{t('about')}</Title>
<p> <p>
Made with{' '} Made with{' '}
<span role="img" aria-label="coffee"> <span role="img" aria-label="coffee">
@ -135,10 +152,8 @@ const Footer: React.FC = () => {
</Links> </Links>
</ShareBox> </ShareBox>
</Pane> </Pane>
</Container>
); );
}; };
export default Footer;
const Container = styled(Section)` const Container = styled(Section)`
--text: #bdbdbd; --text: #bdbdbd;
@ -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` const ShareBox = styled.div`
margin-top: 15px; margin-top: 15px;
line-height: 1em; line-height: 1em;

View File

@ -5,7 +5,7 @@ import XHR from 'i18next-xhr-backend';
import LanguageDetector from 'i18next-browser-languagedetector'; import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next'; import { initReactI18next } from 'react-i18next';
const TRANSLATION_VERSION = '1.19'; const TRANSLATION_VERSION = '2';
i18n i18n
.use(Backend) .use(Backend)
@ -20,6 +20,7 @@ i18n
en: TRANSLATION_VERSION, en: TRANSLATION_VERSION,
ja: TRANSLATION_VERSION, ja: TRANSLATION_VERSION,
'zh-Hans': TRANSLATION_VERSION, 'zh-Hans': TRANSLATION_VERSION,
'zh-Hant': TRANSLATION_VERSION,
}, },
}, },
], ],