tolgee / tolgee-cli

The Tolgee CLI
MIT License
16 stars 11 forks source link

Add existing keys values when syncing #61

Closed baptisteArno closed 11 months ago

baptisteArno commented 11 months ago

Wouldn't it be nice when running tolgee sync to push the new strings with their existing values as well?

Currently, it will just push the new keys without translation values.

cyyynthia commented 11 months ago

If I understand correctly, this would be like a mix of the current sync (which only deals with source code and only pushes the default value if it found it) and push, where the sync command would peek values from the i18n/*.json files to push locally added translations in one go, right?

Something like (assuming there's a folder i18n with json files): tolgee sync --include-translations ./i18n 'src/**/*.ts?(x)'

baptisteArno commented 11 months ago

Ok I just understood what exactly sync is doing then. The issue does not really make sense then.

I thought first that sync replaces the need to use push and pull but I was wrong :) It's just a way to extract the keys it can find in the code.