From ba7416a2a98d3f2ab42bd5c1b65e723cebefa0f4 Mon Sep 17 00:00:00 2001 From: erciccione Date: Tue, 27 Aug 2019 11:48:35 +0200 Subject: [PATCH] Refactored "Statistics" page to make it more i18n friendly Data and dates needed to be manually updated for all languages every month. After this change will be enough to only change the value in includes/statistics_data.html, the other languages will pull the data from there. I also added generic time references ('Through last month' instead of 'July'), to remove the need to translate every time the name of the past month. --- _data/de.yml | 21 +++++++++---------- _data/es.yml | 21 +++++++++---------- _data/fr.yml | 21 +++++++++---------- _data/pt-PT.yml | 21 +++++++++---------- _data/strings_en.yml | 33 +++++++++--------------------- _data/zh-CN.yml | 21 +++++++++---------- _includes/statistics_data.html | 36 +++++++++++++++++++++++++++++++++ de/stats.html | 24 +--------------------- es/stats.html | 24 +--------------------- fr/stats.html | 24 +--------------------- pt-PT/stats.html | 24 +--------------------- stats.html | 37 ++-------------------------------- zh-CN/stats.html | 24 +--------------------- 13 files changed, 97 insertions(+), 234 deletions(-) create mode 100644 _includes/statistics_data.html diff --git a/_data/de.yml b/_data/de.yml index 3c76c60a..3c9f834d 100644 --- a/_data/de.yml +++ b/_data/de.yml @@ -301,16 +301,13 @@ stats: hNetworkStats: Netzwerk-Statistiken pSeeMarkets: "

Auf der Märkte Seite finden Sie das Volumen je nach Währung.

" pBSQDistribution: Die Mainnet BSQ-Ausgabe ist für April 2019 geplant. - pTotalTrades: > -

Trades insgesamt

32.318

Bis Juni 2019

- pDailyAverage: > -

Täglich durchschnittliche Trades

94

Für Juni 2019

- pSoftwareDownloads: > -

Software Downloads

13.723

Für v1.1.2 (ungefähr)

- pGithubContributors: > -

GitHub Mitarbeiter

172

Stand: Juni 2019

- pTwitterFollowers: > -

Twitter Follower

17588

Stand: Juni 2019

- pSlackUsers: > -

Slack User

1.183

Stand: Juni 2019

+ pTotalTrades: Trades insgesamt + pTotalDate: Während des letzten Monats + pDailyAverageTrade: Täglich durchschnittliche Trades + pSoftwareDownloads: Software Downloads + pSoftwareDownloadsVersion: Für v1.1.2 (ungefähr) + pGithubContributors: GitHub Mitarbeiter + pToDate: Bis Ende letzten Monats + pTwitterFollowers: Twitter Follower + pSlackUsers: Slack User pNetworkLoad: "

Für die P2P-Netzwerklast, Tor-Metriken und andere Netzwerkdaten besuchen Sie bitte den Bisq Network Monitor.

" diff --git a/_data/es.yml b/_data/es.yml index 1a12a2c9..20c488ea 100644 --- a/_data/es.yml +++ b/_data/es.yml @@ -329,16 +329,13 @@ stats: hNetworkStats: Estado de red pSeeMarkets: "

Ver la página de Mercados para el volumen por moneda.

" pBSQDistribution: La distribución de BSQ en la red principal fue el 15 de Abril de 2019. - pTotalTrades: > -

Intercambios totales

25,585

en Marzo de 2019

- pDailyAverage: > -

Promedio diario de operaciones

94

Para Junio 2019

- pSoftwareDownloads: > -

Las descargas de software fueron

13,723

para la versión v1.1.2 (approximado)

- pGithubContributors: > -

Contribuyentes de GitHub

172

en Junio de 2019

- pTwitterFollowers: > -

Seguidores de Twitter

17,588

en Junio de 2019

- pSlackUsers: > -

Usuarios de Slack

1,183

en Junio de 2019

+ pTotalTrades: Intercambios totales + pTotalDate: Durante el mes pasado + pDailyAverageTrade: Promedio diario de operaciones + pSoftwareDownloads: Las descargas de software fueron + pSoftwareDownloadsVersion: para la versión v1.1.2 (approximado) + pGithubContributors: Contribuyentes de GitHub + pToDate: Hasta el mes pasado + pTwitterFollowers: Seguidores de Twitter + pSlackUsers: Usuarios de Slack pNetworkLoad: "

Para carga de la red P2P, métricas de Tor y otros datos de red, por favor visite elMonitor de Red Bisq.

" diff --git a/_data/fr.yml b/_data/fr.yml index 0ed1a741..7a6e50e2 100644 --- a/_data/fr.yml +++ b/_data/fr.yml @@ -301,16 +301,13 @@ stats: hNetworkStats: Stats du réseau pSeeMarkets: "

Voir la page des marchés pour le volume par devise.

" pBSQDistribution: La distribution des BSQ sur le Mainnet est prévue pour avril 2019. - pTotalTrades: > -

Total des transactions

32,318

Pour Juin 2019

- pDailyAverage: > -

Moyenne journalière des transactions

94

En Juin 2019

- pSoftwareDownloads: > -

Téléchargements du logiciel

13,723

For v1.1.2 (approximation)

- pGithubContributors: > -

Contributeurs GitHub

172

En Juin 2019

- pTwitterFollowers: > -

Followers sur Twitter

17,588

En Juin 2019

- pSlackUsers: > -

Utilisateurs Slack

1,183

En Juin 2019

+ pTotalTrades: Total des transactions + pTotalDate: Au cours du mois dernier + pDailyAverageTrade: Moyenne journalière des transactions + pSoftwareDownloads: Téléchargements du logiciel + pSoftwareDownloadsVersion: For v1.1.2 (approximation) + pGithubContributors: Contributeurs GitHub + pToDate: Depuis le mois dernier + pTwitterFollowers: Followers sur Twitter + pSlackUsers: Utilisateurs Slack pNetworkLoad: "

Pour connaître la sollicitation du réseau P2P, les métriques Tor et d'autres données réseau, veuillez visiter le site Web du contrôleur de réseau Bisq.

" diff --git a/_data/pt-PT.yml b/_data/pt-PT.yml index 91300cbe..d83f5214 100644 --- a/_data/pt-PT.yml +++ b/_data/pt-PT.yml @@ -308,16 +308,13 @@ stats: hNetworkStats: Estatisticas da Rede pSeeMarkets: "

Confira a página de Mercados para ver volume por moeda.

" pBSQDistribution: A distribuição de BSQ na Mainnet está prevista para Abril 2019 - pTotalTrades: > -

Todos os Negócios

32,318

Durante Junho 2019

- pDailyAverage: > -

Média de negócios por dia

94

Durante Junho 2019

- pSoftwareDownloads: > -

Downloads do Software

13,723

Para v1.1.2 (aproximativa)

- pGithubContributors: > -

Contribuintes no GitHub

172

Em Junho 2019

- pTwitterFollowers: > -

Seguidores no Twitter

17,588

Em Junho 2019

- pSlackUsers: > -

Utilizadores do Slack

1,183

Em Junho 2019

+ pTotalTrades: Todos os Negócios + pTotalDate: Durante o mês passado + pDailyAverageTrade: Média de negócios por dia + pSoftwareDownloads: Downloads do Software + pSoftwareDownloadsVersion: Para v1.1.2 (aproximativa) + pGithubContributors: Contribuintes no GitHub + pToDate: Até o mês passado + pTwitterFollowers: Seguidores no Twitter + pSlackUsers: Utilizadores do Slack pNetworkLoad: "

Para a carga da rede P2P, métricas do Tor, e outros dados da rede, por favor visite o Monitor da Rede do Bisq.

