diff --git a/questions/2-medium-return-type/README.md b/questions/2-medium-return-type/README.md index e8e687f0..3af9b6a5 100644 --- a/questions/2-medium-return-type/README.md +++ b/questions/2-medium-return-type/README.md @@ -20,5 +20,5 @@ type a = MyReturnType // should be "1 | 2" ``` -Check out Answers Back +Back Check out Answers \ No newline at end of file diff --git a/questions/2-medium-return-type/README.zh-CN.md b/questions/2-medium-return-type/README.zh-CN.md index 3c1c72cf..039134b5 100644 --- a/questions/2-medium-return-type/README.zh-CN.md +++ b/questions/2-medium-return-type/README.zh-CN.md @@ -20,5 +20,5 @@ type a = MyReturnType // 应推导出 "1 | 2" ``` -查看答案 返回首页 +返回首页 查看答案 \ No newline at end of file diff --git a/questions/3-medium-omit/README.md b/questions/3-medium-omit/README.md index 4f208514..780662f5 100644 --- a/questions/3-medium-omit/README.md +++ b/questions/3-medium-omit/README.md @@ -26,5 +26,5 @@ const todo: TodoPreview = { ``` -Check out Answers Back +Back Check out Answers \ No newline at end of file diff --git a/questions/4-easy-pick/README.md b/questions/4-easy-pick/README.md index 4ad7a70e..fc9d0658 100644 --- a/questions/4-easy-pick/README.md +++ b/questions/4-easy-pick/README.md @@ -26,5 +26,5 @@ const todo: TodoPreview = { ``` -Check out Answers Back +Back Check out Answers \ No newline at end of file diff --git a/questions/5-hard-readonly-keys/README.md b/questions/5-hard-readonly-keys/README.md index 1cbc4004..4c123b2d 100644 --- a/questions/5-hard-readonly-keys/README.md +++ b/questions/5-hard-readonly-keys/README.md @@ -19,5 +19,5 @@ type Keys = GetReadonlyKeys // expected to be "title" | "description" ``` -Check out Answers Back +Back Check out Answers \ No newline at end of file diff --git a/questions/6-extreme-simple-vue/README.md b/questions/6-extreme-simple-vue/README.md index f3eca250..7bc0112f 100644 --- a/questions/6-extreme-simple-vue/README.md +++ b/questions/6-extreme-simple-vue/README.md @@ -41,5 +41,5 @@ const instance = SimpleVue({ ``` -Check out Answers Back +Back Check out Answers \ No newline at end of file diff --git a/scripts/readme.ts b/scripts/readme.ts index 5b9741ff..55815669 100644 --- a/scripts/readme.ts +++ b/scripts/readme.ts @@ -2,7 +2,7 @@ import path from 'path' import fs from 'fs-extra' import { supportedLocales, defaultLocale, messages } from './locales' import { loadQuizes } from './list' -import { toPlay, toQuizREADME } from './toUrl' +import { toPlay, toQuizREADME, toAnswers } from './toUrl' import { Quiz } from './types' const DifficultyColors: Record = { @@ -50,8 +50,8 @@ async function insertInfoReadme(filepath: string, quiz: Quiz, locale: keyof type .replace( /[\s\S]*/, '\n' - + toBadgeLink(toPlay(quiz.no, locale), '', messages[locale]['see-answers'], 'F59BAF', '?logo=awesome-lists&logoColor=white') + toBadgeLink(locale === defaultLocale ? '../../README.md' : `../../README.${locale}.md`, '', messages[locale].back, 'grey') + + toBadgeLink(toAnswers(quiz.no), '', messages[locale]['see-answers'], 'F59BAF', '?logo=awesome-lists&logoColor=white') + '\n', )