Supported Locales always cover the locales a repository's content uses (owners can declare more ahead)
@snyaggarwal 已经在做这个了。
开始于 2026年10月5日。
评估
这个 Issue 还没有评估数据。
描述
Rewritten 2026-10-04: the goal is a rule the system keeps, not a report that owners act on.
A repository's Supported Locales must always include every locale its content uses (concept names and descriptions). Owners may also declare locales ahead of any content. Supported Locales therefore reflect the content: they aren't free-form metadata that can contradict it.
Nothing enforces this today, so the two drift. LOINC on OCL declared only en while holding names in 22 locales (corrected on 2026-10-04). Its 2.81 release copied that wrong list from HEAD. Apps such as the Mapper rely on this metadata, so it has to be right by construction.
Acceptance criteria
- oclapi2: any write that adds a name or description in a locale the repository doesn't declare also declares that locale. This applies to every path: TBv3, the API and bulk import. A bulk import declares its new locales once, at the end, not once per concept.
- oclapi2: removing a locale from Supported Locales is refused while the content still uses it. Declaring a locale ahead of content is allowed.
- Versions keep copying Supported Locales from HEAD when they're created. With HEAD kept correct, a new version is correct from creation, since its content is a snapshot of HEAD's.
- TBv3: the repository's languages section marks each declared locale as either in use (with counts) or declared ahead. Counts come from the search index's
localefacet (<repo or version URL>/concepts/?facetsOnly=true), not a database scan. A locale in use can't be removed. - Existing repositories and versions are backfilled so their Supported Locales cover their content. The scope comes from a system-wide scan (2026-10-04, results to follow).
Components:
- oclapi2: the concept, name and description save paths and the bulk importer.
- oclapi2:
SourceCreateOrUpdateSerializer.prepare_object(locale edits). Locale changes already queue a narrowed concept reindex (OpenConceptLab/oclapi2#898), so a declaration added by a write only touches concepts that have no name in the default locale. - oclweb3:
RepoCreate.jsxandRepoCreateLanguages.jsx. - Collections: whether the same rule applies against their expansion's concepts is to be decided with the scan results.
- 主要语言
- 没有语言数据
- 星标
- 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 条评论 ·