microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.57k stars 29.01k forks source link

Code OSS resets locale arg after update #198402

Open AntistressStore opened 11 months ago

AntistressStore commented 11 months ago

Does this issue occur when all extensions are disabled?: Yes

use Code oss Version: 1.84.1 Commit: Unknown Date: 2023-11-09T21:00:36.061Z Electron: 25.9.4 ElectronBuildId: undefined Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.6.1-1-MANJARO

After system update [2023-11-13T13:44:08+0300] [ALPM] upgraded electron25 (25.9.3-1 -> 25.9.4-1) [2023-11-13T13:44:08+0300] [ALPM] upgraded code (1.83.1-1 -> 1.84.2-1) [2023-11-13T13:44:17+0300] [ALPM] upgraded nodejs (20.9.0-1 -> 21.1.0-1)

My interface language settings reset and can't change ui language. argv.json (local workspace) and argv.json (user folder) has "locale": "ru" string but interface language settings - en Screenshot_20231116_132204 when I choose the language I want (ru) Screenshot_20231116_132458 and after Screenshot_20231116_132517 I close this window and when I open the code oss language again en. At the same time, I checked. If in argv.json put in the manual "en-us," when I choose the language as I said earlier, the local changes to "ru," which is correct. But the interface language does not change.

Cenho commented 11 months ago

I have the same problem Also use the same version Code - oss The system I use is archlinux

Version: 1.84.1 Commit: Unknown Date: 2023-11-09T21:00:36.061Z Electron: 25.9.4 ElectronBuildId: undefined Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.6.1-arch1-1

deepak1556 commented 11 months ago

Can you clarify if you are talking about the UI locale of the VSCode application does not switch to ru ? The screenshot shows a basic electron application which would be different, maybe a gif would better explain the issue. Thanks!

/gifPlease

vscodenpa commented 11 months ago

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

misaka19949 commented 11 months ago

Can you clarify if you are talking about the UI locale of the VSCode application does not switch to ru ? The screenshot shows a basic electron application which would be different, maybe a gif would better explain the issue. Thanks!

/gifPlease ![Uploading 1.gif…]()

I have the same problem, here is the gif

imgur

Version: 1.84.1 Date: 2023-11-09T21:00:36.061Z Electron: 25.9.4 Chromium: 114.0.5735.289 OS: Linux x64 6.6.1-arch1-1

deepak1556 commented 11 months ago

@rzhao271 restart action is broken for code oss when application locale is configured. Base electron application being shown means a mismatch of command line arguments.

AntistressStore commented 11 months ago

maybe it will be useful which code-oss
/usr/bin/code-oss

cat /usr/bin/code-oss (same as cat /usr/bin/code )

#!/bin/bash

set -euo pipefail

flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/code-flags.conf"

declare -a codeflags

if [[ -f "${flags_file}" ]]; then
    mapfile -t < "${flags_file}" CODEMAPFILE
fi

for line in "${CODEMAPFILE[@]}"; do
    if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
        codeflags+=("${line}")
    fi
done

name=electron25 
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"

declare -a electronflags

if [[ -f "${flags_file}" ]]; then
    mapfile -t < "${flags_file}" ELECTRONMAPFILE
fi

for line in "${ELECTRONMAPFILE[@]}"; do
    if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
        electronflags+=("${line}")
    fi
done

ELECTRON_RUN_AS_NODE=1 exec /usr/lib/${name}/electron /usr/lib/code/out/cli.js "${electronflags[@]}" /usr/lib/code/code.js "${codeflags[@]}" "$@"

There is no code-flags.conf file where user arguments are listed in my home directory. Thus, no user arguments are passed.

lifedanceman commented 10 months ago

Manually language setting is not helped as well. Recording 2023-12-16 at 14 19 12

lifedanceman commented 7 months ago

Hallo! Is there something new about the issue?