Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize site name/description for metadata preview pane usage #233

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions _data/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
m52go marked this conversation as resolved.
Show resolved Hide resolved
- 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."
m52go marked this conversation as resolved.
Show resolved Hide resolved
- 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."
m52go marked this conversation as resolved.
Show resolved Hide resolved
- 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 是一个开源的电脑程序,使你能够使用当地货币或加密货币来买卖比特币。"
16 changes: 11 additions & 5 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<!doctype html>
<html lang="{{ page.lang }}">
{% for language in site.data.languages %}
{% if language.tag == page.lang %}
{% assign langdata = language %}
{% break %}
{% endif %}
{% endfor %}

<head>

Expand All @@ -8,19 +14,19 @@

<meta name="author" content="Bisq">

<meta name="description" content="{{ site.description }}">
<meta name="description" content="{{ langdata.site_desc }}">
<meta name="image" content="/images/bisq-og.jpg">
<meta itemprop="name" content="Bisq">
<meta itemprop="description" content="{{ site.description }}">
<meta itemprop="description" content="{{ langdata.site_desc }}">
<meta itemprop="image" content="/images/bisq-og.jpg">
<meta name="og:title" content="{{ page.title }}">
<meta name="og:description" content="{{ site.description }}">
<meta name="og:description" content="{{ langdata.site_desc }}">
<meta name="og:image" content="/images/bisq-og.jpg">
<meta name="og:site_name" content="Bisq - The decentralized Bitcoin exchange">
<meta name="og:site_name" content="{{ langdata.site_name }}">
<meta name="og:type" content="website">
<meta property="twitter:title" content="{{ page.title }}">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="Bisq - The decentralized Bitcoin exchange">
<meta property="twitter:site" content="{{ langdata.enabled }}">
<meta name="twitter:creator" content="@bisq_network">
<link rel="canonical" href="{{ page.url }}">
{% if page.lang == "ja" %}
Expand Down