DEV: Fix typos and other spell-checker warnings (#17554)

This commit is contained in:
Jarek Radosz 2022-07-19 04:27:10 +02:00 committed by GitHub
parent d8714facb6
commit 0db6ae1e1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View File

@ -48,17 +48,17 @@ export default Mixin.create({
@discourseComputed("valid_values")
validValues(validValues) {
const vals = [],
translateNames = this.translate_names;
const values = [];
const translateNames = this.translate_names;
(validValues || []).forEach((v) => {
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 {
vals.addObject(v);
values.addObject(v);
}
});
return vals;
return values;
},
@discourseComputed("valid_values")

View File

@ -6,7 +6,7 @@ import { setting } from "discourse/lib/computed";
export default DropdownSelectBoxComponent.extend({
pluginApiIdentifiers: ["categories-admin-dropdown"],
classNames: ["categories-admin-dropdown"],
fixedCateoryPositions: setting("fixed_category_positions"),
fixedCategoryPositions: setting("fixed_category_positions"),
selectKitOptions: {
icons: ["wrench", "caret-down"],
@ -26,7 +26,7 @@ export default DropdownSelectBoxComponent.extend({
},
];
if (this.fixedCateoryPositions) {
if (this.fixedCategoryPositions) {
items.push({
id: "reorder",
name: I18n.t("categories.reorder.title"),

View File

@ -40,9 +40,9 @@ export default SelectKitRowComponent.extend({
category: computed("rowValue", "rowName", function () {
if (isEmpty(this.rowValue)) {
const uncat = Category.findUncategorized();
if (uncat && uncat.name === this.rowName) {
return uncat;
const uncategorized = Category.findUncategorized();
if (uncategorized && uncategorized.name === this.rowName) {
return uncategorized;
}
} else {
return Category.findById(parseInt(this.rowValue, 10));

View File

@ -73,7 +73,7 @@ export default MultiSelectComponent.extend({
if (subcategoryIds.size > 1) {
result.push(
EmberObject.create({
multicategory: [...subcategoryIds],
multiCategory: [...subcategoryIds],
category: result[0],
title: I18n.t("category_row.plus_subcategories_title", {
name: result[0].name,
@ -95,8 +95,8 @@ export default MultiSelectComponent.extend({
},
select(value, item) {
if (item.multicategory) {
const items = item.multicategory.map((id) =>
if (item.multiCategory) {
const items = item.multiCategory.map((id) =>
Category.findById(parseInt(id, 10))
);

View File

@ -8,11 +8,11 @@ export default DropdownSelectBox.extend({
classNames: ["user-notifications", "user-notifications-dropdown"],
selectKitOptions: {
headerIcon: "userNotificationicon",
headerIcon: "userNotificationIcon",
showCaret: true,
},
userNotificationicon: computed("mainCollection.[]", "value", function () {
userNotificationIcon: computed("mainCollection.[]", "value", function () {
return (
this.mainCollection &&
this.mainCollection.find((row) => row.id === this.value).icon