i18n: build translated sentences in code so they read correctly in every language (TBv3 + Mapper)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, react
调研方向
Start with the named components in oclweb3 and oclmap: DeleteEntityDialog, ReleaseVersion, ResourceReferences, RepoHome, the event and error components, and SearchInputDrawer; then check constants.js and app startup language handling. Use the related translation PRs to see the affected sentence keys. Done means the listed UI text, dates, and document language follow the selected locale, with Spanish and Chinese event keys added.
由索引模型根据 Issue 内容生成。
描述
Summary
The pt-BR review of oclweb3#60 and oclmap#90 (#2866) found sentences that the UI builds by stitching translated fragments together, or by dropping raw English values into translated text. No catalog edit can make these read correctly in Portuguese (or Spanish). They need code changes so that each sentence is a single translatable string with interpolated values. This ticket holds the code-side fixes that were deliberately kept out of the translation PRs so those could merge.
Acceptance criteria
-
DeleteEntityDialog,ReleaseVersion,ResourceReferencesandrepo.version.form.*take a translated resource-type label instead of the raw API type (Collection,concept,Source Version). The hardcoded'versions, 'and'concepts and mappings'inRepoHomego through i18n. Sentences avoid gendered articles before{{resourceType}}, or use per-type keys. (The unusedcommon.object_typesmap added in oclweb3#60 can serve here; otherwise remove it.) - Activity feed (
Events.jsx,DashboardEvents.jsx): each event type × object type is a whole-sentence key with preposition and site name, e.g. "Entrou no OCL", "Entrou em uma Organização X". The no-object "Joined" event stops using the API's Englishdescription. Remove the unusedevent_types.updatedand.source. Addevent_types/event_object_typesfor es and zh. - Error pages (
Error401/403/404,ErrorUI): replace theplease+ link +or+ … fragments with<Trans>sentences. - Search placeholders (
SearchInputDrawer): replace the fragment chains with<Trans>sentences. - Relative times and dates follow the UI language: set the Moment locale at startup from the persisted language (both apps) and on change (oclweb3), and localize the
M/D/YYYYformats inconstants.js. -
<html lang>follows the selected language. - oclweb3: guard
UserMenuwhen the stored language isn't inLANGUAGES(a storedzhcurrently throws). Drop thei18n.languages = …overwrite in both apps. - Hardcoded English found near the touched code:
UserProfile.jsx"Joined {date}" and MapperProjectLogs.jsx"{user} at {date}".
Related: #2866, OpenConceptLab/oclweb3#60, OpenConceptLab/oclmap#90
- 主要语言
- 没有语言数据
- 星标
- 4
- 派生
- 2
- 平均合并
- 2 小时 12 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenConceptLab/ocl_issues 的其他 Issue
-
component/fhir type/bug
难度 2/5 1-3 小时 新手友好度 82/100
OpenConceptLab/ocl_issues#3026 ·
-
component/api decision/human-review signal/needs-access signal/quick-win signal/small-scope signal/well-specified stage/triaged type/bug
难度 2/5 1-3 小时 新手友好度 72/100
OpenConceptLab/ocl_issues#3012 · 2 条评论 ·
-
component/design-system decision/ai-ready signal/low-risk signal/quick-win signal/small-scope signal/well-specified stage/triaged type/docs
难度 2/5 半天 新手友好度 70/100
OpenConceptLab/ocl_issues#2983 · 1 条评论 ·
-
component/mapper decision/ai-ready signal/low-risk signal/quick-win signal/small-scope signal/well-specified stage/triaged type/bug
难度 2/5 1-3 小时 新手友好度 78/100
OpenConceptLab/ocl_issues#2966 · 2 条评论 ·
-
component/mapper component/web decision/human-review signal/low-risk signal/needs-human signal/quick-win signal/small-scope signal/well-specified stage/triaged type/bug
难度 2/5 1-3 小时 新手友好度 76/100
OpenConceptLab/ocl_issues#2920 · 1 条评论 ·
查看 OpenConceptLab/ocl_issues 的全部 Issue
相似的 Issue
-
Selectmenu changes selection after its native select is disabled while open可能已有人在做 @Xapollon430 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
-
feature request good first issue
难度 2/5 1-3 小时 新手友好度 88/100
TabularisDB/tabularis#1513 ·
维护者通常 2 天内回复
-
bug priority: medium
难度 2/5 1-3 小时 新手友好度 62/100
storytold/pdfcraft#7140 · 1 条评论 ·
维护者通常 2 天内回复
-
requests support
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 2 天内回复
-
bug lane: fast
难度 2/5 1-3 小时 新手友好度 82/100
unicef/adt-studio#1107 ·
维护者通常 2 天内回复