48 Commits

Author SHA1 Message Date
wiz
1898dba1fc Update list of supported locales 2020-12-02 21:33:53 +09:00
wiz
8a31558959 Add one more fix to nginx.conf for i18n 2020-12-02 21:21:44 +09: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
wiz
c8dc2d3287 Modify upgrade script to append repo before tag name 2020-11-23 09:46:50 +09:00
wiz
73d09da5d2 Modify upgrade script to include "tag @ hash" in notification msg 2020-11-16 23:44:32 +09:00
wiz
2ccd218c00 Fix nginx.conf reverse proxy cache URL path for sponsor images 2020-11-16 00:43:10 +09:00
wiz
22cece394c Enable nginx reverse proxy cache for sponsor profile images + misc tweaks 2020-11-06 14:09:04 +09:00
wiz
8a1598137e Don't call npm install with --only=prod 2020-10-26 04:24:05 +09:00
wiz
3eac6b8996 Don't rate limit /api/v1/donations URL prefix for sponsor photos 2020-10-19 20:56:46 +09:00
wiz
5405a06324 Update production backend configuration files for all 4 instances 2020-10-19 20:40:56 +09:00
wiz
2f0b132fe5 Fix typo in previous commit 2020-10-19 19:49:02 +09:00
wiz
34c43a8fd2 Modify upgrade script to allow reverting to a specific git hash or tag 2020-10-19 19:43:30 +09:00
wiz
615abe0c60 Route /api and /<network/api URLs to HTML for API documentation 2020-10-18 13:11:02 +09:00
wiz
c347ed1dbb Update mempool-logger and syslog.conf to separate info and notice msgs 2020-10-13 19:58:11 +09:00
wiz
853fe58d28 Add newsyslog.conf to rotate mempool logfiles regularly 2020-10-13 19:56:10 +09:00
wiz
04b35c23b3 Add mempool-logger script and syslog.conf configuration to log to it 2020-10-13 19:16:09 +09:00
wiz
7b390f0137 Tweak upgrade script to take PR branch name as argument 2020-10-08 01:35:54 +09:00
wiz
12ad532eae Set "LIQUID":true in production liquid backend config 2020-09-28 05:00:21 +09:00
wiz
2ffa279cfc Add production script to update local copy of assets registry JSON 2020-09-24 18:42:13 +09:00
wiz
539eb60afb Update production nginx.conf and mempool-config.json for Bisq Markets API 2020-09-23 19:39:46 +09:00
wiz
1a40e601a8 Move backend restart command from upgrade command into its own command 2020-09-23 19:05:28 +09:00
wiz
64705a9e9c Remove unnecessary options from production README's bitcoin.conf 2020-09-20 05:45:29 +09:00
wiz
0ccfa8d44c Update production scripts to only install production npm deps 2020-09-19 02:19:47 +09:00
wiz
b4966948a7 Update production bisq instance backend config for Bisq Markets data 2020-09-18 22:02:23 +09:00
wiz
12e388a61c Update production scripts to install/load NodeJS/npm using nvm 2020-09-18 21:53:58 +09:00
wiz
d32657cfd2 Fix upgrade script not restarting node due to new command line args 2020-09-18 18:08:59 +09:00
wiz
866cd77df0 Merge pull request #107 from mempool/bisq-markets
Bisq markets API
2020-09-15 05:28:28 +09:00
softsimon
c172de2c34 * /volumes API
* /ticker API
2020-09-15 03:11:52 +07:00
wiz
b58726f153 Update production nginx.conf with performance tuning and rate limiting 2020-09-10 14:39:04 +09:00
wiz
52d7d7f564 Add bisq websocket proxy in production nginx.conf 2020-07-26 00:03:30 +09:00
wiz
d1cbb6446c Minor tweaks to production, use git pull --rebase, only build 1 frontend 2020-07-25 01:46:51 +09:00
wiz
0e3de8b75f Add production 4th instance for bisq backend 2020-07-24 21:53:57 +09:00
wiz
b7da118c0c Add filesystem notes to production README doc 2020-07-24 21:53:55 +09:00
wiz
b113c5e10c Add proxy_pass with rewrite for /bisq/api into nginx.conf 2020-07-18 21:07:36 +09:00
wiz
e25ca3cbc5 Rename API endpoints in frontend and nginx.conf to match blockstream 2020-07-06 00:15:16 +09:00
wiz
adb392b9d1 Add HTTP Link: header for canonical URL reference to mempool.space 2020-07-05 16:34:26 +09:00
wiz
f718231c33 Fix HTTP content-security-policy header typo 2020-07-04 18:00:41 +09:00
wiz
5f2a0a1dda Add HTTP security headers to production nginx.conf 2020-07-04 17:57:26 +09:00
wiz
8862cbb5d1 Update production upgrade script to update main repo, announce hostname 2020-06-21 01:53:24 +09:00
wiz
c188858199 Update production README dependency packages for FreeBSD 2020-06-21 01:53:07 +09:00
wiz
b6fbc2eab9 Add torrc in production README 2020-05-26 23:13:57 +09:00
wiz
961e69e4db Remove duplicate npm install and build steps in production scripts 2020-05-26 21:52:50 +09:00
wiz
684922a6d4 Remove uacomment from bitcoin.conf 2020-05-26 21:34:47 +09:00
wiz
f0de141a41 Always run "npm install" when upgrading, only build mainnet frontend 2020-05-26 21:34:45 +09:00
wiz
bf4ef5b149 Add missing MySQL grant statements in production README 2020-05-26 13:23:57 +09:00
wiz
d0d578350a Fix start/upgrade scripts to properly restart the backend processes 2020-05-26 13:23:55 +09:00
wiz
d473ad82bd Add production site setup guide and related install scripts 2020-05-25 20:58:46 +09:00
wiz
2e3ff685f8 Update misc files used for mempool.space production website 2020-05-25 18:42:00 +09:00