tolgee / tolgee-js

Tolgee JavaScript libraries monorepo
https://tolgee.io
MIT License
218 stars 24 forks source link

Pulling translations by specific datetime #3301

Closed amir2mi closed 3 months ago

amir2mi commented 3 months ago

I've read the API documents and Tolgee CLI, but there was no option to get translations providing a date range, like a snapshot of all the translations at that specific datetime.

Use Case

I use the Tolgee CLI to pull the translations at build time. It means if I rebuild the last week build, it probably will have some missing or changed translations, because the pulled translations are always the last version of changes.

A new feature?

I see that the Tolgee has a great history per translation key, so I was wondering if it is possible to pull translations like this:

tolgee pull ./public/i18n --api-key=my_api_key --until="2024-01-02T11:00:00.137Z"
JanCizmar commented 3 months ago

Hi! Thanks for the query. This is more like a feature request to https://github.com/tolgee/tolgee-platform

However, the simpler way how to solve this would be to just don't delete keys when you know you are using them in other builds. Retrieving previous versions would be possible, but not trivial, so I don't think we can get that implemented soon.

amir2mi commented 3 months ago

Thanks for the reply, I closed this, and I thought the CLI would be the best place to create this issue: tolgee-cli#67 For now, I prefer to store translations changes on each build using Git.