mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
4.4 KiB
JavaScript
Executable File
2 lines
4.4 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[3522],{47872:(e,n,t)=>{t.d(n,{l:()=>h});var s=t(52542),a=t(97500),i=t.n(a);const l="x-toggle-wrapper",r="x-toggle-indicator",o="JCFCfOY_6UEZZSOO2xrl",c="x-toggle-indicatorWrapper",d="x-toggle-input";var u=t(86070),h=function(e){var n=e.value,t=e.disabled,a=e.onSelected,h=e.id,p=e.className,f=e.condensed,x=void 0!==f&&f,m=e.inputRef;return(0,u.jsxs)("label",{className:i()(l,p),children:[(0,u.jsx)("input",{id:h,className:d,type:"checkbox",disabled:t,checked:n,onChange:function(e){var n=e.target.checked;a(n)},ref:m}),(0,u.jsx)("span",{className:i()(c,(0,s.A)({},o,x)),children:(0,u.jsx)("span",{className:i()(r,(0,s.A)({},o,x))})})]})}},95823:(e,n,t)=>{t.r(n),t.d(n,{default:()=>A});var s=t(62822),a=t(12341),i=t(93091),l=t.n(i),r=(t(79024),t(25550),t(65050),t(8674),t(5672),t(43379),t(51234),t(97460),t(15342),t(93577),t(30758)),o=t(15985),c=t(92107),d=t(2477),u=t(13534),h=t(47872);const p="SsxBZ9Nwxg30ZcXUcUcJ",f="HVN1FVVriodEnWgn1GZ4",x="legiK6gOuEtSJvxYKoXc",m="N6dpLHX_oZBYC1FQy8SA",j="krXyPxbq59r39DlZdHzv",v="_o0S4kMO8jLyHmiTwjxg",y="yuK7YlDkSnTHzZph5sQq";var g=t(86070);function b(){var e=(0,r.useState)(d.Ay.isEnabled()),n=(0,a.A)(e,2),t=n[0],s=n[1];return(0,g.jsxs)("div",{children:[" ",(0,g.jsx)(u.E,{as:"h4",variant:"titleSmall",semanticColor:"textBase",children:"Pseudo localization"}),(0,g.jsxs)("div",{children:[(0,g.jsxs)(u.E,{variant:"bodyMedium",children:["Perform"," ",(0,g.jsx)("a",{href:"https://en.wikipedia.org/wiki/Pseudolocalization",children:"pseudolocalization"})," ","against the DOM.",(0,g.jsx)("br",{})]}),(0,g.jsx)(u.E,{variant:"bodySmall",children:"In Accented English all Latin letters are replaced by accented Unicode counterparts which don't impair the readability of the content. This allows developers to quickly test if any given string is being correctly displayed in its 'translated' form. Additionally, simple heuristics are used to make certain words longer to better simulate the experience of international users."})]}),(0,g.jsx)("br",{}),(0,g.jsxs)("div",{className:y,children:[(0,g.jsx)(u.E,{as:"label",htmlFor:"pseudo-localization",variant:"bodyMedium",children:"Toggle pseudo-localization"}),(0,g.jsx)(h.l,{id:"pseudo-localization",value:t,onSelected:function(e){e?(s(!0),d.Ay.start()):(s(!1),d.Ay.stop(),window.location.reload())}})]})]})}var k=t(88581),w=t(31609),N=t(80384),S=t(35322);const A=function(){var e=(0,w.t0)().settings,n=(0,k.Q)(e.values),t=(0,r.useMemo)((function(){return{localeForTranslation:c.Ru.getLocaleForTranslation(),localeForFormatting:c.Ru.getLocaleForTranslation(),translations:c.Ru.getTranslations()}}),[]),i=(0,r.useState)(null),d=(0,a.A)(i,2),u=d[0],h=d[1];(0,r.useEffect)((function(){var e={};return Promise.all(Object.keys(S.IB).map(function(){var n=(0,s.A)(l().mark((function n(t){return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,N.N)(t);case 2:e[t]=n.sent;case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())).then((function(){h(e)})),function(){c.Ru.initialize(t)}}),[t]);var y=(0,r.useState)(null),A=(0,a.A)(y,2),F=A[0],T=A[1],E=c.Ru.get.bind(c.Ru);return n?(0,g.jsxs)("div",{className:p,children:[(0,g.jsx)("h1",{className:f,children:"Locales"}),(0,g.jsx)("h3",{children:"You can use this tool to test if the Desktop client is able to properly render every locale with correct font-family within Desktop UI."}),(0,g.jsx)(b,{}),u?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:v,children:[(0,g.jsx)("p",{children:"Choose a string key from the dropdown to test it"}),(0,g.jsxs)("select",{onChange:function(e){T(e.target.value)},children:[(0,g.jsx)("option",{selected:null===F,children:"Select a key"}),Object.keys(u[o.h.en]||{}).map((function(e){return(0,g.jsx)("option",{selected:F===e,children:e},e)}))]})]}),(0,g.jsx)("div",{className:x,children:Object.entries(S.IB).map((function(e){var n=(0,a.A)(e,2),t=n[0],s=n[1],i=s.displayName,l=s.displayNameEn;return t in u&&c.Ru.initialize({localeForTranslation:t,localeForFormatting:t,translations:u[t]}),(0,g.jsxs)("div",{className:m,children:[(0,g.jsxs)("h3",{children:[l," (",t,") (",i,")"]}),F?(0,g.jsx)("p",{className:j,children:t in u?E(F):"💥 Can't load dictionary 💥 "}):null]},t)}))})]}):(0,g.jsx)("p",{children:"Please wait until we fetch all dictionaries"})]}):null}}}]);
|
|
//# sourceMappingURL=debug-locales.js.map
|