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

New translation via API should be translated only in default language #11342

Closed
voplakal-lukas opened this issue Apr 3, 2024 · 4 comments
Closed
Assignees
Labels
bug Something is broken.
Milestone

Comments

@voplakal-lukas
Copy link

Describe the problem

New translation could be created with POST /api/translations/(string: project)/(string: component)/(string: language)/units/ endpoint (data bellow). I always use the default language (en) because I don't know the value of target for all languages.

{
    "source": [
        "Test string API_1"
    ],
    "target": [
        "Test string API_1"
    ]
}

Translations are correctly created, however all languages have a translation filled in from the default language.
Screenshot 2024-04-03 at 14 13 46

Describe the solution you would like

I would like to create a translation only for the default language, but leave the translation blank for other languages. Just like it works when you add new translation via UI.

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Apr 3, 2024

What Weblate version do you use? How is your translation configured (especially if it is using monolingual or bilingual files)?

@voplakal-lukas
Copy link
Author

What Weblate version do you use? How is your translation configured (especially if it is using monolingual or bilingual files)?

Currently 5.4.2 and translations are in monolingual .po files.

@nijel nijel added the bug Something is broken. label Apr 17, 2024
@nijel nijel added this to the 5.5 milestone Apr 17, 2024
@nijel
Copy link
Member

nijel commented Apr 20, 2024

Okay, it kind of behaves as expected: when the target is present, it is used as target for all strings. The missing bit is however to support not including the target and keeping strings not translated.

@nijel nijel self-assigned this Apr 20, 2024
@nijel nijel closed this as completed in ca73305 Apr 20, 2024
Copy link

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 a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

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

No branches or pull requests

2 participants