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