Tour step button labels are hardcoded in English and cannot be localized

Đang mở Phù hợp với người mới
#168 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript

Hướng nghiên cứu

Bắt đầu trong src/forks/Tour/TourStep.tsx, nơi các chuỗi "Done"/"Next"/"Back"/"Close tour" được hardcode, bộ đếm {n} of {total} và fallback "Tour step" được lắp ghép, và đọc TourStepProps/TourProps song song với đó. Sau đó, xem cách một component ui-common lân cận nhận một prop với giá trị mặc định catalog uic.*, và làm theo pattern đó cho từng label. Hoàn tất nghĩa là mọi chuỗi được liệt kê đều đến từ catalog và có thể bị ghi đè bởi một prop, với các test hoặc stories hiện có của component đều pass.

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

Mô tả

frontdesk
Summary

TourStep in ui-common's Tour fork (@lablup/ui-common/lab) renders its control labels as hardcoded English strings: "Done", "Next", "Back", "Close tour", plus the step counter {n} of {total} and the fallback dialog label "Tour step". None of them is a prop or goes through ui-common's message catalog, so a product cannot localize them. Every other built-in ui-common string is a prop with a catalog default.

Steps to reproduce
  1. Render a Tour with one or more TourSteps in an app whose locale is not English (for example Korean), with uiCommonMessages passed to the InternationalizationProvider.
  2. Open the tour.
  3. Look at the step callout's buttons.
Expected / Actual
  • Expected: the button labels, the close-button label and the step counter follow the active locale through the uic.* catalog, and each can be overridden with a prop.
  • Actual: they always read "Next" / "Done" / "Back" / "Close tour" / "1 of 3" in English.
Evidence
  • src/forks/Tour/TourStep.tsx (built as dist/forks/Tour/TourStep.js in 0.2.0-alpha.21.canary-20261111033103-c445de1bd): label: isLastStep ? "Done" : "Next", label: "Back", closeButtonLabel: "Close tour", `${index + 1} of ${count}`, label: typeof heading === "string" ? heading : "Tour step".
  • TourStepProps and TourProps declare no label props.
Notes
  • Seen in backend.ai-webui's admin view-switch tour, where the "Done" button stays in English under the Korean UI.
  • Scope: only the hardcoded Tour strings. Adding the webui translations is separate work.

Reported via Teams (Quill). Requested by @yomybaby. The Teams thread is in this issue's Teams thread field (organization members only).

Ngôn ngữ chính
TypeScript
Star
2
Fork
0
Merge trung bình
17 giờ 58 phút
Pull request đã merge (30 ngày)
25

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 lablup/ui-common

Tất cả issue của lablup/ui-common

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.