Skip to content

Commit

Permalink
Fixed broken translation system and completed translations.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Mar 16, 2020
1 parent d52740b commit d5814a2
Show file tree
Hide file tree
Showing 15 changed files with 980 additions and 858 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var/log/
# Virtualenv
venv
build
mosp.egg-info/

.python-version

Expand Down
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: pybabel compile -d mosp/web/translations; python runserver.py
web: pybabel compile -d mosp/translations; python runserver.py
init: python manager.py db_init
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ python manager.py db_create
$ python manager.py db_init
$ python manager.py import_licenses_from_spdx
$ python manager.py create_admin <username> <password>
$ pybabel compile -d mosp/web/translations
$ pybabel compile -d mosp/translations
$ python runserver.py
```

Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"website": "https://github.com/CASES-LU/MOSP",
"repository": "https://github.com/CASES-LU/MOSP",
"scripts": {
"postdeploy": "pybabel compile -d mosp/web/translations && python manager.py db_init && python manager.py create_admin admin password && python manager.py import_licenses_from_spdx"
"postdeploy": "pybabel compile -d mosp/translations && python manager.py db_init && python manager.py create_admin admin password && python manager.py import_licenses_from_spdx"
},
"addons": [
"heroku-postgresql:hobby-dev"
Expand Down
6 changes: 3 additions & 3 deletions mosp/templates/edit_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ <h2>{{ action | safe }}</h2>
<div class="row">
<div class="col">
<form class="navbar-form navbar-right">
<label class="sr-only" for="inlineFormInputGroupAPIKey">API key</label>
<label class="sr-only" for="inlineFormInputGroupAPIKey">{{ _('API key') }}</label>
<div class="input-group mb-2 mr-sm-2">
<div class="input-group-prepend">
<div class="input-group-text mb-2">API key</div>
<div class="input-group-text mb-2">{{ _('API key') }}</div>
</div>
<input type="text" class="form-control" id="inlineFormInputGroupAPIKey" value="{{ current_user.apikey }}" readonly>
<div class="input-group-append">
Expand All @@ -42,7 +42,7 @@ <h2>{{ action | safe }}</h2>
</div>
<div class="row">
<div class="col">
<p>You can check the <a href="https://github.com/CASES-LU/MOSP-documentation/blob/master/index.adoc#using-the-api" target="_blank">documentation of the API</a>.</p>
<p>{{ _('You can check the <a href="https://github.com/CASES-LU/MOSP-documentation/blob/master/index.adoc#using-the-api" target="_blank">documentation of the API</a>.') }}</p>
</div>
</div>
<hr /><br />
Expand Down
4 changes: 2 additions & 2 deletions mosp/templates/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ <h1>~/{{ user.login }}</h1>
</div>
<div class="row">
<div class="col">
<p>{{ user.login }} is a member since
{{ user.created_at | datetimeformat('%c') }} and {{ _('is the creator of the following object(s):') }}</p>
<p>{{ user.login }} {{ _('is a member since') }}
{{ user.created_at | datetimeformat('%c') }} {{ _('and is the creator of the following object(s):') }}</p>
</div>
</div>
<div class="row">
Expand Down
6 changes: 3 additions & 3 deletions mosp/templates/user_schemas.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<div class="container">
<div class="row">
<div class="col">
<h1>Welcome {{ user.login }}</h1>
<h1>{{ _('Welcome') }} {{ user.login }}</h1>
</div>
</div>
<div class="row">
<div class="col">
<p>You are a member since {{ user.created_at | datetimeformat }}.</p>
<p>See the <a href="{{ url_for('user_bp.get', login=user.login) }}">objects</a> you already created.</p>
<p>{{ _('You are a member since') }} {{ user.created_at | datetimeformat }}.</p>
<p>{{ _('See the') }} <a href="{{ url_for('user_bp.get', login=user.login) }}">{{ _('objects') }}</a> {{ _('you already created.') }}</p>
</div>
</div>
<div class="row">
Expand Down
File renamed without changes.
Loading

0 comments on commit d5814a2

Please sign in to comment.