-
Notifications
You must be signed in to change notification settings - Fork 808
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
Python conversation PR - 3 #1531
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.
Copilot reviewed 47 out of 62 changed files in this pull request and generated 2 comments.
Files not reviewed (15)
- samples/app-localization/python/.env: Language not supported
- samples/app-localization/python/.gitignore: Language not supported
- samples/app-localization/python/.vscode/extensions.json: Language not supported
- samples/app-localization/python/.vscode/launch.json: Language not supported
- samples/app-localization/python/.vscode/settings.json: Language not supported
- samples/app-localization/python/.vscode/tasks.json: Language not supported
- samples/app-localization/python/appManifest/es-mx.json: Language not supported
- samples/app-localization/python/appManifest/hi-in.json: Language not supported
- samples/app-localization/python/appManifest/manifest.json: Language not supported
- samples/app-localization/python/assets/sample.json: Language not supported
- samples/app-localization/python/env/.env.local: Language not supported
- samples/app-localization/python/infra/azure.bicep: Language not supported
- samples/app-localization/python/infra/azure.parameters.json: Language not supported
- samples/app-localization/python/requirements.txt: Language not supported
- samples/app-localization/python/bots/bot.py: Evaluated as low risk
DEFAULT_LOCALE = "en-us" | ||
env = Environment(loader=FileSystemLoader("templates")) | ||
|
||
def get_translation(locale): |
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.
The get_translation
function is redundant. Use get_translated_res
from language_service.py
instead to avoid duplication and potential inconsistencies.
def get_translation(locale): | |
def get_translated_res(locale): |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
traceback.print_exc() | ||
|
||
# Send a message to the user | ||
await context.send_activity("The bot encountered an error or bug.") |
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.
The error message 'The bot encountered an error or bug.' is not informative. Consider updating it to 'The bot encountered an unexpected error. Please check the bot's logs for more details.'
await context.send_activity("The bot encountered an error or bug.") | |
await context.send_activity("The bot encountered an unexpected error. Please check the bot's logs for more details.") |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
No description provided.