2018-03-05 08:04:23 +08:00
|
|
|
import BufferedContent from "discourse/mixins/buffered-content";
|
2019-10-24 00:30:52 +08:00
|
|
|
import Component from "@ember/component";
|
2018-03-05 08:04:23 +08:00
|
|
|
import SettingComponent from "admin/mixins/setting-component";
|
2019-10-31 04:28:29 +08:00
|
|
|
import { alias } from "@ember/object/computed";
|
2018-03-05 08:04:23 +08:00
|
|
|
|
2019-10-24 00:30:52 +08:00
|
|
|
export default Component.extend(BufferedContent, SettingComponent, {
|
2018-03-05 08:04:23 +08:00
|
|
|
layoutName: "admin/templates/components/site-setting",
|
2019-10-31 04:28:29 +08:00
|
|
|
setting: alias("translation"),
|
2019-01-17 19:46:11 +08:00
|
|
|
type: "string",
|
2019-10-31 04:28:29 +08:00
|
|
|
settingName: alias("translation.key"),
|
2019-01-17 19:46:11 +08:00
|
|
|
|
2018-03-05 08:04:23 +08:00
|
|
|
_save() {
|
2019-05-27 16:15:39 +08:00
|
|
|
return this.model.saveTranslation(
|
2019-01-17 19:46:11 +08:00
|
|
|
this.get("translation.key"),
|
2018-03-05 08:04:23 +08:00
|
|
|
this.get("buffered.value")
|
|
|
|
);
|
|
|
|
},
|
|
|
|
});
|