diff --git a/.docker/base/Dockerfile b/.docker/base/Dockerfile index f22b6f7..e8b2c96 100644 --- a/.docker/base/Dockerfile +++ b/.docker/base/Dockerfile @@ -82,7 +82,7 @@ RUN set -eux; \ gstreamer1.0-vaapi ;\ # # fonts - apt-get install -y --no-install-recommends fonts-takao-mincho; \ + apt-get install -y --no-install-recommends fonts-takao-mincho fonts-wqy-zenhei; \ # # create a non-root user groupadd --gid $USER_GID $USERNAME; \ diff --git a/.docker/base/Dockerfile.arm b/.docker/base/Dockerfile.arm index c92a88c..a3398bf 100644 --- a/.docker/base/Dockerfile.arm +++ b/.docker/base/Dockerfile.arm @@ -77,7 +77,7 @@ RUN set -eux; apt-get update; \ gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio gstreamer1.0-omx; \ # # fonts - apt-get install -y --no-install-recommends fonts-takao-mincho; \ + apt-get install -y --no-install-recommends fonts-takao-mincho fonts-wqy-zenhei; \ # # create a non-root user groupadd --gid $USER_GID $USERNAME; \ diff --git a/.docker/ungoogled-chromium/Dockerfile b/.docker/ungoogled-chromium/Dockerfile index 86716a8..af21521 100644 --- a/.docker/ungoogled-chromium/Dockerfile +++ b/.docker/ungoogled-chromium/Dockerfile @@ -5,6 +5,7 @@ ARG API_URL="https://api.github.com/repos/macchrome/linchrome/releases/latest" # # install custom chromium build from woolyss with support for hevc/x265 +SHELL ["/bin/bash", "-c"] RUN set -eux; apt-get update; \ apt-get install -y --no-install-recommends wget unzip libatk1.0-0 libatk-bridge2.0-0 libatomic1 \ libcups2 libgtk-3-0 libnss3 libpci3 libxcomposite1 libxss1 openbox xz-utils jq; \ @@ -21,11 +22,27 @@ RUN set -eux; apt-get update; \ # # install widevine module WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | tail -n 1); \ - wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/$WIDEVINE_VERSION-linux-x64.zip"; \ + wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-x64.zip"; \ unzip -p /tmp/widevine.zip libwidevinecdm.so > /usr/lib/chromium/libwidevinecdm.so; \ chmod 644 /usr/lib/chromium/libwidevinecdm.so; \ rm /tmp/widevine.zip; \ # + # install latest version of uBlock Origin and SponsorBlock for YouTube + CHROMIUM_VERSION="$(wget -O - "${API_URL}" 2>/dev/null | jq -r ".tag_name" | sed -e 's/v//' -e 's/-.*//')"; \ + EXTENSIONS_DIR="/usr/share/chromium/extensions"; \ + EXTENSIONS=( \ + cjpalhdlnbpafiamejdnhcphjbkeiagm \ + mnjggcdmjocbbbhaepdhchncahnbgone \ + ); \ + mkdir -p "${EXTENSIONS_DIR}"; \ + for EXT_ID in "${EXTENSIONS[@]}"; \ + do \ + EXT_URL="https://clients2.google.com/service/update2/crx?response=redirect&nacl_arch=x86-64&prodversion=${CHROMIUM_VERSION}&acceptformat=crx2,crx3&x=id%3D${EXT_ID}%26installsource%3Dondemand%26uc"; \ + EXT_PATH="${EXTENSIONS_DIR}/${EXT_ID}.crx"; \ + wget -O "${EXT_PATH}" "${EXT_URL}"; \ + EXT_VERSION="$(unzip -p "${EXT_PATH}" manifest.json 2>/dev/null | jq -r ".version")"; \ + echo -e "{\n \"external_crx\": \"${EXT_PATH}\",\n \"external_version\": \"${EXT_VERSION}\"\n}" > "${EXTENSIONS_DIR}"/"${EXT_ID}".json; \ + done; \ # clean up apt-get --purge autoremove -y xz-utils jq; \ apt-get clean -y; \ @@ -37,7 +54,3 @@ COPY supervisord.conf /etc/neko/supervisord/ungoogled-chromium.conf COPY preferences.json /usr/lib/chromium/master_preferences COPY policies.json /etc/chromium/policies/managed/policies.json COPY openbox.xml /etc/neko/openbox.xml - -# -# copy extensions and policy files -COPY extensions /usr/share/chromium/extensions diff --git a/.docker/ungoogled-chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.crx b/.docker/ungoogled-chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.crx deleted file mode 100644 index 507cdb8..0000000 Binary files a/.docker/ungoogled-chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.crx and /dev/null differ diff --git a/.docker/ungoogled-chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.json b/.docker/ungoogled-chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.json deleted file mode 100644 index 07f9e97..0000000 --- a/.docker/ungoogled-chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "external_crx": "/usr/share/chromium/extensions/cjpalhdlnbpafiamejdnhcphjbkeiagm.crx", - "external_version": "1.38.6" -} diff --git a/.docker/ungoogled-chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.crx b/.docker/ungoogled-chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.crx deleted file mode 100644 index 46c6108..0000000 Binary files a/.docker/ungoogled-chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.crx and /dev/null differ diff --git a/.docker/ungoogled-chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.json b/.docker/ungoogled-chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.json deleted file mode 100644 index 4f846f1..0000000 --- a/.docker/ungoogled-chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "external_crx": "/usr/share/chromium/extensions/mnjggcdmjocbbbhaepdhchncahnbgone.crx", - "external_version": "4.0.5" -} diff --git a/client/src/locale/index.ts b/client/src/locale/index.ts index 529399b..38a03c0 100644 --- a/client/src/locale/index.ts +++ b/client/src/locale/index.ts @@ -8,6 +8,7 @@ import * as de from './de-de' import * as ko from './ko-kr' import * as fi from './fi-fi' import * as ru from './ru-ru' +import * as cn from './zh-cn' export const messages = { en, @@ -20,4 +21,5 @@ export const messages = { ko, fi, ru, + cn, } diff --git a/client/src/locale/zh-cn.ts b/client/src/locale/zh-cn.ts new file mode 100644 index 0000000..566d1af --- /dev/null +++ b/client/src/locale/zh-cn.ts @@ -0,0 +1,112 @@ +export const logout = '登出' +export const unsupported = '你的浏览器不支持 WebRTC' +export const admin_loggedin = '您以管理钻身份登陆' +export const you = '你' +export const somebody = '某人' +export const send_a_message = '发送消息' + +export const side = { + chat: '聊天', + settings: '设置', +} + +export const connect = { + login_title: '登录', + invitation_title: '你已被邀请到这个房间', + displayname: '您的姓名', + password: '密码', + connect: '连接', + error: '登录错误', + empty_displayname: '显示名称不能为空', +} + +export const context = { + ignore: '忽略', + unignore: '取消忽略', + mute: '静音', + unmute: '取消静音', + release: '强制释放控制', + take: '牵制控制', + give: '给予控制', + kick: '踢出', + ban: '禁止 IP', + confirm: { + kick_title: '踢出 {name}?', + kick_text: '你确定你要替 {name}?', + ban_title: '禁止 {name}?', + ban_text: '你是否想禁止 {name}? 你将需要重新启动服务器来撤销这一做法.', + mute_title: '静音 {name}?', + mute_text: '你确定你要精印吗 {name}?', + unmute_title: '取消静音 {name}?', + unmute_text: '你想去下静音吗 {name}?', + button_yes: '是', + button_cancel: '取消', + }, +} + +export const controls = { + release: '释放控制', + request: '请求控制', + lock: '锁定控制', + unlock: '解锁控制', + has: '你有控制', + hasnot: '你没有控制', +} + +export const locks = { + control: { + lock: '对所有用户进行锁定控制', + unlock: '对所有用户进行解锁控制', + locked: '锁定的控制装置', + unlocked: '解锁的控制装置', + notif_locked: '为用户锁定控制', + notif_unlocked: '为用户解锁控制', + }, + login: { + lock: '所有用户的锁定室', + unlock: '所有用户的解锁室', + locked: '为所有用户锁定的房间', + unlocked: '为所有用户解锁的房间', + notif_locked: '锁上房间', + notif_unlocked: '解锁房间', + }, +} + +export const setting = { + scroll: '滚动敏感度', + scroll_invert: '反转滚动敏感度', + autoplay: '自动播放视频', + ignore_emotes: '忽略表情符号', + chat_sound: '播放聊天声音', + keyboard_layout: '键盘布局', + broadcast_title: '现场流媒体', +} + +export const connection = { + logged_out: '你已登出', + reconnecting: '正在重新连接', + connected: '已连接', + disconnected: '已断开', + kicked: '你已被踢出', + button_confirm: '好的', +} + +export const notifications = { + connected: '{name} 已连接', + disconnected: '{name} 已断开', + controls_taken: '{name} 采取了控制', + controls_taken_force: '被迫接受控制', + controls_taken_steal: '掌握控制权 从 {name}', + controls_released: '{name} 释放控制', + controls_released_force: '强制解除控制', + controls_released_steal: '强制解除控制 从 {name}', + controls_given: '将控制权交给 {name}', + controls_has: '{name} 拥有控制权', + controls_has_alt: '但我让那个人知道你想要它', + controls_requesting: '{name} 正在请求控制', + resolution: '将分辨率改为 {width}x{height}@{rate}', + banned: '被禁止 {name}', + kicked: '被踢的 {name}', + muted: '鸟粪 {name}', + unmuted: '取消静音 {name}', +} diff --git a/docs/changelog.md b/docs/changelog.md index 0035f32..a51fc57 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,8 @@ ## master branch +## [n.eko v2.6](https://github.com/m1k1o/neko/releases/tag/v2.6) + ### Bugs - Fixed fullscreen incompatibility for Safari [#121](https://github.com/m1k1o/neko/issues/121). - Fixed bad emoji matching for e.g. `:+1:` and `:100:` with new regex `/^:([^:\s]+):/`. @@ -21,6 +23,7 @@ - Removed `vncviewer` image, as its functionality is replaced and extended by remmina. - Opus uses `useinbandfec=1` from now on, hopefully fixes minor audio loss issues. - Font Awesome and Sweetalert2 upgraded to newest major version. +- Add chinese characters support. ## [n.eko v2.5](https://github.com/m1k1o/neko/releases/tag/v2.5) diff --git a/docs/getting-started/configuration.md b/docs/getting-started/configuration.md index d4f7de4..34008bc 100644 --- a/docs/getting-started/configuration.md +++ b/docs/getting-started/configuration.md @@ -144,7 +144,7 @@ nat1to1: #### `NEKO_STATIC`: - Path to neko client files to serve. -## Agruments +## Arguments You can execute `neko serve --help` to see available arguments. diff --git a/server/neko.go b/server/neko.go index 227c6b2..43dc949 100644 --- a/server/neko.go +++ b/server/neko.go @@ -39,7 +39,7 @@ var ( // Major version when you make incompatible API changes, major = "2" // Minor version when you add functionality in a backwards-compatible manner, and - minor = "5" + minor = "6" // Patch version when you make backwards-compatible bug fixes. patch = "0" )