-
Notifications
You must be signed in to change notification settings - Fork 526
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
[DA] added support for shopping list #2173
base: main
Are you sure you want to change the base?
Conversation
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 @dkrasmussen
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
a7f7aeb
to
58eee07
Compare
📝 Walkthrough📝 WalkthroughWalkthroughThe update introduces Danish language support for the intent Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
cf513f1
to
b32e7cd
Compare
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- responses/da/HassShoppingListAddItem.yaml (1 hunks)
- sentences/da/_common.yaml (1 hunks)
- sentences/da/shopping_list_HassShoppingListAddItem.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- responses/da/HassShoppingListAddItem.yaml
🔇 Additional comments (5)
sentences/da/shopping_list_HassShoppingListAddItem.yaml (4)
1-1
: LGTM! Correct language declaration.The language code "da" follows the ISO 639-1 standard for Danish.
2-4
: LGTM! Intent structure follows conventions.The intent name
HassShoppingListAddItem
follows Home Assistant naming conventions with the "Hass" prefix.
10-12
: Verify the shopping_list_item entity definition.The expansion rules look good, but let's verify the existence of the
shopping_list_item
entity in the common definitions.#!/bin/bash # Check if shopping_list_item entity is defined in _common.yaml rg "shopping_list_item:" "sentences/da/_common.yaml"
9-9
: Verify the existence of the response template.Let's ensure the corresponding response file exists with the "item_added" template.
✅ Verification successful
Response template exists and is properly defined
The response template "item_added" exists in
responses/da/HassShoppingListAddItem.yaml
with the correct template structure and language-specific response text "{{ slots.item }} tilføjet".🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the response file exists and contains the required template rg -l "item_added" "responses/da/HassShoppingListAddItem.yaml"Length of output: 166
Script:
#!/bin/bash # Let's first check if the responses directory exists and list its structure fd . "responses/da" # Also check for any yaml files containing "item_added" pattern rg -l "item_added" .Length of output: 5136
Script:
#!/bin/bash # Let's check the content of the Danish response file to verify if it has the "item_added" template cat "responses/da/HassShoppingListAddItem.yaml"Length of output: 159
sentences/da/_common.yaml (1)
273-274
: LGTM! The shopping list item implementation looks good.The addition of
shopping_list_item
withwildcard: true
is correctly implemented and follows the file's structure. This will allow users to add any item to their shopping list in Danish.
- sentences: | ||
- tilføj <item> (til|på) <my_list> | ||
- skriv <item> på <my_list> | ||
- put <item> på <my_list> |
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.
🛠️ Refactor suggestion
Consider adding more Danish variations for better language coverage.
While the current patterns are valid, consider adding more natural Danish alternatives:
- "læg på <my_list>"
- "noter på <my_list>"
Also, consider replacing "put" with more commonly used Danish verbs, as "put" is more English-like.
- sentences:
- tilføj <item> (til|på) <my_list>
- skriv <item> på <my_list>
- - put <item> på <my_list>
+ - læg <item> på <my_list>
+ - noter <item> på <my_list>
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- sentences: | |
- tilføj <item> (til|på) <my_list> | |
- skriv <item> på <my_list> | |
- put <item> på <my_list> | |
- sentences: | |
- tilføj <item> (til|på) <my_list> | |
- skriv <item> på <my_list> | |
- læg <item> på <my_list> | |
- noter <item> på <my_list> |
shopping_list_item: | ||
wildcard: true |
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.
🛠️ Refactor suggestion
Consider adding common shopping items for better user experience.
While the wildcard approach provides flexibility, consider enhancing the user experience by adding common shopping items as suggestions. This could help with:
- Speech recognition accuracy
- Consistent item naming
- User guidance
Example enhancement:
shopping_list_item:
wildcard: true
values:
- in: "mælk[(en)]"
out: "mælk"
- in: "brød[(et)]"
out: "brød"
- in: "æg[(gene)]"
out: "æg"
Summary by CodeRabbit
New Features
Bug Fixes