Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions i18n/locales/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"tap_to_search": "Tocca per cercare"
},
"blog": {
"author": {},
"author": "autore",
"atproto": {}
},
Comment on lines 79 to 82
Copy link
Copy Markdown
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) Locate locale files
itfile="$(fd -a -t f 'it-IT\.json$' . | head -n 1)"
enfile="$(fd -a -t f 'en-US\.json$' . | head -n 1 || true)"
if [[ -z "${enfile}" ]]; then
  enfile="$(fd -a -t f 'en\.json$' . | head -n 1 || true)"
fi

echo "itfile=$itfile"
echo "enfile=$enfile"

# 2) Check expected types / presence of nested keys in it-IT vs en-US
jq -r '{
  blog_author_type: (.blog.author | type),
  blog_author_view_profile_present: (if (.blog.author|type)=="object" then has("view_profile") else false end)
}' "$itfile"

if [[ -n "${enfile}" ]]; then
  jq -r '{
    blog_author_type: (.blog.author | type),
    blog_author_view_profile_present: (if (.blog.author|type)=="object" then has("view_profile") else false end)
  }' "$enfile"
fi

# 3) Confirm code usage shape (string vs nested)
rg -n "\$t\(\s*['\"]blog\.author(\.[^'\"]+)?['\"]" app --glob '!**/node_modules/**' || true

Repository: npmx-dev/npmx.dev

Length of output: 319


🏁 Script executed:

# Check the full structure of blog section in both locales
echo "=== it-IT.json blog section ==="
jq '.blog' /home/jailuser/git/i18n/locales/it-IT.json

echo -e "\n=== en-US.json blog section ==="
jq '.blog' /home/jailuser/git/i18n/locales/en-US.json

# Broader search for blog.author usage in code
echo -e "\n=== Code references to blog.author ==="
rg -n 'blog\.author' app --glob '!**/node_modules/**' -B 2 -A 2 || echo "No matches found"

Repository: npmx-dev/npmx.dev

Length of output: 1377


🏁 Script executed:

# List all locale files
echo "=== Available locale files ==="
fd -a -t f '\.json$' i18n/locales --exec basename {} \; | sort

# Check blog.author structure in other locales
echo -e "\n=== blog.author in each locale ==="
for file in $(fd -a -t f '\.json$' i18n/locales | sort); do
  echo "--- $(basename $file) ---"
  jq '.blog.author' "$file" 2>/dev/null || echo "null/missing"
done

Repository: npmx-dev/npmx.dev

Length of output: 2651


Fix structural mismatch in blog.author — currently a string, but code expects an object with nested view_profile property.

In it-IT.json, blog.author is set to the string "autore", but the code (AuthorList.vue:22) calls $t('blog.author.view_profile', { name: ... }), which requires blog.author to be an object. All other locales (en.json, de.json, fr-FR.json, etc.) correctly structure it as an object with a view_profile key; it-IT.json is the only locale with this string value, causing the translation lookup to fail and fall back to English.

Change it-IT.json from:

"blog": {
  "author": "autore",

To an object structure:

"blog": {
  "author": {
    "view_profile": "[Italian translation of 'View {name}'s profile on Bluesky']"
  },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@i18n/locales/it-IT.json` around lines 79 - 82, The it-IT locale has
blog.author as a string but the code (AuthorList.vue line referencing
$t('blog.author.view_profile', ...)) expects blog.author to be an object with a
view_profile key; update the it-IT JSON so "blog.author" is an object containing
"view_profile" with the Italian translation (e.g., "View {name}'s profile on
Bluesky") using the same interpolation token {name} as other locales so
$t('blog.author.view_profile', { name }) resolves correctly.

"settings": {
Expand Down Expand Up @@ -155,7 +155,7 @@
}
},
"profile": {
"invite": {}
"invite": "invita"
},
"package": {
Comment on lines 157 to 160
Copy link
Copy Markdown
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
itfile="$(fd -a -t f 'it-IT\.json$' . | head -n 1)"
enfile="$(fd -a -t f 'en-US\.json$' . | head -n 1 || true)"
[[ -n "$enfile" ]] || enfile="$(fd -a -t f 'en\.json$' . | head -n 1 || true)"

jq -r '{
  profile_invite_type: (.profile.invite | type),
  profile_invite_compose_text_present: (if (.profile.invite|type)=="object" then has("compose_text") else false end)
}' "$itfile"

if [[ -n "${enfile}" ]]; then
  jq -r '{
    profile_invite_type: (.profile.invite | type),
    profile_invite_compose_text_present: (if (.profile.invite|type)=="object" then has("compose_text") else false end)
  }' "$enfile"
fi

rg -n "\$t\(\s*['\"]profile\.invite(\.[^'\"]+)?['\"]" app --glob '!**/node_modules/**' || true

Repository: npmx-dev/npmx.dev

Length of output: 231


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for any reference to 'profile.invite' in any form
echo "=== Searching for all profile.invite references ==="
rg "profile\.invite" app --type ts --type tsx --type js --type json -C 2 || true

echo ""
echo "=== Searching for dynamic key construction with profile ==="
rg "profile\." app --type ts --type tsx --type js -C 1 | head -50 || true

echo ""
echo "=== Checking all uses of $t function with profile ==="
rg '\$t\(' app --type ts --type tsx -A 1 | grep -i profile | head -20 || true

Repository: npmx-dev/npmx.dev

Length of output: 289


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Directory structure of app ==="
ls -la app/ | head -20 || echo "app directory not found"

echo ""
echo "=== Searching for 'compose_text' anywhere ==="
rg "compose_text" . --glob '!node_modules' || true

echo ""
echo "=== Searching for profile references in translation calls ==="
rg "profile" app/ -i || true

echo ""
echo "=== Checking i18n file structure ==="
echo "Italian locale profile section:"
fd -t f 'it-IT\.json' . | head -1 | xargs jq '.profile' 2>/dev/null || true

echo ""
echo "English locale profile section:"
fd -t f 'en.*\.json' . | head -1 | xargs jq '.profile' 2>/dev/null || true

Repository: npmx-dev/npmx.dev

Length of output: 19583


Fix i18n structure for profile.invite in Italian locale—prevents profile.invite.compose_text resolution.

The Italian locale (it-IT.json) defines profile.invite as a string ("invita"), but the UI code calls $t('profile.invite.compose_text', { handle }) in app/pages/profile/[identity]/index.vue. Since profile.invite is a string rather than an object, the nested compose_text key cannot be resolved, triggering fallback to another locale.

Other locales (English, German, French, etc.) correctly structure profile.invite as an object with a compose_text property. Update it-IT.json to match this structure.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@i18n/locales/it-IT.json` around lines 157 - 160, Update the Italian locale so
profile.invite is an object with a compose_text property instead of a plain
string; locate the profile.invite entry in it-IT.json and replace the string
"invita" with an object matching other locales (e.g., include "compose_text" and
any other subkeys used), ensuring it aligns with the usage in
app/pages/profile/[identity]/index.vue where $t('profile.invite.compose_text', {
handle }) is called.

"not_found": "Pacchetto Non Trovato",
Expand Down Expand Up @@ -798,7 +798,7 @@
"managers": "gestori di pacchetti"
}
},
"sponsors": {},
"sponsors": "sponsors",
"oss_partners": {},
"team": {},
"contributors": {
Expand Down Expand Up @@ -1081,11 +1081,11 @@
"a11y": {
"approach": {},
"measures": {},
"limitations": {},
"contact": {}
"limitations": "limitazioni",
"contact": "contatti"
},
Comment on lines 1081 to 1086
Copy link
Copy Markdown
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
itfile="$(fd -a -t f 'it-IT\.json$' . | head -n 1)"
enfile="$(fd -a -t f 'en-US\.json$' . | head -n 1 || true)"
[[ -n "$enfile" ]] || enfile="$(fd -a -t f 'en\.json$' . | head -n 1 || true)"

jq -r '{
  a11y_limitations_type: (.a11y.limitations | type),
  a11y_limitations_title_present: (if (.a11y.limitations|type)=="object" then has("title") else false end),
  a11y_contact_type: (.a11y.contact | type)
}' "$itfile"

if [[ -n "${enfile}" ]]; then
  jq -r '{
    a11y_limitations_type: (.a11y.limitations | type),
    a11y_limitations_title_present: (if (.a11y.limitations|type)=="object" then has("title") else false end),
    a11y_contact_type: (.a11y.contact | type)
  }' "$enfile"
fi

rg -n "\$t\(\s*['\"]a11y\.limitations(\.[^'\"]+)?['\"]" app --glob '!**/node_modules/**' || true
rg -n "\$t\(\s*['\"]a11y\.contact(\.[^'\"]+)?['\"]" app --glob '!**/node_modules/**' || true

Repository: npmx-dev/npmx.dev

Length of output: 289


🏁 Script executed:

# Search more broadly for a11y key usage in the codebase
# Check different formats and search the entire repo
rg "a11y\.limitations|a11y\.contact" . --glob '!**/node_modules/**' -A 2 -B 2 | head -100

Repository: npmx-dev/npmx.dev

Length of output: 1654


🏁 Script executed:

# Also check the English locale file structure more thoroughly
fd -t f 'en' . --glob '*/locales/*' | head -5

Repository: npmx-dev/npmx.dev

Length of output: 119


🏁 Script executed:

# Look at the actual locale files to understand structure
fd -t f '\.json$' . --path '*/locales/*' | head -10

Repository: npmx-dev/npmx.dev

Length of output: 295


🏁 Script executed:

# Find and read the locale files
fd -t f '\.(json|js)$' i18n/locales/ 2>/dev/null || fd -t f '\.(json|js)$' locales/ 2>/dev/null || find . -name '*-US.json' -o -name '*-US.js' 2>/dev/null | head -1 | xargs head -200

Repository: npmx-dev/npmx.dev

Length of output: 988


🏁 Script executed:

# Get the it-IT file and show the a11y structure
fd 'it-IT\.json' . -x head -n 1200 {} | tail -n 150

Repository: npmx-dev/npmx.dev

Length of output: 7645


🏁 Script executed:

# Also check en.json or en-US.json for reference structure
find . -name 'en*.json' -path '*/locale*' | head -1 | xargs cat | jq '.a11y' 2>/dev/null || true

Repository: npmx-dev/npmx.dev

Length of output: 66


🏁 Script executed:

jq '.a11y' i18n/locales/en-US.json

Repository: npmx-dev/npmx.dev

Length of output: 66


🏁 Script executed:

# Check if a11y exists anywhere in en locales
rg "a11y" i18n/locales/en*.json

Repository: npmx-dev/npmx.dev

Length of output: 143


🏁 Script executed:

