Skip to content

Commit a24a048

Browse files
ericyangpanclaude
andcommitted
fix: correct translation key paths in components
- open-source-rank: change productType.* to categories.singular.* and use tShared - VendorMatrix: update vendorTypes path to vendorMatrix.vendorTypes Co-Authored-By: Claude (Pro/zai-org/GLM-4.7) <noreply@anthropic.com>
1 parent 565f299 commit a24a048

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/app/[locale]/open-source-rank/page.client.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ function getLicenseDisplayName(license: string): string {
3131
function getProductTypeName(type: ProductType, t: (key: string) => string): string {
3232
switch (type) {
3333
case 'ide':
34-
return t('productType.ide')
34+
return t('categories.singular.ide')
3535
case 'cli':
36-
return t('productType.cli')
36+
return t('categories.singular.cli')
3737
case 'extension':
38-
return t('productType.extension')
38+
return t('categories.singular.extension')
3939
default:
4040
return type
4141
}
@@ -326,7 +326,7 @@ export function OpenSourceRankPage() {
326326
</td>
327327
<td className="px-[var(--spacing-sm)] py-[var(--spacing-sm)] text-sm">
328328
<span className="inline-block px-2 py-0.5 text-xs border border-[var(--color-border)]">
329-
{getProductTypeName(project.type, tPage)}
329+
{getProductTypeName(project.type, tShared)}
330330
</span>
331331
</td>
332332
<td className="px-[var(--spacing-sm)] py-[var(--spacing-sm)] text-sm text-[var(--color-text-secondary)]">

src/components/product/VendorMatrix.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function getCategoryLabel(
4242
* Gets the localized vendor type label. Falls back to the raw type when missing.
4343
*/
4444
function getVendorTypeLabel(t: ReturnType<typeof useTranslations>, type: string): string {
45-
const key = `vendorTypes.types.${type}.label`
45+
const key = `vendorMatrix.vendorTypes.types.${type}.label`
4646
try {
4747
return t(key)
4848
} catch {

0 commit comments

Comments
 (0)