opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.66k stars 870 forks source link

[BUG] Docker Image's `I18N_LOCALE` environment variable does not seem to work #8075

Open linghengqian opened 3 weeks ago

linghengqian commented 3 weeks ago

Describe the bug

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Create the following docker-compose.yml file. Then docker compose up -d.

    services:
    opensearch-node1:
    image: opensearchproject/opensearch:2.16.0
    expose:
      - 9200
      - 9600
    environment:
      discovery.type: single-node
      OPENSEARCH_INITIAL_ADMIN_PASSWORD: opensearchNode1Test
    restart: always
    volumes:
      - opensearch-data1:/usr/share/opensearch/data
    opensearch-dashboards:
    image: opensearchproject/opensearch-dashboards:2.16.0
    environment:
      OPENSEARCH_HOSTS: '["https://opensearch-node1:9200"]'
      I18N_LOCALE: "zh-CN"
    restart: always
    ports:
      - "5601:5601"
    volumes:
    opensearch-data1:
  2. Visit localhost:5601 and log in using the admin and opensearchNode1Test user passwords.

    • image
  3. At this time, the Web UI is still in English, not the Chinese zh-CN set by I18N_LOCALE.

    • image

Expected behavior A clear and concise description of what you expected to happen.

OpenSearch Version Please list the version of OpenSearch being used.

Dashboards Version Please list the version of OpenSearch Dashboards being used.

Plugins Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

Qithird commented 1 week ago

遇到同样问题,检测了对多遍以为配置没生效,结果容器中配置已生效只是没有应用到语言包

linghengqian commented 1 week ago

遇到同样问题,检测了对多遍以为配置没生效,结果容器中配置已生效只是没有应用到语言包