From b2cad8db78ac88ef6c80a3fc76d68dff2aedcd45 Mon Sep 17 00:00:00 2001 From: "youthlin.chen" Date: Tue, 31 Dec 2019 11:21:35 +0800 Subject: [PATCH] =?UTF-8?q?add=20translation=20Simplified=20Chinese(zh-cn)?= =?UTF-8?q?.=20=E6=B7=BB=E5=8A=A0=E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=20=E9=83=A8=E5=88=86=E6=9C=AF=E8=AF=AD?= =?UTF-8?q?=E5=8F=82=E8=80=83=E4=BA=86=20GB/T=2035663-2017?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/translations.py | 6 +- lib/translations_v2.py | 2 +- share/translation.txt | 99 ++++++++++++++++--------------- share/translations/zh-cn-help.txt | 69 +++++++++++++++++++++ share/translations/zh-cn.txt | 81 +++++++++++++++++++++++++ 5 files changed, 204 insertions(+), 53 deletions(-) create mode 100644 share/translations/zh-cn-help.txt create mode 100644 share/translations/zh-cn.txt diff --git a/lib/translations.py b/lib/translations.py index 074b385..1f07031 100644 --- a/lib/translations.py +++ b/lib/translations.py @@ -8,7 +8,7 @@ FULL_TRANSLATION = [ "af", "be", "ca", "da", "de", "el", "et", "fr", "fa", "hu", "id", "it", "nb", "nl", "pl", "pt-br", "ro", - "ru", "tr", "th", "uk", "vi", "zh-tw" + "ru", "tr", "th", "uk", "vi", "zh-cn", "zh-tw" ] PARTIAL_TRANSLATION = [ @@ -499,7 +499,7 @@ Du kan følge https://twitter.com/igor_chubin for oppdateringer. 抱歉,当前天气服务不可用。 以下显示默认城市(只对您可见)。 我们将会尽快获取新数据。 -您可以通过https://twitter.com/igor_chubin 获取最新动态。 +您可以通过 https://twitter.com/igor_chubin 获取最新动态。 ====================================================================================== """, 'nl': u""" @@ -745,7 +745,7 @@ CAPTION = { "uk": u"Прогноз погоди для:", "uz": u"Ob-havo bashorati:", "vi": u"Báo cáo thời tiết:", - "zh": u"天氣預報:", + "zh": u"天气预报:", "zu": u"Isimo sezulu:", "zh-tw": u"天氣報告:", } diff --git a/lib/translations_v2.py b/lib/translations_v2.py index 90098cc..2aa38a1 100644 --- a/lib/translations_v2.py +++ b/lib/translations_v2.py @@ -64,7 +64,7 @@ V2_TRANSLATION = { "uk": ("Прогноз погоди для:", "Погода", "Часовий пояс", "Зараз", "Світанок", "Схід сонця", "Зеніт", "Захід сонця", "Сутінки"), "uz": ("Ob-havo bashorati:", "", "", "", "", "", "", "", ""), "vi": ("Báo cáo thời tiết:", "", "", "", "", "", "", "", ""), - "zh": ("天氣預報:", "", "", "", "", "", "", "", ""), + "zh": ("天气预报:", "天气", "时区", "当前", "黎明", "日出", "正午", "日落", "黄昏"), "zh-tw": ("天氣預報:", "天氣", "時區", "目前", "黎明", "日出", "日正當中", "日落", "黃昏"), "zu": ("Isimo sezulu:", "", "", "", "", "", "", "", ""), } diff --git a/share/translation.txt b/share/translation.txt index e7c04fa..22c1a3a 100644 --- a/share/translation.txt +++ b/share/translation.txt @@ -4,55 +4,56 @@ wttr.in is translated in NUMBER_OF_LANGUAGES languages: Translated/improved/corrected by: - * Afrikaans: Casper Labuschage @casperl (on github) - * Armenian: Aram Bayadyan @aramix, Mikayel Ghazaryan @mkdotam, Grigor Khachatryan @grigortw - * Azerbaijani: Dmytro Nikitiuk, Elsevar Abbasov - * Belarusian: Igor Chubin, Anton Zhavoronkov @edogby (on github) - * Bosnian: Ismar Kunc @ismarkunc - * Bulgarian: Vladimir Vitkov @zeridon (on github) - * Brazilian-PT: Tupã Negreiros @TupaNegreiros (on github) - * Catalan: Angel Jarabo @legna29A - * Croatian: Siniša Kusić @ku5ic - * Czech: Juraj Kakody - * Danish: Kim Schulz @kimusan (on github) - * Dutch: Youri Claes - * Frisian: Anne Douwe Bouma @anned20 (on github) - * Esperanto: Igor Chubin - * Estonian: Jaan Jänesmäe @janesmae (on github) - * Finnish: @Maxifi - * French: Igor Chubin, @daftaupe, @iago-lito - * German: Igor Chubin, @MAGICC (https://kthx.at) - * Greek: Panayotis Vryonis and @Petewg (on github) - * Hebrew: E.R. - * Hungarian: Mark Petruska - * Italian: Diego Maniacco - * Icelandic: Óli G. @dvergur, Skúli Arnlaugsson @Arnlaugsson - * Indonesian: Andria Arisal @andria009 - * Japanese: @ryunix - * Kazakh: Akku Tutkusheva, Oleg Tropinin - * Korean: Jeremy Bae @opt9, Jung Winter @res_tin - * Latvian: Gunārs Danovskis - * Macedonian: Matej Plavevski @MatejMecka - * Norwegian: Fredrik Fjeld @fredrikfjeld - * Nynorsk: Kevin Brubeck Unhammer (https://unhammer.org/k/) - * Persian: Javad @threadripper_ - * Polish: Wojtek Łukasiewicz @wojtuch (on github) - * Portuguese: Fernando Bitti Loureiro @fbitti (on github) - * Romanian: Gabriel Moruz - * Russian: Igor Chubin - * Spanish: Fernando Bitti Loureiro @fbitti (on github) - * Slovak: Juraj Kakody - * Slovenian: B.S. - * Swedish: John Eriksson - * Serbian: Milan Stevanović @FathVader - * Swahili: Joel Mukuthu - * Turkish: Atabey Kaygun, Yilmaz @edigu, Volkan Tokmak(@volkanto) - * Taiwanese-ZH: Jeff Huang - * Thai: Vatunyoo Suwannapisit @kerlos - * Ukrainian: Igor Chubin, Serhiy @pavse - * Uzbek: Shukhrat Mukimov - * Welsh: Daniel Thomas - * Vietnamese: Lưu Vĩnh Phúc @phuclv90 (on github) + * Afrikaans: Casper Labuschage @casperl (on github) + * Armenian: Aram Bayadyan @aramix, Mikayel Ghazaryan @mkdotam, Grigor Khachatryan @grigortw + * Azerbaijani: Dmytro Nikitiuk, Elsevar Abbasov + * Belarusian: Igor Chubin, Anton Zhavoronkov @edogby (on github) + * Bosnian: Ismar Kunc @ismarkunc + * Bulgarian: Vladimir Vitkov @zeridon (on github) + * Brazilian-PT: Tupã Negreiros @TupaNegreiros (on github) + * Catalan: Angel Jarabo @legna29A + * Croatian: Siniša Kusić @ku5ic + * Czech: Juraj Kakody + * Danish: Kim Schulz @kimusan (on github) + * Dutch: Youri Claes + * Frisian: Anne Douwe Bouma @anned20 (on github) + * Esperanto: Igor Chubin + * Estonian: Jaan Jänesmäe @janesmae (on github) + * Finnish: @Maxifi + * French: Igor Chubin, @daftaupe, @iago-lito + * German: Igor Chubin, @MAGICC (https://kthx.at) + * Greek: Panayotis Vryonis and @Petewg (on github) + * Hebrew: E.R. + * Hungarian: Mark Petruska + * Italian: Diego Maniacco + * Icelandic: Óli G. @dvergur, Skúli Arnlaugsson @Arnlaugsson + * Indonesian: Andria Arisal @andria009 + * Japanese: @ryunix + * Kazakh: Akku Tutkusheva, Oleg Tropinin + * Korean: Jeremy Bae @opt9, Jung Winter @res_tin + * Latvian: Gunārs Danovskis + * Macedonian: Matej Plavevski @MatejMecka + * Norwegian: Fredrik Fjeld @fredrikfjeld + * Nynorsk: Kevin Brubeck Unhammer (https://unhammer.org/k/) + * Persian: Javad @threadripper_ + * Polish: Wojtek Łukasiewicz @wojtuch (on github) + * Portuguese: Fernando Bitti Loureiro @fbitti (on github) + * Romanian: Gabriel Moruz + * Russian: Igor Chubin + * Spanish: Fernando Bitti Loureiro @fbitti (on github) + * Slovak: Juraj Kakody + * Slovenian: B.S. + * Swedish: John Eriksson + * Serbian: Milan Stevanović @FathVader + * Swahili: Joel Mukuthu + * Turkish: Atabey Kaygun, Yilmaz @edigu, Volkan Tokmak(@volkanto) + * Chinese(Traditional): Jeff Huang + * Chinese(Simplified): YouthLin Chen(@YouthLin on github) + * Thai: Vatunyoo Suwannapisit @kerlos + * Ukrainian: Igor Chubin, Serhiy @pavse + * Uzbek: Shukhrat Mukimov + * Welsh: Daniel Thomas + * Vietnamese: Lưu Vĩnh Phúc @phuclv90 (on github) and many many others. diff --git a/share/translations/zh-cn-help.txt b/share/translations/zh-cn-help.txt new file mode 100644 index 0000000..d0894fb --- /dev/null +++ b/share/translations/zh-cn-help.txt @@ -0,0 +1,69 @@ +用法: + + $ curl wttr.in # 当前位置 + $ curl wttr.in/pek # 机场三字码 + +支持的位置类型: + + /paris # 城市名称 + /~Eiffel+tower # 任意地点 + /北京 # 任意语言的任意地点 + /PEK # 机场三字码 + /@stackoverflow.com # 域名 + /94107 # 区域代码 + /-78.46,106.79 # GPS 坐标 + +特殊位置: + + /moon # 月相(加上 ,+US 或 ,+France 以察看特定城市的月相) + /moon@2016-10-25 # 特定日期的月相(@2016-10-25) + +单位: + + m # 公制(国际单位制)(除美国外该单位制为默认值) + u # USCS(美国默认单位制) + M # 以米/秒为单位显示风速 + +查看选项: + + 0 # 仅当前天气 + 1 # 当前天气 + 未来 1 天 + 2 # 当前天气 + 未来 2 天 + A # 忽略代理(User-Agent)并强制使用 ANSI 输出格式(终端模式) + F # 不显示「关注」(Follow)那行 + n # 较窄模式(仅日夜) + q # 简练模式(无「天气预报」文字) + Q # 极简模式(无「天气预报」、无城市名称) + T # 关闭终端转义序列(无颜色) + +PNG 选项: + + /paris.png # 生成 PNG 文件 + p # 在输出图像周围增加缩进空白 + t # 透明度 150 + transparency=... # 透明度从 0 到 255(255 = 不透明) + +可合并使用的选项 + + /Paris?0pq + /Paris?0pq&lang=fr + /Paris_0pq.png # PNG 文件模式中在下划线 _ 后指定选项 + /Rome_0pq_lang=it.png # 用下划线分隔长选项 + +本地化: + + $ curl fr.wttr.in/Paris + $ curl wttr.in/paris?lang=fr + $ curl -H "Accept-Language: fr" wttr.in/paris + +支持的语言: + + FULL_TRANSLATION (supported) + PARTIAL_TRANSLATION (in progress) + +特殊 URL: + + /:help # 显示此页面 + /:bash.function # 显示建议的 bash 函数 wttr() + /:translation # 显示翻译者信息 + diff --git a/share/translations/zh-cn.txt b/share/translations/zh-cn.txt new file mode 100644 index 0000000..3caff46 --- /dev/null +++ b/share/translations/zh-cn.txt @@ -0,0 +1,81 @@ +113:晴 : Clear +113:晴 : Sunny +116:少云 : Partly cloudy +119:多云 : Cloudy +122:阴 : Overcast +143:轻雾 : Mist +176:可能下小雨 : Patchy rain possible +179:可能下小雪 : Patchy snow possible +182:可能有雨夹雪 : Patchy sleet possible +185:可能有冻毛毛雨 : Patchy freezing drizzle possible +200:可能打雷 : Thundery outbreaks possible +227:小雪 : Blowing snow +230:暴雪 : Blizzard +248:雾 : Fog +260:冻雾 : Freezing fog +263:局部毛毛雨 : Patchy light drizzle +266:毛毛雨 : Light drizzle +281:冻毛毛雨 : Freezing drizzle +284:大冻毛毛雨 : Heavy freezing drizzle +293:局部小雨 : Patchy light rain +296:小雨 : Light rain +299:有时中雨 : Moderate rain at times +302:中雨 : Moderate rain +305:有时大雨 : Heavy rain at times +308:大雨 : Heavy rain +311:小冻雨 : Light freezing rain +314:中或大冻雨 : Moderate or heavy freezing rain +317:小雨夹雪 : Light sleet +320:中或大雨夹雪 : Moderate or heavy sleet +323:局部小雪 : Patchy light snow +326:小雪 : Light snow +329:局部中雪 : Patchy moderate snow +332:中雪 : Moderate snow +335:局部大雪 : Patchy heavy snow +338:大雪 : Heavy snow +350:冰珠 : Ice pellets +353:小阵雨 : Light rain shower +356:中或大阵雨 : Moderate or heavy rain shower +359:暴阵雨 : Torrential rain shower +362:小阵雨夹雪 : Light sleet showers +365:中或大阵雨夹雪 : Moderate or heavy sleet showers +368:小阵雪 : Light snow showers +371:中或大阵雪 : Moderate or heavy snow showers +386:局部小雷阵雨 : Patchy light rain with thunder +389:中或大雷阵雨 : Moderate or heavy rain with thunder +392:小雷阵雪 : Patchy light snow with thunder +395:中或大雷阵雪 : Moderate or heavy snow with thunder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +