Changeset 6 in code


Ignore:
Timestamp:
Dec 14, 2022, 1:13:52 AM (2 years ago)
Author:
koizumi.aoi
Message:

Bugfix release: encode spaced words

Signed-off-by: Aoi K <koizumi.aoi@…>

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/go.mod

    r3 r6  
    22
    33go 1.18
    4 
    5 require github.com/astaxie/bat v0.0.2
  • trunk/go.sum

    r3 r6  
    1 github.com/astaxie/bat v0.0.2 h1:EOl52CfuFEnFqu9/mzex93mh7JWdtEGbGQlpih00GWQ=
    2 github.com/astaxie/bat v0.0.2/go.mod h1:poAI7wDJd5LpfwfBXsGWYIqmVO66dhBx31zhn0ZXdMI=
  • trunk/main.go

    r5 r6  
    1 // $KyokoNet: stcli-go,v 1.1 2022/12/13 10:07:00 akoizumi Exp
     1// $KyokoNet: stcli-go,v 1.2 2022/12/13 22:13:00 akoizumi Exp
    22// Command line client for SimplyTranslate, a privacy friendly frontend to Google Translate
    33package main
     
    1010        "log"
    1111        "net/http"
     12        "net/url"
    1213        "os"
    1314)
     
    4142        var translate Translate
    4243        // Build the full URL to query
    43         var queryURL = instance + "?engine=" + engine + "&from=" + from + "&to=" + to + "&text=" + input
     44        var encinput = url.PathEscape(input)
     45        var queryURL = instance + "?engine=" + engine + "&from=" + from + "&to=" + to + "&text=" + encinput
    4446        // Begin the request and process the response
    4547        req, err := http.Get(queryURL)
  • trunk/stcli-go.1

    r5 r6  
    1 .Dd Aftermath 56, 3188
     1.Dd Aftermath 57, 3188
    22.Dt STCLI-GO 1
    33.Os
     
    3939.An Baobab Aq Mt baobab@honeypot.im
    4040.Sh BUGS
    41 This utility cannot translate strings
    42 separated by spaces.
     41None so far
Note: See TracChangeset for help on using the changeset viewer.