mark hardcoded translations and duplicated code with XXX

This commit is contained in:
ansuz 2020-05-25 16:18:59 -04:00
parent efd4790156
commit 73a168f09b
5 changed files with 15 additions and 6 deletions

View File

@ -99,9 +99,11 @@ define([
});
var onBlur = function (e) {
if (e.relatedTarget) {
if ($(e.relatedTarget).is('.cp-toolbar-drawer-button')) { return; }
if ($(e.relatedTarget).parents('.cp-toolbar-drawer-content').length) {
$(e.relatedTarget).blur(onBlur);
var $relatedTarget = $(e.relatedTarget);
if ($relatedTarget.is('.cp-toolbar-drawer-button')) { return; }
if ($relatedTarget.parents('.cp-toolbar-drawer-content').length) {
$relatedTarget.blur(onBlur);
return;
}
}
@ -416,7 +418,11 @@ define([
var $content = $('#cp-app-code-preview-content');
mkPrintButton(framework, $content, $print);
// XXX don't display the help menu in embed mode?
// metadataMgr.getPrivateData().isEmbed
// do the same in all other apps
// pad, code, oo, slide, poll, whiteboard, kanban
// OR do it in a more generic way...
mkHelpMenu(framework);
var evModeChange = Util.mkEvent();

View File

@ -365,7 +365,7 @@ define([
}
};
Messages.todo_move = "Your todo list has been moved to the pad <b>{0}</b>, as the Todo app is now deprecated.";
Messages.todo_move = "Your todo list has been moved to the pad <b>{0}</b>, as the Todo app is now deprecated."; // XXX
handlers['MOVE_TODO'] = function(common, data) {
var content = data.content;
var msg = content.msg;

View File

@ -359,7 +359,7 @@ define([
content: l.name // Pretty name of the language value
});
});
Messages.code_editorTheme = "Editor theme";
Messages.code_editorTheme = "Editor theme"; // XXX
var dropdownConfig = {
text: Messages.code_editorTheme, // Button initial text
options: options, // Entries displayed in the menu
@ -370,6 +370,7 @@ define([
};
var $block = exp.$theme = UIElements.createDropdown(dropdownConfig);
$block.find('button').attr('title', Messages.themeButtonTitle).click(function () {
// XXX copy-pasted code from configureLanguage. We can refactor this.
var state = $block.find('.cp-dropdown-content').is(':visible');
var $c = $block.closest('.cp-toolbar-drawer-content');
$c.removeClass('cp-dropdown-visible');

View File

@ -92,6 +92,7 @@ MessengerUI, Messages) {
Messages.toolbar_file = "File"; // XXX
if (!config.hideDrawer) {
// XXX a lot of this logic is duplicated (code, slide, here)
var $drawer = $(h('button.' + FILE_CLS, [
h('i.fa.fa-file-o'),
h('span.cp-button-name', Messages.toolbar_file)

View File

@ -100,6 +100,7 @@ define([
});
};
// XXX this function is a duplicate of /code/
var mkThemeButton = function (framework) {
Messages.toolbar_theme = "Theme"; // XXX
var $theme = $(h('button.cp-toolbar-appmenu', [