Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .changeset/eloqnt-lint-i18n-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@node-core/website-i18n': patch
---

Remove unused and superfluous message keys from all locales, and restore
dropped ICU arguments in the Spanish EOL warning and the Traditional Chinese
package-manager notice, as reported by `eloqnt lint`.
43 changes: 43 additions & 0 deletions .eloqnt/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { defineConfig } from '@eloqnt/cli';

import localeConfig from '../packages/i18n/src/config.json' with { type: 'json' };

export default defineConfig({
srcPath: ['./apps/site'],
messages: {
path: './packages/i18n/src/locales',
locales: localeConfig
.filter(locale => locale.enabled)
.map(locale => locale.code),
sourceLocale: 'en',
format: 'json',
},
lint: {
overrides: [
{
// These keys are built at runtime, so static analysis cannot
// see which ones are in use.
keys: [
'components.containers.footer.links.*',
'components.containers.navBar.links.*',
'components.navigation.about.links.*',
'components.navigation.getInvolved.links.*',
'layouts.download.codeBox.platformInfo.*',
'layouts.blog.categories.*',
'components.eolChip.severity.*',

// These namespaces also hold statically referenced keys, so the
// dynamic ones are listed individually.
'components.metabar.author',
'components.metabar.authors',
'components.releaseModal.title',
'components.releaseModal.titleWithoutCodename',
'components.banner.default',
'components.banner.warning',
'components.banner.error',
],
rules: { 'orphan-message': 'off' },
},
],
},
});
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
if: |
(github.event_name == 'push' || github.event_name == 'merge_group') ||
(github.event_name == 'pull_request' && github.event.pull_request.head.ref != 'chore/crowdin')
run: node_modules/.bin/turbo lint lint:types prettier --cache-dir=.turbo/cache
run: node_modules/.bin/turbo lint lint:types prettier //#lint:i18n --cache-dir=.turbo/cache

- name: Save Lint Cache
# We only want to save caches on `push` events or `pull_request_target` events
Expand Down
5 changes: 0 additions & 5 deletions apps/site/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@
"link": "https://discord.gg/nodejs",
"alt": "Discord"
},
{
"icon": "mastodon",
"link": "https://social.lfx.dev/@nodejs",
"alt": "Mastodon"
},
{
"icon": "bluesky",
"link": "https://bsky.app/profile/nodejs.org",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"format": "turbo //#prettier:fix prettier:fix lint:fix",
"lint": "turbo lint",
"lint:fix": "turbo lint:fix",
"lint:i18n": "eloqnt lint",
"lint:staged": "lint-staged",
"lint:types": "turbo lint:types",
"prepare": "husky",
Expand All @@ -42,6 +43,7 @@
"devDependencies": {
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.31.1",
"@eloqnt/cli": "^0.6.9",
"@eslint/js": "~10.0.1",
"@reporters/github": "^2.0.2",
"@testing-library/react": "~16.3.2",
Expand Down
46 changes: 2 additions & 44 deletions packages/i18n/src/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
"about": "丨賵賱",
"download": "鬲賳夭賷賱",
"docs": "丕賱鬲賵孬賷賯",
"guides": "丕賱兀丿賱丞",
"learn": "鬲毓賱賾賲",
"security": "丕賱兀賲丕賳",
"certification": "丕賱丿賵乇丕鬲",
"blog": "丕賱賲丿賵賳丞",
"contribute": "丕賱賲爻丕賴賲丞"
Expand Down Expand Up @@ -70,9 +68,7 @@
},
"downloadReleasesTable": {
"version": "Node.js",
"nApiVersion": "N-API",
"codename": "丕賱丕爻賲 丕賱乇賲夭賷",
"releaseDate": "鬲丕乇賷禺 丕賱廿氐丿丕乇",
"firstReleased": "兀賵賱 廿氐丿丕乇",
"lastUpdated": "丌禺乇 鬲丨丿賷孬",
"status": "丕賱丨丕賱丞",
Expand All @@ -86,10 +82,7 @@
"releaseModal": {
"title": "Node.js v{version} ({codename})",
"titleWithoutCodename": "Node.js v{version}",
"overview": "賳馗乇丞 毓丕賲丞",
"minorVersions": "丕賱廿氐丿丕乇丕鬲 丕賱賮乇毓賷丞",
"releaseAnnouncement": "廿毓賱丕賳 丕賱廿氐丿丕乇",
"unsupportedVersionWarning": "賴匕丕 丕賱廿氐丿丕乇 禺丕乇噩 賲乇丨賱丞 丕賱氐賷丕賳丞. 賷乇噩賶 丕爻鬲禺丿丕賲 廿氐丿丕乇 賲丿毓賵賲. <link>鬲毓乇賾賮 毓賱賶 丿毓賲 EOL.</link>",
"ltsVersionFeaturesNotice": "賴賱 鬲乇賷丿 丕賱賲賷夭丕鬲 丕賱噩丿賷丿丞 賮賷 賵賯鬲 兀賯乇亘責 丕爻鬲禺丿賲 <link>兀丨丿孬 廿氐丿丕乇 賲賳 Node.js</link> 亘丿賱賸丕 賲賳 匕賱賰 賵噩乇亘 兀丨丿孬 丕賱鬲丨爻賷賳丕鬲!"
},
"eolAlert": {
Expand Down Expand Up @@ -121,7 +114,6 @@
"eolTable": {
"version": "丕賱廿氐丿丕乇",
"codename": "丕賱丕爻賲 丕賱乇賲夭賷",
"releaseDate": "鬲丕乇賷禺 丕賱廿氐丿丕乇",
"lastUpdated": "丌禺乇 鬲丨丿賷孬",
"vulnerabilities": "丕賱孬睾乇丕鬲",
"details": "丕賱鬲賮丕氐賷賱",
Expand All @@ -134,7 +126,6 @@
"npmVersion": "廿氐丿丕乇 npm",
"v8Version": "廿氐丿丕乇 V8",
"actions": {
"release": "丕賱廿氐丿丕乇",
"changelog": "爻噩賱 丕賱鬲睾賷賷乇丕鬲",
"docs": "丕賱鬲賵孬賷賯"
}
Expand All @@ -150,8 +141,7 @@
"common": {
"alertBox": {
"info": "賲毓賱賵賲丞",
"warning": "鬲丨匕賷乇",
"danger": "禺胤乇"
"warning": "鬲丨匕賷乇"
},
"breadcrumbs": {
"navigateToHome": "丕賱丕賳鬲賯丕賱 廿賱賶 丕賱氐賮丨丞 丕賱乇卅賷爻賷丞"
Expand Down Expand Up @@ -179,12 +169,10 @@
"metabar": {
"lastUpdated": "丌禺乇 鬲丨丿賷孬",
"readingTime": "賲丿丞 丕賱賯乇丕亍丞",
"addedIn": "兀囟賷賮 賮賷",
"author": "丕賱賲丐賱賮",
"authors": "丕賱賲丐賱賮賵賳",
"contribute": "丕賱賲爻丕賴賲丞",
"contributeText": "毓丿賾賱 賴匕賴 丕賱氐賮丨丞",
"viewAs": "毓乇囟 賰賭",
"tableOfContents": "噩丿賵賱 丕賱賲丨鬲賵賷丕鬲",
"metadata": "亘賷丕賳丕鬲 丕賱賲賯丕賱"
},
Expand All @@ -196,25 +184,7 @@
},
"search": {
"searchPlaceholder": "丕亘丿兀 丕賱賰鬲丕亘丞...",
"chatPlaceholder": "丕爻兀賱賳賷 毓賳 兀賷 卮賷亍",
"noResultsFoundFor": "賱賲 賷鬲賲 丕賱毓孬賵乇 毓賱賶 賳鬲丕卅噩 賱賭",
"suggestions": "丕賯鬲乇丕丨丕鬲",
"seeAll": "毓乇囟 丕賱賰賱",
"addMore": "廿囟丕賮丞 丕賱賲夭賷丿",
"clearChat": "賲爻丨 丕賱賲丨丕丿孬丞",
"errorMessage": "丨丿孬 禺胤兀 兀孬賳丕亍 賲丨丕賵賱丞 丕賱亘丨孬. 賷乇噩賶 丕賱賲丨丕賵賱丞 賲乇丞 兀禺乇賶.",
"disclaimer": "賯丿 鬲禺胤卅 賲賱禺氐丕鬲 AI. 賷乇噩賶 丕賱鬲丨賯賯 賲賳 丕賱賲毓賱賵賲丕鬲.",
"startYourSearch": "丕亘丿兀 丕賱亘丨孬",
"initErrorSearch": "鬲毓匕賾乇 鬲賴賷卅丞 禺丿賲丞 丕賱亘丨孬",
"initErrorChat": "鬲毓匕賾乇 鬲賴賷卅丞 禺丿賲丞 丕賱丿乇丿卮丞",
"chatButtonLabel": "丕賱丨氐賵賱 毓賱賶 賲賱禺氐 AI",
"searchButtonLabel": "亘丨孬",
"poweredBy": "賲丿毓賵賲 賲賳",
"suggestionOne": "賰賷賮 兀孬亘賾鬲 Node.js責",
"suggestionTwo": "賰賷賮 兀賳卮卅 禺丕丿賲 HTTP責",
"suggestionThree": "鬲乇賯賷丞 廿氐丿丕乇 Node.js",
"scrollToBottom": "丕賱鬲賲乇賷乇 廿賱賶 丕賱兀爻賮賱",
"closeChat": "廿睾賱丕賯 丕賱丿乇丿卮丞",
"keyboardShortcuts": {
"select": "賱賱丕禺鬲賷丕乇",
"navigate": "賱賱鬲賳賯賱",
Expand All @@ -229,14 +199,6 @@
}
},
"layouts": {
"blogPost": {
"author": {
"byLine": "{author, select, null {} other {亘賵丕爻胤丞 {author}貙 }}"
}
},
"blogIndex": {
"categoryName": "{category, select, all {丕賱賲丿賵賳丞} other {賲賳卮賵乇丕鬲 賲丿賵賳丞 {category}}}"
},
"blog": {
"title": "丕賱賲丿賵賳丞",
"selectCategory": "丕賱鬲氐賳賷賮丕鬲",
Expand All @@ -245,7 +207,6 @@
"announcements": "丕賱廿毓賱丕賳丕鬲",
"release": "丕賱廿氐丿丕乇丕鬲",
"vulnerability": "丕賱孬睾乇丕鬲",
"advisory-board": "丕賱賲噩賱爻 丕賱丕爻鬲卮丕乇賷",
"community": "丕賱賲噩鬲賲毓",
"feature": "賲賷夭丞",
"module": "丕賱賵丨丿丕鬲",
Expand Down Expand Up @@ -278,7 +239,6 @@
"platform": "丕賱賲賳氐丞",
"os": "賳馗丕賲 丕賱鬲卮睾賷賱",
"version": "丕賱廿氐丿丕乇",
"installMethod": "胤乇賷賯丞 丕賱鬲孬亘賷鬲",
"packageManager": "賲丿賷乇 丕賱丨夭賲",
"unknown": "睾賷乇 賲毓乇賵賮",
"platformGroups": {
Expand All @@ -288,7 +248,6 @@
},
"codeBox": {
"unsupportedVersionWarning": "賴匕丕 丕賱廿氐丿丕乇 禺丕乇噩 賲乇丨賱丞 丕賱氐賷丕賳丞. 賷乇噩賶 丕爻鬲禺丿丕賲 廿氐丿丕乇 賲丿毓賵賲 丨丕賱賷賸丕. <link>鬲毓乇賾賮 毓賱賶 丿毓賲 EOL.</link>",
"ltsVersionFeaturesNotice": "賴賱 鬲乇賷丿 丕賱賲賷夭丕鬲 丕賱噩丿賷丿丞 賮賷 賵賯鬲 兀賯乇亘責 丕爻鬲禺丿賲 <link>兀丨丿孬 廿氐丿丕乇 賲賳 Node.js</link> 亘丿賱賸丕 賲賳 匕賱賰 賵噩乇亘 兀丨丿孬 丕賱鬲丨爻賷賳丕鬲!",
"communityPlatformInfo": "胤乇賯 丕賱鬲孬亘賷鬲 丕賱鬲賷 鬲毓鬲賲丿 毓賱賶 亘乇賲噩賷丕鬲 丕賱賲噩鬲賲毓 鬲丿毓賲賴丕 丕賱賮乇賯 丕賱賲爻丐賵賱丞 毓賳 氐賷丕賳丞 鬲賱賰 丕賱亘乇賲噩賷丕鬲.",
"externalSupportInfo": "廿匕丕 賵丕噩賴鬲 兀賷 賲卮丕賰賱貙 賷乇噩賶 夭賷丕乇丞 <link>賲賵賯毓 {platform}</link>",
"noScriptDetected": "鬲鬲胤賱亘 賴匕賴 丕賱氐賮丨丞 JavaScript. 賷賲賰賳賰 鬲賳夭賷賱 Node.js 亘丿賵賳 JavaScript 毓亘乇 夭賷丕乇丞 <link>氐賮丨丞 兀乇卮賷賮 丕賱鬲賳夭賷賱丕鬲</link> 賲亘丕卮乇丞.",
Expand All @@ -300,8 +259,7 @@
"choco": "Chocolatey 賴賵 賲丿賷乇 丨夭賲 賱賭 Windows.",
"docker": "Docker 賴賵 賲賳氐丞 賱賱丨丕賵賷丕鬲.",
"n": "\"n\" 賴賵 賲丿賷乇 廿氐丿丕乇丕鬲 Node.js 賲鬲毓丿丿 丕賱賲賳氐丕鬲.",
"asdf": "\"asdf\" 賴賵 賲丿賷乇 廿氐丿丕乇丕鬲 賷毓賲賱 毓賱賶 毓丿丞 兀賳馗賲丞 鬲卮睾賷賱 賵賷丿毓賲 毓丿丞 賱睾丕鬲 亘乇賲噩賷丞.",
"volta": "\"Volta\" 賴賵 賲丿賷乇 廿氐丿丕乇丕鬲 Node.js 賲鬲毓丿丿 丕賱賲賳氐丕鬲."
"asdf": "\"asdf\" 賴賵 賲丿賷乇 廿氐丿丕乇丕鬲 賷毓賲賱 毓賱賶 毓丿丞 兀賳馗賲丞 鬲卮睾賷賱 賵賷丿毓賲 毓丿丞 賱睾丕鬲 亘乇賲噩賷丞."
}
}
},
Expand Down
46 changes: 2 additions & 44 deletions packages/i18n/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
"download": "Download",
"docs": "Docs",
"betaDocs": "Beta Docs",
"guides": "Guides",
"learn": "Learn",
"security": "Security",
"certification": "Courses",
"blog": "Blog",
"contribute": "Contribute"
Expand Down Expand Up @@ -71,9 +69,7 @@
},
"downloadReleasesTable": {
"version": "Node.js",
"nApiVersion": "N-API",
"codename": "Codename",
"releaseDate": "Released at",
"firstReleased": "First released",
"lastUpdated": "Last updated",
"status": "Status",
Expand All @@ -87,10 +83,7 @@
"releaseModal": {
"title": "Node.js v{version} ({codename})",
"titleWithoutCodename": "Node.js v{version}",
"overview": "Overview",
"minorVersions": "Minor versions",
"releaseAnnouncement": "Release Announcement",
"unsupportedVersionWarning": "This version is out of maintenance. Please use a supported version. <link>Understand EOL support.</link>",
"ltsVersionFeaturesNotice": "Want new features sooner? Get the <link>latest Node.js version</link> instead and try the latest improvements!"
},
"eolAlert": {
Expand Down Expand Up @@ -122,7 +115,6 @@
"eolTable": {
"version": "Version",
"codename": "Codename",
"releaseDate": "Released at",
"lastUpdated": "Last updated",
"vulnerabilities": "Vulnerabilities",
"details": "Details",
Expand All @@ -135,7 +127,6 @@
"npmVersion": "npm version",
"v8Version": "V8 version",
"actions": {
"release": "Release",
"changelog": "Changelog",
"docs": "Docs"
}
Expand All @@ -151,8 +142,7 @@
"common": {
"alertBox": {
"info": "Info",
"warning": "Warning",
"danger": "Danger"
"warning": "Warning"
},
"breadcrumbs": {
"navigateToHome": "Navigate to Home"
Expand Down Expand Up @@ -180,12 +170,10 @@
"metabar": {
"lastUpdated": "Last Updated",
"readingTime": "Reading Time",
"addedIn": "Added In",
"author": "Author",
"authors": "Authors",
"contribute": "Contribute",
"contributeText": "Edit this page",
"viewAs": "View as",
"tableOfContents": "Table of Contents",
"metadata": "Article metadata"
},
Expand All @@ -197,25 +185,7 @@
},
"search": {
"searchPlaceholder": "Start typing...",
"chatPlaceholder": "Ask me anything",
"noResultsFoundFor": "No results found for",
"suggestions": "Suggestions",
"seeAll": "See all",
"addMore": "Add more",
"clearChat": "Clear chat",
"errorMessage": "An error occurred while trying to search. Please try again.",
"disclaimer": "AI summaries can make mistakes. Please verify the information.",
"startYourSearch": "Start your search",
"initErrorSearch": "Unable to initialize search service",
"initErrorChat": "Unable to initialize chat service",
"chatButtonLabel": "Get an AI summary",
"searchButtonLabel": "Search",
"poweredBy": "Powered by",
"suggestionOne": "How to install Node.js?",
"suggestionTwo": "How to create an HTTP server?",
"suggestionThree": "Upgrading Node.js version",
"scrollToBottom": "Scroll to bottom",
"closeChat": "Close chat",
"keyboardShortcuts": {
"select": "to select",
"navigate": "to navigate",
Expand All @@ -230,14 +200,6 @@
}
},
"layouts": {
"blogPost": {
"author": {
"byLine": "{author, select, null {} other {By {author}, }}"
}
},
"blogIndex": {
"categoryName": "{category, select, all {Blog} other {{category} Blog Posts}}"
},
"blog": {
"title": "Blog",
"selectCategory": "Categories",
Expand All @@ -246,7 +208,6 @@
"announcements": "Announcements",
"release": "Releases",
"vulnerability": "Vulnerabilities",
"advisory-board": "Advisory Board",
"community": "Community",
"feature": "Feature",
"module": "Module",
Expand Down Expand Up @@ -279,7 +240,6 @@
"platform": "Platform",
"os": "Operating System",
"version": "Version",
"installMethod": "Install Method",
"packageManager": "Package Manager",
"unknown": "Unknown",
"platformGroups": {
Expand All @@ -289,7 +249,6 @@
},
"codeBox": {
"unsupportedVersionWarning": "This version is out of maintenance. Please use a currently supported version. <link>Understand EOL support.</link>",
"ltsVersionFeaturesNotice": "Want new features sooner? Get the <link>latest Node.js version</link> instead and try the latest improvements!",
"communityPlatformInfo": "Installation methods that involve community software are supported by the teams maintaining that software.",
"externalSupportInfo": "If you encounter any issues please visit <link>{platform}'s website</link>",
"noScriptDetected": "This page requires JavaScript. You can download Node.js without JavaScript by visiting the <link>downloads archive page</link> directly.",
Expand All @@ -301,8 +260,7 @@
"choco": "Chocolatey is a package manager for Windows.",
"docker": "Docker is a containerization platform.",
"n": "\"n\" is a cross-platform Node.js version manager.",
"asdf": "\"asdf\" is a cross-platform version manager that supports multiple languages.",
"volta": "\"Volta\" is a cross-platform Node.js version manager."
"asdf": "\"asdf\" is a cross-platform version manager that supports multiple languages."
}
}
},
Expand Down
Loading
Loading