Always mark new translations as awaiting approval

It's useful to have approval as a separate step in the workflow even
when the translator is also able to do the approval.
This commit is contained in:
Theodore Dubois 2024-01-09 13:47:13 -08:00
parent b4f47ca60b
commit 8f8ce79de3

View File

@ -25,7 +25,7 @@ router.post('/translations/propose', handleErrorAsync(async (req, res) => {
await req.db.get(SQL`INSERT INTO translations (id, locale, tKey, tValue, status, author_id) VALUES (
${ulid()}, ${global.config.locale},
${tKey}, ${JSON.stringify(req.body.changes[tKey])},
${req.isGranted('translations') ? TRANSLATION_STATUS.APPROVED : TRANSLATION_STATUS.AWAITING}, ${req.user.id}
${TRANSLATION_STATUS.AWAITING}, ${req.user.id}
)`);
}