Skip to content

feat: localize the weekly quota menu bar prefix - #32

Merged
lonewolfyx merged 1 commit into
mainfrom
feat/weekly-quota-prefix-i18n
Jul 16, 2026
Merged

lonewolfyx merged 1 commit into
mainfrom
feat/weekly-quota-prefix-i18n

Conversation

@lonewolfyx

@lonewolfyx lonewolfyx commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Replace the hardcoded "1w" weekly-quota prefix shown in the menu bar with a localized shortWeek string, so the prefix follows the app language instead of always rendering the English abbreviation.

  • I18n: add shortWeek key — en "Weekly", zh-Hans "周剩"
  • CodexRateLimitService: return I18n.current.shortWeek for the 10080-min (1w) rate-limit window instead of the literal "1w"
  • MenuBarQuotaView: use I18n.current.shortWeek for both the initial label and the empty-snapshot fallback, dropping the remaining "1w" literals

Co-Authored-By: Claude noreply@anthropic.com

Summary by CodeRabbit

  • Localization
    • Localized weekly quota labels in English and Simplified Chinese.
    • Replaced the hardcoded “1w” label with the appropriate translated text across quota displays.

Replace the hardcoded "1w" weekly-quota prefix shown in the menu bar with a localized `shortWeek` string, so the prefix follows the app language instead of always rendering the English abbreviation.

- I18n: add `shortWeek` key — en "Weekly", zh-Hans "周剩"
- CodexRateLimitService: return `I18n.current.shortWeek` for the 10080-min (1w) rate-limit window instead of the literal "1w"
- MenuBarQuotaView: use `I18n.current.shortWeek` for both the initial label and the empty-snapshot fallback, dropping the remaining "1w" literals

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 501a18d3-c3e8-4f34-9825-118680dbb0ad

📥 Commits

Reviewing files that changed from the base of the PR and between 058e06d and ea12f39.

📒 Files selected for processing (3)
  • Sources/AgentBar/Localization/I18n.swift
  • Sources/AgentBar/Services/CodexRateLimitService.swift
  • Sources/AgentBar/UI/MenuBarQuotaView.swift

📝 Walkthrough

Walkthrough

The PR adds a localized shortWeek string for English and Simplified Chinese, then replaces hardcoded weekly quota labels in the rate-limit service and menu bar quota view.

Changes

Localized weekly labels

Layer / File(s) Summary
Add short-week translations
Sources/AgentBar/Localization/I18n.swift
Adds the shortWeek localization field with English and Simplified Chinese values.
Apply localized weekly labels
Sources/AgentBar/Services/CodexRateLimitService.swift, Sources/AgentBar/UI/MenuBarQuotaView.swift
Uses I18n.current.shortWeek for weekly window titles and menu bar quota labels.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: localizing the weekly quota menu bar prefix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/weekly-quota-prefix-i18n

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lonewolfyx
lonewolfyx merged commit 9450e10 into main Jul 16, 2026
1 check passed
@lonewolfyx
lonewolfyx deleted the feat/weekly-quota-prefix-i18n branch July 16, 2026 03:06
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.

1 participant