From 744d9e809b71beb25b17df1d937d15018f1c2004 Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 6 Sep 2019 09:34:09 +0900 Subject: [PATCH] Localize site name/description for metadata preview pane usage --- _config.yml | 1 - _data/languages.yml | 14 ++++++++++++++ _layouts/default.html | 16 +++++++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/_config.yml b/_config.yml index 8e85c584..e8af9590 100644 --- a/_config.yml +++ b/_config.yml @@ -20,7 +20,6 @@ exclude: paginate: 10 paginate_path: "/blog/page/:num/" client_version: "1.1.5" -description: "Bisq is an open-source desktop application that allows you to buy and sell bitcoins in exchange for national currencies, or alternative crypto currencies." sass: style: compressed webrick: diff --git a/_data/languages.yml b/_data/languages.yml index a99f4a93..8e59bd0a 100644 --- a/_data/languages.yml +++ b/_data/languages.yml @@ -2,27 +2,41 @@ tag: "en" enabled: No accept_languages: ["en", "en-us", "en-au", "en-nz", "en-za", "en-bz", "en-tt"] + site_name: "Bisq - The decentralized Bitcoin exchange" + site_desc: "Bisq is an open-source desktop application that allows you to buy and sell bitcoins in exchange for national currencies, or alternative cryptocurrencies." - name: "Deutsch" tag: "de" enabled: Yes accept_languages: ["de"] + site_name: "Bisq - The decentralized Bitcoin exchange" + site_desc: "Bisq is an open-source desktop application that allows you to buy and sell bitcoins in exchange for national currencies, or alternative cryptocurrencies." - name: "Español" tag: "es" enabled: Yes accept_languages: ["es", "es-mx", "es-gt", "es-cr", "es-pa", "es-do", "es-ve", "es-co", "es-pe", "es-ar", "es-ec", "es-cl", "es-uy", "es-py", "es-bo", "es-sv", "es-hn", "es-ni", "es-pr"] + site_name: "Bisq - The decentralized Bitcoin exchange" + site_desc: "Bisq is an open-source desktop application that allows you to buy and sell bitcoins in exchange for national currencies, or alternative cryptocurrencies." - name: "Français" tag: "fr" enabled: Yes accept_languages: ["fr", "fr-FR"] + site_name: "Bisq - La plateforme d'échange de Bitcoin décentralis" + site_desc: "Bisq est une application desktop open-source qui vous permet d'acheter et de vendre des bitcoins contre des devises nationales ou des altcoins." - name: "日本語" tag: "ja" enabled: No accept_languages: ["ja", "ja-jp"] + site_name: "Bisq - 取引所、非中央集権化された" + site_desc: "Bisqは、各国通貨と引き換えに暗号通貨と売買できるオープンソースのピアツーピアアプリケーションです。登録は不要です。" - name: "Português" tag: "pt-PT" enabled: Yes accept_languages: ["pt", "pt-PT"] + site_name: "Bisq - A exchange de Bitcoin descentralizada" + site_desc: "Bisq é uma aplicação de desktop open-source que lhe permite comprar e vender bitcoins em troca de moedas nacionais ou altcoin." - name: "简体中文" tag: "zh-CN" enabled: Yes accept_languages: ["zh", "zh-CN"] + site_name: "Bisq - 去中心化的比特币交易" + site_desc: "Bisq 是一个开源的电脑程序,使你能够使用当地货币或加密货币来买卖比特币。" diff --git a/_layouts/default.html b/_layouts/default.html index 059695c2..e8a78bfe 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,5 +1,11 @@ +{% for language in site.data.languages %} + {% if language.tag == page.lang %} + {% assign langdata = language %} + {% break %} + {% endif %} +{% endfor %} @@ -8,19 +14,19 @@ - + - + - + - + - + {% if page.lang == "ja" %}