mirror of https://github.com/zulip/zulip.git
js: Convert static/js/i18n.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
40c3d07b2c
commit
bb1b2048bd
|
@ -108,8 +108,7 @@
|
|||
"files": ["frontend_tests/node_tests/**"],
|
||||
"globals": {
|
||||
"current_msg_list": false,
|
||||
"home_msg_list": false,
|
||||
"i18n": false
|
||||
"home_msg_list": false
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -127,7 +126,6 @@
|
|||
"csrf_token": false,
|
||||
"current_msg_list": true,
|
||||
"home_msg_list": false,
|
||||
"i18n": false,
|
||||
"page_params": false,
|
||||
"StripeCheckout": false,
|
||||
"zxcvbn": false
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {stub_templates} = require("../zjsunit/handlebars");
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, mock_esm, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const $ = require("../zjsunit/zjquery");
|
||||
|
|
|
@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
|
|||
|
||||
const _ = require("lodash");
|
||||
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ const {JSDOM} = require("jsdom");
|
|||
const MockDate = require("mockdate");
|
||||
|
||||
const {stub_templates} = require("../zjsunit/handlebars");
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, mock_esm, set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const blueslip = require("../zjsunit/zblueslip");
|
||||
|
|
|
@ -4,6 +4,7 @@ const {strict: assert} = require("assert");
|
|||
|
||||
const autosize = require("autosize");
|
||||
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const $ = require("../zjsunit/zjquery");
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, mock_esm, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const blueslip = require("../zjsunit/zblueslip");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const {strict: assert} = require("assert");
|
||||
|
||||
const {set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {set_global, unmock_module, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
// We download our translations in `page_params` (which
|
||||
|
@ -20,6 +20,7 @@ set_global("page_params", {
|
|||
// We use `i18n.js` to initialize `i18next` and
|
||||
// to set `i18n` to `i18next` on the global namespace
|
||||
// for `templates.js`.
|
||||
unmock_module("../../static/js/i18n");
|
||||
zrequire("i18n");
|
||||
zrequire("templates");
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ const {parseISO} = require("date-fns");
|
|||
const _ = require("lodash");
|
||||
const MockDate = require("mockdate");
|
||||
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_esm, set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const blueslip = require("../zjsunit/zblueslip");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {stub_templates} = require("../zjsunit/handlebars");
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, mock_esm, set_global, with_field, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const $ = require("../zjsunit/zjquery");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const {strict: assert} = require("assert");
|
||||
|
||||
const {stub_templates} = require("../zjsunit/handlebars");
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, mock_esm, set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const blueslip = require("../zjsunit/zblueslip");
|
||||
|
|
|
@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
|
|||
const _ = require("lodash");
|
||||
|
||||
const {stub_templates} = require("../zjsunit/handlebars");
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, mock_esm, set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const blueslip = require("../zjsunit/zblueslip");
|
||||
|
|
|
@ -5,6 +5,7 @@ const {strict: assert} = require("assert");
|
|||
const {add} = require("date-fns");
|
||||
const MockDate = require("mockdate");
|
||||
|
||||
const {i18n} = require("../zjsunit/i18n");
|
||||
const {mock_cjs, set_global, zrequire} = require("../zjsunit/namespace");
|
||||
const {run_test} = require("../zjsunit/test");
|
||||
const $ = require("../zjsunit/zjquery");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
exports.t = function (str, context) {
|
||||
exports.i18n = {};
|
||||
exports.i18n.t = function (str, context) {
|
||||
// HAPPY PATH: most translations are a simple string:
|
||||
if (context === undefined) {
|
||||
return "translated: " + str;
|
||||
|
|
|
@ -89,7 +89,8 @@ try {
|
|||
|
||||
namespace.mock_esm("../../static/js/blueslip", blueslip);
|
||||
require("../../static/js/blueslip");
|
||||
namespace.set_global("i18n", stub_i18n);
|
||||
namespace.mock_esm("../../static/js/i18n", stub_i18n);
|
||||
require("../../static/js/i18n");
|
||||
|
||||
run_one_module(file);
|
||||
|
||||
|
|
|
@ -93,6 +93,25 @@ exports.mock_esm = (request, obj = {}) => {
|
|||
return exports.mock_cjs(request, {...obj, __esModule: true});
|
||||
};
|
||||
|
||||
exports.unmock_module = (request) => {
|
||||
const filename = Module._resolveFilename(
|
||||
request,
|
||||
require.cache[callsites()[1].getFileName()],
|
||||
false,
|
||||
);
|
||||
|
||||
if (!module_mocks.has(filename)) {
|
||||
throw new Error(`Cannot unmock ${filename}, which was not mocked`);
|
||||
}
|
||||
|
||||
if (!used_module_mocks.has(filename)) {
|
||||
throw new Error(`You asked to mock ${filename} but we never saw it during compilation.`);
|
||||
}
|
||||
|
||||
module_mocks.delete(filename);
|
||||
used_module_mocks.delete(filename);
|
||||
};
|
||||
|
||||
exports.set_global = function (name, val) {
|
||||
if (val === null) {
|
||||
throw new Error(`
|
||||
|
|
|
@ -3,6 +3,7 @@ import $ from "jquery";
|
|||
import render_admin_tab from "../templates/admin_tab.hbs";
|
||||
import render_settings_organization_settings_tip from "../templates/settings/organization_settings_tip.hbs";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as overlays from "./overlays";
|
||||
import * as settings from "./settings";
|
||||
import * as settings_bots from "./settings_bots";
|
||||
|
|
|
@ -4,6 +4,7 @@ import render_alert_word_settings_item from "../templates/settings/alert_word_se
|
|||
|
||||
import * as alert_words from "./alert_words";
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
|
||||
export function render_alert_words_ui() {
|
||||
const words = alert_words.get_word_list();
|
||||
|
|
|
@ -4,6 +4,7 @@ import render_settings_upload_space_stats from "../templates/settings/upload_spa
|
|||
import render_uploaded_files_list from "../templates/uploaded_files_list.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as loading from "./loading";
|
||||
import * as timerender from "./timerender";
|
||||
|
|
|
@ -4,6 +4,7 @@ import render_confirm_delete_user_avatar from "../templates/confirm_delete_user_
|
|||
|
||||
import * as channel from "./channel";
|
||||
import * as confirm_dialog from "./confirm_dialog";
|
||||
import {i18n} from "./i18n";
|
||||
import * as settings_data from "./settings_data";
|
||||
import * as upload_widget from "./upload_widget";
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import * as blueslip from "./blueslip";
|
||||
import * as compose_fade_users from "./compose_fade_users";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as people from "./people";
|
||||
import * as presence from "./presence";
|
||||
import * as timerender from "./timerender";
|
||||
|
|
|
@ -10,7 +10,6 @@ import "jquery-validation";
|
|||
import "flatpickr";
|
||||
|
||||
// Import app JS
|
||||
import "../i18n";
|
||||
import "../setup";
|
||||
import "../message_list";
|
||||
import "../reload";
|
||||
|
|
|
@ -18,6 +18,7 @@ import * as compose_state from "./compose_state";
|
|||
import * as emoji_picker from "./emoji_picker";
|
||||
import * as hash_util from "./hash_util";
|
||||
import * as hotspots from "./hotspots";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_edit from "./message_edit";
|
||||
import * as message_edit_history from "./message_edit_history";
|
||||
import * as message_flags from "./message_flags";
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
|
||||
export const status_classes = "alert-error alert-success alert-info alert-warning";
|
||||
|
||||
// TODO: Move this to the portico codebase.
|
||||
|
|
|
@ -18,6 +18,7 @@ import * as compose_state from "./compose_state";
|
|||
import * as compose_ui from "./compose_ui";
|
||||
import * as drafts from "./drafts";
|
||||
import * as echo from "./echo";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as markdown from "./markdown";
|
||||
import * as notifications from "./notifications";
|
||||
|
|
|
@ -12,6 +12,7 @@ import * as compose_state from "./compose_state";
|
|||
import * as compose_ui from "./compose_ui";
|
||||
import * as drafts from "./drafts";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_viewport from "./message_viewport";
|
||||
import * as narrow_state from "./narrow_state";
|
||||
import * as notifications from "./notifications";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import autosize from "autosize";
|
||||
import $ from "jquery";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as people from "./people";
|
||||
import * as user_status from "./user_status";
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import * as compose from "./compose";
|
|||
import * as compose_pm_pill from "./compose_pm_pill";
|
||||
import * as compose_state from "./compose_state";
|
||||
import * as compose_ui from "./compose_ui";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_store from "./message_store";
|
||||
import * as people from "./people";
|
||||
import * as rows from "./rows";
|
||||
|
|
|
@ -12,6 +12,7 @@ import * as compose_actions from "./compose_actions";
|
|||
import * as compose_fade from "./compose_fade";
|
||||
import * as compose_state from "./compose_state";
|
||||
import * as compose_ui from "./compose_ui";
|
||||
import {i18n} from "./i18n";
|
||||
import {localstorage} from "./localstorage";
|
||||
import * as markdown from "./markdown";
|
||||
import * as narrow from "./narrow";
|
||||
|
|
|
@ -10,6 +10,7 @@ import render_emoji_showcase from "../templates/emoji_showcase.hbs";
|
|||
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as compose_ui from "./compose_ui";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_store from "./message_store";
|
||||
import * as popovers from "./popovers";
|
||||
import * as reactions from "./reactions";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Handlebars from "handlebars/runtime";
|
||||
import _ from "lodash";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_parser from "./message_parser";
|
||||
import * as message_store from "./message_store";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import * as hashchange from "./hashchange";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_viewport from "./message_viewport";
|
||||
import * as navigate from "./navigate";
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
declare let csrf_token: any;
|
||||
declare let current_msg_list: any;
|
||||
declare let home_msg_list: any;
|
||||
declare let i18n: any;
|
||||
declare let page_params: any;
|
||||
declare let zulip_test: any;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as narrow_state from "./narrow_state";
|
||||
import * as people from "./people";
|
||||
import * as stream_data from "./stream_data";
|
||||
|
|
|
@ -19,4 +19,4 @@ i18next.init({
|
|||
returnEmptyString: false, // Empty string is not a valid translation.
|
||||
});
|
||||
|
||||
window.i18n = i18next;
|
||||
export const i18n = i18next;
|
||||
|
|
|
@ -5,6 +5,7 @@ import render_markdown_help from "../templates/markdown_help.hbs";
|
|||
import * as browser_history from "./browser_history";
|
||||
import * as common from "./common";
|
||||
import * as components from "./components";
|
||||
import {i18n} from "./i18n";
|
||||
import * as keydown_util from "./keydown_util";
|
||||
import * as markdown from "./markdown";
|
||||
import * as overlays from "./overlays";
|
||||
|
|
|
@ -10,6 +10,7 @@ import render_settings_dev_env_email_access from "../templates/settings/dev_env_
|
|||
import * as browser_history from "./browser_history";
|
||||
import * as channel from "./channel";
|
||||
import * as common from "./common";
|
||||
import {i18n} from "./i18n";
|
||||
import * as overlays from "./overlays";
|
||||
import * as stream_data from "./stream_data";
|
||||
import * as ui from "./ui";
|
||||
|
|
|
@ -11,6 +11,7 @@ import * as compose_actions from "./compose_actions";
|
|||
import * as composebox_typeahead from "./composebox_typeahead";
|
||||
import * as condense from "./condense";
|
||||
import * as echo from "./echo";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as markdown from "./markdown";
|
||||
import * as message_store from "./message_store";
|
||||
|
|
|
@ -4,6 +4,7 @@ import $ from "jquery";
|
|||
import render_message_edit_history from "../templates/message_edit_history.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as people from "./people";
|
||||
import * as timerender from "./timerender";
|
||||
import * as ui_report from "./ui_report";
|
||||
|
|
|
@ -2,6 +2,7 @@ import autosize from "autosize";
|
|||
import $ from "jquery";
|
||||
|
||||
import * as blueslip from "./blueslip";
|
||||
import {i18n} from "./i18n";
|
||||
import {MessageListData} from "./message_list_data";
|
||||
import {MessageListView} from "./message_list_view";
|
||||
import * as narrow from "./narrow";
|
||||
|
|
|
@ -14,6 +14,7 @@ import * as compose from "./compose";
|
|||
import * as compose_fade from "./compose_fade";
|
||||
import * as condense from "./condense";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_edit from "./message_edit";
|
||||
import * as message_store from "./message_store";
|
||||
import * as message_viewport from "./message_viewport";
|
||||
|
|
|
@ -2,6 +2,7 @@ import $ from "jquery";
|
|||
|
||||
import render_message_view_header from "../templates/message_view_header.hbs";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as narrow_state from "./narrow_state";
|
||||
import * as peer_data from "./peer_data";
|
||||
import * as recent_topics from "./recent_topics";
|
||||
|
|
|
@ -5,6 +5,7 @@ import render_topic_muted from "../templates/topic_muted.hbs";
|
|||
|
||||
import * as channel from "./channel";
|
||||
import * as feedback_widget from "./feedback_widget";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as muting from "./muting";
|
||||
import * as overlays from "./overlays";
|
||||
|
|
|
@ -9,6 +9,7 @@ import * as compose_state from "./compose_state";
|
|||
import * as condense from "./condense";
|
||||
import {Filter} from "./filter";
|
||||
import * as hashchange from "./hashchange";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_edit from "./message_edit";
|
||||
import * as message_fetch from "./message_fetch";
|
||||
import * as message_list from "./message_list";
|
||||
|
|
|
@ -7,6 +7,7 @@ import * as alert_words from "./alert_words";
|
|||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import * as favicon from "./favicon";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_store from "./message_store";
|
||||
import * as muting from "./muting";
|
||||
import * as narrow from "./narrow";
|
||||
|
|
|
@ -6,6 +6,7 @@ import * as typeahead from "../shared/js/typeahead";
|
|||
|
||||
import * as blueslip from "./blueslip";
|
||||
import {FoldDict} from "./fold_dict";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_store from "./message_store";
|
||||
import * as reload_state from "./reload_state";
|
||||
import * as settings_data from "./settings_data";
|
||||
|
|
|
@ -24,6 +24,7 @@ import * as condense from "./condense";
|
|||
import * as emoji_picker from "./emoji_picker";
|
||||
import * as feature_flags from "./feature_flags";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_edit from "./message_edit";
|
||||
import * as message_edit_history from "./message_edit_history";
|
||||
import * as message_viewport from "./message_viewport";
|
||||
|
|
|
@ -3,6 +3,7 @@ import _ from "lodash";
|
|||
|
||||
import * as blueslip from "../blueslip";
|
||||
import * as common from "../common";
|
||||
import {i18n} from "../i18n";
|
||||
|
||||
import * as google_analytics from "./google-analytics";
|
||||
import {path_parts} from "./landing-page";
|
||||
|
|
|
@ -7,6 +7,7 @@ import render_message_reaction from "../templates/message_reaction.hbs";
|
|||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import * as emoji_picker from "./emoji_picker";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_store from "./message_store";
|
||||
import * as people from "./people";
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import $ from "jquery";
|
|||
import * as channel from "./channel";
|
||||
import * as compose from "./compose";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as notifications from "./notifications";
|
||||
import * as people from "./people";
|
||||
import * as transmit from "./transmit";
|
||||
|
|
|
@ -7,6 +7,7 @@ import render_markdown_timestamp from "../templates/markdown_timestamp.hbs";
|
|||
import view_code_in_playground from "../templates/view_code_in_playground.hbs";
|
||||
|
||||
import * as blueslip from "./blueslip";
|
||||
import {i18n} from "./i18n";
|
||||
import * as people from "./people";
|
||||
import * as rtl from "./rtl";
|
||||
import * as settings_config from "./settings_config";
|
||||
|
|
|
@ -5,6 +5,7 @@ import render_settings_tab from "../templates/settings_tab.hbs";
|
|||
|
||||
import * as admin from "./admin";
|
||||
import * as blueslip from "./blueslip";
|
||||
import {i18n} from "./i18n";
|
||||
import * as overlays from "./overlays";
|
||||
import * as people from "./people";
|
||||
import * as settings_bots from "./settings_bots";
|
||||
|
|
|
@ -9,6 +9,7 @@ import * as avatar from "./avatar";
|
|||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import * as common from "./common";
|
||||
import {i18n} from "./i18n";
|
||||
import * as overlays from "./overlays";
|
||||
import * as people from "./people";
|
||||
import * as pill_typeahead from "./pill_typeahead";
|
||||
|
|
|
@ -11,6 +11,7 @@ import * as avatar from "./avatar";
|
|||
import * as bot_data from "./bot_data";
|
||||
import * as channel from "./channel";
|
||||
import {DropdownListWidget as dropdown_list_widget} from "./dropdown_list_widget";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as overlays from "./overlays";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import {i18n} from "./i18n";
|
||||
|
||||
/*
|
||||
This file contains translations between the integer values used in
|
||||
the Zulip API to describe values in dropdowns, radio buttons, and
|
||||
|
|
|
@ -2,6 +2,7 @@ import $ from "jquery";
|
|||
|
||||
import * as channel from "./channel";
|
||||
import * as emojisets from "./emojisets";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as overlays from "./overlays";
|
||||
import * as settings_config from "./settings_config";
|
||||
|
|
|
@ -5,6 +5,7 @@ import render_admin_emoji_list from "../templates/admin_emoji_list.hbs";
|
|||
import render_settings_emoji_settings_tip from "../templates/settings/emoji_settings_tip.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as loading from "./loading";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -3,6 +3,7 @@ import $ from "jquery";
|
|||
import render_admin_export_list from "../templates/admin_export_list.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as loading from "./loading";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -5,6 +5,7 @@ import render_settings_revoke_invite_modal from "../templates/settings/revoke_in
|
|||
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as loading from "./loading";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -3,6 +3,7 @@ import $ from "jquery";
|
|||
import render_admin_linkifier_list from "../templates/admin_linkifier_list.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as ui from "./ui";
|
||||
import * as ui_report from "./ui_report";
|
||||
|
|
|
@ -3,6 +3,7 @@ import $ from "jquery";
|
|||
import render_stream_specific_notification_row from "../templates/settings/stream_specific_notification_row.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as notifications from "./notifications";
|
||||
import * as settings_config from "./settings_config";
|
||||
import * as settings_org from "./settings_org";
|
||||
|
|
|
@ -7,6 +7,7 @@ import render_settings_admin_realm_domains_list from "../templates/settings/admi
|
|||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import {DropdownListWidget as dropdown_list_widget} from "./dropdown_list_widget";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as overlays from "./overlays";
|
||||
import * as realm_icon from "./realm_icon";
|
||||
|
|
|
@ -3,6 +3,7 @@ import $ from "jquery";
|
|||
import render_admin_default_streams_list from "../templates/admin_default_streams_list.hbs";
|
||||
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as loading from "./loading";
|
||||
import * as stream_data from "./stream_data";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import * as components from "./components";
|
||||
import {i18n} from "./i18n";
|
||||
import * as settings_panel_menu from "./settings_panel_menu";
|
||||
|
||||
let toggler;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as ui_report from "./ui_report";
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import render_confirm_delete_user from "../templates/confirm_delete_user.hbs";
|
|||
|
||||
import * as channel from "./channel";
|
||||
import * as confirm_dialog from "./confirm_dialog";
|
||||
import {i18n} from "./i18n";
|
||||
import * as people from "./people";
|
||||
import * as pill_typeahead from "./pill_typeahead";
|
||||
import * as ui_report from "./ui_report";
|
||||
|
|
|
@ -8,6 +8,7 @@ import * as blueslip from "./blueslip";
|
|||
import * as bot_data from "./bot_data";
|
||||
import * as channel from "./channel";
|
||||
import {DropdownListWidget as dropdown_list_widget} from "./dropdown_list_widget";
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as loading from "./loading";
|
||||
import * as overlays from "./overlays";
|
||||
|
|
|
@ -4,6 +4,7 @@ import render_confirm_unstar_all_messages from "../templates/confirm_unstar_all_
|
|||
import render_confirm_unstar_all_messages_in_topic from "../templates/confirm_unstar_all_messages_in_topic.hbs";
|
||||
|
||||
import * as confirm_dialog from "./confirm_dialog";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_flags from "./message_flags";
|
||||
|
||||
export function confirm_unstar_all_messages() {
|
||||
|
|
|
@ -3,6 +3,8 @@ import PlotlyBar from "plotly.js/lib/bar";
|
|||
import Plotly from "plotly.js/lib/core";
|
||||
import PlotlyPie from "plotly.js/lib/pie";
|
||||
|
||||
import {i18n} from "../i18n";
|
||||
|
||||
Plotly.register([PlotlyBar, PlotlyPie]);
|
||||
|
||||
const font_14pt = {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import $ from "jquery";
|
||||
|
||||
import * as color_class from "./color_class";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_view_header from "./message_view_header";
|
||||
import * as subs from "./subs";
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import render_subscription_invites_warning_modal from "../templates/subscription
|
|||
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as channel from "./channel";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as peer_data from "./peer_data";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -2,6 +2,7 @@ import * as blueslip from "./blueslip";
|
|||
import * as color_data from "./color_data";
|
||||
import {FoldDict} from "./fold_dict";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as message_list from "./message_list";
|
||||
import * as peer_data from "./peer_data";
|
||||
import * as people from "./people";
|
||||
|
|
|
@ -10,6 +10,7 @@ import * as blueslip from "./blueslip";
|
|||
import * as browser_history from "./browser_history";
|
||||
import * as channel from "./channel";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as input_pill from "./input_pill";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as narrow_state from "./narrow_state";
|
||||
|
|
|
@ -2,6 +2,7 @@ import $ from "jquery";
|
|||
|
||||
import render_subscription_type from "../templates/subscription_type.hbs";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as ListWidget from "./list_widget";
|
||||
import * as peer_data from "./peer_data";
|
||||
import * as stream_data from "./stream_data";
|
||||
|
|
|
@ -12,6 +12,7 @@ import * as channel from "./channel";
|
|||
import * as components from "./components";
|
||||
import * as compose_state from "./compose_state";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {i18n} from "./i18n";
|
||||
import * as loading from "./loading";
|
||||
import * as message_live_update from "./message_live_update";
|
||||
import * as message_view_header from "./message_view_header";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Handlebars from "handlebars/runtime";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
import * as util from "./util";
|
||||
|
||||
// Below, we register Zulip-specific extensions to the handlebars API.
|
||||
|
|
|
@ -10,6 +10,8 @@ import {
|
|||
} from "date-fns";
|
||||
import $ from "jquery";
|
||||
|
||||
import {i18n} from "./i18n";
|
||||
|
||||
let next_timerender_id = 0;
|
||||
|
||||
export function clear_for_testing() {
|
||||
|
|
|
@ -4,6 +4,7 @@ import render_widgets_todo_widget from "../templates/widgets/todo_widget.hbs";
|
|||
import render_widgets_todo_widget_tasks from "../templates/widgets/todo_widget_tasks.hbs";
|
||||
|
||||
import * as blueslip from "./blueslip";
|
||||
import {i18n} from "./i18n";
|
||||
|
||||
export class TaskData {
|
||||
task_map = new Map();
|
||||
|
|
|
@ -3,6 +3,7 @@ import SimpleBar from "simplebar/dist/simplebar";
|
|||
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as common from "./common";
|
||||
import {i18n} from "./i18n";
|
||||
import {localstorage} from "./localstorage";
|
||||
import * as message_list from "./message_list";
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import $ from "jquery";
|
|||
import _ from "lodash";
|
||||
|
||||
import * as common from "./common";
|
||||
import {i18n} from "./i18n";
|
||||
|
||||
/* Arguments used in the report_* functions are,
|
||||
response- response that we want to display
|
||||
|
|
|
@ -7,6 +7,7 @@ import * as compose from "./compose";
|
|||
import * as compose_actions from "./compose_actions";
|
||||
import * as compose_state from "./compose_state";
|
||||
import * as compose_ui from "./compose_ui";
|
||||
import {i18n} from "./i18n";
|
||||
|
||||
export function make_upload_absolute(uri) {
|
||||
if (uri.startsWith(compose.uploads_path)) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import {i18n} from "./i18n";
|
||||
|
||||
const default_max_file_size = 5;
|
||||
|
||||
const supported_types = ["image/jpeg", "image/png", "image/gif", "image/tiff"];
|
||||
|
|
|
@ -6,6 +6,7 @@ import * as browser_history from "./browser_history";
|
|||
import * as channel from "./channel";
|
||||
import * as common from "./common";
|
||||
import * as feedback_widget from "./feedback_widget";
|
||||
import {i18n} from "./i18n";
|
||||
import * as night_mode from "./night_mode";
|
||||
import * as scroll_bar from "./scroll_bar";
|
||||
|
||||
|
|
Loading…
Reference in New Issue