Skip to content
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

[FR] Error message improvements #1895

Merged
merged 3 commits into from
Jan 25, 2024
Merged

[FR] Error message improvements #1895

merged 3 commits into from
Jan 25, 2024

Conversation

jlpouffier
Copy link
Contributor

@jlpouffier jlpouffier commented Jan 25, 2024

New error message improvements 🎉

We renamed area to pièce instead of zone.
zone is already used for zone (An external concept like your kid's school or your work place)

We felt the wording Aucun appareil ou entité appelé ... was a bit heavy for a voice interface so we simplified it to je ne connais pas l'appareil ...

The biggest change is that we now translate domains and device_classes for some errors.

Here are a few examples of interactions you will get from this PR:

  • Ouvre les rideaux du jardin
    • Before: Jardin ne continent pas de curtain
    • Now ✨: Désolé, je n'ai pas trouvé de rideaux dans jardin
  • Allume les lumières du jardin
    • Before: Jardin ne continent pas de light
    • Now ✨: Désolé, je n'ai pas trouvé de lumières dans jardin

What's "not perfect"

{area} cannot be prefaced with the correct article.

We cannot say:

  • Dans le jardin
  • Dans la cuisine
  • Dans l'entrée

... because we simply do not know

For Cover_HassTurnOn and Cover_HassTurnOff, we have a hybrid mapping of a single word: "Store" matching 3 device classes:

lists:
  ...
  cover_classes:
    values:
      - in: "store[s]"
        out:
          - "shade"
          - "blind"
          - "awning"
      - ....

When we say Ouvre les stores dans {area} ... If area does not contain any of these device classes, then unfortunately, the response will only return the first one alphabetically (awning) ....
As such
image

Note: I tried to move the order so that shade would be the first because shade is translated as "Store" .. but I think HASIL is re-ordering them alphabetically...

Note 2: Our hybrid mapping does work in case you are wondering, we are really targeting all 3 device classes as shown here (And also on the tests of this repo)

intent:
  name: HassTurnOn
slots:
  device_class:
    - shade
    - blind
    - awning
  area: jardin
  domain: cover
details:
  device_class:
    name: device_class
    value:
      - shade
      - blind
      - awning
    text: stores
  area:
    name: area
    value: jardin
    text: jardin
  domain:
    name: domain
    value: cover
    text: ''
targets: {}
match: true
sentence_template: <ouvre> [<tous>] [<le>]{cover_classes:device_class} [<dans>] [<le>]{area}
unmatched_slots: {}

This only issue is how the response is constructed, and this is not something we can control here unfortunately

EDIT
After talking to @piitaya , we are simplifying our cover device classes mapping

      - in: "store[s] [vénitien[s]]"
        out:
          - "blind"
          - "shade"

"Store" targets both type of "Store" and both device classes are now translated as "store" (and not "Store vénitien")

JLo

@jlpouffier
Copy link
Contributor Author

@piitaya
Question for you regarding the limitation on the cover device classes.
We can also simply remove the mapping for "awning", "blind" and "shade"

It would work for the other but not for our weird "Hybrid mapping"
Example:

  • Ouvre les rideaux du jardin
    • Désolé, je n'ai pas trouvé de rideaux dans jardin
  • Ouvre les volets du jardin
    • Désolé, je n'ai pas trouvé de volets dans jardin
  • Ouvre les stores du jardin
    • Désolé, je n'ai rien trouvé de correspondant dans jardin

(We fallback to the generic one)

@tetele
Copy link
Contributor

tetele commented Jan 25, 2024

Here's a thought from a poor-French-speaking-intruder :D In Romanian, I named all areas "spaces", both in the core/frontend translations and in the intents. Does "espace" make more sense in French than "pièce", which AFAIK literally means room?

@jlpouffier
Copy link
Contributor Author

@tetele I think overall "Espace" would be better as it fits open floor.
But unfortunately, this ship has sailed for the Frenchies a long time ago when we decided to name area "Pièce" everywhere.

I guess we could, one day, make an effort to change all translations in one shot to keep consistency 🙈

sentences/fr/_common.yaml Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft January 25, 2024 15:48
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@jlpouffier jlpouffier marked this pull request as ready for review January 25, 2024 15:52
@home-assistant home-assistant bot requested a review from piitaya January 25, 2024 15:52
@piitaya piitaya merged commit 5c0e124 into main Jan 25, 2024
2 checks passed
@piitaya piitaya deleted the fr-error-message-improvements branch January 25, 2024 17:16
v1k70rk4 added a commit to v1k70rk4/intents that referenced this pull request Jan 25, 2024
…r message.

Thank you to the contributors of ticket home-assistant#1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.
nagyrobi pushed a commit that referenced this pull request Jan 25, 2024
#1896)

* Updating Hungarian intentions

The current intentions are unusable, as they do not employ conjugations at any level. The entire language, which utilizes conjugations, has been updated.

Due to the nature of the Hungarian language, there's an issue where word roots change with conjugation. (For example, if the room is a kitchen, instead of "kapcsold be az összes ventilátort a konyhaban", it should be "konyhában".)

I circumvented these with suffix words, like using "piros színre" instead of "pirosra", or by changing the word order to avoid these issues. This way, it works, like "kapcsold be a konyha összes ventilátorát is."

But for correct and complete Hungarian expressions, it's advisable to use assistant aliases for room names whose endings change with conjugation, such as "szoba" (room), "konyha" (kitchen). For these, "szobá" and "konyhá" aliases should be added.

* Updating Hungarian intentions rev2

* [HU] Added the sensor_HassGetState and the 'in_here' function

with this, the Hungarian translation became 100%

Added the [in here] feature:
cover_HassTurnOff
cover_HassTurnOn
light_HassLightSet
light_HassTurnOff
light_HassTurnOn
fan_HassTurnOff
fan_HassTurnOn

New:
sensor_HassGetState

* [HU] Added the sensor_HassGetState and the 'in_here' function v2

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] bugfix

bugfix
due to the free word order, different suffixes are also needed.

* [hu] bugfix

* bugfix v2

* [HU] Translation of error messages + handling of articles in the error message.

Thank you to the contributors of ticket #1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.
nagyrobi pushed a commit that referenced this pull request Jan 27, 2024
…mber format (#1899)

* Updating Hungarian intentions

The current intentions are unusable, as they do not employ conjugations at any level. The entire language, which utilizes conjugations, has been updated.

Due to the nature of the Hungarian language, there's an issue where word roots change with conjugation. (For example, if the room is a kitchen, instead of "kapcsold be az összes ventilátort a konyhaban", it should be "konyhában".)

I circumvented these with suffix words, like using "piros színre" instead of "pirosra", or by changing the word order to avoid these issues. This way, it works, like "kapcsold be a konyha összes ventilátorát is."

But for correct and complete Hungarian expressions, it's advisable to use assistant aliases for room names whose endings change with conjugation, such as "szoba" (room), "konyha" (kitchen). For these, "szobá" and "konyhá" aliases should be added.

* Updating Hungarian intentions rev2

* [HU] Added the sensor_HassGetState and the 'in_here' function

with this, the Hungarian translation became 100%

Added the [in here] feature:
cover_HassTurnOff
cover_HassTurnOn
light_HassLightSet
light_HassTurnOff
light_HassTurnOn
fan_HassTurnOff
fan_HassTurnOn

New:
sensor_HassGetState

* [HU] Added the sensor_HassGetState and the 'in_here' function v2

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] bugfix

bugfix
due to the free word order, different suffixes are also needed.

* [hu] bugfix

* bugfix v2

* [HU] Translation of error messages + handling of articles in the error message.

Thank you to the contributors of ticket #1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.

* [HU] Optimization of response, handling of articles, correction of number format

I have corrected the responses to put the correct article in front of the word.
The number format correction involves changing 12.1 to 12,1 and replacing "-" with the word "minus".

And an attempt to find out what cover states the live system returns in the live environment. If it's English, then from now on it should also display it in Hungarian; if it's not English, then everything remains as it was.
nagyrobi pushed a commit that referenced this pull request Feb 1, 2024
* Updating Hungarian intentions

The current intentions are unusable, as they do not employ conjugations at any level. The entire language, which utilizes conjugations, has been updated.

Due to the nature of the Hungarian language, there's an issue where word roots change with conjugation. (For example, if the room is a kitchen, instead of "kapcsold be az összes ventilátort a konyhaban", it should be "konyhában".)

I circumvented these with suffix words, like using "piros színre" instead of "pirosra", or by changing the word order to avoid these issues. This way, it works, like "kapcsold be a konyha összes ventilátorát is."

But for correct and complete Hungarian expressions, it's advisable to use assistant aliases for room names whose endings change with conjugation, such as "szoba" (room), "konyha" (kitchen). For these, "szobá" and "konyhá" aliases should be added.

* Updating Hungarian intentions rev2

* [HU] Added the sensor_HassGetState and the 'in_here' function

with this, the Hungarian translation became 100%

Added the [in here] feature:
cover_HassTurnOff
cover_HassTurnOn
light_HassLightSet
light_HassTurnOff
light_HassTurnOn
fan_HassTurnOff
fan_HassTurnOn

New:
sensor_HassGetState

* [HU] Added the sensor_HassGetState and the 'in_here' function v2

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] bugfix

bugfix
due to the free word order, different suffixes are also needed.

* [hu] bugfix

* bugfix v2

* [HU] Translation of error messages + handling of articles in the error message.

Thank you to the contributors of ticket #1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.

* [HU] Optimization of response, handling of articles, correction of number format

I have corrected the responses to put the correct article in front of the word.
The number format correction involves changing 12.1 to 12,1 and replacing "-" with the word "minus".

And an attempt to find out what cover states the live system returns in the live environment. If it's English, then from now on it should also display it in Hungarian; if it's not English, then everything remains as it was.

* [HU] Correction of responses.
schizza pushed a commit to schizza/intents that referenced this pull request Mar 16, 2024
* Error message improvments

* Simplify our mapping of the cover device classes

* Update sentences/fr/_common.yaml

Co-authored-by: Paul Bottein <[email protected]>

---------

Co-authored-by: Paul Bottein <[email protected]>
schizza pushed a commit to schizza/intents that referenced this pull request Mar 16, 2024
home-assistant#1896)

* Updating Hungarian intentions

The current intentions are unusable, as they do not employ conjugations at any level. The entire language, which utilizes conjugations, has been updated.

Due to the nature of the Hungarian language, there's an issue where word roots change with conjugation. (For example, if the room is a kitchen, instead of "kapcsold be az összes ventilátort a konyhaban", it should be "konyhában".)

I circumvented these with suffix words, like using "piros színre" instead of "pirosra", or by changing the word order to avoid these issues. This way, it works, like "kapcsold be a konyha összes ventilátorát is."

But for correct and complete Hungarian expressions, it's advisable to use assistant aliases for room names whose endings change with conjugation, such as "szoba" (room), "konyha" (kitchen). For these, "szobá" and "konyhá" aliases should be added.

* Updating Hungarian intentions rev2

* [HU] Added the sensor_HassGetState and the 'in_here' function

with this, the Hungarian translation became 100%

Added the [in here] feature:
cover_HassTurnOff
cover_HassTurnOn
light_HassLightSet
light_HassTurnOff
light_HassTurnOn
fan_HassTurnOff
fan_HassTurnOn

New:
sensor_HassGetState

* [HU] Added the sensor_HassGetState and the 'in_here' function v2

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] bugfix

bugfix
due to the free word order, different suffixes are also needed.

* [hu] bugfix

* bugfix v2

* [HU] Translation of error messages + handling of articles in the error message.

