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

feat: Translate feature added and doesn't break previous tests, new t… #30

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

Conversation

kayokuri04
Copy link
Contributor

Resolves #28

This pull request allows all users to translate a post from (almost) any language to English. NOTE: Since the API used was free (Google Translate), there could be slightly wrong translations.

Files changed:

node bb-theme-harmony/templates/partials/topic/post.tpl - Changed format to have a translate button if not in English

public/openapi/components/schemas/PostObject.yaml,
public/openapi/read/categories.yaml,
public/openapi/read/index.yaml,
public/openapi/read/topic/topic_id.yaml,
public/openapi/write/posts/pid.yaml,
public/openapi/write/posts/pid/replies.yaml,
public/src/client/topic.js -
All changed to store two variables: "english": boolean for if the post is english, "translation": string for the translation.

src/posts/create.js - Call and store translation API

src/translate/index.js - API function

@zou-Justin
Copy link
Contributor

Looks good to me!

@emiilyxie
Copy link
Contributor

Looks good, probably just fix the lint!

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.

Translate posts
3 participants