DEV: Bump dependencies and fix linting (#194)
This commit is contained in:
parent
90f3f97a13
commit
ec328ed3d8
|
@ -1,6 +1,6 @@
|
|||
import Component from "@ember/component";
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import discourseComputed from "discourse/lib/decorators";
|
||||
|
||||
@tagName("")
|
||||
export default class DocsCategory extends Component {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Component from "@ember/component";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import { classNames } from "@ember-decorators/component";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import computed, { bind } from "discourse-common/utils/decorators";
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
import computed, { bind } from "discourse/lib/decorators";
|
||||
|
||||
@classNames("docs-topic")
|
||||
export default class DocsTopic extends Component {
|
||||
|
|
|
@ -4,9 +4,9 @@ import { action } from "@ember/object";
|
|||
import { alias, equal, gt, readOnly } from "@ember/object/computed";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { on } from "@ember-decorators/object";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse/lib/decorators";
|
||||
import getURL from "discourse/lib/get-url";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
||||
|
||||
const SHOW_FILTER_AT = 10;
|
||||
|
@ -246,12 +246,12 @@ export default class DocsIndexController extends Controller {
|
|||
|
||||
@discourseComputed()
|
||||
emptyState() {
|
||||
let body = I18n.t("docs.no_docs.body");
|
||||
let body = i18n("docs.no_docs.body");
|
||||
if (this.docsCategoriesAndTags.length) {
|
||||
body += I18n.t("docs.no_docs.to_include_topic_in_docs");
|
||||
body += i18n("docs.no_docs.to_include_topic_in_docs");
|
||||
body += ` (${this.docsCategoriesAndTags.join(", ")}).`;
|
||||
} else if (this.currentUser.staff) {
|
||||
const setUpPluginMessage = I18n.t("docs.no_docs.setup_the_plugin", {
|
||||
const setUpPluginMessage = i18n("docs.no_docs.setup_the_plugin", {
|
||||
settingsUrl: getURL(
|
||||
"/admin/site_settings/category/plugins?filter=plugin:discourse-docs"
|
||||
),
|
||||
|
@ -260,7 +260,7 @@ export default class DocsIndexController extends Controller {
|
|||
}
|
||||
|
||||
return {
|
||||
title: I18n.t("docs.no_docs.title"),
|
||||
title: i18n("docs.no_docs.title"),
|
||||
body: htmlSafe(body),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import { getDocs } from "../../lib/get-docs";
|
||||
|
||||
function initialize(api, container) {
|
||||
|
@ -13,7 +13,7 @@ function initialize(api, container) {
|
|||
if (siteSettings.docs_add_to_top_menu) {
|
||||
api.addNavigationBarItem({
|
||||
name: "docs",
|
||||
displayName: I18n.t("docs.title"),
|
||||
displayName: i18n("docs.title"),
|
||||
href: "/" + docsPath,
|
||||
});
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ export default {
|
|||
|
||||
const tip = {
|
||||
label: "in:docs",
|
||||
description: I18n.t("docs.search.tip_description"),
|
||||
description: i18n("docs.search.tip_description"),
|
||||
clickable: true,
|
||||
searchTopics: true,
|
||||
};
|
||||
|
@ -65,8 +65,8 @@ export default {
|
|||
api.addCommunitySectionLink({
|
||||
name: "docs",
|
||||
route: "docs.index",
|
||||
title: I18n.t("sidebar.docs_link_title"),
|
||||
text: I18n.t("sidebar.docs_link_text"),
|
||||
title: i18n("sidebar.docs_link_title"),
|
||||
text: i18n("sidebar.docs_link_text"),
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import Docs from "discourse/plugins/discourse-docs/discourse/models/docs";
|
||||
|
||||
export default class DocsIndex extends DiscourseRoute {
|
||||
|
@ -26,7 +26,7 @@ export default class DocsIndex extends DiscourseRoute {
|
|||
|
||||
titleToken() {
|
||||
const model = this.currentModel;
|
||||
const pageTitle = I18n.t("docs.title");
|
||||
const pageTitle = i18n("docs.title");
|
||||
if (model.topic.title && model.topic.category_id) {
|
||||
const title = model.topic.unicode_title || model.topic.title;
|
||||
const categoryName = this.site.categories.findBy(
|
||||
|
|
13
package.json
13
package.json
|
@ -1,15 +1,16 @@
|
|||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@discourse/lint-configs": "2.2.2",
|
||||
"ember-template-lint": "6.0.0",
|
||||
"eslint": "9.15.0",
|
||||
"@discourse/lint-configs": "2.4.0",
|
||||
"ember-template-lint": "6.1.0",
|
||||
"eslint": "9.19.0",
|
||||
"prettier": "2.8.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18",
|
||||
"node": ">= 22",
|
||||
"npm": "please-use-pnpm",
|
||||
"yarn": "please-use-pnpm",
|
||||
"pnpm": ">= 9"
|
||||
}
|
||||
"pnpm": "9.x"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.5"
|
||||
}
|
||||
|
|
1317
pnpm-lock.yaml
1317
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,12 @@
|
|||
import { click, currentURL, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { cloneJSON } from "discourse/lib/object";
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
query,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { cloneJSON } from "discourse-common/lib/object";
|
||||
import I18n from "I18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import docsFixtures from "../fixtures/docs";
|
||||
|
||||
let DOCS_URL_PATH = "docs";
|
||||
|
@ -56,13 +56,13 @@ acceptance("Docs - Sidebar with docs enabled", function (needs) {
|
|||
|
||||
assert.strictEqual(
|
||||
query(".sidebar-section-link[data-link-name='docs']").textContent.trim(),
|
||||
I18n.t("sidebar.docs_link_text"),
|
||||
i18n("sidebar.docs_link_text"),
|
||||
"displays the right text for the link"
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
query(".sidebar-section-link[data-link-name='docs']").title,
|
||||
I18n.t("sidebar.docs_link_title"),
|
||||
i18n("sidebar.docs_link_title"),
|
||||
"displays the right title for the link"
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue