Skip to content

Conversation

@jarchenn
Copy link

@jarchenn jarchenn commented Nov 15, 2025

Description

Name of PR:

Update Translation Button Logic

1. Issue

Issue Summary:
The translation button only appeared on non-English posts, even though posts detected as English still needed translation availability for evaluation.

2. Changes

What changes did you make to resolve the issue?

  • Removed the conditional isEnglish flag check
  • Ensured translation button appears on all posts (English + non-English)
  • Updated frontend logic to consistently render translation UI
  • Cleaned up unused imports related to translation rendering

Does your change introduce new dependencies to this project? If so, list here.
N/A

3. Validation

How did you trigger the change to show that it is working?

  • Created a post in English and translation button appeared
  • Created a post in Chinese and translation button appeared
  • Triggered translation API and got expected translated JSON response
  • Rebuilt CSS after dependency install and build succeeded
  • Verified UI on local NodeBB instance with hot reload
  • Confirmed no console errors related to missing fonts

Attach screenshot(s) of the logs and UI demonstrating the change.

IMG_5741

- Removed conditional check for isEnglish flag
- Translation button now appears on both English and non-English posts
- Added @fontsource-utils/scss dependency to fix CSS build issues
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19381932022

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.004%) to 78.466%

Files with Coverage Reduction New Missed Lines %
src/activitypub/helpers.js 1 32.35%
Totals Coverage Status
Change from base Build 19282995463: -0.004%
Covered Lines: 24910
Relevant Lines: 29892

💛 - Coveralls

@joon0429
Copy link

Code was pulled on local machine/VM and worked as expected. Should ideally have more commits, but our team worked on multiple branches and multiple rounds of debugging, so minimal commits here.

Small error in the test controller with an unchecked loop, but nothing code breaking.

good work jerry! I know the team worked through a lot to get this running.

@joon0429 joon0429 merged commit 91ec206 into main Nov 15, 2025
3 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.

4 participants