Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

i18n: hardcoded English UI strings can't be translated

Đang mở
#30 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
40/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, tailwindcss, typescript

Hướng nghiên cứu

Start with the LanguageSwitcher, PhoneInput and NavBar components, finding the hardcoded strings listed in the issue table. Decide how the proposed optional labels prop and its typed keys should look, and how Intl.DisplayNames fits PhoneInput country names; the issue leaves both open. Done means exported *Labels types with TSDoc, a docs section with a translated example, and tests showing custom labels render.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement good first issue priority: medium

i18n: hardcoded English UI strings can't be translated

For a localization library, the components ship non-translatable English text:

Component Strings
LanguageSwitcher Search..., Search languages, No results, Select language, Current language: …
PhoneInput Select country, Search countries..., Search countries, country names (English only)
NavBar Select language, Current language: …, Toggle menu, GitHub
Proposal

Add an optional labels prop per component with typed keys and English defaults, e.g.:

<LanguageSwitcher
  locales={locales}
  labels={{
    search: "Rechercher…",
    noResults: "Aucun résultat",
    listbox: "Choisir la langue",
    current: (name) => `Langue actuelle : ${name}`,
  }}
/>

For PhoneInput country names, consider Intl.DisplayNames with a displayLocale prop.

Acceptance
  • Exported *Labels types, TSDoc on each key
  • Docs page section showing a translated example
  • Tests asserting custom labels render
Ngôn ngữ chính
TypeScript
Star
39
Fork
16
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của babelize/babelize-elements

Tất cả issue của babelize/babelize-elements

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.