Skip to content

[codex] split localization messages#13

Merged
Guria merged 3 commits into
mainfrom
codex/split-localization-messages
May 27, 2026
Merged

[codex] split localization messages#13
Guria merged 3 commits into
mainfrom
codex/split-localization-messages

Conversation

@Guria
Copy link
Copy Markdown
Owner

@Guria Guria commented May 27, 2026

What changed

  • Split the English and Spanish message catalogs into feature-scoped JSON files.
  • Updated Inlang pathPattern configuration so Paraglide merges the split catalogs.
  • Updated localization docs with the new editing workflow and Inlang merge/export caveats.

Why

Large per-locale JSON files do not scale well as the app grows. This keeps localization source files closer to feature ownership while preserving the existing m.some_key() Paraglide API.

Validation

  • bun run prepare
  • bun run typecheck
  • mise run lint:paraglide-tree-shaking
  • push hooks: format, fallow, merge/conflict/key checks

Summary by CodeRabbit

  • New Features

    • Expanded Spanish language support with complete translations across all features.
  • Documentation

    • Updated localization guide to reflect feature-based message organization.
  • Chores

    • Restructured localization system for improved organization and maintainability.
    • Updated build configurations and CI workflows.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@Guria, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 34 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 894f72c7-7370-45f2-a4bf-45c40eb1fe7e

📥 Commits

Reviewing files that changed from the base of the PR and between 47cb6b1 and 703f37a.

📒 Files selected for processing (33)
  • .config/fallow.toml
  • .config/mise/conf.d/tasks-quality.toml
  • docs/localization.md
  • messages/en.json
  • messages/en/articles.json
  • messages/en/auth.json
  • messages/en/calculator.json
  • messages/en/chat.json
  • messages/en/connections.json
  • messages/en/core.json
  • messages/en/dashboard.json
  • messages/en/items.json
  • messages/en/pricing.json
  • messages/en/settings.json
  • messages/en/timeline.json
  • messages/en/timer.json
  • messages/en/usage.json
  • messages/es.json
  • messages/es/articles.json
  • messages/es/auth.json
  • messages/es/calculator.json
  • messages/es/chat.json
  • messages/es/connections.json
  • messages/es/core.json
  • messages/es/dashboard.json
  • messages/es/items.json
  • messages/es/pricing.json
  • messages/es/settings.json
  • messages/es/timeline.json
  • messages/es/timer.json
  • messages/es/usage.json
  • project.inlang/settings.json
  • vite.config.ts

Walkthrough

This PR migrates the localization architecture from monolithic locale files to feature-split message catalogs, updates Inlang configuration and documentation, and adds infrastructure ignore patterns for build tooling and CI workflows.

Changes

Localization Architecture Refactor

Layer / File(s) Summary
Infrastructure and tooling configuration updates
.config/fallow.toml, .config/mise/conf.d/tasks-quality.toml, .github/workflows/test.yml, vite.config.ts
Fallow, Mise, and Vite configurations add ignore patterns for scripts/steiger/** and public/mockServiceWorker.js. CI workflow switches from explicit file lists to find-based artifact movement. The prepare:msw task is added to CI preparation steps.
Localization configuration and documentation
project.inlang/settings.json, docs/localization.md
Inlang pathPattern changes from single ./messages/{locale}.json to an explicit list of feature-split paths like ./messages/{locale}/core.json, ./messages/{locale}/auth.json, etc. Documentation is updated to describe the new per-feature workflow, merge order, and locale-addition steps.
English localization migration to feature files
messages/en/articles.json, messages/en/auth.json, messages/en/calculator.json, messages/en/chat.json, messages/en/connections.json, messages/en/core.json, messages/en/dashboard.json, messages/en/items.json, messages/en/pricing.json, messages/en/settings.json, messages/en/timeline.json, messages/en/timer.json, messages/en/usage.json
English message strings are split from the removed messages/en.json into feature-specific JSON files, each defining localization keys for UI text, error states, loading messages, and pluralization patterns where applicable.
Spanish localization migration to feature files
messages/es/articles.json, messages/es/auth.json, messages/es/calculator.json, messages/es/chat.json, messages/es/connections.json, messages/es/core.json, messages/es/dashboard.json, messages/es/items.json, messages/es/pricing.json, messages/es/settings.json, messages/es/timeline.json, messages/es/timer.json, messages/es/usage.json
Spanish message strings are split from the removed messages/es.json into corresponding feature-specific JSON files with Spanish translations for all UI elements, error states, and loading copy.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Guria/modern-stack#4: CI task orchestration refactored to use tasks-quality.toml with tasks.ci configuration; this PR adds the prepare:msw task to that workflow.
  • Guria/modern-stack#8: Introduces the reatomloc_tree_shake_canary sentinel string key and tree-shaking patterns; this PR adds the same key to the migrated core.json files and aligns documentation with the localization callback pattern.

Poem

🐰 Messages spread like clover, feature by feature so fine,
English and Spanish dance in their JSON shrine,
From one big file to many, organized and bright,
Inlang reads the pathways—localization done right!

🚥 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 PR title '[codex] split localization messages' directly and clearly summarizes the main change: splitting monolithic localization message files into feature-scoped JSON files across multiple locales.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/split-localization-messages

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

Fallow audit report

No GitHub PR/MR findings.

Generated by fallow.

@Guria Guria force-pushed the codex/split-localization-messages branch 3 times, most recently from 2570a3c to 47cb6b1 Compare May 27, 2026 11:38
@Guria Guria marked this pull request as ready for review May 27, 2026 13:17
Copilot AI review requested due to automatic review settings May 27, 2026 13:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors localization sources from single per-locale JSON catalogs into feature-scoped catalogs, updating Inlang/Paraglide configuration and documentation so the app can keep using the existing m.some_key() API while improving scalability and ownership.

Changes:

  • Split messages/en.json and messages/es.json into feature-scoped files under messages/en/ and messages/es/.
  • Updated project.inlang/settings.json pathPattern so Inlang/Paraglide compiles from the split files in a defined merge order.
  • Updated localization docs and small quality/CI ignore-pattern + artifact-handling tweaks.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vite.config.ts Adds formatter/linter ignore patterns for generated/vendor-like files.
project.inlang/settings.json Switches pathPattern to an ordered list of per-feature message files.
messages/en/core.json New split English core catalog (schema + shared keys).
messages/en/auth.json New split English auth catalog.
messages/en/settings.json New split English settings catalog.
messages/en/dashboard.json New split English dashboard catalog.
messages/en/articles.json New split English articles catalog.
messages/en/connections.json New split English connections catalog.
messages/en/chat.json New split English chat catalog.
messages/en/items.json New split English items catalog (includes plural message).
messages/en/timeline.json New split English timeline catalog.
messages/en/usage.json New split English usage catalog.
messages/en/pricing.json New split English pricing catalog.
messages/en/timer.json New split English timer catalog.
messages/en/calculator.json New split English calculator catalog.
messages/es/core.json New split Spanish core catalog (schema + shared keys).
messages/es/auth.json New split Spanish auth catalog.
messages/es/settings.json New split Spanish settings catalog.
messages/es/dashboard.json New split Spanish dashboard catalog.
messages/es/articles.json New split Spanish articles catalog.
messages/es/connections.json New split Spanish connections catalog.
messages/es/chat.json New split Spanish chat catalog.
messages/es/items.json New split Spanish items catalog (includes plural message).
messages/es/timeline.json New split Spanish timeline catalog.
messages/es/usage.json New split Spanish usage catalog.
messages/es/pricing.json New split Spanish pricing catalog.
messages/es/timer.json New split Spanish timer catalog.
messages/es/calculator.json New split Spanish calculator catalog.
messages/en.json Removes old monolithic English catalog.
messages/es.json Removes old monolithic Spanish catalog.
docs/localization.md Updates docs to describe the new split-catalog workflow and merge/export caveats.
.github/workflows/test.yml Simplifies moving Fallow artifacts via find.
.config/mise/conf.d/tasks-quality.toml Adds prepare:msw to the CI task sequence.
.config/fallow.toml Ignores scripts/steiger/** for Fallow findings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/localization.md Outdated
1. Add locale code in `project.inlang/settings.json` (`locales` array).
2. Add `messages/<locale>.json`.
2. Add `messages/<locale>/*.json` matching the existing feature files.
3. Add `language_<locale>` keys to all message files.
Comment on lines +20 to +24
"./messages/{locale}/usage.json",
"./messages/{locale}/pricing.json",
"./messages/{locale}/timer.json",
"./messages/{locale}/calculator.json"
]
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
messages/en/connections.json (1)

2-2: ⚡ Quick win

Standardize ellipsis usage for consistency.

The file mixes the ellipsis character (…) in "Testing connection…" and "Reconnecting…" with three periods (...) in "Search connections...". For consistency across the UI, consider standardizing on one approach.

Typical convention: use "..." for search placeholders and either "…" or "..." for loading states, but keep it consistent within the same file and across similar message types.

🎨 Proposed fix to standardize on three periods
-	"connection_testing": "Testing connection…",
+	"connection_testing": "Testing connection...",
 	"connection_successful": "Connection successful",
-	"connection_reconnecting": "Reconnecting…",
+	"connection_reconnecting": "Reconnecting...",

Also applies to: 4-4, 21-21

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@messages/en/connections.json` at line 2, Standardize ellipsis usage by
replacing the single-character ellipsis (…) with three periods (...) for the
JSON message keys shown; update the value for "connection_testing" from "Testing
connection…" to "Testing connection..." and make the same change for the similar
keys mentioned (e.g., the "reconnecting" entry and the "Search connections..."
placeholder) so all messages in this file use the same three-period format.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@messages/en/connections.json`:
- Line 2: Standardize ellipsis usage by replacing the single-character ellipsis
(…) with three periods (...) for the JSON message keys shown; update the value
for "connection_testing" from "Testing connection…" to "Testing connection..."
and make the same change for the similar keys mentioned (e.g., the
"reconnecting" entry and the "Search connections..." placeholder) so all
messages in this file use the same three-period format.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 91cd156e-e680-46fb-b822-e354e558ebc0

📥 Commits

Reviewing files that changed from the base of the PR and between 084723e and 47cb6b1.

📒 Files selected for processing (34)
  • .config/fallow.toml
  • .config/mise/conf.d/tasks-quality.toml
  • .github/workflows/test.yml
  • docs/localization.md
  • messages/en.json
  • messages/en/articles.json
  • messages/en/auth.json
  • messages/en/calculator.json
  • messages/en/chat.json
  • messages/en/connections.json
  • messages/en/core.json
  • messages/en/dashboard.json
  • messages/en/items.json
  • messages/en/pricing.json
  • messages/en/settings.json
  • messages/en/timeline.json
  • messages/en/timer.json
  • messages/en/usage.json
  • messages/es.json
  • messages/es/articles.json
  • messages/es/auth.json
  • messages/es/calculator.json
  • messages/es/chat.json
  • messages/es/connections.json
  • messages/es/core.json
  • messages/es/dashboard.json
  • messages/es/items.json
  • messages/es/pricing.json
  • messages/es/settings.json
  • messages/es/timeline.json
  • messages/es/timer.json
  • messages/es/usage.json
  • project.inlang/settings.json
  • vite.config.ts
💤 Files with no reviewable changes (2)
  • messages/en.json
  • messages/es.json

@Guria Guria force-pushed the codex/split-localization-messages branch from 47cb6b1 to 09435a4 Compare May 27, 2026 17:16
@Guria Guria merged commit d4cd1e8 into main May 27, 2026
2 checks passed
@Guria Guria deleted the codex/split-localization-messages branch May 27, 2026 17:28
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.

2 participants