loco-cli
loco-cli copied to clipboard
All done, message when maximum number of translation is reached.
Showing "All done." on push
When you have this message on https://localise.biz/
"This account is using the maximum 5,000 translations available on the Pro plan."
is actually a bug.
I looked into this I don't think this is something we can "fix" ourselves, as we get a 200 OK result back from the push. A workaround is that we throw an error if after the push, the remote and local files are not in sync. A quick mockup could be:
...
progressbar.stop();
// check if it's all good
const updatedRemote = await apiPull(accessKey, pullOptions);
const { totalCount: updatedTotalCount, deletedCount: updatedDeletedCount } = diff(
updatedRemote,
local,
pushOptions
);
if (updatedTotalCount || updatedDeletedCount) {
log.error('Something went wrong, please check any logs in the Localise dashboard.');
process.exit(1);
}
log.warn('Be kind to your translators');
...
Is this something we'd like to add @robrechtme?