Thank you to the contributors of ticket home-assistant#1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.
schizza pushed a commit to schizza/intents that referenced this pull request Mar 16, 2024
…mber format (home-assistant#1899)

* Updating Hungarian intentions

The current intentions are unusable, as they do not employ conjugations at any level. The entire language, which utilizes conjugations, has been updated.

Due to the nature of the Hungarian language, there's an issue where word roots change with conjugation. (For example, if the room is a kitchen, instead of "kapcsold be az összes ventilátort a konyhaban", it should be "konyhában".)

I circumvented these with suffix words, like using "piros színre" instead of "pirosra", or by changing the word order to avoid these issues. This way, it works, like "kapcsold be a konyha összes ventilátorát is."

But for correct and complete Hungarian expressions, it's advisable to use assistant aliases for room names whose endings change with conjugation, such as "szoba" (room), "konyha" (kitchen). For these, "szobá" and "konyhá" aliases should be added.

* Updating Hungarian intentions rev2

* [HU] Added the sensor_HassGetState and the 'in_here' function

with this, the Hungarian translation became 100%

Added the [in here] feature:
cover_HassTurnOff
cover_HassTurnOn
light_HassLightSet
light_HassTurnOff
light_HassTurnOn
fan_HassTurnOff
fan_HassTurnOn

New:
sensor_HassGetState

* [HU] Added the sensor_HassGetState and the 'in_here' function v2

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] bugfix

bugfix
due to the free word order, different suffixes are also needed.

* [hu] bugfix

* bugfix v2

* [HU] Translation of error messages + handling of articles in the error message.

Thank you to the contributors of ticket home-assistant#1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.

* [HU] Optimization of response, handling of articles, correction of number format

I have corrected the responses to put the correct article in front of the word.
The number format correction involves changing 12.1 to 12,1 and replacing "-" with the word "minus".

And an attempt to find out what cover states the live system returns in the live environment. If it's English, then from now on it should also display it in Hungarian; if it's not English, then everything remains as it was.
schizza pushed a commit to schizza/intents that referenced this pull request Mar 16, 2024
* Updating Hungarian intentions

The current intentions are unusable, as they do not employ conjugations at any level. The entire language, which utilizes conjugations, has been updated.

Due to the nature of the Hungarian language, there's an issue where word roots change with conjugation. (For example, if the room is a kitchen, instead of "kapcsold be az összes ventilátort a konyhaban", it should be "konyhában".)

I circumvented these with suffix words, like using "piros színre" instead of "pirosra", or by changing the word order to avoid these issues. This way, it works, like "kapcsold be a konyha összes ventilátorát is."

But for correct and complete Hungarian expressions, it's advisable to use assistant aliases for room names whose endings change with conjugation, such as "szoba" (room), "konyha" (kitchen). For these, "szobá" and "konyhá" aliases should be added.

* Updating Hungarian intentions rev2

* [HU] Added the sensor_HassGetState and the 'in_here' function

with this, the Hungarian translation became 100%

Added the [in here] feature:
cover_HassTurnOff
cover_HassTurnOn
light_HassLightSet
light_HassTurnOff
light_HassTurnOn
fan_HassTurnOff
fan_HassTurnOn

New:
sensor_HassGetState

* [HU] Added the sensor_HassGetState and the 'in_here' function v2

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] More flexible word order, bug fix, +2 color

More flexible word order, especially for lighting
+2 color translations
a minor bug fix
more readable code.

* [hu] bugfix

bugfix
due to the free word order, different suffixes are also needed.

* [hu] bugfix

* bugfix v2

* [HU] Translation of error messages + handling of articles in the error message.

Thank you to the contributors of ticket home-assistant#1895. This way, I learned that error messages can be processed :) Following the French model, the Hungarian error messages have now become completely Hungarian. + it also handles the articles of words.

+optimization in the Todo/Shopping list, I reduced the number of variations with the specified suffixes.

* [HU] Optimization of response, handling of articles, correction of number format

I have corrected the responses to put the correct article in front of the word.
The number format correction involves changing 12.1 to 12,1 and replacing "-" with the word "minus".

And an attempt to find out what cover states the live system returns in the live environment. If it's English, then from now on it should also display it in Hungarian; if it's not English, then everything remains as it was.

* [HU] Correction of responses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants