Skip to content

Commit 684c135

Browse files
committed
We should not be consuming resources files from other project. Fixes #454
1 parent 3116a25 commit 684c135

File tree

4 files changed

+16
-314
lines changed

4 files changed

+16
-314
lines changed

AzureFunctions.Client/app/components/template-picker.component.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ export class TemplatePickerComponent {
5454
private _translateService: TranslateService) {
5555

5656
this.showTryView = this._globalStateService.showTryView;
57-
this._language = this._translateService.instant(PortalResources.temp_category_api);
57+
this._language = this._translateService.instant("temp_category_api");
5858

5959
this._orderedCategoties = [
60-
this._translateService.instant(PortalResources.temp_category_core),
61-
this._translateService.instant(PortalResources.temp_category_api),
62-
this._translateService.instant(PortalResources.temp_category_dataProcessing),
63-
this._translateService.instant(PortalResources.temp_category_all),
64-
this._translateService.instant(PortalResources.temp_category_experimental),
65-
this._translateService.instant(PortalResources.temp_category_all)
60+
this._translateService.instant("temp_category_core"),
61+
this._translateService.instant("temp_category_api"),
62+
this._translateService.instant("temp_category_dataProcessing"),
63+
this._translateService.instant("temp_category_samples"),
64+
this._translateService.instant("temp_category_experimental"),
65+
this._translateService.instant("temp_category_all")
6666
];
6767
}
6868

@@ -95,13 +95,13 @@ export class TemplatePickerComponent {
9595

9696
let initLanguages = false, initCategories = false;
9797
if (this.languages.length === 0) {
98-
this.languages = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant(PortalResources.temp_category_all), default: true }];
98+
this.languages = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant("temp_category_all"), default: true }];
9999
initLanguages = true;
100100
}
101101

102102

103103
if (this.categories.length === 0) {
104-
this.categories = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant(PortalResources.temp_category_all) }];
104+
this.categories = [{ displayLabel: this._translateService.instant(PortalResources.all), value: this._translateService.instant("temp_category_all") }];
105105
initCategories = true;
106106
}
107107

@@ -129,7 +129,7 @@ export class TemplatePickerComponent {
129129

130130
if (initCategories) {
131131
template.metadata.category.forEach((c) => {
132-
if ((this._language === this._translateService.instant(PortalResources.temp_category_all) || (template.metadata.language === this._language))) {
132+
if ((this._language === this._translateService.instant("temp_category_all") || (template.metadata.language === this._language))) {
133133

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

144144
if (this.category === c) {
145145
dropDownElement.default = true;
146-
} else if (!this.category && c === this._translateService.instant(PortalResources.temp_category_core)) {
146+
} else if (!this.category && c === this._translateService.instant("temp_category_core")) {
147147
dropDownElement.default = true;
148148
}
149149

@@ -154,12 +154,12 @@ export class TemplatePickerComponent {
154154
}
155155

156156
var matchIndex = template.metadata.category.findIndex((c) => {
157-
return c === this.category || this.category === this._translateService.instant(PortalResources.temp_category_all);
157+
return c === this.category || this.category === this._translateService.instant("temp_category_all");
158158
});
159159

160160
if (matchIndex !== -1) {
161-
if ((this._language === this._translateService.instant(PortalResources.temp_category_all) || (template.metadata.language === this._language))) {
162-
var keys = template.metadata.category.slice(0) || [this._translateService.instant(PortalResources.temp_category_experimental)];
161+
if ((this._language === this._translateService.instant("temp_category_all") || (template.metadata.language === this._language))) {
162+
var keys = template.metadata.category.slice(0) || [this._translateService.instant("temp_category_experimental")];
163163
keys.push(
164164
template.metadata.language
165165
);

0 commit comments

Comments
 (0)