Skip to content

refactor: remove npms#2155

Open
trueberryless wants to merge 6 commits intonpmx-dev:mainfrom
trueberryless:refactor/remove-npms
Open

refactor: remove npms#2155
trueberryless wants to merge 6 commits intonpmx-dev:mainfrom
trueberryless:refactor/remove-npms

Conversation

@trueberryless
Copy link
Contributor

🧭 Context

As discussed on Discord, we decided to remove all npms traces since the data is 4 years outdated.

📚 Description

https://npms.io uses and provides outdated data, like e.g. this Astro package, which is 4 years old:

image

The only place where npms is really used is custom badges, which provide SVGs via an API mainly for markdown in Readmes. We decided that no data is better than wrong data, therefore deleting all traces.

@vercel
Copy link

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 22, 2026 7:34am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 22, 2026 7:34am
npmx-lunaria Ignored Ignored Mar 22, 2026 7:34am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

📝 Walkthrough

Walkthrough

This pull request removes NPMS (npmjs.org) API integration from the application. It eliminates the NPMS mock endpoint from server cache, deletes four badge strategies (quality, popularity, maintenance, score) from the badge API endpoint, and removes the NPMS test fixture mock. It strips the score property from the npm search result type and removes associated score-based sort keys from preferences. All score-related UI components and columns across multiple Vue components are deleted, and score-related i18n translations are removed from all locale files. The PR also introduces new i18n translation keys for features like blog, error, profile, pds, and translation_status across multiple locales.

Possibly related PRs

Suggested labels

i18n, api, types, components

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly explains the removal of npms traces due to outdated data, referencing Discord discussion and providing specific context about the motivation.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@43081j
Copy link
Contributor

43081j commented Mar 19, 2026

i think the e2e badge tests need updating 👀

@trueberryless
Copy link
Contributor Author

Hmm, I discovered a lot more places where "popularity", "quality", "maintainence" and "score" are used, I'll push a commit that removes those as well, but they might not be neccessary to remove 🤔

@github-actions
Copy link

github-actions bot commented Mar 20, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/ar.json Localization changed, will be marked as complete. 🔄️
i18n/locales/az-AZ.json Localization changed, will be marked as complete. 🔄️
i18n/locales/bg-BG.json Localization changed, will be marked as complete. 🔄️
i18n/locales/bn-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/cs-CZ.json Localization changed, will be marked as complete. 🔄️
i18n/locales/de-DE.json Localization changed, will be marked as complete. 🔄️
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/es.json Localization changed, will be marked as complete. 🔄️
i18n/locales/fr-FR.json Localization changed, will be marked as complete. 🔄️
i18n/locales/hi-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/hu-HU.json Localization changed, will be marked as complete. 🔄️
i18n/locales/id-ID.json Localization changed, will be marked as complete. 🔄️
i18n/locales/it-IT.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ja-JP.json Localization changed, will be marked as complete. 🔄️
i18n/locales/kn-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/nb-NO.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ne-NP.json Localization changed, will be marked as complete. 🔄️
i18n/locales/pl-PL.json Localization changed, will be marked as complete. 🔄️
i18n/locales/pt-BR.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ru-RU.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ta-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/te-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/tr-TR.json Localization changed, will be marked as complete. 🔄️
i18n/locales/uk-UA.json Localization changed, will be marked as complete. 🔄️
i18n/locales/zh-CN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/zh-TW.json Localization changed, will be marked as complete. 🔄️
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@trueberryless
Copy link
Contributor Author

Okay, I might have missed many use cases of the four scores throughout the project. I am not totally sure if they all use npms, but they seems to show up everywhere. I'm not sure if we should maybe just remove them from custom badges, if the other occurances even use npms or what exactly to do here 🤔

Also I think a lot of i18n files would still need to be updated (remove the translations), but I didn't do it for now, because I wanted to get confirmation, whether I am doing the right thing (we are speaking of removing about 1000 lines 😅).

We can always revert the last commit, but I'd like to get a little guidance here...

@trueberryless trueberryless requested a review from 43081j March 20, 2026 14:36
@43081j
Copy link
Contributor

43081j commented Mar 22, 2026

if you can fix the type errors, looks good to me 👍

edit: ah and some conflicts with main

Copy link
Contributor

@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.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (7)
i18n/locales/zh-TW.json (1)

887-890: ⚠️ Potential issue | 🔴 Critical

Remove these orphaned sort option translations.

The quality, popularity, maintenance, and score keys are no longer referenced in the codebase. The SortKey type definition in shared/types/preferences.ts only includes downloads-week, downloads-day, downloads-month, downloads-year, and updated, and the PROVIDER_SORT_KEYS definition confirms these providers support only relevance, downloads-week, updated, and name. These four translation entries are dead code and should be removed as part of this PR's cleanup.

i18n/locales/ru-RU.json (1)

573-579: ⚠️ Potential issue | 🟡 Minor

Nest download under package.size to match the intended key path.

At Line 578, download is currently created as package.download instead of package.size.download, which can leave the expected nested key unresolved for this locale.

💡 Proposed fix
     "size": {
       "b": "{size} байт",
       "kb": "{size} КБ",
-      "mb": "{size} МБ"
-    },
-    "download": {}
+      "mb": "{size} МБ",
+      "download": {}
+    }
i18n/locales/de-DE.json (1)

856-859: ⚠️ Potential issue | 🟡 Minor

Remove orphaned sort key translations from German locale.

Lines 856–859 contain translations for quality, popularity, maintenance, and score sort keys. These keys have been removed from the functional codebase—the SORT_KEYS configuration in shared/types/preferences.ts no longer includes them, and the code comment confirms "Neither provider returns useful quality/popularity/maintenance/score values". Remove these translations from the German locale to maintain consistency with the code changes.

i18n/locales/bn-IN.json (1)

639-642: ⚠️ Potential issue | 🟠 Major

Remove these non-functional sort option translations.

The quality, popularity, maintenance, and score sort keys at lines 639–642 are orphaned. They are not included in VALID_SORT_KEYS in shared/types/preferences.ts (which permits only relevance, downloads-week, downloads-day, downloads-month, downloads-year, updated, and name). The codebase explicitly documents that these metrics "return useful values" from neither search provider—npm returns synthetic 1 values, and Algolia returns zeros. Any attempt to use these sort keys will fail validation and fall back to downloads-week-desc. Remove these orphaned translations from the i18n file.

i18n/locales/cs-CZ.json (1)

868-871: ⚠️ Potential issue | 🟠 Major

Remove unused sort option translations from all locale files.

The keys quality, popularity, maintenance, and score under filters.sort are unused legacy entries from the npms provider. The codebase documents in shared/types/preferences.ts that these return useless or synthetic values and explicitly excludes them from PROVIDER_SORT_KEYS. The actual sorting implementation in app/components/Package/ListToolbar.vue references only: relevance, downloads-week, downloads-day, downloads-month, downloads-year, published, and name.

These unused keys remain across all 26+ locale files (including en.json, de-DE.json, ar.json, etc.) and should be removed as part of the npms cleanup to avoid maintaining dead translation strings.

i18n/locales/te-IN.json (1)

640-643: ⚠️ Potential issue | 🟠 Major

Remove orphaned NPMS sort labels from translations.

Lines 640–643 contain translation entries for quality, popularity, maintenance, and score under filters.sort. These sort options are not defined in the active SortKey type (shared/types/preferences.ts), which includes only: relevance, downloads-week, downloads-day, downloads-month, downloads-year, updated, and name. These four entries are unreferenced orphaned translations from the NPMS removal and should be deleted from this file and all other locale files.

i18n/locales/hi-IN.json (1)

640-643: ⚠️ Potential issue | 🟡 Minor

Drop the leftover score-sort labels.

These are still the old NPMS-derived sort names. The corresponding score-based sort surface has been removed elsewhere in this PR, so keeping these translations behind leaves dead NPMS copy in hi-IN.json.

✂️ Proposed cleanup
       "downloads_month": "डाउनलोड्स/महीना",
       "downloads_year": "डाउनलोड्स/वर्ष",
-      "name": "नाम",
-      "quality": "गुणवत्ता",
-      "popularity": "लोकप्रियता",
-      "maintenance": "रखरखाव",
-      "score": "स्कोर"
+      "name": "नाम"
🧹 Nitpick comments (3)
i18n/locales/pl-PL.json (1)

870-873: Consider removing orphaned sort keys once npms removal is confirmed.

The quality, popularity, maintenance, and score sort translation keys at lines 870–873 may now be unused if the corresponding sort functionality has been removed with npms. Per the PR discussion, i18n removals are pending confirmation — this is a reminder to clean these up once the scope is finalised.

i18n/locales/pt-BR.json (1)

1180-1180: Prefer omitting untranslated keys instead of adding empty objects.

Using {} placeholders for new message paths can produce empty sections or type mismatches at runtime, depending on how the key is read. It’s safer to omit these keys until translated and rely on fallback locale resolution.

Suggested cleanup
-    "version_invalid_url_format": {},
@@
-  "translation_status": {
-    "table": {}
-  },

Based on learnings: In this repository, non-English locale files are allowed to omit new or changed keys and translations are completed separately.

Also applies to: 1347-1349

i18n/locales/fr-FR.json (1)

599-599: Prefer omitting untranslated placeholder objects.

Line 599 and Lines 1336-1339 add empty objects only. In this repo, untranslated non-English keys can be omitted, so removing these placeholders is usually cleaner until real French values are added.

Suggested cleanup
-    "size": {
-      "b": "{size} o",
-      "kb": "{size} ko",
-      "mb": "{size} Mo"
-    },
-    "download": {}
+    "size": {
+      "b": "{size} o",
+      "kb": "{size} ko",
+      "mb": "{size} Mo"
+    }
-  },
-  "translation_status": {
-    "table": {}
-  },
-  "action_bar": {}
+  }

Based on learnings: In the npmx.dev project, new or changed entries in i18n translation files may be omitted from non-English languages, and missing non-English keys are acceptable.

Also applies to: 1336-1339


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 01f019a5-8f9d-4a38-bc10-9290a579b2c4

📥 Commits

Reviewing files that changed from the base of the PR and between 8a8611c and 7b794a0.

📒 Files selected for processing (32)
  • app/components/Package/TableRow.vue
  • app/pages/search.vue
  • docs/content/2.guide/6.badges.md
  • i18n/locales/ar.json
  • i18n/locales/az-AZ.json
  • i18n/locales/bg-BG.json
  • i18n/locales/bn-IN.json
  • i18n/locales/cs-CZ.json
  • i18n/locales/de-DE.json
  • i18n/locales/en.json
  • i18n/locales/es.json
  • i18n/locales/fr-FR.json
  • i18n/locales/hi-IN.json
  • i18n/locales/hu-HU.json
  • i18n/locales/id-ID.json
  • i18n/locales/it-IT.json
  • i18n/locales/ja-JP.json
  • i18n/locales/kn-IN.json
  • i18n/locales/nb-NO.json
  • i18n/locales/ne-NP.json
  • i18n/locales/pl-PL.json
  • i18n/locales/pt-BR.json
  • i18n/locales/ru-RU.json
  • i18n/locales/ta-IN.json
  • i18n/locales/te-IN.json
  • i18n/locales/tr-TR.json
  • i18n/locales/uk-UA.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
  • i18n/schema.json
  • server/api/registry/badge/[type]/[...pkg].get.ts
  • test/nuxt/a11y.spec.ts
💤 Files with no reviewable changes (7)
  • app/pages/search.vue
  • docs/content/2.guide/6.badges.md
  • app/components/Package/TableRow.vue
  • i18n/schema.json
  • server/api/registry/badge/[type]/[...pkg].get.ts
  • test/nuxt/a11y.spec.ts
  • i18n/locales/en.json

"file_size_warning": "{size} müqayisə üçün 250KB limitini keçir",
"compare_versions": "fərq",
"compare_versions_title": "Versiyaları müqayisə et",
"version_invalid_url_format": {},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use a string (or omit the key) for compare.version_invalid_url_format.

Line 1149 sets this to {}, but this key is a user-facing message slot and should not be an object. Either provide a translated string or remove it to fall back to the base locale.

Suggested fix
-    "version_invalid_url_format": {},

Based on learnings: in this project, non-English locale files may omit keys that exist in English.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"version_invalid_url_format": {},

Comment on lines +594 to +595
},
"download": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Likely mis-nested key: download is outside package.size.

Line 595 currently creates package.download, not package.size.download. If the UI expects the size namespace, this key will not be resolved as intended.

Suggested fix
     "size": {
       "b": "{size} B",
       "kb": "{size} kB",
-      "mb": "{size} MB"
-    },
-    "download": {}
+      "mb": "{size} MB",
+      "download": {}
+    }

Comment on lines +602 to +603
},
"download": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

download is currently nested under package, not under package.size.

On Line 602, size is closed before Line 603, so this creates package.download instead of package.size.download. If consumers expect package.size.download, lookups will miss.

Suggested fix
-      "mb": "{size} MB"
-    },
-    "download": {}
+      "mb": "{size} MB",
+      "download": {}
+    }

