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

Python conversation PR - 3 #1531

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Jegadeesh-MSFT
Copy link
Contributor

No description provided.

@Pawank-MSFT Pawank-MSFT requested a review from Copilot January 22, 2025 07:18
Copy link

@Copilot Copilot AI left a 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):
Copy link
Preview

Copilot AI Jan 22, 2025

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.

Suggested change
def get_translation(locale):
def get_translated_res(locale):

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
traceback.print_exc()

# Send a message to the user
await context.send_activity("The bot encountered an error or bug.")
Copy link
Preview

Copilot AI Jan 22, 2025

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.'

Suggested change
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.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant