vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 923 forks source link

[Bug report] `theme.locales.**.selectLanguageName` ignored & replaced by `locales.**.lang` #1345

Closed jrappen closed 1 year ago

jrappen commented 1 year ago

Description

Building a site with vuepress v2.0.0-beta.62, the button labels for the languages in the drop-down (when changing the language) have the wrong text applied.

Or in other words, theme.locales.**.selectLanguageName values are set but ignored, while locales.**.lang values are used instead.

I'm not sure when exactly this broke, but I guess it was sometime after v2 beta 57.

Seems to be a https://github.com/vuepress/vuepress-next/labels/regression

Used Package Manager

yarn

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (2) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
    Memory: 5.86 GB / 6.78 GB
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.2.0 - /tmp/yarn--1685569712105-0.20706479216053464/node
    Yarn: 1.22.19 - /tmp/yarn--1685569712105-0.20706479216053464/yarn
    npm: 9.6.6 - /opt/hostedtoolcache/node/20.2.0/x64/bin/npm
  Utilities:
    Git: 2.40.1 - /usr/bin/git
  Browsers:
    Chrome: 113.0.5672.63
    Firefox: 113.0
  npmPackages:
    @vuepress/bundler-vite:  2.0.0-beta.62 
    @vuepress/bundler-webpack: next => 2.0.0-beta.62 
    @vuepress/cli:  2.0.0-beta.62 
    @vuepress/client: next => 2.0.0-beta.62 
    @vuepress/core: next => 2.0.0-beta.62 
    @vuepress/markdown:  2.0.0-beta.62 
    @vuepress/plugin-active-header-links:  2.0.0-beta.62 
    @vuepress/plugin-back-to-top:  2.0.0-beta.62 
    @vuepress/plugin-container:  2.0.0-beta.62 
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-external-link-icon:  2.0.0-beta.62 
    @vuepress/plugin-git:  2.0.0-beta.62 
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.62 
    @vuepress/plugin-nprogress:  2.0.0-beta.62 
    @vuepress/plugin-palette:  2.0.0-beta.62 
    @vuepress/plugin-prismjs:  2.0.0-beta.62 
    @vuepress/plugin-pwa: next => 2.0.0-beta.62 
    @vuepress/plugin-pwa-popup: next => 2.0.0-beta.62 
    @vuepress/plugin-register-components: next => 2.0.0-beta.62 
    @vuepress/plugin-search: next => 2.0.0-beta.62 
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.62 
    @vuepress/plugin-toc: next => 2.0.0-beta.62 
    @vuepress/shared:  2.0.0-beta.62 
    @vuepress/theme-default: next => 2.0.0-beta.62 
    @vuepress/utils:  2.0.0-beta.62 
    vue: ^3.2.45 => 3.3.4 
    vue-loader:  17.1.2 
    vue-router:  4.2.2 
    vuepress: next => 2.0.0-beta.62 
    vuepress-vite:  2.0.0-beta.62 
    vuepress-webpack: Not Found

Screen shots

image


image


image
jrappen commented 1 year ago

The vuepress docs have the same issue:

image

https://github.com/vuepress/vuepress-next/blob/9f21432e578c61fedfd4acc3466a08a58a0976a0/docs/.vuepress/config.ts#L73-L78