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

IN translation 59 #85

Merged
merged 49 commits into from
Jun 10, 2020
Merged

IN translation 59 #85

merged 49 commits into from
Jun 10, 2020

Conversation

cch5ng
Copy link
Collaborator

@cch5ng cch5ng commented Jun 9, 2020

(update) I only tested with spanish and was relying on google to do the original language auto detection, let me know if that is an issue with other languages

basic functionality is in per #59

  • added message length limit check/error
  • most recent message should always display (added scrolling, it looks a little funny; maybe most recent should be on top)
  • style: need to expand the height of the bubble on longer messages
  • created a new route to get friend's language, required by google translate api but not previously available on FE

TODO

  • cleanup the server logic (reduce the # times BE is getting the languages list for conversation and clean up that overall logic)
    • see if possible to return the conversation languages along with the click on contact (initiate chat) event
  • do a little further testing
  • (low) try to separate out socket logic from www file

@cch5ng
Copy link
Collaborator Author

cch5ng commented Jun 9, 2020

caveats:

  • (updated) there is not much error handling for the translation API request

    • at most I am saving the untranslated message to the db but additional error handling is not defined
  • (old) some items are hard-coded like:

    • languages
    • translating language to 2 character code used by the API

@cch5ng
Copy link
Collaborator Author

cch5ng commented Jun 9, 2020

this is the current flow I have used:
1 client sends message
2 server makes Google Translate API call
3 server sends updated message with translation to client
4 server saves updated message to db (only after translation unless translation fails)

would there be any reason to save a new message to the db before the translation is requested?

@cch5ng cch5ng marked this pull request as draft June 9, 2020 01:37
@cch5ng cch5ng changed the title [in progress] IN translation 59 IN translation 59 Jun 9, 2020
@cch5ng cch5ng marked this pull request as ready for review June 9, 2020 22:35
@sina-jamshidi
Copy link

this is the current flow I have used:
1 client sends message
2 server makes Google Translate API call
3 server sends updated message with translation to client
4 server saves updated message to db (only after translation unless translation fails)

would there be any reason to save a new message to the db before the translation is requested?

This flow makes sense. I don't think you need to save before the translation

@cch5ng cch5ng merged commit 6c30d46 into dev Jun 10, 2020
@cch5ng cch5ng deleted the in_translation_59 branch June 12, 2020 12:21
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.

2 participants