Skip to content

Translation data design #1

@janishorsts

Description

@janishorsts

Prepare initial data design based on the libraries used by our clients (mainly golang, angular and flutter):

Draft

type Message struct {
  ID        string
  Message   string
  Fuzzy     bool
}

type Messages struct {
  Language string
  Messages []Message
}

Language file definitions

go

text/message

Messages type definition

{
  "language": "en-GB",
  "messages": [
    {
      "id": "Welcome!",
      "message": "Welcome!",
      "translation": "Welcome!",
      "translatorComment": "Copied from source.",
      "fuzzy": true
    }
  ]
}

nicksnyder/go-i18n

nicksnyder/go-i18n

angular

@angular/localize

Extracted values to JSON are very primitive - only key/value. No contextual information (description etc) on the translatable text is available. Do we really want to support it?

{
  "locale": "en-GB",
  "translations": {
    "4606963464835766483": "Welcome!"
  }
}

translation files

ngx-translate

overview

flutter

internationalization

internationalization

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions