Skip to content

Conversation

@userquin
Copy link
Contributor

@userquin userquin commented Feb 3, 2026

/cc @mrcego

no missing translation entries for Spanish

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 3, 2026 6:51pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 3, 2026 6:51pm
npmx-lunaria Ignored Ignored Feb 3, 2026 6:51pm

Request Review

@github-actions
Copy link

github-actions bot commented Feb 3, 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
lunaria/files/es-419.json Localization changed, will be marked as complete.
lunaria/files/es-ES.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.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This pull request adds and updates Spanish localization strings across multiple locale files. The es-419.json file receives two new top-level keys. The es.json file is expanded with 169 new lines and 20 removed lines, introducing a comprehensive new "compare" feature with selector and facets sections, additional navigation items, package metadata fields, contributor-related strings, and plural form variants for count-based messages. The lunaria/files versions for both es-419 and es-ES follow the same expansion pattern, standardising Spanish translation coverage across Latin American and European Spanish locales with identical new keys and structures for the compare functionality and metadata enhancements.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description, whilst brief and accompanied by a screenshot, is directly related to the changeset. The image demonstrates 100% Spanish translation completion, which aligns with the PR objective of including missing Spanish (es) i18n entries.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

"clear_accent": "Limpiar color de acento",
"translation_progress": "Progreso de traducción"
"translation_progress": "Progreso de traducción",
"background_themes": "Tono de fondo"
Copy link

Choose a reason for hiding this comment

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

Tema de fondo (sino, fuera background_tint, cierto?)

"no_description": "Sin descripción",
"file_counts": {
"scripts": "{count} script | {count} scripts",
"refs": "{count} ref | {count} refs",
Copy link

Choose a reason for hiding this comment

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

referencia / referencias

Copy link
Contributor Author

Choose a reason for hiding this comment

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

creo que es un diminutivo de referencias (igual no entra en pantalla)

"file_counts": {
"scripts": "{count} script | {count} scripts",
"refs": "{count} ref | {count} refs",
"assets": "{count} activo | {count} activos"
Copy link

Choose a reason for hiding this comment

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

recurso / recursos

"description": "Tamaño total de instalación incluyendo todas las dependencias"
},
"dependencies": {
"label": "Deps Directas",
Copy link

Choose a reason for hiding this comment

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

Dependencias directas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

creo que es un diminutivo de direct dependencies, no veo el usage de esto en la ui ni en ts (igual no entraba en pantalla)

"description": "Número de dependencias directas"
},
"totalDependencies": {
"label": "Deps Totales",
Copy link

Choose a reason for hiding this comment

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

Dependencias totales

Copy link
Contributor Author

Choose a reason for hiding this comment

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

creo que es un diminutivo de dependencies, no veo el usage de esto en la ui ni en ts (igual no entraba en pantalla)

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: 1

Comment on lines +8 to +10
"version": "Versión",
"built_at": "construido {0}",
"alt_logo": "logotipo de npmx",
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 | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate base locale (en.json or en-US.json) under i18n/locales
BASE=$(fd -a -I -e json 'en(-US)?\.json$' i18n/locales 2>/dev/null | head -n 1)
if [ -z "$BASE" ]; then
  echo "Base locale not found under i18n/locales (expected en.json or en-US.json)."
  # Try alternative paths
  BASE=$(fd -a -I -e json 'en(-US)?\.json$' 2>/dev/null | head -n 1)
  if [ -z "$BASE" ]; then
    echo "Could not locate base locale file anywhere."
    exit 1
  fi
fi

echo "Found base locale: $BASE"

TARGETS="lunaria/files/es-ES.json;i18n/locales/es.json;lunaria/files/es-419.json"

BASE="$BASE" TARGETS="$TARGETS" python3 <<'PY'
import json, os, re
from pathlib import Path

def flatten(obj, prefix=""):
    out = {}
    if isinstance(obj, dict):
        for k, v in obj.items():
            key = f"{prefix}.{k}" if prefix else k
            out.update(flatten(v, key))
    else:
        out[prefix] = obj
    return out

def placeholders(s):
    return set(re.findall(r"\{[^}]+\}", s))

base_path = os.environ["BASE"]
print(f"Base locale file: {base_path}")
base = Path(base_path)

if not base.exists():
    print(f"Base locale not found at {base}")
    exit(1)

base_content = base.read_text(encoding="utf-8")
base_flat = flatten(json.loads(base_content))
print(f"Flattened base locale keys: {len(base_flat)}\n")

for target in os.environ["TARGETS"].split(";"):
    t = Path(target)
    if not t.exists():
        print(f"Missing target: {t}")
        continue
    
    tgt_content = t.read_text(encoding="utf-8")
    tgt_flat = flatten(json.loads(tgt_content))
    mismatches = []
    
    for k, v in tgt_flat.items():
        if k in base_flat and isinstance(v, str) and isinstance(base_flat[k], str):
            if placeholders(v) != placeholders(base_flat[k]):
                mismatches.append((k, placeholders(base_flat[k]), placeholders(v)))
    
    if mismatches:
        print(f"\nPlaceholder mismatches for {t}:")
        for k, b, tv in mismatches[:50]:
            print(f"- {k}: base={sorted(b)} target={sorted(tv)}")
        if len(mismatches) > 50:
            print(f"... and {len(mismatches)-50} more")
    else:
        print(f"\n{t}: OK (no placeholder mismatches)")
PY

Repository: npmx-dev/npmx.dev

Length of output: 385


🏁 Script executed:

#!/bin/bash

# Check base locale file
echo "=== Checking base locale file ==="
if [ -f "i18n/locales/en-US.json" ]; then
  echo "File size:"
  wc -l "i18n/locales/en-US.json"
  echo -e "\nFirst 30 lines:"
  head -30 "i18n/locales/en-US.json"
else
  echo "File not found at i18n/locales/en-US.json"
fi

echo -e "\n=== Checking es-ES.json file ==="
if [ -f "lunaria/files/es-ES.json" ]; then
  echo "File size:"
  wc -l "lunaria/files/es-ES.json"
  echo -e "\nLines 1-20:"
  head -20 "lunaria/files/es-ES.json"
else
  echo "File not found at lunaria/files/es-ES.json"
fi

# Check if files are valid JSON
echo -e "\n=== Validating JSON ==="
python3 <<'PY'
import json
from pathlib import Path

files = [
  "i18n/locales/en-US.json",
  "lunaria/files/es-ES.json"
]

for f in files:
  p = Path(f)
  if p.exists():
    try:
      with open(p, 'r') as file:
        data = json.load(file)
      print(f"{f}: Valid JSON, top-level type: {type(data).__name__}, keys/length: {len(data) if isinstance(data, dict) else 'N/A'}")
    except Exception as e:
      print(f"{f}: Invalid JSON - {e}")
  else:
    print(f"{f}: File not found")
PY

Repository: npmx-dev/npmx.dev

Length of output: 1112


🏁 Script executed:

#!/bin/bash

# Find all locale/i18n related JSON files
echo "=== Searching for locale files with content ==="
fd -e json -type f '(en|locale)' | head -20

echo -e "\n=== Checking directory structure ==="
fd -type d 'locale|i18n' | head -20

# Look for any English locale files
echo -e "\n=== Checking all JSON files in i18n ==="
if [ -d "i18n" ]; then
  find i18n -name "*.json" -type f -exec sh -c 'echo "{}:"; wc -l "{}"' \;
fi

# Look in other common locations
echo -e "\n=== Checking common locale directories ==="
for dir in locales translations i18n messages strings; do
  if [ -d "$dir" ]; then
    echo "Found directory: $dir"
    ls -la "$dir" | head -20
  fi
done

Repository: npmx-dev/npmx.dev

Length of output: 2090


🏁 Script executed:

#!/bin/bash
set -euo pipefail

BASE="i18n/locales/en.json"
TARGETS="i18n/locales/es.json;lunaria/files/es-ES.json;lunaria/files/es-419.json"

BASE="$BASE" TARGETS="$TARGETS" python3 <<'PY'
import json, os, re
from pathlib import Path

def flatten(obj, prefix=""):
    out = {}
    if isinstance(obj, dict):
        for k, v in obj.items():
            key = f"{prefix}.{k}" if prefix else k
            out.update(flatten(v, key))
    else:
        out[prefix] = obj
    return out

def placeholders(s):
    return set(re.findall(r"\{[^}]+\}", s))

base_path = os.environ["BASE"]
print(f"Base locale file: {base_path}")
base = Path(base_path)

if not base.exists():
    print(f"Base locale not found at {base}")
    exit(1)

base_content = base.read_text(encoding="utf-8")
base_flat = flatten(json.loads(base_content))
print(f"Flattened base locale keys: {len(base_flat)}\n")

for target in os.environ["TARGETS"].split(";"):
    t = Path(target)
    if not t.exists():
        print(f"Missing target: {t}")
        continue
    
    tgt_content = t.read_text(encoding="utf-8")
    tgt_flat = flatten(json.loads(tgt_content))
    mismatches = []
    
    for k, v in tgt_flat.items():
        if k in base_flat and isinstance(v, str) and isinstance(base_flat[k], str):
            if placeholders(v) != placeholders(base_flat[k]):
                mismatches.append((k, placeholders(base_flat[k]), placeholders(v)))
    
    if mismatches:
        print(f"\nPlaceholder mismatches for {t}:")
        for k, b, tv in mismatches[:50]:
            print(f"- {k}: base={sorted(b)} target={sorted(tv)}")
        if len(mismatches) > 50:
            print(f"... and {len(mismatches)-50} more")
    else:
        print(f"{t}: OK (no placeholder mismatches)")
PY

Repository: npmx-dev/npmx.dev

Length of output: 519


Fix placeholder mismatch in Spanish translations.

Placeholder parity check reveals a mismatch in connector.status.connected_as across all Spanish locales: the base English template expects {user}, but Spanish translations include an additional {'@'} placeholder that does not exist in the source. This will cause interpolation failures at runtime. Correct the Spanish strings to match the base template's placeholder set.

@danielroe danielroe added this pull request to the merge queue Feb 3, 2026
Merged via the queue into npmx-dev:main with commit d8a30b4 Feb 3, 2026
14 checks passed
@userquin userquin deleted the add-missing-es-entries-1 branch February 3, 2026 19:03
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.

3 participants