Hello community,

here is the log from the commit of package translate-shell for openSUSE:Factory 
checked in at 2020-08-29 20:37:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/translate-shell (Old)
 and      /work/SRC/openSUSE:Factory/.translate-shell.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "translate-shell"

Sat Aug 29 20:37:28 2020 rev:15 rq:829823 version:0.9.6.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/translate-shell/translate-shell.changes  
2019-09-19 15:52:06.627277828 +0200
+++ 
/work/SRC/openSUSE:Factory/.translate-shell.new.3399/translate-shell.changes    
    2020-08-29 20:37:41.673347807 +0200
@@ -1,0 +2,8 @@
+Wed Aug 26 19:15:07 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 0.9.6.12
+  * Bing Microsoft Translator: fixed (#340)
+  * Added a Docker image (#336)
+  * Fixed other minor issues (#345, #339) 
+
+-------------------------------------------------------------------

Old:
----
  translate-shell-0.9.6.11.tar.gz

New:
----
  translate-shell-0.9.6.12.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ translate-shell.spec ++++++
--- /var/tmp/diff_new_pack.423Czs/_old  2020-08-29 20:37:44.421348966 +0200
+++ /var/tmp/diff_new_pack.423Czs/_new  2020-08-29 20:37:44.425348968 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package translate-shell
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # 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.6.11
+Version:        0.9.6.12
 Release:        0
 Summary:        Command line translator using various online services as 
backends
 License:        Unlicense

++++++ translate-shell-0.9.6.11.tar.gz -> translate-shell-0.9.6.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/.github/workflows/ci.yml 
new/translate-shell-0.9.6.12/.github/workflows/ci.yml
--- old/translate-shell-0.9.6.11/.github/workflows/ci.yml       1970-01-01 
01:00:00.000000000 +0100
+++ new/translate-shell-0.9.6.12/.github/workflows/ci.yml       2020-05-11 
17:02:40.000000000 +0200
@@ -0,0 +1,22 @@
+name: CI
+
+on:
+  push:
+    branches:
+    - develop
+    - stable
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Install dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get -y install gawk curl rlwrap emacs
+    - name: Sanity check
+      run: |
+        make test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/.gitmodules 
new/translate-shell-0.9.6.12/.gitmodules
--- old/translate-shell-0.9.6.11/.gitmodules    1970-01-01 01:00:00.000000000 
+0100
+++ new/translate-shell-0.9.6.12/.gitmodules    2020-05-11 17:02:40.000000000 
+0200
@@ -0,0 +1,3 @@
+[submodule "translate-shell.wiki"]
+       path = wiki
+       url = https://github.com/soimort/translate-shell.wiki.git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/Dockerfile 
new/translate-shell-0.9.6.12/Dockerfile
--- old/translate-shell-0.9.6.11/Dockerfile     1970-01-01 01:00:00.000000000 
+0100
+++ new/translate-shell-0.9.6.12/Dockerfile     2020-05-11 17:02:40.000000000 
+0200
@@ -0,0 +1,11 @@
+FROM alpine:latest
+MAINTAINER soimort
+
+RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing"; >> 
/etc/apk/repositories 
+
+RUN apk add bash gawk curl mplayer fribidi less hunspell wget \
+    && wget git.io/trans \
+    && chmod +x ./trans \ 
+    && mv ./trans /usr/local/bin/
+ENTRYPOINT ["trans"]
+CMD ["--help"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/README.md 
new/translate-shell-0.9.6.12/README.md
--- old/translate-shell-0.9.6.11/README.md      2019-07-25 16:20:17.000000000 
+0200
+++ new/translate-shell-0.9.6.12/README.md      2020-05-11 17:02:40.000000000 
+0200
@@ -2,6 +2,7 @@
 
 
[![Icon](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/icon.png)](https://www.soimort.org/translate-shell)
 
[![CircleCI](https://circleci.com/gh/soimort/translate-shell.svg?style=svg)](https://circleci.com/gh/soimort/translate-shell)
+[![Actions](https://github.com/soimort/translate-shell/workflows/CI/badge.svg)](https://github.com/soimort/translate-shell/actions)
 
[![Version](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-release.png)](https://github.com/soimort/translate-shell/releases)
 
[![Download](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-download.png)](https://www.soimort.org/translate-shell/trans)
 
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/soimort/translate-shell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -98,6 +99,16 @@
 
     $ gawk -f (curl -Ls git.io/translate | psub) -- -shell
 
+### Using Docker
+
+To try out via [Docker](https://www.docker.com/), run:
+
+    $ docker pull soimort/translate-shell
+
+Then you may start an interactive shell from the Docker image for translating:
+
+    $ docker run -it soimort/translate-shell -shell
+
 ## Installation
 
 ### Option #1. Direct Download
@@ -111,17 +122,17 @@
 
 ### Option #2. From A Package Manager
 
-#### Using [Antigen](https://github.com/zsh-users/antigen) (Recommended for 
Zsh users)
+#### Using your favorite package manager
 
-Add the following line to your `.zshrc`:
+See **[wiki: 
Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to 
install from a specific package manager on your distro.
 
-    antigen bundle soimort/translate-shell
+#### Using [Antigen](https://github.com/zsh-users/antigen) (for Zsh users)
 
-#### Using your favorite package manager
+Add the following line to your `.zshrc`:
 
-See **[wiki: 
Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to 
install from a specific package manager on your distro.
+    antigen bundle soimort/translate-shell
 
-### Option #3. From Git (Recommended for seasoned hackers)
+### Option #3. From Git
 
     $ git clone https://github.com/soimort/translate-shell
     $ cd translate-shell/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/README.template.md 
new/translate-shell-0.9.6.12/README.template.md
--- old/translate-shell-0.9.6.11/README.template.md     2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/README.template.md     2020-05-11 
17:02:40.000000000 +0200
@@ -2,6 +2,7 @@
 
 
[![Icon](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/icon.png)](https://www.soimort.org/translate-shell)
 
[![CircleCI](https://circleci.com/gh/soimort/translate-shell.svg?style=svg)](https://circleci.com/gh/soimort/translate-shell)
+[![Actions](https://github.com/soimort/translate-shell/workflows/CI/badge.svg)](https://github.com/soimort/translate-shell/actions)
 
[![Version](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-release.png)](https://github.com/soimort/translate-shell/releases)
 
[![Download](https://raw.githubusercontent.com/soimort/translate-shell/gh-pages/images/badge-download.png)](https://www.soimort.org/translate-shell/trans)
 
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/soimort/translate-shell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -98,6 +99,16 @@
 
     $ gawk -f (curl -Ls git.io/translate | psub) -- -shell
 
+### Using Docker
+
+To try out via [Docker](https://www.docker.com/), run:
+
+    $ docker pull soimort/translate-shell
+
+Then you may start an interactive shell from the Docker image for translating:
+
+    $ docker run -it soimort/translate-shell -shell
+
 ## Installation
 
 ### Option #1. Direct Download
@@ -111,17 +122,17 @@
 
 ### Option #2. From A Package Manager
 
-#### Using [Antigen](https://github.com/zsh-users/antigen) (Recommended for 
Zsh users)
+#### Using your favorite package manager
 
-Add the following line to your `.zshrc`:
+See **[wiki: 
Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to 
install from a specific package manager on your distro.
 
-    antigen bundle soimort/translate-shell
+#### Using [Antigen](https://github.com/zsh-users/antigen) (for Zsh users)
 
-#### Using your favorite package manager
+Add the following line to your `.zshrc`:
 
-See **[wiki: 
Distros](https://github.com/soimort/translate-shell/wiki/Distros)** on how to 
install from a specific package manager on your distro.
+    antigen bundle soimort/translate-shell
 
-### Option #3. From Git (Recommended for seasoned hackers)
+### Option #3. From Git
 
     $ git clone https://github.com/soimort/translate-shell
     $ cd translate-shell/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/include/Commons.awk 
new/translate-shell-0.9.6.12/include/Commons.awk
--- old/translate-shell-0.9.6.11/include/Commons.awk    2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/Commons.awk    2020-05-11 
17:02:40.000000000 +0200
@@ -190,6 +190,8 @@
         return "<" # Unicode Character 'LESS-THAN SIGN'
     case "u003e":
         return ">" # Unicode Character 'GREATER-THAN SIGN'
+    case "u200b":
+        return "" # Unicode Character 'ZERO WIDTH SPACE'
     default:
         return char
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/include/Languages.awk 
new/translate-shell-0.9.6.12/include/Languages.awk
--- old/translate-shell-0.9.6.11/include/Languages.awk  2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/Languages.awk  2020-05-11 
17:02:40.000000000 +0200
@@ -1840,7 +1840,7 @@
     LocaleAlias["ji"] = "yi" # withdrawn language code for Yiddish
     LocaleAlias["jw"] = "jv" # withdrawn language code for Javanese
     LocaleAlias["mo"] = "ro" # Moldavian or Moldovan considered a variant of 
the Romanian language
-    LocaleAlias["nb"] = "no" # Google Translate does not distinguish between 
Bokmål and Nynorsk
+    LocaleAlias["nb"] = "no" # Google Translate does not distinguish between 
Bokmål and Nynorsk (but Bing does!)
     LocaleAlias["nn"] = "no"
     LocaleAlias["sh"]      = "sr-Cyrl" # Serbo-Croatian: default to Serbian
     LocaleAlias["sr"]      = "sr-Cyrl" # Serbian: default to Serbian Cyrillic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/include/Main.awk 
new/translate-shell-0.9.6.12/include/Main.awk
--- old/translate-shell-0.9.6.11/include/Main.awk       2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/Main.awk       2020-05-11 
17:02:40.000000000 +0200
@@ -59,9 +59,10 @@
     # Networking
     Option["proxy"] = ENVIRON["HTTP_PROXY"] ? ENVIRON["HTTP_PROXY"] : 
ENVIRON["http_proxy"]
     Option["user-agent"] = ENVIRON["USER_AGENT"] ? ENVIRON["USER_AGENT"] :
-        "Mozilla/5.0 (X11; Linux x86_64) "                   \
-        "AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 " \
-        "Safari/602.1 Epiphany/3.18.2"
+        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) "   \
+        "AppleWebKit/537.36 (KHTML, like Gecko) "            \
+        "Chrome/81.0.4044.138 "                              \
+        "Safari/537.36"
     Option["ip-version"] = 0
 
     # Interactive shell
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/include/Translate.awk 
new/translate-shell-0.9.6.12/include/Translate.awk
--- old/translate-shell-0.9.6.11/include/Translate.awk  2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/Translate.awk  2020-05-11 
17:02:40.000000000 +0200
@@ -158,9 +158,10 @@
 function postResponse(text, sl, tl, hl, type,
                       ####
                       content, contentLength, contentType, group,
-                      header, isBody, reqBody, url, status, location) {
+                      header, isBody, reqBody, url, status, location, 
userAgent) {
     url = _PostRequestUrl(text, sl, tl, hl, type)
     contentType = _PostRequestContentType(text, sl, tl, hl, type)
+    userAgent = _PostRequestUserAgent(text, sl, tl, hl, type)
     reqBody = _PostRequestBody(text, sl, tl, hl, type)
     if (DumpContentengths[reqBody])
         contentLength = DumpContentengths[reqBody]
@@ -172,8 +173,10 @@
         "Connection: close\r\n"                           \
         "Content-Length: " contentLength "\r\n"           \
         "Content-Type: " contentType "\r\n"     # must!
-    if (Option["user-agent"])
+    if (Option["user-agent"] && !userAgent)
         header = header "User-Agent: " Option["user-agent"] "\r\n"
+    if (userAgent)
+        header = header "User-Agent: " userAgent "\r\n"
     if (Cookie)
         header = header "Cookie: " Cookie "\r\n"
     if (HttpAuthUser && HttpAuthPass)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/translate-shell-0.9.6.11/include/TranslatorInterface.awk 
new/translate-shell-0.9.6.12/include/TranslatorInterface.awk
--- old/translate-shell-0.9.6.11/include/TranslatorInterface.awk        
2019-07-25 16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/TranslatorInterface.awk        
2020-05-11 17:02:40.000000000 +0200
@@ -26,6 +26,12 @@
     return @vm(text, sl, tl, hl, type)
 }
 
+# Abstract method foobarPostRequestUserAgent(text, sl, tl, hl, type: string): 
string
+function _PostRequestUserAgent(text, sl, tl, hl, type,    vm) {
+    vm = engineMethod("PostRequestUserAgent")
+    return @vm(text, sl, tl, hl, type)
+}
+
 # Abstract method foobarPostRequestBody(text, sl, tl, hl, type: string): string
 function _PostRequestBody(text, sl, tl, hl, type,    vm) {
     vm = engineMethod("PostRequestBody")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/translate-shell-0.9.6.11/include/Translators/BingTranslator.awk 
new/translate-shell-0.9.6.12/include/Translators/BingTranslator.awk
--- old/translate-shell-0.9.6.11/include/Translators/BingTranslator.awk 
2019-07-25 16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/Translators/BingTranslator.awk 
2020-05-11 17:02:40.000000000 +0200
@@ -158,6 +158,10 @@
     return "application/x-www-form-urlencoded"
 }
 
+function bingPostRequestUserAgent(text, sl, tl, hl, type) {
+    return ""
+}
+
 function bingPostRequestBody(text, sl, tl, hl, type) {
     if (type == "lookup")
         return "&text=" quote(text) "&from=" sl "&to=" tl
@@ -200,10 +204,14 @@
     # Hot-patches for Bing's own translator language codes
     # See: <https://msdn.microsoft.com/en-us/library/hh456380.aspx>
     if (_sl == "auto")  _sl = "auto-detect"
-    if (_sl == "bs")    _sl = "bs-Latn" # 'bs' is not recognized as valid code
+    if (_sl == "bs")    _sl = "bs-Latn"  # 'bs' is not recognized as valid code
+    if (_sl == "no")    _sl = "nb"  # Bing uses Norwegian Bokmål
+    if (_sl == "pt")    _sl = "pt-pt"  # 'pt' and 'pt-PT' are not recognized 
(FIXME: support pt-br)
     if (_sl == "zh-CN") _sl = "zh-Hans"
     if (_sl == "zh-TW") _sl = "zh-Hant"
     if (_tl == "bs")    _tl = "bs-Latn"
+    if (_tl == "no")    _tl = "nb"
+    if (_tl == "pt")    _tl = "pt-pt"
     if (_tl == "zh-CN") _tl = "zh-Hans"
     if (_tl == "zh-TW") _tl = "zh-Hant"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/include/Utils.awk 
new/translate-shell-0.9.6.12/include/Utils.awk
--- old/translate-shell-0.9.6.11/include/Utils.awk      2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/include/Utils.awk      2020-05-11 
17:02:40.000000000 +0200
@@ -231,7 +231,10 @@
 
 # Base64 encode a string.
 function base64(text,    command, temp) {
-    command = "echo -n " parameterize(text) PIPE "base64"
+    if (detectProgram("uname", "-s", 1) == "Linux") # GNU base64 wraps lines 
by default
+        command = "echo -n " parameterize(text) PIPE "base64 -w0"
+    else
+        command = "echo -n " parameterize(text) PIPE "base64"
     command = "bash -c " parameterize(command, "\"")
     command | getline temp
     close(command)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/man/trans.1 
new/translate-shell-0.9.6.12/man/trans.1
--- old/translate-shell-0.9.6.11/man/trans.1    2019-07-25 16:20:17.000000000 
+0200
+++ new/translate-shell-0.9.6.12/man/trans.1    2020-05-11 17:02:40.000000000 
+0200
@@ -1,6 +1,6 @@
 .\" Automatically generated by Pandoc 2.5
 .\"
-.TH "TRANS" "1" "2019\-07\-25" "0.9.6.11" ""
+.TH "TRANS" "1" "2020\-05\-11" "0.9.6.12" ""
 .hy
 .SH NAME
 .PP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/man/trans.1.md 
new/translate-shell-0.9.6.12/man/trans.1.md
--- old/translate-shell-0.9.6.11/man/trans.1.md 2019-07-25 16:20:17.000000000 
+0200
+++ new/translate-shell-0.9.6.12/man/trans.1.md 2020-05-11 17:02:40.000000000 
+0200
@@ -1,6 +1,6 @@
-% TRANS(1) 0.9.6.11
+% TRANS(1) 0.9.6.12
 % Mort Yao <[email protected]>
-% 2019-07-25
+% 2020-05-11
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/metainfo.awk 
new/translate-shell-0.9.6.12/metainfo.awk
--- old/translate-shell-0.9.6.11/metainfo.awk   2019-07-25 16:20:17.000000000 
+0200
+++ new/translate-shell-0.9.6.12/metainfo.awk   2020-05-11 17:02:40.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.6.11"
-    ReleaseDate = "2019-07-25"
+    Version     = "0.9.6.12"
+    ReleaseDate = "2020-05-11"
     Command     = "trans"
     EntryPoint  = "translate.awk"
     EntryScript = "translate"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/translate-shell-0.9.6.11/test/TestUtils.awk 
new/translate-shell-0.9.6.12/test/TestUtils.awk
--- old/translate-shell-0.9.6.11/test/TestUtils.awk     2019-07-25 
16:20:17.000000000 +0200
+++ new/translate-shell-0.9.6.12/test/TestUtils.awk     2020-05-11 
17:02:40.000000000 +0200
@@ -74,6 +74,7 @@
     T("base64()", 1)
     {
         assertEqual(base64("ninja"), "bmluamE=")
+        
assertEqual(base64("ninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninjaninja"),
 
"bmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmphbmluamFuaW5qYW5pbmph")
     }
 
     T("uprintf", 1)


Reply via email to