Skip to content

Commit

Permalink
We should not be consuming resources files from other project. Fixes
Browse files Browse the repository at this point in the history
…#454
  • Loading branch information
alrod committed Oct 7, 2016
1 parent 3116a25 commit 684c135
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 314 deletions.
28 changes: 14 additions & 14 deletions AzureFunctions.Client/app/components/template-picker.component.ts
Expand Up @@ -54,15 +54,15 @@ export class TemplatePickerComponent {
private _translateService: TranslateService) {

this.showTryView = this._globalStateService.showTryView;
this._language = this._translateService.instant(PortalResources.temp_category_api);
this._language = this._translateService.instant("temp_category_api");

this._orderedCategoties = [
this._translateService.instant(PortalResources.temp_category_core),
this._translateService.instant(PortalResources.temp_category_api),
this._translateService.instant(PortalResources.temp_category_dataProcessing),
this._translateService.instant(PortalResources.temp_category_all),
this._translateService.instant(PortalResources.temp_category_experimental),
this._translateService.instant(PortalResources.temp_category_all)
this._translateService.instant("temp_category_core"),
this._translateService.instant("temp_category_api"),
this._translateService.instant("temp_category_dataProcessing"),
this._translateService.instant("temp_category_samples"),
this._translateService.instant("temp_category_experimental"),
this._translateService.instant("temp_category_all")
];
}

Expand Down Expand Up @@ -95,13 +95,13 @@ export class TemplatePickerComponent {

let initLanguages = false, initCategories = false;
if (this.languages.length === 0) {
this.languages = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant(PortalResources.temp_category_all), default: true }];
this.languages = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant("temp_category_all"), default: true }];
initLanguages = true;
}


if (this.categories.length === 0) {
this.categories = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant(PortalResources.temp_category_all) }];
this.categories = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant("temp_category_all") }];
initCategories = true;
}

Expand Down Expand Up @@ -129,7 +129,7 @@ export class TemplatePickerComponent {

if (initCategories) {
template.metadata.category.forEach((c) => {
if ((this._language === this._translateService.instant(PortalResources.temp_category_all) || (template.metadata.language === this._language))) {
if ((this._language === this._translateService.instant("temp_category_all") || (template.metadata.language === this._language))) {

var index = this.categories.findIndex((category) => {
return category.value === c;
Expand All @@ -143,7 +143,7 @@ export class TemplatePickerComponent {

if (this.category === c) {
dropDownElement.default = true;
} else if (!this.category && c === this._translateService.instant(PortalResources.temp_category_core)) {
} else if (!this.category && c === this._translateService.instant("temp_category_core")) {
dropDownElement.default = true;
}

Expand All @@ -154,12 +154,12 @@ export class TemplatePickerComponent {
}

var matchIndex = template.metadata.category.findIndex((c) => {
return c === this.category || this.category === this._translateService.instant(PortalResources.temp_category_all);
return c === this.category || this.category === this._translateService.instant("temp_category_all");
});

if (matchIndex !== -1) {
if ((this._language === this._translateService.instant(PortalResources.temp_category_all) || (template.metadata.language === this._language))) {
var keys = template.metadata.category.slice(0) || [this._translateService.instant(PortalResources.temp_category_experimental)];
if ((this._language === this._translateService.instant("temp_category_all") || (template.metadata.language === this._language))) {
var keys = template.metadata.category.slice(0) || [this._translateService.instant("temp_category_experimental")];
keys.push(
template.metadata.language
);
Expand Down

0 comments on commit 684c135

Please sign in to comment.