diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5f25443..34d08fad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,34 @@
# Change log
+## Version 0.6.9 (2022/07/03)
+
+FitTrackee is now available in German (thanks to @gorgobacka).
+And translations can be updated on Weblate.
+
+### Issues Closed
+
+#### Features
+
+* [#200](https://github.com/SamR1/FitTrackee/issues/200) - Detect browser language to use matching translation if available
+
+#### Bugs Fixed
+
+* [PR#208](https://github.com/SamR1/FitTrackee/pull/208) - fix order on records cards
+* [#201](https://github.com/SamR1/FitTrackee/issues/201) - html lang attribute is not updated when changing language
+
+#### Translations
+
+* [PR#197](https://github.com/SamR1/FitTrackee/pull/197) - Translations update from Weblate (French)
+* [#196](https://github.com/SamR1/FitTrackee/issues/196) - Use translation management tool
+* [#190](https://github.com/SamR1/FitTrackee/issues/190) - Add German translation
+
+In this release 4 issues were closed.
+
+Thanks to the contributors:
+- @gorgobacka
+- J. Lavoie (from Weblate)
+
+
## Version 0.6.8 (2022/06/22)
### Issues Closed
@@ -16,7 +45,7 @@
Note: it does not affect previously imported files
* [cc4287e](https://github.com/SamR1/FitTrackee/commit/cc4287ed327faaba268a0c689841d16a7aecc3fb) - Fix docker env file
-In this release 3 issues was closed.
+In this release 3 issues were closed.
## Version 0.6.7 (2022/06/11)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 060350e5..d77b92c4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,13 +17,22 @@ First off, thank you for your interest in contributing!
The **GitHub** repository contains:
- source code (note that the repository also includes client build),
+- translations,
- tests,
- documentation (source and build).
-Translations can be updated through [Weblate](https://hosted.weblate.org/engage/fittrackee/).
-
Continuous integration workflows run on **Github Actions** platform (on **push** and **pull requests**).
+### Translations
+
+The available languages are:
+[![Translation status](https://hosted.weblate.org/widgets/fittrackee/-/multi-auto.svg)](https://hosted.weblate.org/engage/fittrackee/)
+
+Translations files are located:
+- on API side (emails): `fittrackee/emails/translations/` (implemented with [Babel](https://babel.pocoo.org/en/latest/))
+- on client side: `fittrackee_client/src/locales` (implemented with [Vue I18n](https://vue-i18n.intlify.dev/))
+
+Translations can be updated through [Weblate](https://hosted.weblate.org/engage/fittrackee/).
### How to install FitTrackee
@@ -62,14 +71,30 @@ Please make your changes from the development branch (`dev`).
$ make test-e2e
```
+* If needed, update translations.
+ * On client side, update files in `fittrackee_client/src/locales` folder.
+ * On API side (emails), to extract new strings into `messages.pot`:
+ ```shell
+ $ make babel-extract
+ ```
+ To add new strings in translations files (`fittrackee/emails/translations//LC_MESSAGES/messages.po`):
+ ```shell
+ $ make babel-update
+ ```
+ After updating strings in `messages.po`, compile the translations:
+ ```shell
+ $ make babel-compile
+ ```
+
* If needed, add or update tests.
* If needed, update documentation (no need to build documentation, it will be done when releasing).
-* If updated code contains client-side changes, you can generate a build, in a **separate commit** to ease code review (or to easily drop it in case of conflicts when updating your branch).
+* If updated code contains client-side changes, you can generate javascript assets to check **FitTrackee** whithout starting client dev server:
```shell
$ make build-client
```
+ No need to commit these files, dist files will be generated before merging or when releasing.
* Create your pull request to merge on `dev` branch.
diff --git a/Makefile b/Makefile
index c4616ebe..680a6351 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,18 @@ make-p:
# Launch all P targets in parallel and exit as soon as one exits.
set -m; (for p in $(P); do ($(MAKE) $$p || kill 0)& done; wait)
+babel-extract:
+ $(PYBABEL) extract -F babel.cfg -k lazy_gettext -o messages.pot .
+
+babel-init:
+ $(PYBABEL) init -i messages.pot -d fittrackee/emails/translations -l $(LANG)
+
+babel-compile:
+ $(PYBABEL) compile -d fittrackee/emails/translations
+
+babel-update:
+ $(PYBABEL) update -i messages.pot -d fittrackee/emails/translations
+
bandit:
$(BANDIT) -r fittrackee -c pyproject.toml
diff --git a/Makefile.config b/Makefile.config
index c1b0dd0b..59deb91b 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -24,6 +24,7 @@ GUNICORN = $(VENV)/bin/gunicorn
BLACK = $(VENV)/bin/black
MYPY = $(VENV)/bin/mypy
BANDIT = $(VENV)/bin/bandit
+PYBABEL = $(VENV)/bin/pybabel
FTCLI = $(VENV)/bin/ftcli
# Node env
diff --git a/README.md b/README.md
index 62fa7f50..95f052e6 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![pipeline status](https://github.com/SamR1/FitTrackee/actions/workflows/.tests-python.yml/badge.svg)](https://github.com/SamR1/FitTrackee/actions/workflows/.tests-python.yml)
[![pipeline status](https://github.com/SamR1/FitTrackee/actions/workflows/.tests-javascript.yml/badge.svg)](https://github.com/SamR1/FitTrackee/actions/workflows/.tests-javascript.yml)
-
+[![translation status](https://hosted.weblate.org/widgets/fittrackee/-/svg-badge.svg)](https://hosted.weblate.org/engage/fittrackee/)
---
diff --git a/VERSION b/VERSION
index fae59cac..1a5ac0d4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.6.8
+0.6.9
diff --git a/babel.cfg b/babel.cfg
new file mode 100644
index 00000000..d8436ffc
--- /dev/null
+++ b/babel.cfg
@@ -0,0 +1,5 @@
+[jinja2: fittrackee/emails/templates/**.html]
+silent=False
+
+[jinja2: fittrackee/emails/templates/**.txt]
+silent=False
diff --git a/docs/.buildinfo b/docs/.buildinfo
index 57be4ef8..d0f64bb3 100644
--- a/docs/.buildinfo
+++ b/docs/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 99edd56615e14d7cc3e745b909626969
+config: be957a0969da3c052862eb24f6a139c9
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/_images/fittrackee_screenshot-01.png b/docs/_images/fittrackee_screenshot-01.png
index 883ee488..328f3aa5 100644
Binary files a/docs/_images/fittrackee_screenshot-01.png and b/docs/_images/fittrackee_screenshot-01.png differ
diff --git a/docs/_images/fittrackee_screenshot-02.png b/docs/_images/fittrackee_screenshot-02.png
index 01c43ff9..3f07ca60 100644
Binary files a/docs/_images/fittrackee_screenshot-02.png and b/docs/_images/fittrackee_screenshot-02.png differ
diff --git a/docs/_images/fittrackee_screenshot-03.png b/docs/_images/fittrackee_screenshot-03.png
index 8035bf9d..64668f67 100644
Binary files a/docs/_images/fittrackee_screenshot-03.png and b/docs/_images/fittrackee_screenshot-03.png differ
diff --git a/docs/_images/fittrackee_screenshot-04.png b/docs/_images/fittrackee_screenshot-04.png
index e59b4eda..a1374a3e 100644
Binary files a/docs/_images/fittrackee_screenshot-04.png and b/docs/_images/fittrackee_screenshot-04.png differ
diff --git a/docs/_images/fittrackee_screenshot-05.png b/docs/_images/fittrackee_screenshot-05.png
index 06e6e2b2..c1a46ad8 100644
Binary files a/docs/_images/fittrackee_screenshot-05.png and b/docs/_images/fittrackee_screenshot-05.png differ
diff --git a/docs/_images/fittrackee_screenshot-06.png b/docs/_images/fittrackee_screenshot-06.png
index 7218fae9..706e2a90 100644
Binary files a/docs/_images/fittrackee_screenshot-06.png and b/docs/_images/fittrackee_screenshot-06.png differ
diff --git a/docs/_sources/changelog.md.txt b/docs/_sources/changelog.md.txt
index e5f25443..34d08fad 100644
--- a/docs/_sources/changelog.md.txt
+++ b/docs/_sources/changelog.md.txt
@@ -1,5 +1,34 @@
# Change log
+## Version 0.6.9 (2022/07/03)
+
+FitTrackee is now available in German (thanks to @gorgobacka).
+And translations can be updated on Weblate.
+
+### Issues Closed
+
+#### Features
+
+* [#200](https://github.com/SamR1/FitTrackee/issues/200) - Detect browser language to use matching translation if available
+
+#### Bugs Fixed
+
+* [PR#208](https://github.com/SamR1/FitTrackee/pull/208) - fix order on records cards
+* [#201](https://github.com/SamR1/FitTrackee/issues/201) - html lang attribute is not updated when changing language
+
+#### Translations
+
+* [PR#197](https://github.com/SamR1/FitTrackee/pull/197) - Translations update from Weblate (French)
+* [#196](https://github.com/SamR1/FitTrackee/issues/196) - Use translation management tool
+* [#190](https://github.com/SamR1/FitTrackee/issues/190) - Add German translation
+
+In this release 4 issues were closed.
+
+Thanks to the contributors:
+- @gorgobacka
+- J. Lavoie (from Weblate)
+
+
## Version 0.6.8 (2022/06/22)
### Issues Closed
@@ -16,7 +45,7 @@
Note: it does not affect previously imported files
* [cc4287e](https://github.com/SamR1/FitTrackee/commit/cc4287ed327faaba268a0c689841d16a7aecc3fb) - Fix docker env file
-In this release 3 issues was closed.
+In this release 3 issues were closed.
## Version 0.6.7 (2022/06/11)
diff --git a/docs/_sources/features.rst.txt b/docs/_sources/features.rst.txt
index a484d67e..fa2d602f 100644
--- a/docs/_sources/features.rst.txt
+++ b/docs/_sources/features.rst.txt
@@ -60,6 +60,7 @@ Workouts
Account & preferences
^^^^^^^^^^^^^^^^^^^^^
- A user can create, update and deleted his account.
+- On registration, the user account is created with selected language in dropdown as user preference (*new in 0.6.9*).
- After registration, the user account is inactive and an email with confirmation instructions is sent to activate it.
A user with an inactive account cannot log in. (*new in 0.6.0*)
@@ -119,7 +120,9 @@ Administration
Translations
^^^^^^^^^^^^
-FitTrackee is available in English and French (which can be saved in the user preferences).
+FitTrackee is available in the following languages (which can be saved in the user preferences):
+
+.. figure:: https://hosted.weblate.org/widgets/fittrackee/-/multi-auto.svg
Screenshots
diff --git a/docs/_sources/installation.rst.txt b/docs/_sources/installation.rst.txt
index 8e87c393..d7de6753 100644
--- a/docs/_sources/installation.rst.txt
+++ b/docs/_sources/installation.rst.txt
@@ -95,9 +95,9 @@ deployment method.
.. versionadded:: 0.4.0
- Directory containing uploaded files.
+ **Absolute path** to the directory where `uploads` folder will be created.
- :default: `fittrackee/uploads/`
+ :default: `/fittrackee`
.. danger::
| With installation from PyPI, the directory will be located in
@@ -395,13 +395,13 @@ Production environment
.. warning::
| Note that FitTrackee is under heavy development, some features may be unstable.
-- Download the last release (for now, it is the release v0.6.8):
+- Download the last release (for now, it is the release v0.6.9):
.. code:: bash
- $ wget https://github.com/SamR1/FitTrackee/archive/v0.6.8.tar.gz
- $ tar -xzf v0.6.8.tar.gz
- $ mv FitTrackee-0.6.8 FitTrackee
+ $ wget https://github.com/SamR1/FitTrackee/archive/v0.6.9.tar.gz
+ $ tar -xzf v0.6.9.tar.gz
+ $ mv FitTrackee-0.6.9 FitTrackee
$ cd FitTrackee
- Create **.env** from example and update it
@@ -521,13 +521,13 @@ Prod environment
- Change to the directory where FitTrackee directory is located
-- Download the last release (for now, it is the release v0.6.8) and overwrite existing files:
+- Download the last release (for now, it is the release v0.6.9) and overwrite existing files:
.. code:: bash
- $ wget https://github.com/SamR1/FitTrackee/archive/v0.6.8.tar.gz
- $ tar -xzf v0.6.8.tar.gz
- $ cp -R FitTrackee-0.6.8/* FitTrackee/
+ $ wget https://github.com/SamR1/FitTrackee/archive/v0.6.9.tar.gz
+ $ tar -xzf v0.6.9.tar.gz
+ $ cp -R FitTrackee-0.6.9/* FitTrackee/
$ cd FitTrackee
- Update **.env** if needed (see `Environment variables `__).
diff --git a/docs/_sources/troubleshooting/administrator.rst.txt b/docs/_sources/troubleshooting/administrator.rst.txt
index 698be811..a85be4ad 100644
--- a/docs/_sources/troubleshooting/administrator.rst.txt
+++ b/docs/_sources/troubleshooting/administrator.rst.txt
@@ -19,4 +19,10 @@ Administrator
fittrackee.emails.exceptions.InvalidEmailUrlScheme
- A valid ``EMAIL_URL`` must be provided (see `emails <../installation.html#emails>`__).
\ No newline at end of file
+ A valid ``EMAIL_URL`` must be provided (see `emails <../installation.html#emails>`__).
+
+
+`Map images are not displayed but map is shown in Workout detail`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- Check the path in `environment variables <../installation.html#envvar-UPLOAD_FOLDER>`__. ``UPLOAD_FOLDER`` must be set with an absolute path.
\ No newline at end of file
diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js
index 01c19162..d5d45972 100644
--- a/docs/_static/documentation_options.js
+++ b/docs/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '0.6.8',
+ VERSION: '0.6.9',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
diff --git a/docs/api/auth.html b/docs/api/auth.html
index e2491ebc..286ced46 100644
--- a/docs/api/auth.html
+++ b/docs/api/auth.html
@@ -5,7 +5,7 @@
- Authentication — FitTrackee 0.6.8
+ Authentication — FitTrackee 0.6.9
documentation
@@ -41,7 +41,7 @@
FitTrackee
- 0.6.8
+ 0.6.9
@@ -170,6 +170,8 @@ to activate it.
username (string) – username (3 to 30 characters required)
This version introduces some changes on user registration. From now on, a user needs to confirm his account after registration (an email with confirmation instructions is sent after registration).
@@ -546,17 +589,17 @@ It reduces pre-requisites for single-user instances.
This release contains several fixes including security fixes. Thanks to @DanielSiersleben for the report.
And from now on, admin account is not created on application initialization. A new command is added to set administration rights on the account created after registration
(see documentation)
#83 - allow using configured tile server to generate static maps Note: to keep using the default tile server, set environment variable DEFAULT_STATICMAP to True
Update Python and Javascript dependencies IMPORTANT: Due to SQLAlchemy update (1.4+), engine URLs starting with postgres:// are no longer supported. Please update DATABASE_URL with postgresql://.
@@ -783,10 +826,10 @@ It reduces pre-requisites for single-user instances.
It’s now possible to change the tile provider for maps. The default tile server is now OpenStreetMap’s standard tile layer (replacing ThunderForest Outdoors),
see Map tile server in documentation.
A user can create, update and deleted his account.
+
On registration, the user account is created with selected language in dropdown as user preference (new in 0.6.9).
After registration, the user account is inactive and an email with confirmation instructions is sent to activate it.
A user with an inactive account cannot log in. (new in 0.6.0)
@@ -313,7 +314,9 @@ A user with an inactive account cannot log in. (new in 0.6.0)