@tilde-nlp/ngx-translate 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -823,7 +823,7 @@ const i18n_en = {
823
823
  "DRAG_AND_DROP": "or drag and drop ",
824
824
  "FILE": "a file",
825
825
  "FILES": "files",
826
- "LIMITS": " ({{visibleExtensions}}. Max {{maxSizeMB}}MB)",
826
+ "LIMITS": " ( {{visibleExtensions}}. Max {{maxSizeMB}}MB )",
827
827
  "CLEAR": "Clear file"
828
828
  },
829
829
  "SYSTEM_PICKER": {
@@ -5758,12 +5758,6 @@ class CombinedCollection {
5758
5758
  get mtStatus() {
5759
5759
  return this.mtCollection?.status;
5760
5760
  }
5761
- /**
5762
- * Last updated date from mt api.
5763
- */
5764
- get lastUpdated() {
5765
- return this.mtCollection?.lastUpdated;
5766
- }
5767
5761
  /**
5768
5762
  * Collection name. If has term collection, takes from there. If not, then returns mt collection name.
5769
5763
  */
@@ -5833,7 +5827,7 @@ class CombinedCollection {
5833
5827
  */
5834
5828
  deleteTerms() {
5835
5829
  this.termCollection = null;
5836
- this.update(null);
5830
+ this.update(null, false);
5837
5831
  }
5838
5832
  /**
5839
5833
  * Deletes mt collection and its properties.
@@ -5850,6 +5844,7 @@ class CombinedCollection {
5850
5844
  if (termModified && lastMtUpdated) {
5851
5845
  isSynchronized = termModified < lastMtUpdated;
5852
5846
  }
5847
+ this.lastUpdated = termModified ?? lastMtUpdated;
5853
5848
  this._isSynchronized = isSynchronized;
5854
5849
  }
5855
5850
  updateSource() {
@@ -8443,9 +8438,7 @@ class TldTranslateTextComponent {
8443
8438
  maxLength: this.config.audioConfig.maximumRecordTime,
8444
8439
  apiUrl: this.config.audioConfig.dictateApiUrl
8445
8440
  };
8446
- this.allowedTypesWithoutDots = [];
8447
- this.allowedFileTypes.forEach(el => this.allowedTypesWithoutDots.push(el.replace(".", "")));
8448
- this.visibleExtensions = this.capitalizeFirstLetter(this.allowedTypesWithoutDots.slice(0, this.visibleExtensionCount).join(", "));
8441
+ this.visibleExtensions = this.allowedFileTypes.slice(0, this.visibleExtensionCount).join(", ");
8449
8442
  this.maxSizeMB = Common.bytesToMb(this.config.fileConfig.maxSize);
8450
8443
  this.tldSystem.getActiveData().pipe(distinctUntilChanged((x, y) => x && y && x.systemId == y.systemId))
8451
8444
  .pipe(takeUntil(this.destroy$))
@@ -8474,9 +8467,6 @@ class TldTranslateTextComponent {
8474
8467
  }
8475
8468
  this.subscribeToBreakpointObserver();
8476
8469
  }
8477
- capitalizeFirstLetter(s) {
8478
- return s && s[0].toUpperCase() + s.slice(1);
8479
- }
8480
8470
  copy() {
8481
8471
  this.clipboard.copy(this.translatedText);
8482
8472
  this.alerts.info("TLD_TRANSLATE.TEXT_COPIED", { id: this.copyMessageId, closeButtonId: this.copyMessageCloseButtonId, parentId: this.copyButtonId });
@@ -10408,7 +10398,7 @@ class MtTermV2Service {
10408
10398
  default: collection.editables.default,
10409
10399
  scope: collection.editables.scope
10410
10400
  };
10411
- return this.engineTermApi.update(engineId, collection.termId, params)
10401
+ return this.engineTermApi.update(engineId, collection.mtCollection.id, params)
10412
10402
  .pipe(map(collection => this.convertToCombinedCollection(collection)));
10413
10403
  }
10414
10404
  }