Skip to content

P4A Checkpoint: Integrating provided UI code#38

Merged
prodiggy8 merged 5 commits into
mainfrom
p4-translation-integration
Nov 14, 2025
Merged

P4A Checkpoint: Integrating provided UI code#38
prodiggy8 merged 5 commits into
mainfrom
p4-translation-integration

Conversation

@mhk2-cmu
Copy link
Copy Markdown

@mhk2-cmu mhk2-cmu commented Nov 9, 2025

PR Coverage

  • Integrated professor-provided translation UI into NodeBB (translation button + toggle handling).
  • UI now interacts with translation logic and calls backend translation route.

New Files

  • src/translate/index.js - Translation module that calls Flask backend at localhost:8080

Modified Files

  • src/posts/create.js - Calls translation service when posts are created
  • src/posts/data.js - Sets default values for isEnglish and translatedContent fields
  • src/posts/summary.js - Includes translation fields in post summaries
  • vendor/nodebb-theme-harmony-2.1.15/templates/partials/topic/post.tpl - Adds translation button UI
  • public/src/client/topic.js - Implements button click toggle functionality
  • public/openapi schemas updated (PostObject.yaml, categories.yaml, index.yaml, posts/pid.yaml) to include isEnglish and translatedContent fields to align OpenAPI spec with new translation data.

Current Status

  • Code Complete - All integration files implemented

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 19210093389

Details

  • 15 of 19 (78.95%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.009%) to 78.361%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/translate/index.js 8 12 66.67%
Totals Coverage Status
Change from base Build 19015716200: -0.009%
Covered Lines: 24821
Relevant Lines: 29823

💛 - Coveralls

@mhk2-cmu mhk2-cmu self-assigned this Nov 9, 2025
Copy link
Copy Markdown

@prodiggy8 prodiggy8 left a comment

Choose a reason for hiding this comment

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

LGTM

@prodiggy8 prodiggy8 merged commit d678259 into main Nov 14, 2025
2 checks passed
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.

3 participants