fix(i18n): use %{product_name} in api_keys usage_instructions (#1505)#2000
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR updates API key settings translation files across five languages (Spanish, Norwegian, Polish, Turkish, Traditional Chinese) to replace hardcoded "Maybe API" product name references with dynamic ChangesLocalization branding updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Closes #1505.
The issue body singled out
en.ymlandfr.ymlas still hardcoding "Maybe API" in thesettings.api_keys.show.current_api_key.usage_instructionskey, but those two were actually fixed in #1501 — both already use%{product_name}. The same swap was never applied to the other locales, so five translations still ship the stale brand.The view side is already wired up: every render site passes
product_name: product_nameinto thet()call:So the fix is locale-only.
Changes
Five one-line edits in
config/locales/views/settings/api_keys/:nb.yml:39…til Maybe API-et:…til %{product_name} API-et:pl.yml:40…do API Maybe:…do API %{product_name}:tr.yml:39Maybe API'ye istek…%{product_name} API'ye istek…es.yml:40…a la API de Maybe:…a la API de %{product_name}:zh-TW.yml:40在向 Maybe API 發送…在向 %{product_name} API 發送…Each preserves the surrounding grammar (article, particle, spacing) of its translation.
Verified
The only remaining "Maybe" reference is in
tr.yml:18(no_api_key.description) — see "Out of scope" below.Out of scope
tr.yml:18no_api_key.description— still says "Maybe verilerinize…". Skipped because:t(".no_api_key.description")with noproduct_name:argument, so swapping the literal for%{product_name}would leave the placeholder unresolved.usage_instructionskey, which is what the issue scopes.Happy to address as a follow-up if reviewers want a broader branding sweep.
Test plan
bin/rails runner 'I18n.available_locales.each { |l| I18n.with_locale(l) { I18n.t("settings.api_keys.show.current_api_key.usage_instructions", product_name: "Sure") } }; puts "ok"'— sanity check that every locale parses and resolves the placeholder.bin/rails testbin/rubocop -f github -abundle exec erb_lint ./app/**/*.erb -aRails.configuration.x.product_nameis set to) instead of "Maybe".Summary by CodeRabbit