From 82ef62654f58eb6212fad1beb3adb2c1c979fb56 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sat, 10 Feb 2024 23:44:10 +0000 Subject: add pt, de, fr, ja and zh translations --- resources/de/base.ftl | 9 +++++++++ resources/de/contact.ftl | 9 +++++++++ resources/de/home.ftl | 13 +++++++++++++ resources/en/contact.ftl | 2 +- resources/en/home.ftl | 2 +- resources/fr/base.ftl | 9 +++++++++ resources/fr/contact.ftl | 9 +++++++++ resources/fr/home.ftl | 13 +++++++++++++ resources/ja/base.ftl | 9 +++++++++ resources/ja/contact.ftl | 9 +++++++++ resources/ja/home.ftl | 13 +++++++++++++ resources/pt/base.ftl | 9 +++++++++ resources/pt/contact.ftl | 9 +++++++++ resources/pt/home.ftl | 13 +++++++++++++ resources/zh/base.ftl | 9 +++++++++ resources/zh/contact.ftl | 9 +++++++++ resources/zh/home.ftl | 13 +++++++++++++ src/main.rs | 2 ++ 18 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 resources/de/base.ftl create mode 100644 resources/de/contact.ftl create mode 100644 resources/de/home.ftl create mode 100644 resources/fr/base.ftl create mode 100644 resources/fr/contact.ftl create mode 100644 resources/fr/home.ftl create mode 100644 resources/ja/base.ftl create mode 100644 resources/ja/contact.ftl create mode 100644 resources/ja/home.ftl create mode 100644 resources/pt/base.ftl create mode 100644 resources/pt/contact.ftl create mode 100644 resources/pt/home.ftl create mode 100644 resources/zh/base.ftl create mode 100644 resources/zh/contact.ftl create mode 100644 resources/zh/home.ftl diff --git a/resources/de/base.ftl b/resources/de/base.ftl new file mode 100644 index 0000000..0ca6748 --- /dev/null +++ b/resources/de/base.ftl @@ -0,0 +1,9 @@ +title = celestes festplatte +title-blog = celestes blog +title-poetry = celestes poesie +branch = cherry blossom branch +latest-blogposts = neueste blogbeiträge +random-poem = zufälliges gedicht +filter-by-tags = nach tag filtern +permalink = permalink +untitled = ohne titel diff --git a/resources/de/contact.ftl b/resources/de/contact.ftl new file mode 100644 index 0000000..02f73df --- /dev/null +++ b/resources/de/contact.ftl @@ -0,0 +1,9 @@ +title-contact = kontaktdaten von celeste +name = celeste 🌸 +pronouns = pronomen: sie/ihr +email = e-mail +jabber = jabber +scrobbles = scrobbles +bandcamp-fan = bandcamp fan +languages = sprachen: englisch, portugiesisch, französisch, japanisch, deutsch, chinesisch, latein, toki pona, koreanisch +programming = computerprogrammierung: rust, erlang, go, haskell, webdev, lisp diff --git a/resources/de/home.ftl b/resources/de/home.ftl new file mode 100644 index 0000000..d0bfa68 --- /dev/null +++ b/resources/de/home.ftl @@ -0,0 +1,13 @@ +latest-update = letzte aktualisierung: i18n! +now-playing = aktuelle wiedergabe + +# welcome panel +welcome = +

hallo ich bin celeste willkommen auf meiner seite 🌟

+

hier ich mache die veröffentlichungen

+

ich wünsche ihnen einen wundervollen tag

+
+ +

ständig im bau

+ + diff --git a/resources/en/contact.ftl b/resources/en/contact.ftl index 4b9f2d2..6c55574 100644 --- a/resources/en/contact.ftl +++ b/resources/en/contact.ftl @@ -1,7 +1,7 @@ title-contact = celeste's contact details name = celeste 🌸 pronouns = pronouns: she/her -email = email +email = e-mail jabber = jabber scrobbles = scrobbles bandcamp-fan = bandcamp fan diff --git a/resources/en/home.ftl b/resources/en/home.ftl index 24702ee..2573519 100644 --- a/resources/en/home.ftl +++ b/resources/en/home.ftl @@ -1,4 +1,4 @@ -latest-update = latest update: added poetry! +latest-update = latest update: i18n! now-playing = now playing # welcome panel diff --git a/resources/fr/base.ftl b/resources/fr/base.ftl new file mode 100644 index 0000000..4eef078 --- /dev/null +++ b/resources/fr/base.ftl @@ -0,0 +1,9 @@ +title = disque dur de céleste +title-blog = blog de céleste +title-poetry = poésie de céleste +branch = cherry blossom branch +latest-blogposts = derniers articles du blog +random-poem = poème aléatoire +filter-by-tags = filtrer par balise +permalink = lien permanent +untitled = sans titre diff --git a/resources/fr/contact.ftl b/resources/fr/contact.ftl new file mode 100644 index 0000000..5f28b52 --- /dev/null +++ b/resources/fr/contact.ftl @@ -0,0 +1,9 @@ +title-contact = coordonnées de céleste +name = céleste 🌸 +pronouns = pronom: elle +email = e-mail +jabber = jabber +scrobbles = scrobbles +bandcamp-fan = fan bandcamp +languages = langues (ordre approximatif de compétences): anglais, portugais, français, japonais, allemand, chinois, latin, toki pona, coréen +programming = programmation: rust, erlang, go, haskell, webdev, lisp diff --git a/resources/fr/home.ftl b/resources/fr/home.ftl new file mode 100644 index 0000000..cdee62d --- /dev/null +++ b/resources/fr/home.ftl @@ -0,0 +1,13 @@ +latest-update = dernière actualisation: i18n! +now-playing = lecture en cours + +# welcome panel +welcome = +

