Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-populated translation requests have incorrect/missing data #23

Open
achimr opened this issue Oct 14, 2014 · 4 comments
Open

Pre-populated translation requests have incorrect/missing data #23

achimr opened this issue Oct 14, 2014 · 4 comments

Comments

@achimr
Copy link
Contributor

achimr commented Oct 14, 2014

Steps to reproduce:

  1. Launch server with "node taustranslationserver.js"
  2. Add at least one new transationrequest to pre-populated requests by POSTing a translate request
  3. Get all translations with by GETing http://localhost:3412/v2.0/translation/

Result:
[
{
"translationRequest": {
"id": "fb25dc8c-fa61-456c-ba0b-14675e049aae",
"sourceLanguage": "DE-DE",
"targetLanguage": "EN-US",
"source": "Das ist ein Test.",
"target": null,
"mt": false,
"crowd": false,
"professional": false,
"postedit": false,
"comment": "We need a fast translation",
"translator": "",
"owner": "TAUS",
"creationDatetime": "2014-05-20T19:20+01:00",
"status": "initial"
}
},
{
"translationRequest": {
"id": "1589d67b-f61d-41d9-df21-022e769acaa5",
"sourceLanguage": "FR-FR",
"source": "Das ist ein Test nach Französisch.",
"target": "",
"mt": false,
"crowd": false,
"professional": false,
"postedit": false,
"comment": "We need a fast translation",
"translator": "",
"owner": "Heartsome",
"creationDatetime": "2014-05-20T19:20+01:00",
"status": "initial"
}
},
{
"translationRequest": {
"id": "d379f492-9b9f-4061-d60a-1462dc1b09be",
"sourceLanguage": "DE-DE",
"targetLanguage": "EN-GB",
"source": "Hallo Welt",
"professional": true,
"mt": false,
"creationDatetime": "2014-05-20T19:20+01:00",
"updateCounter": 0,
"status": "initial"
}
},
{
"translationRequest": {
"id": "2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"sourceLanguage": "de-DE",
"targetLanguage": "en-US",
"source": "Hallo Welt",
"mt": false,
"professional": true,
"status": "initial",
"creationDatetime": "2014-10-14T14:51:06.670Z",
"updateCounter": 0,
"links": [
{
"rel": "translation",
"href": "http://localhost:3412/v2.0/translation/2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"type": "application/json",
"title": "Newly created translation request 2b575fdc-f6af-4b9e-850d-9dc0884c6595 + created on Tue Oct 14 2014 10:51:06 GMT-0400 (Eastern Daylight Time)",
"verb": "GET"
},
{
"rel": "translation.cancel",
"href": "http://localhost:3412/v2.0/translation/cancel/2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"title": "Cancel translation request 2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"type": "application/json",
"verb": "PATCH"
},
{
"rel": "translation.reject",
"href": "http://localhost:3412/v2.0/translation/reject/2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"title": "Reject translation request 2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"type": "application/json",
"verb": "PATCH"
},
{
"rel": "translation.confirm",
"href": "http://localhost:3412/v2.0/translation/confirm/2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"title": "Confirm translation request 2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"type": "application/json",
"verb": "PATCH"
},
{
"rel": "translation.accept",
"href": "http://localhost:3412/v2.0/translation/accept/2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"title": "Accept translation request 2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"type": "application/json",
"verb": "PATCH"
},
{
"rel": "translation.patch",
"href": "http://localhost:3412/v2.0/translation/2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"title": "Patch translation request 2b575fdc-f6af-4b9e-850d-9dc0884c6595",
"type": "application/json",
"verb": "PATCH"
}
]
}
}
]
Issues for first three pre-populated translation requests:

  • Time zone is not marked UTC (tailing "Z")
  • Language identifiers should be lower case, i.e. "de-DE" and "en-US"
  • No links listing is given
@achimr
Copy link
Contributor Author

achimr commented Oct 14, 2014

  • Third pre-populated translate request is missing required targetLanguage attribute

@heartsomeXPhantom
Copy link
Collaborator

a) entries changed
b) languge identifiers are not checked, taken as they come in; the "wrong" identifiers come from the predefined requests; update to correct langues
c) No links only for predefined requests; GUID is generated automatically so links cannot be created correctly for test entries.
d) This are test entries, so not all attributes are set. targetLanguage added

BTW: The requests are stored in requests.txt. Thus it is necessary to delete this file to get the changed entries.

A general comment: those entriesd where intedned to serve as tests fpr various tests, so som,e errors where intended. I have changed to a correct version.

@achimr
Copy link
Contributor Author

achimr commented Oct 15, 2014

  • the times not read for example "2014-05-20T19:20+01:00Z". A ISO-8601 time can not at the same time have a time zone offset and be UTC. Please remove the timezone offset "+01:00"
  • Why can't GUIDs be added to the links if they are available to populate the id attribute?

I understand that erroneous data entries can be useful for internal tests, but why would they be returned by the test implementation?

@heartsomeXPhantom
Copy link
Collaborator

Why can't GUIDs be added to the links if they are available to populate the id attribute?

  • I will remove the populated stuff one we are finished with testing. I cannot populate them correctly as those entries are global vars; no chance to change them depending on the server url.

Time zone changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants