Supported Locales always cover the locales a repository's content uses (owners can declare more ahead)

未关闭
#2,875 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@snyaggarwal 已经在做这个了。

开始于 2026年10月5日。

评估

这个 Issue 还没有评估数据。

描述

component/api component/web program/platform-health signal/has-dependencies signal/high-risk signal/large-scope signal/well-specified stage/triaged type/feature

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 locale facet (<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.jsx and RepoCreateLanguages.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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenConceptLab/ocl_issues 的其他 Issue

查看 OpenConceptLab/ocl_issues 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。