# Check what all locales have for a11y structure
for f in i18n/locales/*.json; do 
  echo "=== $(basename $f) ==="
  jq -c '.a11y // "missing"' "$f"
done | head -40

Repository: npmx-dev/npmx.dev

Length of output: 19878


Complete the a11y.limitations and a11y.contact structure in it-IT.json.

Currently, a11y.limitations and a11y.contact are defined as strings ("limitazioni" and "contatti"), but the accessibility page expects nested objects with title, p1, and link keys—for example, $t('a11y.limitations.title') and $t('a11y.contact.p1'). With the current structure, these lookups will fail. Match the structure from en.json and other locales (ar, cs, de, es, fr, hi, hu, etc.).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@i18n/locales/it-IT.json` around lines 1081 - 1086, Replace the scalar values
for a11y.limitations and a11y.contact in i18n/locales/it-IT.json with the same
nested object shape used in other locales (e.g., en.json) so lookups like
$t('a11y.limitations.title') and $t('a11y.contact.p1') work; update the
a11y.limitations key to an object containing title, p1 (and any p2/p3 if present
in en.json) and update a11y.contact to an object containing title, p1 and link
(or other keys used by the app) with Italian translations matching the structure
used by the a11y module.

"translation_status": {
"table": {}
"table": "tabella"
},
"action_bar": {}
Comment on lines 1087 to 1090
Copy link
Copy Markdown
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
itfile="$(fd -a -t f 'it-IT\.json$' . | head -n 1)"
enfile="$(fd -a -t f 'en-US\.json$' . | head -n 1 || true)"
[[ -n "$enfile" ]] || enfile="$(fd -a -t f 'en\.json$' . | head -n 1 || true)"

jq -r '{
  translation_status_table_type: (.translation_status.table | type),
  translation_status_table_file_present: (if (.translation_status.table|type)=="object" then has("file") else false end)
}' "$itfile"

if [[ -n "${enfile}" ]]; then
  jq -r '{
    translation_status_table_type: (.translation_status.table | type),
    translation_status_table_file_present: (if (.translation_status.table|type)=="object" then has("file") else false end)
  }' "$enfile"
fi

rg -n "\$t\(\s*['\"]translation_status\.table(\.[^'\"]+)?['\"]" app --glob '!**/node_modules/**' || true

Repository: npmx-dev/npmx.dev

Length of output: 255


🏁 Script executed:

#!/bin/bash
# Broader search for code usages of translation_status.table with any suffix
# Search across all file types and directories
rg "translation_status\.table\." --type-add 'template:*.{vue,html,jsx,tsx,svelte}' -t template -t js -t ts -t tsx -t jsx . 2>/dev/null || echo "No matches found"

# Also search without the dot to find any reference to translation_status.table
rg "translation_status['\"]?\s*[:\.]?\s*['\"]?table" --type js --type ts --type tsx --type jsx -A 2 -B 2 . 2>/dev/null | head -50 || echo "No JavaScript/TypeScript matches"

# Check the structure of the i18n files more carefully
fd 'en.*\.json$|it-IT\.json$' . -type f | while read f; do
  echo "=== $f ==="
  jq '.translation_status // "not found"' "$f" 2>/dev/null
done

Repository: npmx-dev/npmx.dev

Length of output: 267


🏁 Script executed:

#!/bin/bash
# Check i18n file structures directly
echo "=== Checking i18n file structures ==="
fd 'it-IT\.json$|en.*\.json$' . -type f | while read f; do
  echo "File: $f"
  jq '.translation_status // "not found"' "$f" 2>/dev/null | head -20
  echo ""
done

# Simpler search for any code referencing translation_status.table
echo "=== Search for translation_status.table in code ==="
rg "translation_status" --glob '*.{js,ts,tsx,jsx,vue}' -A 3 -B 1 . 2>/dev/null | head -100

# Search for the $t function calls with translation_status
echo "=== Search for \$t calls with translation_status ==="
rg '\$t\s*\(\s*["\047]translation_status' . --glob '*.{js,ts,tsx,jsx,vue}' 2>/dev/null

Repository: npmx-dev/npmx.dev

Length of output: 7534


🏁 Script executed:

#!/bin/bash
# Check the full structure of translation_status in the i18n files
echo "=== en-US.json structure ==="
fd 'en.*\.json$' . -type f | head -1 | xargs jq '.translation_status' | head -50

echo ""
echo "=== it-IT.json structure ==="
fd 'it-IT\.json$' . -type f | xargs jq '.translation_status' | head -50

Repository: npmx-dev/npmx.dev

Length of output: 480


🏁 Script executed:

#!/bin/bash
# Find and examine the locale files directly
echo "=== Finding locale files ==="
find . -name "*-IT.json" -o -name "en-US.json" -o -name "en.json" 2>/dev/null | head -10

echo ""
echo "=== Checking it-IT.json ==="
find . -name "it-IT.json" 2>/dev/null | head -1 | xargs cat | jq '.translation_status' 2>/dev/null | head -80

echo ""
echo "=== Checking en-US.json or en.json ==="
find . -name "en-US.json" -o -name "en.json" 2>/dev/null | head -1 | xargs cat | jq '.translation_status' 2>/dev/null | head -80

Repository: npmx-dev/npmx.dev

Length of output: 264


🏁 Script executed:

#!/bin/bash
# Check en.json specifically since en-US.json returned null
echo "=== Checking en.json ==="
cat ./i18n/locales/en.json | jq '.translation_status' 2>/dev/null | head -100

echo ""
echo "=== Full view of all three files' translation_status ==="
for file in ./i18n/locales/en-US.json ./i18n/locales/en.json ./i18n/locales/it-IT.json; do
  echo "File: $file"
  jq '.translation_status' "$file" 2>/dev/null
  echo ""
done

Repository: npmx-dev/npmx.dev

Length of output: 2816


Fix i18n structure for translation_status.table (breaks nested keys in Italian locale).

The Italian translation sets translation_status.table to the string "tabella", but the source locale (en.json) defines it as an object with keys: file, status, error, empty, and file_link. The UI component (StatusByFile.unused.vue) resolves nested keys such as $t('translation_status.table.file') and $t('translation_status.table.status'), which will fail to resolve from the Italian locale. Replace the string with the proper object structure matching the English source.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@i18n/locales/it-IT.json` around lines 1087 - 1090, translation_status.table
in the Italian locale is a string "tabella" but must be an object matching the
English source so nested lookups like $t('translation_status.table.file') used
in StatusByFile.unused.vue resolve correctly; replace the scalar
translation_status.table with an object that includes the keys file, status,
error, empty, and file_link (using the Italian equivalents) so the structure
mirrors en.json and nested $t calls work.

}
Loading