linuxserver / docker-firefox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] <title>How to set Chinese language in the "languages" settings when the options are displayed as garbled characters, as shown in the picture

shiny996 opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

How to set Chinese language in the "languages" settings when the options are displayed as garbled characters, as shown in the picture.

Expected Behavior

No response

Steps To Reproduce

When "languages" is selected as Chinese in "Settings"
03

Environment

- OS: debian 11
- How docker service was installed:
1.curl -fsSL https://get.docker.com -o get-docker.sh
2.chmod +x get-docker.sh && ./get-docker.sh

CPU architecture

arm64

Docker creation

version: "2.1"
services:
  firefox:
    image: lscr.io/linuxserver/firefox
    container_name: firefox
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
    volumes:
      - /root/firefox/config:/config
    ports:
      - 3000:3000
    shm_size: "1gb"
    restart: unless-stopped

Container logs

docker logs firefox       
[migrations] started
[migrations] no migrations found

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------


Generating 2048 bit rsa key...

ssl_gen_key_xrdp1 ok

saving to rsakeys.ini

Generating a RSA private key
....................................................................................................+++++
.....................+++++
writing new private key to '/etc/xrdp/key.pem'
-----
[custom-init] No custom files found, skipping...
guacd[182]: INFO:       Guacamole proxy daemon (guacd) version 1.1.0 started
guacd[182]: INFO:       Listening on host 0.0.0.0, port 4822
guacd[182]: INFO:       Guacamole connection closed during handshake
Starting guacamole-lite websocket server
listening on *:3000
[guac-init] Auto start not set, application start on login
[ls.io-init] done.
[2023-03-09 09:27:49] [Connection 1]  Client connection open
[2023-03-09 09:27:49] [Connection 1]  Opening guacd connection
[2023-03-09 09:27:49] [Connection 1]  guacd connection open
[2023-03-09 09:27:49] [Connection 1]  Selecting connection type: rdp
[2023-03-09 09:27:49] [Connection 1]  Sending opCode: 6.select,3.rdp;
guacd[182]: INFO:       Creating new client for protocol "rdp"
guacd[182]: INFO:       Connection ID is "$614c59dc-c767-4fb2-9395-20585db35a4a"
[2023-03-09 09:27:49] [Connection 1]  Sending opCode: 4.size,4.1646,13.935?undefined,2.96;
[2023-03-09 09:27:49] [Connection 1]  Sending opCode: 5.audio,9.audio/L16;
[2023-03-09 09:27:49] [Connection 1]  Sending opCode: 5.video;
[2023-03-09 09:27:49] [Connection 1]  Sending opCode: 5.image;
[2023-03-09 09:27:49] [Connection 1]  Server sent handshake: 4.args,13.VERSION_1_1_0,8.hostname,4.port,6.domain,8.username,8.password,5.width,6.height,3.dpi,15.initial-program,11.color-depth,13.disable-audio,15.enable-printing,12.printer-name,12.enable-drive,10.drive-name,10.drive-path,17.create-drive-path,7.console,13.console-audio,13.server-layout,8.security,11.ignore-cert,12.disable-auth,10.remote-app,14.remote-app-dir,15.remote-app-args,15.static-channels,11.client-name,16.enable-wallpaper,14.enable-theming,21.enable-font-smoothing,23.enable-full-window-drag,26.enable-desktop-composition,22.enable-menu-animations,22.disable-bitmap-caching,25.disable-offscreen-caching,21.disable-glyph-caching,16.preconnection-id,18.preconnection-blob,8.timezone,11.enable-sftp,13.sftp-hostname,13.sftp-host-key,9.sftp-port,13.sftp-username,13.sftp-password,16.sftp-private-key,15.sftp-passphrase,14.sftp-directory,19.sftp-root-directory,26.sftp-server-alive-interval,14.recording-path,14.recording-name,24.recording-exclude-output,23.recording-exclude-mouse,22.recording-include-keys,21.create-recording-path,13.resize-method,18.enable-audio-input,9.read-only,16.gateway-hostname,12.gateway-port,14.gateway-domain,16.gateway-username,16.gateway-password,17.load-balance-info
[2023-03-09 09:27:49] [Connection 1]  Sending opCode: 7.connect,0.,9.127.0.0.1,4.3389,0.,3.abc,3.abc,4.1646,13.935?undefined,2.96,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,12.en-us-qwerty,3.any,4.true,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,14.display-update,0.,0.,0.,0.,0.,0.,0.,0.;
guacd[231]: INFO:       Security mode: Negotiate (ANY)
guacd[231]: INFO:       Resize method: display-update
guacd[231]: INFO:       User "@32e1037b-4bdc-49f0-8ce8-33fd985ad0b2" joined connection "$614c59dc-c767-4fb2-9395-20585db35a4a" (1 users now present)
guacd[231]: INFO:       Loading keymap "base"
guacd[231]: INFO:       Loading keymap "en-us-qwerty"
xauth:  file .Xauthority does not exist

X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
Current Operating System: Linux 9a43c436e594 5.10.0-21-arm64 #1 SMP Debian 5.10.162-1 (2023-01-21) aarch64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-21-arm64 root=UUID=b3ac9233-edb2-41de-98f8-eab51f4ea60b ro quiet
 
Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: ".xorgxrdp.10.log", Time: Thu Mar  9 01:27:51 2023
(++) Using config file: "/etc/X11/xrdp/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xorgxrdpSetup:
xrdpdevSetup:
rdpmousePlug:
rdpkeybPlug:
rdpIdentify:
rdpDriverFunc: op 10
rdpProbe:
rdpPreInit:
rdpScreenInit: virtualX 800 virtualY 600 rgbBits 8 depth 24
rdpScreenInit: pfbMemory bytes 1920000
rdpScreenInit: pfbMemory 0xffffbdbcd040
rdpSimdInit: assigning yuv functions
rdpClientConInit: disconnect idle session after [0] sec
rdpClientConInit: kill disconnected [0] timeout [0] sec
rdpXvInit: depth 24
rdpScreenInit: out
rdpCreateScreenResources:
rdpmousePreInit: drv 0xffffbe496020 info 0xffffb5d98b50, flags 0x0
rdpmouseControl: what 0
rdpmouseDeviceInit:
rdpmouseCtrl:
rdpRegisterInputCallback: type 1 proc 0xffffbddb6c94
rdpmouseControl: what 1
rdpmouseDeviceOn:
rdpkeybPreInit: drv 0xffffbe4960c0 info 0xffffb5d98c90, flags 0x0
rdpkeybControl: what 0
rdpkeybDeviceInit:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
rdpRegisterInputCallback: type 0 proc 0xffffbdda346c
rdpkeybControl: what 1
rdpkeybDeviceOn:
Global configuration:
rdpDeferredRandR:
rdpResizeSession: width 1024 height 768
  calling RRScreenSizeSet
rdpRRScreenSetSize: width 1024 height 768 mmWidth 271 mmHeight 203
rdpRRGetInfo:
  screen resized to 1024x768
  RRScreenSizeSet ok 1
rdpResizeSession: width 1644 height 935
  calling RRScreenSizeSet
rdpRRScreenSetSize: width 1644 height 935 mmWidth 435 mmHeight 247
rdpRRGetInfo:
  screen resized to 1644x935
  RRScreenSizeSet ok 1
rdpClientConGotConnection:
rdpClientConGotConnection: g_sck_accept ok new_sck 7
rdpClientConGetConnection: idle_disconnect_timeout set to non-positive value, idle timer turned off
rdpAddClientConToDev: adding first clientCon 0xffffbdd8e050
rdpClientConProcessMsgVersion: version 0 0 0 1
rdpClientConProcessScreenSizeMsg: set width 1644 height 935 bpp 16
rdpClientConProcessScreenSizeMsg: shmemid 0 shmemptr 0xffffb50b4000
rdpClientConProcessMsgClientInput: invalidate x 0 y 0 cx 1644 cy 935
rdpRRGetInfo:
rdpClientConProcessMsgClientInfo:
  got client info bytes 7072
  jpeg support 0
  offscreen support 0
  offscreen size 0
  offscreen entries 0
  client supports glyph cache but server disabled
  client can not do offscreen to offscreen blits
  client can do new(color) cursor
  client can not do multimon
rdpRRSetRdpOutputs: numCrtcs 0 numOutputs 0 monitorCount 0
rdpRRSetRdpOutputs: add output 0 left 0 top 0 width 1644 height 935
rdpLoadLayout: keylayout 0x00000409 variant  display 10
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
fuse: device not found, try 'modprobe fuse' first
fuse: device not found, try 'modprobe fuse' first
fuse: device not found, try 'modprobe fuse' first
guacd[231]: INFO:       Accepted format: 16-bit PCM with 2 channels at 44100 Hz
guacd[231]: INFO:       Accepted format: 16-bit PCM with 2 channels at 22050 Hz
guacd[231]: INFO:       Connected to RDPDR 1.12 as client 0x2148d39
guacd[231]: INFO:       RDPDR user logged on
rdpInDeferredRepeatCallback:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off
rdpInDeferredRepeatCallback:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off
rdpInDeferredRepeatCallback:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

删除重开一个容器,加上参数-v /usr/share/fonts:/usr/share/fonts:ro
remove and recreate container with the parameter -v /usr/share/fonts:/usr/share/fonts:ro

删除重开一个容器,加上参数-v /usr/share/fonts:/usr/share/fonts:ro remove and recreate container with the parameter -v /usr/share/fonts:/usr/share/fonts:ro

yes! it is work.

You can also install the cjk fonts in the container from a terminal with:
sudo apk add font-noto-cjk

There is now an internationalization mod for this which automates the whole thing @shiny996 use these environment variables:

-e DOCKER_MODS=linuxserver/mods:universal-internationalization -e LC_ALL=zh_CN.UTF-8

This installs the fonts and sets the locale, but firefox has their own independent language packs and settings. This is much more streamlined on chromium IE:

docker run --rm -it -p 3000:3000 --shm-size="1gb" -e DOCKER_MODS=linuxserver/mods:universal-internationalization -e LC_ALL=zh_CN.UTF-8 linuxserver/chromium bash

chromium

Also I am working on adding all the translations for the webUI if you have any feedback on any of these translations here that would be much appreciated:

https://github.com/kasmtech/noVNC/blob/feature/KASM-4320-internationalization/po/zh_CN.po

You can even simply post a modified file here, I can make the changes code side. I would like to ensure the Chinese internationalization is done right.

There is also traditional chinese as well if you know that:

https://github.com/kasmtech/noVNC/blob/feature/KASM-4320-internationalization/po/zh_TW.po

More info on the mod here:

https://github.com/linuxserver/docker-mods/tree/universal-internationalization

Closing as completed