Skip to content

Commit

Permalink
[PT-BR] Update sentence (#2792)
Browse files Browse the repository at this point in the history
* [PT-BR] improving the sentences
  • Loading branch information
luyzfernando08 authored Dec 27, 2024
1 parent 730e1be commit dc9d0a8
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 32 deletions.
4 changes: 2 additions & 2 deletions responses/pt-br/HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ responses:

which: |
{% if not query.matched %}
(Nenhuma|Nenhum)
Nenhuma
{% else: %}
{% set match = query.matched | map(attribute="name") | sort | list %}
{% if match | length > 4 %}
Expand All @@ -101,7 +101,7 @@ responses:

who: |
{% if not query.matched %}
Ninguem
Ninguém
{% else: %}
{% set match = query.matched | map(attribute="name") | sort | list %}
{% if match | length > 4 %}
Expand Down
22 changes: 21 additions & 1 deletion responses/pt-br/HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@ language: pt-br
responses:
intents:
HassTurnOff:
default: "{{ slots.name }} desligado"
default: >-
{% set translations = {
"button": "botão",
"camera": "câmera",
"input_button": "botão",
"alarm_control_panel": "alarme",
"automation": "automação",
"fan": "ventilador",
"climate": "termostato",
"humidifier": "umidificador",
"input_boolean": "interruptor",
"siren": "sirene",
"water_heater": "aquecedor de água",
"light": "luz",
"switch": "interruptor",
"remote": "controle remoto",
"vacuum": "aspirador de pó",
"media_player": "reprodutor de mídia",
"lawn_mower": "cortador de grama"
} %}
{{ translations.get(state.domain) }} desligado
lights_area: "Luzes apagadas"
fans: "Ventiladores desligados"
cover: "Fechado"
Expand Down
22 changes: 21 additions & 1 deletion responses/pt-br/HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,27 @@ language: pt-br
responses:
intents:
HassTurnOn:
default: "{{ slots.name }} ligado"
default: >-
{% set translations = {
"button": "botão",
"camera": "câmera",
"input_button": "botão",
"alarm_control_panel": "alarme",
"automation": "automação",
"fan": "ventilador",
"climate": "termostato",
"humidifier": "umidificador",
"input_boolean": "interruptor",
"siren": "sirene",
"water_heater": "aquecedor de água",
"light": "luz",
"switch": "interruptor",
"remote": "controle remoto",
"vacuum": "aspirador de pó",
"media_player": "reprodutor de mídia",
"lawn_mower": "cortador de grama"
} %}
{{ translations.get(state.domain) }} ligado
lights_area: "Acendendo luzes"
light_all: "Acendendo todas as luzes"
fans: "Ligando ventiladores"
Expand Down
24 changes: 12 additions & 12 deletions sentences/pt-br/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,34 +342,34 @@ expansion_rules:
abre: "(abra|abre|abrir)"
adicionar: "(adicione|adiciona[r])"
algum: "(algum|alguma|alguns|algumas)"
alarme: "(alarme[s]|cronômetro[s]|timer[s]|temporizador[es])"
artigos: "[(o[s]|a[s]|da|do[s]|de)]"
brilho: "{brightness}[%| porcento]"
colocar: "(coloque|coloca[r]|pôr|põe)"
cade: "(onde está [a|o]|cadê [a|o])"
cancela: "(cancele|cancela[r]|para[r]|pare)"
casa: "(casa|apartamento)"
colocar: "(coloque|coloca[r]|pôr|põe)"
# 'Curtinha' is one of the common mistakes from SSTs when user says 'cortina'
cortina: "(cortina[s]|curtinha[s]|persiana[s])"
desligar: "(desliga|desligue|apaga|apague|desligar|apagar|desativa[r]|desative)"
esta: "(está|estão|existe|existem)"
fecha: "(fecha|feche|fechar)"
falta: "(falta|resta)"
juntar: "(junte|junta[r])"
ligar: "(liga[r]|ligue|acende[r]|acenda|ativa[r]|ative)"
muda: "(põe|ponha|muda|mude|altera|coloca|deixa|pôr|mudar|alterar|colocar|deixar|definir|defina|setar|ajusta[r]|ajuste)"
na_zona: "([no|na]|[da|do]) {area}"
nome: "[(o[s]|a[s])] {name}"
nome: "[<artigos>] {name}"
pausar: "(pausa[r]|pause)"
piso: "[do] [(piso|andar)] [de] {floor}"
position: "{position} [%|por cento]"
por: "(pôr|põe|ponha|definir|defina|setar|ajusta[r]|ajuste)"
position: "{position} [%|por cento]"
qual: "(que|qual|qual é|quais)"
temperatura: "{temperature}[°| graus] [{temperature_unit}]"
todas: "(todos|todas)"
ventilador: "(ventilador[es]|vento)"
volume: "{volume:volume_level}[%|por cento]"
zona: "[(o|os|a|as)] {area}"
falta: "(falta|resta)"
alarme: "(alarme[s]|cronômetro[s]|timer[s]|temporizador[es])"
pausar: "(pausa[r]|pause)"
ventilador: "(ventilador[es]|vento)"
# 'Curtinha' is one of the common mistakes from SSTs when user says 'cortina'
cortina: "(cortina[s]|curtinha[s]|persiana[s])"
artigos: "[(o[s]|a[s]|da|do[s]|de)]"
# Context awareness expansion rules
casa: "(casa|apartamento)"

# Timers
temporizador: "[(no|do|o)] [meu ]<alarme>"
Expand Down
2 changes: 1 addition & 1 deletion sentences/pt-br/climate_HassClimateGetTemperature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ intents:
data:
- sentences:
- "<qual> [a] temperatura [(do|da) {name}]"
- "<qual> a temperatura <na_zona>"
- "<qual> [a] temperatura <na_zona>"
- "a que temperatura está <zona>"
6 changes: 3 additions & 3 deletions sentences/pt-br/homeassistant_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ intents:
response: any

- sentences:
- (todos|todas) [os|as] {on_off_domains:domain} estão {on_off_states:state} [<na_zona>]
- <todas> [os|as] {on_off_domains:domain} estão {on_off_states:state} [<na_zona>]
response: all

- sentences:
- <qual> {on_off_domains:domain} (está|estão) {on_off_states:state} [<na_zona>]
- <qual> {on_off_domains:domain} <esta> {on_off_states:state} [<na_zona>]
response: which

- sentences:
- (quantos|quantas) {on_off_domains:domain} (está|estão) {on_off_states:state} [<na_zona>]
- (quantos|quantas) {on_off_domains:domain} <esta> {on_off_states:state} [<na_zona>]
response: how_many
3 changes: 2 additions & 1 deletion sentences/pt-br/homeassistant_HassRespond.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ intents:

- sentences:
- "o que eu posso (dizer|perguntar)"
- "quais são os comandos que você aceita"
response: commands

- sentences:
- "quem (fez|criou) você"
- "quem (fez|criou) você"
response: creator
2 changes: 1 addition & 1 deletion sentences/pt-br/homeassistant_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ intents:
HassTurnOff:
data:
- sentences:
- "<desligar> [a[s]|o[s]] [luz[es]|interruptor[es]|ventilador] [do|da] <nome>"
- "<desligar> <nome> [<na_zona>]"
excludes_context:
domain:
- binary_sensor
Expand Down
2 changes: 1 addition & 1 deletion sentences/pt-br/homeassistant_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ intents:
HassTurnOn:
data:
- sentences:
- "<ligar> [a[s]|o[s]] [luz[es]|interruptor[es]] [do|da] {name}"
- "<ligar> <nome> [<na_zona>]"
excludes_context:
domain:
- binary_sensor
Expand Down
2 changes: 1 addition & 1 deletion sentences/pt-br/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ intents:
domain: "light"
response: "lights_area"
- sentences:
- "<desligar> [tod[a|o]s] [(o[s]| a[s])] (luz[es]| lâmpada[s]) (da|de) casa"
- "<desligar> [tod[a|o]s] [(o[s]| a[s])] (luz[es]| lâmpada[s]) (da|de|do) <casa>"
slots:
domain: "light"
response: "light_all"
Expand Down
8 changes: 4 additions & 4 deletions sentences/pt-br/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ intents:
HassTurnOn:
data:
- sentences:
- "<ligar> [tod[a|o]s] [(o[s]| a[s])] (luz[es]| lâmpada[s]) <na_zona>"
- "<ligar> [<todas>] [(o[s]| a[s])] (luz[es]| lâmpada[s]) <na_zona>"
slots:
domain: "light"
response: "lights_area"
- sentences:
- "<ligar> [tod[a|o]s] [(o[s]| a[s])] (luz[es]| lâmpada[s]) (da|de) casa"
- "<ligar> [<todas>] [(o[s]| a[s])] (luz[es]| lâmpada[s]) (da|do|de) <casa>"
slots:
domain: "light"
response: "light_all"
- sentences:
- "<ligar> [tod[a|o]s] [(o[s]| a[s])] (luz[es]| lâmpada[s]) <piso>"
- "<ligar> [<todas>] [(o[s]| a[s])] (luz[es]| lâmpada[s]) <piso>"
slots:
domain: "light"
response: "lights_floor"
- sentences:
- "<ligar> [(todas | todos)] [(o | os | a | as)] (luz[es]| lâmpada[s]) [aqui] [onde estou]"
- "<ligar> [<todas>] [(o|os|a|as)] (luz[es]| lâmpada[s]) [aqui] [onde estou]"
slots:
domain: "light"
requires_context:
Expand Down
1 change: 1 addition & 0 deletions tests/pt-br/homeassistant_HassRespond.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ tests:

- sentences:
- "o que eu posso dizer?"
- "quais são os comandos que você aceita"
intent:
name: HassRespond
response: "Para saber o que você pode perguntar, visite H.A. ponto I.O. barra voice."
Expand Down
2 changes: 1 addition & 1 deletion tests/pt-br/homeassistant_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ tests:
name: HassTurnOff
slots:
name: Ventilador da sala
response: "Ventilador da sala desligado"
response: "ventilador desligado"
2 changes: 1 addition & 1 deletion tests/pt-br/homeassistant_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ tests:
name: HassTurnOn
slots:
name: Ventilador da sala
response: "Ventilador da sala ligado"
response: "ventilador ligado"
3 changes: 2 additions & 1 deletion tests/pt-br/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tests:
slots:
domain: light
area: Sala de Estar
response: desligado
response: luz desligado

# Turn off home lights
- sentences:
Expand All @@ -60,6 +60,7 @@ tests:
- apaga luzes da casa
- desligar luz de casa
- desligue luz da casa
- apagar todas as luzes de casa
intent:
name: HassTurnOff
slots:
Expand Down
3 changes: 2 additions & 1 deletion tests/pt-br/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tests:
slots:
domain: light
area: Sala de Estar
response: ligado
response: luz ligado

# Turn on home lights
- sentences:
Expand All @@ -65,6 +65,7 @@ tests:
- liga luzes da casa
- ligar luz de casa
- acende luz da casa
- ligar todas as luzes de casa
intent:
name: HassTurnOn
slots:
Expand Down

0 comments on commit dc9d0a8

Please sign in to comment.