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
Feat: add translate text function #43
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.
Great PR! 🤯 We left some comments during the review, please check them out.
node/translate_text/README.md
Outdated
"source": "en", | ||
"target": "es" |
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.
Please rename this to:
"source": "en", | |
"target": "es" | |
"from": "en", | |
"to": "es" |
This is important so that we're consistent between our different languages.
node/translate_text/README.md
Outdated
{ | ||
"text": "Hello from Open Runtimes 👋", | ||
"translation": "Saludos desde Open Runtime 👋" | ||
} |
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.
Please make sure to follow the requirements for the response.
node/translate_text/README.md
Outdated
} | ||
``` | ||
|
||
## 📝 Environment Variables |
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.
Let's name these Variables instead of Environment Variables.
node/translate_text/README.md
Outdated
- This function is designed for use with Appwrite Cloud Functions. You can learn more about it in [Appwrite docs](https://appwrite.io/docs/functions). | ||
- This example is compatible with NodeJS 17.0. Other versions may work but are not guarenteed to work as they haven't been tested. |
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.
No need for leading space.
Pleas also update the Node version.
node/translate_text/src/index.js
Outdated
let translatedText = ""; | ||
|
||
if(provider==='google'){ | ||
translatedText = await googleProvider(req.payload).catch((e)=>console.log(e)); |
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.
On error, please makes sure to return an error response as detailed in the issue.
Thank you so much for the PR 🤩. We're adding the |
I have made the requsted changes. Please tell if any changes required. |
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.
Hey 👋 awesome work on your PR! We've approved your work and it'll be merged soon!
THANK YOU! All changes merged 🥳 Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord. You can accept the invite by visiting https://github.com/orgs/appwrite/invitation. By joining our team, you will officially be an Appwrite maintainer on GitHub. You can change your membership visibility settings, so your new Appwrite team membership badge will show up on your personal GitHub profile. Please feel free to look for more PRs you might be interested in helping with on our long list of Hacktoberfest friendly issues and help make Appwrite better :) |
This PR should close appwrite/appwrite#4142
Description
Implemented
translate text
function using different providers.Currently the supoorted providers are :
Screenshots
Translation using Google
Translation using Azure
Translation using AWS