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

Create project in api missing source language #3416

Closed
ilkarataev opened this issue Jan 23, 2020 · 4 comments · Fixed by #3682
Closed

Create project in api missing source language #3416

ilkarataev opened this issue Jan 23, 2020 · 4 comments · Fixed by #3682
Assignees
Labels
enhancement
Milestone

Comments

@ilkarataev
Copy link

@ilkarataev ilkarataev commented Jan 23, 2020

Hi i want to create project from component and i need to set up source_language.
I read the document and saw that i need only free field name,slug and web.
When i created project is saw weblate response for me that source_language en and checked it on the web interface.
I tryied to send "source_language" in the reqest i created project but had the same result.

curl -H 'Content-Type: application/json' -H "Authorization: Token ${api_token}" --data-binary "{\"name\":\"${job_name}\", \"slug\":\"${job_name}\",\"web\":\"https://exaple.com\","source_language\":{\"code\":\"ru\",\"name\":\"Russian\",\"direction\":\"ltr\",\"web_url\":\"http://weblate.exaple.com/languages/ru/\",\"url\":\"http://weblate.exaple.com/api/languages/ru/\"}}" https://weblate.exaple.com/api/projects/`
{
  "name": "master_locales",
  "slug": "master_locales",
  "web": "https://example.site",
  "source_language": {
    "code": "en",
    "name": "English",
    "direction": "ltr",
    "web_url": "http:/example.site/languages/en/",
    "url": "http://example.site/api/languages/en/"
  },
  "web_url": "http://example.site/projects/master_locales/",
  "url": "http://example.site/api/projects/master_locales/",
  "components_list_url": "http://example.site/api/projects/master_locales/components/",
  "repository_url": "http://example.site/api/projects/master_locales/repository/",
  "statistics_url": "http://example.site/api/projects/master_locales/statistics/",
  "changes_list_url": "http://example.site/api/projects/master_locales/changes/",
  "languages_url": "http://example.site/api/projects/master_locales/languages/"
}

One more problem when i creater component, the File_format: JSON nested structure file didn't install in the property.
In our workflow we need to use all api featuries.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nijel nijel added the enhancement label Jan 28, 2020
@nijel
Copy link
Member

@nijel nijel commented Jan 28, 2020

Configuring source language is currently missing from the API.

I didn't get what was your problem with nested JSON, can you please open separate issue describing that? Mixing unrelated topics in single issue makes it hard to properly track then.

@ilkarataev
Copy link
Author

@ilkarataev ilkarataev commented Jan 28, 2020

About "Configuring source language",will you fix it?
About json_nested it's my mistake it's working, sorry.

@nijel
Copy link
Member

@nijel nijel commented Jan 30, 2020

It will get eventually fixed, currently it's not on the roadmap.

@nijel nijel changed the title Create project in api Create project in api missing source language Feb 3, 2020
nijel added a commit that referenced this issue Apr 7, 2020
* Allows source language to be added in the project API
* Adds validations and tests for nonexisting source languages

Fixes #3416

Co-authored-by: Michal Čihař <michal@cihar.com>
@github-actions
Copy link

@github-actions github-actions bot commented Apr 7, 2020

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see similar problem, please open separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

@nijel nijel added this to the 4.0 milestone Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants