intents icon indicating copy to clipboard operation
intents copied to clipboard

[PT-BR] New sentences and some non-translated are now translated

Open jmceara opened this issue 1 year ago • 16 comments

As requested by @tetele in https://github.com/home-assistant/intents/discussions/1768#discussioncomment-7830669

based on https://github.com/home-assistant/intents/pull/1767

waiting for: https://github.com/home-assistant/core/pull/105524

jmceara avatar Dec 15 '23 19:12 jmceara

I hope it's ok now.

jmceara avatar Dec 15 '23 19:12 jmceara

There are currently 3 PRs for PT-BR with several overlapping intents: https://github.com/home-assistant/intents/pull/1798 https://github.com/home-assistant/intents/pull/1783 https://github.com/home-assistant/intents/pull/1413

I'm flagging them here so we can clear those upon merge.

PS: they are all missing the label lang:pt-br, don't know why the bot missed them.

llluis avatar Jan 10 '24 02:01 llluis

Hi guys, when will this PR be merged? Who needs to approve

Jhonattan-Souza avatar Jan 16 '24 01:01 Jhonattan-Souza

I can't find it atm, but I remember telling @jmceara somewhere that he shouldn't place all of the Brazilian Portuguese translations in this PR. If I haven't, I apologize and I'm saying it now.

So... the untranslated-state branch is strictly for exposing the untranslated weather and person states to the sentences, for better handling in some limited situations. That will get merged into main depending on what happens to the upstream PR.

But until then, if you want to have pt-br translated regardless of what happens in the core, you should create a PR with the translations against the main branch, not against the untranslated-state branch. If you do, @synesthesiam can take a look and decide to merge the PR and grant someone pt-br language leader status, so they can handle this stuff on their own.

Also, regarding this specific PR, I've approved the CI pipeline run and linting fails, so it can't be merged regardless. Run script/lint locally to fix the issues and push another commit.

tetele avatar Jan 16 '24 08:01 tetele

Hi @tetele , thank you ! @llluis @jmceara Can we do this ? If you guys agree, I can send this PR to the main branch

Jhonattan-Souza avatar Jan 16 '24 16:01 Jhonattan-Souza

Hi @tetele , thank you ! @llluis @jmceara Can we do this ? If you guys agree, I can send this PR to the main branch

Agree! I'm not sure why it failed on test. I have done all tests locally before send to github, all passed.

jmceara avatar Jan 16 '24 16:01 jmceara

@jmceara Hi, the issue here is that there are 16 space characters left in the 7th line of the sentences/pt-br/homeassistant_HassNevermind.yaml file.

If there are errors remaining after running the script/lint, it is advisable to reconfigure the environment using the script/setup command.

v1k70rk4 avatar Feb 06 '24 20:02 v1k70rk4

Hi @jmceara, Could we try to fix and pull this?

gohlas avatar Feb 19 '24 12:02 gohlas

Hi @jmceara, Could we try to fix and pull this?

Done! All tests passed, including lint. Can you check now @Jhonattan-Souza @v1k70rk4 @llluis

jmceara avatar Feb 19 '24 14:02 jmceara

My vote doesn't count but I reviewed and approved anyways. :)

llluis avatar Feb 19 '24 14:02 llluis

If everything is perfect, then @luyzfernando08 it's your job to press the Approve and Run button :) You are the language leader. Unfortunately, I don't understand Portuguese :) :D

v1k70rk4 avatar Feb 19 '24 15:02 v1k70rk4

If everything is perfect, then @luyzfernando08 it's your job to press the Approve and Run button :) You are the language leader. Unfortunately, I don't understand Portuguese :) :D

Well, I guess my application was not accepted LOL

jmceara avatar Feb 19 '24 16:02 jmceara

Thanks @jmceara! That was a quick reply. :) I am just going through more details here. Looks like this will not be merged as it is now. According to @tetele, we need to make this changes against the main branch, not untranslated-state. Regarding #1848 for weather and person, this PR already contains the changes for pt-br, should this be split in two different PRs? @tetele

gohlas avatar Feb 20 '24 10:02 gohlas

This branch into which the PR was merged is the "untranslated-state" branch, which as you also write, is intended for the handling of weather and person in "untranslated-state" to function if introduced.

What is currently in there will fit, it won't bother anyone :). But what you would like to use from this that is not related to person and weather, you will need to implement into the main as well.

It's important that any potentially missing parts of the _common.yaml file should definitely be added to the main branch too, to make the future merging easier.

v1k70rk4 avatar Feb 20 '24 10:02 v1k70rk4

Thanks @v1k70rk4 , Ok, then we can just create a new PR against main, without the changes in HassGetState.yaml and HassGetWeather.yaml. Did I understand it right?

gohlas avatar Feb 20 '24 13:02 gohlas

@gohlas As you say :) If there is no conflict, there is nothing preventing this.

But you can also put the weather sentences in reduced mode into the main, so it will only display the temperature, but it will also work there.

For example, in the responses\pt-br\HassGetWeather.yaml file, this is the response:

language: pt-br
responses:
  intents:
    HassGetWeather:
      default: >
        {{ state.attributes.get('temperature') }} {{ state.attributes.get('temperature_unit') }}

v1k70rk4 avatar Feb 20 '24 14:02 v1k70rk4