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

Program needs both Google Translate and Microsoft Translate api keys to function #49

Open
jonsnielsen opened this issue Feb 20, 2019 · 1 comment

Comments

@jonsnielsen
Copy link

If a translation key is not valid, the program raises an exception regardless if there another valid translation key.

I Think that the program should be able to run if the user only has one key.

However, I don't think it is a good idea for the program to fail if a key is provided but isn't valid since the user clearly intends to use that translation service and can go on for a long time without noticing.
But if the key is an empty string it shows that the intent is to NOT use that translation service, and the program should work if there is a valid key.

Suggestion:

  • Raise an exception if a key is provided, but is not valid.
  • Ignore if the key is an empty string
  • In "BestEfforTranslator" if there is no available translation, raise an exception
@mircealungu
Copy link
Member

This is a nice idea @jsparvath !

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

No branches or pull requests

2 participants