mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Add missing features
* Fix display * Add internationalization * Avoid querying under a certain amount of characters * Update docs for translations with typescript * Add interpolate to typescript globals
This commit is contained in:
@ -24,6 +24,12 @@ Si le mot apparaît dans le template Jinja :
|
||||
{% trans %}Hello{% endtrans %}
|
||||
```
|
||||
|
||||
Si on est dans un fichier javascript ou typescript :
|
||||
|
||||
```js
|
||||
gettext("Hello");
|
||||
```
|
||||
|
||||
## Générer le fichier django.po
|
||||
|
||||
La traduction se fait en trois étapes.
|
||||
@ -32,7 +38,7 @@ l'éditer et enfin le compiler au format binaire pour qu'il soit lu par le serve
|
||||
|
||||
```bash
|
||||
./manage.py makemessages --locale=fr -e py,jinja --ignore=node_modules # Pour le backend
|
||||
./manage.py makemessages --locale=fr -d djangojs --ignore=node_modules # Pour le frontend
|
||||
./manage.py makemessages --locale=fr -d djangojs -e js,ts --ignore=node_modules # Pour le frontend
|
||||
```
|
||||
|
||||
## Éditer le fichier django.po
|
||||
|
Reference in New Issue
Block a user