updated locales

This commit is contained in:
Андрей Бабушкин 2025-03-06 15:16:17 +01:00
parent 97d4c672a7
commit adfa1ac519
27 changed files with 937 additions and 2353 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,126 +1 @@
(Prism.languages.javascript = Prism.languages.extend('clike', {
'class-name': [
Prism.languages.clike['class-name'],
{
pattern:
/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
lookbehind: !0,
},
],
keyword: [
{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 },
{
pattern:
/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
lookbehind: !0,
},
],
function:
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
number: {
pattern: RegExp(
'(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])',
),
lookbehind: !0,
},
operator:
/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,
})),
(Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/),
Prism.languages.insertBefore('javascript', 'keyword', {
regex: {
pattern: RegExp(
'((?:^|[^$\\w\\xA0-\\uFFFF."\'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))',
),
lookbehind: !0,
greedy: !0,
inside: {
'regex-source': {
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
lookbehind: !0,
alias: 'language-regex',
inside: Prism.languages.regex,
},
'regex-delimiter': /^\/|\/$/,
'regex-flags': /^[a-z]+$/,
},
},
'function-variable': {
pattern:
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
alias: 'function',
},
parameter: [
{
pattern:
/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
lookbehind: !0,
inside: Prism.languages.javascript,
},
{
pattern:
/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
lookbehind: !0,
inside: Prism.languages.javascript,
},
{
pattern:
/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
lookbehind: !0,
inside: Prism.languages.javascript,
},
{
pattern:
/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
lookbehind: !0,
inside: Prism.languages.javascript,
},
],
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/,
}),
Prism.languages.insertBefore('javascript', 'string', {
hashbang: { pattern: /^#!.*/, greedy: !0, alias: 'comment' },
'template-string': {
pattern:
/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
greedy: !0,
inside: {
'template-punctuation': { pattern: /^`|`$/, alias: 'string' },
interpolation: {
pattern:
/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
lookbehind: !0,
inside: {
'interpolation-punctuation': {
pattern: /^\$\{|\}$/,
alias: 'punctuation',
},
rest: Prism.languages.javascript,
},
},
string: /[\s\S]+/,
},
},
'string-property': {
pattern:
/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
lookbehind: !0,
greedy: !0,
alias: 'property',
},
}),
Prism.languages.insertBefore('javascript', 'operator', {
'literal-property': {
pattern:
/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
lookbehind: !0,
alias: 'property',
},
}),
Prism.languages.markup
&& (Prism.languages.markup.tag.addInlined('script', 'javascript'),
Prism.languages.markup.tag.addAttribute(
'on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)',
'javascript',
)),
(Prism.languages.js = Prism.languages.javascript);
Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;

View file

@ -1,95 +1 @@
!(function (t) {
const n = t.util.clone(t.languages.javascript);
let e = '(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})';
function a(t, n) {
return (
(t = t
.replace(/<S>/g, () => '(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)')
.replace(/<BRACES>/g, () => '(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})')
.replace(/<SPREAD>/g, () => e)),
RegExp(t, n)
);
}
(e = a(e).source),
(t.languages.jsx = t.languages.extend('markup', n)),
(t.languages.jsx.tag.pattern = a(
'</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[^]|[^\\\\"])*"|\'(?:\\\\[^]|[^\\\\\'])*\'|[^\\s{\'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>',
)),
(t.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/),
(t.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/),
(t.languages.jsx.tag.inside.tag.inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/),
(t.languages.jsx.tag.inside.comment = n.comment),
t.languages.insertBefore(
'inside',
'attr-name',
{ spread: { pattern: a('<SPREAD>'), inside: t.languages.jsx } },
t.languages.jsx.tag,
),
t.languages.insertBefore(
'inside',
'special-attr',
{
script: {
pattern: a('=<BRACES>'),
alias: 'language-javascript',
inside: {
'script-punctuation': { pattern: /^=(?=\{)/, alias: 'punctuation' },
rest: t.languages.jsx,
},
},
},
t.languages.jsx.tag,
);
const s = function (t) {
return t
? typeof t === 'string'
? t
: typeof t.content === 'string'
? t.content
: t.content.map(s).join('')
: '';
};
const g = function (n) {
for (let e = [], a = 0; a < n.length; a++) {
const o = n[a];
let i = !1;
if (
(typeof o !== 'string'
&& (o.type === 'tag' && o.content[0] && o.content[0].type === 'tag'
? o.content[0].content[0].content === '</'
? e.length > 0
&& e[e.length - 1].tagName === s(o.content[0].content[1])
&& e.pop()
: o.content[o.content.length - 1].content === '/>'
|| e.push({
tagName: s(o.content[0].content[1]),
openedBraces: 0,
})
: e.length > 0 && o.type === 'punctuation' && o.content === '{'
? e[e.length - 1].openedBraces++
: e.length > 0
&& e[e.length - 1].openedBraces > 0
&& o.type === 'punctuation'
&& o.content === '}'
? e[e.length - 1].openedBraces--
: (i = !0)),
(i || typeof o === 'string')
&& e.length > 0
&& e[e.length - 1].openedBraces === 0)
) {
let r = s(o);
a < n.length - 1
&& (typeof n[a + 1] === 'string' || n[a + 1].type === 'plain-text')
&& ((r += s(n[a + 1])), n.splice(a + 1, 1)),
a > 0
&& (typeof n[a - 1] === 'string' || n[a - 1].type === 'plain-text')
&& ((r = s(n[a - 1]) + r), n.splice(a - 1, 1), a--),
(n[a] = new t.Token('plain-text', r, null, r));
}
o.content && typeof o.content !== 'string' && g(o.content);
}
};
t.hooks.add('after-tokenize', (t) => {
(t.language !== 'jsx' && t.language !== 'tsx') || g(t.tokens);
});
}(Prism));
!function(t){var n=t.util.clone(t.languages.javascript),e="(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";function a(t,n){return t=t.replace(/<S>/g,(function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"})).replace(/<BRACES>/g,(function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"})).replace(/<SPREAD>/g,(function(){return e})),RegExp(t,n)}e=a(e).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=a("</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>"),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:a("<SPREAD>"),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a("=<BRACES>"),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var s=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(s).join(""):""},g=function(n){for(var e=[],a=0;a<n.length;a++){var o=n[a],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?e.length>0&&e[e.length-1].tagName===s(o.content[0].content[1])&&e.pop():"/>"===o.content[o.content.length-1].content||e.push({tagName:s(o.content[0].content[1]),openedBraces:0}):e.length>0&&"punctuation"===o.type&&"{"===o.content?e[e.length-1].openedBraces++:e.length>0&&e[e.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?e[e.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&e.length>0&&0===e[e.length-1].openedBraces){var r=s(o);a<n.length-1&&("string"==typeof n[a+1]||"plain-text"===n[a+1].type)&&(r+=s(n[a+1]),n.splice(a+1,1)),a>0&&("string"==typeof n[a-1]||"plain-text"===n[a-1].type)&&(r=s(n[a-1])+r,n.splice(a-1,1),a--),n[a]=new t.Token("plain-text",r,null,r)}o.content&&"string"!=typeof o.content&&g(o.content)}};t.hooks.add("after-tokenize",(function(t){"jsx"!==t.language&&"tsx"!==t.language||g(t.tokens)}))}(Prism);

View file

@ -1,66 +1 @@
!(function (n) {
(n.languages.kotlin = n.languages.extend('clike', {
keyword: {
pattern:
/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
lookbehind: !0,
},
function: [
{ pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/, greedy: !0 },
{
pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,
lookbehind: !0,
greedy: !0,
},
],
number:
/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
operator:
/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/,
})),
delete n.languages.kotlin['class-name'];
const e = {
'interpolation-punctuation': {
pattern: /^\$\{?|\}$/,
alias: 'punctuation',
},
expression: { pattern: /[\s\S]+/, inside: n.languages.kotlin },
};
n.languages.insertBefore('kotlin', 'string', {
'string-literal': [
{
pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,
alias: 'multiline',
inside: {
interpolation: { pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i, inside: e },
string: /[\s\S]+/,
},
},
{
pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,
alias: 'singleline',
inside: {
interpolation: {
pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,
lookbehind: !0,
inside: e,
},
string: /[\s\S]+/,
},
},
],
char: { pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/, greedy: !0 },
}),
delete n.languages.kotlin.string,
n.languages.insertBefore('kotlin', 'keyword', {
annotation: {
pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
alias: 'builtin',
},
}),
n.languages.insertBefore('kotlin', 'function', {
label: { pattern: /\b\w+@|@\w+\b/, alias: 'symbol' },
}),
(n.languages.kt = n.languages.kotlin),
(n.languages.kts = n.languages.kotlin);
}(Prism));
!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism);

