diff --git a/nuxt-i18n.config.js b/nuxt-i18n.config.js index 5ccb0dc4..696ee1d0 100644 --- a/nuxt-i18n.config.js +++ b/nuxt-i18n.config.js @@ -2,6 +2,7 @@ const defaultLocale = 'ja' const options = { strategy: 'prefix_except_default', + seo: false, detectBrowserLanguage: false, defaultLocale, vueI18n: { diff --git a/nuxt.config.js b/nuxt.config.js index 979c0fd3..58ec5ed1 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -14,63 +14,16 @@ export default { htmlAttrs: { prefix: 'og: http://ogp.me/ns#', }, - title: 'おうちで時間割', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - { - hid: 'keyword', - name: 'keyword', - content: 'CodeforJapan, おうちで時間割, デジタル, 学び, 今後の学習', - }, { hid: 'author', name: 'author', content: 'Code for Japan', }, - { - hid: 'og:site_name', - property: 'og:site_name', - content: 'おうちで時間割', - }, - { - hid: 'og:url', - property: 'og:url', - content: `https://app.studyathome.jp/`, - }, - { - hid: 'og:title', - property: 'og:title', - content: 'おうちで時間割', - }, - { - hid: 'og:description', - property: 'og:description', - content: - '子どもの学びにデジタルの活用を - 臨時休校期間と今後の学習に向けて 簡単に楽しく学べる環境を今だから、みんなでつくろう。', - }, - { - hid: 'apple-mobile-web-app-title', - name: 'apple-mobile-web-app-title', - content: 'おうちで時間割', - }, - { - hid: 'description', - name: 'description', - content: - '子どもの学びにデジタルの活用を - 臨時休校期間と今後の学習に向けて 簡単に楽しく学べる環境を今だから、みんなでつくろう。', - }, { hid: 'og:type', property: 'og:type', content: 'website' }, - { - hid: 'og:image', - property: 'og:image', - content: 'https://app.studyathome.jp/ogp.png', - }, - { - hid: 'twitter:image', - name: 'twitter:image', - content: 'https://app.studyathome.jp/ogp.png', - }, + { name: 'twitter:card', content: 'summary_large_image' }, ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 532e5ada..1ce96ab5 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -8,12 +8,19 @@ "login": "Sign In", "logout": "Sign Out", "ok": "OK", - "save": "Save" + "save": "Save", + "change": "Modify", + "verify": "Verification" }, "error": { "default": "An error occurred, please try again later." } }, + "calender": { + "prev_week": "Previous week", + "next_week": "Next week", + "to_today": "Move to today" + }, "footer": { "about": "About StayAtHome", "contact": "Contact Us", @@ -40,7 +47,8 @@ "password": "Password", "password_rules": "Password Must be At Least 6 Characters", "password_not_acceptable": "The Password Does Not Meet the Password Requirements", - "password_not_same": "Inconsistent Passwords" + "password_not_same": "Inconsistent Passwords", + "verification_code":"Verification code" } }, "agree_terms": { @@ -69,7 +77,7 @@ "date": "Date Setting", "time": "Time Setting", "subject_label_color": "Label Color", - "video_keyword": "(Optional function) Video Search", + "video_keyword": "Optional feature: Video search of {source}", "video_url": "Reference Video URL", "video_thumbnail": "Video Thumbnail/Caption Display", "textbook_page": "Textbook Page", @@ -77,7 +85,7 @@ "material_url": "Learning Material URL" }, "placeholder": { - "video_keyword": "EX) Science" + "video_keyword": "Keyword" }, "required": "*Items Marked with Are Required", "search_videos": { @@ -134,7 +142,9 @@ "label": "To the Teacher Who Made the Timetable", "buttons": { "signup": "Register As A User", - "login": "Log In" + "login": "Log In", + "registerLessons": "Create Timetable", + "logout": "Sign Out" } } }, @@ -145,10 +155,28 @@ "no_classes": "There Are No Editable Courses. Please Register Your Course." }, "user_edit_user_data": { - "title": "Change User Information", + "title": "Change User Information" + }, + "user_edit_user_name": { + "title": "Change name (display name)", + "labels": { + "current_nickname": "Current name (display name)", + "new_nickname": "Name to be used (display name)" + } + }, + "user_edit_user_email": { + "title": "Change email address", "labels": { - "new_password": "Change Password", - "new_password_confirm": "Change Password (for confirmation)" + "current_email": "Current email address", + "new_email": "Email address to be used" + } + }, + "user_edit_user_password": { + "title": "Change password", + "labels": { + "current_password": "Please enter your current password", + "new_password": "New password", + "new_password_confirm": "Password (for confirmation)" } }, "user_login": { @@ -192,6 +220,12 @@ "go_back_to_top": "Back to Top", "message": "A Confirmation Email Has Been Sent to the Email Address You Entered. Please Authenticate from the URL Described in the Email." } + }, + "user_verify": { + "title": "Confirm email address" + }, + "user_verify_new_email": { + "title": "Confirm changing email address" } } } diff --git a/src/assets/locales/ja.json b/src/assets/locales/ja.json index fca7b39c..830a0d22 100644 --- a/src/assets/locales/ja.json +++ b/src/assets/locales/ja.json @@ -1,4 +1,6 @@ { + "title": "おうちで時間割", + "description": "子どもの学びにデジタルの活用を - 臨時休校期間と今後の学習に向けて 簡単に楽しく学べる環境を今だから、みんなでつくろう。", "common": { "general": { "buttons": { diff --git a/src/assets/locales/zh_TW.json b/src/assets/locales/zh_TW.json index ebf42317..dd183915 100644 --- a/src/assets/locales/zh_TW.json +++ b/src/assets/locales/zh_TW.json @@ -1,4 +1,6 @@ { + "title": "在家學習時間表", + "description": "「在家學習時間表」是你的數位學習好夥伴!我們創造了線上學習環境,讓你在家也可以輕鬆的上線學習,不管是老師或學生,歡迎一起來發掘更多上課的樂趣!", "common": { "general": { "buttons": { @@ -77,7 +79,7 @@ "date": "設定日期", "time": "設定時間", "subject_label_color": "標籤顏色", - "video_keyword": "可選功能:搜尋參考影片", + "video_keyword": "可選功能:{source}的影片搜尋", "video_url": "參考影片 URL", "video_thumbnail": "顯示影片縮圖", "textbook_page": "教科書頁", diff --git a/src/layouts/default.vue b/src/layouts/default.vue index d3305336..d817a2ba 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -37,8 +37,73 @@ export default Vue.extend({ loading: true, } }, + head() { + const ogpImage = () => { + switch (this.$i18n.locale) { + case 'zh-tw': + return `https://app.studyathome.jp/ogp-${this.$i18n.locale}.png` + default: + return 'https://app.studyathome.jp/ogp.png' + } + } + return { + title: this.$tc('title'), + meta: [ + { + hid: 'description', + name: 'description', + content: this.$tc('description'), + }, + { + hid: 'apple-mobile-web-app-title', + name: 'apple-mobile-web-app-title', + content: this.$tc('title'), + }, + { + hid: 'og:title', + property: 'og:title', + content: this.$tc('title'), + }, + { + hid: 'og:description', + property: 'og:description', + content: this.$tc('description'), + }, + { + hid: 'og:site_name', + property: 'og:site_name', + content: this.$tc('title'), + }, + { + hid: 'og:image', + property: 'og:image', + content: ogpImage(), + }, + { + hid: 'og:image:width', + property: 'og:image:width', + content: '1200', + }, + { + hid: 'og:image:height', + property: 'og:image:height', + content: '630', + }, + { + hid: 'twitter:image', + name: 'twitter:image', + content: ogpImage(), + }, + { + hid: 'og:url', + property: 'og:url', + content: `https://app.studyathome.jp${this.$route.path}`, + }, + ], + } + }, mounted(): void { - this.loading = false + ;(this as any).loading = false }, }) diff --git a/src/pages/terms.vue b/src/pages/terms.vue index 64132478..c8bd4e00 100644 --- a/src/pages/terms.vue +++ b/src/pages/terms.vue @@ -20,10 +20,11 @@
  • 本サービスでは、HTML5及びJavaScript、CSS3、SVGを使用するものとします。なお、以下の推奨ブラウザをご利用の場合、ブラウザの設定でこれら機能を有効にしておくことで、最善のレイアウトで本サイトを閲覧することができます。
  • @@ -43,7 +44,7 @@ 「弊団体」とは、一般社団法人コード・フォー・ジャパンを意味します。
  • - 「弊団体ウェブサイト」とは、そのドメインが「code4japan.org」である、弊団体が運営するウェブサイト(理由の如何を問わず、弊団体のウェブサイトのドメインまたは内容が変更された場合は、当該変更後のウェブサイトを含みます。)を意味します。 + 「弊団体ウェブサイト」とは、そのドメインが「code4japan.org」もしくは「studyathome.jp」である、弊団体が運営するウェブサイト(理由の如何を問わず、弊団体のウェブサイトのドメインまたは内容が変更された場合は、当該変更後のウェブサイトを含みます。)を意味します。
  • 「登録ユーザー」とは、第3条(登録)に基づいて本サービスの利用者としての登録がなされたユーザーを意味します。 diff --git a/src/pages/user/registerClass.vue b/src/pages/user/registerClass.vue index 64374f43..83405c35 100644 --- a/src/pages/user/registerClass.vue +++ b/src/pages/user/registerClass.vue @@ -80,6 +80,7 @@ export default Vue.extend({ .registerClass({ schoolName: this.schoolName, className: this.className, + locale: this.$i18n.locale, }) .then(() => { this.loading = false diff --git a/src/static/ogp-zh-tw.png b/src/static/ogp-zh-tw.png new file mode 100644 index 00000000..9c23f80a Binary files /dev/null and b/src/static/ogp-zh-tw.png differ diff --git a/src/static/ogp.png b/src/static/ogp.png index b32f5b11..0e012f17 100644 Binary files a/src/static/ogp.png and b/src/static/ogp.png differ diff --git a/src/store/modules/classData.ts b/src/store/modules/classData.ts index af4a5a75..56c87243 100644 --- a/src/store/modules/classData.ts +++ b/src/store/modules/classData.ts @@ -81,9 +81,22 @@ const VuexModule = createModule({ target: 'nuxt', }) -const generateUniqueId = (): string => { - const c = - 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん' +const generateUniqueId = (locale: string): string => { + let c: string = '' + switch (locale) { + case 'ja': + c = + 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん' + break + case 'en': + c = 'abcdefghijklmnopqrstuvwxyz' + break + case 'zh-tw': + c = + 'ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄧㄨㄩㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦ' + break + } + const cl = c.length const result = c[Math.floor(Math.random() * cl)] + @@ -237,9 +250,11 @@ export class ClassDataStore extends VuexModule implements classData.ClassData { public async registerClass({ className, schoolName, + locale, }: { className: string schoolName: string + locale: string }) { if (!vxm.user.isAuthenticated) { throw new Error('ユーザーが正しくログインされていません') @@ -247,7 +262,7 @@ export class ClassDataStore extends VuexModule implements classData.ClassData { let classId, classObject do { - classId = generateUniqueId() + classId = generateUniqueId(locale) try { const result = (await API.graphql({ query: getClassSimple,