elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.76k stars 8.16k forks source link

Fix support for localized newsfeed content #52089

Closed alexfrancoeur closed 4 years ago

alexfrancoeur commented 4 years ago

image

Localized content does not seem to be applying the language specified in the newsfeed for zh-CN and ja-JP

Local output

``` { items: [ { title: { en: "Elastic Stack 7.5.0 released", zh-CN: "Elastic Stack 7.5.0 重磅发布", ja-JP: "Elastic Stack 7.5.0をリリース" }, description: { en: "New in 7.5: more intuitive visualizations, improvements to our Observability and Security solutions, and Elastic Enterprise Search joins the release train.", zh-CN: "7.5 新特色:可视化更直观,对 Observability 和 Security 解决方案进行了改进,而且将 Elastic Enterprise Search 加入了发布版本中。", ja-JP: "7.5に新登場:さらに直感的な操作に対応する新可視化ツールの追加、オブザバビリティとセキュリティソリューションの拡充のほか、Elastic Enterprise Searchがリリースサイクルに加わりました。" }, link_text: { en: "Learn more in our blog", zh-CN: "Learn more in our blog", ja-JP: "Learn more in our blog" }, link_url: { en: "https://www.elastic.co/blog/elastic-stack-7-5-0-released?blade=kibanafeed", zh-CN: "https://www.elastic.co/cn/blog/elastic-stack-7-5-0-released?blade=kibanafeed", ja-JP: "https://www.elastic.co/jp/blog/elastic-stack-7-5-0-released?blade=kibanafeed" }, languages: [ "en", "zh-CN", "ja-JP" ], badge: { en: "7.5" }, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "12891b24def2ecab857329e468311f614abb25694f33aa11055543f19e2c2a2e" }, { title: { en: "Introducing Kibana Lens", zh-CN: "Kibana Lens 隆重推出:探索数据的轻松直观方式", ja-JP: "Kibana Lens"登場:手軽で直感的なデータ探索" }, description: { en: "Introducing Kibana Lens, a new, simple, and flexible way to explore your data in Kibana.", zh-CN: "Kibana Lens 隆重推出,能够让您以崭新方式轻松灵活地在 Kibana 中探索数据。", ja-JP: "Kibanaのデータ探索を一層シンプルに、フレキシブルに進化させる"Kibana Lens"が登場しました。" }, link_text: { en: "Learn more in our blog", zh-CN: "Learn more in our blog", ja-JP: "Learn more in our blog" }, link_url: { en: "https://www.elastic.co/blog/introducing-kibana-lens?blade=kibanafeed", zh-CN: "https://www.elastic.co/cn/blog/introducing-kibana-lens?blade=kibanafeed", ja-JP: "https://www.elastic.co/jp/blog/introducing-kibana-lens?blade=kibanafeed" }, languages: [ "en", "zh-CN", "ja-JP" ], badge: { en: "7.5" }, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "a7212ee962f2f1f6641c004c121ba134922073bba335756def7fda643b5e91f6" }, { title: { en: "Elastic Observability 7.5.0 released" }, description: { en: "Elastic Metrics gains steam with Azure monitoring and Endgame integration." }, link_text: { en: "Learn more in our blog" }, link_url: { en: "https://www.elastic.co/blog/elastic-observability-7-5-0-released?blade=kibanafeed" }, languages: null, badge: { en: "7.5" }, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "0e3528c2ed7d78e3bc40255a10161eface9b5528cabda23f26b7c3cb36ea3123" }, { title: { en: "Elastic Security 7.5 released" }, description: { en: "Elastic Security 7.5 arms Elastic SIEM with event data from Elastic Endpoint Security. Plus new anomaly detection jobs, UI enhancements, and more!" }, link_text: { en: "Learn more in our blog" }, link_url: { en: "https://www.elastic.co/blog/elastic-security-7-5-0-released?blade=kibanafeed" }, languages: null, badge: { en: "7.5" }, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "9f3a3150f0e50a9cfdca1066bc9fb555bc99fc5535c56b1a38075ac5fefaaf7c" }, { title: { en: "Kibana 7.5.0 released" }, description: { en: "Kibana Lens makes it simple to go from data to visualization with drag and drop fields, instant previews, and the flexibility to switch data sources." }, link_text: { en: "Learn more in our blog" }, link_url: { en: "https://www.elastic.co/blog/kibana-7-5-0-released?blade=kibanafeed" }, languages: null, badge: { en: "7.5" }, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "98c884d7d06e8568c4d1d371dfb7081c07a252bccdc15139846b3f11070afa12" }, { title: { en: "Take your dashboard to the next level" }, description: { en: "Discover how to create eye-catching visualizations by taking advantage of all the great features that Kibana has to offer." }, link_text: { en: "Watch our webinar" }, link_url: { en: "https://www.elastic.co/webinars/level-up-kibana-dashboards?blade=kibanafeed" }, languages: null, badge: null, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "c00623fbe0d372b26f4812051227f6a729c7012a88d67899e2c4a720e5070979" }, { title: { en: "Get to know the ELK Stack" }, description: { en: "Whether you call it the ELK Stack or the Elastic Stack, our introductory webinar offers a demo of the key features of Elasticsearch, Kibana, Beats, and Logstash. We show you how to get started." }, link_text: { en: "Watch our webinar" }, link_url: { en: "https://www.elastic.co/webinars/introduction-elk-stack?blade=kibanafeed" }, languages: null, badge: null, image_url: null, publish_on: "2019-12-01T00:00:00", expire_on: "2020-02-01T00:00:00", hash: "19fdf37972de5a92fbd7385614962c2ae19b243df5d61ab495f917ea817cfcf6" } ] } ```

We are using i18n.getLocale() to identify the current language, but seems like it doesn't take the config setting i18n.locale: "ja-JP".

cc: @tsullivan @YulNaumenko

elasticmachine commented 4 years ago

Pinging @elastic/kibana-stack-services (Team:Stack Services)

epixa commented 4 years ago

We should just update the service to send based on the two letter language prefix. This will fix existing deployments and we have no indication that we'll be adding more specific translations than the high level that we provide today. If we ever do, we can update the product.