Get last reviewed translation from API
complete
P
Philipp Laube
Using the API for translation values, we can only receive what is currently saved in the editor environment.
When a translation value is changed and therefore the review status of that translation changes to "NOT_REVIEWED" then the API will return this translation with the changed value and the "NOT_REVIEWED" review status. When filtering the API call to retrieve only "REVIEWED" translations (using the reviewStatus query parameter) the API won't return that translation at all.
We would like to have a way to tell the API to respond only with "REVIEWED" translations, meaning not the currently saved value, but the latest value which was marked as "REVIEWED".
Example:
- keys.label = "Foo" -> marked as "REVIEWED"
- User A changes keys.label to "Bar"
- keys.label is marked as "NOT_REVIEWED"
API response now:
keys.label = "Bar", marked as "NOT_REVIEWED"
API response we want:
keys.label = "Foo", marked as "REVIEWED"
Jakub Pomykała
complete
We added a version parameter to the /api/v2/translations endpoint. Set it to 'REVIEWED' to get the latest reviewed version of translations. If no reviewed version exists, it will return an empty translation text.
Note: Reviewed versions were not tracked for all translations prior to this update. Therefore, older translations that are currently not reviewed and had a reviewed version in the past are not available through this parameter.
Swagger UI:
https://api.simplelocalize.io/openapi/swagger-ui/index.html#/Translations/getTranslations
Jakub Pomykała
in progress