DEV: Remove 'underscore' string prototype extensions (#16748)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
This commit is contained in:
parent
839ae52c20
commit
ce8dd8810e
|
@ -3,6 +3,7 @@ import I18n from "I18n";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { isPresent } from "@ember/utils";
|
||||
import { next } from "@ember/runloop";
|
||||
import { underscore } from "@ember/string";
|
||||
|
||||
export default Controller.extend({
|
||||
queryParams: [
|
||||
|
@ -43,7 +44,7 @@ export default Controller.extend({
|
|||
return (this.reviewableTypes || []).map((type) => {
|
||||
return {
|
||||
id: type,
|
||||
name: I18n.t(`review.types.${type.underscore()}.title`),
|
||||
name: I18n.t(`review.types.${underscore(type)}.title`),
|
||||
};
|
||||
});
|
||||
},
|
||||
|
|
|
@ -4,6 +4,7 @@ import { Promise } from "rsvp";
|
|||
import RestModel from "discourse/models/rest";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { underscore } from "@ember/string";
|
||||
|
||||
export const PENDING = 0;
|
||||
export const APPROVED = 1;
|
||||
|
@ -19,7 +20,7 @@ const Reviewable = RestModel.extend({
|
|||
type = "ReviewableQueuedTopic";
|
||||
}
|
||||
|
||||
return I18n.t(`review.types.${type.underscore()}.title`, {
|
||||
return I18n.t(`review.types.${underscore(type)}.title`, {
|
||||
defaultValue: "",
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue