-
Notifications
You must be signed in to change notification settings - Fork 0
chore(i18n): translate i18n files based on en-US changes #74
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
base: greptile_combined-20260114-qodo-grep-copilot_base_chorei18n_translate_i18n_files_based_on_en-us_changes_pr261
Are you sure you want to change the base?
Conversation
Greptile SummaryThis PR adds i18n translations for model provider quota UI across 20 languages and updates the
The i18n translation additions appear correct and properly formatted across all 20 language files. Confidence Score: 0/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant QuotaPanel
participant i18n
participant Workspace
User->>QuotaPanel: View model provider quota
QuotaPanel->>Workspace: Get trial_credits & trial_credits_used
Workspace-->>QuotaPanel: Return credit values
QuotaPanel->>QuotaPanel: Calculate credits (removed Math.max)
Note over QuotaPanel: May return negative if used > total
QuotaPanel->>Workspace: Get next_credit_reset_date
Workspace-->>QuotaPanel: Return reset date
QuotaPanel->>i18n: t('modelProvider.resetDate', {resetDate: formatted})
Note over i18n: BUG: expects {date} not {resetDate}
i18n-->>QuotaPanel: Return empty/broken string
User->>QuotaPanel: Hover over provider icon
QuotaPanel->>QuotaPanel: getTooltipKey() (swapped logic)
Note over QuotaPanel: BUG: custom shows quota msg, system shows API msg
QuotaPanel->>i18n: t(getTooltipKey(), {modelName})
i18n-->>QuotaPanel: Return wrong tooltip message
QuotaPanel-->>User: Display incorrect tooltip
|
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.
2 files reviewed, 3 comments
| {t('modelProvider.resetDate', { | ||
| ns: 'common', | ||
| date: formatTime(currentWorkspace.next_credit_reset_date, t('dateFormat', { ns: 'appLog' })), | ||
| resetDate: formatTime(currentWorkspace.next_credit_reset_date, t('dateFormat', { ns: 'appLog' })), |
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.
logic: Parameter name mismatch: code passes resetDate but all i18n files expect date as placeholder (e.g., "Reset on {{date}}"). This will cause the date to not display.
| resetDate: formatTime(currentWorkspace.next_credit_reset_date, t('dateFormat', { ns: 'appLog' })), | |
| date: formatTime(currentWorkspace.next_credit_reset_date, t('dateFormat', { ns: 'appLog' })), |
Prompt To Fix With AI
This is a comment left during a code review.
Path: web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx
Line: 113:113
Comment:
**logic:** Parameter name mismatch: code passes `resetDate` but all i18n files expect `date` as placeholder (e.g., `"Reset on {{date}}"`). This will cause the date to not display.
```suggestion
date: formatTime(currentWorkspace.next_credit_reset_date, t('dateFormat', { ns: 'appLog' })),
```
How can I resolve this? If you propose a fix, please make it concise.| const { t } = useTranslation() | ||
| const { currentWorkspace } = useAppContext() | ||
| const credits = Math.max((currentWorkspace.trial_credits - currentWorkspace.trial_credits_used) || 0, 0) | ||
| const credits = (currentWorkspace.trial_credits - currentWorkspace.trial_credits_used) || 0 |
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.
logic: Removed Math.max(..., 0) wrapper. If trial_credits_used > trial_credits, credits will now be negative, potentially causing UI issues where negative credit values display. Is it expected behavior to show negative credits, or should this remain clamped to 0?
Prompt To Fix With AI
This is a comment left during a code review.
Path: web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx
Line: 50:50
Comment:
**logic:** Removed `Math.max(..., 0)` wrapper. If `trial_credits_used > trial_credits`, credits will now be negative, potentially causing UI issues where negative credit values display. Is it expected behavior to show negative credits, or should this remain clamped to 0?
How can I resolve this? If you propose a fix, please make it concise.| if (providerType === PreferredProviderTypeEnum.custom) | ||
| return 'modelProvider.card.modelSupported' | ||
| if (usingQuota) | ||
| return 'modelProvider.card.modelAPI' | ||
| return 'modelProvider.card.modelNotSupported' |
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.
logic: Swapped tooltip logic: PreferredProviderTypeEnum.custom now shows "modelSupported" (quota message) when it should show "modelAPI" (API key message), and vice versa for system providers. This reverses the intended tooltip messages.
| if (providerType === PreferredProviderTypeEnum.custom) | |
| return 'modelProvider.card.modelSupported' | |
| if (usingQuota) | |
| return 'modelProvider.card.modelAPI' | |
| return 'modelProvider.card.modelNotSupported' | |
| if (usingQuota) | |
| return 'modelProvider.card.modelSupported' | |
| if (providerType === PreferredProviderTypeEnum.custom) | |
| return 'modelProvider.card.modelAPI' |
Prompt To Fix With AI
This is a comment left during a code review.
Path: web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx
Line: 126:130
Comment:
**logic:** Swapped tooltip logic: `PreferredProviderTypeEnum.custom` now shows "modelSupported" (quota message) when it should show "modelAPI" (API key message), and vice versa for system providers. This reverses the intended tooltip messages.
```suggestion
if (usingQuota)
return 'modelProvider.card.modelSupported'
if (providerType === PreferredProviderTypeEnum.custom)
return 'modelProvider.card.modelAPI'
```
How can I resolve this? If you propose a fix, please make it concise.
Benchmark PR from qodo-benchmark#261