Skip to content
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

Fix i18n.json formatting to prevent unnecessary PRs #195

Closed
maxprilutskiy opened this issue Sep 5, 2024 · 1 comment
Closed

Fix i18n.json formatting to prevent unnecessary PRs #195

maxprilutskiy opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels
wip Work in progress

Comments

@maxprilutskiy
Copy link
Contributor

maxprilutskiy commented Sep 5, 2024

What

Our CLI is overwriting the i18n.json file with its default JSON format, even when the file is already formatted by tools like Prettier. This causes unnecessary pull requests with just formatting changes.

Example PR: https://github.com/calcom/cal.com/pull/16505/files

Diff:

diff --git a/i18n.json b/i18n.json
index c81e05b176f10..2761b147de5d1 100644
--- a/i18n.json
+++ b/i18n.json
@@ -24,7 +24,9 @@
   },
   "buckets": {
     "json": {
-      "include": ["apps/web/public/static/locales/[locale]/common.json"]
+      "include": [
+        "apps/web/public/static/locales/[locale]/common.json"
+      ]
     }
   }
-}
+}

Root cause: Our config file migration mechanism overwrites the entire file to update older formats to newer ones, disregarding existing formatting.

@maxprilutskiy
Copy link
Contributor Author

Next step: #197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress
Projects
None yet
Development

No branches or pull requests

1 participant