Skip to content

Commit

Permalink
Make regionCode optional, because it is optional in default config
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Sep 11, 2024
1 parent 2bd2735 commit 03ae64a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion proto/translation/v1.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion schema/translation/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"docRefType",
"propertyRef",
"languageCode",
"regionCode",
"message"
],
"additionalProperties": false
Expand Down
1 change: 0 additions & 1 deletion src/lib/decode-conversions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/good-docs-minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ export const goodDocsMinimal = [
docRefType: 'field',
propertyRef: 'label',
languageCode: 'qu',
regionCode: 'PE',
message: `sach'a`,
},
expected: {},
Expand Down

0 comments on commit 03ae64a

Please sign in to comment.