- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13
feat: add translation status display switcher #298
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a configuration option to control the display of translation status indicators on the website. This allows administrators to toggle translation status visibility while ensuring community content status is always shown.
- Introduces a new displayTranslationStatusboolean configuration flag
- Modifies the BaseTemplate component to conditionally render translation status based on the flag
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description | 
|---|---|
| website/src/metadata.ts | Adds displayTranslationStatusconfiguration flag defaulting to true | 
| website/src/components/templates/BaseTemplate.tsx | Updates rendering logic to conditionally show translation status based on flag | 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Could you do a quick review? @YDX-2147483647 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, but the <Header> (rate of translation) also needs to be updated.
6eeacb4    to
    a80b895      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine now!
Besides, I notice that after removing <TranslationCoverageBadge>, the search bar  seemed to lean to the right.
 
The search bar is mathematically located at the center of the page, but <main> is slightly left aligned, causing this illusion.
In <BaseTemplate>, the width of the left side bar (<SideNavigation>) is lg:w-64, but that of the right side bar (<TableOfContents>) is lg:w-72. Therefore, <main> is not centered.
However, the misalignment is hardly noticeable, and I think it can be ignored.
cf. #233 (comment)