" diff --git a/_data/strings_en.yml b/_data/strings_en.yml index 3172d50e..9afd7bf3 100644 --- a/_data/strings_en.yml +++ b/_data/strings_en.yml @@ -301,28 +301,13 @@ stats: hNetworkStats: Network Stats pSeeMarkets: "

See Markets page for volume by currency.

" pBSQDistribution: The mainnet BSQ genesis distribution took place in April 2019. - pTotalTrades: > -

Total Trades

-

37,570

-

Through August 2019

- pDailyAverage: > -

Daily Average Trades

-

98

-

For August 2019

- pSoftwareDownloads: > -

Software Downloads

-

10,381

-

For v1.1.5 (approximate)

- pGithubContributors: > -

GitHub Contributors

-

188

-

As of August 2019

- pTwitterFollowers: > -

Twitter Followers

-

18,364

-

As of August 2019

- pSlackUsers: > -

Slack Users

-

1,327

-

As of August 2019

+ pTotalTrades: Total Trades + pTotalDate: Through last month + pDailyAverageTrade: Daily Average Trades + pSoftwareDownloads: Software Downloads + pSoftwareDownloadsVersion: For v1.1.2 (approximate) + pGithubContributors: GitHub Contributors + pToDate: As of last month + pTwitterFollowers: Twitter Followers + pSlackUsers: Slack Users pNetworkLoad: "

For P2P network load, Tor metrics, and other network data, please visit the Bisq Network Monitor.

" diff --git a/_data/zh-CN.yml b/_data/zh-CN.yml index 2da563bc..b0721ca8 100644 --- a/_data/zh-CN.yml +++ b/_data/zh-CN.yml @@ -331,16 +331,13 @@ stats: hNetworkStats: 网络状况 pSeeMarkets: "

按货币计算的成交量见市场页面

" pBSQDistribution: 核心网络 BSQ 计划于2019年4月发布。 - pTotalTrades: > -

总交易数

32,318

截止2019年6月

- pDailyAverage: > -

每日交易数

94

2019 年 6 月

- pSoftwareDownloads: > -

软件下载数

13,723

在 v1.1.2(近似数)

- pGithubContributors: > -

GitHub 贡献者

172

截至2019年6月

- pTwitterFollowers: > -

Twitter 粉丝数

17,588

截至2019年6月

- pSlackUsers: > -

Slack 用户数

1,183

截至2019年6月

+ pTotalTrades: 总交易数 + pTotalDate: 上月数据 + pDailyAverageTrade: 每日交易数 + pSoftwareDownloads: 软件下载数< + pSoftwareDownloadsVersion: 在 v1.1.2(近似数) + pGithubContributors: GitHub 贡献者 + pToDate: 截止上月 + pTwitterFollowers: Twitter 粉丝数 + pSlackUsers: Slack 用户数 pNetworkLoad: "

有关 P2P 网络负载情况、Tor 指标和其他网络数据,请访问Bisq 网络状况监控

" diff --git a/_includes/statistics_data.html b/_includes/statistics_data.html new file mode 100644 index 00000000..f203e8a8 --- /dev/null +++ b/_includes/statistics_data.html @@ -0,0 +1,36 @@ + +
+

{{item.pTotalTrades}}

+

37,570

+

{{item.pTotalDate}}

+
+ +
+

{{item.pDailyAverageTrade}}

+

98

+

{{item.pTotalDate}}

+
+ +
+

{{item.pSoftwareDownloads}}

+

10,381

+

{{item.pSoftwareDownloadsVersion}}

+
+ +
+

{{item.pGithubContributors}}

+

188

+

{{item.pToDate}}

+
+ +
+

{{item.pTwitterFollowers}}

+

18,364

+

{{item.pToDate}}

+
+ +
+

{{item.pSlackUsers}}

+

1,327

+

{{item.pToDate}}

+
diff --git a/de/stats.html b/de/stats.html index 10caee85..ee954e98 100644 --- a/de/stats.html +++ b/de/stats.html @@ -24,29 +24,7 @@

{{ item.hNetworkStats }}

{{ item.pBSQDistribution }}

-
- {{ item.pTotalTrades }} -
- -
- {{ item.pDailyAverage }} -
- -
- {{ item.pSoftwareDownloads }} -
- -
- {{ item.pGithubContributors }} -
- -
- {{ item.pTwitterFollowers }} -
- -
- {{ item.pSlackUsers }} -
+{% include statistics_data.html %}
{{ item.pNetworkLoad }} diff --git a/es/stats.html b/es/stats.html index c7a7ae7a..259b8623 100644 --- a/es/stats.html +++ b/es/stats.html @@ -24,29 +24,7 @@

{{ item.hNetworkStats }}

{{ item.pBSQDistribution }}

-
- {{ item.pTotalTrades }} -
- -
- {{ item.pDailyAverage }} -
- -
- {{ item.pSoftwareDownloads }} -
- -
- {{ item.pGithubContributors }} -
- -
- {{ item.pTwitterFollowers }} -
- -
- {{ item.pSlackUsers }} -
+{% include statistics_data.html %}
{{ item.pNetworkLoad }} diff --git a/fr/stats.html b/fr/stats.html index 7f37dd6d..2e6ee89f 100644 --- a/fr/stats.html +++ b/fr/stats.html @@ -24,29 +24,7 @@

{{ item.hNetworkStats }}

{{ item.pBSQDistribution }}

-
- {{ item.pTotalTrades }} -
- -
- {{ item.pDailyAverage }} -
- -
- {{ item.pSoftwareDownloads }} -
- -
- {{ item.pGithubContributors }} -
- -
- {{ item.pTwitterFollowers }} -
- -
- {{ item.pSlackUsers }} -
+{% include statistics_data.html %}
{{ item.pNetworkLoad }} diff --git a/pt-PT/stats.html b/pt-PT/stats.html index da1d5d57..21754ae1 100644 --- a/pt-PT/stats.html +++ b/pt-PT/stats.html @@ -24,29 +24,7 @@

{{ item.hNetworkStats }}

{{ item.pBSQDistribution }}

-
- {{ item.pTotalTrades }} -
- -
- {{ item.pDailyAverage }} -
- -
- {{ item.pSoftwareDownloads }} -
- -
- {{ item.pGithubContributors }} -
- -
- {{ item.pTwitterFollowers }} -
- -
- {{ item.pSlackUsers }} -
+{% include statistics_data.html %}
{{ item.pNetworkLoad }} diff --git a/stats.html b/stats.html index 7f931260..dcb74370 100644 --- a/stats.html +++ b/stats.html @@ -23,41 +23,8 @@

Network Stats

The mainnet BSQ genesis distribution took place in April 2019.

-
-

Total Trades

-

37,570

-

Through August 2019

-
- -
-

Daily Average Trades

-

98

-

For August 2019

-
- -
-

Software Downloads

-

10,381

-

For v1.1.5 (approximate)

-
- -
-

GitHub Contributors

-

188

-

As of August 2019

-
- -
-

Twitter Followers

-

18,364

-

As of August 2019

-
- -
-

Slack Users

-

1,327

-

As of August 2019

-
+{% assign item = site.data.strings_en.stats %} +{% include statistics_data.html %}

For P2P network load, Tor metrics, and other network data, please visit the Bisq Network Monitor.

diff --git a/zh-CN/stats.html b/zh-CN/stats.html index be752214..5c87f975 100644 --- a/zh-CN/stats.html +++ b/zh-CN/stats.html @@ -24,29 +24,7 @@

{{ item.hNetworkStats }}

{{ item.pBSQDistribution }}

-
- {{ item.pTotalTrades }} -
- -
- {{ item.pDailyAverage }} -
- -
- {{ item.pSoftwareDownloads }} -
- -
- {{ item.pGithubContributors }} -
- -
- {{ item.pTwitterFollowers }} -
- -
- {{ item.pSlackUsers }} -
+{% include statistics_data.html %}
{{ item.pNetworkLoad }}