From f41768dd12f776d506d0db9b61c2223ed5903759 Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Wed, 5 Feb 2020 19:56:59 +0900 Subject: [PATCH] feat: add opam --- web/public/locales/en/translation.json | 3 +- web/public/locales/ja/translation.json | 3 +- web/src/components/Icons.tsx | 50 ++++++++++++++++++++ web/src/components/Welcome.tsx | 7 ++- web/src/components/cards/index.tsx | 4 +- web/src/components/cards/providers/Ocaml.tsx | 30 ++++++++++++ web/src/util/i18n.ts | 2 +- 7 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 web/src/components/cards/providers/Ocaml.tsx diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index 3f73e05..419bed0 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -23,7 +23,8 @@ "heroku": "Heroku", "now": "ZEIT Now", "netlify": "Netlify", - "nta": "Company (JP)" + "nta": "Company (JP)", + "ocaml": "OCaml" }, "countryCode": "us", "try": "suggestions", diff --git a/web/public/locales/ja/translation.json b/web/public/locales/ja/translation.json index a38c96c..e59b040 100644 --- a/web/public/locales/ja/translation.json +++ b/web/public/locales/ja/translation.json @@ -23,7 +23,8 @@ "heroku": "Heroku", "now": "ZEIT Now", "netlify": "Netlify", - "nta": "法人" + "nta": "法人", + "ocaml": "OCaml" }, "countryCode": "jp", "try": "全自動名前考え機", diff --git a/web/src/components/Icons.tsx b/web/src/components/Icons.tsx index ae04d18..e167eb2 100644 --- a/web/src/components/Icons.tsx +++ b/web/src/components/Icons.tsx @@ -43,3 +43,53 @@ export const NetlifyIcon: React.FC = () => ( ); + +export const OcamlIcon: React.FC = () => ( + + + + + + + +); diff --git a/web/src/components/Welcome.tsx b/web/src/components/Welcome.tsx index 60ff97d..28c675f 100644 --- a/web/src/components/Welcome.tsx +++ b/web/src/components/Welcome.tsx @@ -21,7 +21,7 @@ import { import {IoIosBeer} from 'react-icons/io'; import {DiRust, DiHeroku} from 'react-icons/di'; -import {SpectrumIcon, NowIcon, NetlifyIcon} from './Icons'; +import {SpectrumIcon, NowIcon, NetlifyIcon, OcamlIcon} from './Icons'; import {mobile} from '../util/css'; const Welcome: React.FC = () => { @@ -66,6 +66,9 @@ const Welcome: React.FC = () => { {t('providers.npm')} + + {t('providers.rust')} + {t('providers.pypi')} @@ -73,7 +76,7 @@ const Welcome: React.FC = () => { {t('providers.rubygems')} - {t('providers.rust')} + {t('providers.ocaml')} {t('providers.homebrew')} diff --git a/web/src/components/cards/index.tsx b/web/src/components/cards/index.tsx index 130ee5c..3a2d01d 100644 --- a/web/src/components/cards/index.tsx +++ b/web/src/components/cards/index.tsx @@ -23,6 +23,7 @@ import HerokuCard from './providers/Heroku'; import NowCard from './providers/Now'; import NtaCard from './providers/Nta'; import NetlifyCard from './providers/Netlify'; +import OcamlCard from './providers/Ocaml'; const Index: React.FC<{query: string}> = ({query}) => { const { @@ -37,8 +38,9 @@ const Index: React.FC<{query: string}> = ({query}) => { - + + diff --git a/web/src/components/cards/providers/Ocaml.tsx b/web/src/components/cards/providers/Ocaml.tsx new file mode 100644 index 0000000..fe8791d --- /dev/null +++ b/web/src/components/cards/providers/Ocaml.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import {useTranslation} from 'react-i18next'; +import {OcamlIcon} from '../../Icons'; + +import {Card, Repeater, DedicatedAvailability} from '../core'; + +const OcamlCard: React.FC<{query: string}> = ({query}) => { + const {t} = useTranslation(); + const lowerCase = query.toLowerCase(); + + const names = [lowerCase]; + + return ( + + + {(name) => ( + } + /> + )} + + + ); +}; + +export default OcamlCard; diff --git a/web/src/util/i18n.ts b/web/src/util/i18n.ts index d1fe077..bee79b8 100644 --- a/web/src/util/i18n.ts +++ b/web/src/util/i18n.ts @@ -14,7 +14,7 @@ i18n backends: [LocalStorageBackend, XHR], backendOptions: [ { - versions: {en: '1.6', ja: '1.6'}, + versions: {en: '1.7', ja: '1.7'}, }, ], },