salut je suis céleste bienvenueee sur mon site 🌟

+

voici où je fais le postage

+

j'espère que vous passez une magnifique journée

+
+ +

perpétuellement en cours de construction

+ + diff --git a/resources/ja/base.ftl b/resources/ja/base.ftl new file mode 100644 index 0000000..2bfea03 --- /dev/null +++ b/resources/ja/base.ftl @@ -0,0 +1,9 @@ +title = セレストのハードドライブ +title-blog = セレストのブログ +title-poetry = セレストの詩 +branch = cherry blossom branch +latest-blogposts = 最新のブログ投稿 +random-poem = ランダムな詩 +filter-by-tags = タグでフィルタリングする +permalink = パーマリンク +untitled = 無題 diff --git a/resources/ja/contact.ftl b/resources/ja/contact.ftl new file mode 100644 index 0000000..5e415a4 --- /dev/null +++ b/resources/ja/contact.ftl @@ -0,0 +1,9 @@ +title-contact = セレストの連絡先詳細 +name = 🌸セレスト +pronouns = 代名詞: かのじょ +email = メール +jabber = jabber +scrobbles = scrobble +bandcamp-fan = bandcampのファン +languages = 言語: 英語、ポルトガル語、フランス語、日本語、ドイツ語、中国語、ラテン語、トキポナ、韓国語 +programming = プログラミング: rust, erlang, go, haskell, webdev, lisp diff --git a/resources/ja/home.ftl b/resources/ja/home.ftl new file mode 100644 index 0000000..8abc31f --- /dev/null +++ b/resources/ja/home.ftl @@ -0,0 +1,13 @@ +latest-update = 最新のアップデート: i18n! +now-playing = 再生中 + +# welcome panel +welcome = +

もしもし、セレストだ。あたしのサイトへようこそ 🌟

+

ここに投稿してる。

+

日は素晴らしいといい。

+
+ +

永遠に建設中

+ + diff --git a/resources/pt/base.ftl b/resources/pt/base.ftl new file mode 100644 index 0000000..58465cc --- /dev/null +++ b/resources/pt/base.ftl @@ -0,0 +1,9 @@ +title = disco rígido da celeste +title-blog = blog da celeste +title-poetry = poesia da celeste +branch = cherry blossom branch +latest-blogposts = últimas postagens do blog +random-poem = poema aleatório +filter-by-tags = filtrar por tag +permalink = link permanente +untitled = sem título diff --git a/resources/pt/contact.ftl b/resources/pt/contact.ftl new file mode 100644 index 0000000..5e3c652 --- /dev/null +++ b/resources/pt/contact.ftl @@ -0,0 +1,9 @@ +title-contact = detalhes da celeste +name = celeste 🌸 +pronouns = pronome: ela +email = e-mail +jabber = jabber +scrobbles = scrobbles +bandcamp-fan = fã bandcamp +languages = línguas (em ordem aproximada de habilidade): inglês, português, francês, japonês, alemão, chinês, latim, toki pona, coreano +programming = linguagens de programação: rust, erlang, go, haskell, webdev, lisp diff --git a/resources/pt/home.ftl b/resources/pt/home.ftl new file mode 100644 index 0000000..f220ac4 --- /dev/null +++ b/resources/pt/home.ftl @@ -0,0 +1,13 @@ +latest-update = última atualização: i18n! +now-playing = tocando agora + +# welcome panel +welcome = +

ola sou celeste bem vindo ao meu site 🌟

+

aqui e onde eu faco o postagem

+

desejo que vc tenha um dia maravilhoso

+
+ +

sempre sendo construido

+ + diff --git a/resources/zh/base.ftl b/resources/zh/base.ftl new file mode 100644 index 0000000..b30df69 --- /dev/null +++ b/resources/zh/base.ftl @@ -0,0 +1,9 @@ +title = 春雷的硬盘 +title-blog = 春雷的博客 +title-poetry = 春雷的诗歌 +branch = cherry blossom branch +latest-blogposts = 最新博文 +random-poem = 随机诗 +filter-by-tags = 按标签过滤 +permalink = 永久链接 +untitled = 无标题 diff --git a/resources/zh/contact.ftl b/resources/zh/contact.ftl new file mode 100644 index 0000000..5719766 --- /dev/null +++ b/resources/zh/contact.ftl @@ -0,0 +1,9 @@ +title-contact = 春雷的联系方式 +name = 🌸春雷 +pronouns = 代词: +email = 电子邮件 +jabber = jabber +scrobbles = scrobbles +bandcamp-fan = bandcamp粉丝 +languages = 语言:英语、葡萄牙语、法语、日语、德语、中文、拉丁语、道本语、韩语 +programming = 电脑编程: rust, erlang, go, haskell, webdev, lisp diff --git a/resources/zh/home.ftl b/resources/zh/home.ftl new file mode 100644 index 0000000..5394371 --- /dev/null +++ b/resources/zh/home.ftl @@ -0,0 +1,13 @@ +latest-update = 最新更新: i18n! +now-playing = 正在播放 + +# welcome panel +welcome = +

嗨,我叫春雷。欢迎来到我的网站 🌟

+

我在这里上发表

+

祝你有美好的一天

+
+ +

永远在建设中

+ + diff --git a/src/main.rs b/src/main.rs index de7bc73..d810159 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ mod utils; use std::{collections::HashSet, time::Duration}; use poem::http::StatusCode; +use poem::i18n::unic_langid::langid; use poem::i18n::{I18NResources, Locale}; use poem::{ endpoint::EmbeddedFilesEndpoint, @@ -203,6 +204,7 @@ async fn main() -> std::result::Result<(), std::io::Error> { let resources = I18NResources::builder() .add_path("./resources") + .default_language(langid!("en")) .build() .unwrap(); -- cgit