feat: localize all remaining components (AnimatedStats, HealthGauge, ScanSummary, Settings, Login, Signup, Success) - #7
Merged
Conversation
…ScanSummary, Settings, Login, Signup, Success) Added 66 new translation keys for AnimatedStats, HealthGauge, ScanSummaryCard, SettingsPanel, LoginForm, SignupForm, and SuccessClient. Updated all 10 non-English translation files with proper translations. https://claude.ai/code/session_01QHfXbVLhwxwmPFAQZzPrQh
Reviewer's GuideLocalizes all remaining user-facing UI strings for stats, health gauge, scan summary, settings, auth flows, and payment success across all supported languages and wires those translations into the corresponding React components. Updated class diagram for Translations and localized UI componentsclassDiagram
class Translations {
+stats_ecosystems string
+stats_risk_factors string
+stats_replacements string
+stats_client_side string
+gauge_health string
+summary_total string
+summary_critical string
+summary_high string
+summary_medium string
+summary_healthy string
+summary_known_vulnerability string
+summary_known_vulnerabilities string
+summary_deprecated_package string
+summary_deprecated_packages string
+settings_title string
+settings_close string
+settings_desc string
+settings_github_label string
+settings_github_help string
+settings_github_needs string
+settings_save string
+settings_saved string
+settings_auth_error string
+login_welcome string
+login_subtitle string
+login_email string
+login_email_placeholder string
+login_password string
+login_password_placeholder string
+login_button string
+login_loading string
+login_or string
+login_github string
+login_github_loading string
+login_no_account string
+signup_title string
+signup_subtitle string
+signup_email string
+signup_email_placeholder string
+signup_password string
+signup_password_placeholder string
+signup_button string
+signup_loading string
+signup_or string
+signup_github string
+signup_github_loading string
+signup_has_account string
+signup_check_email string
+signup_confirm_sent string
+signup_activate string
+signup_back_login string
+success_title string
+success_plan_active string
+success_unlocked string
+success_f1 string
+success_f2 string
+success_f3 string
+success_f4 string
+success_f5 string
+success_f6 string
+success_f7 string
+success_f8 string
+success_f9 string
+success_start string
+success_synced string
+success_confirming string
+success_wait string
}
class I18nProvider {
+currentLocale string
+translations Translations
}
class useT {
+t() Translations
}
class AnimatedStats {
+render()
}
class HealthGauge {
+score number
+size number
+render()
}
class ScanSummaryCard {
+summary ScanSummary
+render()
}
class SettingsPanel {
+onClose() void
+render()
}
class LoginForm {
+render()
}
class SignupForm {
+render()
}
class SuccessClient {
+render()
}
I18nProvider *-- Translations
I18nProvider ..> useT
useT ..> Translations
AnimatedStats ..> useT
HealthGauge ..> useT
ScanSummaryCard ..> useT
SettingsPanel ..> useT
LoginForm ..> useT
SignupForm ..> useT
SuccessClient ..> useT
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
SuccessClient, concatenatingplanNamewitht.success_plan_active(which starts mid-sentence in several languages) makes the full sentence awkward or ungrammatical for non-English locales; consider movingplanNameinto the translation via interpolation (e.g.success_plan_active: 'Your {{planName}} plan is now active…'). - In
SettingsPanel, the textt.settings_github_helpfollowed byt.settings_github_needsand the hardcoded English wordscopewill read oddly in other languages (e.g., German/Spanish); it would be cleaner to move the entire sentence, including the scope mention, into a single localized string with a placeholder forpublic_repo.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `SuccessClient`, concatenating `planName` with `t.success_plan_active` (which starts mid-sentence in several languages) makes the full sentence awkward or ungrammatical for non-English locales; consider moving `planName` into the translation via interpolation (e.g. `success_plan_active: 'Your {{planName}} plan is now active…'`).
- In `SettingsPanel`, the text `t.settings_github_help` followed by `t.settings_github_needs` and the hardcoded English word `scope` will read oddly in other languages (e.g., German/Spanish); it would be cleaner to move the entire sentence, including the scope mention, into a single localized string with a placeholder for `public_repo`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Localize auth, settings, summary, stats, and post-purchase UI and wire components to use the shared i18n system.
New Features:
Enhancements: