const textMap = {
'Copy link': 'Копировать ссылку',
'Line tool': 'Линия',
'Line': 'Линия',
'Lock/Unlock': 'Заблокировать/Разблокировать',
'Use as mask': 'Использовать как маску',
}
(function(e,i,t){e.exports={diffThumbnailWidth:"224px",diffThumbnailHeight:"160px",diffThumbnailPadding:"20px"}}),
var el1 = document.querySelector('[for="frame-mask-disabled-checkbox"]');
el1.setAttribute("style", "width: 150px;line-height: 15px;");
var el2 = document.querySelector('[class^="toolbar_view--shareButton--"]');
el2.setAttribute("style", "width: 90px;");
var el3 = document.querySelectorAll('[class^="raw_components--panelTitle--"]');
el3[0].setAttribute("style", "text-transform: none;");
el3[1].setAttribute("style", "text-transform: none;");
el3[2].setAttribute("style", "text-transform: none;");
const allData = [
[` autosave `, ` Автосохранение`],
[` Copy link`, ` Копировать ссылку`],
[` device.`, ` Загрузить Figma Mirror Figma Mirror на устройство.`],
[` follower`, ` Подписчики`],
[` following`, ` Подписаться`],
]
let MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
let MutationObserverConfig = {
childList: true,
subtree: true,
attributeFilter: ['data-label'],
characterData: true
};
let observer = new MutationObserver(function (mutations) {
let treeWalker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_ALL,
{
acceptNode: function (node) {
if(node.nodeType === 3 || node.hasAttribute('data-label')) {
return NodeFilter.FILTER_ACCEPT;
}else {
return NodeFilter.FILTER_SKIP;
}
}
},
false
);
let dataMap = new Map();
allData.forEach(([key, val]) => {
if (key && !dataMap.has(key)) {
dataMap.set(key, val);
}
});
let currentNode = treeWalker.currentNode;
while (currentNode) {
if(currentNode.nodeType === 3) {
let key1 = currentNode.textContent;
if (dataMap.has(key1)) currentNode.textContent = dataMap.get(key1);
}else {
let key2 = currentNode.getAttribute('data-label');
if (dataMap.has(key2)) currentNode.setAttribute('data-label', dataMap.get(key2));
}
currentNode = treeWalker.nextNode();
}
});
observer.observe(document.body, MutationObserverConfig);
const allData = [
[` autosave `, ` Автосохранение`],
[` Copy link`, ` Копировать ссылку`],
[` device.`, ` Загрузить Figma Mirror Figma Mirror на устройство.`],
[` follower`, ` Подписчики`],
[` following`, ` Подписаться`],
]
let MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
let MutationObserverConfig = {
childList: true,
subtree: true,
attributeFilter: ['data-label'],
characterData: true
};
let observer = new MutationObserver(function (mutations) {
let treeWalker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_ALL,
{
acceptNode: function (node) {
if(node.nodeType === 3 || node.hasAttribute('data-label')) {
return NodeFilter.FILTER_ACCEPT;
}else {
return NodeFilter.FILTER_SKIP;
}
}
},
false
);
let dataMap = new Map();
allData.forEach(([key, val]) => {
if (key && !dataMap.has(key)) {
dataMap.set(key, val);
}
});
let currentNode = treeWalker.currentNode;
while (currentNode) {
if(currentNode.nodeType === 3) {
let key1 = currentNode.textContent;
if (dataMap.has(key1)) currentNode.textContent = dataMap.get(key1);
}else {
let key2 = currentNode.getAttribute('data-label');
if (dataMap.has(key2)) currentNode.setAttribute('data-label', dataMap.get(key2));
}
currentNode = treeWalker.nextNode();
}
});
observer.observe(document.body, MutationObserverConfig);
const style = [
[`'label[class^="raw_components--labelInactive--"]', `"style", "width: 150px;line-height: 15px;"`],
function translate() {
document.querySelector('[for="frame-mask-disabled-checkbox"]').setAttribute("style", "width: 150px;line-height: 15px;");
document.querySelector('[for="frame-mask-disabled-checkbox"]').textContent = "Скрыть элементы за границами фрейма";
document.querySelector('label[class^="raw_components--labelInactive--"]').textContent = "Выберите фрейм или объект потяните за край и соедините с другим фреймом или обектом";
};
setInterval(translate, 1000);
document.querySelector('[for="frame-mask-disabled-checkbox"]').textContent = "Скрыть элементы за границами фрейма";
<label class="raw_components--labelInactive--2GwUQ raw_components--label--34YmO raw_components--base--3TpZG hint_panel--onboardingLabel--1MiWh text--fontPos11--RSei3 text--_fontBase--YWDo0">Select a frame or object in a frame and use the circular node to drag a connection to another frame. </label>
(function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=s(2,1 ),n=s(142 ),i=s(1 ),r=s(179 ),a=s(218 ),l=s(374 ),p=s(354 ),d=s(377 ),c=s(2825 ),h=s(2826 ),u=s(140 ),m=s(188 ),g=p.dropdown.Dropdown,k=p.dropdown.Option,w=p.dropdown.Separator,_=s(2827 ),f=i.initialOptions();class v extends o.PureComponent{constructor(e){super(e),this.rootRef=o.createRef(),this.zendeskRef=o.createRef(),this.onKeyDown=(e=>{switch(e.keyCode){case r.Key.FORWARD_SLASH:e.ctrlKey&&e.shiftKey&&(e.preventDefault(),e.stopPropagation())}}),this.documentMouseUp=(e=>{var t,s;this.state.dropDownOpen&&!(null===(t=this.rootRef.current)||void 0===t?void 0:t.contains(e.target))&&this.setState({dropDownOpen:!1}),null===(s=this.zendeskRef.current)||void 0===s||s.close()}),this.logEvent=(e=>{n.segmentTrackEvent(e,{isEditingFile:this.props.isEditingFile,source:"help-widget-button"})}),this.onClickHelp=(()=>{this.setState({dropDownOpen:!1}),this.logEvent("help_widget_help")}),this.onClickKeyboardShortcuts=(()=>{this.setState({dropDownOpen:!1}),a.fullscreen.isReady()&&a.fullscreen.triggerAction("toggle-keyboard-shortcuts"),this.logEvent("showing_keyboard_shortcuts_modal")}),this.onClickSpectrum=(()=>{this.setState({dropDownOpen:!1}),this.logEvent("help_widget_spectrum")}),this.onClickTutorials=(()=>{this.setState({dropDownOpen:!1}),this.logEvent("help_widget_tutorials")}),this.onClickReleases=(()=>{this.setState({dropDownOpen:!1}),this.logEvent("help_widget_releases")}),this.onClickGetHelp=(()=>{var e;this.setState({dropDownOpen:!1}),null===(e=this.zendeskRef.current)||void 0===e||e.open()}),this.onClickResetOnboarding=(()=>{f.user_data&&(this.setState({dropDownOpen:!1}),u.getResponsiveContentHandler().reset(f.user_data.id),this.logEvent("Reset Onboarding"))}),this.onClickQuestionMark=(()=>{this.setState({dropDownOpen:!this.state.dropDownOpen})}),this.state={dropDownOpen:!1}}componentDidMount(){document.addEventListener("mouseup",this.documentMouseUp),document.addEventListener("keydown",this.onKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("mouseup",this.documentMouseUp)}componentDidUpdate(e,t){var s;e.hide!=this.props.hide&&this.props.hide&&(null===(s=this.zendeskRef.current)||void 0===s||s.close())}render(){const e=f.user_data&&!this.props.hide;return o.createElement("div",{className:e?h.helpWidget:h.helpWidgetHidden,ref:this.rootRef},o.createElement(m.SvgTracked,{svg:_,onClick:this.onClickQuestionMark,innerText:v.displayName}),o.createElement(c.ZendeskWebWidget,{ref:this.zendeskRef,dispatch:this.props.dispatch,userName:this.props.user&&this.props.user.name,userEmail:this.props.user&&this.props.user.email}),!this.state.dropDownOpen&&o.createElement("div",{className:h.tooltip},"Help and resources"),this.state.dropDownOpen&&o.createElement(g,{className:h.dropdown},o.createElement(k,{target:"_blank",href:"https://help.figma.com/",onClick:this.onClickHelp},"Help center"),a.fullscreen.isReady()&&o.createElement(k,{onClick:this.onClickKeyboardShortcuts},"Keyboard shortcuts",o.createElement(d.KeyboardShortcut,{shortcut:l.getKeyboardShortcut(this.props.keyboardShortcuts,"open-shortcuts"),className:h.shortcut})),o.createElement(k,{target:"_blank",href:"https://spectrum.chat/figma/",onClick:this.onClickSpectrum},"Community forum"),o.createElement(k,{target:"_blank",href:"https://www.youtube.com/figmadesign",onClick:this.onClickTutorials},"Video tutorials"),o.createElement(k,{onClick:this.onClickResetOnboarding},"Reset onboarding"),o.createElement(k,{target:"_blank",href:"https://releases.figma.com/",onClick:this.onClickReleases},"Release notes"),o.createElement(k,{target:"_blank",href:"/summary-of-policy"},"Legal summary"),o.createElement(o.Fragment,null,o.createElement(w,null),o.createElement(k,{id:"zendesk-button",onClick:this.onClickGetHelp},"Get help"))))}}t.HelpWidgetZendesk=v,v.displayName="HelpWidgetZendesk"}),
this.shortcutList={essential:{name:"Essential",columns:[[{shortcuts:[{shortcutKey:"toggle-ui",usage:"Press it now to quickly hide the panes and focus on your work"}]}],[{shortcuts:[{shortcutKey:"toggle-dropper",usage:"Grab a color from elsewhere without losing your flow"}]}],[{shortcuts:[{shortcutKey:"toggle-menu",usage:"Search through all of Figma’s commands"}]}]]},tools:{name:"Tools",columns:[[{shortcuts:[{shortcutKey:"set-tool-default",displayName:"set-tool-default-desc",icon:c.svgForTool(h.Tool.SELECT)},{shortcutKey:"set-tool-frame",displayName:"set-tool-frame-desc",icon:c.svgForTool(h.Tool.FRAME)},{shortcutKey:"set-tool-pen",displayName:"set-tool-pen-desc",icon:c.svgForTool(h.Tool.VECTOR_PEN)},{shortcutKey:"set-tool-pencil",displayName:"set-tool-pencil-desc",icon:c.svgForTool(h.Tool.VECTOR_PENCIL)}]}],[{shortcuts:[{shortcutKey:"set-tool-type",displayName:"set-tool-type-desc",icon:c.svgForTool(h.Tool.TYPE)},{shortcutKey:"set-tool-rectangle",displayName:"set-tool-rectangle-desc",icon:c.svgForTool(h.Tool.SHAPE_RECTANGLE)},{shortcutKey:"set-tool-ellipse",displayName:"set-tool-ellipse-desc",icon:c.svgForTool(h.Tool.SHAPE_ELLIPSE)},{shortcutKey:"set-tool-line",displayName:"set-tool-line-desc",icon:c.svgForTool(h.Tool.SHAPE_LINE)},{shortcutKey:"set-tool-arrow",displayName:"set-tool-arrow-desc",icon:c.svgForTool(h.Tool.SHAPE_ARROW)}]}],[{shortcuts:[{shortcutKey:"set-tool-comments",icon:c.svgForTool(h.Tool.COMMENTS)},{shortcutKey:"toggle-dropper",icon:s(2355 )},{shortcutKey:"set-tool-slice",displayName:"set-tool-slice-desc",icon:c.svgForTool(h.Tool.SLICE)}]}]]},view:{name:"View",columns:[[{shortcuts:[{shortcutKey:"toggle-ui"},{shortcutKey:"toggle-multiplayer-cursors"}]}],[{shortcuts:[{shortcutKey:"toggle-rulers"},{shortcutKey:"toggle-outlines"},{shortcutKey:"toggle-pixel-preview"},{shortcutKey:"toggle-shown-layout-grids"},{shortcutKey:"toggle-grid"}]}],[{shortcuts:[{shortcutKey:"toggle-layers"},{shortcutKey:"toggle-publish"},{shortcutKey:"show-design-panel"},{shortcutKey:"show-prototype-panel"},{shortcutKey:"show-code-panel"}]}]]},zoom:{name:"Zoom",columns:[[{shortcuts:[{shortcutKey:"pan"},{shortcutKey:"zoom-in"},{shortcutKey:"zoom-out"},{shortcutKey:"zoom-reset"}]}],[{shortcuts:[{shortcutKey:"zoom-to-fit"},{shortcutKey:"zoom-to-selection"},{shortcutKey:"previous-artboard"},{shortcutKey:"next-artboard"}]}],[{shortcuts:[{shortcutKey:"page-previous"},{shortcutKey:"page-next"},{shortcutKey:"previous-artboard-same-zoom"},{shortcutKey:"next-artboard-same-zoom"}]}]]},