From b51d5f9ef011edc573fbac345f54c252725eb763 Mon Sep 17 00:00:00 2001 From: Ingo Oeser Date: Thu, 9 Nov 2017 18:02:20 +0100 Subject: [PATCH] update phrasapp-go lib --- Godeps/Godeps.json | 2 +- .../phrase/phraseapp-go/phraseapp/lib.go | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 85fc004..56d3293 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -56,7 +56,7 @@ }, { "ImportPath": "github.com/phrase/phraseapp-go/phraseapp", - "Rev": "df3251df611770a34e612f89c2e69b88342cce98" + "Rev": "92f39643e2ed06e74b507f48b5c08ea699085d4c" }, { "ImportPath": "gopkg.in/yaml.v2", diff --git a/vendor/github.com/phrase/phraseapp-go/phraseapp/lib.go b/vendor/github.com/phrase/phraseapp-go/phraseapp/lib.go index cc39873..ff51a3b 100644 --- a/vendor/github.com/phrase/phraseapp-go/phraseapp/lib.go +++ b/vendor/github.com/phrase/phraseapp-go/phraseapp/lib.go @@ -1253,6 +1253,7 @@ type UploadParams struct { FileFormat *string `json:"file_format,omitempty" cli:"opt --file-format"` FormatOptions map[string]string `json:"format_options,omitempty" cli:"opt --format-options"` LocaleID *string `json:"locale_id,omitempty" cli:"opt --locale-id"` + LocaleMapping map[string]string `json:"locale_mapping,omitempty" cli:"opt --locale-mapping"` SkipUnverification *bool `json:"skip_unverification,omitempty" cli:"opt --skip-unverification"` SkipUploadTags *bool `json:"skip_upload_tags,omitempty" cli:"opt --skip-upload-tags"` Tags *string `json:"tags,omitempty" cli:"opt --tags"` @@ -1309,6 +1310,17 @@ func (params *UploadParams) ApplyValuesFromMap(defaults map[string]interface{}) } params.LocaleID = &val + case "locale_mapping": + rval, err := ValidateIsRawMap(k, v) + if err != nil { + return err + } + val, err := ConvertToStringMap(rval) + if err != nil { + return err + } + params.LocaleMapping = val + case "skip_unverification": val, ok := v.(bool) if !ok { @@ -5312,6 +5324,15 @@ func (client *Client) UploadCreate(project_id string, params *UploadParams) (*Up } } + if params.LocaleMapping != nil { + for key, val := range params.LocaleMapping { + err := writer.WriteField("locale_mapping["+key+"]", val) + if err != nil { + return err + } + } + } + if params.SkipUnverification != nil { err := writer.WriteField("skip_unverification", strconv.FormatBool(*params.SkipUnverification)) if err != nil {