84 Commits

Author SHA1 Message Date
softsimon
4d097ea92a i18n all the remaining strings. 2020-12-03 18:34:19 +07:00
softsimon
787cee0d7a Merge branch 'master' into simon/angular-universal
* master:
  Update list of supported locales
  Add one more fix to nginx.conf for i18n
  Remove unused i18n tags in frontend/src/index.html
  Update translations from Transifex
  Enable 'fr' locale for French
  Corrected some missing spaces on transactions page and a blank render bug when confirmation time is below 1 minute.
  Implement i18n support in frontend using Angular + Transifex + NGINX

# Conflicts:
#	frontend/src/app/app.constants.ts
#	frontend/sync-assets.js
2020-12-02 20:05:49 +07:00
wiz
46ad261d84 Implement i18n support in frontend using Angular + Transifex + NGINX
This PR adds basic i18n support into the mempool frontend, together with
a smooth workflow for developers and translators to collaborate:

* Using the existing @angular/localize module, developers add i18n
metadata to any frontend strings their new features or changes modify

* Using the new npm script `i18n-extract-from-source`, developers
extract the i18n data from source code into `src/locale/messages.xlf`

* After pushing the updated `src/locale/messages.xlf` to GitHub, the
Transifex service will update its database from the new source data

* Using the Transifex website UI, translators can work together to
translate all the mempool frontend strings into their native languages

* Using the new npm script `i18n-pull-from-transifex`, developers can
pull in completed translations from Transifex, and commit them into git.

This flow requires an API key from Transifex, which can be obtained at
https://www.transifex.com/user/settings/api/ to be used with the python
script installed by `pip install transifex-client` - after preparing
these, run the npm script which will ask you for the API key the first
time. When downloading is complete, you can test building the frontend,
and if successful, commit the new strings files into git.

This PR implements a new locale selector in the footer of the homepage
dashboard, and includes WIP translations for the following languages:

* Czech (cs)
* German (de)
* Japanese (ja)
* Norwegian (nn)
* Spanish (es)
* Swedish (sv)
* Ukrainian (uk)
* Persian (fa)
* Portugese (pt)
* Turkish (tr)
* Dutch (nl)
* French (fr)
* Chinese (zh)
* Slovenian (sl)
* Korean (ko)
* Polish (pl)

The user-agent's `Accept-Language` header is used to automatically
detect their preferred language, which can be manually overriden by the
pull-down selector, which saves their preference to a cookie, which is
used by nginx to serve the correct HTML bundle to the user.

Remaining tasks include adding i18n metadata for strings in the Bisq and
Liquid frontend code, mouseover hover tooltip strings, hard-coded og
metadata inside HTML templates, and many other places. This will be done
in a separate PR.

When upgrading to add i18n support, mempool instance operators must take
care to install the new nginx.conf and nginx-mempool.conf files, and
tweak for their specific site configuration.

Fixes #81
2020-12-02 04:19:33 +09:00
softsimon
bd1440ce96 Transaction, address and block page now works. 2020-11-22 23:47:27 +07:00
softsimon
24aed09489 Merge branch 'master' into simon/angular-universal
* master:
  Tweak ASM opcode styling colors
  Add some color and styling to the Bitcoin ASM opcodes
  Correcting title text on graph invert button.
  Modify upgrade script to include "tag @ hash" in notification msg
  Adding a button to invert the graph globally.
  Display P2PK instead of OP_RETURN fixes #161
  Improved utxo script design. fixes #46
  Adding prevout script. Fixed padding. refs #46
  Correcting details button padding on mobile.
  Fix nginx.conf reverse proxy cache URL path for sponsor images
  Add missing "engines" metadata into package-lock.json
  Upgrade backend/package-lock.json to version 2
  Toggle display UTXO details and scripts for transactions fixes #46
  Axios error handle sponsor proxy requests.
  Replacing request.js with axios fixes #153
  Add basic websocket error handler as emergency fix for site crashing

# Conflicts:
#	frontend/src/app/services/storage.service.ts
2020-11-22 20:53:12 +07:00
softsimon
5818dce386 Correcting title text on graph invert button. 2020-11-16 21:58:16 +07:00
softsimon
c2982c0b46 Adding a button to invert the graph globally. 2020-11-16 19:27:06 +07:00
softsimon
1b47a58fc8 Merge branch 'master' into simon/angular-universal
* master:
  Add the Commons Clause License Condition v1.0 to our MIT License
  fix legend bug on resize
  Correcting new chartist import path.
  Flip mempool chart by using patched chartist package by @techmix

# Conflicts:
#	frontend/package-lock.json
2020-11-15 02:51:00 +07:00
TechMiX
d0e40c97ad fix legend bug on resize 2020-11-13 01:23:19 +01:00
softsimon
61945c2283 Flip mempool chart by using patched chartist package by @techmix 2020-11-10 21:05:54 +07:00
softsimon
dfad5ede74 angular universal WIP
refs #104
2020-11-07 04:30:52 +07:00
TechMiX
eae49ddafb Merge branch 'master' of https://github.com/mempool/mempool 2020-10-28 22:25:33 +01:00
TechMiX
6f423adda1 save the legends active status on a cache 2020-10-28 22:22:07 +01:00
softsimon
7e85ecb454 Removing AVG() from mysql query reducing execution time. Increasing graph data span.
fixes #106
2020-10-26 01:00:21 +07:00
TechMiX
51e6945f47 update legend state after chart update 2020-10-23 19:03:15 +02:00
softsimon
c793e243bf Fix: Weight per second should be vBytes per second. 2020-09-29 15:07:04 +07:00
softsimon
4bfaabbb5f Adding mini-graphs on dashboard. 2020-09-26 22:46:26 +07:00
softsimon
bcd75063f0 Improved graph visibility on mobile. 2020-09-23 15:49:07 +07:00
softsimon
d915edd3de Replacing footer and latest blocks with a stats dashboard. 2020-09-21 19:41:12 +07:00
softsimon
3d116d2d07 Graph x-axis date fix. 2020-05-10 17:44:19 +07:00
softsimon
7974cbbc83 Liquid and Testnet now accessable from the main site
fixes #35
2020-05-09 20:37:50 +07:00
softsimon
655b85026a upgrading tslint to v6 2020-04-05 00:00:17 +07:00
softsimon
682d21cb5b Merging duplicate mempool graph code. 2020-03-29 23:59:04 +07:00
softsimon
1bdb95130f Only display 0-1sat/vB on Liquid. 2020-03-28 19:24:13 +07:00
softsimon
a085be1a63 Display 0-1 sat/vb fees in graph 2020-03-28 13:55:52 +07:00
softsimon
7abf978795 Renaming Mempool blocks to "next block" + ux fixes 2020-03-25 03:59:30 +07:00
softsimon
b14826ed9a Update page Title for SEO. 2020-03-24 00:52:08 +07:00
softsimon
55c6ef6d41 Update fee distribution graph and fix arrow. 2020-03-20 02:11:40 +07:00
softsimon
c7ddeecd18 General responsive improvments. 2020-03-05 16:13:46 +07:00
softsimon
f96728292c Improvments to responsiveness 2020-03-03 17:47:01 +07:00
Simon Lindh
90a1fcaf8d Various fixes and design updates. 2020-02-26 03:37:00 +09:00
Simon Lindh
98391580b3 Refactor. API explanations. UX revamp. 2020-02-26 03:26:16 +09:00
Simon Lindh
45fa1be217 Optimize statistics. 2020-02-26 03:21:21 +09:00
Simon Lindh
43f41b8aab New base code for mempool blockchain explorerer 2020-02-26 03:19:26 +09:00