tolgee-platform icon indicating copy to clipboard operation
tolgee-platform copied to clipboard

Translations pushed from figma plugin are not treated the same way as when updated manually

Open stepan662 opened this issue 1 year ago • 10 comments

When pushing from figma plugin (endpoint /v2/projects/keys/import-resolvable), it doesn't trigger automatic actions - like auto translations and neither are other translations marked as deprecated (in case of base language)

stepan662 avatar Jul 03 '24 09:07 stepan662

@huglx now has good experience with the automation debugging, so I've assigned him.

JanCizmar avatar Aug 20 '24 09:08 JanCizmar

Hi @stepan662, I was working on this issue for a while and reached a few conclusions: First, on my local machine, I didn't notice anything wrong with the autotranslation staff. Could you describe more about reproducing this issue? Regarding deprecated translations, there was a missing part of the code that should mark the translation as outdated upon import, and I have added that code.

huglx avatar Aug 22 '24 10:08 huglx

Isn't it the same issue? When I try this on production, translations don't get marked as outdated neither autotranslated. https://github.com/user-attachments/assets/b4a1e5da-f677-4f36-b139-c068a04ec465

stepan662 avatar Aug 22 '24 10:08 stepan662

On your video, you don't have an auto-translation flag icon for Czech translation, which is why it isn't translated. This happens when you have manually modified a translation. And the problem with outdate thing I've resolved.

huglx avatar Aug 22 '24 11:08 huglx

Ok, it doesn’t work if I pulled the key and then modified it, but I guess there is a problem with the auto-translation flag nearby a translation, not with automation itself, because it works fine if I push a new key to Tolgee.

huglx avatar Aug 22 '24 12:08 huglx

Maybe we should add the ability to turn on auto-translation for a certain language when the user has somehow turned it off (like removing the auto-translation icon, etc.).

huglx avatar Aug 22 '24 12:08 huglx

Ah, you are right it's not supposed to work when there is already a translation (non autotranslated), but it still doesn't work even if I delete it https://github.com/user-attachments/assets/4a65defc-efa2-446f-8ecc-353bf92efa86

stepan662 avatar Aug 22 '24 14:08 stepan662

Aha, it works, you are right. I forgot about this option 🤦 Snímek obrazovky 2024-08-22 v 16 12 15

stepan662 avatar Aug 22 '24 14:08 stepan662

great, so I only fix outdate states behaviour

huglx avatar Aug 22 '24 14:08 huglx

Please add option to FORCE_OVERRIDE, which will forcefully update/create/keeps the translation to the new value.

So it's not necessary to know upfront which action has to be done.

stepan662 avatar Aug 27 '24 13:08 stepan662

@huglx what's the state of this?

JanCizmar avatar Oct 01 '24 10:10 JanCizmar

@huglx what's the state of this?

im working on it

huglx avatar Oct 01 '24 13:10 huglx