-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PT-BR] New sentences and some non-translated are now translated #1798
Open
jmceara
wants to merge
6
commits into
home-assistant:untranslated-state
Choose a base branch
from
jmceara:pt-br-untranslated-changes
base: untranslated-state
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
70a232d
New sentences and some non-translated are now translated
jmceara 0b2bb15
Update fan_HassTurnOff.yaml to remove feminine form
jmceara 3bae226
Update homeassistant_HassGetState.yaml to change first sentence as su…
jmceara e379486
Update weather_HassGetWeather.yaml to add `[lá fora]`.
jmceara f8cd029
Update homeassistant_HassNevermind.yaml
jmceara 756feb2
Fix identation issue and 'Nevermind' test
jmceara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,126 @@ | ||
language: pt-br | ||
responses: | ||
intents: | ||
HassGetState: {} | ||
HassGetState: | ||
# the number of names returned is limited to 4, in case there are more, the first 3 names and the remaining count is returned | ||
# with 4 names or less, the names are joined with a comma ", " and the last name is joined with " and " | ||
one: | | ||
{{ state.state_with_unit }} | ||
|
||
one_yesno: | | ||
{% if query.matched %} | ||
Sim | ||
{% else %} | ||
Não, {{ state.state_with_unit }} | ||
{% endif %} | ||
|
||
someone_yesno: | | ||
{% if query.matched %} | ||
Sim | ||
{% else %} | ||
Não, | ||
{% if state.attributes.get("untranslated_state") == "not_home" %} | ||
{{ state.state }} | ||
{% else %} | ||
em {{ state.state }} | ||
{% endif %} | ||
{% endif %} | ||
|
||
everybody: | | ||
{% if not query.unmatched: %} | ||
Sim | ||
{% else %} | ||
{% set no_match = query.unmatched | map(attribute="name") | sort | list %} | ||
{% if no_match | length > 4 %} | ||
Não, {{ no_match[:3] | join(", ") }} e {{ (no_match | length - 3) }} mas não estão | ||
{% if state.attributes.get("untranslated_state") == "not_home" %} | ||
{{ state.state }} | ||
{% else %} | ||
em {{ state.state }} | ||
{% endif %} | ||
{%- else -%} | ||
Não, | ||
{% for name in no_match -%} | ||
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} | ||
{{ name }} | ||
{%- endfor %} {% if no_match | length > 1 %}estão{% else %}esta{% endif %} não | ||
{% if state.attributes.get("untranslated_state") == "not_home" %} | ||
{{ state.state }} | ||
{% else %} | ||
em {{ state.state }} | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
any: | | ||
{% if query.matched %} | ||
{% set match = query.matched | map(attribute="name") | sort | list %} | ||
{% if match | length > 4 %} | ||
Sim, {{ match[:3] | join(", ") }} e {{ (match | length - 3) }} mais | ||
{%- else -%} | ||
Sim, | ||
{% for name in match -%} | ||
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} | ||
{{ name }} | ||
{%- endfor -%} | ||
{% endif %} | ||
{% else %} | ||
Não | ||
{% endif %} | ||
|
||
all: | | ||
{% if not query.unmatched: %} | ||
Sim | ||
{% else %} | ||
{% set no_match = query.unmatched | map(attribute="name") | sort | list %} | ||
{% if no_match | length > 4 %} | ||
Não, {{ no_match[:3] | join(", ") }} e {{ (no_match | length - 3) }} mas não | ||
{%- else -%} | ||
Não, | ||
{% for name in no_match -%} | ||
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} | ||
{{ name }} | ||
{%- endfor %} não | ||
{% endif %} | ||
{% endif %} | ||
|
||
which: | | ||
{% if not query.matched %} | ||
(Nenhuma|Nenhum) | ||
{% else: %} | ||
{% set match = query.matched | map(attribute="name") | sort | list %} | ||
{% if match | length > 4 %} | ||
{{ match[:3] | join(", ") }} e {{ (match | length - 3) }} mas | ||
{% else %} | ||
{%- for name in match -%} | ||
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} | ||
{{ name }} | ||
{%- endfor -%} | ||
{% endif %} | ||
{% endif %} | ||
|
||
who: | | ||
{% if not query.matched %} | ||
Ninguem | ||
{% else: %} | ||
{% set match = query.matched | map(attribute="name") | sort | list %} | ||
{% if match | length > 4 %} | ||
{{ match[:3] | join(", ") }} e {{ (match | length - 3) }} outros | ||
{% else %} | ||
{%- for name in match -%} | ||
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} e {% endif -%} | ||
{{ name }} | ||
{%- endfor -%} | ||
{% endif %} | ||
{% endif %} | ||
|
||
how_many: | | ||
{{ query.matched | length }} | ||
|
||
where: | | ||
{{ slots.name | capitalize }} esta | ||
{% if state.attributes.get("untranslated_state") == "not_home" %} | ||
{{ state.state }} | ||
{% else %} | ||
em {{ state.state }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: pt-br | ||
responses: | ||
intents: | ||
HassGetWeather: | ||
default: > | ||
{% set weather_condition = { | ||
'clear': 'Céu limpo', | ||
'clear-night': 'Céu limpo', | ||
'cloudy': 'Céu nublado', | ||
'exceptional': 'Condições excepcionalmente adversas', | ||
'fog': 'Nevoeiro', | ||
'hail': 'Granizo', | ||
'lightning': 'Trovoada', | ||
'lightning-rainy': 'Chuva e trovoada', | ||
'partlycloudy': 'Céu parcialmente nublado', | ||
'pouring': 'Chuva forte', | ||
'rainy': 'Chuva', | ||
'snowy': 'Neve', | ||
'snowy-rainy': 'Chuva e neve', | ||
'sunny': 'Sol', | ||
'windy': 'Vento', | ||
'windy-variant': 'Vento e céu nublado' | ||
} %} | ||
{{ weather_condition.get((state.attributes.get('untranslated_state') | string).lower(), "") }}, com temperatura de {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: pt-br | ||
responses: | ||
intents: | ||
HassListAddItem: | ||
item_added: "Adicionei {{ slots.item }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: pt-br | ||
responses: | ||
intents: | ||
HassShoppingListAddItem: | ||
item_added: "Adicionei {{ slots.item }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,35 @@ | ||
language: pt-br | ||
intents: | ||
HassGetState: | ||
data: [] | ||
data: | ||
- sentences: | ||
- "<nome> esta {cover_states:state} [<na_zona>]" | ||
response: one_yesno | ||
requires_context: | ||
domain: cover | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "<algum> {cover_classes:device_class} [<esta>] {cover_states:state} [<na_zona>]" | ||
response: any | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "todas [as] {cover_classes:device_class} [<na_zona>] estão {cover_states:state}" | ||
response: all | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "(quais|qual|que) {cover_classes:device_class} (está|estão) {cover_states:state} [<na_zona>]" | ||
response: which | ||
slots: | ||
domain: cover | ||
|
||
- sentences: | ||
- "quantas {cover_classes:device_class} estão {cover_states:state} [<na_zona>]" | ||
response: how_many | ||
slots: | ||
domain: cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
language: pt-br | ||
intents: | ||
HassTurnOff: | ||
data: [] | ||
data: | ||
- sentences: | ||
- <fechar> [(o | a)] [(porta | portão) da] garagem | ||
response: cover | ||
slots: | ||
device_class: garage | ||
domain: cover | ||
- sentences: | ||
- <fechar> [as | os] [(cortinas | cortinados | estores | persianas)] <na_zona> | ||
response: cover | ||
slots: | ||
device_class: | ||
- blind | ||
- curtain | ||
- shutter | ||
domain: cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
language: pt-br | ||
intents: | ||
HassTurnOn: | ||
data: [] | ||
data: | ||
- sentences: | ||
- <abrir> [(o|a)] [(porta|portão) da] garagem | ||
response: cover | ||
slots: | ||
device_class: garage | ||
domain: cover | ||
|
||
- sentences: | ||
- <abrir> [as|os] [(cortinas | cortinados | estores | persianas)] <na_zona> | ||
response: cover | ||
slots: | ||
device_class: | ||
- blind | ||
- curtain | ||
- shutter | ||
domain: cover |
jmceara marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmceara marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
language: pt-br | ||
intents: | ||
HassGetState: | ||
data: [] | ||
data: | ||
- sentences: | ||
- <qual> o (estado|valor) [atual] [do|da|de] <nome> [<na_zona>] | ||
response: one | ||
excludes_context: | ||
domain: | ||
- scene | ||
- script | ||
|
||
- sentences: | ||
- <nome> está {on_off_states:state} [<na_zona>] | ||
response: one_yesno | ||
excludes_context: | ||
domain: | ||
- cover | ||
|
||
- sentences: | ||
- <algum> {on_off_domains:domain} [<esta>] {on_off_states:state} [<na_zona>] | ||
response: any | ||
|
||
- sentences: | ||
- (todos|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>] | ||
response: which | ||
|
||
- sentences: | ||
- (quantos|quantas) {on_off_domains:domain} (está|estão) {on_off_states:state} [<na_zona>] | ||
response: how_many |
jmceara marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: pt-br | ||
intents: | ||
HassNevermind: | ||
data: | ||
- sentences: | ||
- "esquece" | ||
- "deixa [(pra|para)] lá" | ||
- "cancela[r]" | ||
- "nada [não]" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add
| abs
to the if verification to cover for "-1 grau"?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I don't think it's necessary here. Can you elaborate a little more why you think we should use abs here? Tks!