浏览代码

Merge branch 'add_zh_tw'

nagadomi 9 年之前
父节点
当前提交
dd602fa0b4

+ 1 - 0
appendix/waifu2x.nginx.conf

@@ -14,6 +14,7 @@ map $http_accept_language $lang {
   ~de de;
   ~tr tr;
   ~zh-CN zh-CN;
+  ~zh-TW zh-TW;
   ~zh zh-CN;
   ~ko ko;
   ~en en;

+ 4 - 0
assets/index.de.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.es.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.fr.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.ja.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.ko.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.pt.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.ru.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.tr.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 4 - 0
assets/index.zh-CN.html

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>

+ 186 - 0
assets/index.zh-TW.html

@@ -0,0 +1,186 @@
+<!DOCTYPE html> 
+<html lang="zh-TW">
+  <!-- This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually. -->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta charset="utf-8">
+    <link rel="shortcut icon" href="favicon.ico"/>
+    <meta name="viewport" content="initial-scale=1.0,width=device-width">
+    <link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
+    <link href="style.css" rel="stylesheet" type="text/css">
+    <link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
+    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
+    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
+    <script type="text/javascript" src="ui.js"></script>
+    <title>waifu2x</title>
+  </head>
+  <body>
+    <div class="all-page">
+      <h1 class="main-title">waifu2x</h1>
+      <div class="choose-lang">
+	<a href="index.html">
+	  English
+	</a>
+	/
+	<a href="index.ja.html">
+	  日本語
+	</a>
+	/
+	<a href="index.ru.html">
+	  Русский
+	</a>
+	/
+	<a href="index.pt.html">
+	  Português
+	</a>
+	/
+	<a href="index.es.html">
+	  Español
+	</a>
+	/
+	<a href="index.fr.html">
+	  Français
+	</a>
+	/
+	<a href="index.de.html">
+	  Deutsch
+	</a>
+	/
+	<a href="index.tr.html">
+	  Türkçe
+	</a>
+	/
+	<a href="index.zh-CN.html">
+	  简体中文
+	</a>
+	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
+      </div>
+      <p>使用深度卷積神經網路的二次元圖片超解析系統。同時支援照片處理。</p>
+      <p class="margin1 link-box">
+	<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
+	  顯示執行結果範例
+	</a>
+	| 
+	<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
+	  專案網頁 (GitHub)
+	</a>
+      </p>
+      <form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
+	<div class="option-box first">
+	  <div class="option-left">選擇圖片:</div>
+	  <div class="option-right">
+	    <input type="text" id="url" name="url" placeholder="輸入圖片網址">
+	    <div class="option-right-small">
+	      選擇檔案: 
+	      <input type="file" id="file" name="file"></div>
+	  </div>
+	  <div class="option-hint file_limits">
+	    限制:檔案大小:5MB,去除雜點:3000x3000px,放大(前):1500x1500px。
+	  </div>
+	</div>
+	<div class="option-box">
+	  <div class="option-left">
+	    樣式:
+	  </div>
+	  <div class="option-right">
+	    <label><input type="radio" name="style" class="radio" value="art" checked>
+	      <span class="r-text">
+		插畫
+	      </span>
+	    </label>
+	    <label><input type="radio" name="style" class="radio" value="photo">
+	      <span class="r-text">
+		照片
+	      </span>
+	    </label>
+	  </div>
+	</div>
+	<div class="option-box">
+	  <div class="option-left">
+	    去除雜點:
+	    <div class="option-left-small">
+	      (預期產生 JPEG 雜點時)
+	    </div>
+	  </div>
+	  <div class="option-right">
+	    <label><input type="radio" name="noise" class="radio" value="-1">
+	      <span class="r-text">
+		無
+	      </span>
+	    </label>
+	    <label><input type="radio" name="noise" class="radio" value="0" checked>
+	      <span class="r-text">
+		低
+	      </span>
+	    </label>
+	    <label><input type="radio" name="noise" class="radio" value="1" checked>
+	      <span class="r-text">
+		中
+	      </span>
+	    </label>
+	    <label>
+	      <input type="radio" name="noise" class="radio" value="2">
+	      <span class="r-text">
+		高
+	      </span>
+	    </label>
+	    <label>
+	      <input type="radio" name="noise" class="radio" value="3">
+	      <span class="r-text">
+		最高
+	      </span>
+	    </label>
+	  </div>
+	  <div class="option-hint">
+	    去除雜點時可能會犧牲圖片細節。請在確定有 JPEG 雜點時再使用。
+	  </div>
+	</div>
+	<div class="option-box">
+	  <div class="option-left">
+	    放大:
+	    <div class="option-left-small"></div>
+	  </div>
+	  <div class="option-right">
+	    <label><input type="radio" name="scale" class="radio" value="-1" checked>
+	      <span class="r-text">
+		無
+	      </span>
+	    </label>
+	    <label><input type="radio" name="scale" class="radio" value="1">
+	      <span class="r-text">
+		1.6x
+	      </span>
+	    </label>
+	    <label><input type="radio" name="scale" class="radio" value="2">
+	      <span class="r-text">
+		2x
+	      </span>
+	    </label>
+	  </div>
+	</div>
+	
+	
+	  <input type="submit" class="button" value="執行">
+	
+	<input type="submit" name="download" value="儲存執行結果" class="button">
+	<div class="bottom-hint">
+	  <ul>
+	    
+	      <li>使用 Firefox 時無法透過右鍵選單儲存圖片,請改用 CTRL+S、或是按 ALT 鍵後點選檔案 - 另存新檔來儲存圖片。</li>
+	    
+	  </ul>
+	</div>
+      </form>
+    </div>
+    <div class="bottom-info address">
+      <a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
+    </div>
+  </body>
+</html>

+ 3 - 0
web.lua

@@ -347,6 +347,7 @@ local index_fr = file.read(path.join(ROOT, "assets", "index.fr.html"))
 local index_de = file.read(path.join(ROOT, "assets", "index.de.html"))
 local index_tr = file.read(path.join(ROOT, "assets", "index.tr.html"))
 local index_zh_cn = file.read(path.join(ROOT, "assets", "index.zh-CN.html"))
+local index_zh_tw = file.read(path.join(ROOT, "assets", "index.zh-TW.html"))
 local index_ko = file.read(path.join(ROOT, "assets", "index.ko.html"))
 local index_en = file.read(path.join(ROOT, "assets", "index.html"))
 function FormHandler:get()
@@ -372,6 +373,8 @@ function FormHandler:get()
 	 self:write(index_tr)
       elseif langs[1] == "zh-CN" or langs[1] == "zh" then
 	 self:write(index_zh_cn)
+      elseif langs[1] == "zh-TW" then
+	 self:write(index_zh_tw)
       elseif langs[1] == "ko" then
 	 self:write(index_ko)
       else

+ 28 - 0
webgen/locales/zh-TW.yml

@@ -0,0 +1,28 @@
+---
+description: 使用深度卷積神經網路的二次元圖片超解析系統。同時支援照片處理。
+show_demonstration: 顯示執行結果範例
+go_to_github: 專案網頁 (GitHub)
+image_choosing: 選擇圖片
+type_url: 輸入圖片網址
+choose_file: 選擇檔案
+file_limits: "限制:檔案大小:5MB,去除雜點:3000x3000px,放大(前):1500x1500px。"
+style: 樣式
+artwork: 插畫
+photo: 照片
+noise_reduction: 去除雜點
+expect_jpeg: 預期產生 JPEG 雜點時
+nr_none: 無
+nr_low: 低
+nr_medium: 中
+nr_high: 高
+nr_highest: 最高
+nr_hint: "去除雜點時可能會犧牲圖片細節。請在確定有 JPEG 雜點時再使用。"
+upscaling: 放大
+up_none: 無
+tta: TTA
+tta_hint: "TTA 能產生穩定的品質。但圖片大小有限制。"
+tta_rule: "規則"
+button_convert: 執行
+button_download: 儲存執行結果
+hints:
+  - "使用 Firefox 時無法透過右鍵選單儲存圖片,請改用 CTRL+S、或是按 ALT 鍵後點選檔案 - 另存新檔來儲存圖片。"

+ 4 - 0
webgen/templates/index.html.erb

@@ -54,6 +54,10 @@
 	  简体中文
 	</a>
 	/
+	<a href="index.zh-TW.html">
+	  繁體中文
+	</a>
+	/
 	<a href="index.ko.html">
 	  한국어
 	</a>