expect-digital / translate

Translation for distributed systems
0 stars 0 forks source link

Add Angular JSON conversation to `pkg/convert/json_ng.go` #13

Closed janishorsts closed 1 year ago

janishorsts commented 1 year ago

pkg/convert contains all conversations between different translation files and a translate data model.

Convert to and from Angular JSON.

Example of Angular JSON.

func FromNgJson(b []byte) (model.Messages, error)

func ToNgJson(model.Messages) ([]byte, error)
{
  "locale": "en-GB",
  "translations": {
    "4606963464835766483": "Welcome!"
  }
}

The target is serialized []byte.