Skip to content
Github mirror of "labs/tools/Isa" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
isa
src
.gitignore
.gitreview
README.md
app.py
get-deps.sh
package-lock.json
package.json
setup.cfg
tox.ini
webpack.config.js

README.md

Isa

This tool helps to describe the images contributed to Wiki Loves competitions.

Isa is not only an acronym for information structured additions, but is also a chiShona language word for ‘put’.

Requirements

Installing dependencies

Install application dependencies using the get-deps.sh script:

./get-deps.sh

The above script attempts to check system requirements and tell informs user on next steps.

Quickstart the app

export FLASK_APP=app.py # add --reload parameter to enable Flask auto-compilation feature
flask run

Adding Translations

To add translations, the following steps should be followed

  • Mark the string to be translated ( _('') for templates ) and ( gettext('') ) for python strings

  • run pybabel extract -F babel.cfg -o messages.pot --input-dirs=. from the isa module to extract the strings

  • run pybabel init (update in case you are modifying) -i messages.pot -d translations -l <lang_code> to generate translations in a new language with code <lang_code>

  • Enter the strings corresponding translations in 'translations/<lang_code>/LC_MESSAGES/messages.po'

  • run pybabel compile -d translations to compile the translations

You can’t perform that action at this time.