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

"Prefill translation with source" addon does not work #7633

Closed
2 tasks done
antonkomarev opened this issue May 12, 2022 · 3 comments
Closed
2 tasks done

"Prefill translation with source" addon does not work #7633

antonkomarev opened this issue May 12, 2022 · 3 comments

Comments

@antonkomarev
Copy link

antonkomarev commented May 12, 2022

Describe the issue

I think I've tried all possible ways, addon seems to be broken... or I'm missing something?

All untranslated strings in the component will be filled with the source string, and marked as needing edit. Use this when you can not have empty strings in the translation files.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Enable addon:

Screenshot 2022-05-12 at 22 50 33

  1. Try to add English (origin) translation
  • There is no way to add new translation strings without filling translation (textarea is required):

Screenshot 2022-05-12 at 22 51 31

  1. Try to create translation string with any not empty value and erase it later (update translation stirng with empty value)
  • Nothing happens (string is empty, no "Needs editing" flag set)
  1. Try to add new translation key from the API
  • You cannot add translation string without value (400 error)
  • You cannot add translation string with value = null (400 error)
  • You cannot add translation string with value = '' (400 error)
  • Translation string with empty array value = [] just adds new translation with empty value, but without "Needs editing" flag and empty translation.

Expected behavior

After enabling addon I can add translation strings with empty value. Translation will be added with value = key and with flag "Needs editing".

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

Weblate 4.11.2

Weblate deploy checks

No response

Additional context

No response

@antonkomarev
Copy link
Author

antonkomarev commented May 13, 2022

It looks like I've misunderstood this feature.
I thought that you can create only key example.key in English and value will be automatically same example.key. And it will be marked with "Needs editing" flag. Like this:
Screenshot 2022-05-13 at 08 16 13

But it creates keys + values from source language in all secondary languages and adds "Needs editing" flags in them.

Or should it also work the way I described in the original comment?

@nijel
Copy link
Member

nijel commented May 13, 2022

It fills translation with the source string, not the source string with context/key, so it works as intended.

@nijel nijel closed this as completed May 13, 2022
@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • 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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants