diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ab1d21e633..a6c2ed2e28d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Enhancements -- Swiper component Enhancement: support mouse move +- Swiper component support mouse move - Add lightbox (modal image gallery) - Add Valine comment system (@Lloyar) @@ -26,16 +26,16 @@ ### Enhancements - Add extensions for audios (SoundCloud, Netease Cloud Music), videos (YouTube, TED, bilibili) and slide(SlideShare) -- Add sharing (AddToAny) +- Add AddToAny sharing service ## 2.2.1 (2018-10-02) ### Enhancements - Update screenshots -- landing Layout `data.sections` item's `image` add `full_width` setting +- Landing layout `data.sections` item's `image` add `full_width` setting - Remove `header.type` and add `header.background` setting -- page layout sidebar use document scroll when viewport width < 1024px, this enhance the user experience on a phone or a pad +- Page layout sidebar use document scroll when viewport width < 1024px, this enhance the user experience on a phone or a pad - Telegram social icon (@WangQiru) - Search panel use dark background @@ -43,8 +43,8 @@ ### Enhancements -- `article_header` config for Page Layout -- Articles Layout +- `article_header` setting for page layout +- Articles layout - New grid system - Image, card, item and hero components - Tag additional style @@ -52,7 +52,7 @@ ### Bug Fixes -- replace Lenna example image +- replace Lenna test image ## 2.1.0 (2018-08-26) @@ -89,7 +89,7 @@ ### Bug Fixes -- `mathjax` and `mermaid` config may not work +- `mathjax` and `mermaid` setting may not work ## 2.0.0 (2018-07-01) @@ -105,10 +105,10 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky ### Enhancements -- `text_color_theme` config +- `text_color_theme` setting - Long pagination - Additional styles (Alert, Image) -- Mathjax autoNumber config (@liao961120) +- Mathjax `autoNumber` setting (@liao961120) - Article heading anchor - Previous and next post - Search @@ -127,7 +127,7 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky ### Enhancements - Use new liquid syntax `{%-` `-%}` to avoid unnecessary output whitespace -- Add paths.base config +- Add `paths.base` setting ## 1.4.1 (2017-12-05) @@ -156,7 +156,7 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky - Article tag supports special characters - Excerpts type (HTML | TEXT) - Titles on the phone become smaller -- Styles change (table, code, blockquote) +- Change styles for table, code and blockquote ## 1.2.2 (2017-11-04) @@ -180,7 +180,7 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky ### Bug Fixes -- Issues 4: View count display error when the post key include `-` (@yuxianda) +- View count display error when the post key include `-` (@yuxianda) - Email url error ## 1.2.0 (2017-10-22) @@ -192,7 +192,7 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky ### Bug Fixes -- Fix article TOC ’s display error at proper situation +- Fix article TOC’s display error at proper situation - Fix footer social buttons not in the center bug ## 1.1.0 (2017-10-19) diff --git a/README-zh.md b/README-zh.md index 6634319014e..9832604b0dd 100644 --- a/README-zh.md +++ b/README-zh.md @@ -20,7 +20,7 @@ TeXt 是针对个人或团队网站、博客、项目、文档等的一款高度 - HTML 语意化 - 皮肤 - 代码高亮主题 -- 多语言支持 +- 国际化 - 搜索 - 目录 - 作者(电子邮件,Facebook,Twitter,领英,微博,知乎等。支持多作者配置) diff --git a/README.md b/README.md index e5ef86083b9..602ef4e64b5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ TeXt is a super customizable Jekyll theme for personal site, team site, blog, pr - Semantic HTML - Skins - Highlight Theme -- Multi-language support +- Internationalization - Search - Table of contents - Authors (Email, Facebook, Twitter, Linkedin, Weibo, Zhihu, etc) diff --git a/_config.yml b/_config.yml index e779497f79b..257bc67792e 100644 --- a/_config.yml +++ b/_config.yml @@ -27,7 +27,7 @@ description: > # this means to ignore newlines until "Language & timezone" ## => Language and Timezone ############################## -lang: # the language of your site, "en" (default, English), "zh"(简体中文), "zh-Hans"(简体中文), "zh-Hant"(繁體中文), "ko"(한국어) +lang: # the language of your site, default as "en" timezone: # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the available values diff --git a/_data/navigation.yml b/_data/navigation.yml index 40b51e673c2..db3913739fe 100644 --- a/_data/navigation.yml +++ b/_data/navigation.yml @@ -5,20 +5,16 @@ header: en-CA : *EN en-GB : *EN en-AU : *EN - zh-Hans : &ZH_HANS 归档 zh : *ZH_HANS zh-CN : *ZH_HANS zh-SG : *ZH_HANS - zh-Hant : &ZH_HANT 歸檔 zh-TW : *ZH_HANT zh-HK : *ZH_HANT - ko : &KO 아카이브 ko-KR : *KO - - url: /archive.html + url: /archive.html - titles: en : &EN About @@ -26,17 +22,13 @@ header: en-CA : *EN en-GB : *EN en-AU : *EN - zh-Hans : &ZH_HANS 关于 zh : *ZH_HANS zh-CN : *ZH_HANS zh-SG : *ZH_HANS - zh-Hant : &ZH_HANT 關於 zh-TW : *ZH_HANT zh-HK : *ZH_HANT - ko : &KO 소개 ko-KR : *KO - - url: /about.html + url: /about.html diff --git a/_layouts/archive.html b/_layouts/archive.html index 8e7a3dc79c9..17c6314ef6a 100644 --- a/_layouts/archive.html +++ b/_layouts/archive.html @@ -6,16 +6,13 @@ en-CA : *EN en-GB : *EN en-AU : *EN - zh-Hans : &ZH_HANS 归档 zh : *ZH_HANS zh-CN : *ZH_HANS zh-SG : *ZH_HANS - zh-Hant : &ZH_HANT 歸檔 zh-TW : *ZH_HANT zh-HK : *ZH_HANT - ko : &KO 아카이브 ko-KR : *KO --- diff --git a/_layouts/home.html b/_layouts/home.html index 14dd867211c..705d2f4ffae 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -6,16 +6,13 @@ en-CA : *EN en-GB : *EN en-AU : *EN - zh-Hans : &ZH_HANS 主页 zh : *ZH_HANS zh-CN : *ZH_HANS zh-SG : *ZH_HANS - zh-Hant : &ZH_HANT 主頁 zh-TW : *ZH_HANT zh-HK : *ZH_HANT - ko : &KO 홈 ko-KR : *KO show_title: false diff --git a/about.md b/about.md index a0f42a1125b..7b861aad796 100644 --- a/about.md +++ b/about.md @@ -6,16 +6,13 @@ titles: en-CA : *EN en-GB : *EN en-AU : *EN - zh-Hans : &ZH_HANS 关于 zh : *ZH_HANS zh-CN : *ZH_HANS zh-SG : *ZH_HANS - zh-Hant : &ZH_HANT 關於 zh-TW : *ZH_HANT zh-HK : *ZH_HANT - ko : &KO 소개 ko-KR : *KO key: page-about diff --git a/docs/_config.dev.yml b/docs/_config.dev.yml index a141a32c6dd..d5a420092d1 100644 --- a/docs/_config.dev.yml +++ b/docs/_config.dev.yml @@ -27,7 +27,7 @@ description: > # this means to ignore newlines until "Language & timezone" ## => Language and Timezone ############################## -lang: # the language of your site, "en" (default, English), "zh"(简体中文), "zh-Hans"(简体中文), "zh-Hant"(繁體中文) +lang: # the language of your site, default as "en" timezone: # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the available values diff --git a/docs/_config.yml b/docs/_config.yml index 3b765c4ec0a..083b155a825 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -27,7 +27,7 @@ description: > ## => Language and Timezone ############################## -lang: en # the language of your site, "en" (default, English), "zh"(简体中文), "zh-Hans"(简体中文), "zh-Hant"(繁體中文) +lang: en # the language of your site, default as "en" timezone: Asia/Shanghai diff --git a/docs/_data/locale.yml b/docs/_data/locale.yml index 925642c8a83..b328976d6c0 100644 --- a/docs/_data/locale.yml +++ b/docs/_data/locale.yml @@ -1,91 +1,103 @@ -SUBSCRIBE: - en: "Subscribe" - zh: "订阅" - zh-Hans: "订阅" - zh-Hant: "訂閱" +## => Engish +######################## +en: &EN + SUBSCRIBE : "Subscribe" + READMORE : "Read more" + SEARCH : "Search" + CANCEL : "Cancel" + VIEWS : "views" + LAST_UPDATED : "Last updated" + PREVIOUS : "PREVIOUS" + NEXT : "NEXT" + ARTICLE_DATE_FORMAT : "%b %d, %Y" + ARTICLE_LIST_DATE_FORMAT: "%b %d" + STATISTICS : "[POST_COUNT] post articles, [PAGE_COUNT] pages." + LICENSE_ANNOUNCE : "This work is licensed under a [LICENSE] license." + POST_ON_GITHUB : "Edit on Github" + FOLLOW_ME : "Follow me on [NAME]." + EMAIL_ME : "Send me Email." + COPYRIGHT_DATES : "2019" -READMORE: - en: "Read more" - zh: "阅读更多" - zh-Hans: "阅读更多" - zh-Hant: "閱讀更多" +en-US: + <<: *EN +en-CA: + <<: *EN +en-GB: + <<: *EN +en-AU: + <<: *EN -SEARCH: - en: "Search" - zh: "搜索" - zh-Hans: "搜索" - zh-Hant: "搜索" +## => Simplified Chinese +######################## +zh-Hans: &ZH_HANS + SUBSCRIBE : "订阅" + READMORE : "阅读更多" + SEARCH : "搜索" + CANCEL : "取消" + VIEWS : "阅读" + LAST_UPDATED : "更新于" + PREVIOUS : "上篇" + NEXT : "下篇" + ARTICLE_DATE_FORMAT : "%Y年 %m月%d日" + ARTICLE_LIST_DATE_FORMAT: "%m月%d日" + STATISTICS : "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。" + LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 许可协议。" + POST_ON_GITHUB : "在 Github 上修改" + FOLLOW_ME : "在 [NAME] 上关注我。" + EMAIL_ME : "给我发邮件。" + COPYRIGHT_DATES : "2019" -CANCEL: - en: "Cancel" - zh: "取消" - zh-Hans: "取消" - zh-Hant: "取消" +zh: + <<: *ZH_HANS +zh-CN: + <<: *ZH_HANS +zh-SG: + <<: *ZH_HANS -VIEWS: - en: "views" - zh: "阅读" - zh-Hans: "阅读" - zh-Hant: "閱讀" +## => Traditional Chinese +######################## +zh-Hant: &ZH_HANT + SUBSCRIBE : "訂閱" + READMORE : "閱讀更多" + SEARCH : "搜索" + CANCEL : "取消" + VIEWS : "閱讀" + LAST_UPDATED : "更新於" + PREVIOUS : "上篇" + NEXT : "下篇" + ARTICLE_DATE_FORMAT : "%Y年 %m月%d日" + ARTICLE_LIST_DATE_FORMAT: "%m月%d日" + STATISTICS : "共計 [POST_COUNT] 篇文章,[PAGE_COUNT] 頁。" + LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 許可協議。" + POST_ON_GITHUB : "在 Github 上修改" + FOLLOW_ME : "在 [NAME] 上關注我。" + EMAIL_ME : "給我發郵件。" + COPYRIGHT_DATES : "2019" -LAST_UPDATED: - en: "Last updated" - zh: "更新于" - zh-Hans: "更新于" - zh-Hant: "更新於" +zh-TW: + <<: *ZH_HANT +zh-HK: + <<: *ZH_HANT -PREVIOUS: - en: "PREVIOUS" - zh: "上篇" - zh-Hans: "上篇" - zh-Hant: "上篇" +## => Korean +######################## +ko: &KO + SUBSCRIBE : "등록" + READMORE : "더보기" + SEARCH : "검색" + CANCEL : "취소" + VIEWS : "조회" + LAST_UPDATED : "마지막 수정" + PREVIOUS : "이전" + NEXT : "다음" + ARTICLE_DATE_FORMAT : "%Y년 %m월 %d일" + ARTICLE_LIST_DATE_FORMAT: "%m월 %d일" + STATISTICS : "전체 글 [POST_COUNT]개, [PAGE_COUNT] 페이지" + LICENSE_ANNOUNCE : "이 글의 저작권은 [LICENSE] 라이센스를 따릅니다." + POST_ON_GITHUB : "Github에서 확인하기" + FOLLOW_ME : "[NAME]에서 팔로우하기" + EMAIL_ME : "이메일 보내기" + COPYRIGHT_DATES : "2019" -NEXT: - en: "NEXT" - zh: "下篇" - zh-Hans: "下篇" - zh-Hant: "下篇" - -ARTICLE_DATE_FORMAT: - en: "%b %d, %Y" - zh: "%Y年 %m月%d日" - zh-Hans: "%Y年 %m月%d日" - zh-Hant: "%Y年 %m月%d日" - -ARTICLE_LIST_DATE_FORMAT: - en: "%b %d" - zh: "%m月%d日" - zh-Hans: "%m月%d日" - zh-Hant: "%m月%d日" - -STATISTICS: - en: "[POST_COUNT] post articles, [PAGE_COUNT] pages." - zh: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。" - zh-Hans: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。" - zh-Hant: "共計 [POST_COUNT] 篇文章,[PAGE_COUNT] 頁。" - -LICENSE_ANNOUNCE: - en: "This work is licensed under a [LICENSE] license." - zh: "本文遵守 [LICENSE] 许可协议。" - zh-Hans: "本文遵守 [LICENSE] 许可协议。" - zh-Hant: "本文遵守 [LICENSE] 許可協議。" - -POST_ON_GITHUB: - en: "Edit on Github" - zh: "在 Github 上修改" - zh-Hans: "在 Github 上修改" - zh-Hant: "在 Github 上修改" - -FOLLOW_ME: - en: "Follow me on [NAME]." - zh: "在 [NAME] 上关注我。" - zh-Hans: "在 [NAME] 上关注我。" - zh-Hant: "在 [NAME] 上關注我。" - -EMAIL_ME: - en: "Send me Email." - zh: "给我发邮件。" - zh-Hans: "给我发邮件。" - zh-Hant: "給我發郵件。" - -COPYRIGHT_DATES: "2019" \ No newline at end of file +ko-KR: + <<: *KO \ No newline at end of file diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml index d05b945472c..3d658abf06a 100644 --- a/docs/_data/navigation.yml +++ b/docs/_data/navigation.yml @@ -34,6 +34,8 @@ docs-en: url: /docs/en/logo-and-favicon - title: Authors url: /docs/en/authors + - title: Internationalization + url: /docs/en/i18n - title: Content children: - title: Writing Posts @@ -89,6 +91,8 @@ docs-zh: url: /docs/zh/logo-and-favicon - title: 作者 url: /docs/zh/authors + - title: 国际化 + url: /docs/zh/i18n - title: 内容 children: - title: 撰写博客 diff --git a/docs/_docs/en/2.1-configuration.md b/docs/_docs/en/2.1-configuration.md index 86fb2002c68..cf57309d055 100644 --- a/docs/_docs/en/2.1-configuration.md +++ b/docs/_docs/en/2.1-configuration.md @@ -89,14 +89,7 @@ description: > # this means to ignore newlines until "nav_lists:" ### Language -The language of your site, you can override it with different ones on specific posts, pages by YAML Front Matter[^font_matter]. - -| Name | Language | -| --- | --- | -| **en** | English(default) | -| **zh** | Simplified Chinese, 简体中文 | -| **zh-Hans** | Simplified Chinese, 简体中文 | -| **zh-Hant** | Traditional Chinese, 繁體中文 | +The language of your site, you can override it with different ones on specific posts, pages by YAML Front Matter[^font_matter], learn more at [Internationalization](https://tianqi.name/jekyll-TeXt-theme/docs/en/i18n). ```yaml lang: en diff --git a/docs/_docs/en/2.3-layouts.md b/docs/_docs/en/2.3-layouts.md index 91ece86d6ca..f41ca732efc 100644 --- a/docs/_docs/en/2.3-layouts.md +++ b/docs/_docs/en/2.3-layouts.md @@ -128,7 +128,7 @@ Base on Page Layout. | Variable | Option Values | Description | | --- | --- | --- | | **data_source** | `!!str` | You can set it as a collections name, then the page will show the article list of this collections. You can refer to [Collections](https://jekyllrb.com/docs/collections/) to learn more about collections. | -| **type** | item, brief, grid | TeXt supports 3 article list type with various settings, yan can find examples at [Examples](https://tianqi.name/jekyll-TeXt-theme/samples.html#articles-layout). | +| **type** | item, brief, grid | TeXt supports 3 article list type with various settings, yan can find examples [HERE](https://tianqi.name/jekyll-TeXt-theme/samples.html#articles-layout). | | **size** | md, sm | Available when type is `grid`. | | **article_type** | BlogPosting | Available when type is `normal`. | | **show_cover** | true (default), false | Available when type is `normal`. Before set it to `true`, you need first set each article a cover image, refer to the `cover` variable in [Page Layout](#page-layout). | diff --git a/docs/_docs/en/2.7-i18n.md b/docs/_docs/en/2.7-i18n.md new file mode 100644 index 00000000000..5867da1d884 --- /dev/null +++ b/docs/_docs/en/2.7-i18n.md @@ -0,0 +1,22 @@ +--- +title: Internationalization +permalink: /docs/en/i18n +key: docs-i18n +--- + +Text for UI elements are grouped together as a set of translation keys in *_data/locale.yml*, this make TeXt easy to support different languages. + +By using `titles`, you can define multi-language name for page, layout and navigator title. TeXt default defined some multi-language name in *_data/navigation*, *_layouts/archive*, *_layouts/home* and *about.md*. + + + +The translation keys and multi-language names mentioned above support the following languages. + +| Language | `lang` | +| --- | --- | +| **English** | en, en-US, en-CA, enGB, en-AU | +| **Simplified Chinese** | zh-Hans, zh, zh-CN, zh-SG | +| **Traditional Chinese** | zh-Hant, zh-TW, zh-HK | +| **Korean** | ko, ko-KR | + +You can see examples for different languages [HERE](https://tianqi.name/jekyll-TeXt-theme/samples.html#languages). \ No newline at end of file diff --git a/docs/_docs/zh/2.1-configuration.md b/docs/_docs/zh/2.1-configuration.md index 892b441d321..d04009cc304 100644 --- a/docs/_docs/zh/2.1-configuration.md +++ b/docs/_docs/zh/2.1-configuration.md @@ -91,14 +91,7 @@ description: > # this means to ignore newlines until "nav_lists:" ### 语言 -网站的语言,当然你可以在头信息[^font_matter]里指定特定的文章或页面的语言。 - -| 名称 | 语言 | -| --- | --- | -| **en** | 英语(English,默认值) | -| **zh** | 简体中文 | -| **zh-Hans** | 简体中文 | -| **zh-Hant** | 繁體中文 | +网站的语言,当然你可以在头信息[^font_matter]里指定特定的文章或页面的语言,你可以在[国际化](https://tianqi.name/jekyll-TeXt-theme/docs/zh/i18n)找到更多信息。 ```yaml lang: en diff --git a/docs/_docs/zh/2.3-layouts.md b/docs/_docs/zh/2.3-layouts.md index 5a6ccfcff73..01c50b33cf6 100644 --- a/docs/_docs/zh/2.3-layouts.md +++ b/docs/_docs/zh/2.3-layouts.md @@ -128,7 +128,7 @@ Base on Page Layout. | 配置项 | 可选值 | 描述 | | --- | --- | --- | | **data_source** | `!!str` | 如果你将将集合名设置为该项的值,该页面将会展示这个集合下的文章列表。你可以在 [Collections](https://jekyllrb.com/docs/collections/) 找到更多关于集合的信息。 | -| **type** | item, brief, grid | TeXt 支持三种文章列表类型,每种类型都对应着一些配置,你可以在 [Examples](https://tianqi.name/jekyll-TeXt-theme/samples.html#articles-layout) 看到相关的示例。 | +| **type** | item, brief, grid | TeXt 支持三种文章列表类型,每种类型都对应着一些配置,你可以在[这里](https://tianqi.name/jekyll-TeXt-theme/samples.html#articles-layout)看到相关的示例。 | | **size** | md, sm | 当 type 为 `grid` 时有效。 | | **article_type** | BlogPosting | 当 type 为 `normal` 时有效。 | | **show_cover** | true (default), false | 当 type 为 `normal` 时有效。 在设置改参数为 `true` 前,你需要给集合里的每篇文章设置封面, 参考 [Page 布局](#page-layout)的 `cover` 配置项。 | @@ -169,7 +169,7 @@ articles: | 配置项 | 可选值 | 描述 | | --- | --- | --- | -| **data** | `!!map` | | +| **data** | `!!map` | | ## 404 布局 diff --git a/docs/_docs/zh/2.7-i18n.md b/docs/_docs/zh/2.7-i18n.md new file mode 100644 index 00000000000..43b205dbfc1 --- /dev/null +++ b/docs/_docs/zh/2.7-i18n.md @@ -0,0 +1,22 @@ +--- +title: Internationalization +permalink: /docs/zh/i18n +key: docs-i18n-zh +--- + +TeXt 把 UI 元素的文字整理成一系列的翻译标识统一的放置在 *_data/locale.yml* 中,这样能够比较方便添加不同语言的支持。 + +通过 `titles` 配置项可以给文章,布局和导航定义定义多语言标题,TeXt 默认定义了很多这样的标题,它们分别位于 *_data/navigation*,*_layouts/archive*,*_layouts/home* 和 *about.md* 中。 + + + +上文所提到的翻译标识和多语言标题支持以下语言。 + +| 语言 | `lang` | +| --- | --- | +| **英语** | en, en-US, en-CA, enGB, en-AU | +| **简体中文** | zh-Hans, zh, zh-CN, zh-SG | +| **繁体中文** | zh-Hant, zh-TW, zh-HK | +| **韩语** | ko, ko-KR | + +你可以在[这里](https://tianqi.name/jekyll-TeXt-theme/samples.html#languages)找到不同语言的示例。 \ No newline at end of file diff --git a/docs/_languages/1-english.md b/docs/_languages/1-english.md index 9e27ed0ae81..28433d1c86f 100644 --- a/docs/_languages/1-english.md +++ b/docs/_languages/1-english.md @@ -6,13 +6,16 @@ cover: /docs/assets/images/languages/lang-en.jpg lang: en --- -English is the default language of TeXt, if you set `lang` in *_config.yml* to the other language but want make the page English, just set `lang: en` in the front matter. +English. -**front matter:** +*_config.yml*: --- - ... lang: en + lang: en-US + lang: en-CA + lang: en-GB + lang: en-AU --- \ No newline at end of file diff --git a/docs/_languages/2-chinese-simplified.md b/docs/_languages/2-chinese-simplified.md index d30fc0a0040..086f5c05839 100644 --- a/docs/_languages/2-chinese-simplified.md +++ b/docs/_languages/2-chinese-simplified.md @@ -13,7 +13,7 @@ article_header: src: /docs/assets/images/languages/lang-image-zh-hans.jpg --- -在 *_config.yml* 或者头信息里设置 `lang: zh-Hans` 或 `lang: zh` 后,主题文字变为简体中文。 +简体中文。 @@ -23,16 +23,13 @@ article_header: } -**front matter:** +*_config.yml*: --- - ... lang: zh-Hans - --- -^ - --- - ... lang: zh + lang: zh-CN + lang: zh-SG ---
diff --git a/docs/_languages/3-chinese-traditional.md b/docs/_languages/3-chinese-traditional.md index ca695436896..6eac27b89db 100644 --- a/docs/_languages/3-chinese-traditional.md +++ b/docs/_languages/3-chinese-traditional.md @@ -13,7 +13,7 @@ article_header: src: /docs/assets/images/languages/lang-image-zh-hant.jpg --- -在 *_config.yml* 或者頭信息裏設置 `lang: zh-Hant` 後,主題文字變為繁體中文。 +繁體中文。 @@ -23,11 +23,12 @@ article_header: } -**front matter:** +*_config.yml*: --- - ... lang: zh-Hant + lang: zh-TW + lang: zh-HK ---
diff --git a/docs/_languages/4-korean.md b/docs/_languages/4-korean.md new file mode 100644 index 00000000000..762c2647340 --- /dev/null +++ b/docs/_languages/4-korean.md @@ -0,0 +1,18 @@ +--- +title: 한국어 (Korean) +key: lang-ko +permalink: /languages/korean.html +cover: /docs/assets/images/languages/lang-ko.jpg +lang: ko +--- + +한국어. + + + +*_config.yml*: + + --- + lang: ko + lang: ko-KR + --- \ No newline at end of file diff --git a/docs/assets/images/languages/lang-ko.jpg b/docs/assets/images/languages/lang-ko.jpg new file mode 100644 index 00000000000..80fbba1ac93 Binary files /dev/null and b/docs/assets/images/languages/lang-ko.jpg differ diff --git a/docs/samples.html b/docs/samples.html index 95f109eed94..0485351416f 100644 --- a/docs/samples.html +++ b/docs/samples.html @@ -16,6 +16,6 @@

