mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
settings_bots: Move bot_creation_policy_values to top-level.
Since ensure_i18n is dead we don't need to explictly load them.
This commit is contained in:
@@ -118,7 +118,6 @@ run_test('set_up', () => {
|
||||
global.compile_template('embedded_bot_config_item');
|
||||
avatar.build_bot_create_widget = function () {};
|
||||
avatar.build_bot_edit_widget = function () {};
|
||||
settings_bots.setup_bot_creation_policy_values();
|
||||
|
||||
settings_bots.set_up();
|
||||
});
|
||||
|
||||
@@ -119,23 +119,19 @@ exports.generate_botserverrc_content = function (email, api_key, token) {
|
||||
"\n";
|
||||
};
|
||||
|
||||
exports.bot_creation_policy_values = {};
|
||||
|
||||
exports.setup_bot_creation_policy_values = function () {
|
||||
exports.bot_creation_policy_values = {
|
||||
everyone: {
|
||||
code: 1,
|
||||
description: i18n.t("Everyone"),
|
||||
},
|
||||
admins_only: {
|
||||
code: 3,
|
||||
description: i18n.t("Admins only"),
|
||||
},
|
||||
restricted: {
|
||||
code: 2,
|
||||
description: i18n.t("Everyone, but only admins can add generic bots"),
|
||||
},
|
||||
};
|
||||
exports.bot_creation_policy_values = {
|
||||
everyone: {
|
||||
code: 1,
|
||||
description: i18n.t("Everyone"),
|
||||
},
|
||||
admins_only: {
|
||||
code: 3,
|
||||
description: i18n.t("Admins only"),
|
||||
},
|
||||
restricted: {
|
||||
code: 2,
|
||||
description: i18n.t("Everyone, but only admins can add generic bots"),
|
||||
},
|
||||
};
|
||||
|
||||
exports.update_bot_settings_tip = function () {
|
||||
|
||||
@@ -17,7 +17,6 @@ exports.initialize = function () {
|
||||
saving: i18n.t("Saving"),
|
||||
};
|
||||
|
||||
settings_bots.setup_bot_creation_policy_values();
|
||||
settings_org.setup_time_limit_dropdown_values();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user