"deprecated_title": "{version} (நிறுத்தப்பட்டது)",
"view_all": "{count} பதிப்பைக் காண்க | அனைத்து {count} பதிப்புகளையும் காண்க"
"view_all": "{count} பதிப்பைக் காண்க | அனைத்து {count} பதிப்புகளையும் காண்க",
"copy_alt": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

TA_FILE="i18n/locales/ta-IN.json"
EN_FILE="$(fd -a '^en\.json$' i18n/locales | head -n1)"

if [ -z "${EN_FILE}" ]; then
  echo "Could not find i18n/locales/en.json"
  exit 1
fi

export TA_FILE EN_FILE
python - <<'PY'
import json, os

ta_file = os.environ["TA_FILE"]
en_file = os.environ["EN_FILE"]

with open(en_file, encoding="utf-8") as f:
    en = json.load(f)
with open(ta_file, encoding="utf-8") as f:
    ta = json.load(f)

paths = [
    "package.versions.copy_alt",
    "package.trends.copy_alt",
    "package.download",
    "compare.version_invalid_url_format",
    "compare.file_filter_option",
]

def get_path(obj, path):
    cur = obj
    for part in path.split("."):
        if isinstance(cur, dict) and part in cur:
            cur = cur[part]
        else:
            return (False, None)
    return (True, cur)

print(f"EN file: {en_file}")
print(f"TA file: {ta_file}")
for p in paths:
    en_ok, en_val = get_path(en, p)
    ta_ok, ta_val = get_path(ta, p)
    en_type = type(en_val).__name__ if en_ok else "MISSING"
    ta_type = type(ta_val).__name__ if ta_ok else "MISSING"
    print(f"{p}: en={en_type}, ta={ta_type}")
PY

# Check where these keys are used as translation lookups.
rg -nP -t vue -t ts -t js -C2 \
"(['\"])(
package\\.versions\\.copy_alt|
package\\.trends\\.copy_alt|
package\\.download|
compare\\.version_invalid_url_format|
compare\\.file_filter_option
)\\1" .

Repository: npmx-dev/npmx.dev

Length of output: 406


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find usage of the flagged keys in code (skip vue type to avoid rg error)
echo "=== Checking usage of flagged translation keys ==="
rg -n -t ts -t js -C3 \
"(package\.versions\.copy_alt|
package\.trends\.copy_alt|
package\.download|
compare\.version_invalid_url_format|
compare\.file_filter_option)" . --max-count=20

Repository: npmx-dev/npmx.dev

Length of output: 320


🏁 Script executed:

#!/bin/bash
# Let's examine the actual structure of these keys in both files
echo "=== EN file structure for flagged keys ==="
jq '.package.versions.copy_alt, .package.trends.copy_alt, .package.download, .compare.version_invalid_url_format, .compare.file_filter_option' i18n/locales/en.json 2>/dev/null

echo ""
echo "=== TA file structure for flagged keys ==="
jq '.package.versions.copy_alt, .package.trends.copy_alt, .package.download, .compare.version_invalid_url_format, .compare.file_filter_option' i18n/locales/ta-IN.json 2>/dev/null

echo ""
echo "=== Check if these are nested keys (children) ==="
# For example, check what's inside package.versions
rg -n -U "\"copy_alt\"" i18n/locales/en.json | head -20

Repository: npmx-dev/npmx.dev

Length of output: 2240


Omit empty translation objects from ta-IN.json pending completion of translations.

These keys—package.versions.copy_alt, package.trends.copy_alt, package.download, compare.version_invalid_url_format, compare.file_filter_option—are nested translation objects that contain multiple child keys in the English file but are completely empty ({}) in ta-IN.json. Empty object placeholders will prevent proper fallback to English translations. Per project convention, omit these keys from ta-IN.json until translations are available.

Affected lines
  • Line 304: package.versions.copy_alt
  • Line 359: package.trends.copy_alt
  • Line 453: package.download
  • Lines 996–998: compare.version_invalid_url_format, compare.file_filter_option

"mb": "{size} MB"
}
},
"download": {}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect Turkish/English locale files available.
fd -a '^(tr|tr-TR|en|en-US)\.json$' i18n/locales

# 2) Compare value types for the added keys across locale files.
python - <<'PY'
import json
from pathlib import Path

root = Path("i18n/locales")
targets = [
    "package.download",
    "compare.version_invalid_url_format",
    "translation_status.table",
    "action_bar",
]

def get_type(obj, path):
    cur = obj
    for part in path.split("."):
        if not isinstance(cur, dict) or part not in cur:
            return "<missing>"
        cur = cur[part]
    return type(cur).__name__

for p in sorted(root.glob("*.json")):
    if p.name.startswith(("tr", "en")):
        data = json.loads(p.read_text(encoding="utf-8"))
        print(f"\n{p.name}")
        for key in targets:
            print(f"  {key}: {get_type(data, key)}")
PY

# 3) Check how these keys are consumed (string lookup vs object lookup).
rg -nP --type=ts --type=js --type=vue \
  'compare\.version_invalid_url_format|translation_status\.table|action_bar|package\.download'

Repository: npmx-dev/npmx.dev

Length of output: 796


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Show the actual content of these keys in en.json and tr-TR.json
python - <<'PY'
import json
from pathlib import Path

files = {
    "en.json": "i18n/locales/en.json",
    "tr-TR.json": "i18n/locales/tr-TR.json",
}

keys = [
    ("package", "download"),
    ("compare", "version_invalid_url_format"),
    ("translation_status", "table"),
    ("action_bar",),
]

for fname, fpath in files.items():
    print(f"\n{'='*60}")
    print(f"{fname}")
    print(f"{'='*60}")
    data = json.loads(Path(fpath).read_text(encoding="utf-8"))
    
    for key_path in keys:
        cur = data
        path_str = ".".join(key_path)
        found = True
        for key in key_path:
            if isinstance(cur, dict) and key in cur:
                cur = cur[key]
            else:
                found = False
                break
        
        if found:
            print(f"\n{path_str}:")
            print(f"  Type: {type(cur).__name__}")
            print(f"  Content: {json.dumps(cur, ensure_ascii=False, indent=2)}")
        else:
            print(f"\n{path_str}: <NOT FOUND>")
PY

# 2) Search for usage of these keys in templates/components
echo -e "\n\n=== Usage in codebase ==="
rg -n --type ts --type js \
  '(download|version_invalid_url_format|translation_status\.table|action_bar)' \
  -i | head -30

Repository: npmx-dev/npmx.dev

Length of output: 4041


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Search for i18n access patterns with these keys
rg -n "t\(['\"]" --type ts --type js | grep -E '(package\.download|compare\.version_invalid|translation_status\.table|action_bar)' | head -20

# 2) Also check Vue templates
rg -n '\{\{.*\$t\(' --type vue | head -20

# 3) Check i18n config for tr-TR locale setup
echo -e "\n=== i18n config for tr-TR ==="
rg -n -A 5 'tr-TR' config/i18n.ts 2>/dev/null || rg -n -A 5 'tr-TR' config/i18n.ts

# 4) Check if tr-TR is a country variant or standalone locale
echo -e "\n=== Locale configuration ==="
cat config/i18n.ts | head -80

Repository: npmx-dev/npmx.dev

Length of output: 2236


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read i18n config to see how tr-TR is set up
cat config/i18n.ts

# Also check if there's a base tr.json file
echo -e "\n=== Looking for tr.json base file ==="
fd -a '^tr\.json$' i18n/locales

Repository: npmx-dev/npmx.dev

Length of output: 11448


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check for any fallback or default locale configuration
rg -n -B 3 -A 3 'fallback|defaultLocale' config/ --type ts

# Also check nuxt i18n plugin setup
rg -n -B 3 -A 3 'fallback|strategy' nuxt.config.ts app.config.ts 2>/dev/null | head -30

Repository: npmx-dev/npmx.dev

Length of output: 43


Omit these empty objects from the translation file to allow proper fallback.

Since tr-TR.json is a standalone locale (not a variant overlay), defining keys as empty objects {} will prevent fallback to the English translations. This causes template lookups like $t('action_bar.title') to fail silently in affected components (ActionBar.vue, DownloadButton.vue, StatusByFile.vue, and the diff page). Remove the empty placeholders at lines 578, 1148, and 1314–1317 to restore fallback behaviour.

Suggested patch
@@
-    "size": {
-      "b": "{size} B",
-      "kb": "{size} kB",
-      "mb": "{size} MB"
-    },
-    "download": {}
+    "size": {
+      "b": "{size} B",
+      "kb": "{size} kB",
+      "mb": "{size} MB"
+    }
@@
-    "version_invalid_url_format": {},
@@
-  "translation_status": {
-    "table": {}
-  },
-  "action_bar": {}

@trueberryless
Copy link
Contributor Author

Autofix seems to have run some i18n script which adds in empty translations. Feel free to commit here, I have to run 👋

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