DEV: Fix typos and other spell-checker warnings (#17554)
This commit is contained in:
parent
d8714facb6
commit
0db6ae1e1f
|
@ -48,17 +48,17 @@ export default Mixin.create({
|
||||||
|
|
||||||
@discourseComputed("valid_values")
|
@discourseComputed("valid_values")
|
||||||
validValues(validValues) {
|
validValues(validValues) {
|
||||||
const vals = [],
|
const values = [];
|
||||||
translateNames = this.translate_names;
|
const translateNames = this.translate_names;
|
||||||
|
|
||||||
(validValues || []).forEach((v) => {
|
(validValues || []).forEach((v) => {
|
||||||
if (v.name && v.name.length > 0 && translateNames) {
|
if (v.name && v.name.length > 0 && translateNames) {
|
||||||
vals.addObject({ name: I18n.t(v.name), value: v.value });
|
values.addObject({ name: I18n.t(v.name), value: v.value });
|
||||||
} else {
|
} else {
|
||||||
vals.addObject(v);
|
values.addObject(v);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return vals;
|
return values;
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("valid_values")
|
@discourseComputed("valid_values")
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { setting } from "discourse/lib/computed";
|
||||||
export default DropdownSelectBoxComponent.extend({
|
export default DropdownSelectBoxComponent.extend({
|
||||||
pluginApiIdentifiers: ["categories-admin-dropdown"],
|
pluginApiIdentifiers: ["categories-admin-dropdown"],
|
||||||
classNames: ["categories-admin-dropdown"],
|
classNames: ["categories-admin-dropdown"],
|
||||||
fixedCateoryPositions: setting("fixed_category_positions"),
|
fixedCategoryPositions: setting("fixed_category_positions"),
|
||||||
|
|
||||||
selectKitOptions: {
|
selectKitOptions: {
|
||||||
icons: ["wrench", "caret-down"],
|
icons: ["wrench", "caret-down"],
|
||||||
|
@ -26,7 +26,7 @@ export default DropdownSelectBoxComponent.extend({
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (this.fixedCateoryPositions) {
|
if (this.fixedCategoryPositions) {
|
||||||
items.push({
|
items.push({
|
||||||
id: "reorder",
|
id: "reorder",
|
||||||
name: I18n.t("categories.reorder.title"),
|
name: I18n.t("categories.reorder.title"),
|
||||||
|
|
|
@ -40,9 +40,9 @@ export default SelectKitRowComponent.extend({
|
||||||
|
|
||||||
category: computed("rowValue", "rowName", function () {
|
category: computed("rowValue", "rowName", function () {
|
||||||
if (isEmpty(this.rowValue)) {
|
if (isEmpty(this.rowValue)) {
|
||||||
const uncat = Category.findUncategorized();
|
const uncategorized = Category.findUncategorized();
|
||||||
if (uncat && uncat.name === this.rowName) {
|
if (uncategorized && uncategorized.name === this.rowName) {
|
||||||
return uncat;
|
return uncategorized;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Category.findById(parseInt(this.rowValue, 10));
|
return Category.findById(parseInt(this.rowValue, 10));
|
||||||
|
|
|
@ -73,7 +73,7 @@ export default MultiSelectComponent.extend({
|
||||||
if (subcategoryIds.size > 1) {
|
if (subcategoryIds.size > 1) {
|
||||||
result.push(
|
result.push(
|
||||||
EmberObject.create({
|
EmberObject.create({
|
||||||
multicategory: [...subcategoryIds],
|
multiCategory: [...subcategoryIds],
|
||||||
category: result[0],
|
category: result[0],
|
||||||
title: I18n.t("category_row.plus_subcategories_title", {
|
title: I18n.t("category_row.plus_subcategories_title", {
|
||||||
name: result[0].name,
|
name: result[0].name,
|
||||||
|
@ -95,8 +95,8 @@ export default MultiSelectComponent.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
select(value, item) {
|
select(value, item) {
|
||||||
if (item.multicategory) {
|
if (item.multiCategory) {
|
||||||
const items = item.multicategory.map((id) =>
|
const items = item.multiCategory.map((id) =>
|
||||||
Category.findById(parseInt(id, 10))
|
Category.findById(parseInt(id, 10))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,11 @@ export default DropdownSelectBox.extend({
|
||||||
classNames: ["user-notifications", "user-notifications-dropdown"],
|
classNames: ["user-notifications", "user-notifications-dropdown"],
|
||||||
|
|
||||||
selectKitOptions: {
|
selectKitOptions: {
|
||||||
headerIcon: "userNotificationicon",
|
headerIcon: "userNotificationIcon",
|
||||||
showCaret: true,
|
showCaret: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
userNotificationicon: computed("mainCollection.[]", "value", function () {
|
userNotificationIcon: computed("mainCollection.[]", "value", function () {
|
||||||
return (
|
return (
|
||||||
this.mainCollection &&
|
this.mainCollection &&
|
||||||
this.mainCollection.find((row) => row.id === this.value).icon
|
this.mainCollection.find((row) => row.id === this.value).icon
|
||||||
|
|
Loading…
Reference in New Issue