From 8e11f5b60b0e7203e66306091f04823ed938b0fc Mon Sep 17 00:00:00 2001 From: Edison Jwa Date: Mon, 25 Sep 2023 12:59:27 +0900 Subject: [PATCH] - Add Support to TeamSpeak 3.6.2 - Remove Unused code --- .github/workflows/build.yml | 2 +- Gemfile | 7 --- maker.py | 2 +- maker.rb | 117 ------------------------------------ src/lagos_zh.ts | 12 ++-- 5 files changed, 10 insertions(+), 130 deletions(-) delete mode 100644 Gemfile delete mode 100755 maker.rb diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa4f825..51a0917 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: - name: Install Dependencies run: | - export TZ=Asia/Shanghai + export TZ=Asia/Seoul sudo apt-get update -q sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev-tools -y -q diff --git a/Gemfile b/Gemfile deleted file mode 100644 index fb7f902..0000000 --- a/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } - -gem "rubyzip" diff --git a/maker.py b/maker.py index ecc45f7..bd6ad23 100644 --- a/maker.py +++ b/maker.py @@ -9,7 +9,7 @@ import subprocess from urllib import request, parse, error from time import strftime, localtime -target_version = "3.6.0" +target_version = "3.6.2" language = "zh" cwd = sys.path[0] src = f"{cwd + os.sep}src{os.sep}" diff --git a/maker.rb b/maker.rb deleted file mode 100755 index 75cc815..0000000 --- a/maker.rb +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env ruby - -require "zip" -require 'net/http' -require "open3" - -Zip.setup do |c| - c.on_exists_proc = true - c.continue_on_exists_proc = true - c.unicode_names = true - c.default_compression = Zlib::BEST_COMPRESSION - c.force_entry_names_encoding = 'UTF-8' -end - -build_version = ENV["TRAVIS_BUILD_NUMBER"] -log_url = ENV["TRAVIS_JOB_WEB_URL"] -target_version = "3.5.0" -#language = "zh" -pwd = Dir.pwd -Dir.mkdir("dist") unless Dir.exist?("dist") -package_name = "Chinese_Translation_zh-CN.ts3_translation" - -def make_release() - case RUBY_PLATFORM - when /ix/i, /ux/i, /gnu/i, /bsd/i - # "unix" - lrelease = `which lrelease`.split[0] - when /win/i, /ming/i - # "windows" - lrelease = `where lrelease`.split[0] - else - # "other" - exit(1) - end - translated_count = 0 - total_count = 0 - translated = /(?:Generated\s)(\d+)(?: translation)/.freeze - untranslated = /(?:Ignored\s)(\d+)(?: untranslated)/.freeze - Dir.glob("src/*_zh.ts") do |file| - puts file - output = "dist/#{file[4...-3]}.qm" - stdin, stdout, stderr = Open3.popen3(lrelease, file, "-qm", output) - index = 0 - stdout.each_line do |line| - unless /qt_zh/.match?(file) - if index == 1 - translated_count += translated.match(line)[1].to_i - total_count += translated.match(line)[1].to_i - end - if index == 2 - total_count += untranslated.match(line)[1].to_i - end - end - puts line - index += 1 - end - stdout.close - unless stderr.nil? - stderr.each_line { |line| puts line } - stderr.close - end - puts "" # new line - end - send_progress(translated_count, total_count) -end - -def send_progress(done, total) - percentage = Rational(done*100,total).round(2).to_f - info = "当前进度:\n#{done}/#{total}\n#{percentage}%\n".freeze - puts info - telegram_push(info) unless ARGV[0] == "debug" -end - -def telegram_push(string) - tg_api = ENV['TG_API'] - group_id = ENV['TG_GROUP_ID'] - uri = URI("https://api.telegram.org/bot#{tg_api}/sendMessage") - querystring = {chat_id: group_id ,text: string} - uri.query = URI.encode_www_form(querystring) - res = Net::HTTP.get_response(uri) - puts res.code == '200' ? "\n推送成功" : "\n推送失败" -end - -def make_package(zipfile_name, build_version=nil, log_url=nil) - File.open('dist/package.ini', 'w') do |file| - package_info = [ - "Name = TeamSpeak 3 简体中文汉化包 目标软件版本: #{target_version}", - "Type = Translation", - "Author = 寂听 & EdisonJwa", - "Version = travis-dev-build##{build_version}", - "Platforms = ", - "Description = 源代码: https://github.com/jitingcn/TS3-Translation_zh-CN" + - " 构建日志: #{log_url unless log_url.nil?}"] - file.write(package_info.join("\n")) - end - Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile| - qm_files = Dir.glob("dist/*.qm") - qm_files.each do |file| - file = file.split("/") - zipfile.add("translations/"+file[1], File.join(file)) - end - zipfile.add("package.ini", File.join(["dist","package.ini"])) - end -end - -def debug() - case RUBY_PLATFORM - when /ix/i, /ux/i, /gnu/i, /bsd/i - FileUtils.cp Dir.glob("dist/*.qm"), "#{Dir.home}/.ts3client/translations", :verbose => true - else - exit - end -end - -make_release() -make_package(package_name) unless ARGV[0] == "debug" -debug() if ARGV[0] == "debug" diff --git a/src/lagos_zh.ts b/src/lagos_zh.ts index 25bc840..abf760a 100644 --- a/src/lagos_zh.ts +++ b/src/lagos_zh.ts @@ -16,8 +16,8 @@ Qt 版本: - For support please visit our <a href="http://forum.teamspeak.com">forum</a> - 如需技术支持,请访问 <a href="http://forum.teamspeak.com">官方论坛</a> (英语) + For support please visit our <a href="http://community.teamspeak.com">forum</a> + 如需技术支持,请访问 <a href="http://community.teamspeak.com">官方论坛</a> (英语) For support please visit our <a href="http://community.teamspeak.com">forum</a> @@ -26,7 +26,7 @@ PLACEHOLDER Translators can add their names, copyright notice or links here. If the text stays "PLACEHOLDER", the label will be hidden. - <b>简体中文化 由:</b> <a href="https://github.com/jitingcn">寂听</a> & <a href="https://www.wevg.org/">EdisonJwa</a><br>如有任何疑问,欢迎到<a href="https://github.com/VigorousPro/TS3-Translation_zh-CN">GitHub项目主页</a>提出建议或修改意见。<br>感谢所有提供帮助的同学 + <b>简体中文化 由:</b> <a href="https://github.com/jitingcn">寂听</a> & <a href="https://github.com/edisonjwa">EdisonJwa</a><br>如有任何疑问,欢迎到<a href="https://github.com/VigorousPro/TS3-Translation_zh-CN">GitHub项目主页</a>提出建议或修改意见。<br>感谢所有提供帮助的同学 Copyright @@ -295,7 +295,7 @@ After you verified your account, press the Login button. English 英语 English - + To help make TeamSpeak a better program, we would like to collect some statistics about your operating system and hardware. The data is sent anonymously. 为了使 TeamSpeak 变得更好,我们希望收集一些有关于您的操作系统和硬件配置的统计信息。这些数据将以匿名的方式发送。 @@ -11965,6 +11965,10 @@ This depends of course, on a valid playback and capture device. Always stay on top 保持窗口置顶 + + Open channel chat automatically + 自动打开频道聊天 + Enable more options for permission system 启用更多选项的权限系统