feat: Added Caiyun Translate
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
sougou: `https://fanyi.sogou.com`,
|
||||
baidu: `https://fanyi.baidu.com`,
|
||||
bing: `https://cn.bing.com/translator`,
|
||||
caiyun: `https://fanyi.caiyunapp.com`,
|
||||
youdao: `https://fanyi.youdao.com`,
|
||||
});
|
||||
|
||||
@@ -29,8 +30,8 @@
|
||||
$effect(() => {
|
||||
urlMaps.sougou = `https://fanyi.sogou.com/text?keyword=${encodeURIComponent(text)}&transfrom=auto&transto=zh-CHS&model=general`;
|
||||
urlMaps.baidu = `https://fanyi.baidu.com/mtpe-individual/transText?query=${encodeURIComponent(text)}&lang=auto2zh`;
|
||||
// Bing 翻译支持 URL 参数传递文本
|
||||
urlMaps.bing = `https://cn.bing.com/translator?text=${encodeURIComponent(text)}&mkt=zh-CN`;
|
||||
urlMaps.caiyun = `https://fanyi.caiyunapp.com`;
|
||||
// 有道翻译不支持通过URL参数自动填入文本,因此只能打开翻译页面
|
||||
urlMaps.youdao = `https://fanyi.youdao.com/#/TextTranslate`;
|
||||
});
|
||||
@@ -120,6 +121,39 @@
|
||||
></iframe>
|
||||
</div>
|
||||
|
||||
<label class="tab">
|
||||
<input type="radio" name="my_tabs_4" />
|
||||
<svg
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
><path
|
||||
d="M381.5 483.7c0-53.1 43.2-96.3 96.3-96.3h85v-187c0-9.4-7.6-17-17-17H137.9c-9.4 0-17 7.6-17 17v283.3c0 9.4 7.6 17 17 17h73.6v32.1l64.3-32.1h105.7v-17z"
|
||||
fill="#9ADCCF"
|
||||
></path><path
|
||||
d="M747.7 784h-270c-9.4 0-17-7.6-17-17V483.7c0-9.4 7.6-17 17-17h407.9c9.4 0 17 7.6 17 17V767c0 9.4-7.6 17-17 17H812v32.1L747.7 784z"
|
||||
fill="#FFF370"
|
||||
></path><path
|
||||
d="M341.8 523.4h-56.7c-2.6 0-5.2 0.6-7.6 1.8l-88.7 44.4v-29.2c0-9.4-7.6-17-17-17h-34c-21.9 0-39.7-17.8-39.7-39.7V200.5c0-21.9 17.8-39.7 39.7-39.7h407.9c21.9 0 39.7 17.8 39.7 39.7v147.3c0 9.4 7.6 17 17 17s17-7.6 17-17V200.5c0-40.6-33-73.6-73.6-73.6H137.9c-40.6 0-73.6 33-73.6 73.6v283.3c0 40.6 33 73.6 73.6 73.6h17V597c0 5.9 3 11.4 8.1 14.5 2.7 1.7 5.8 2.5 8.9 2.5 2.6 0 5.2-0.6 7.6-1.8l109.7-54.9h52.6c9.4 0 17-7.6 17-17 0-9.3-7.6-16.9-17-16.9z"
|
||||
fill="#4F3D3B"
|
||||
></path><path
|
||||
d="M885.7 410.1h-65.8c-9.4 0-17 7.6-17 17s7.6 17 17 17h65.8c21.9 0 39.7 17.8 39.7 39.7V767c0 21.9-17.8 39.7-39.7 39.7h-34c-9.4 0-17 7.6-17 17v29.2L746 808.4c-2.4-1.2-5-1.8-7.6-1.8H477.8c-21.9 0-39.7-17.8-39.7-39.7V483.7c0-21.9 17.8-39.7 39.7-39.7h249.3c9.4 0 17-7.6 17-17s-7.6-17-17-17H477.8c-12.9 0-25 3.3-35.5 9.2l-85-180.7c-2.8-6-8.8-9.8-15.4-9.8s-12.6 3.8-15.4 9.8l-90.6 192.6c-4 8.5-0.3 18.6 8.1 22.6 8.5 4 18.6 0.3 22.6-8.1l19.4-41.2h111.7l18.4 39.1c-7.6 11.6-12 25.4-12 40.2V767c0 40.6 33 73.6 73.6 73.6h256.6L844 895.5c2.4 1.2 5 1.8 7.6 1.8 3.1 0 6.2-0.9 8.9-2.5 5-3.1 8.1-8.6 8.1-14.5v-39.7h17c40.6 0 73.6-33 73.6-73.6V483.7c0.1-40.6-32.9-73.6-73.5-73.6z m-583.8-39.7l39.9-84.7 39.9 84.7h-79.8zM358 733.9c-0.2-0.6-0.3-1.1-0.5-1.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"
|
||||
fill="#4F3D3B"
|
||||
></path><path
|
||||
d="M681.7 750c9.4 0 17-7.6 17-17v-45.3H778c9.4 0 17-7.6 17-17V580c0-9.4-7.6-17-17-17h-79.3v-45.3c0-9.4-7.6-17-17-17s-17 7.6-17 17V563h-79.3c-9.4 0-17 7.6-17 17v90.6c0 9.4 7.6 17 17 17h79.3V733c0 9.4 7.6 17 17 17z m17-153H761v56.7h-62.3V597z m-96.3 56.7V597h62.3v56.7h-62.3z"
|
||||
fill="#4F3D3B"
|
||||
></path></svg
|
||||
>
|
||||
<span class="ml-2"> 彩云小译 </span>
|
||||
</label>
|
||||
<div class="tab-content bg-base-100 border-base-300">
|
||||
<iframe title="彩云小译" class="w-full h-full" src={urlMaps["caiyun"]}
|
||||
></iframe>
|
||||
</div>
|
||||
|
||||
<label class="tab">
|
||||
<input type="radio" name="my_tabs_4" />
|
||||
<svg
|
||||
|
||||
Reference in New Issue
Block a user