Skip to content

Implementation of translation frontend for P4#57

Open
sabualha wants to merge 5 commits into
mainfrom
professor-llm-code
Open

Implementation of translation frontend for P4#57
sabualha wants to merge 5 commits into
mainfrom
professor-llm-code

Conversation

@sabualha
Copy link
Copy Markdown

@sabualha sabualha commented Nov 9, 2025

Summary

  • Implements translation feature for NodeBB posts
  • Adds 'isEnglish' and 'translatedContent' field to posts
  • Adds UI toggle to view translated content

Changes

  • Backend: Added translation module and integrated with post creation
  • OpenAPI Schemas: updated PostObject schema with translation fields
  • Frontend: Added translation toggle button UI in post templates
  • Client-Side: Javascript to show/hide translated content

@sabualha sabualha requested a review from aalmuhan November 9, 2025 17:38
@coveralls
Copy link
Copy Markdown

coveralls commented Nov 9, 2025

Pull Request Test Coverage Report for Build 19214060715

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 78.183%

Totals Coverage Status
Change from base Build 19212036180: 0.006%
Covered Lines: 24849
Relevant Lines: 29906

💛 - Coveralls

Copy link
Copy Markdown

@aalmuhan aalmuhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR cleanly introduces translation support across the API and frontend. The new isEnglish and translatedContent fields are added consistently to all OpenAPI surfaces, the topic template integrates the translation toggle smoothly, and the frontend behavior is simple and intuitive. The backend wiring in Posts.create, summary, and modifyPost is aligned and keeps the flow straightforward. Overall, the implementation is clear, cohesive, and fits well into the existing NodeBB structure.

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.

4 participants