mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 22:27:10 -04:00
Fixed loading ep_font_color3
This commit is contained in:
parent
ccbbaa20b3
commit
b0a93ccddb
7 changed files with 20 additions and 19 deletions
|
@ -92,7 +92,8 @@ const convertTypescript = (content: string) => {
|
||||||
loader: 'js'
|
loader: 'js'
|
||||||
},
|
},
|
||||||
alias:{
|
alias:{
|
||||||
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser'
|
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser',
|
||||||
|
"ep_etherpad-lite/static/js/nice-select": 'ep_etherpad-lite/static/js/vendors/nice-select'
|
||||||
},
|
},
|
||||||
bundle: true, // Bundle the files together
|
bundle: true, // Bundle the files together
|
||||||
minify: process.env.NODE_ENV === "production", // Minify the output
|
minify: process.env.NODE_ENV === "production", // Minify the output
|
||||||
|
@ -212,7 +213,8 @@ const convertTypescriptWatched = (content: string, cb: (output:string, hash: str
|
||||||
loader: 'js'
|
loader: 'js'
|
||||||
},
|
},
|
||||||
alias:{
|
alias:{
|
||||||
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser'
|
"ep_etherpad-lite/static/js/browser": 'ep_etherpad-lite/static/js/vendors/browser',
|
||||||
|
"ep_etherpad-lite/static/js/nice-select": 'ep_etherpad-lite/static/js/vendors/nice-select'
|
||||||
},
|
},
|
||||||
bundle: true, // Bundle the files together
|
bundle: true, // Bundle the files together
|
||||||
minify: process.env.NODE_ENV === "production", // Minify the output
|
minify: process.env.NODE_ENV === "production", // Minify the output
|
||||||
|
|
|
@ -100,7 +100,6 @@ const Ace2Editor = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
const doActionsPendingInit = () => {
|
const doActionsPendingInit = () => {
|
||||||
console.log('doActionsPendingInit', actionsPendingInit)
|
|
||||||
for (const fn of actionsPendingInit) fn();
|
for (const fn of actionsPendingInit) fn();
|
||||||
actionsPendingInit = [];
|
actionsPendingInit = [];
|
||||||
};
|
};
|
||||||
|
|
|
@ -484,7 +484,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
newText = `${lines.join('\n')}\n`;
|
newText = `${lines.join('\n')}\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.console.log('importText', {text, undoable, dontProcess, newText})
|
|
||||||
|
|
||||||
inCallStackIfNecessary(`importText${undoable ? 'Undoable' : ''}`, () => {
|
inCallStackIfNecessary(`importText${undoable ? 'Undoable' : ''}`, () => {
|
||||||
setDocText(newText);
|
setDocText(newText);
|
||||||
|
@ -526,7 +525,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
|
|
||||||
const oldLen = rep.lines.totalWidth();
|
const oldLen = rep.lines.totalWidth();
|
||||||
const numLines = rep.lines.length();
|
const numLines = rep.lines.length();
|
||||||
window.console.log(rep, numLines - 1);
|
|
||||||
const upToLastLine = rep.lines.offsetOfIndex(numLines - 1);
|
const upToLastLine = rep.lines.offsetOfIndex(numLines - 1);
|
||||||
const lastLineLength = rep.lines.atIndex(numLines - 1).text.length;
|
const lastLineLength = rep.lines.atIndex(numLines - 1).text.length;
|
||||||
const assem = Changeset.smartOpAssembler();
|
const assem = Changeset.smartOpAssembler();
|
||||||
|
|
|
@ -191,7 +191,6 @@ const getDimensionOfFirstBrowserLineOfRepLine = (line: number, rep: RepModel) =>
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSelectionRange = () => {
|
const getSelectionRange = () => {
|
||||||
console.log("Selection is",window.frameElement)
|
|
||||||
if (!window.getSelection) {
|
if (!window.getSelection) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import html10n from '../js/vendors/html10n';
|
import html10n from '../js/vendors/html10n';
|
||||||
|
|
||||||
|
|
||||||
((document) => {
|
// Set language for l10n
|
||||||
// Set language for l10n
|
let regexpLang: string | undefined;
|
||||||
let regexpLang: string | undefined;
|
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
|
||||||
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
|
if (language) regexpLang = language[1];
|
||||||
if (language) regexpLang = language[1];
|
|
||||||
|
|
||||||
html10n.mt.bind('indexed', () => {
|
html10n.mt.bind('indexed', () => {
|
||||||
|
console.log('Navigator language', navigator.language)
|
||||||
|
console.log('Localizing things', [regexpLang, navigator.language, 'en'])
|
||||||
html10n.localize([regexpLang, navigator.language, 'en']);
|
html10n.localize([regexpLang, navigator.language, 'en']);
|
||||||
});
|
});
|
||||||
|
|
||||||
html10n.mt.bind('localized', () => {
|
html10n.mt.bind('localized', () => {
|
||||||
document.documentElement.lang = html10n.getLanguage()!;
|
document.documentElement.lang = html10n.getLanguage()!;
|
||||||
document.documentElement.dir = html10n.getDirection()!;
|
document.documentElement.dir = html10n.getDirection()!;
|
||||||
});
|
});
|
||||||
})(document);
|
|
||||||
|
|
|
@ -139,6 +139,7 @@ const getParameters = [
|
||||||
name: 'lang',
|
name: 'lang',
|
||||||
checkVal: null,
|
checkVal: null,
|
||||||
callback: (val) => {
|
callback: (val) => {
|
||||||
|
console.log('Val is', val)
|
||||||
html10n.localize([val, 'en']);
|
html10n.localize([val, 'en']);
|
||||||
Cookies.set('language', val);
|
Cookies.set('language', val);
|
||||||
},
|
},
|
||||||
|
|
2
src/static/js/vendors/html10n.ts
vendored
2
src/static/js/vendors/html10n.ts
vendored
|
@ -472,6 +472,7 @@ export class Html10n {
|
||||||
}
|
}
|
||||||
|
|
||||||
localize(langs: (string|undefined)[]|string) {
|
localize(langs: (string|undefined)[]|string) {
|
||||||
|
console.log('Available langs ', langs)
|
||||||
if ('string' === typeof langs) {
|
if ('string' === typeof langs) {
|
||||||
langs = [langs];
|
langs = [langs];
|
||||||
}
|
}
|
||||||
|
@ -549,6 +550,7 @@ export class Html10n {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if(lang != l) continue;
|
if(lang != l) continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue