用語のロケールが用語集の対象外
この問題が発生すると、API は 422 Unprocessable Content を返します。その type は https://lingo.dev/docs/api/errors/glossary-term-locale-not-covered です。すべてのエラーに共通する形式については、エラーとステータスコードを参照してください。
「<text>」を保存できません。この用語のロケール「<locale>」は、用語集の対象ロケール(<sourceCoverage>)に含まれていません。対象ロケールのいずれかを使用するか、このロケールを用語集の翻訳元の対象ロケールに追加してください。
フィールド#
レスポンス本文には、標準の type、status、title、detail の各メンバーに加え、以下のフィールドが含まれます。detail のテキストはこれらのフィールドから生成されるため、クライアント側で独自のテキストを表示することもできます。
| フィールド | 型 |
|---|---|
text | string |
locale | string |
sourceCoverage | string[] |
例#
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}/termsPOST /v2/glossaries/{glossaryId}/terms/create-many