Skip to content

Commit

Permalink
feat: add french locale
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Oct 6, 2019
1 parent b1a23d6 commit b650991
Show file tree
Hide file tree
Showing 17 changed files with 145 additions and 19 deletions.
6 changes: 4 additions & 2 deletions _data/locale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## => Engish
# @start locale config
## => English
########################
en: &EN
SUBSCRIBE : "Subscribe"
Expand Down Expand Up @@ -142,4 +143,5 @@ fr-CH:
fr-FR:
<<: *FR
fr-LU:
<<: *FR
<<: *FR
# @end locale config
16 changes: 16 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
header:
- titles:
# @start locale config
en : &EN Archive
en-GB : *EN
en-US : *EN
Expand All @@ -14,9 +15,17 @@ header:
zh-HK : *ZH_HANT
ko : &KO 아카이브
ko-KR : *KO
fr : &FR Archives
fr-BE : *FR
fr-CA : *FR
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
url: /archive.html

- titles:
# @start locale config
en : &EN About
en-GB : *EN
en-US : *EN
Expand All @@ -31,4 +40,11 @@ header:
zh-HK : *ZH_HANT
ko : &KO 소개
ko-KR : *KO
fr : &KO À propos
fr-BE : *FR
fr-CA : *FR
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
url: /about.html
2 changes: 2 additions & 0 deletions _layouts/archive.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: page
titles:
# @start locale config
en : &EN Archive
en-GB : *EN
en-US : *EN
Expand All @@ -21,6 +22,7 @@
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
---

<div class="layout--archive js-all">
Expand Down
2 changes: 2 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: articles
titles:
# @start locale config
en : &EN Home
en-GB : *EN
en-US : *EN
Expand All @@ -21,6 +22,7 @@
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
show_title: false
articles:
data_source: paginator.posts
Expand Down
2 changes: 2 additions & 0 deletions about.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: article
titles:
# @start locale config
en : &EN About
en-GB : *EN
en-US : *EN
Expand All @@ -21,6 +22,7 @@ titles:
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
key: page-about
---

Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ description: >
## => Language and Timezone
##############################
lang: en # the language of your site, default as "en"
lang: fr # the language of your site, default as "en"
timezone: Asia/Shanghai


Expand Down
40 changes: 38 additions & 2 deletions docs/_data/locale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## => Engish
# @start locale config
## => English
########################
en: &EN
SUBSCRIBE : "Subscribe"
Expand Down Expand Up @@ -108,4 +109,39 @@ ko: &KO
COPYRIGHT_DATES : "2019"

ko-KR:
<<: *KO
<<: *KO

## => French
########################
fr: &FR
SUBSCRIBE : "S'abonner"
READMORE : "Plus"
SEARCH : "Recherche"
CANCEL : "Annuler"
VIEWS : "vues"
LAST_UPDATED : "Dernière modification"
PREVIOUS : "PRÉCÉDENT"
NEXT : "SUIVANT"
ARTICLE_DATE_FORMAT : "%d %b, %Y"
ARTICLE_LIST_DATE_FORMAT: "%d %b"
STATISTICS : "[POST_COUNT] articles, [PAGE_COUNT] pages."
LICENSE_ANNOUNCE : "Ce travail est sous licence [LICENSE]."
POST_ON_GITHUB : "Modifier sur Github"
FOLLOW_ME : "Suivez-moi sur [NAME]."
FOLLOW_US : "Suivez-nous sur [NAME]."
EMAIL_ME : "Envoyez-moi un courriel."
EMAIL_US : "Envoyez-nous un courriel"
COPYRIGHT_DATES : "2019"
DONATE : "Faites un don de [NAME]."

