Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-04-16 13:31:06 +0300
committerGitHub <noreply@github.com>2020-04-16 13:31:06 +0300
commit6112b510bfc0d6b0638d45c7541aac4c9ae5d9d2 (patch)
treef489720cb63d457b5a4cbd4390982708aefff7c6
parent6dcb8ce338d98cb844cf868b0719e712cd6984f3 (diff)
chore(i18n): update Polish and docs (#234)
-rw-r--r--README.md14
-rw-r--r--README.zh-cn.md14
-rw-r--r--exampleSite/config.toml4
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.en.md24
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.fr.md24
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.zh-cn.md26
-rw-r--r--i18n/pl.toml42
-rw-r--r--package-lock.json6
8 files changed, 117 insertions, 37 deletions
diff --git a/README.md b/README.md
index bec2060..61060ad 100644
--- a/README.md
+++ b/README.md
@@ -5,9 +5,9 @@
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
[![CircleCI](https://img.shields.io/circleci/build/github/dillonzq/LoveIt/develop?label=CI&style=flat-square&logo=circleci)](https://app.circleci.com/pipelines/github/dillonzq/LoveIt)
-English README | [中文说明](https://github.com/dillonzq/LoveIt/blob/master/README.zh-cn.md)
+English README | [简体中文说明](https://github.com/dillonzq/LoveIt/blob/master/README.zh-cn.md)
-**LoveIt** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
+> **LoveIt** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt/) and [KeepIt Theme](https://github.com/liuzc/LeaveIt/).
@@ -117,6 +117,16 @@ I hope you will LoveIt ❤️!
hugo server --source=exampleSite
```
+## Multilingual and i18n
+
+LoveIt supports the following languages:
+
+* English
+* Simplified Chinese
+* French
+* Polish
+* [Contribute with a new language](https://github.com/dillonzq/LoveIt/pulls)
+
## Questions, ideas, bugs, pull requests
All feedback is welcome! Head over to the [issue tracker](https://github.com/dillonzq/LoveIt/issues).
diff --git a/README.zh-cn.md b/README.zh-cn.md
index 539806a..2f6b7ef 100644
--- a/README.zh-cn.md
+++ b/README.zh-cn.md
@@ -5,9 +5,9 @@
[![License](https://img.shields.io/github/license/dillonzq/LoveIt?style=flat-square)](https://github.com/dillonzq/LoveIt/blob/master/LICENSE)
[![CircleCI](https://img.shields.io/circleci/build/github/dillonzq/LoveIt/develop?label=CI&style=flat-square&logo=circleci)](https://app.circleci.com/pipelines/github/dillonzq/LoveIt)
-[English README](https://github.com/dillonzq/LoveIt/blob/master/README.md) | 中文说明
+[English README](https://github.com/dillonzq/LoveIt/blob/master/README.md) | 简体中文说明
-[LoveIt](https://github.com/dillonzq/LoveIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
+> [LoveIt](https://github.com/dillonzq/LoveIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LeaveIt 主题](https://github.com/liuzc/LeaveIt/) 和 [KeepIt 主题](https://github.com/liuzc/LeaveIt/)。
@@ -112,6 +112,16 @@
hugo server --source=exampleSite
```
+## 多语言和国际化
+
+LoveIt 支持下列语言:
+
+* 英语
+* 简体中文
+* 法语
+* 波兰语
+* [贡献一种新的语言](https://github.com/dillonzq/LoveIt/pulls)
+
## 问题、想法、 bugs 和 PRs
所有的反馈都是欢迎的!详见 [issue tracker](https://github.com/dillonzq/LoveIt/issues)。
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index c1fd9db..d85f048 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,6 +1,6 @@
baseURL = "https://example.com"
-# [en, zh-cn, fr, ...] determines default content language
-# [en, zh-cn, fr, ...] 设置默认的语言
+# [en, zh-cn, fr, pl, ...] determines default content language
+# [en, zh-cn, fr, pl, ...] 设置默认的语言
defaultContentLanguage = "en"
# theme
# 主题
diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md
index 317b4cf..52a3dac 100644
--- a/exampleSite/content/posts/theme-documentation-basics.en.md
+++ b/exampleSite/content/posts/theme-documentation-basics.en.md
@@ -633,23 +633,29 @@ In `config/css/_custom.scss`, you can add some css style code to customize the s
## 4 Multilingual and i18n
-**LoveIt** theme is fully compatible with Hugo multilingual mode.
+**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
-It provides:
+![Language Switch](/images/theme-documentation-basics/language-switch.gif "Language Switch")
-* Translation strings for default values (**English**, **Chinese** and **French**). **Feel free to contribute!**
-* In-browser language switching
+### 4.1 Compatibility {#language-compatibility}
-![Language Switch](/images/theme-documentation-basics/language-switch.gif "Language Switch")
+| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support |
+|:------------------ |:---------:|:---------------------:|:-----------------------:|:-----------------------:|
+| English | `en` | `en` | :(far fa-check-square): | :(far fa-check-square): |
+| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square): | :(far fa-check-square): |
+| French | `fr` | `fr` | :(far fa-square): | :(far fa-check-square): |
+| Polish | `pl` | `pl` | :(far fa-square): | :(far fa-square): |
-### 4.1 Basic Configuration
+:(far fa-kiss-wink-heart): **Feel free to [contribute](https://github.com/dillonzq/LoveIt/pulls)!**
+
+### 4.2 Basic Configuration
After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your [site configuration](#site-configuration).
For example with English, Chinese and French website:
```toml
-# [en, zh-cn, fr, ...] determines default content language
+# [en, zh-cn, fr, pl, ...] determines default content language
defaultContentLanguage = "en"
[languages]
@@ -754,9 +760,9 @@ Be aware that only translated pages are displayed in menu. It’s not replaced w
Use [Front Matter parameter](https://gohugo.io/content-management/multilingual/#translate-your-content) to translate urls too.
{{< /admonition >}}
-### 4.2 Overwrite Translation Strings
+### 4.3 Overwrite Translation Strings
-Translations strings are used for common default values used in the theme. Translations are available in **English**, **Chinese** and **French**, but you may use another language or want to override default values.
+Translations strings are used for common default values used in the theme. Translations are available in [some languages](#language-compatibility), but you may use another language or want to override default values.
To override these values, create a new file in your local i18n folder `i18n/<languageCode>.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`.
diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md
index 7d2bbbb..3fbaadf 100644
--- a/exampleSite/content/posts/theme-documentation-basics.fr.md
+++ b/exampleSite/content/posts/theme-documentation-basics.fr.md
@@ -638,23 +638,29 @@ In `config/css/_custom.scss`, you can add some css style code to customize the s
## 4 Multilingual and i18n
-**LoveIt** theme is fully compatible with Hugo multilingual mode.
+**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
-It provides:
+![Language Switch](/images/theme-documentation-basics/language-switch.gif "Language Switch")
-* Translation strings for default values (**English**, **Chinese** and **French**). **Feel free to contribute!**
-* In-browser language switching
+### 4.1 Compatibility {#language-compatibility}
-![Language Switch](/images/theme-documentation-basics/language-switch.gif "Language Switch")
+| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support |
+|:------------------ |:---------:|:---------------------:|:-----------------------:|:-----------------------:|
+| English | `en` | `en` | :(far fa-check-square): | :(far fa-check-square): |
+| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square): | :(far fa-check-square): |
+| French | `fr` | `fr` | :(far fa-square): | :(far fa-check-square): |
+| Polish | `pl` | `pl` | :(far fa-square): | :(far fa-square): |
-### 4.1 Basic Configuration
+:(far fa-kiss-wink-heart): **Feel free to [contribute](https://github.com/dillonzq/LoveIt/pulls)!**
+
+### 4.2 Basic Configuration
After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your [site configuration](#site-configuration).
For example with English, Chinese and French website:
```toml
-# [en, zh-cn, fr, ...] determines default content language
+# [en, zh-cn, fr, pl, ...] determines default content language
defaultContentLanguage = "en"
[languages]
@@ -759,9 +765,9 @@ Be aware that only translated pages are displayed in menu. It’s not replaced w
Use [Front Matter parameter](https://gohugo.io/content-management/multilingual/#translate-your-content) to translate urls too.
{{< /admonition >}}
-### 4.2 Overwrite Translation Strings
+### 4.3 Overwrite Translation Strings
-Translations strings are used for common default values used in the theme. Translations are available in **English**, **Chinese** and **French**, but you may use another language or want to override default values.
+Translations strings are used for common default values used in the theme. Translations are available in [some languages](#language-compatibility), but you may use another language or want to override default values.
To override these values, create a new file in your local i18n folder `i18n/<languageCode>.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`.
diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
index d650424..17359ff 100644
--- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
+++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
@@ -635,23 +635,29 @@ $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospac
## 4 多语言和 i18n
-**LoveIt** 主题完全兼容 Hugo 的多语言模式.
+**LoveIt** 主题完全兼容 Hugo 的多语言模式, 并且支持在网页上切换语言.
-支持:
+![语言切换](/images/theme-documentation-basics/language-switch.gif "语言切换")
-* 多种语言的翻译字符串 (**英语**, **中文**和**法语**). **欢迎贡献!**
-* 在浏览器内语言切换
+### 4.1 兼容性 {#language-compatibility}
-![语言切换](/images/theme-documentation-basics/language-switch.gif "语言切换")
+| 语言 | Hugo 代码 | HTML `lang` 属性 | 主题文档 | Lunr.js 支持 |
+|:---- |:----:|:----:|:----:|:----:|
+| 英语 | `en` | `en` | :(far fa-check-square): | :(far fa-check-square): |
+| 简体中文 | `zh-cn` | `zh-CN` | :(far fa-check-square): | :(far fa-check-square): |
+| 法语 | `fr` | `fr` | :(far fa-square): | :(far fa-check-square): |
+| 波兰语 | `pl` | `pl` | :(far fa-square): | :(far fa-square): |
-### 4.1 基本配置
+:(far fa-kiss-wink-heart): **请自由地[贡献代码](https://github.com/dillonzq/LoveIt/pulls)!**
+
+### 4.2 基本配置
学习了 [Hugo如何处理多语言网站](https://gohugo.io/content-management/multilingual) 之后, 请在 [站点配置](#site-configuration) 中定义你的网站语言.
例如, 一个支持英语, 中文和法语的网站配置:
```toml
-# [en, zh-cn, fr, ...] 设置默认的语言
+# [en, zh-cn, fr, pl, ...] 设置默认的语言
defaultContentLanguage = "zh-cn"
[languages]
@@ -756,12 +762,12 @@ defaultContentLanguage = "zh-cn"
也可以使用 [文章前置参数](https://gohugo.io/content-management/multilingual/#translate-your-content) 来翻译网址.
{{< /admonition >}}
-### 4.2 修改默认的翻译字符串
+### 4.3 修改默认的翻译字符串
翻译字符串用于在主题中使用的常见默认值.
-目前提供**英语**, **中文**和**法语**翻译, 但你可能自定义其他语言或覆盖默认值.
+目前提供[一些语言](#language-compatibility)的翻译, 但你可能自定义其他语言或覆盖默认值.
-要覆盖默认值, 请在项目的 i18n 目录 `i18n/<languageCode>.toml` 中创建一个新文件,并从 `themes/LoveIt/i18n/en.toml` 中获得提示.
+要覆盖默认值, 请在你项目的 i18n 目录 `i18n/<languageCode>.toml` 中创建一个新文件,并从 `themes/LoveIt/i18n/en.toml` 中获得提示.
另外, 由于你的翻译可能会帮助到其他人, 请花点时间通过 [创建一个 PR](https://github.com/dillonzq/LoveIt/pulls) 来贡献主题翻译, 谢谢!
diff --git a/i18n/pl.toml b/i18n/pl.toml
index 07ab6ef..3b66112 100644
--- a/i18n/pl.toml
+++ b/i18n/pl.toml
@@ -1,6 +1,14 @@
# Translations for Polish
# https://gohugo.io/content-management/multilingual/#translation-of-strings
+# === baseof ==
+[backToTop]
+other = "Powrót do góry"
+
+[viewComments]
+other = "Zobacz komentarze"
+# === baseof ==
+
# === Post ===
[posts]
other = "Posty"
@@ -32,6 +40,21 @@ other = "Więcej"
[selectLanguage]
other = "Wybierz język"
+[search]
+other = "Szukaj"
+
+[searchPlaceholder]
+other = "Wyszukaj tytuł lub treść artykułu ..."
+
+[clear]
+other = "Pusty"
+
+[cancel]
+other = "Anuluj"
+
+[noResultsFound]
+other = "Nie znaleziono wyników"
+
[switchTheme]
other = "Przełącz schemat"
# === partials/header.html ===
@@ -44,6 +67,14 @@ other = "Napędzany przez %s"
other = "Szablon"
# === partials/footer.html ===
+# === partials/assets.html ===
+[lunrLanguageLib]
+other = "lib/lunr/lunr.pl.js"
+
+[lunrLanguageCode]
+other = "pl"
+# === partials/assets.html ===
+
# === partials/plugin/share.html ===
[shareOn]
other = "Udostępnij na"
@@ -138,3 +169,14 @@ other = "Przykład"
[quote]
other = "Cytat"
# === shortcodes/admonition.html ===
+
+# === shortcodes/version.html ===
+[new]
+other = "Dodano"
+
+[changed]
+other = "Zmieniono"
+
+[deleted]
+other = "Usunięte"
+# === shortcodes/version.html ===
diff --git a/package-lock.json b/package-lock.json
index 4802deb..e5533ee 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2872,9 +2872,9 @@
},
"dependencies": {
"minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true,
"optional": true
}