Languages

- {%- include article-list.html articles=site.languages type='grid' -%} + {%- include article-list.html articles=site.languages type='grid' size='sm' -%}
\ No newline at end of file diff --git a/test/_config.yml b/test/_config.yml index 133f1fc4bd7..accd3a8d26c 100644 --- a/test/_config.yml +++ b/test/_config.yml @@ -28,7 +28,7 @@ description: > # this means to ignore newlines until "Language & timezone" ## => Language and Timezone ############################## -lang: # the language of your site, "en" (default, English), "zh"(简体中文), "zh-Hans"(简体中文), "zh-Hant"(繁體中文) +lang: # the language of your site, default as "en" timezone: # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the available values diff --git a/test/_data/locale.yml b/test/_data/locale.yml index aa42bee7020..b328976d6c0 100644 --- a/test/_data/locale.yml +++ b/test/_data/locale.yml @@ -1,91 +1,103 @@ -SUBSCRIBE: - en: "Subscribe" - zh: "订阅" - zh-Hans: "订阅" - zh-Hant: "訂閱" +## => Engish +######################## +en: &EN + SUBSCRIBE : "Subscribe" + READMORE : "Read more" + SEARCH : "Search" + CANCEL : "Cancel" + VIEWS : "views" + LAST_UPDATED : "Last updated" + PREVIOUS : "PREVIOUS" + NEXT : "NEXT" + ARTICLE_DATE_FORMAT : "%b %d, %Y" + ARTICLE_LIST_DATE_FORMAT: "%b %d" + STATISTICS : "[POST_COUNT] post articles, [PAGE_COUNT] pages." + LICENSE_ANNOUNCE : "This work is licensed under a [LICENSE] license." + POST_ON_GITHUB : "Edit on Github" + FOLLOW_ME : "Follow me on [NAME]." + EMAIL_ME : "Send me Email." + COPYRIGHT_DATES : "2019" -READMORE: - en: "Read more" - zh: "阅读更多" - zh-Hans: "阅读更多" - zh-Hant: "閱讀更多" +en-US: + <<: *EN +en-CA: + <<: *EN +en-GB: + <<: *EN +en-AU: + <<: *EN -SEARCH: - en: "Search" - zh: "搜索" - zh-Hans: "搜索" - zh-Hant: "搜索" +## => Simplified Chinese +######################## +zh-Hans: &ZH_HANS + SUBSCRIBE : "订阅" + READMORE : "阅读更多" + SEARCH : "搜索" + CANCEL : "取消" + VIEWS : "阅读" + LAST_UPDATED : "更新于" + PREVIOUS : "上篇" + NEXT : "下篇" + ARTICLE_DATE_FORMAT : "%Y年 %m月%d日" + ARTICLE_LIST_DATE_FORMAT: "%m月%d日" + STATISTICS : "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。" + LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 许可协议。" + POST_ON_GITHUB : "在 Github 上修改" + FOLLOW_ME : "在 [NAME] 上关注我。" + EMAIL_ME : "给我发邮件。" + COPYRIGHT_DATES : "2019" -CANCEL: - en: "Cancel" - zh: "取消" - zh-Hans: "取消" - zh-Hant: "取消" +zh: + <<: *ZH_HANS +zh-CN: + <<: *ZH_HANS +zh-SG: + <<: *ZH_HANS -VIEWS: - en: "views" - zh: "阅读" - zh-Hans: "阅读" - zh-Hant: "閱讀" +## => Traditional Chinese +######################## +zh-Hant: &ZH_HANT + SUBSCRIBE : "訂閱" + READMORE : "閱讀更多" + SEARCH : "搜索" + CANCEL : "取消" + VIEWS : "閱讀" + LAST_UPDATED : "更新於" + PREVIOUS : "上篇" + NEXT : "下篇" + ARTICLE_DATE_FORMAT : "%Y年 %m月%d日" + ARTICLE_LIST_DATE_FORMAT: "%m月%d日" + STATISTICS : "共計 [POST_COUNT] 篇文章,[PAGE_COUNT] 頁。" + LICENSE_ANNOUNCE : "本文遵守 [LICENSE] 許可協議。" + POST_ON_GITHUB : "在 Github 上修改" + FOLLOW_ME : "在 [NAME] 上關注我。" + EMAIL_ME : "給我發郵件。" + COPYRIGHT_DATES : "2019" -LAST_UPDATED: - en: "Last updated" - zh: "更新于" - zh-Hans: "更新于" - zh-Hant: "更新於" +zh-TW: + <<: *ZH_HANT +zh-HK: + <<: *ZH_HANT -PREVIOUS: - en: "PREVIOUS" - zh: "上篇" - zh-Hans: "上篇" - zh-Hant: "上篇" +## => Korean +######################## +ko: &KO + SUBSCRIBE : "등록" + READMORE : "더보기" + SEARCH : "검색" + CANCEL : "취소" + VIEWS : "조회" + LAST_UPDATED : "마지막 수정" + PREVIOUS : "이전" + NEXT : "다음" + ARTICLE_DATE_FORMAT : "%Y년 %m월 %d일" + ARTICLE_LIST_DATE_FORMAT: "%m월 %d일" + STATISTICS : "전체 글 [POST_COUNT]개, [PAGE_COUNT] 페이지" + LICENSE_ANNOUNCE : "이 글의 저작권은 [LICENSE] 라이센스를 따릅니다." + POST_ON_GITHUB : "Github에서 확인하기" + FOLLOW_ME : "[NAME]에서 팔로우하기" + EMAIL_ME : "이메일 보내기" + COPYRIGHT_DATES : "2019" -NEXT: - en: "NEXT" - zh: "下篇" - zh-Hans: "下篇" - zh-Hant: "下篇" - -ARTICLE_DATE_FORMAT: - en: "%b %d, %Y" - zh: "%Y年 %m月%d日" - zh-Hans: "%Y年 %m月%d日" - zh-Hant: "%Y年 %m月%d日" - -ARTICLE_LIST_DATE_FORMAT: - en: "%b %d" - zh: "%m月%d日" - zh-Hans: "%m月%d日" - zh-Hant: "%m月%d日" - -STATISTICS: - en: "[POST_COUNT] post articles, [PAGE_COUNT] pages." - zh: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。" - zh-Hans: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。" - zh-Hant: "共計 [POST_COUNT] 篇文章,[PAGE_COUNT] 頁。" - -LICENSE_ANNOUNCE: - en: "This work is licensed under a [LICENSE] license." - zh: "本文遵守 [LICENSE] 许可协议。" - zh-Hans: "本文遵守 [LICENSE] 许可协议。" - zh-Hant: "本文遵守 [LICENSE] 許可協議。" - -POST_ON_GITHUB: - en: "Edit on Github" - zh: "在 Github 上修改" - zh-Hans: "在 Github 上修改" - zh-Hant: "在 Github 上修改" - -FOLLOW_ME: - en: "Follow me on [NAME]." - zh: "在 [NAME] 上关注我。" - zh-Hans: "在 [NAME] 上关注我。" - zh-Hant: "在 [NAME] 上關注我。" - -EMAIL_ME: - en: "Send me Email." - zh: "给我发邮件。" - zh-Hans: "给我发邮件。" - zh-Hant: "給我發郵件。" - -COPYRIGHT_DATES: "2019" +ko-KR: + <<: *KO \ No newline at end of file diff --git a/test/_data/navigation.yml b/test/_data/navigation.yml index a66e0e679af..db3913739fe 100644 --- a/test/_data/navigation.yml +++ b/test/_data/navigation.yml @@ -1,13 +1,34 @@ header: - titles: - en: Archive - zh: 归档 - zh-Hans: 归档 - zh-Hant: 歸檔 - url: /archive.html + en : &EN Archive + en-US : *EN + en-CA : *EN + en-GB : *EN + en-AU : *EN + zh-Hans : &ZH_HANS 归档 + zh : *ZH_HANS + zh-CN : *ZH_HANS + zh-SG : *ZH_HANS + zh-Hant : &ZH_HANT 歸檔 + zh-TW : *ZH_HANT + zh-HK : *ZH_HANT + ko : &KO 아카이브 + ko-KR : *KO + url: /archive.html + - titles: - en: About - zh: 关于 - zh-Hans: 关于 - zh-Hant: 關於 - url: /about.html \ No newline at end of file + en : &EN About + en-US : *EN + en-CA : *EN + en-GB : *EN + en-AU : *EN + zh-Hans : &ZH_HANS 关于 + zh : *ZH_HANS + zh-CN : *ZH_HANS + zh-SG : *ZH_HANS + zh-Hant : &ZH_HANT 關於 + zh-TW : *ZH_HANT + zh-HK : *ZH_HANT + ko : &KO 소개 + ko-KR : *KO + url: /about.html diff --git a/test/about.md b/test/about.md index b2bf7823d6e..ae892430777 100644 --- a/test/about.md +++ b/test/about.md @@ -1,10 +1,20 @@ --- layout: article titles: - en: About - zh: 关于 - zh-Hans: 关于 - zh-Hant: 關於 + en : &EN About + en-US : *EN + en-CA : *EN + en-GB : *EN + en-AU : *EN + zh-Hans : &ZH_HANS 关于 + zh : *ZH_HANS + zh-CN : *ZH_HANS + zh-SG : *ZH_HANS + zh-Hant : &ZH_HANT 關於 + zh-TW : *ZH_HANT + zh-HK : *ZH_HANT + ko : &KO 소개 + ko-KR : *KO key: page-about ---