Agoric Steem account faucet - Ubuntu install instructions and multilingual capabilities and french translation

in #utopian-io6 years ago (edited)

agoric-fr.png

I was inspired by the idea of a Steem account faucet because of this post and plan to use it for our local meetups @steemquebec so thanks to @robrigo and the @agoric.systems for making it available to the community.

New Features

  • Ubuntu install instructions
  • Multilingual capabilities
  • French translation of the UI

Ubuntu install instructions

With PR#1 I've adapted the install instructions so that it works on Ubuntu as well. Here is how:

## On Ubuntu

1) Download virtualenv and create a new virtualenv.

> sudo apt-get install virtualenv

2) Now the virtualenv can be created.

> virtualenv -p python3.6 agoricco
> source agoricco/bin/activate

3) Your prompt should say (agoricco) now.

4) Clone the project's git repo somewhere.

> git clone [email protected]:agoric-systems/agoric.co.git

5) Next, change into the project's directory.

> cd agoric.co

6) Install the python dependencies.

> pip install -r requirements.txt

7) Change directory again into the `agoricco` package folder and start the flask app.

> cd agoricco
> export FLASK_APP=wsgi.py
> flask run

8) If you need to activate the virtualenv in the future:

> workon agoricco

Multilingual capabilities

The PR#2 is all about translation and making the project multilingual.

How to add another language:

Change the last two letters of this next command with the proper locale letters.

pybabel init -i messages.pot -d translations -l de
pybabel update -i messages.pot -d translations

You then update the .pot file in your proper language directory

pybabel compile -d translations

How to update the translation:

After adding the gettext(u'lorem ipsum') or {{ _('lorem ipsum') }} to your files, run these commands:

pybabel extract -F babel.cfg -o messages.pot .
pybabel update -i messages.pot -d translations

Fix the new strings in all of .pot files inside the translation directory

pybabel compile -d translations

Great references:

French translation of the UI

I've also translated all of the english UI strings in french. You just need to edit the default_settings.py BABEL_DEFAULT_LOCALE to 'fr' to enable the french interface.

Technology Stack

  • Python 3.5 or better
  • Flask-Babel

How to contribute?

The code is free to use for commercial purposes. Pull requests to their repo will be reviewed and merged if it makes sense.

You can get in touch with me on the Utopian Discord server



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @helo I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Glad you like it!

Coin Marketplace

STEEM 0.21
TRX 0.13
JST 0.030
BTC 67203.60
ETH 3513.52
USDT 1.00
SBD 3.20