json Openl10n API

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json Openl10n API相关的知识,希望对你有一定的参考价值。

{
  "source": {
    "locale": "en",
    "name": "English",
  },
  "target": {
    "name": "French (France)",
    "locale": "fr_FR",
  },
  "translations": {
    "id": "110e8400-e29b-11d4-a716-446655440000",
    "resource": {
      "id": "110e8400-e29b-11d4-a716-446655440000",
      "uri": "path/to/messages.en.yml",
      "category": "messages"
    },
    "createdAt": "2015-01-01T13:37:00",
    "createdBy": {
      "id": "110e8400-e29b-11d4-a716-446655440000",
      "username": "MattKetmo",
      "name": "Matthieu Moquet"
    },
    "key": {
      "name": "foo.bar",
      "context": null
    },
    "description": "This is a foobar key",
    "minLength": null,
    "maxLength": 42,
    "tags": [
      "foo",
      "bar",
      "foo baz"
    ],
    "source": {
      "translation": "This is the text of the translation",
      "translatedAt": "2015-01-01T13:37:00",
      "translatedBy": {
        "id": "110e8400-e29b-11d4-a716-446655440000",
        "username": "MattKetmo",
        "name": "Matthieu Moquet"
      },
      "flag": null,
      "approved": true,
      "state": "approved"
    },
    "target": {
      "translation": "Ceci est le texte de la traduction",
      "translatedAt": "2015-01-01T13:37:00",
      "translatedBy": {
        "id": "110e8400-e29b-11d4-a716-446655440000",
        "username": "MattKetmo",
        "name": "Matthieu Moquet"
      },
      "flag": "fuzzy",
      "approved": false,
      "state": "flagged"
    }
  }
}
{
  "id": "110e8400-e29b-11d4-a716-446655440000",
  "resource": {
    "id": "110e8400-e29b-11d4-a716-446655440000"
  },
  "createdAt": "2015-01-01T13:37:00",
  "createdBy": {
    "id": "110e8400-e29b-11d4-a716-446655440000",
    "username": "MattKetmo",
    "name": "Matthieu Moquet"
  },
  "key": {
    "name": "foo.bar",
    "context": null
  },
  "description": "This is a foobar key",
  "minLength": null,
  "maxLength": 42,
  "tags": [
    "foo",
    "bar",
    "foo baz"
  ],
  "translations": {
    "en": {
      "name": "English",
      "translation": "This is the text of the translation",
      "translatedAt": "2015-01-01T13:37:00",
      "translatedBy": {
        "id": "110e8400-e29b-11d4-a716-446655440000",
        "username": "MattKetmo",
        "name": "Matthieu Moquet"
      },
      "flag": null,
      "approved": true,
      "state": "approved"
    },
    "fr_FR": {
      "name": "French (France)",
      "translation": "Ceci est le texte de la traduction",
      "flag": "fuzzy",
      "approved": false,
      "state": "flagged"
    },
    "es": {
      "name": "Spanish",
      "translation": "Esto es un translacion",
      "flag": null,
      "approved": false,
      "state": "translated"
    },
    "...": {}
  }
}
{
  "id": "110e8400-e29b-11d4-a716-446655440000",
  "project": {
    "id": "110e8400-e29b-11d4-a716-446655440000"
  },
  "uri": "path/to/messages.en.yml",
  "category": "messages",
  "createdAt": "2015-01-01T13:37:00",
  "createdBy": {
    "id": "110e8400-e29b-11d4-a716-446655440000",
    "username": "MattKetmo",
    "name": "Matthieu Moquet"
  },
  "updatedAt": "2015-02-02T12:34:00",
  "stats": {
    "_all": {
      "translated": 1234,
      "flagged": 112,
      "approved": 876,
      "ignored": 13
    },
    "en": {
      "name": "English",
      "translated": 1234,
      "flagged": 112,
      "approved": 876,
      "ignored": 13
    },
    "fr_FR": {
      "name": "French (France)",
      "translated": 1234,
      "flagged": 112,
      "approved": 876,
      "ignored": 13
    },
    "...": {}
}
{
  "id": "110e8400-e29b-11d4-a716-446655440000",
  "slug": "foobar",
  "name": "Foobar",
  "description": "Some foobar project description",
  "source": {
    "locale": "en",
    "name": "English"
  },
  "createdBy": {
    "id": "110e8400-e29b-11d4-a716-446655440000",
    "username": "MattKetmo",
    "name": "Matthieu Moquet"
  },
  "createdAt": "2015-01-01T13:37:00",
  "updatedAt": "2015-02-02T12:34:00",
  "resources": 42,
  "segments": 1337,
  "languages": 8,
  "stats": {
    "_all": {
      "translated": 1234,
      "flagged": 112,
      "approved": 876,
      "ignored": 13
    },
    "en": {
      "name": "English",
      "translated": 1234,
      "flagged": 112,
      "approved": 876,
      "ignored": 13
    },
    "fr_FR": {
      "name": "French (France)",
      "translated": 1234,
      "flagged": 112,
      "approved": 876,
      "ignored": 13
    },
    "...": {}
  }
}

以上是关于json Openl10n API的主要内容,如果未能解决你的问题,请参考以下文章

Golang国际化(i18n)和本地化(l10n)指南

ABC222 G - 222(数论,欧拉定理)

几款不错的java规则引擎

yii框架如何访问api

l1n在initState之前调用

Preface Numbering罗马数字