Skip to content

Commit

Permalink
[CA] Add new main translations (#2089)
Browse files Browse the repository at this point in the history
* add nevermind

* add HassSetPosition

* add SetVolume

* add Vacuum

* add weather
  • Loading branch information
duhow authored Mar 16, 2024
1 parent 41db757 commit 8499b91
Show file tree
Hide file tree
Showing 23 changed files with 289 additions and 0 deletions.
24 changes: 24 additions & 0 deletions responses/ca/HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: ca
responses:
intents:
HassGetWeather:
default: >
{% set weather_condition = {
'clear': 'Cel clar',
'clear-night': 'Cel clar',
'cloudy': 'Cel ennuvolat',
'exceptional': 'Clima excepcionalment advers',
'fog': 'Boira',
'hail': 'Precipitacions de calamarsa',
'lightning': 'Tempesta',
'lightning-rainy': 'Pluja i tempesta',
'partlycloudy': 'Cels parcialment ennuvolats',
'pouring': 'Plugim',
'rainy': 'Pluja',
'snowy': 'Precipitacions de neu',
'snowy-rainy': 'Precipitacions de aiguaneu',
'sunny': 'Sol',
'windy': 'Vent',
'windy-variant': 'Vent i núvols'
} %}
{{ weather_condition.get((state.state | string).lower(), "") }}, amb una temperatura de {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }}
5 changes: 5 additions & 0 deletions responses/ca/HassNevermind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: ca
responses:
intents:
HassNevermind:
default: "No res, doncs"
5 changes: 5 additions & 0 deletions responses/ca/HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: ca
responses:
intents:
HassSetPosition:
default: "Posició establerta"
5 changes: 5 additions & 0 deletions responses/ca/HassSetVolume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: ca
responses:
intents:
HassSetVolume:
default: "Volum establert"
5 changes: 5 additions & 0 deletions responses/ca/HassVacuumReturnToBase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: ca
responses:
intents:
HassVacuumReturnToBase:
default: "Tornant a la base"
5 changes: 5 additions & 0 deletions responses/ca/HassVacuumStart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: ca
responses:
intents:
HassVacuumStart:
default: "Comença la neteja"
17 changes: 17 additions & 0 deletions sentences/ca/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,19 @@ lists:
out: unlocked
shopping_list_item:
wildcard: true
position:
range:
type: "percentage"
from: 0
to: 100
volume:
range:
type: "percentage"
from: 0
to: 100
expansion_rules:
pronom: "(el|la|els|les|l')[ ]"
preposicio: "(en|de|a)[l|ls] [<pronom>][ ]"
name: "[el |la |l']{name}"
area: "[en el |en la |en l'|en |del |de la |de l'|al |a la |a l'| a]{area}"
quin_es: "(quin és|quina és|que es)"
Expand All @@ -116,7 +128,12 @@ expansion_rules:
llums: "(la llum|les llums|el llum|els llums)"
temp: "(temperatura)"
graus: "{temperature} [graus] [{temperature_unit}]"
pujar: "(puja|aixeca)[r]"
baixar: "([a]baixa[r])"
configura: "(posa|configura|ajusta|canvia|establ[ir|eix])"
posició: "{position}[ ][%|per[ ]cent]"
percent: "[ ](%|per[ ]cent)"
cancela: "cancel[·l]a[r]"
skip_words:
- si us plau
- vinga
Expand Down
17 changes: 17 additions & 0 deletions sentences/ca/cover_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: ca
intents:
HassSetPosition:
data:
- sentences:
- "(<obre>|<pujar>|<baixar>|<configura>) <name> [<area>] [al] {position}[<percent>]"
requires_context:
domain: cover
slots:
domain: cover

- sentences:
- "(<obre>|<pujar>|<baixar>|<configura>) la posició de[ la|l| l'] {cover_classes:device_class} a[l] <posició>"
- "(<obre>|<pujar>|<baixar>|<configura>) <pronom> {cover_classes:device_class} <area> a[l] <posició>"
- "(<obre>|<pujar>|<baixar>|<configura>) <pronom> {cover_classes:device_class} a[l] <posició> <area>"
slots:
domain: cover
9 changes: 9 additions & 0 deletions sentences/ca/homeassistant_HassNevermind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: ca
intents:
HassNevermind:
data:
- sentences:
- "<cancela> [la comanda|l'ordre]"
- "[no|res] res"
- "no facis (cas|res)"
- "(deixa|oblida)-ho [tot]"
1 change: 1 addition & 0 deletions sentences/ca/homeassistant_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ intents:
domain:
- cover
- lock
- vacuum
- sentences:
- <obre> <name> [<area>]
response: cover_area
8 changes: 8 additions & 0 deletions sentences/ca/media_player_HassSetVolume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: ca
intents:
HassSetVolume:
data:
- sentences:
- "(<pujar>|<baixar>|<configura>) [el] volum [<preposicio>] {name} [a|al] {volume:volume_level}[<percent>]"
requires_context:
domain: media_player
9 changes: 9 additions & 0 deletions sentences/ca/vacuum_HassVacuumReturnToBase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: ca
intents:
HassVacuumReturnToBase:
data:
- sentences:
- "(torn(a|i)) <name> [a [la] (base|casa)]"
- "fes que <name> ([re]torni|vagi) [a [la] (base|casa)]"
requires_context:
domain: vacuum
9 changes: 9 additions & 0 deletions sentences/ca/vacuum_HassVacuumStart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: ca
intents:
HassVacuumStart:
data:
- sentences:
- <engega> <name> [en marxa]
- (arrenca|pasa)[r] <name> [en marxa]
requires_context:
domain: vacuum
10 changes: 10 additions & 0 deletions sentences/ca/valve_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: ca
intents:
HassSetPosition:
data:
- sentences:
- "(<obre>|<configura>) [la posició] [de] <name> a[l] <posició>"
requires_context:
domain: valve
slots:
domain: valve
12 changes: 12 additions & 0 deletions sentences/ca/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: ca
intents:
HassGetWeather:
data:
- sentences:
- quin temps fa
- com és el temps
- sentences:
- quin temps fa (a |al |a l'){name}
- com és el temps (a |al |a l'){name}
requires_context:
domain: weather
35 changes: 35 additions & 0 deletions tests/ca/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,38 @@ entities:
id: scene.festa
- name: Obre porta
id: script.obre_porta
- name: Cortina dormitori
id: cover.cortina_dormitori
area: bedroom
state:
in: tancada
out: closed
attributes:
device_class: curtain
position: "0"
- name: Clau de pas
id: valve.clau_de_pas
state: open
attributes:
position: "100"
- name: TV
id: media_player.tv
state: idle
attributes:
volume_level: "50"
- name: Aspiradora
id: vacuum.aspiradora
state: idle
- name: Barcelona
id: weather.barcelona
state: rainy
attributes:
temperature: "18"
temperature_unit: "°C"

- name: Empordà
id: weather.emporda
state: clear
attributes:
temperature: "-4"
temperature_unit: "°C"
24 changes: 24 additions & 0 deletions tests/ca/cover_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: ca
tests:
- sentences:
- "obre la cortina dormitori al 50%"
intent:
name: HassSetPosition
slots:
domain: cover
name: "Cortina dormitori"
position: 50
response: "Posició establerta"

- sentences:
- "ajusta la cortina al dormitori al 50%"
- "obre les cortines al 50 percent al dormitori"
- "aixeca les cortines del dormitori al 50 per cent"
intent:
name: HassSetPosition
slots:
domain: cover
device_class: "curtain"
area: "Dormitori"
position: 50
response: "Posició establerta"
16 changes: 16 additions & 0 deletions tests/ca/homeassistant_HassNevermind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: ca
tests:
- sentences:
- "cancela"
- "cancel·la"
- "cancel·la la comanda"
- "cancel·la l'ordre"
- "res res"
- "no res"
- "no facis cas"
- "deixa-ho"
- "oblida-ho"
- "oblida-ho tot"
intent:
name: HassNevermind
response: "No res, doncs"
14 changes: 14 additions & 0 deletions tests/ca/media_player_HassSetVolume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: ca
tests:
- sentences:
- posa el volum de la TV al 50
- posa el volum del TV al 50
- puja el volum TV al 50%
- baixa el volum de la TV al 50 per cent
- configura volum de TV al 50
intent:
name: HassSetVolume
slots:
name: TV
volume_level: 50
response: "Volum establert"
11 changes: 11 additions & 0 deletions tests/ca/vacuum_HassVacuumReturnToBase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: ca
tests:
- sentences:
- torna l'aspiradora a base
- fes que l'aspiradora torni a la base
- fes que l'aspiradora torni
intent:
name: HassVacuumReturnToBase
slots:
name: Aspiradora
response: Tornant a la base
12 changes: 12 additions & 0 deletions tests/ca/vacuum_HassVacuumStart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: ca
tests:
- sentences:
- engega la aspiradora
- engega l'aspiradora
- arrenca l'aspiradora
- pasa l'aspiradora
intent:
name: HassVacuumStart
slots:
name: Aspiradora
response: Comença la neteja
12 changes: 12 additions & 0 deletions tests/ca/valve_HassSetPosition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: ca
tests:
- sentences:
- "ajusta clau de pas al 100"
- "obre la clau de pas al 100 percent"
intent:
name: HassSetPosition
slots:
domain: valve
name: "Clau de pas"
position: 100
response: "Posició establerta"
24 changes: 24 additions & 0 deletions tests/ca/weather_HassGetWeather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: ca
tests:
- sentences:
- "quin temps fa"
- "com és el temps"
intent:
name: HassGetWeather
response: Pluja, amb una temperatura de 18 °C

- sentences:
- "quin temps fa a Barcelona"
intent:
name: HassGetWeather
slots:
name: Barcelona
response: Pluja, amb una temperatura de 18 °C

- sentences:
- "quin temps fa al Empordà"
intent:
name: HassGetWeather
slots:
name: Empordà
response: Cel clar, amb una temperatura de -4 °C

0 comments on commit 8499b91

Please sign in to comment.