private void OnLocalizableValuesActualizationStart()
 {
     TranslationLogger.Info(
         string.Format(LocalizableValuesActualizationStartMessageTemplate, DateTime.UtcNow,
                       DateTime.UtcNow.Kind));
     _erroneousRecords.Clear();
 }
 private void OnWriteTranslationBatchEnd()
 {
     if (TranslationBatches.Count % WriteTranslationLogInterval == 0)
     {
         TranslationLogger.Info(
             string.Format(WriteTranslationBatchEndMessageTemplate, TranslationBatches.Count));
     }
 }
 private void OnWriteTranslationEnd()
 {
     _processedTranslationsCount++;
     if (_processedTranslationsCount % WriteTranslationLogInterval == 0)
     {
         TranslationLogger.Info(string.Format(WriteTranslationEndMessageTemplate, _processedTranslationsCount));
     }
 }
 /// <summary>
 /// Actualizes translation.
 /// </summary>
 /// <param name="actualizeFrom">The date to start actualization from.</param>
 public void ActualizeTranslation(DateTime actualizeFrom)
 {
     if (CurrentActualizationStatus == ActualizationStatus.InProgress)
     {
         while (CurrentActualizationStatus == ActualizationStatus.InProgress)
         {
             Thread.Sleep(500);
         }
         TranslationLogger.Info(TranslationActualizationSkipMessage);
     }
     else
     {
         OnTranslationActualizationStart(actualizeFrom);
         try {
             TranslationProvider.Transaction(() => {
                 InternalActualizeTranslation(actualizeFrom);
             });
         } finally {
             OnTranslationActualizationEnd();
         }
     }
 }
 private void OnWriteTranslationBatchesStart()
 {
     TranslationLogger.Info(
         string.Format(WriteTranslationBatchesStartMessageTemplate, TranslationBatches.Count));
 }
 private void OnLocalizableValuesActualizationEnd()
 {
     TranslationLogger.Info(LocalizableValuesActualizationEndMessage);
     _erroneousRecords.Clear();
 }
 private void OnTranslationActualizationEnd()
 {
     CurrentActualizationStatus = ActualizationStatus.NotStarted;
     TranslationLogger.Info(TranslationActualizationEndMessage);
 }
 private void OnTranslationActualizationStart(DateTime actualizeFrom)
 {
     CurrentActualizationStatus = ActualizationStatus.InProgress;
     TranslationLogger.Info(string.Format(TranslationActualizationStartMessageTemplate, actualizeFrom,
                                          actualizeFrom.Kind));
 }