Fix some bugs

This commit is contained in:
john liddell
2020-11-17 19:17:55 -06:00
parent d257718476
commit fa08017181
13 changed files with 25 additions and 11 deletions

View File

@@ -598,7 +598,7 @@ export class MyAddonsComponent implements OnInit, OnDestroy, AfterViewInit {
}
public getChannelTypeLocaleKey(channelType: string) {
return `COMMON.ENUM.ADDON_CHANNEL_TYPE.${channelType.toUpperCase()}`;
return `COMMON.ENUM.ADDON_CHANNEL_TYPE.${channelType?.toUpperCase()}`;
}
private async lazyLoad() {

View File

@@ -309,9 +309,8 @@ export class AddonService {
this._addonStorage.set(addon.id, addon);
const actionLabel = `${getEnumName(WowClientType, addon.clientType)}|${addon.providerName}|${addon.externalId}|${
addon.name
}`;
const actionLabel = `${getEnumName(WowClientType, addon.clientType)}|${addon.providerName}|${addon.externalId}|${addon.name
}`;
this._analyticsService.trackAction("install-addon", {
clientType: getEnumName(WowClientType, addon.clientType),
provider: addon.providerName,
@@ -731,13 +730,17 @@ export class AddonService {
return;
}
const tocPaths = this.getTocPaths(addon);
console.debug("tocPaths", tocPaths);
const tocFiles = await Promise.all(_.map(tocPaths, (tocPath) => this._tocService.parse(tocPath)));
const orderedTocFiles = _.orderBy(tocFiles, ["wowInterfaceId", "loadOnDemand"], ["desc", "asc"]);
const primaryToc = _.first(orderedTocFiles);
this.setExternalIds(addon, primaryToc);
this.saveAddon(addon);
try {
const tocPaths = this.getTocPaths(addon);
console.debug("tocPaths", tocPaths);
const tocFiles = await Promise.all(_.map(tocPaths, (tocPath) => this._tocService.parse(tocPath)));
const orderedTocFiles = _.orderBy(tocFiles, ["wowInterfaceId", "loadOnDemand"], ["desc", "asc"]);
const primaryToc = _.first(orderedTocFiles);
this.setExternalIds(addon, primaryToc);
this.saveAddon(addon);
} catch (e) {
console.error(e);
}
}
public getTocPaths(addon: Addon) {

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} {dependencyCount, plural, one{Abhängigkeit} other{Abhängigkeiten}} benötigt"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} required {dependencyCount, plural, =1{dependency} other{dependencies}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} {dependencyCount, plural, one{dependencia requerida} other{dependencias requeridas}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} mil",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} {dependencyCount, plural, one{dépendance requise} other{dépendances requises}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} {dependencyCount, plural, one{dipendenza richiesta} other{dipendenze richieste}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount}개의 다른 애드온 참조"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count} 백",
"e+3": "{count} 천",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} required {dependencyCount, plural, one{dependency} other{dependencies}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} required {dependencyCount, plural, one{dependência} other{dependências}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount, plural, one{Необходима} other{Необходимо}} {dependencyCount} {dependencyCount, plural, one{зависимость} few{зависимости} other{зависимостей}}"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} {count, plural, one{тысяча} few{тысячи} other{тысяч}}",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} 個依賴項"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",

View File

@@ -65,6 +65,7 @@
"TOOLTIP": "{dependencyCount} 个依赖项"
},
"DOWNLOAD_COUNT": {
"e+0": "{count}",
"e+1": "{count}",
"e+2": "{count}",
"e+3": "{count} thousand",