Skip to content

Commit

Permalink
Add French translations (#20)
Browse files Browse the repository at this point in the history
* Add French translation file

* Add french translation for config flow

* Fix translation for sensor states

And add french translation.

* Add .cookiecutter.json

To allow usage of retrocookie.
  • Loading branch information
oncleben31 authored Nov 1, 2020
1 parent b5d2e83 commit 371a4ff
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 2 deletions.
1 change: 1 addition & 0 deletions {{cookiecutter.project_name}}/.cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ cookiecutter | jsonify }}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def name(self):
@property
def state(self):
"""Return the state of the sensor."""
return self.coordinator.data.get("static")
# slugify the state to allow translation
return slugify(self.coordinator.data.get("static"))

@property
def icon(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "{{cookiecutter.friendly_name}}",
"config": {
"step": {
"user": {
"title": "{{cookiecutter.friendly_name}}",
"description": "Si vous avez besoin d'aide pour la configuration, regardez ici: https://github.com/oncleben31/awesome-custom-component",
"data": {
"username": "Identifiant",
"password": "Mot de Passe"
}
}
},
"error": {
"auth": "Identifiant ou mot de passe erroné."
},
"abort": {
"single_instance_allowed": "Une seule configuration de cette intégration est permise."
}
},
"options": {
"step": {
"user": {
"data": {
"binary_sensor": "Capteur binaire activé",
"sensor": "Capteur activé",
"switch": "Interrupteur activé"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"state": {
"_": {
"some_sample_static_text": "Some sample static text."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"state": {
"_": {
"some_sample_static_text": "Exemple de texte statique."
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"state": {
"Some sample static text.": "Eksempel tekst."
"_": {
"some_sample_static_text": "Eksempel tekst."
}
}
}

0 comments on commit 371a4ff

Please sign in to comment.