术语的语言区域不在术语表覆盖范围内

Moses Skoda工程师预计阅读 1 分钟

API 以 422 Unprocessable Content 状态返回此错误。其 type 为 https://lingo.dev/docs/api/errors/glossary-term-locale-not-covered。所有错误的通用结构,请参阅错误和状态码。

无法保存 "<text>"。其语言区域 "<locale>" 不在此术语表的覆盖范围(<sourceCoverage>)内。请使用覆盖范围内的语言区域,或将此语言区域添加到术语表的源语言区域覆盖范围中。

字段#

除标准成员 type、status、title 和 detail 外,响应体还包含以下字段。detail 文本由这些字段生成,客户端也可以据此显示自定义文本。

字段类型
textstring
localestring
sourceCoveragestring[]

示例#

json
{
  "detail": "Cannot save \"<text>\". Its locale \"<locale>\" is not one this glossary covers (<sourceCoverage>). Use one of those locales, or add this one to the glossary's source coverage.",
  "text": "<text>",
  "locale": "<locale>",
  "sourceCoverage": [
    "<sourceCoverage>"
  ],
  "type": "https://lingo.dev/docs/api/errors/glossary-term-locale-not-covered",
  "status": 422,
  "title": "Glossary term locale not covered"
}

返回此错误的端点#

  • PATCH /v2/glossaries/{glossaryId}/terms/{id}
  • POST /v2/glossaries/{glossaryId}/terms
  • POST /v2/glossaries/{glossaryId}/terms/create-many