All Projects → opendata-stuttgart → devices.sensor.community

opendata-stuttgart / devices.sensor.community

Licence: other
devices.sensor.community

Programming Languages

HTML
75241 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to devices.sensor.community

deep-smoke-machine
Deep learning models and dataset for recognizing industrial smoke emissions
Stars: ✭ 93 (+481.25%)
Mutual labels:  citizen-science
EternaJS
Eterna game/RNA design interface
Stars: ✭ 12 (-25%)
Mutual labels:  citizen-science
eternagame.org
Website for the Eterna citizen science game
Stars: ✭ 17 (+6.25%)
Mutual labels:  citizen-science
SwipesForScience
A general purpose citizen science game template for scientific research
Stars: ✭ 24 (+50%)
Mutual labels:  citizen-science
aircitizen
main repo of the aircitizen project
Stars: ✭ 18 (+12.5%)
Mutual labels:  citizen-science
Klimerko
☁ DIY Air Quality Measuring Device
Stars: ✭ 69 (+331.25%)
Mutual labels:  citizen-science
ODM2DataSharingPortal
A Python-Django web application enabling users to upload, share, and display data from their environmental monitoring sites via the app's ODM2 database. Data can either be automatically streamed from Internet of Things (IoT) devices, manually uploaded via CSV files, or manually entered into forms.
Stars: ✭ 22 (+37.5%)
Mutual labels:  citizen-science
ann
A repository for brainstorming and prototyping ideas related to the eLifeSprint project Annotate them all (https://sprint.elifesciences.org/annotate-them-all/)
Stars: ✭ 13 (-18.75%)
Mutual labels:  citizen-science
pyinaturalist
Python client for iNaturalist
Stars: ✭ 68 (+325%)
Mutual labels:  citizen-science

devices.sensor.community

sensor.community self-service registration portal.

Translations

The files for translation can be found in the folder translations/<language ISO code>/LC_MESSAGES/. Both files flask_security.po and messages.po need to be translated.

There is a free tool to edit and translate these files: https://poedit.net/

Manual translation

Example for translation of a one line text:
msgid "Indoor Sensor" <- english
msgstr "Indoor-Sensor" <- translation

Example for translation of a text with more than one line:
(every line has to start and to end with a double quote, first line contains 2 double quote only)
msgid ""
"Mark sensor as inactive. No notifications will be sent when sensor goes "
"offline."
msgstr ""
"Markiert den Sensor als inaktiv. Es werden keine Benachrichtigungen mehr "
"versendet, wenn der Sensor keine Daten mehr liefert."

If you don't have a Github account download the two files via the Raw button directly right over their source code. Send us your file with the translation to "tech (at) sensor.community".

Configuration file

The default configuration settings are set inwebapp/default_settings.py. If you need to override any configuration variables, you can create webapp/config.py file based off webapp/config.py.dist.

Additionally, .flaskenv file is required. Basic development environment file can be copied from .flaskenv.dist.

virtualenv setup

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

Database intialization

flask db upgrade

# Create initial user and roles
flask users create [email protected] --password password -a
flask roles create admin
flask roles add [email protected] admin

Running

flask run

Compile CSS

install node packages

npm install

The project uses Tailwind CSS, go and check out the documentation to get started.

npm run watch

To get ready for production compile the final version

npm run build

Create new language

extract text and lazy_gettext() functions
venv/bin/pybabel extract -F ./babel/babel.cfg -k lazy_gettext -o ./babel/messages.pot .
update language
venv/bin/pybabel extract -F ./babel/babel.cfg -k -l -o ./babel/messages.pot .
venv/bin/pybabel update -i ./babel/messages.pot -d ./translations
figure out the country code
venv/bin/pybabel --list-locales
create translation files

replace the country_code with the language to be translated, e.g. pt for Portugese

venv/bin/pybabel init -i ./babel/messages.pot -d ./translations -l country_code
venv/bin/pybabel init -i ./babel/flask_security.pot -D flask_security -d ./translations -l country_code
translate the strings

inside translations/country_code translate the two created files message.po and flask_security.po.

compile into binary
venv/bin/pybabel compile -d ./translations/
venv/bin/pybabel compile -d ./translations/ -D flask_security
extend the default_settgings.py

in line 111 extend the object with the new language. Please add in the previous line a comma at the end.

LANGUAGES = {
    'en': 'English', # add a comma
    'pt': 'Português' # add the new language
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].