fr-BE:
<<: *FR
fr-CA:
<<: *FR
fr-CH:
<<: *FR
fr-FR:
<<: *FR
fr-LU:
<<: *FR
# @end locale config
2 changes: 1 addition & 1 deletion docs/_sample_languages/1-english.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ lang: en-GB
lang: en-US
lang: en-CA
lang: en-AU
```
```
2 changes: 1 addition & 1 deletion docs/_sample_languages/2-chinese-simplified.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ lang: zh-SG
> 窈窕淑女,君子好逑。
>
> ——《诗经·国风·周南·关雎》
<div>
<div>
2 changes: 1 addition & 1 deletion docs/_sample_languages/3-chinese-traditional.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ lang: zh-HK
> 窈窕淑女,君子好逑。
>
> ——《詩經·國風·周南·關雎》
</div>
</div>
2 changes: 1 addition & 1 deletion docs/_sample_languages/4-korean.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ lang: ko
```yml
lang: ko
lang: ko-KR
```
```
22 changes: 22 additions & 0 deletions docs/_sample_languages/5-french.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Français (French)
key: lang-fr
permalink: /languages/french.html
cover: /docs/assets/images/languages/lang-fr.jpg
lang: fr
---

Français.

<!--more-->

*_config.yml* or front matter:

```yml
lang: fr
lang: fr-BE
lang: fr-CA
lang: fr-CH
lang: fr-FR
lang: fr-LU
```
Binary file added docs/assets/images/languages/lang-fr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions test/404.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
layout: 404
title: 404
show_title: false
---
40 changes: 38 additions & 2 deletions test/_data/locale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## => Engish
# @start locale config
## => English
########################
en: &EN
SUBSCRIBE : "Subscribe"
Expand Down Expand Up @@ -108,4 +109,39 @@ ko: &KO
COPYRIGHT_DATES : "2019"

ko-KR:
<<: *KO
<<: *KO

## => French
########################
fr: &FR
SUBSCRIBE : "S'abonner"
READMORE : "Plus"
SEARCH : "Recherche"
CANCEL : "Annuler"
VIEWS : "vues"
LAST_UPDATED : "Dernière modification"
PREVIOUS : "PRÉCÉDENT"
NEXT : "SUIVANT"
ARTICLE_DATE_FORMAT : "%d %b, %Y"
ARTICLE_LIST_DATE_FORMAT: "%d %b"
STATISTICS : "[POST_COUNT] articles, [PAGE_COUNT] pages."
LICENSE_ANNOUNCE : "Ce travail est sous licence [LICENSE]."
POST_ON_GITHUB : "Modifier sur Github"
FOLLOW_ME : "Suivez-moi sur [NAME]."
FOLLOW_US : "Suivez-nous sur [NAME]."
EMAIL_ME : "Envoyez-moi un courriel."
EMAIL_US : "Envoyez-nous un courriel"
COPYRIGHT_DATES : "2019"
DONATE : "Faites un don de [NAME]."

fr-BE:
<<: *FR
fr-CA:
<<: *FR
fr-CH:
<<: *FR
fr-FR:
<<: *FR
fr-LU:
<<: *FR
# @end locale config
16 changes: 16 additions & 0 deletions test/_data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
header:
- titles:
# @start locale config
en : &EN Archive
en-GB : *EN
en-US : *EN
Expand All @@ -14,9 +15,17 @@ header:
zh-HK : *ZH_HANT
ko : &KO 아카이브
ko-KR : *KO
fr : &FR Archives
fr-BE : *FR
fr-CA : *FR
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
url: /archive.html

- titles:
# @start locale config
en : &EN About
en-GB : *EN
en-US : *EN
Expand All @@ -31,4 +40,11 @@ header:
zh-HK : *ZH_HANT
ko : &KO 소개
ko-KR : *KO
fr : &KO À propos
fr-BE : *FR
fr-CA : *FR
fr-CH : *FR
fr-FR : *FR
fr-LU : *FR
# @end locale config
url: /about.html
6 changes: 0 additions & 6 deletions test/archive.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
layout: archive
titles:
en: All Posts
zh: 归档
zh-Hans: 归档
zh-Hant: 歸檔
show_title: false
---

0 comments on commit b650991

Please sign in to comment.