loco-cli icon indicating copy to clipboard operation
loco-cli copied to clipboard

All done, message when maximum number of translation is reached.

Open EfrosIonelu opened this issue 3 years ago • 1 comments

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.

EfrosIonelu avatar Sep 16 '22 06:09 EfrosIonelu

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?

VNDRN avatar Sep 09 '24 13:09 VNDRN