From 9ad748affa44c7e07a4377918c951d1d49035b39 Mon Sep 17 00:00:00 2001 From: yudejp Date: Thu, 27 May 2021 10:31:55 +0900 Subject: [PATCH] Multilingual suport (hcunews/) --- docs/hcunews/en.md | 17 +++++++++++++++++ docs/{hcunews.md => hcunews/ja.md} | 0 pages/hcunews.js | 9 +++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 docs/hcunews/en.md rename docs/{hcunews.md => hcunews/ja.md} (100%) diff --git a/docs/hcunews/en.md b/docs/hcunews/en.md new file mode 100644 index 0000000..78e90b4 --- /dev/null +++ b/docs/hcunews/en.md @@ -0,0 +1,17 @@ +This is **unofficial** account and there's no guarantee of accuracy. + +# Administrator +Run by [yude](https://yude.jp/profile), a student of Faculty of Information Science, Hiroshima City University, 2nd grade. +## Contact +* E-mail: [admin@yude.jp](mailto:admin@yude.jp) +* Twitter: [@yude_jp](https://twitter.com/yude_jp) + +# How it works +Microsoft Power Automate get the RSS feed from Hiroshima City University Website and tweet when a new article is available. \ +We are monitoring the following URLs: +* [お知らせ|広島市立大学](https://www.hiroshima-cu.ac.jp/news/) +* [お知らせ(在学生・保護者の方へ)|広島市立大学](https://www.hiroshima-cu.ac.jp/news_student/) +* [在学生・保護者の方へ|広島市立大学](https://www.hiroshima-cu.ac.jp/student/) + +# Related links +* [広島市立大学](https://www.hiroshima-cu.ac.jp/) \ No newline at end of file diff --git a/docs/hcunews.md b/docs/hcunews/ja.md similarity index 100% rename from docs/hcunews.md rename to docs/hcunews/ja.md diff --git a/pages/hcunews.js b/pages/hcunews.js index ce4e21b..6bd87a6 100644 --- a/pages/hcunews.js +++ b/pages/hcunews.js @@ -4,7 +4,8 @@ import { useRouter } from 'next/router' import React from "react" import ReactMarkdown from "react-markdown" import gfm from 'remark-gfm'; -import input from '../docs/hcunews.md' +import ja from '../docs/hcunews/ja.md' +import en from '../docs/hcunews/en.md' export default function Tos(props) { const router = useRouter() @@ -15,7 +16,11 @@ export default function Tos(props) {

{hcunews}

- + {lang === 'ja' ? ( + + ) : ( + + )}
)