View file

@ -1,96 +1 @@
(Prism.languages.swift = {
comment: {
pattern:
/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
lookbehind: !0,
greedy: !0,
},
'string-literal': [
{
pattern: RegExp(
'(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])',
),
lookbehind: !0,
greedy: !0,
inside: {
interpolation: {
pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/,
lookbehind: !0,
inside: null,
},
'interpolation-punctuation': {
pattern: /^\)|\\\($/,
alias: 'punctuation',
},
punctuation: /\\(?=[\r\n])/,
string: /[\s\S]+/,
},
},
{
pattern: RegExp(
'(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2',
),
lookbehind: !0,
greedy: !0,
inside: {
interpolation: {
pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,
lookbehind: !0,
inside: null,
},
'interpolation-punctuation': {
pattern: /^\)|\\#+\($/,
alias: 'punctuation',
},
string: /[\s\S]+/,
},
},
],
directive: {
pattern: RegExp(
'#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)',
),
alias: 'property',
inside: {
'directive-name': /^#\w+/,
boolean: /\b(?:false|true)\b/,
number: /\b\d+(?:\.\d+)*\b/,
operator: /!|&&|\|\||[<>]=?/,
punctuation: /[(),]/,
},
},
literal: {
pattern:
/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,
alias: 'constant',
},
'other-directive': { pattern: /#\w+\b/, alias: 'property' },
attribute: { pattern: /@\w+/, alias: 'atrule' },
'function-definition': {
pattern: /(\bfunc\s+)\w+/,
lookbehind: !0,
alias: 'function',
},
label: {
pattern:
/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,
lookbehind: !0,
alias: 'important',
},
keyword:
/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
boolean: /\b(?:false|true)\b/,
nil: { pattern: /\bnil\b/, alias: 'constant' },
'short-argument': /\$\d+\b/,
omit: { pattern: /\b_\b/, alias: 'keyword' },
number:
/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
'class-name': /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,
function: /\b[a-z_]\w*(?=\s*\()/i,
constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,
punctuation: /[{}[\]();,.:\\]/,
}),
Prism.languages.swift['string-literal'].forEach((e) => {
e.inside.interpolation.inside = Prism.languages.swift;
});
Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));

View file

@ -1,42 +1 @@
!(function (e) {
(e.languages.typescript = e.languages.extend('javascript', {
'class-name': {
pattern:
/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
lookbehind: !0,
greedy: !0,
inside: null,
},
builtin:
/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/,
})),
e.languages.typescript.keyword.push(
/\b(?:abstract|declare|is|keyof|readonly|require)\b/,
/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
/\btype\b(?=\s*(?:[\{*]|$))/,
),
delete e.languages.typescript.parameter,
delete e.languages.typescript['literal-property'];
const s = e.languages.extend('typescript', {});
delete s['class-name'],
(e.languages.typescript['class-name'].inside = s),
e.languages.insertBefore('typescript', 'function', {
decorator: {
pattern: /@[$\w\xA0-\uFFFF]+/,
inside: {
at: { pattern: /^@/, alias: 'operator' },
function: /^[\s\S]+/,
},
},
'generic-function': {
pattern:
/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
greedy: !0,
inside: {
function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
generic: { pattern: /<[\s\S]+/, alias: 'class-name', inside: s },
},
},
}),
(e.languages.ts = e.languages.typescript);
}(Prism));
!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);

File diff suppressed because one or more lines are too long

View file

@ -6,14 +6,16 @@ import SelectDateRange from 'Shared/SelectDateRange/SelectDateRange';
import { observer } from 'mobx-react-lite';
import RecordingsList from './RecordingsList';
import RecordingsSearch from './RecordingsSearch';
import { useTranslation } from 'react-i18next';
function Recordings() {
const { t } = useTranslation();
const { recordingsStore, userStore } = useStore();
const userId = userStore.account.id;
const recordingsOwner = [
{ value: '0', label: 'All Videos' },
{ value: userId, label: 'My Videos' },
{ value: '0', label: t('All Videos') },
{ value: userId, label: t('My Videos') },
];
const onDateChange = (e: any) => {
@ -27,7 +29,7 @@ function Recordings() {
>
<div className="flex items-center mb-4 justify-between px-6">
<div className="flex items-baseline mr-3">
<PageTitle title="Training Videos" />
<PageTitle title={t('Training Videos')} />
</div>
<div className="ml-auto flex items-center gap-4">
<SelectDateRange

View file

@ -4,10 +4,12 @@ import { Input } from 'antd';
import { debounce } from 'App/utils';
import { useStore } from 'App/mstore';
import { observer } from 'mobx-react-lite';
import { useTranslation } from 'react-i18next';
let debounceUpdate: any = () => {};
function AlertsSearch() {
const { t } = useTranslation();
const { alertsStore } = useStore();
const [inputValue, setInputValue] = useState(alertsStore.alertsSearch);
@ -37,7 +39,7 @@ function AlertsSearch() {
allowClear
name="alertsSearch"
className="w-full"
placeholder="Filter by alert title"
placeholder={t('Filter by alert title')}
onChange={write}
/>
</div>

View file

@ -35,7 +35,7 @@ function AlertsView({ siteId }: IAlertsView) {
>
<div className="flex items-center mb-4 justify-between px-6">
<div className="flex items-baseline mr-3">
<PageTitle title="Alerts" />
<PageTitle title={t('Alerts')} />
</div>
<div className="ml-auto flex items-center">
<Link to={withSiteId(alertCreate(), siteId)}>

View file

@ -15,6 +15,7 @@ import BottomButtons from './AlertForm/BottomButtons';
import NotifyHooks from './AlertForm/NotifyHooks';
import AlertListItem from './AlertListItem';
import Condition from './AlertForm/Condition';
import { useTranslation } from 'react-i18next';
function Circle({ text }: { text: string }) {
return (
@ -68,6 +69,7 @@ interface IProps extends RouteComponentProps {
}
function NewAlert(props: IProps) {
const { t } = useTranslation();
const { alertsStore, settingsStore } = useStore();
const {
fetchTriggerOptions,
@ -122,18 +124,18 @@ function NewAlert(props: IProps) {
const onDelete = async (instance: Alert) => {
if (
await confirm({
header: 'Confirm',
confirmButton: 'Yes, delete',
confirmation: 'Are you sure you want to permanently delete this alert?',
header: t('Confirm'),
confirmButton: t('Yes, delete'),
confirmation: t('Are you sure you want to permanently delete this alert?'),
})
) {
remove(instance.alertId)
.then(() => {
props.history.push(withSiteId(alerts(), siteId));
toast.success('Alert deleted');
toast.success(t('Alert deleted'));
})
.catch(() => {
toast.error('Failed to delete an alert');
toast.error(t('Failed to delete an alert'));
});
}
};
@ -143,14 +145,14 @@ function NewAlert(props: IProps) {
save(instance)
.then(() => {
if (!wasUpdating) {
toast.success('New alert saved');
toast.success(t('New alert saved'));
props.history.push(withSiteId(alerts(), siteId));
} else {
toast.success('Alert updated');
toast.success(t('Alert updated'));
}
})
.catch(() => {
toast.error('Failed to create an alert');
toast.error(t('Failed to create an alert'));
});
};
@ -202,10 +204,10 @@ function NewAlert(props: IProps) {
<Breadcrumb
items={[
{
label: 'Alerts',
label: t('Alerts'),
to: withSiteId('/alerts', siteId),
},
{ label: (instance && instance.name) || 'Alert' },
{ label: (instance && instance.name) || t('Alert') },
]}
/>
<Form
@ -229,7 +231,7 @@ function NewAlert(props: IProps) {
<div className="px-6 pb-3 flex flex-col">
<Section
index="1"
title="Alert based on"
title={t('Alert based on')}
content={
<div className="">
<SegmentSelection
@ -241,15 +243,15 @@ function NewAlert(props: IProps) {
}
value={{ value: instance.detectionMethod }}
list={[
{ name: 'Threshold', value: 'threshold' },
{ name: 'Change', value: 'change' },
{ name: t('Threshold'), value: 'threshold' },
{ name: t('Change'), value: 'change' },
]}
/>
<div className="text-sm color-gray-medium">
{isThreshold &&
'Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.'}
t('Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.')}
{!isThreshold &&
'Eg. Alert me if % change of memory.avg is greater than 10% over the past 4 hours compared to the previous 4 hours.'}
t('Eg. Alert me if % change of memory.avg is greater than 10% over the past 4 hours compared to the previous 4 hours.')}
</div>
<div className="my-4" />
</div>
@ -257,7 +259,7 @@ function NewAlert(props: IProps) {
/>
<Section
index="2"
title="Condition"
title={t('Condition')}
content={
<Condition
isThreshold={isThreshold}
@ -273,8 +275,8 @@ function NewAlert(props: IProps) {
/>
<Section
index="3"
title="Notify Through"
description="You'll be noticed in app notifications. Additionally opt in to receive alerts on:"
title={t('Notify Through')}
description={t("You'll be noticed in app notifications. Additionally opt in to receive alerts on:")}
content={
<NotifyHooks
instance={instance}

View file

@ -3,10 +3,12 @@ import { observer } from 'mobx-react-lite';
import { useStore } from 'App/mstore';
import { debounce } from 'App/utils';
import { Input } from 'antd';
import { useTranslation } from 'react-i18next';
let debounceUpdate: any = () => {};
function DashboardSearch() {
const { t } = useTranslation();
const { dashboardStore } = useStore();
const [query, setQuery] = useState(dashboardStore.dashboardsSearch);
useEffect(() => {
@ -32,7 +34,7 @@ function DashboardSearch() {
allowClear
name="dashboardsSearch"
className="w-full btn-search-dashboard"
placeholder="Filter by dashboard title"
placeholder={t('Filter by dashboard title')}
onChange={write}
onSearch={(value) =>
dashboardStore.updateKey('filter', {

View file

@ -6,15 +6,17 @@ import CreateDashboardButton from 'Components/Dashboard/components/CreateDashboa
import { useStore } from 'App/mstore';
import { observer } from 'mobx-react-lite';
import DashboardSearch from './DashboardSearch';
import { useTranslation } from 'react-i18next';
function Header() {
const { t } = useTranslation();
const { dashboardStore } = useStore();
const dashboardsSearch = dashboardStore.filter.query;
const showSearch = dashboardStore.dashboards.length > 0 || dashboardsSearch;
return (
<div className="flex items-center justify-between px-4 pb-2">
<div className="flex items-baseline mr-3">
<PageTitle title="Dashboards" />
<PageTitle title={t('Dashboards')} />
</div>
{showSearch && (
<div className="ml-auto flex items-center">

View file

@ -4,9 +4,11 @@ import { useStore } from 'App/mstore';
import { Icon } from 'UI';
import { Input } from 'antd';
import { debounce } from 'App/utils';
import { useTranslation } from 'react-i18next';
let debounceUpdate: any = () => {};
function MetricsSearch() {
const { t } = useTranslation();
const { metricStore } = useStore();
const [query, setQuery] = useState(metricStore.filter.query);
useEffect(() => {
@ -32,7 +34,7 @@ function MetricsSearch() {
allowClear
name="metricsSearch"
className="w-full input-search-card"
placeholder="Filter by title or owner"
placeholder={t('Filter by title or owner')}
onChange={write}
/>
</div>

View file

@ -13,7 +13,7 @@ function FFlagsListHeader({ siteId }: { siteId: string }) {
return (
<div className="flex items-center justify-between px-6">
<div className="flex items-center mr-3 gap-2">
<PageTitle title="Feature Flags" />
<PageTitle title={t('Feature Flags')} />
</div>
<div className="ml-auto flex items-center">
<Button

View file

@ -33,7 +33,7 @@ tracker.reloadFlags()
`;
return (
<div className="w-full h-screen p-4">
<PageTitle title="Implement feature flags" />
<PageTitle title={t('Implement feature flags')} />
<div className="my-2">
<CodeBlock code={code} language="typescript" />

View file

@ -74,8 +74,8 @@ function HealthWidget({
</div>
<div className="text-secondary flex w-full justify-between items-center text-sm">
<span className="color-gray-medium">
{t('Checked')}
{lastAskedDiff}
{t('Checked')}&nbsp;
{lastAskedDiff}&nbsp;
{t('min ago.')}
</span>
<div

View file

@ -92,7 +92,7 @@ function DateRangePopup(props: any) {
)
.map((value) => (
<div key={value} onClick={() => selectValue(value)}>
{t(getDateRangeLabel(value))}
{getDateRangeLabel(value, t)}
</div>
))}
</div>

View file

@ -22,7 +22,7 @@ function SessionDateRange() {
return (
<div className="flex items-center">
<span className="mr-1">
{t('No sessions')}
{t('No sessions')}&nbsp;
{isCustom ? t('between') : t('in the')}
</span>
<SelectDateRange

View file

@ -1,6 +1,7 @@
import React from 'react';
import { Segmented } from 'antd';
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
import { useTranslation } from 'react-i18next';
interface Props {
sortOrder: string;
@ -8,6 +9,7 @@ interface Props {
}
export default React.memo((props: Props) => {
const { t } = useTranslation();
const { sortOrder, onChange = () => null } = props;
const isAscending = sortOrder === 'asc';
@ -16,8 +18,8 @@ export default React.memo((props: Props) => {
<Segmented
size="small"
options={[
{ label: 'Ascending', value: 'asc', icon: <ArrowUpOutlined /> },
{ label: 'Descending', value: 'desc', icon: <ArrowDownOutlined /> },
{ label: t('Ascending'), value: 'asc', icon: <ArrowUpOutlined /> },
{ label: t('Descending'), value: 'desc', icon: <ArrowDownOutlined /> },
]}
defaultValue={sortOrder}
onChange={onChange}

View file

@ -1426,5 +1426,18 @@
"Roles & Access": "Roles & Access",
"Audit": "Audit",
"Billing": "Billing",
"Play In Fullscreen": "Play In Fullscreen"
"Play In Fullscreen": "Play In Fullscreen",
"Ascending": "Ascending",
"Descending": "Descending",
"Implement feature flags": "Implement feature flags",
"Filter by dashboard title": "Filter by dashboard title",
"Filter by alert title": "Filter by alert title",
"Are you sure you want to permanently delete this alert?": "Are you sure you want to permanently delete this alert?",
"Alert deleted": "Alert deleted",
"Failed to delete an alert": "Failed to delete an alert",
"New alert saved": "New alert saved",
"Alert updated": "Alert updated",
"Failed to create an alert": "Failed to create an alert",
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.",
"Alert based on": "Alert based on"
}

View file

@ -1426,5 +1426,18 @@
"Roles & Access": "Roles y Accesos",
"Audit": "Auditoría",
"Billing": "Facturación",
"Play In Fullscreen": "Reproducir en Pantalla Completa"
"Play In Fullscreen": "Reproducir en Pantalla Completa",
"Ascending": "Ascendente",
"Descending": "Descendente",
"Implement feature flags": "Implementar flags de características",
"Filter by dashboard title": "Filtrar por título del panel",
"Filter by alert title": "Filtrar por título de la alerta",
"Are you sure you want to permanently delete this alert?": "¿Estás seguro de que quieres eliminar esta alerta de forma permanente?",
"Alert deleted": "Alerta eliminada",
"Failed to delete an alert": "Error al eliminar la alerta",
"New alert saved": "Nueva alerta guardada",
"Alert updated": "Alerta actualizada",
"Failed to create an alert": "Error al crear la alerta",
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Ej. Cuando el umbral supere 1ms en los últimos 15 minutos, notifícame a través de Slack #foss-notifications.",
"Alert based on": "Alerta basada en"
}

View file

@ -226,7 +226,7 @@
"This plugin allows you to capture GraphQL requests and inspect them later on while replaying session recordings. This is very useful for understanding and fixing issues.": "Ce plugin permet de capturer les requêtes GraphQL et de les inspecter lors de la relecture des sessions. Très utile pour comprendre et corriger les problèmes.",
"GraphQL plugin is compatible with Apollo and Relay implementations.": "Le plugin GraphQL est compatible avec Apollo et Relay.",
"The plugin call will return the function, which receives four variables operationKind, operationName, variables and result. It returns result without changes.": "L'appel au plugin renverra une fonction qui reçoit quatre variables : operationKind, operationName, variables et result. Il renvoie result tel quel.",
"This plugin allows you to capture MobX events and inspect them later on while replaying session recordings. This is very useful for understanding and fixing issues.": "Ce plugin permet de capturer les événements MobX et de les inspecter lors de la relecture des sessions. Très utile pour comprendre et corriger les problèmes.",
"This plugin allows you to capture MobX events and inspect them later on while replaying session recordings. This is very useful for understanding and fixing issues.": "Ce plugin permet de capturer les évènements MobX et de les inspecter lors de la relecture des sessions. Très utile pour comprendre et corriger les problèmes.",
"Initialize the @openreplay/tracker package as usual and load the plugin into it. Then put the generated middleware into your Redux chain.": "Initialisez le package @openreplay/tracker comme d'habitude et chargez-y le plugin. Ensuite, ajoutez le middleware généré à votre chaîne Redux.",
"Integrate MobX": "Intégrer MobX",
"This plugin allows you to capture NgRx actions/state and inspect them later on while replaying session recordings. This is very useful for understanding and fixing issues.": "Ce plugin permet de capturer les actions/états NgRx et de les inspecter lors de la relecture des sessions. Très utile pour comprendre et corriger les problèmes.",
@ -650,14 +650,14 @@
"Filter by": "Filtrer par",
"Chart Series": "Série de graphiques",
"ADD": "AJOUTER",
"Cannot save funnel metric without at least 2 events": "Impossible d'enregistrer la métrique d'entonnoir sans au moins 2 événements",
"Cannot save funnel metric without at least 2 events": "Impossible d'enregistrer la métrique d'entonnoir sans au moins 2 évènements",
"Create & Add to Dashboard": "Créer & ajouter au tableau de bord",
"Undo": "Annuler",
"Maximum of 3 series reached.": "Maximum de 3 séries atteint.",
"Add Series": "Ajouter une série",
"Expand": "Développer",
"Collapse": "Réduire",
"Custom Events": "Événements personnalisés",
"Custom Events": "Évènements personnalisés",
"Journeys With": "Parcours avec",
"Start Point": "Point de départ",
"End Point": "Point de fin",
@ -696,8 +696,8 @@
"No flag found": "Aucun drapeau trouvé",
"Edit": "Modifier",
"Persistence": "Persistance",
"This flag maintains its state through successive authentication events.": "Ce drapeau maintient son état à travers les événements d'authentification successifs.",
"This flag is not persistent across authentication events.": "Ce drapeau n'est pas persistant à travers les événements d'authentification.",
"This flag maintains its state through successive authentication events.": "Ce drapeau maintient son état à travers les évènements d'authentification successifs.",
"This flag is not persistent across authentication events.": "Ce drapeau n'est pas persistant à travers les évènements d'authentification.",
"Rollout Conditions": "Conditions de déploiement",
"Description": "Description",
"Optional": "Optionnel",
@ -780,7 +780,7 @@
"min ago.": "min. avant.",
"Error getting service health status": "Erreur lors de l'obtention du statut de santé du service",
"Captured": "Capturé",
"Events": "Événements",
"Events": "Évènements",
"Observed installation Issue with the following": "Problème d'installation observé avec les éléments suivants",
"Version": "Version",
"Error log:": "Journal des erreurs :",
@ -834,7 +834,7 @@
"Configuration": "Configuration",
"By default, all options equals": "Par défaut, toutes les options sont égales à",
"true": "true",
"Set up touch events listener": "Configurer l'écoute des événements tactiles",
"Set up touch events listener": "Configurer l'écoute des évènements tactiles",
"Hide sensitive views": "Masquer les vues sensibles",
"Track inputs": "Suivre les saisies",
"Install the npm package.": "Installer le package npm.",
@ -900,7 +900,7 @@
"Launch Network": "Afficher le réseau",
"Network": "Réseau",
"Exceptions": "Exceptions",
"Launch Events": "Afficher les événements",
"Launch Events": "Afficher les évènements",
"Launch Performance": "Afficher les performances",
"Performance": "Performances",
"Audio Track Synchronization": "Synchronisation de la piste audio",
@ -999,14 +999,14 @@
"Select a debug option to visualize on timeline.": "Sélectionnez une option de débogage à visualiser sur la chronologie.",
"None captured.": "Aucune capture.",
"Network requests with issues in this session": "Requêtes réseau avec des problèmes dans cette session",
"Visualizes the events that takes place in the DOM": "Visualise les événements qui se produisent dans le DOM",
"Visualizes the events that takes place in the DOM": "Visualise les évènements qui se produisent dans le DOM",
"Visualizes native errors like Type, URI, Syntax etc.": "Visualise les erreurs natives comme Type, URI, Syntaxe, etc.",
"Summary of this sessions memory, and CPU consumption on the timeline": "Résumé de la mémoire et de la consommation CPU de cette session sur la chronologie",
"Indicates user frustrations in the session": "Indique les frustrations des utilisateurs pendant la session",
"Performance Overview": "Aperçu des performances",
"User Frustrations": "Frustrations utilisateur",
"Session Errors": "Erreurs de session",
"Network Events": "Événements réseau",
"Network Events": "Évènements réseau",
"All Features": "Toutes les fonctionnalités",
"Hide / Show": "Masquer / Afficher",
"Multi-tab performance overview is not available.": "L'aperçu des performances multi-onglets n'est pas disponible.",
@ -1071,7 +1071,7 @@
"Session added to your bookmarks": "Session ajoutée à vos favoris",
"Session removed from vault": "Session supprimée du coffre",
"Session removed from your bookmarks": "Session supprimée de vos favoris",
"Export Events": "Exporter les événements",
"Export Events": "Exporter les évènements",
"Share Session": "Partager la session",
"Vault": "Coffre",
"Bookmark": "Favori",
@ -1230,7 +1230,7 @@
"Result": "Résultat",
"Filter by name": "Filtrer par nom",
"Stack Event": "Événement de pile",
"Stack Events": "Événements de pile",
"Stack Events": "Évènements de pile",
"empty": "vide",
"Verification email sent to": "E-mail de vérification envoyé à",
"We've sent a verification email to": "Nous avons envoyé un e-mail de vérification à",
@ -1247,7 +1247,7 @@
"SELECT FILTER": "SÉLECTIONNER UN FILTRE",
"THEN": "ALORS",
"AND": "ET",
"Events Order": "Ordre des événements",
"Events Order": "Ordre des évènements",
"Filters": "Filtres",
"No Metadata Available": "Aucune métadonnée disponible",
"Identify sessions & data easily by linking user-specific metadata.": "Identifiez facilement les sessions et les données en associant des métadonnées spécifiques à l'utilisateur.",
@ -1353,8 +1353,8 @@
"No sessions found in vault": "Aucune session trouvée dans le coffre",
"Extend the retention period of any session by adding it to your vault directly from the player screen.": "Prolongez la période de rétention de toute session en lajoutant directement à votre coffre depuis lécran de lecture.",
"Effortlessly find important sessions by bookmarking them directly from the player screen.": "Trouvez facilement les sessions importantes en les ajoutant aux favoris directement depuis lécran de lecture.",
"Events Ascending": "Événements croissants",
"Events Descending": "Événements décroissants",
"Events Ascending": "Évènements croissants",
"Events Descending": "Évènements décroissants",
"Copy URL at Current Time": "Copier lURL au moment actuel",
"Share via": "Partager via",
"Select a channel or individual": "Sélectionner un canal ou une personne",
@ -1389,7 +1389,7 @@
"Retention": "Rétention",
"Add from Library": "Ajouter depuis la bibliothèque",
"Select an existing card from your library": "Sélectionnez une carte existante de votre bibliothèque",
"Combine captured events and filters to track trends over time.": "Combinez les événements capturés et les filtres pour suivre les tendances au fil du temps.",
"Combine captured events and filters to track trends over time.": "Combinez les évènements capturés et les filtres pour suivre les tendances au fil du temps.",
"See where users click and where they get frustrated.": "Voyez où les utilisateurs cliquent et où ils rencontrent des frustrations.",
"Visited URL": "URL visitée",
"Find out where users are dropping and understand why.": "Découvrez où les utilisateurs abandonnent et comprenez pourquoi.",
@ -1426,5 +1426,18 @@
"Roles & Access": "Rôles & Accès",
"Audit": "Audit",
"Billing": "Facturation",
"Play In Fullscreen": "Lire en plein écran"
}
"Play In Fullscreen": "Lire en plein écran",
"Ascending": "Croissants",
"Descending": "Décroissants",
"Implement feature flags": "Implémenter des drapeaux de fonctionnalités",
"Filter by dashboard title": "Filtrer par titre de tableau de bord",
"Filter by alert title": "Filtrer par titre d'alerte",
"Are you sure you want to permanently delete this alert?": "Êtes-vous sûr de vouloir supprimer cette alerte de façon permanente ?",
"Alert deleted": "Alerte supprimée",
"Failed to delete an alert": "Échec de la suppression de l'alerte",
"New alert saved": "Nouvelle alerte enregistrée",
"Alert updated": "Alerte mise à jour",
"Failed to create an alert": "Échec de la création de l'alerte",
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "Ex. Lorsque le seuil dépasse 1ms au cours des 15 dernières minutes, notifiez-moi via Slack #foss-notifications.",
"Alert based on": "Alerte basée sur"
}

File diff suppressed because it is too large Load diff

View file

@ -1426,5 +1426,18 @@
"Roles & Access": "角色与权限",
"Audit": "审计",
"Billing": "账单",
"Play In Fullscreen": "全屏播放"
"Play In Fullscreen": "全屏播放",
"Ascending": "升序",
"Descending": "降序",
"Implement feature flags": "实施功能标志",
"Filter by dashboard title": "按仪表板标题筛选",
"Filter by alert title": "按警报标题筛选",
"Are you sure you want to permanently delete this alert?": "您确定要永久删除此警报吗?",
"Alert deleted": "警报已删除",
"Failed to delete an alert": "删除警报失败",
"New alert saved": "新警报已保存",
"Alert updated": "警报已更新",
"Failed to create an alert": "创建警报失败",
"Eg. When Threshold is above 1ms over the past 15mins, notify me through Slack #foss-notifications.": "例如当过去15分钟内阈值超过1毫秒时通过Slack #foss-notifications通知我。",
"Alert based on": "警报依据"
}

View file

@ -1,3 +1,4 @@
import i18next, { TFunction } from 'i18next';
import Record from 'Types/Record';
export const types = {
@ -114,7 +115,7 @@ export interface IIssue {
messageId: number;
}
export default class Issue {
class Issue {
issueId: IIssue['issueId'];
name: IIssue['name'];
@ -150,3 +151,5 @@ export default class Issue {
});
}
}
export default Issue;

View file

@ -26,6 +26,7 @@ export default [
'**/*.test.tsx',
'**/*.test.js',
'**/__tests__/**',
'**/*.min.js'
],
languageOptions: {
parser: tsParser,