nurdism/neko的本地化修改,解决中文显示错误、头像显示错误问题
部署运行
1 |
docker run -d --name neko -p 8080:8080 -p 59000-59100:59000-59100/udp -e NEKO_PASSWORD='neko' -e NEKO_PASSWORD_ADMIN='secret' --cap-add SYS_ADMIN --shm-size=1gb nurdism/neko:chromium |
修复中文显示错误
进入container
1 |
docker exec -it neko bash |
安装字体
1 |
apt install -y fonts-wqy-zenhei xfonts-wqy |
修改配置
nano /etc/fonts/conf.d/49-sansserif.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?xml version=”1.0”?> <!DOCTYPE fontconfig SYSTEM “fonts.dtd”> <fontconfig> <!– If the font still has no generic name, add sans-serif –> <match target=”pattern”> <test qual=”all” name=”family” compare=”not_eq”> <string>sans-serif</string> </test> <test qual=”all” name=”family” compare=”not_eq”> <string>serif</string> </test> <test qual=”all” name=”family” compare=”not_eq”> <string>monospace</string> </test> <edit name=”family” mode=”append_last”> <string>WenQuanYi Zen Hei</string> </edit> </match> </fontconfig> |
重启container
1 |
docker restart neko |
修复头像显示错误
进入container
1 |
docker exec -it neko bash |
进入前端目录
1 |
cd /var/www/js |
找到类似app.08718670.js,修改
1 |
https://api.adorable.io/avatars/40/${member(message.id).displayname}.png |
改为https://avatars.dicebear.com/的api,一共4处
1 |
https://avatars.dicebear.com/api/human/${member(message.id).displayname}.svg |
Know More
https://sobaigu.com/chromium-display-chinese-in-ubuntu.html
https://github.com/nurdism/neko/commit/587249b101cda2fffd182d03ae8df93de618757b
There are no comments yet