markReviewed method

Future<void> markReviewed({
  1. required String keyPath,
  2. required String locale,
})

Implementation

Future<void> markReviewed({
  required String keyPath,
  required String locale,
}) async {
  final loaded = await _loadAndSyncState();
  if (!loaded.locales.contains(locale)) {
    throw CatalogOperationException('Locale "$locale" is not configured.');
  }
  if (!loaded.keyPaths.contains(keyPath)) {
    throw CatalogOperationException('Key "$keyPath" does not exist.');
  }

  _markReviewedInLoadedCatalog(
    loaded: loaded,
    keyPath: keyPath,
    locale: locale,
    now: DateTime.now().toUtc(),
    statusEngine: _statusEngine,
  );

  await _stateStore.save(
    config: config,
    projectRootPath: projectRootPath,
    state: loaded.state,
  );
}