فهرست منبع

Merge pull request #11709 from overleaf/jpa-cleanup-more-locales

[web] scripts: translations: exclude more places from i18n tracking

GitOrigin-RevId: bd2204c59b73638358348c0742cc3b2cb45f248a
Thomas 3 سال پیش
والد
کامیت
6811b9085a
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 0 2
      services/web/locales/en.json
  2. 5 2
      services/web/scripts/translations/cleanupUnusedLocales.js

+ 0 - 2
services/web/locales/en.json

@@ -1635,8 +1635,6 @@
   "x_price_for_first_month": "<0>__price__</0> for your first month",
   "x_price_for_first_year": "<0>__price__</0> for your first year",
   "x_price_for_y_months": "<0>__price__</0> for your first __discountMonths__ months",
-  "x_price_per_month": "<0>__price__</0> per month",
-  "x_price_per_year": "<0>__price__</0> per year",
   "year": "year",
   "yes_move_me_to_personal_plan": "Yes, move me to the Personal plan",
   "yes_that_is_correct": "Yes, that’s correct",

+ 5 - 2
services/web/scripts/translations/cleanupUnusedLocales.js

@@ -26,6 +26,8 @@ async function main() {
     //   - exclude locales files
     //   - exclude public assets
     //   - exclude third-party dependencies
+    //   - exclude scripts
+    //   - exclude tests
     // - read all the source files
     `
     find . -type f \
@@ -33,8 +35,9 @@ async function main() {
       -not -path './frontend/extracted-translations.json' \
       -not -path './locales/*' \
       -not -path './public/*' \
-      -not -path '*node_modules/*' \
-      -not -path ./scripts/ukamf/ukfederation-metadata.xml \
+      -not -path '*/node_modules/*' \
+      -not -path '*/scripts/*' \
+      -not -path '*/tests/*' \
     | xargs cat
     `,
     {