Skip to content

[discuss] Add unique identifiers to English responses #35665

Closed
@joshdover

Description

@joshdover

In order to support localization efforts in Kibana, I'd like Elasticsearch to provide stable identifiers in responses in addition to English strings that Kibana can use to lookup the corresponding localized string to display to end users in their chosen language. Types of English strings Elasticsearch provides now: error messages, deprecation warnings, ...?

There many ways we could chose to format this identifier, but instead of using error code numbers, I propose that we use human-readable, namespaced strings. For example, in the Deprecations Info API (GET _xpack/migration/deprecations) we could add an attribute to each returned deprecation ("errors" in this sense) like so:

{
  "level" : "info",
  "message" : "Coercion of boolean fields",
  "messageId": "xpack.migration.deprecations.coercionBooleanFields.message",  // added
  "url" : "https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_indices_changes.html",
  "details" : "more information, like which nodes, indices, or settings are to blame"
  "detailsId": "xpack.migration.deprecations.coercionBooleanFields.details"  // added
}

Kibana can then use the identifiers to lookup localized versions of the string and use the provided English string as a fallback.

Ideally whatever we do in this Deprecations API we can use as a pattern going forward, so I'd like to start a discussion about whether or not this is a pattern that seems adaptable to the rest of Elasticsearch or not.

cc @cjcenizal @sebelga @talevy @azasypkin

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/CoreCore issues without another label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions