Skip to content

Comments

[UXIT-3897] Add i18n to provide-storage, build-on-filecoin, community-hub, and blog#2182

Merged
CharlyMartin merged 8 commits intomainfrom
UXIT-3897/add-translation-keys-provide-storage
Feb 24, 2026
Merged

[UXIT-3897] Add i18n to provide-storage, build-on-filecoin, community-hub, and blog#2182
CharlyMartin merged 8 commits intomainfrom
UXIT-3897/add-translation-keys-provide-storage

Conversation

@CharlyMartin
Copy link
Collaborator

@CharlyMartin CharlyMartin commented Feb 20, 2026

📝 Description

Add internationalization support to four pages: provide-storage, build-on-filecoin, community-hub, and blog. All static strings are now translation-key driven via next-intl.

🛠️ Key Changes

  • provide-storage: Extract static strings to en.json/zh-cn.json, use getTranslations in server page
  • build-on-filecoin: Same pattern — data files now receive t() and return translated content
  • community-hub: Same pattern for ecosystem groups, get-involved options, and network upgrades
  • blog: Translate category filter labels, listbox options, page header, blog card tags, and post detail badges via useTranslations/getTranslations
  • Remove unused filecoinTools.ts data file
  • Widen Categories and BlogCard prop types to Array<string> to accept translated strings

@vercel
Copy link

vercel bot commented Feb 20, 2026

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

Project Deployment Actions Updated (UTC)
filecoin-site Ready Ready Preview, Comment Feb 24, 2026 8:48pm
3 Skipped Deployments
Project Deployment Actions Updated (UTC)
ffdweb-site Skipped Skipped Feb 24, 2026 8:48pm
filecoin-foundation-site Skipped Skipped Feb 24, 2026 8:48pm
filecoin-foundation-uxit Skipped Skipped Feb 24, 2026 8:48pm

Request Review

@notion-workspace
Copy link

@vercel vercel bot temporarily deployed to Preview – ffdweb-site February 20, 2026 15:36 Inactive
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-site February 20, 2026 15:36 Inactive
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-uxit February 20, 2026 15:36 Inactive
@github-actions github-actions bot added size/L and removed size/L labels Feb 20, 2026
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-site February 20, 2026 16:21 Inactive
@vercel vercel bot temporarily deployed to Preview – ffdweb-site February 20, 2026 16:21 Inactive
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-uxit February 20, 2026 16:21 Inactive
@github-actions github-actions bot added size/L and removed size/L labels Feb 20, 2026
@CharlyMartin CharlyMartin changed the title i18n on provide-storage [UXIT-3897] Add i18n to provide-storage, build-on-filecoin, community-hub, and blog Feb 20, 2026
@vercel vercel bot temporarily deployed to Preview – ffdweb-site February 23, 2026 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-uxit February 23, 2026 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-site February 23, 2026 14:25 Inactive
@github-actions github-actions bot added size/L and removed size/L labels Feb 23, 2026
@CharlyMartin CharlyMartin marked this pull request as ready for review February 23, 2026 14:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds comprehensive internationalization (i18n) support to four key pages: provide-storage, build-on-filecoin, community-hub, and blog. The implementation follows next-intl patterns, converting static data files to factory functions that accept translation functions and return localized content.

Changes:

  • Added i18n to provide-storage, build-on-filecoin, community-hub, and blog pages using next-intl
  • Refactored data files from static exports to functions accepting TranslationFunction parameter
  • Enhanced SearchInput component with customizable placeholder prop for i18n
  • Widened Categories and BlogCard prop types to accept translated string arrays
  • Removed unused filecoinTools.ts data file

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/ui-filecoin/src/components/SearchInput.tsx Added optional placeholder prop for i18n support
packages/ui-filecoin/src/components/Search/Search.tsx Added placeholder prop passthrough to SearchInput
apps/filecoin-site/src/i18n/translations/en.json Added English translations for all four pages
apps/filecoin-site/src/i18n/translations/zh-cn.json Added Chinese translations for all four pages
apps/filecoin-site/src/app/[locale]/provide-storage/page.tsx Integrated translations using getTranslations
apps/filecoin-site/src/app/[locale]/provide-storage/data/gettingStartedWithPDP.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/provide-storage/data/scalingOperations.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/community-hub/page.tsx Integrated translations using getTranslations
apps/filecoin-site/src/app/[locale]/community-hub/data/ecosystemGroups.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/community-hub/data/getInvolvedWithCommunity.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/community-hub/data/getInvolvedOptions.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/community-hub/data/networkUpgrades.ts Converted to factory function with label/labelKey pattern for badge variants
apps/filecoin-site/src/app/[locale]/build-on-filecoin/page.tsx Integrated translations using getTranslations
apps/filecoin-site/src/app/[locale]/build-on-filecoin/components/HeroSection.tsx Added translation function prop
apps/filecoin-site/src/app/[locale]/build-on-filecoin/data/builtOnFilecoin.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/build-on-filecoin/data/codeNcorgiSeries.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/build-on-filecoin/data/developerResources.ts Converted to factory function accepting translation function
apps/filecoin-site/src/app/[locale]/build-on-filecoin/data/filecoinFeatures.ts Converted to factory function, removed unused description fields
apps/filecoin-site/src/app/[locale]/build-on-filecoin/data/filecoinTools.ts Removed unused file
apps/filecoin-site/src/app/[locale]/build-on-filecoin/data/tutorialsAndGuides.ts Converted to factory function with difficultyLabel field
apps/filecoin-site/src/app/[locale]/build-on-filecoin/utils/generateStructuredData.ts Updated to accept features parameter instead of importing directly
apps/filecoin-site/src/app/[locale]/blog/page.tsx Integrated translations for featured post badge and CTA
apps/filecoin-site/src/app/[locale]/blog/data/blogCategories.ts Removed name field, kept only id for translation lookup
apps/filecoin-site/src/app/[locale]/blog/components/CategoryFilter.tsx Added useTranslations for category names and aria labels
apps/filecoin-site/src/app/[locale]/blog/components/CategoryListbox.tsx Added useTranslations for category display names
apps/filecoin-site/src/app/[locale]/blog/components/Categories.tsx Widened type to accept string arrays
apps/filecoin-site/src/app/[locale]/blog/components/BlogCard.tsx Changed tags prop type to Array
apps/filecoin-site/src/app/[locale]/blog/components/BlogPageHeader.tsx Added badgeText and ctaText props
apps/filecoin-site/src/app/[locale]/blog/components/BlogPostList.tsx Added translation for search placeholder and category tags
apps/filecoin-site/src/app/[locale]/blog/[slug]/page.tsx Added translation mapping for categories
apps/filecoin-site/src/app/[locale]/blog/[slug]/components/BlogPostHeader.tsx Changed categories prop type to Array
Comments suppressed due to low confidence (1)

apps/filecoin-site/src/i18n/translations/en.json:511

  • Spelling error: "Pawsibilitiess" should be "Pawsibilities" (only one 's' at the end).
      "title": "Code n' Corgi: Discovering AI Pawsibilitiess",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@barbaraperic barbaraperic left a comment

Choose a reason for hiding this comment

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

Massive effort @CharlyMartin !!

Left a few comments...

A few other things:

  • I guess we should also run changelog since there are changes Search in ui-filecoin?
  • I think we should run npm run lint ? Import order doesn't seem right...
Screenshot 2026-02-23 at 17 03 13
  • Also I was wondering if we need to translate the Pagination (Prev, Next) - not sure if it's too much of a trouble...
Image

const { image, categories, author, publishedOn, title, content } = data

const t = await getTranslations(PATHS.BLOG.path)
const translatedCategories = categories.map((cat) => t(`categories.${cat}`))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think we put category instead of cat?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes!

Comment on lines 16 to 18
type HeroSectionProps = {
t: TranslationFunction
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering why you decided to pass t as a prop and not use getTranslations here directly? Is it to have the translation centralised in /build-on-filecoin/page.tsx?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes that was the idea, but I think you're right, it's best to call it directly in the component!

{
title: t('developerResources.testFILFaucet.title'),
description: t('developerResources.testFILFaucet.description'),
href: 'https://faucet.calibnet.chainsafe-fil.io/',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if it's related to this PR, but should this link be in FILECOIN_DOCS_URLS?

},
{
title: t('filecoinFeatures.crossChainBridges.title'),
icon: IntersectThreeIcon,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need the icon? 👀

In apps/filecoin-site/src/app/[locale]/build-on-filecoin/utils/generateStructuredData.ts

    about: features.map((feature) => ({
      '@type': 'Thing',
      name: feature.title,
    })),

},
image: {
src: nv27GoldenWeekImage,
alt: 'Filecoin Network Upgrade announcement for nv27 Golden Week, with gold-texture background artwork.',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should alt be translated as well?

import { useCategoryState } from '../hooks/useCategoryState'

export function CategoryFilter() {
const t = useTranslations('/blog')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we use const t = useTranslations(PATHS.BLOG.path)?

- Update useTranslations to use PATHS.BLOG.path consistently in CategoryFilter, CategoryListbox, and blog post page for better maintainability.
- Rename variable from 'cat' to 'category' in blog post mapping for clarity.
- Fix className syntax in CategoryFilter buttons by correcting Tailwind variable references.
- Remove unused icon imports and assignments from filecoinFeatures to simplify data structure.
- Internationalize alt text for nv27 network upgrade image using translation function for better accessibility support.
@CharlyMartin CharlyMartin force-pushed the UXIT-3897/add-translation-keys-provide-storage branch from 573ebbf to bdd98b4 Compare February 24, 2026 20:44
@github-actions github-actions bot added size/L and removed size/L labels Feb 24, 2026
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-site February 24, 2026 20:45 Inactive
@vercel vercel bot temporarily deployed to Preview – ffdweb-site February 24, 2026 20:45 Inactive
@vercel vercel bot temporarily deployed to Preview – filecoin-foundation-uxit February 24, 2026 20:45 Inactive
@CharlyMartin
Copy link
Collaborator Author

@barbaraperic Thank you for all the great comments. I've addressed/implemented most of them.

I think we should run npm run lint ? Import order doesn't seem right...

We should, but in a different PR. About 25 files need linting due to the ESLINT issue from last week. I can open a PR just for that tomorrow.

Also, I was wondering if we need to translate the Pagination (Prev, Next) - not sure if it's too much of a trouble...

Yes, we should! But it was too complex for this PR. I'm gonna open another one just for this. I forgot to mention it in the description.

@CharlyMartin CharlyMartin merged commit 37af656 into main Feb 24, 2026
10 of 11 checks passed
@CharlyMartin CharlyMartin deleted the UXIT-3897/add-translation-keys-provide-storage branch February 24, 2026 20:51
@github-actions github-actions bot added size/L and removed size/L labels Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants