Skip to content

Commit 52b6bea

Browse files
authored
LocalizedContent value can be a key or a piece of localized text (#23)
1 parent 321a4a7 commit 52b6bea

File tree

4 files changed

+96
-88
lines changed

4 files changed

+96
-88
lines changed

generated/go/chat/v1/chat_service.pb.go

Lines changed: 83 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/go/chat/v1/chat_service.pb.validate.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/protobuf-es/chat/v1/chat_service_pb.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,9 +1043,12 @@ export class Content extends Message<Content> {
10431043
*/
10441044
export class LocalizedContent extends Message<LocalizedContent> {
10451045
/**
1046-
* @generated from field: string key = 1;
1046+
* When server-side localization is in place, clients will always see the
1047+
* localized text.
1048+
*
1049+
* @generated from field: string key_or_text = 1;
10471050
*/
1048-
key = "";
1051+
keyOrText = "";
10491052

10501053
constructor(data?: PartialMessage<LocalizedContent>) {
10511054
super();
@@ -1055,7 +1058,7 @@ export class LocalizedContent extends Message<LocalizedContent> {
10551058
static readonly runtime: typeof proto3 = proto3;
10561059
static readonly typeName = "code.chat.v1.LocalizedContent";
10571060
static readonly fields: FieldList = proto3.util.newFieldList(() => [
1058-
{ no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1061+
{ no: 1, name: "key_or_text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10591062
]);
10601063

10611064
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalizedContent {

proto/chat/v1/chat_service.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ message Content {
236236
}
237237

238238
message LocalizedContent {
239-
string key = 1 [(validate.rules).string = {
239+
// When server-side localization is in place, clients will always see the
240+
// localized text.
241+
string key_or_text = 1 [(validate.rules).string = {
240242
min_len: 1
241-
max_len: 64
243+
max_len: 1024
242244
}];
243245
}
244246

0 commit comments

Comments
 (0)