diff --git a/BUILD b/BUILD index 6b8ecff3..a188155e 100644 --- a/BUILD +++ b/BUILD @@ -72,6 +72,7 @@ proto_library( name = "v3_protos", visibility = ["//visibility:public"], deps = [ + "//contrib/envoy/extensions/filters/http/language/v3alpha:pkg", "//contrib/envoy/extensions/filters/http/squash/v3:pkg", "//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg", "//contrib/envoy/extensions/filters/network/kafka_broker/v3:pkg", diff --git a/contrib/envoy/extensions/filters/http/language/v3alpha/BUILD b/contrib/envoy/extensions/filters/http/language/v3alpha/BUILD new file mode 100644 index 00000000..ee92fb65 --- /dev/null +++ b/contrib/envoy/extensions/filters/http/language/v3alpha/BUILD @@ -0,0 +1,9 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"], +) diff --git a/contrib/envoy/extensions/filters/http/language/v3alpha/language.proto b/contrib/envoy/extensions/filters/http/language/v3alpha/language.proto new file mode 100644 index 00000000..7f45d5e6 --- /dev/null +++ b/contrib/envoy/extensions/filters/http/language/v3alpha/language.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.language.v3alpha; + +import "udpa/annotations/status.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.language.v3alpha"; +option java_outer_classname = "LanguageProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/language/v3alpha"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Language] +// Language :ref:`configuration overview `. +// [#extension: envoy.filters.http.language] + +// Language detection filter config. +message Language { + // The default language to be used as a fallback. + // The value will be included in the list of the supported languages. + // + // See https://unicode-org.github.io/icu/userguide/locale/ + string default_language = 1 [(validate.rules).string = {min_len: 2}]; + + // The set of supported languages. There is no order priority. + // The order will be determined by the Accept-Language header priority list + // of the client. + // + // See https://unicode-org.github.io/icu/userguide/locale/ + repeated string supported_languages = 2 [(validate.rules).repeated = { + min_items: 1 + unique: true + items {string {min_len: 2}} + }]; +} diff --git a/versioning/BUILD b/versioning/BUILD index 59e08033..ad1b8e81 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -9,6 +9,7 @@ proto_library( name = "active_protos", visibility = ["//visibility:public"], deps = [ + "//contrib/envoy/extensions/filters/http/language/v3alpha:pkg", "//contrib/envoy/extensions/filters/http/squash/v3:pkg", "//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg", "//contrib/envoy/extensions/filters/network/kafka_broker/v3:pkg",