-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #818 from kaleido-io/multi-language
Add language tag to FFM, FFE, FFC, etc
- Loading branch information
Showing
10 changed files
with
146 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,87 @@ | ||
module github.com/hyperledger/firefly | ||
|
||
go 1.16 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/DATA-DOG/go-sqlmock v1.5.0 | ||
github.com/Masterminds/squirrel v1.5.2 | ||
github.com/aidarkhanov/nanoid v1.0.8 | ||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect | ||
github.com/containerd/containerd v1.5.10 // indirect | ||
github.com/docker/go-units v0.4.0 | ||
github.com/getkin/kin-openapi v0.94.1-0.20220401165309-136a868a30c2 | ||
github.com/ghodss/yaml v1.0.0 | ||
github.com/go-openapi/swag v0.19.15 // indirect | ||
github.com/go-resty/resty/v2 v2.7.0 | ||
github.com/golang-migrate/migrate/v4 v4.15.1 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/gorilla/websocket v1.5.0 | ||
github.com/hashicorp/errwrap v1.1.0 // indirect | ||
github.com/hashicorp/go-multierror v1.1.1 // indirect | ||
github.com/hyperledger/firefly-common v0.1.4 | ||
github.com/hyperledger/firefly-common v0.1.5 | ||
github.com/jarcoal/httpmock v1.1.0 | ||
github.com/karlseguin/ccache v2.0.3+incompatible | ||
github.com/karlseguin/expect v1.0.8 // indirect | ||
github.com/lib/pq v1.10.4 | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-sqlite3 v1.14.10 | ||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect | ||
github.com/prometheus/client_golang v1.11.0 | ||
github.com/prometheus/common v0.32.1 // indirect | ||
github.com/prometheus/procfs v0.7.3 // indirect | ||
github.com/qeesung/image2ascii v1.0.1 | ||
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 | ||
github.com/sirupsen/logrus v1.8.1 | ||
github.com/spf13/cobra v1.3.0 | ||
github.com/spf13/viper v1.11.0 | ||
github.com/stretchr/testify v1.7.1 | ||
github.com/wayneashleyberry/terminal-dimensions v1.0.0 // indirect | ||
gitlab.com/hfuss/mux-prometheus v0.0.4 | ||
go.uber.org/atomic v1.9.0 // indirect | ||
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 | ||
golang.org/x/text v0.3.7 | ||
) | ||
|
||
require ( | ||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||
github.com/containerd/containerd v1.5.10 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fsnotify/fsnotify v1.5.1 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.5 // indirect | ||
github.com/go-openapi/swag v0.19.15 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/hashicorp/errwrap v1.1.0 // indirect | ||
github.com/hashicorp/go-multierror v1.1.1 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/karlseguin/expect v1.0.8 // indirect | ||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect | ||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect | ||
github.com/magiconair/properties v1.8.6 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-colorable v0.1.12 // indirect | ||
github.com/mattn/go-isatty v0.0.14 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect | ||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect | ||
github.com/mitchellh/mapstructure v1.4.3 // indirect | ||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect | ||
github.com/nxadm/tail v1.4.8 // indirect | ||
github.com/opencontainers/image-spec v1.0.2 // indirect | ||
github.com/pelletier/go-toml v1.9.4 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/prometheus/client_model v0.2.0 // indirect | ||
github.com/prometheus/common v0.32.1 // indirect | ||
github.com/prometheus/procfs v0.7.3 // indirect | ||
github.com/rs/cors v1.8.2 // indirect | ||
github.com/spf13/afero v1.8.2 // indirect | ||
github.com/spf13/cast v1.4.1 // indirect | ||
github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/stretchr/objx v0.2.0 // indirect | ||
github.com/subosito/gotenv v1.2.0 // indirect | ||
github.com/wayneashleyberry/terminal-dimensions v1.0.0 // indirect | ||
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect | ||
go.uber.org/atomic v1.9.0 // indirect | ||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect | ||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect | ||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect | ||
google.golang.org/protobuf v1.28.0 // indirect | ||
gopkg.in/ini.v1 v1.66.4 // indirect | ||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright © 2022 Kaleido, Inc. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package es | ||
|
||
import ( | ||
"github.com/hyperledger/firefly-common/pkg/i18n" | ||
"golang.org/x/text/language" | ||
) | ||
|
||
//revive:disable | ||
|
||
/* | ||
This file contains the field level descriptions that are used in | ||
OpenAPI Spec generation. Each struct field that wants to use one of these | ||
needs to have an ffstruct tag on it, indicating the name of the struct. | ||
That will be combined with the JSON field name (note, it is not the GO | ||
field name, but the JSON serialized name), separated by a "." This is the | ||
key used to lookup the translation below. If it is not found, the description | ||
is left blank in the OpenAPI spec | ||
Example: | ||
// message.go | ||
type Message struct { | ||
Header MessageHeader `ffstruct:"Message" json:"header"` | ||
// en_translations_descriptions.go | ||
MessageHeader = ffm("Message.header", "The message header") | ||
*/ | ||
|
||
var ffm = func(key, translation string) i18n.MessageKey { | ||
return i18n.FFM(language.Spanish, key, translation) | ||
} | ||
|
||
var ( | ||
// MessageHeader field descriptions | ||
MessageHeaderID = ffm("MessageHeader.id", "El UUID del mensaje. Único para cada mensaje") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters