Hello community, here is the log from the commit of package translate-shell for openSUSE:Factory checked in at 2017-05-10 20:53:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/translate-shell (Old) and /work/SRC/openSUSE:Factory/.translate-shell.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "translate-shell" Wed May 10 20:53:54 2017 rev:10 rq:494237 version:0.9.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/translate-shell/translate-shell.changes 2016-05-30 09:58:20.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.translate-shell.new/translate-shell.changes 2017-05-10 20:53:55.278028739 +0200 @@ -1,0 +2,6 @@ +Tue May 9 16:45:47 UTC 2017 - sor.ale...@meowr.ru + +- Update to version 0.9.6.3: + * No changelog available. + +------------------------------------------------------------------- Old: ---- translate-shell-0.9.4.tar.gz New: ---- translate-shell-0.9.6.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ translate-shell.spec ++++++ --- /var/tmp/diff_new_pack.BAJRnR/_old 2017-05-10 20:53:56.557848139 +0200 +++ /var/tmp/diff_new_pack.BAJRnR/_new 2017-05-10 20:53:56.557848139 +0200 @@ -1,7 +1,7 @@ # # spec file for package translate-shell # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: translate-shell -Version: 0.9.4 +Version: 0.9.6.3 Release: 0 Summary: Google Translate to serve as a command-line tool License: Unlicense @@ -46,14 +46,14 @@ %setup -q %build -make %{?_smp_mflags} +make %{?_smp_mflags} V=1 %install %make_install \ PREFIX=%{buildroot}%{_prefix} %check -LC_ALL=en_US.UTF-8 make test %{?_smp_mflags} +LC_ALL=en_US.UTF-8 make test %{?_smp_mflags} V=1 %files %defattr(-,root,root) ++++++ translate-shell-0.9.4.tar.gz -> translate-shell-0.9.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/README.md new/translate-shell-0.9.6.3/README.md --- old/translate-shell-0.9.4/README.md 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/README.md 2017-05-01 14:18:51.000000000 +0200 @@ -69,7 +69,7 @@ ### Recommended Dependencies -These dependecies are optional, but strongly recommended for full functionality: +These dependencies are optional, but strongly recommended for full functionality: * **[curl](http://curl.haxx.se/)** with **OpenSSL** support * **[GNU FriBidi](http://fribidi.org/)**: _an implementation of the Unicode Bidirectional Algorithm (bidi)_ @@ -379,6 +379,8 @@ Do not use any other theme than default. -no-ansi Do not use ANSI escape codes. + -no-autocorrect + Do not autocorrect. (if defaulted by the translation engine) -no-bidi Do not convert bidirectional texts. @@ -447,43 +449,45 @@ | Language | Code | Language | Code | Language | Code | | :------: | :--: | :------: | :--: | :------: | :--: | -| **[Afrikaans](http://en.wikipedia.org/wiki/Afrikaans_language)** <br/> **Afrikaans** | **`af`** | **[Hindi](http://en.wikipedia.org/wiki/Hindi_language)** <br/> **हिन्दी** | **`hi`** | **[Polish](http://en.wikipedia.org/wiki/Polish_language)** <br/> **Polski** | **`pl`** | -| **[Albanian](http://en.wikipedia.org/wiki/Albanian_language)** <br/> **Shqip** | **`sq`** | **[Hmong](http://en.wikipedia.org/wiki/Hmong_language)** <br/> **Hmoob** | **`hmn`** | **[Portuguese](http://en.wikipedia.org/wiki/Portuguese_language)** <br/> **Português** | **`pt`** | -| **[Amharic](http://en.wikipedia.org/wiki/Amharic_language)** <br/> **አማርኛ** | **`am`** | **[Hmong Daw](http://en.wikipedia.org/wiki/Hmong_Daw)** <br/> **Hmoob Daw** | **`mww`** | **[Punjabi](http://en.wikipedia.org/wiki/Punjabi_language)** <br/> **ਪੰਜਾਬੀ** | **`pa`** | -| **[Arabic](http://en.wikipedia.org/wiki/Arabic_language)** <br/> **العربية** | **`ar`** | **[Hungarian](http://en.wikipedia.org/wiki/Hungarian_language)** <br/> **Magyar** | **`hu`** | **[Querétaro Otomi](http://en.wikipedia.org/wiki/Querétaro_Otomi)** <br/> **Hñąñho** | **`otq`** | -| **[Armenian](http://en.wikipedia.org/wiki/Armenian_language)** <br/> **Հայերեն** | **`hy`** | **[Icelandic](http://en.wikipedia.org/wiki/Icelandic_language)** <br/> **Íslenska** | **`is`** | **[Romanian](http://en.wikipedia.org/wiki/Romanian_language)** <br/> **Română** | **`ro`** | -| **[Azerbaijani](http://en.wikipedia.org/wiki/Azerbaijani_language)** <br/> **Azərbaycanca** | **`az`** | **[Igbo](http://en.wikipedia.org/wiki/Igbo_language)** <br/> **Igbo** | **`ig`** | **[Russian](http://en.wikipedia.org/wiki/Russian_language)** <br/> **Русский** | **`ru`** | -| **[Basque](http://en.wikipedia.org/wiki/Basque_language)** <br/> **Euskara** | **`eu`** | **[Indonesian](http://en.wikipedia.org/wiki/Indonesian_language)** <br/> **Bahasa Indonesia** | **`id`** | **[Samoan](http://en.wikipedia.org/wiki/Samoan_language)** <br/> **Gagana Sāmoa** | **`sm`** | -| **[Belarusian](http://en.wikipedia.org/wiki/Belarusian_language)** <br/> **беларуская** | **`be`** | **[Irish](http://en.wikipedia.org/wiki/Irish_language)** <br/> **Gaeilge** | **`ga`** | **[Scots Gaelic](http://en.wikipedia.org/wiki/Scots_Gaelic)** <br/> **Gàidhlig** | **`gd`** | -| **[Bengali](http://en.wikipedia.org/wiki/Bengali_language)** <br/> **বাংলা** | **`bn`** | **[Italian](http://en.wikipedia.org/wiki/Italian_language)** <br/> **Italiano** | **`it`** | **[Serbian (Cyrillic)](http://en.wikipedia.org/wiki/Serbian_(Cyrillic))** <br/> **српски** | **`sr-Cyrl`** | -| **[Bosnian](http://en.wikipedia.org/wiki/Bosnian_language)** <br/> **Bosanski** | **`bs`** | **[Japanese](http://en.wikipedia.org/wiki/Japanese_language)** <br/> **日本語** | **`ja`** | **[Serbian (Latin)](http://en.wikipedia.org/wiki/Serbian_(Latin))** <br/> **srpski** | **`sr-Latn`** | -| **[Bulgarian](http://en.wikipedia.org/wiki/Bulgarian_language)** <br/> **български** | **`bg`** | **[Javanese](http://en.wikipedia.org/wiki/Javanese_language)** <br/> **Basa Jawa** | **`jv`** | **[Sesotho](http://en.wikipedia.org/wiki/Sesotho_language)** <br/> **Sesotho** | **`st`** | -| **[Catalan](http://en.wikipedia.org/wiki/Catalan_language)** <br/> **Català** | **`ca`** | **[Kannada](http://en.wikipedia.org/wiki/Kannada_language)** <br/> **ಕನ್ನಡ** | **`kn`** | **[Shona](http://en.wikipedia.org/wiki/Shona_language)** <br/> **chiShona** | **`sn`** | -| **[Cebuano](http://en.wikipedia.org/wiki/Cebuano_language)** <br/> **Cebuano** | **`ceb`** | **[Kazakh](http://en.wikipedia.org/wiki/Kazakh_language)** <br/> **Қазақ тілі** | **`kk`** | **[Sindhi](http://en.wikipedia.org/wiki/Sindhi_language)** <br/> **سنڌي** | **`sd`** | -| **[Chichewa](http://en.wikipedia.org/wiki/Chichewa_language)** <br/> **Nyanja** | **`ny`** | **[Khmer](http://en.wikipedia.org/wiki/Khmer_language)** <br/> **ភាសាខ្មែរ** | **`km`** | **[Sinhala](http://en.wikipedia.org/wiki/Sinhala_language)** <br/> **සිංහල** | **`si`** | -| **[Chinese Simplified](http://en.wikipedia.org/wiki/Chinese_Simplified)** <br/> **简体中文** | **`zh-CN`** | **[Klingon](http://en.wikipedia.org/wiki/Klingon_language)** <br/> **tlhIngan Hol** | **`tlh`** | **[Slovak](http://en.wikipedia.org/wiki/Slovak_language)** <br/> **Slovenčina** | **`sk`** | -| **[Chinese Traditional](http://en.wikipedia.org/wiki/Chinese_Traditional)** <br/> **正體中文** | **`zh-TW`** | **[Klingon (pIqaD)](http://en.wikipedia.org/wiki/Klingon_(pIqaD))** <br/> ** ** | **`tlh-Qaak`** | **[Slovenian](http://en.wikipedia.org/wiki/Slovenian_language)** <br/> **Slovenščina** | **`sl`** | -| **[Corsican](http://en.wikipedia.org/wiki/Corsican_language)** <br/> **Corsu** | **`co`** | **[Korean](http://en.wikipedia.org/wiki/Korean_language)** <br/> **한국어** | **`ko`** | **[Somali](http://en.wikipedia.org/wiki/Somali_language)** <br/> **Soomaali** | **`so`** | -| **[Croatian](http://en.wikipedia.org/wiki/Croatian_language)** <br/> **Hrvatski** | **`hr`** | **[Kurdish](http://en.wikipedia.org/wiki/Kurdish_language)** <br/> **Kurdî** | **`ku`** | **[Spanish](http://en.wikipedia.org/wiki/Spanish_language)** <br/> **Español** | **`es`** | -| **[Czech](http://en.wikipedia.org/wiki/Czech_language)** <br/> **Čeština** | **`cs`** | **[Kyrgyz](http://en.wikipedia.org/wiki/Kyrgyz_language)** <br/> **Кыргызча** | **`ky`** | **[Sundanese](http://en.wikipedia.org/wiki/Sundanese_language)** <br/> **Basa Sunda** | **`su`** | -| **[Danish](http://en.wikipedia.org/wiki/Danish_language)** <br/> **Dansk** | **`da`** | **[Lao](http://en.wikipedia.org/wiki/Lao_language)** <br/> **ລາວ** | **`lo`** | **[Swahili](http://en.wikipedia.org/wiki/Swahili_language)** <br/> **Kiswahili** | **`sw`** | -| **[Dutch](http://en.wikipedia.org/wiki/Dutch_language)** <br/> **Nederlands** | **`nl`** | **[Latin](http://en.wikipedia.org/wiki/Latin_language)** <br/> **Latina** | **`la`** | **[Swedish](http://en.wikipedia.org/wiki/Swedish_language)** <br/> **Svenska** | **`sv`** | -| **[English](http://en.wikipedia.org/wiki/English_language)** <br/> **English** | **`en`** | **[Latvian](http://en.wikipedia.org/wiki/Latvian_language)** <br/> **Latviešu** | **`lv`** | **[Tajik](http://en.wikipedia.org/wiki/Tajik_language)** <br/> **Тоҷикӣ** | **`tg`** | -| **[Esperanto](http://en.wikipedia.org/wiki/Esperanto_language)** <br/> **Esperanto** | **`eo`** | **[Lithuanian](http://en.wikipedia.org/wiki/Lithuanian_language)** <br/> **Lietuvių** | **`lt`** | **[Tamil](http://en.wikipedia.org/wiki/Tamil_language)** <br/> **தமிழ்** | **`ta`** | -| **[Estonian](http://en.wikipedia.org/wiki/Estonian_language)** <br/> **Eesti** | **`et`** | **[Luxembourgish](http://en.wikipedia.org/wiki/Luxembourgish_language)** <br/> **Lëtzebuergesch** | **`lb`** | **[Tatar](http://en.wikipedia.org/wiki/Tatar_language)** <br/> **татарча** | **`tt`** | -| **[Filipino](http://en.wikipedia.org/wiki/Filipino_language)** <br/> **Tagalog** | **`tl`** | **[Macedonian](http://en.wikipedia.org/wiki/Macedonian_language)** <br/> **Македонски** | **`mk`** | **[Telugu](http://en.wikipedia.org/wiki/Telugu_language)** <br/> **తెలుగు** | **`te`** | -| **[Finnish](http://en.wikipedia.org/wiki/Finnish_language)** <br/> **Suomi** | **`fi`** | **[Malagasy](http://en.wikipedia.org/wiki/Malagasy_language)** <br/> **Malagasy** | **`mg`** | **[Thai](http://en.wikipedia.org/wiki/Thai_language)** <br/> **ไทย** | **`th`** | -| **[French](http://en.wikipedia.org/wiki/French_language)** <br/> **Français** | **`fr`** | **[Malay](http://en.wikipedia.org/wiki/Malay_language)** <br/> **Bahasa Melayu** | **`ms`** | **[Turkish](http://en.wikipedia.org/wiki/Turkish_language)** <br/> **Türkçe** | **`tr`** | -| **[Frisian](http://en.wikipedia.org/wiki/Frisian_language)** <br/> **Frysk** | **`fy`** | **[Malayalam](http://en.wikipedia.org/wiki/Malayalam_language)** <br/> **മലയാളം** | **`ml`** | **[Ukrainian](http://en.wikipedia.org/wiki/Ukrainian_language)** <br/> **Українська** | **`uk`** | -| **[Galician](http://en.wikipedia.org/wiki/Galician_language)** <br/> **Galego** | **`gl`** | **[Maltese](http://en.wikipedia.org/wiki/Maltese_language)** <br/> **Malti** | **`mt`** | **[Urdu](http://en.wikipedia.org/wiki/Urdu_language)** <br/> **اُردُو** | **`ur`** | -| **[Georgian](http://en.wikipedia.org/wiki/Georgian_language)** <br/> **ქართული** | **`ka`** | **[Maori](http://en.wikipedia.org/wiki/Maori_language)** <br/> **Māori** | **`mi`** | **[Uzbek](http://en.wikipedia.org/wiki/Uzbek_language)** <br/> **Oʻzbek tili** | **`uz`** | -| **[German](http://en.wikipedia.org/wiki/German_language)** <br/> **Deutsch** | **`de`** | **[Marathi](http://en.wikipedia.org/wiki/Marathi_language)** <br/> **मराठी** | **`mr`** | **[Vietnamese](http://en.wikipedia.org/wiki/Vietnamese_language)** <br/> **Tiếng Việt** | **`vi`** | -| **[Greek](http://en.wikipedia.org/wiki/Greek_language)** <br/> **Ελληνικά** | **`el`** | **[Mongolian](http://en.wikipedia.org/wiki/Mongolian_language)** <br/> **Монгол** | **`mn`** | **[Welsh](http://en.wikipedia.org/wiki/Welsh_language)** <br/> **Cymraeg** | **`cy`** | -| **[Gujarati](http://en.wikipedia.org/wiki/Gujarati_language)** <br/> **ગુજરાતી** | **`gu`** | **[Myanmar](http://en.wikipedia.org/wiki/Myanmar_language)** <br/> **မြန်မာစာ** | **`my`** | **[Xhosa](http://en.wikipedia.org/wiki/Xhosa_language)** <br/> **isiXhosa** | **`xh`** | -| **[Haitian Creole](http://en.wikipedia.org/wiki/Haitian_Creole)** <br/> **Kreyòl Ayisyen** | **`ht`** | **[Nepali](http://en.wikipedia.org/wiki/Nepali_language)** <br/> **नेपाली** | **`ne`** | **[Yiddish](http://en.wikipedia.org/wiki/Yiddish_language)** <br/> **ייִדיש** | **`yi`** | -| **[Hausa](http://en.wikipedia.org/wiki/Hausa_language)** <br/> **Hausa** | **`ha`** | **[Norwegian](http://en.wikipedia.org/wiki/Norwegian_language)** <br/> **Norsk** | **`no`** | **[Yoruba](http://en.wikipedia.org/wiki/Yoruba_language)** <br/> **Yorùbá** | **`yo`** | -| **[Hawaiian](http://en.wikipedia.org/wiki/Hawaiian_language)** <br/> **ʻŌlelo Hawaiʻi** | **`haw`** | **[Pashto](http://en.wikipedia.org/wiki/Pashto_language)** <br/> **پښتو** | **`ps`** | **[Yucatec Maya](http://en.wikipedia.org/wiki/Yucatec_Maya)** <br/> **Màaya T'àan** | **`yua`** | -| **[Hebrew](http://en.wikipedia.org/wiki/Hebrew_language)** <br/> **עִבְרִית** | **`he`** | **[Persian](http://en.wikipedia.org/wiki/Persian_language)** <br/> **فارسی** | **`fa`** | **[Zulu](http://en.wikipedia.org/wiki/Zulu_language)** <br/> **isiZulu** | **`zu`** | +| **[Afrikaans](http://en.wikipedia.org/wiki/Afrikaans_language)** <br/> **Afrikaans** | **`af`** | **[Hindi](http://en.wikipedia.org/wiki/Hindi_language)** <br/> **हिन्दी** | **`hi`** | **[Punjabi](http://en.wikipedia.org/wiki/Punjabi_language)** <br/> **ਪੰਜਾਬੀ** | **`pa`** | +| **[Albanian](http://en.wikipedia.org/wiki/Albanian_language)** <br/> **Shqip** | **`sq`** | **[Hmong](http://en.wikipedia.org/wiki/Hmong_language)** <br/> **Hmoob** | **`hmn`** | **[Querétaro Otomi](http://en.wikipedia.org/wiki/Querétaro_Otomi)** <br/> **Hñąñho** | **`otq`** | +| **[Amharic](http://en.wikipedia.org/wiki/Amharic_language)** <br/> **አማርኛ** | **`am`** | **[Hmong Daw](http://en.wikipedia.org/wiki/Hmong_Daw)** <br/> **Hmoob Daw** | **`mww`** | **[Romanian](http://en.wikipedia.org/wiki/Romanian_language)** <br/> **Română** | **`ro`** | +| **[Arabic](http://en.wikipedia.org/wiki/Arabic_language)** <br/> **العربية** | **`ar`** | **[Hungarian](http://en.wikipedia.org/wiki/Hungarian_language)** <br/> **Magyar** | **`hu`** | **[Russian](http://en.wikipedia.org/wiki/Russian_language)** <br/> **Русский** | **`ru`** | +| **[Armenian](http://en.wikipedia.org/wiki/Armenian_language)** <br/> **Հայերեն** | **`hy`** | **[Icelandic](http://en.wikipedia.org/wiki/Icelandic_language)** <br/> **Íslenska** | **`is`** | **[Samoan](http://en.wikipedia.org/wiki/Samoan_language)** <br/> **Gagana Sāmoa** | **`sm`** | +| **[Azerbaijani](http://en.wikipedia.org/wiki/Azerbaijani_language)** <br/> **Azərbaycanca** | **`az`** | **[Igbo](http://en.wikipedia.org/wiki/Igbo_language)** <br/> **Igbo** | **`ig`** | **[Scots Gaelic](http://en.wikipedia.org/wiki/Scots_Gaelic)** <br/> **Gàidhlig** | **`gd`** | +| **[Basque](http://en.wikipedia.org/wiki/Basque_language)** <br/> **Euskara** | **`eu`** | **[Indonesian](http://en.wikipedia.org/wiki/Indonesian_language)** <br/> **Bahasa Indonesia** | **`id`** | **[Serbian (Cyrillic)](http://en.wikipedia.org/wiki/Serbian_(Cyrillic))** <br/> **српски** | **`sr-Cyrl`** | +| **[Belarusian](http://en.wikipedia.org/wiki/Belarusian_language)** <br/> **беларуская** | **`be`** | **[Irish](http://en.wikipedia.org/wiki/Irish_language)** <br/> **Gaeilge** | **`ga`** | **[Serbian (Latin)](http://en.wikipedia.org/wiki/Serbian_(Latin))** <br/> **srpski** | **`sr-Latn`** | +| **[Bengali](http://en.wikipedia.org/wiki/Bengali_language)** <br/> **বাংলা** | **`bn`** | **[Italian](http://en.wikipedia.org/wiki/Italian_language)** <br/> **Italiano** | **`it`** | **[Sesotho](http://en.wikipedia.org/wiki/Sesotho_language)** <br/> **Sesotho** | **`st`** | +| **[Bosnian](http://en.wikipedia.org/wiki/Bosnian_language)** <br/> **Bosanski** | **`bs`** | **[Japanese](http://en.wikipedia.org/wiki/Japanese_language)** <br/> **日本語** | **`ja`** | **[Shona](http://en.wikipedia.org/wiki/Shona_language)** <br/> **chiShona** | **`sn`** | +| **[Bulgarian](http://en.wikipedia.org/wiki/Bulgarian_language)** <br/> **български** | **`bg`** | **[Javanese](http://en.wikipedia.org/wiki/Javanese_language)** <br/> **Basa Jawa** | **`jv`** | **[Sindhi](http://en.wikipedia.org/wiki/Sindhi_language)** <br/> **سنڌي** | **`sd`** | +| **[Cantonese](http://en.wikipedia.org/wiki/Cantonese_language)** <br/> **粵語** | **`yue`** | **[Kannada](http://en.wikipedia.org/wiki/Kannada_language)** <br/> **ಕನ್ನಡ** | **`kn`** | **[Sinhala](http://en.wikipedia.org/wiki/Sinhala_language)** <br/> **සිංහල** | **`si`** | +| **[Catalan](http://en.wikipedia.org/wiki/Catalan_language)** <br/> **Català** | **`ca`** | **[Kazakh](http://en.wikipedia.org/wiki/Kazakh_language)** <br/> **Қазақ тілі** | **`kk`** | **[Slovak](http://en.wikipedia.org/wiki/Slovak_language)** <br/> **Slovenčina** | **`sk`** | +| **[Cebuano](http://en.wikipedia.org/wiki/Cebuano_language)** <br/> **Cebuano** | **`ceb`** | **[Khmer](http://en.wikipedia.org/wiki/Khmer_language)** <br/> **ភាសាខ្មែរ** | **`km`** | **[Slovenian](http://en.wikipedia.org/wiki/Slovenian_language)** <br/> **Slovenščina** | **`sl`** | +| **[Chichewa](http://en.wikipedia.org/wiki/Chichewa_language)** <br/> **Nyanja** | **`ny`** | **[Klingon](http://en.wikipedia.org/wiki/Klingon_language)** <br/> **tlhIngan Hol** | **`tlh`** | **[Somali](http://en.wikipedia.org/wiki/Somali_language)** <br/> **Soomaali** | **`so`** | +| **[Chinese Simplified](http://en.wikipedia.org/wiki/Chinese_Simplified)** <br/> **简体中文** | **`zh-CN`** | **[Klingon (pIqaD)](http://en.wikipedia.org/wiki/Klingon_(pIqaD))** <br/> ** ** | **`tlh-Qaak`** | **[Spanish](http://en.wikipedia.org/wiki/Spanish_language)** <br/> **Español** | **`es`** | +| **[Chinese Traditional](http://en.wikipedia.org/wiki/Chinese_Traditional)** <br/> **正體中文** | **`zh-TW`** | **[Korean](http://en.wikipedia.org/wiki/Korean_language)** <br/> **한국어** | **`ko`** | **[Sundanese](http://en.wikipedia.org/wiki/Sundanese_language)** <br/> **Basa Sunda** | **`su`** | +| **[Corsican](http://en.wikipedia.org/wiki/Corsican_language)** <br/> **Corsu** | **`co`** | **[Kurdish](http://en.wikipedia.org/wiki/Kurdish_language)** <br/> **Kurdî** | **`ku`** | **[Swahili](http://en.wikipedia.org/wiki/Swahili_language)** <br/> **Kiswahili** | **`sw`** | +| **[Croatian](http://en.wikipedia.org/wiki/Croatian_language)** <br/> **Hrvatski** | **`hr`** | **[Kyrgyz](http://en.wikipedia.org/wiki/Kyrgyz_language)** <br/> **Кыргызча** | **`ky`** | **[Swedish](http://en.wikipedia.org/wiki/Swedish_language)** <br/> **Svenska** | **`sv`** | +| **[Czech](http://en.wikipedia.org/wiki/Czech_language)** <br/> **Čeština** | **`cs`** | **[Lao](http://en.wikipedia.org/wiki/Lao_language)** <br/> **ລາວ** | **`lo`** | **[Tahitian](http://en.wikipedia.org/wiki/Tahitian_language)** <br/> **Reo Tahiti** | **`ty`** | +| **[Danish](http://en.wikipedia.org/wiki/Danish_language)** <br/> **Dansk** | **`da`** | **[Latin](http://en.wikipedia.org/wiki/Latin_language)** <br/> **Latina** | **`la`** | **[Tajik](http://en.wikipedia.org/wiki/Tajik_language)** <br/> **Тоҷикӣ** | **`tg`** | +| **[Dutch](http://en.wikipedia.org/wiki/Dutch_language)** <br/> **Nederlands** | **`nl`** | **[Latvian](http://en.wikipedia.org/wiki/Latvian_language)** <br/> **Latviešu** | **`lv`** | **[Tamil](http://en.wikipedia.org/wiki/Tamil_language)** <br/> **தமிழ்** | **`ta`** | +| **[English](http://en.wikipedia.org/wiki/English_language)** <br/> **English** | **`en`** | **[Lithuanian](http://en.wikipedia.org/wiki/Lithuanian_language)** <br/> **Lietuvių** | **`lt`** | **[Tatar](http://en.wikipedia.org/wiki/Tatar_language)** <br/> **татарча** | **`tt`** | +| **[Esperanto](http://en.wikipedia.org/wiki/Esperanto_language)** <br/> **Esperanto** | **`eo`** | **[Luxembourgish](http://en.wikipedia.org/wiki/Luxembourgish_language)** <br/> **Lëtzebuergesch** | **`lb`** | **[Telugu](http://en.wikipedia.org/wiki/Telugu_language)** <br/> **తెలుగు** | **`te`** | +| **[Estonian](http://en.wikipedia.org/wiki/Estonian_language)** <br/> **Eesti** | **`et`** | **[Macedonian](http://en.wikipedia.org/wiki/Macedonian_language)** <br/> **Македонски** | **`mk`** | **[Thai](http://en.wikipedia.org/wiki/Thai_language)** <br/> **ไทย** | **`th`** | +| **[Fijian](http://en.wikipedia.org/wiki/Fijian_language)** <br/> **Vosa Vakaviti** | **`fj`** | **[Malagasy](http://en.wikipedia.org/wiki/Malagasy_language)** <br/> **Malagasy** | **`mg`** | **[Tongan](http://en.wikipedia.org/wiki/Tongan_language)** <br/> **Lea faka-Tonga** | **`to`** | +| **[Filipino](http://en.wikipedia.org/wiki/Filipino_language)** <br/> **Tagalog** | **`tl`** | **[Malay](http://en.wikipedia.org/wiki/Malay_language)** <br/> **Bahasa Melayu** | **`ms`** | **[Turkish](http://en.wikipedia.org/wiki/Turkish_language)** <br/> **Türkçe** | **`tr`** | +| **[Finnish](http://en.wikipedia.org/wiki/Finnish_language)** <br/> **Suomi** | **`fi`** | **[Malayalam](http://en.wikipedia.org/wiki/Malayalam_language)** <br/> **മലയാളം** | **`ml`** | **[Udmurt](http://en.wikipedia.org/wiki/Udmurt_language)** <br/> **удмурт** | **`udm`** | +| **[French](http://en.wikipedia.org/wiki/French_language)** <br/> **Français** | **`fr`** | **[Maltese](http://en.wikipedia.org/wiki/Maltese_language)** <br/> **Malti** | **`mt`** | **[Ukrainian](http://en.wikipedia.org/wiki/Ukrainian_language)** <br/> **Українська** | **`uk`** | +| **[Frisian](http://en.wikipedia.org/wiki/Frisian_language)** <br/> **Frysk** | **`fy`** | **[Maori](http://en.wikipedia.org/wiki/Maori_language)** <br/> **Māori** | **`mi`** | **[Urdu](http://en.wikipedia.org/wiki/Urdu_language)** <br/> **اُردُو** | **`ur`** | +| **[Galician](http://en.wikipedia.org/wiki/Galician_language)** <br/> **Galego** | **`gl`** | **[Marathi](http://en.wikipedia.org/wiki/Marathi_language)** <br/> **मराठी** | **`mr`** | **[Uzbek](http://en.wikipedia.org/wiki/Uzbek_language)** <br/> **Oʻzbek tili** | **`uz`** | +| **[Georgian](http://en.wikipedia.org/wiki/Georgian_language)** <br/> **ქართული** | **`ka`** | **[Mongolian](http://en.wikipedia.org/wiki/Mongolian_language)** <br/> **Монгол** | **`mn`** | **[Vietnamese](http://en.wikipedia.org/wiki/Vietnamese_language)** <br/> **Tiếng Việt** | **`vi`** | +| **[German](http://en.wikipedia.org/wiki/German_language)** <br/> **Deutsch** | **`de`** | **[Myanmar](http://en.wikipedia.org/wiki/Myanmar_language)** <br/> **မြန်မာစာ** | **`my`** | **[Welsh](http://en.wikipedia.org/wiki/Welsh_language)** <br/> **Cymraeg** | **`cy`** | +| **[Greek](http://en.wikipedia.org/wiki/Greek_language)** <br/> **Ελληνικά** | **`el`** | **[Nepali](http://en.wikipedia.org/wiki/Nepali_language)** <br/> **नेपाली** | **`ne`** | **[Xhosa](http://en.wikipedia.org/wiki/Xhosa_language)** <br/> **isiXhosa** | **`xh`** | +| **[Gujarati](http://en.wikipedia.org/wiki/Gujarati_language)** <br/> **ગુજરાતી** | **`gu`** | **[Norwegian](http://en.wikipedia.org/wiki/Norwegian_language)** <br/> **Norsk** | **`no`** | **[Yiddish](http://en.wikipedia.org/wiki/Yiddish_language)** <br/> **ייִדיש** | **`yi`** | +| **[Haitian Creole](http://en.wikipedia.org/wiki/Haitian_Creole)** <br/> **Kreyòl Ayisyen** | **`ht`** | **[Pashto](http://en.wikipedia.org/wiki/Pashto_language)** <br/> **پښتو** | **`ps`** | **[Yoruba](http://en.wikipedia.org/wiki/Yoruba_language)** <br/> **Yorùbá** | **`yo`** | +| **[Hausa](http://en.wikipedia.org/wiki/Hausa_language)** <br/> **Hausa** | **`ha`** | **[Persian](http://en.wikipedia.org/wiki/Persian_language)** <br/> **فارسی** | **`fa`** | **[Yucatec Maya](http://en.wikipedia.org/wiki/Yucatec_Maya)** <br/> **Màaya T'àan** | **`yua`** | +| **[Hawaiian](http://en.wikipedia.org/wiki/Hawaiian_language)** <br/> **ʻŌlelo Hawaiʻi** | **`haw`** | **[Polish](http://en.wikipedia.org/wiki/Polish_language)** <br/> **Polski** | **`pl`** | **[Zulu](http://en.wikipedia.org/wiki/Zulu_language)** <br/> **isiZulu** | **`zu`** | +| **[Hebrew](http://en.wikipedia.org/wiki/Hebrew_language)** <br/> **עִבְרִית** | **`he`** | **[Portuguese](http://en.wikipedia.org/wiki/Portuguese_language)** <br/> **Português** | **`pt`** | ## Wiki @@ -497,6 +501,7 @@ * **[REPL](https://github.com/soimort/translate-shell/wiki/REPL)** * **[Text Editor Integration](https://github.com/soimort/translate-shell/wiki/Text-Editor-Integration)** +* **[Narrator Selection](https://github.com/soimort/translate-shell/wiki/Narrator-Selection)** * **[Configuration](https://github.com/soimort/translate-shell/wiki/Configuration)** * **[Themes](https://github.com/soimort/translate-shell/wiki/Themes)** * **[AppleScript](https://github.com/soimort/translate-shell/wiki/AppleScript)** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/README.template.md new/translate-shell-0.9.6.3/README.template.md --- old/translate-shell-0.9.4/README.template.md 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/README.template.md 2017-05-01 14:18:51.000000000 +0200 @@ -69,7 +69,7 @@ ### Recommended Dependencies -These dependecies are optional, but strongly recommended for full functionality: +These dependencies are optional, but strongly recommended for full functionality: * **[curl](http://curl.haxx.se/)** with **OpenSSL** support * **[GNU FriBidi](http://fribidi.org/)**: _an implementation of the Unicode Bidirectional Algorithm (bidi)_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/build.awk new/translate-shell-0.9.6.3/build.awk --- old/translate-shell-0.9.4/build.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/build.awk 2017-05-01 14:18:51.000000000 +0200 @@ -145,7 +145,7 @@ match(line, /^[[:space:]]*@include[[:space:]]*"(.*)"$/, group) if (RSTART) { # @include if (ret) ret = ret RS - ret = ret readSqueezed(group[1] ".awk", squeezed) + ret = ret readSqueezed(group[1], squeezed) } else if (!squeezed || line = squeeze(line)) { # effective LOC if (ret) ret = ret RS ret = ret line diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Commons.awk new/translate-shell-0.9.6.3/include/Commons.awk --- old/translate-shell-0.9.4/include/Commons.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Commons.awk 2017-05-01 14:18:51.000000000 +0200 @@ -69,6 +69,23 @@ array[anything(array) ? length(array) : 0] = element } +# Comparator function used for controlling array scanning order. +# Like @ind_num_asc, but compare on index fields separated by SUBSEP. +function compareByIndexFields(i1, v1, i2, v2, + #### + t1, t2, tl, j) { + split(i1, t1, SUBSEP) + split(i2, t2, SUBSEP) + tl = length(t1) < length(t2) ? length(t1) : length(t2) + for (j = 1; j <= tl; j++) { + if (t1[j] < t2[j]) + return -1 + else if (t1[j] > t2[j]) + return 1 + } + return 0 +} + ## Strings: @@ -128,7 +145,7 @@ if (!separator) separator = " " if (!sortedIn) - sortedIn = "@ind_num_asc" + sortedIn = "compareByIndexFields" temp = NULLSTR j = 0 @@ -170,6 +187,10 @@ return "\v" # Vertical Tab case "u0026": return "&" # Unicode Character 'AMPERSAND' + case "u003c": + return "<" # Unicode Character 'LESS-THAN SIGN' + case "u003e": + return ">" # Unicode Character 'GREATER-THAN SIGN' default: return char } @@ -262,7 +283,7 @@ i, items, j, k, p, saveSortedIn, temp, v) { if (!level) level = 0 if (!sortedIn) - sortedIn = "@ind_num_asc" + sortedIn = "compareByIndexFields" if (isarray(value)) { saveSortedIn = PROCINFO["sorted_in"] @@ -397,7 +418,7 @@ if (!name) name = "_" if (!sortedIn) - sortedIn = "@ind_num_asc" + sortedIn = "compareByIndexFields" d(name " = " toString(value, inline, heredoc, valOnly, numSub, 0, sortedIn)) #if (isarray(value)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Help.awk new/translate-shell-0.9.6.3/include/Help.awk --- old/translate-shell-0.9.4/include/Help.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Help.awk 2017-05-01 14:18:51.000000000 +0200 @@ -105,6 +105,8 @@ ins(2, "Do not use any other theme than default.") RS \ ins(1, ansi("bold", "-no-ansi")) RS \ ins(2, "Do not use ANSI escape codes.") RS \ + ins(1, ansi("bold", "-no-autocorrect")) RS \ + ins(2, "Do not autocorrect. (if defaulted by the translation engine)") RS \ ins(1, ansi("bold", "-no-bidi")) RS \ ins(2, "Do not convert bidirectional texts.") RS \ RS "Audio options:" RS \ @@ -248,6 +250,9 @@ case "ta": case "te": case "yi": t1 = sprintf(" %-16s", t1) break + case "yue": + t1 = sprintf(" %-13s", t1) + break case "ja": case "ko": t1 = sprintf(" %-12s", t1) break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Languages.awk new/translate-shell-0.9.6.3/include/Languages.awk --- old/translate-shell-0.9.4/include/Languages.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Languages.awk 2017-05-01 14:18:51.000000000 +0200 @@ -1398,6 +1398,24 @@ Locale["zu"]["glotto"] = "zulu1248" Locale["zu"]["script"] = "Latn" + #* Cantonese + Locale["yue"]["support"] = "bing-only" + Locale["yue"]["name"] = "Cantonese" + Locale["yue"]["endonym"] = "粵語" + Locale["yue"]["family"] = "Sino-Tibetan" + Locale["yue"]["iso"] = "yue" + Locale["yue"]["glotto"] = "cant1236" + Locale["yue"]["script"] = "Hant" + + #* Fijian + Locale["fj"]["support"] = "bing-only" + Locale["fj"]["name"] = "Fijian" + Locale["fj"]["endonym"] = "Vosa Vakaviti" + Locale["fj"]["family"] = "Austronesian" + Locale["fj"]["iso"] = "fij" + Locale["fj"]["glotto"] = "fiji1243" + Locale["fj"]["script"] = "Latn" + #* Hmong Daw Locale["mww"]["support"] = "bing-only" Locale["mww"]["name"] = "Hmong Daw" @@ -1416,6 +1434,24 @@ Locale["otq"]["glotto"] = "quer1236" Locale["otq"]["script"] = "Latn" + #* Tahitian + Locale["ty"]["support"] = "bing-only" + Locale["ty"]["name"] = "Tahitian" + Locale["ty"]["endonym"] = "Reo Tahiti" + Locale["ty"]["family"] = "Austronesian" + Locale["ty"]["iso"] = "tah" + Locale["ty"]["glotto"] = "tahi1242" + Locale["ty"]["script"] = "Latn" + + #* Tongan + Locale["to"]["support"] = "bing-only" + Locale["to"]["name"] = "Tongan" + Locale["to"]["endonym"] = "Lea faka-Tonga" + Locale["to"]["family"] = "Austronesian" + Locale["to"]["iso"] = "ton" + Locale["to"]["glotto"] = "tong1325" + Locale["to"]["script"] = "Latn" + #* Yucatec Maya Locale["yua"]["support"] = "bing-only" Locale["yua"]["name"] = "Yucatec Maya" @@ -1513,20 +1549,6 @@ Locale["fo"]["glotto"] = "faro1244" Locale["fo"]["script"] = "Latn" - #? Fijian - Locale["fj"]["support"] = "unstable" - Locale["fj"]["name"] = "Fijian" - Locale["fj"]["endonym"] = "Vosa Vakaviti" - #Locale["fj"]["translations-of"] - #Locale["fj"]["definitions-of"] - #Locale["fj"]["synonyms"] - #Locale["fj"]["examples"] - #Locale["fj"]["see-also"] - Locale["fj"]["family"] = "Austronesian" - Locale["fj"]["iso"] = "fij" - Locale["fj"]["glotto"] = "fiji1243" - Locale["fj"]["script"] = "Latn" - #? Guarani Locale["gn"]["support"] = "unstable" Locale["gn"]["name"] = "Guarani" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Main.awk new/translate-shell-0.9.6.3/include/Main.awk --- old/translate-shell-0.9.4/include/Main.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Main.awk 2017-05-01 14:18:51.000000000 +0200 @@ -34,12 +34,13 @@ Option["width"] = ENVIRON["COLUMNS"] ? ENVIRON["COLUMNS"] - 2 : 0 Option["indent"] = 4 Option["no-ansi"] = 0 + Option["no-autocorrect"] = 0 Option["no-bidi"] = 0 Option["theme"] = "default" # Audio Option["play"] = 0 - Option["narrator"] = "default" + Option["narrator"] = "female" Option["player"] = ENVIRON["PLAYER"] # Terminal paging and browsing @@ -76,10 +77,13 @@ if (!fileExists(file)) { file = ENVIRON["HOME"] "/.translate-shell/init.trans" if (!fileExists(file)) { - file = ENVIRON["HOME"] "/.config/translate-shell/init.trans" + file = ENVIRON["XDG_CONFIG_HOME"] "/translate-shell/init.trans" if (!fileExists(file)) { - file = "/etc/translate-shell" - if (!fileExists(file)) return + file = ENVIRON["HOME"] "/.config/translate-shell/init.trans" + if (!fileExists(file)) { + file = "/etc/translate-shell" + if (!fileExists(file)) return + } } } } @@ -105,7 +109,7 @@ # Initialize screen width if not set if (!Option["width"] && detectProgram("tput", "-V")) { - "tput cols" | getline temp + "tput cols" SUPERR | getline temp Option["width"] = temp ? temp - 2 : 64 } @@ -396,6 +400,13 @@ continue } + # -no-autocorrect + match(ARGV[pos], /^--?no-auto(correct)?$/) + if (RSTART) { + Option["no-autocorrect"] = 1 + continue + } + # -no-bidi match(ARGV[pos], /^--?no-bidi/) if (RSTART) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Translate.awk new/translate-shell-0.9.6.3/include/Translate.awk --- old/translate-shell-0.9.4/include/Translate.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Translate.awk 2017-05-01 14:18:51.000000000 +0200 @@ -236,6 +236,11 @@ repl(line) else translate(line) + } else { + # Non-interactive brief mode: preserve line breaks + if (!Option["interactive"]) + if (!Option["verbose"]) + p(line) } } else e("[ERROR] File not found: " Option["input"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Translators/*.awk new/translate-shell-0.9.6.3/include/Translators/*.awk --- old/translate-shell-0.9.4/include/Translators/*.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Translators/*.awk 2017-05-01 14:18:51.000000000 +0200 @@ -1,4 +1,4 @@ -@include "include/Translators/GoogleTranslate" -@include "include/Translators/BingTranslator" -@include "include/Translators/YandexTranslate" -@include "include/Translators/Apertium" +@include "include/Translators/GoogleTranslate.awk" +@include "include/Translators/BingTranslator.awk" +@include "include/Translators/YandexTranslate.awk" +@include "include/Translators/Apertium.awk" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Translators/BingTranslator.awk new/translate-shell-0.9.6.3/include/Translators/BingTranslator.awk --- old/translate-shell-0.9.4/include/Translators/BingTranslator.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Translators/BingTranslator.awk 2017-05-01 14:18:51.000000000 +0200 @@ -34,15 +34,69 @@ Cookie = cookie } -# TTS -- FIXME! -function bingTTSUrl(text, tl, narrator) { - narrator = Option["narrator"] ~ /^[AFaf]/ ? "female" : "male" - # FIXME: - # 1. use digraphia code (en-US) as Alpha-2 code alone doen't work - # 2. how to pass cookies to an external player? - return HttpProtocol HttpHost "/translator/api/language/Speak?" \ +function bingTTSUrl(text, tl, + #### + country, gender, i, group, + header, content, isBody) { + gender = "female" + country = NULLSTR + split(Option["narrator"], group, ",") + for (i in group) { + if (group[i] ~ /^(f(emale)?|w(oman)?)$/) + gender = "female" + else if (group[i] ~ /^m(ale|an)?$/) + gender = "male" + else + country = group[i] + } + + # Automatic ISO country code + if (country) tl = tl "-" country + else if (tl == "ar") tl = tl "-EG" # FIXME: sometimes doesn't work. Why? + else if (tl == "da") tl = tl "-DK" + else if (tl == "de") tl = tl "-DE" + else if (tl == "en") tl = tl "-US" + else if (tl == "es") tl = tl "-ES" + else if (tl == "fi") tl = tl "-FI" + else if (tl == "fr") tl = tl "-FR" + else if (tl == "it") tl = tl "-IT" + else if (tl == "ja") tl = tl "-JP" + else if (tl == "ko") tl = tl "-KR" + else if (tl == "nl") tl = tl "-NL" + else if (tl == "nb") tl = tl "-NO" # Norwegian Bokmål + else if (tl == "pl") tl = tl "-PL" + else if (tl == "pt") tl = tl "-PT" + else if (tl == "ru") tl = tl "-RU" + else if (tl == "sv") tl = tl "-SE" + else if (tl == "yue") ; + else if (tl == "zh") tl = tl "-CN" + + header = "GET " "/translator/api/language/Speak?" \ "locale=" tl "&text=" preprocess(text) \ - "&gender=" narrator "&media=audio/mp3" + "&gender=" gender "&media=audio/mp3" " HTTP/1.1\n" \ + "Host: " HttpHost "\n" \ + "Connection: close\n" + if (Option["user-agent"]) + header = header "User-Agent: " Option["user-agent"] "\n" + if (Cookie) + header = header "Cookie: " Cookie "\n" # must! + + content = NULLSTR; isBody = 0 + print header |& HttpService + while ((HttpService |& getline) > 0) { + if (isBody) + content = content ? content "\n" $0 : $0 + else if (length($0) <= 1) + isBody = 1 + #l(sprintf("%4s bytes > %s", length($0), $0)) + } + close(HttpService) + + if (!TempFile) + TempFile = getOutput("mktemp") + printf("%s", content) > TempFile + close(TempFile) + return TempFile } function bingWebTranslateUrl(uri, sl, tl, hl) { @@ -55,8 +109,11 @@ #### content, contentLength, group, header, isBody, reqBody, url) { - reqBody = "[{" parameterize("text") ":" parameterize(text) "}]" - contentLength = dump(reqBody, group) + reqBody = "[{" parameterize("text") ":" parameterize(text, "\"") "}]" + if (DumpContentengths[reqBody]) + contentLength = DumpContentengths[reqBody] + else + contentLength = DumpContentengths[reqBody] = dump(reqBody, group) url = HttpPathPrefix "/translator/api/Translate/TranslateArray?" \ "from=" sl "&to=" tl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Translators/GoogleTranslate.awk new/translate-shell-0.9.6.3/include/Translators/GoogleTranslate.awk --- old/translate-shell-0.9.4/include/Translators/GoogleTranslate.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Translators/GoogleTranslate.awk 2017-05-01 14:18:51.000000000 +0200 @@ -31,6 +31,7 @@ ub = "[43,45,51,94,43,98,43,45,102]" vb = "[43,45,97,94,43,54]" + # FIXME: build a dump cache! dLen = dump(text, d) # convert to byte array a = tkk for (e = 1; e <= dLen; e++) @@ -52,11 +53,12 @@ HttpPort = 80 } -function googleRequestUrl(text, sl, tl, hl) { +function googleRequestUrl(text, sl, tl, hl, qc) { + qc = Option["no-autocorrect"] ? "qc" : "qca"; return HttpPathPrefix "/translate_a/single?client=gtx" \ "&ie=UTF-8&oe=UTF-8" \ - "&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&dt=at" \ - "&sl=" sl "&tl=" tl "&hl=" hl \ + "&dt=bd&dt=ex&dt=ld&dt=md&dt=rw&dt=rm&dt=ss&dt=t&dt=at" \ + "&dt=" qc "&sl=" sl "&tl=" tl "&hl=" hl \ "&q=" preprocess(text) } @@ -121,8 +123,10 @@ } saveSortedIn = PROCINFO["sorted_in"] - PROCINFO["sorted_in"] = "@ind_num_asc" + PROCINFO["sorted_in"] = "compareByIndexFields" for (i in ast) { + if (ast[i] == "null") continue + if (i ~ "^0" SUBSEP "0" SUBSEP "[[:digit:]]+" SUBSEP "0$") append(translations, postprocess(literal(ast[i]))) if (i ~ "^0" SUBSEP "0" SUBSEP "[[:digit:]]+" SUBSEP "1$") @@ -148,6 +152,15 @@ if (match(i, "^0" SUBSEP "5" SUBSEP "([[:digit:]]+)" SUBSEP "2" SUBSEP "([[:digit:]]+)" SUBSEP "0$", group)) altTranslations[group[1]][group[2]] = postprocess(literal(ast[i])) + # 7 - autocorrection + if (i ~ "^0" SUBSEP "7" SUBSEP "5$") { + if (ast[i] == "true") + w("Showing translation for: (use -no-auto to disable autocorrect)") + else + w("Did you mean: " \ + ansi("bold", unparameterize(ast["0" SUBSEP "7" SUBSEP "1"]))) + } + # 8 - identified source languages if (i ~ "^0" SUBSEP "8" SUBSEP "0" SUBSEP "[[:digit:]]+$" || i ~ "^0" SUBSEP "2$") @@ -357,7 +370,7 @@ example = oExamples[i] temp = prettify("original-dictionary-examples-example", ins(1, "- ")) - split(example, group, /(\u003cb\u003e|\u003c\/b\u003e)/) + split(example, group, /(<b>|<\/b>)/) if (isRTL(il)) # target language is R-to-L temp = temp show(group[1] group[2] group[3], il) else # target language is L-to-R diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Translators/YandexTranslate.awk new/translate-shell-0.9.6.3/include/Translators/YandexTranslate.awk --- old/translate-shell-0.9.4/include/Translators/YandexTranslate.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Translators/YandexTranslate.awk 2017-05-01 14:18:51.000000000 +0200 @@ -66,7 +66,23 @@ return assert(content, "[ERROR] Null response.") } -function yandexTTSUrl(text, tl) { +function yandexTTSUrl(text, tl, + #### + speaker, emotion, i, group) { + speaker = NULLSTR + emotion = NULLSTR + split(Option["narrator"], group, ",") + for (i in group) { + if (group[i] ~ /^(g(ood)?|n(eutral)?|e(vil)?)$/) + emotion = group[i] + else if (group[i] ~ /^(f(emale)?|w(oman)?)$/) + speaker = "alyss" + else if (group[i] ~ /^m(ale|an)?$/) + speaker = "zahar" + else + speaker = group[i] + } + switch (tl) { # List of available TTS language codes case "ar": tl = "ar_AE"; break case "cs": tl = "cs_CZ"; break @@ -89,6 +105,8 @@ } return HttpProtocol "tts.voicetech.yandex.net" "/tts?" \ "text=" preprocess(text) (tl ? "&lang=" tl : tl) \ + (speaker ? "&speaker=" speaker : speaker) \ + (emotion ? "&emotion=" emotion : emotion) \ "&format=mp3" "&quality=hi" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/include/Utils.awk new/translate-shell-0.9.6.3/include/Utils.awk --- old/translate-shell-0.9.4/include/Utils.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/include/Utils.awk 2017-05-01 14:18:51.000000000 +0200 @@ -20,9 +20,9 @@ # Fallback to Unix `rev` if not found. function initBiDi() { FriBidi = detectProgram("fribidi", "--version", 1) - BiDiNoPad = FriBidi ? "fribidi --nopad" : "rev" + BiDiNoPad = FriBidi ? "fribidi --nopad" : "rev" SUPERR BiDi = FriBidi ? "fribidi --width %s" : - "rev | sed \"s/'/\\\\\\'/\" | xargs printf '%%s '" + "rev" SUPERR "| sed \"s/'/\\\\\\'/\" | xargs printf '%%s '" } # Detect external readline wrapper (rlwrap). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/man/trans.1 new/translate-shell-0.9.6.3/man/trans.1 --- old/translate-shell-0.9.4/man/trans.1 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/man/trans.1 2017-05-01 14:18:51.000000000 +0200 @@ -1,6 +1,6 @@ -.\" Automatically generated by Pandoc 1.17.0.3 +.\" Automatically generated by Pandoc 2.0 .\" -.TH "TRANS" "1" "2016\-05\-18" "0.9.4" "" +.TH "TRANS" "1" "2017\-05\-01" "0.9.6.3" "" .hy .SH NAME .PP @@ -9,7 +9,7 @@ .SH SYNOPSIS .PP \f[B]trans\f[] [\f[I]OPTIONS\f[]] [\f[I]SOURCE\f[]]:[\f[I]TARGETS\f[]] -[\f[I]TEXT\f[]]... +[\f[I]TEXT\f[]]\&... .SH DESCRIPTION .PP This tool translates text into any language from the command\-line, @@ -56,7 +56,7 @@ .B \f[B]\-L\f[] \f[I]CODES\f[], \f[B]\-list\f[] \f[I]CODES\f[] Print details of languages and exit. When specifying two or more language codes, concatenate them by plus -sign "+". +sign \[lq]+\[rq]. .RS .RE .TP @@ -365,7 +365,7 @@ .B \f[B]\-t\f[] \f[I]CODES\f[], \f[B]\-tl\f[] \f[I]CODE\f[], \f[B]\-target\f[] \f[I]CODES\f[], \f[B]\-to\f[] \f[I]CODES\f[] Specify the target language(s) (the language(s) of translated text). When specifying two or more language codes, concatenate them by plus -sign "+". +sign \[lq]+\[rq]. .RS .PP This option is optional. @@ -383,13 +383,13 @@ .IP \[bu] 2 \f[I]SOURCE\-CODE\f[]:\f[I]TARGET\-CODE\f[] .IP \[bu] 2 -\f[I]SOURCE\-CODE\f[]:\f[I]TARGET\-CODE1\f[]+\f[I]TARGET\-CODE2\f[]+... +\f[I]SOURCE\-CODE\f[]:\f[I]TARGET\-CODE1\f[]+\f[I]TARGET\-CODE2\f[]+\&... .IP \[bu] 2 \f[I]SOURCE\-CODE\f[]=\f[I]TARGET\-CODE\f[] .IP \[bu] 2 -\f[I]SOURCE\-CODE\f[]=\f[I]TARGET\-CODE1\f[]+\f[I]TARGET\-CODE2\f[]+... +\f[I]SOURCE\-CODE\f[]=\f[I]TARGET\-CODE1\f[]+\f[I]TARGET\-CODE2\f[]+\&... .PP -Delimiter ":" and "=" can be used interchangeably. +Delimiter \[lq]:\[rq] and \[lq]=\[rq] can be used interchangeably. .PP Either \f[I]SOURCE\f[] or \f[I]TARGETS\f[] may be omitted, but the delimiter character must be kept. @@ -401,7 +401,7 @@ .RS .RE .TP -.B \f[B]\-\-\f[] +.B \f[B]\[en]\f[] End\-of\-options. .RS .PP @@ -474,7 +474,7 @@ .RS .RE .TP -.B \f[I]\&./.trans\f[] +.B \f[I]./.trans\f[] Initialization script. (current directory) .RS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/man/trans.1.md new/translate-shell-0.9.6.3/man/trans.1.md --- old/translate-shell-0.9.4/man/trans.1.md 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/man/trans.1.md 2017-05-01 14:18:51.000000000 +0200 @@ -1,6 +1,6 @@ -% TRANS(1) 0.9.4 +% TRANS(1) 0.9.6.3 % Mort Yao <soi@mort.ninja> -% 2016-05-18 +% 2017-05-01 # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/metainfo.awk new/translate-shell-0.9.6.3/metainfo.awk --- old/translate-shell-0.9.4/metainfo.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/metainfo.awk 2017-05-01 14:18:51.000000000 +0200 @@ -1,8 +1,8 @@ BEGIN { Name = "Translate Shell" Description = "Command-line translator using Google Translate, Bing Translator, Yandex.Translate, etc." - Version = "0.9.4" - ReleaseDate = "2016-05-18" + Version = "0.9.6.3" + ReleaseDate = "2017-05-01" Command = "trans" EntryPoint = "translate.awk" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/translate-shell-0.9.4/translate.awk new/translate-shell-0.9.6.3/translate.awk --- old/translate-shell-0.9.4/translate.awk 2016-05-18 05:26:56.000000000 +0200 +++ new/translate-shell-0.9.6.3/translate.awk 2017-05-01 14:18:51.000000000 +0200 @@ -1,20 +1,20 @@ #!/usr/bin/gawk -f -@include "metainfo" +@include "metainfo.awk" -@include "include/Commons" -@include "include/Utils" +@include "include/Commons.awk" +@include "include/Utils.awk" -@include "include/Languages" -@include "include/Help" -@include "include/Parser" -@include "include/Theme" +@include "include/Languages.awk" +@include "include/Help.awk" +@include "include/Parser.awk" +@include "include/Theme.awk" -@include "include/Translate" -@include "include/TranslatorInterface" +@include "include/Translate.awk" +@include "include/TranslatorInterface.awk" @include "include/Translators/*" -@include "include/Script" -@include "include/REPL" +@include "include/Script.awk" +@include "include/REPL.awk" -@include "include/Main" +@include "include/Main.awk"