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

Delete string via web interface and API #1974

Closed
likemike91 opened this issue Apr 19, 2018 · 21 comments · Fixed by #4568
Closed

Delete string via web interface and API #1974

likemike91 opened this issue Apr 19, 2018 · 21 comments · Fixed by #4568
Assignees
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit
Milestone

Comments

@likemike91
Copy link
Contributor

likemike91 commented Apr 19, 2018

What I tried is to delete a translation unit via the web interface but I haven't found a possibility to do it.
I also searched the documentation for it but except the possibility to grant a user the right to delete, i haven't found anything.
Is there any possibility to delete a translation unit via the web interface?

@nijel nijel added enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship. translate-toolkit Issues which need to be fixed in the translate-toolkit labels Apr 23, 2018
@nijel
Copy link
Member

nijel commented Apr 23, 2018

It's not there. For some formats it doesn't make sense as the units are automatically extracted from the source code, but it might be useful for some. Additionally there is no API for units removal in the translate-toolkit (library we use to parse the files with translations), so it first would have to be supported there.

@ad-boschung
Copy link

@nijel I think it makes sense to have a button that allows you to delete a translation from the interface, if you have the possibility to add a translation from the interface.

You say it doesn't make sense because the units are automatically extracted from the source code, so there should not be the possibility to add a translation. I think that if we can add, we should also be able to delete.
It goes together. One without the other doesn't really make sense.

@nijel
Copy link
Member

nijel commented Mar 4, 2019

It makes sense for monolingual translations, and typically doesn't make sense for bilingual ones (where Weblate does not support adding of strings).

In any case this feature is currently not supported by our backend library, so it needs more work to implement.

@ad-boschung
Copy link

Ok, so what would you suggest to do if you need to remove a key from your monolingual base language file, if it's not possible to do it from the web interface ?

@nijel
Copy link
Member

nijel commented Mar 4, 2019

You can still edit the files in the repository.

I'm not saying this feature should not be implemented, it's just not there and it's currently not on the roadmap.

@ad-boschung
Copy link

@nijel That's exactly what I did, but I encounter some issues...

I removed the translation from the monolingual base language file. Then I commit/push on the git branch. In Weblate interface I pull the changes, no problem. The translation was deleted in all language files.
Now I should be able to push the changes (translation removed from other files) in my branch to keep the other language files sync with the source file, but it's not possible because Weblate see no changes...

@nijel
Copy link
Member

nijel commented Mar 6, 2019

By default Weblate doesn't remove stale units from the other files to avoid accidental removal. If you want this to happen, install the Cleanup addon on your component.

@ad-boschung
Copy link

I installed the Cleanup addon on my component. I think that it removed the unused units from the other files, but in the "Repository maintenance" there was no changes to commit.
I had to change a unit text to be able to commit and push the "removed units" change.

@nijel
Copy link
Member

nijel commented Mar 6, 2019

That's currently expected, the addon triggers only on repository update.

@nijel
Copy link
Member

nijel commented Mar 6, 2019

Anyway in case somebody would be looking into this issue, it's worth noting that strings removal for some of the formats is already present in the cleanup addon, so that could be used while making the implementation more generic.

@nijel nijel changed the title Delete translation unit via web interface Delete string via web interface Apr 23, 2019
@brundles
Copy link

I agree that removing a string via the webinterface would be a very useful (=required) improvement. There are usecases where you would want to both add strings (which is doable) and remove them or other strings again via the webinterface (currently not doable as i see it).

@nijel nijel removed the undecided These features might not be implemented. Can be prioritized by sponsorship. label Sep 30, 2019
@nijel
Copy link
Member

nijel commented Sep 30, 2019

It would be definitely useful, it just needs to be implemented :-).

@nijel nijel added the backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. label Aug 3, 2020
@github-actions
Copy link

github-actions bot commented Aug 3, 2020

This issue has been added to the backlog. It is not scheduled on our roadmap, but it eventually might be implemented. In case you desperately need this feature, please consider helping or funding the development.

@nijel nijel changed the title Delete string via web interface Delete string via web interface and API Aug 24, 2020
@dgarana
Copy link

dgarana commented Aug 27, 2020

I'm also interested on having this feature 👍

@ws-hex
Copy link

ws-hex commented Aug 27, 2020

Also waiting on this feature. 👍

@jkoorts
Copy link

jkoorts commented Aug 27, 2020

Also waiting on this feature. +1

@ad-boschung
Copy link

Also waiting on this feature. +1 👍

@nijel nijel self-assigned this Sep 10, 2020
@nijel nijel linked a pull request Sep 22, 2020 that will close this issue
4 tasks
@kodiakhq kodiakhq bot closed this as completed in #4568 Sep 23, 2020
kodiakhq bot pushed a commit that referenced this issue Sep 23, 2020
It used recently introduced removeunit API in the translate-toolkit.

Issue #1974
kodiakhq bot pushed a commit that referenced this issue Sep 23, 2020
kodiakhq bot pushed a commit that referenced this issue Sep 23, 2020
@github-actions
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, consider supporting Weblate by donating.

@rasmusvhansen
Copy link

A question regarding this feature:

  1. I add a translation key "KEY1" in my English source file
  2. I translate the "KEY1" to Danish
  3. I remove the translation unit using the web interface
  4. I download the translations as json

"KEY1" is gone from the English json source file as expected
"KEY1" is still present in the Danish json file - I expected it to be deleted here as well

I cannot find "KEY1" when searching in the web interface, so the only way I have found to remove it completely is to manually remove it from the Danish json file and upload that to weblate again.

Am I doing something wrong or did I misunderstand what this feature should do?

Thanks for a great product - it really makes handling translations much easier 👍

@nijel
Copy link
Member

nijel commented Oct 27, 2020

@rasmusvhansen You can enable the cleanup addon to remove stale translations from the files, otherwise they are kept to reduce damage from accidental removal.

@rasmusvhansen
Copy link

Awesome, thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature. translate-toolkit Issues which need to be fixed in the translate-toolkit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants