diff --git a/proto/translation/v1.proto b/proto/translation/v1.proto index 3bbe5c4..6b5d6a2 100644 --- a/proto/translation/v1.proto +++ b/proto/translation/v1.proto @@ -15,7 +15,7 @@ message Translation_1 { string propertyRef = 3 [(required) = true]; string languageCode = 4 [(required) = true]; - string regionCode = 5 [(required) = true]; + optional string regionCode = 5; string message = 6 [(required) = true]; message DocRef { diff --git a/schema/translation/v1.json b/schema/translation/v1.json index bd6df0d..4c70b67 100644 --- a/schema/translation/v1.json +++ b/schema/translation/v1.json @@ -69,7 +69,6 @@ "docRefType", "propertyRef", "languageCode", - "regionCode", "message" ], "additionalProperties": false diff --git a/src/lib/decode-conversions.ts b/src/lib/decode-conversions.ts index af0376e..94a13bd 100644 --- a/src/lib/decode-conversions.ts +++ b/src/lib/decode-conversions.ts @@ -285,7 +285,6 @@ export const convertTranslation: ConvertFunction<'translation'> = ( ensure(message.docRef.versionId, 'translation.docRef', 'versionId') ensure(propertyRef, 'translation', 'propertyRef') ensure(languageCode, 'translation', 'languageCode') - ensure(regionCode, 'translation', 'regionCode') ensure(translationMessage, 'translation', 'translationMessage') return { ...jsonSchemaCommon, diff --git a/test/fixtures/good-docs-minimal.js b/test/fixtures/good-docs-minimal.js index b748e98..662999d 100644 --- a/test/fixtures/good-docs-minimal.js +++ b/test/fixtures/good-docs-minimal.js @@ -185,7 +185,6 @@ export const goodDocsMinimal = [ docRefType: 'field', propertyRef: 'label', languageCode: 'qu', - regionCode: 'PE', message: `sach'a`, }, expected: {},