@tilde-nlp/ngx-translate 9.0.27 → 9.0.28

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.
@@ -8696,10 +8696,11 @@ class TldTranslateTextService {
8696
8696
  setDictionaryTerms(response, urls) {
8697
8697
  response.forEach((res, i) => {
8698
8698
  res.forEach((item) => {
8699
+ const isTerminiGovLvCollection = urls[i].includes('termini');
8699
8700
  const isTildeTermCollection = urls[i].includes('tilde');
8700
8701
  const termWithSource = {
8701
8702
  ...item,
8702
- dictionaryDomainUrl: isTildeTermCollection ? null : urls[i],
8703
+ dictionaryDomainUrl: urls[i],
8703
8704
  sourceLabel: isTildeTermCollection ? this.translate.instant('TERM_PORTAL_NAME') : null,
8704
8705
  };
8705
8706
  const termSummary = termWithSource.languageSummaries?.find((summary) => summary.lang === this.activeData.targetLanguage);
@@ -8707,9 +8708,16 @@ class TldTranslateTextService {
8707
8708
  const collectionEntry = termWithSource.entrySummaries[0];
8708
8709
  const collectionId = collectionEntry.collectionId;
8709
8710
  const collectionTargetWord = termSummary.terms[0].term;
8710
- const collectionUrl = termWithSource.dictionaryDomainUrl
8711
- ? `https://${termWithSource.dictionaryDomainUrl}/collections/${collectionId}`
8712
- : `${this.terminologyPortalUrl}/collections/${collectionId}`;
8711
+ let collectionUrl;
8712
+ if (isTildeTermCollection) {
8713
+ collectionUrl = `${this.terminologyPortalUrl}/collections/${collectionId}`;
8714
+ }
8715
+ else if (isTerminiGovLvCollection) {
8716
+ collectionUrl = `https://${termWithSource.dictionaryDomainUrl}/kolekcijas/${collectionId}`;
8717
+ }
8718
+ else {
8719
+ collectionUrl = `https://${termWithSource.dictionaryDomainUrl}/collections/${collectionId}`;
8720
+ }
8713
8721
  if (!this.dictionaryEntry.some((term) => term.targetWord === collectionTargetWord && term.termSource === collectionEntry.collectionName)) {
8714
8722
  this.dictionaryEntry.push({
8715
8723
  ...termWithSource,