mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 13:03:45 +08:00
ea8b5c18db
Admins can now edit translations in different languages without having to change their locale. We display a warning when there's a fallback language set.
29 lines
608 B
JavaScript
29 lines
608 B
JavaScript
import Route from "@ember/routing/route";
|
|
import { getProperties } from "@ember/object";
|
|
import showModal from "discourse/lib/show-modal";
|
|
|
|
export default Route.extend({
|
|
queryParams: {
|
|
q: { replace: true },
|
|
overridden: { replace: true },
|
|
locale: { replace: true },
|
|
},
|
|
|
|
model(params) {
|
|
return this.store.find(
|
|
"site-text",
|
|
getProperties(params, "q", "overridden", "locale")
|
|
);
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
controller.set("siteTexts", model);
|
|
},
|
|
|
|
actions: {
|
|
showReseedModal() {
|
|
showModal("admin-reseed", { admin: true });
|
|
},
|
|
},
|
|
});
|