glotfile 0.8.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2681,4 +2681,4 @@ Only the AI calls you trigger. The UI is local-only; no credentials or screensho
|
|
|
2681
2681
|
<ul>
|
|
2682
2682
|
<li>Home · Installation · AI Providers · Continuous Integration</li>
|
|
2683
2683
|
</ul>
|
|
2684
|
-
`,text:`Troubleshooting and FAQ Setup Run it with (no global install needed), or install globally with . From a checkout, build first: . See Installation. Wrong Node version Glotfile needs Node . Check with . Translation "Install the SDK for this provider" OpenAI, OpenRouter, and Bedrock need an optional SDK. Install the one for your provider — (OpenAI or OpenRouter) or (Bedrock). See AI Providers. No API key / auth errors Set the provider's credentials in your environment or a local : , , , or the AWS chain. See AI Providers. A translation was skipped The result failed validation — a dropped placeholder, broken ICU, or an over-length value. Glotfile prints the reason and leaves the value untranslated. See Placeholders and ICU and How Translation Works. My reviewed translation didn't change after That's intentional — values are protected from being overwritten. Unmark it first to re-translate. Screenshots seem ignored The selected model may not support vision (e.g. Bedrock Meta Llama text models). The run proceeds text-only and warns how many screenshots were skipped. See Screenshots. Validation and CI fails with Your exported files don't match the catalog. Run and commit the result. See Continuous Integration. Spelling flags real words Add them to the custom dictionary in Settings ( ). The same list silences both the editor's live spell check and the lint rule. Glossary terms are accepted automatically. See Checks and Validation. A rule is too noisy Override its severity (or turn it off) in , or certain key globs. See Configuration Reference. Files and git Can I edit by hand? You can, but you rarely need to — the UI writes it for you, deterministically. If you do edit it, keep it valid: it's validated on load. See The State File. Big diffs on every save Check ( , , ). Deterministic formatting keeps diffs minimal. See The State File. General Do I already have translations I can import? Import existing locale files with — see import. You can also add keys via the Editor. Does anything leave my machine? Only the AI calls you trigger. The UI is local-only; no credentials or screenshot bytes are ever logged. See AI Log. Related - Home · Installation · AI Providers · Continuous Integration`}],$F={class:`flex min-h-0 flex-1 overflow-hidden`},eI={class:`flex w-56 shrink-0 flex-col overflow-hidden border-r bg-muted/30`},tI={class:`relative shrink-0 px-2 py-2`},nI={key:0,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},rI={class:`px-2 py-1 text-xs text-muted-foreground`},iI=[`onClick`],aI={class:`text-sm font-medium`},oI={key:0,class:`text-[10px] uppercase tracking-wider text-muted-foreground`},sI={key:1,class:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`},cI={class:`bg-primary/20 text-foreground`},lI={key:1,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},uI=[`onClick`],dI={class:`min-w-0 flex-1 overflow-y-auto`},fI=[`innerHTML`],pI=F({__name:`DocsView`,setup(e){let t=[``,`Getting Started`,`Frameworks`,`Web UI`,`CLI`,`Concepts`,`AI Translation`,`Reference`,`Guides`,`Help`];function n(){let e=Np().get(`doc`);return e&&QF.some(t=>t.id===e)?e:QF[0]?.id??``}let r=M(n()),i=M(``),a=q(()=>{let e=new Map;for(let t of QF)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return[...t,...[...e.keys()].filter(e=>!t.includes(e))].map(t=>({section:t,pages:e.get(t)??[]})).filter(e=>e.pages.length>0)}),o=q(()=>{let e=i.value.trim().toLowerCase();if(!e)return[];let t=[];for(let n of QF){let r=n.text.toLowerCase(),i=n.title.toLowerCase().includes(e),a=r.indexOf(e);if(a===-1&&!i)continue;if(a===-1){t.push({id:n.id,title:n.title,section:n.section,before:``,match:``,after:``});continue}let o=Math.max(0,a-40),s=Math.min(n.text.length,a+e.length+80);t.push({id:n.id,title:n.title,section:n.section,before:(o>0?`…`:``)+n.text.slice(o,a),match:n.text.slice(a,a+e.length),after:n.text.slice(a+e.length,s)+(s<n.text.length?`…`:``)})}return t}),s=q(()=>QF.find(e=>e.id===r.value)??QF[0]);function c(e){e!==r.value&&(r.value=e,history.pushState(null,``,`#docs?${new URLSearchParams({doc:e})}`))}function l(e){c(e),i.value=``}function u(){r.value=n()}return Gi(()=>window.addEventListener(`hashchange`,u)),Yi(()=>window.removeEventListener(`hashchange`,u)),(e,t)=>(z(),B(`div`,$F,[H(`nav`,eI,[H(`div`,tI,[U(N(pd),{class:`pointer-events-none absolute left-4 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),gr(H(`input`,{"onUpdate:modelValue":t[0]||=e=>i.value=e,type:`search`,placeholder:`Search docs…`,class:`w-full rounded-md border bg-background py-1 pl-7 pr-7 text-sm outline-none focus:ring-2 focus:ring-ring`},null,512),[[Pl,i.value]]),i.value?(z(),B(`button`,{key:0,type:`button`,class:`absolute right-4 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:t[1]||=e=>i.value=``},[U(N(kd),{class:`size-3.5`})])):G(``,!0)]),i.value.trim()?(z(),B(`div`,nI,[H(`div`,rI,j(o.value.length)+` result`+j(o.value.length===1?``:`s`),1),(z(!0),B(R,null,I(o.value,e=>(z(),B(`button`,{key:e.id,type:`button`,class:`w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground`,onClick:t=>l(e.id)},[H(`div`,aI,j(e.title),1),e.section?(z(),B(`div`,oI,j(e.section),1)):G(``,!0),e.match?(z(),B(`div`,sI,[W(j(e.before),1),H(`mark`,cI,j(e.match),1),W(j(e.after),1)])):G(``,!0)],8,iI))),128))])):(z(),B(`div`,lI,[(z(!0),B(R,null,I(a.value,(e,t)=>(z(),B(R,{key:e.section},[e.section?(z(),B(`div`,{key:0,class:A([`px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,t>0?`mt-3`:``])},j(e.section),3)):G(``,!0),(z(!0),B(R,null,I(e.pages,e=>(z(),B(`button`,{key:e.id,type:`button`,class:A([`w-full rounded-md px-2 py-1 text-left text-sm transition-colors`,r.value===e.id?`bg-primary text-primary-foreground`:`text-foreground hover:bg-accent hover:text-accent-foreground`]),onClick:t=>c(e.id)},j(e.title),11,uI))),128))],64))),128))]))]),H(`div`,dI,[H(`div`,{class:`prose prose-sm dark:prose-invert mx-auto max-w-3xl px-8 py-6`,innerHTML:s.value?.html},null,8,fI)])]))}}),mI={en:`English`,fr:`French`,de:`German`,es:`Spanish`,pt:`Portuguese`,it:`Italian`,nl:`Dutch`,ca:`Catalan`,pl:`Polish`,ru:`Russian`,uk:`Ukrainian`,cs:`Czech`,sk:`Slovak`,sv:`Swedish`,da:`Danish`,no:`Norwegian`,nb:`Norwegian Bokmål`,fi:`Finnish`,tr:`Turkish`,el:`Greek`,ro:`Romanian`,hu:`Hungarian`,bg:`Bulgarian`,hr:`Croatian`,sr:`Serbian`,sl:`Slovenian`,ja:`Japanese`,ko:`Korean`,zh:`Chinese`,ar:`Arabic`,he:`Hebrew`,hi:`Hindi`,th:`Thai`,vi:`Vietnamese`,id:`Indonesian`,ms:`Malay`,fa:`Persian`};function hI(e){let[t=``,n]=e.split(/[-_]/),r=t.toLowerCase(),i=n&&/^[A-Za-z]{2}$/.test(n)?n.toUpperCase():void 0,a=mI[r]??e;return{code:e,name:i?`${a} (${i})`:a}}var gI={class:`p-6`},_I={class:`flex items-start gap-3 pr-6`},vI={class:`grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-primary/25 bg-primary/10 font-mono text-[13px] font-semibold leading-none tracking-tight text-primary`},yI={class:`min-w-0`},bI={class:`font-medium text-foreground`},xI={class:`font-mono text-[12px]`},SI={class:`mt-4 flex items-center gap-4 rounded-lg border border-border bg-muted/40 px-3.5 py-2.5`},CI={class:`flex flex-col`},wI={class:`text-[17px] font-semibold leading-none tabular-nums`},TI={class:`flex flex-col`},EI={class:`text-[17px] font-semibold leading-none tabular-nums`},DI={class:`ml-auto flex items-center gap-1.5 whitespace-nowrap text-[11px] text-muted-foreground`},OI={class:`mt-5`},kI={class:`!flex min-w-0 items-center gap-2`},AI={class:`font-mono text-[13px]`},jI={class:`truncate text-[13px] text-muted-foreground`},MI={class:`flex items-center gap-2`},NI={class:`font-mono text-[13px]`},PI={class:`text-[13px] text-muted-foreground`},FI={class:`mt-4`},II={class:`flex items-center justify-between`},LI={class:`whitespace-nowrap text-[12px] tabular-nums text-muted-foreground`},RI={class:`mt-1.5 flex flex-wrap gap-1.5 rounded-lg border border-border bg-muted/30 p-2.5`},zI=[`disabled`,`onClick`],BI={class:`font-mono`},VI={key:0,class:`ml-0.5 rounded-sm bg-primary/15 px-1 text-[9px] font-semibold uppercase tracking-wide text-primary`},HI={key:0,class:`mt-4`},UI={class:`overflow-hidden rounded-lg border border-border`},WI={class:`ml-auto font-mono text-[11px] text-muted-foreground/70`},GI={key:0,class:`divide-y divide-border border-t border-border gf-content-fade`},KI={class:`shrink-0 font-mono text-foreground`},qI={class:`ml-auto truncate text-right text-muted-foreground`},JI={key:0,class:`px-3 py-1.5 text-[11px] text-muted-foreground/70`},YI={class:`flex items-center gap-2 border-t border-border px-6 py-4`},XI={class:`ml-1 flex cursor-pointer select-none items-center gap-1.5 text-[12px] text-muted-foreground`},ZI={class:`ml-auto`},QI={class:`flex flex-col items-center justify-center gap-4 p-6 py-8 text-center`},$I={key:0,class:`mt-1 text-[13px] text-muted-foreground`},eL={class:`p-6`},tL={class:`flex flex-col items-center gap-3 pt-1 text-center`},nL={class:`grid h-12 w-12 place-items-center rounded-full bg-success-bg text-success ring-1 ring-success-border`},rL={class:`font-semibold text-foreground tabular-nums`},iL={class:`font-semibold text-foreground`},aL={key:0,class:`mt-5 overflow-hidden rounded-lg border border-warning-border bg-warning-bg/60`},oL={class:`whitespace-nowrap text-[13px] font-medium text-warning`},sL={key:0,class:`max-h-44 divide-y divide-warning-border/40 overflow-auto border-t border-warning-border/70 gf-content-fade`},cL={class:`flex items-center border-t border-border px-6 py-4`},lL={class:`ml-auto`},uL={class:`p-6`},dL={class:`flex items-start gap-3 pr-6`},fL={class:`grid h-10 w-10 shrink-0 place-items-center rounded-full bg-destructive-soft text-destructive`},pL={class:`min-w-0`},mL={class:`flex items-center border-t border-border px-6 py-4`},hL={class:`ml-auto`},gL=F({__name:`ImportWizard`,emits:[`dismiss`,`imported`],setup(e,{expose:t,emit:n}){let r=n,i=M(!0),a=M(`confirm`),o=M(null),s=M(``),c=M({}),l=M(!1),u=M(!1),d=M(null),f=M(``),p=M(!0);t({init:m});async function m(){try{let e=await Lf();if(!e.found){r(`dismiss`);return}o.value=e,s.value=e.sourceLocale}catch{r(`dismiss`)}}let h={"laravel-php":{label:`Laravel PHP`,glyph:`</>`,file:`lang/{locale}/*.php`},"vue-i18n-json":{label:`Vue i18n JSON`,glyph:`{ }`,file:`locales/{locale}.json`},"flutter-arb":{label:`Flutter ARB`,glyph:`arb`,file:`lib/l10n/app_{locale}.arb`},"apple-strings":{label:`Apple .strings`,glyph:``,file:`{locale}.lproj/Localizable.strings`}},g=q(()=>h[o.value?.format??``]??{label:o.value?.format??``,glyph:`{}`,file:``});function _(e){return e===s.value||!c.value[e]}function v(e){e!==s.value&&(c.value={...c.value,[e]:!c.value[e]})}let y=q(()=>o.value?o.value.locales.filter(_):[]),b=q(()=>y.value.length),x=q(()=>o.value?Math.max(0,o.value.keyCount-o.value.sampleKeys.length):0);async function S(){if(o.value){a.value=`importing`;try{d.value=await Rf({format:o.value.format,sourceLocale:s.value,locales:y.value,cldr:p.value}),a.value=`done`}catch(e){f.value=e.message,a.value=`error`}}}function C(e){e||a.value!==`importing`&&(a.value===`done`?r(`imported`):r(`dismiss`))}return(e,t)=>(z(),V(N(C_),{open:i.value,"onUpdate:open":C},{default:P(()=>[U(N(uv),null,{default:P(()=>[U(N(cv),{class:`fixed inset-0 z-50 bg-foreground/40 gf-content-fade`}),U(N(av),{class:`fixed left-1/2 top-1/2 z-50 w-[28rem] max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-card text-card-foreground shadow-2xl focus:outline-none gf-content-fade`,onInteractOutside:t[9]||=Jl(()=>{},[`prevent`])},{default:P(()=>[a.value===`confirm`&&o.value?(z(),B(R,{key:0},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[0]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,gI,[H(`div`,_I,[H(`div`,vI,j(g.value.glyph),1),H(`div`,yI,[U(N(dv),{class:`text-base font-semibold leading-tight`},{default:P(()=>[...t[10]||=[W(`Import your translations`,-1)]]),_:1}),U(N(ov),{class:`mt-0.5 text-[13px] text-muted-foreground`},{default:P(()=>[t[11]||=W(` Found a `,-1),H(`span`,bI,j(g.value.label),1),t[12]||=W(` setup in `,-1),H(`span`,xI,j(g.value.file),1),t[13]||=W(`. `,-1)]),_:1})])]),H(`div`,SI,[H(`div`,CI,[H(`span`,wI,j(o.value.keyCount.toLocaleString()),1),t[14]||=H(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`keys detected`,-1)]),t[17]||=H(`div`,{class:`h-7 w-px bg-border`},null,-1),H(`div`,TI,[H(`span`,EI,j(o.value.locales.length),1),t[15]||=H(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`locales`,-1)]),H(`div`,DI,[U(N(Gu),{class:`size-3.5 opacity-70`}),t[16]||=W(` Detected automatically `,-1)])]),H(`div`,OI,[U(N(MC),{class:`flex items-center gap-1.5 whitespace-nowrap`},{default:P(()=>[...t[18]||=[W(` Source language `,-1),H(`span`,{class:`text-[12px] font-normal text-muted-foreground`},`· the original text`,-1)]]),_:1}),U(N(mS),{modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e},{default:P(()=>[U(N(cC),{class:`mt-1.5`},{default:P(()=>[H(`span`,kI,[U(jw,{code:s.value,size:14},null,8,[`code`]),H(`span`,AI,j(s.value),1),H(`span`,jI,j(N(hI)(s.value).name),1)])]),_:1}),U(N(lC),null,{default:P(()=>[(z(!0),B(R,null,I(o.value.locales,e=>(z(),V(N(dC),{key:e,value:e},{default:P(()=>[H(`span`,MI,[U(jw,{code:e,size:14},null,8,[`code`]),H(`span`,NI,j(e),1),H(`span`,PI,j(N(hI)(e).name),1)])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`modelValue`])]),H(`div`,FI,[H(`div`,II,[U(N(MC),{class:`whitespace-nowrap`},{default:P(()=>[...t[19]||=[W(`Locales to import`,-1)]]),_:1}),H(`span`,LI,j(b.value)+` of `+j(o.value.locales.length),1)]),H(`div`,RI,[(z(!0),B(R,null,I(o.value.locales,e=>(z(),V(N(eC),{key:e},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,disabled:e===s.value,class:A([`group inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md border pl-1.5 pr-2 text-[12px] transition-colors`,e===s.value?`border-primary/40 bg-primary/10 cursor-default`:_(e)?`border-input bg-card text-foreground hover:bg-muted`:`border-dashed border-border bg-transparent text-muted-foreground hover:bg-muted/50`]),onClick:t=>v(e)},[U(jw,{code:e,size:14},null,8,[`code`]),H(`span`,BI,j(e),1),e===s.value?(z(),B(`span`,VI,`src`)):(z(),B(`span`,{key:1,class:A([`grid size-3.5 place-items-center rounded-[3px] border`,_(e)?`border-primary bg-primary text-primary-foreground`:`border-border text-transparent`])},[U(N(Du),{class:`size-2.5`,"stroke-width":3})],2))],10,zI)]),_:2},1024),U(N(qC),null,{default:P(()=>[W(j(e===s.value?`Source language — always imported`:_(e)?`Click to exclude`:`Click to include`),1)]),_:2},1024)]),_:2},1024))),128))])]),o.value.sampleKeys.length?(z(),B(`div`,HI,[H(`div`,UI,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2 text-[13px] text-muted-foreground transition-colors hover:bg-muted/50`,onClick:t[2]||=e=>l.value=!l.value},[U(N(ku),{class:A([`size-3.5 shrink-0 transition-transform`,l.value?`rotate-90`:``])},null,8,[`class`]),t[20]||=H(`span`,{class:`whitespace-nowrap`},`Preview sample keys`,-1),H(`span`,WI,j(g.value.glyph),1)]),l.value?(z(),B(`div`,GI,[(z(!0),B(R,null,I(o.value.sampleKeys,e=>(z(),B(`div`,{key:e.key,class:`flex items-baseline gap-3 px-3 py-1.5 text-[12px]`},[H(`span`,KI,j(e.key),1),H(`span`,qI,j(e.value),1)]))),128)),x.value>0?(z(),B(`div`,JI,` + `+j(x.value.toLocaleString())+` more keys `,1)):G(``,!0)])):G(``,!0)])])):G(``,!0)]),H(`div`,YI,[U(N($),{variant:`ghost`,size:`sm`,onClick:t[3]||=e=>r(`dismiss`)},{default:P(()=>[...t[21]||=[W(`Skip`,-1)]]),_:1}),U(N(eC),null,{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`label`,XI,[gr(H(`input`,{type:`checkbox`,"data-testid":`cldr-toggle`,"onUpdate:modelValue":t[4]||=e=>p.value=e,class:`size-3.5 accent-primary`},null,512),[[Fl,p.value]]),t[22]||=W(` Convert plurals to CLDR categories `,-1)])]),_:1}),U(N(qC),{class:`max-w-xs`},{default:P(()=>[...t[23]||=[W(`Rewrite exact =N plural selectors (e.g. =1) into each language's CLDR plural categories, the way Crowdin does.`,-1)]]),_:1})]),_:1}),H(`div`,ZI,[U(N($),{"data-testid":`import-btn`,disabled:b.value===0,onClick:S},{default:P(()=>[U(N(Ad),{class:`size-4`}),W(` Import `+j(b.value)+` `+j(b.value===1?`locale`:`locales`),1)]),_:1},8,[`disabled`])])])],64)):a.value===`importing`?(z(),B(R,{key:1},[U(N(dv),{class:`sr-only`},{default:P(()=>[...t[24]||=[W(`Importing translations`,-1)]]),_:1}),H(`div`,QI,[U(N($u),{class:`size-10 text-primary gf-spin`}),H(`div`,null,[t[25]||=H(`div`,{class:`text-sm font-semibold`},`Importing translations…`,-1),o.value?(z(),B(`div`,$I,` Reading `+j(o.value.keyCount.toLocaleString())+` keys across `+j(b.value)+` locales `,1)):G(``,!0)])])],64)):a.value===`done`&&d.value?(z(),B(R,{key:2},[H(`div`,eL,[H(`div`,tL,[H(`div`,nL,[U(N(Du),{class:`size-6`,"stroke-width":2.5})]),H(`div`,null,[U(N(dv),{class:`text-base font-semibold`},{default:P(()=>[...t[26]||=[W(`Import complete`,-1)]]),_:1}),U(N(ov),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[H(`span`,rL,j(d.value.keyCount.toLocaleString())+` keys`,1),t[27]||=W(` across `,-1),H(`span`,iL,j(d.value.localeCount)+` locales`,1),t[28]||=W(` imported. `,-1)]),_:1})])]),d.value.warnings.length?(z(),B(`div`,aL,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2.5 text-left`,onClick:t[5]||=e=>u.value=!u.value},[U(N(Td),{class:`size-3.5 shrink-0 text-warning`}),H(`span`,oL,j(d.value.warnings.length)+` `+j(d.value.warnings.length===1?`warning`:`warnings`),1),t[29]||=H(`span`,{class:`whitespace-nowrap text-[12px] text-warning/70`},`· import still succeeded`,-1),U(N(ku),{class:A([`ml-auto size-3.5 shrink-0 text-warning transition-transform`,u.value?`rotate-90`:``])},null,8,[`class`])]),u.value?(z(),B(`ul`,sL,[(z(!0),B(R,null,I(d.value.warnings,(e,t)=>(z(),B(`li`,{key:t,class:`px-3 py-2 text-[12px] text-muted-foreground`},j(e),1))),128))])):G(``,!0)])):G(``,!0)]),H(`div`,cL,[H(`div`,lL,[U(N($),{onClick:t[6]||=e=>r(`imported`)},{default:P(()=>[t[30]||=W(`Open editor `,-1),U(N(bu),{class:`size-4`})]),_:1})])])],64)):a.value===`error`?(z(),B(R,{key:3},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[7]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,uL,[H(`div`,dL,[H(`div`,fL,[U(N(Td),{class:`size-5`})]),H(`div`,pL,[U(N(dv),{class:`text-base font-semibold`},{default:P(()=>[...t[31]||=[W(`Couldn't import translations`,-1)]]),_:1}),U(N(ov),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[W(j(f.value),1)]),_:1})])])]),H(`div`,mL,[H(`div`,hL,[U(N($),{variant:`outline`,onClick:t[8]||=e=>r(`dismiss`)},{default:P(()=>[...t[32]||=[W(`Dismiss`,-1)]]),_:1})])])],64)):G(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),_L=`glotfile-theme`,vL=[`system`,`light`,`dark`],yL=e=>vL.includes(e);function bL(){let e=localStorage.getItem(_L);return yL(e)?e:`system`}var xL=window.matchMedia(`(prefers-color-scheme: dark)`),SL=M(xL.matches);xL.addEventListener(`change`,e=>{SL.value=e.matches});var CL=M(bL()),wL=q(()=>CL.value===`system`?SL.value:CL.value===`dark`);function TL(){document.documentElement.classList.toggle(`dark`,wL.value)}function EL(){Er(wL,TL,{immediate:!0,flush:`sync`})}function DL(e){CL.value=e,localStorage.setItem(_L,e),uf({theme:e}).catch(()=>{})}async function OL(){try{let{theme:e}=await lf();yL(e)&&e!==CL.value&&(CL.value=e,localStorage.setItem(_L,e))}catch{}}var kL={class:`flex flex-col items-center gap-0.5 rounded-lg bg-black/15 p-0.5`},AL=[`data-mode`,`aria-label`,`aria-pressed`,`onClick`],jL=F({__name:`ThemeToggle`,setup(e){let t=[{value:`light`,label:`Light`,icon:xd},{value:`system`,label:`System`,icon:nd},{value:`dark`,label:`Dark`,icon:rd}];return(e,n)=>(z(),B(`div`,kL,[(z(),B(R,null,I(t,e=>U(N(eC),{key:e.value},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"data-mode":e.value,"aria-label":e.label,"aria-pressed":N(CL)===e.value,class:A(N(lh)(`flex size-8 items-center justify-center rounded-md transition-colors`,N(CL)===e.value?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>N(DL)(e.value)},[(z(),V(ia(e.icon),{class:`size-4`}))],10,AL)]),_:2},1024),U(N(qC),{side:`right`},{default:P(()=>[W(j(e.label),1)]),_:2},1024)]),_:2},1024)),64))]))}}),ML=F({__name:`Kbd`,props:{class:{}},setup(e){return(e,t)=>(z(),B(`kbd`,{class:A(N(lh)(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground`,e.$props.class))},[L(e.$slots,`default`)],2))}}),NL=[{route:`editor`,keys:[`g`,`e`],label:`Editor`},{route:`analytics`,keys:[`g`,`a`],label:`Analytics`},{route:`glossary`,keys:[`g`,`g`],label:`Glossary`},{route:`screenshots`,keys:[`g`,`i`],label:`Screenshots`},{route:`settings`,keys:[`g`,`s`],label:`Settings`},{route:`activity`,keys:[`g`,`l`],label:`Activity`},{route:`docs`,keys:[`g`,`d`],label:`Docs`}];function PL(e,t){if(e.pending===`g`){let e=NL.find(e=>e.keys[1]===t);return{state:{pending:null},action:e?{type:`navigate`,route:e.route}:null}}return t===`g`?{state:{pending:`g`},action:null}:t===`?`?{state:{pending:null},action:{type:`toggleHelp`}}:{state:{pending:null},action:null}}var FL={class:`flex w-14 shrink-0 flex-col items-center gap-1 bg-rail py-3 text-rail-foreground`},IL=[`aria-label`,`onClick`],LL={key:0,class:`flex items-center gap-0.5`},RL={class:`mt-auto flex flex-col items-center gap-1.5`},zL={class:`font-mono text-[10px] text-rail-foreground/50`},BL=F({__name:`NavRail`,setup(e){let t=Mp(),n=[{id:`editor`,label:`Editor`,icon:Zu},{id:`analytics`,label:`Analytics`,icon:Eu},{id:`glossary`,label:`Glossary`,icon:Tu},{id:`screenshots`,label:`Screenshots`,icon:Yu},{id:`settings`,label:`Settings`,icon:md},{id:`activity`,label:`Activity`,icon:fd},{id:`docs`,label:`Docs`,icon:Cu}].map(e=>({...e,keys:NL.find(t=>t.route===e.id)?.keys}));return(e,r)=>(z(),V(N(XS),{"delay-duration":300},{default:P(()=>[H(`nav`,FL,[r[0]||=H(`div`,{class:`mb-3 flex size-9 items-center justify-center rounded-md bg-primary font-mono text-base font-semibold text-primary-foreground`},` G `,-1),(z(!0),B(R,null,I(N(n),e=>(z(),V(N(eC),{key:e.id},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"aria-label":e.label,class:A(N(lh)(`relative flex size-10 items-center justify-center rounded-md transition-colors`,N(t)===e.id?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>N(jp)(e.id)},[(z(),V(ia(e.icon),{class:`size-5`}))],10,IL)]),_:2},1024),U(N(qC),{side:`right`,class:`flex items-center gap-2`},{default:P(()=>[H(`span`,null,j(e.label),1),e.keys?(z(),B(`span`,LL,[(z(!0),B(R,null,I(e.keys,(e,t)=>(z(),V(ML,{key:t},{default:P(()=>[W(j(e),1)]),_:2},1024))),128))])):G(``,!0)]),_:2},1024)]),_:2},1024))),128)),H(`div`,RL,[U(jL),H(`span`,zL,`v`+j(N(`0.8.9`)),1)])])]),_:1}))}}),VL={class:`flex flex-col gap-1`},HL={class:`flex items-center gap-1`},UL={class:`flex items-center justify-between py-1 text-sm`},WL={class:`flex items-center gap-1`},GL=F({__name:`ShortcutsDialog`,props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:[`update:open`],setup(e){let t=Xa(e,`open`);return(e,n)=>(z(),V(N(C_),{open:t.value,"onUpdate:open":n[0]||=e=>t.value=e},{default:P(()=>[U(N(NC),{class:`max-w-sm`},{default:P(()=>[U(N(PC),null,{default:P(()=>[U(N(IC),null,{default:P(()=>[...n[1]||=[W(`Keyboard shortcuts`,-1)]]),_:1})]),_:1}),H(`ul`,VL,[(z(!0),B(R,null,I(N(NL),e=>(z(),B(`li`,{key:e.route,class:`flex items-center justify-between py-1 text-sm`},[H(`span`,null,j(e.label),1),H(`span`,HL,[(z(!0),B(R,null,I(e.keys,(e,t)=>(z(),V(ML,{key:t},{default:P(()=>[W(j(e),1)]),_:2},1024))),128))])]))),128)),H(`li`,UL,[n[3]||=H(`span`,null,`Search keys`,-1),H(`span`,WL,[U(ML,null,{default:P(()=>[...n[2]||=[W(`/`,-1)]]),_:1})])])])]),_:1})]),_:1},8,[`open`]))}}),KL=M(!1),qL=1e3;function JL(){let e={pending:null},t=null;function n(){t!==null&&(clearTimeout(t),t=null)}function r(r){if(r.metaKey||r.ctrlKey||r.altKey||r.repeat)return;let i=r.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.isContentEditable))return;let a=r.key.toLowerCase(),o=!!document.querySelector(`[role="dialog"],[role="menu"],[role="listbox"]`),s=a===`?`&&KL.value;if(o&&!s)return;let c=PL(e,a);e=c.state,n(),e.pending===`g`&&(t=window.setTimeout(()=>{e={pending:null},t=null},qL));let{action:l}=c;l&&(l.type===`navigate`?jp(l.route):KL.value=!KL.value,r.preventDefault())}Gi(()=>window.addEventListener(`keydown`,r)),Yi(()=>{n(),window.removeEventListener(`keydown`,r)})}var YL={class:`flex h-screen bg-background text-foreground`},XL={class:`flex min-w-0 flex-1 flex-col`},ZL={class:`flex h-12 shrink-0 items-center justify-between border-b px-4`},QL={class:`flex min-w-0 items-center gap-3`},$L={key:0,class:`flex min-w-0 items-center gap-1.5`},eR={class:`max-w-[12rem] shrink-0 truncate font-mono text-sm font-medium`},tR={class:`truncate`},nR={key:0,class:`text-muted-foreground`},rR={class:`text-sm font-semibold`},iR={class:`font-mono`},aR={class:`flex min-h-0 flex-1 flex-col overflow-hidden`},oR=F({__name:`App`,setup(e){let t=Mp();JL();let n=un(null),r=M(null),i=M([]),a=q(()=>[...i.value].sort((e,t)=>{let n=e.relDir?`${e.relDir}/${e.name}`:e.name,r=t.relDir?`${t.relDir}/${t.name}`:t.name;return n.localeCompare(r)})),o=M(!1),s=M(null);async function c(){n.value=await jd()}Th(c),Gi(async()=>{await c(),Ch();try{[r.value,i.value]=await Promise.all([kf(),Af()]),document.title=r.value.project?`${r.value.project} — Glotfile`:`Glotfile`}catch(e){Q.error(e.message)}n.value&&Object.keys(n.value.keys).length===0&&(o.value=!0)});function l(){location.reload()}async function u(e){if(e!==r.value?.path)try{await jf(e),location.reload()}catch(e){Q.error(e.message)}}let d=q(()=>({editor:`Editor`,analytics:`Analytics`,glossary:`Glossary`,screenshots:`Screenshots`,settings:`Settings`,activity:`Activity`,docs:`Docs`})[t.value]),f=q(()=>{if(!n.value)return null;let{sourceLocale:e,locales:t}=n.value.config;return{source:e,targets:t.filter(t=>t!==e)}});return(e,n)=>(z(),V(N(XS),{"delay-duration":300},{default:P(()=>[H(`div`,YL,[U(BL),H(`div`,XL,[H(`header`,ZL,[H(`div`,QL,[r.value?(z(),B(`div`,$L,[U(N(eC),null,{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`span`,eR,j(r.value.project),1)]),_:1}),U(N(qC),{side:`bottom`,class:`font-mono`},{default:P(()=>[W(j(r.value.dir),1)]),_:1})]),_:1}),U(N(ku),{class:`size-3.5 shrink-0 text-muted-foreground`}),U(N(Qx),null,{default:P(()=>[U(N(iS),{"as-child":``},{default:P(()=>[U(N($),{variant:`outline`,size:`sm`,class:`max-w-[16rem] gap-1.5 font-mono`},{default:P(()=>[H(`span`,tR,j(r.value.name),1),U(N(Au),{class:`size-3.5 shrink-0 text-muted-foreground`})]),_:1})]),_:1}),U(N(RC),{align:`start`,class:`w-max`},{default:P(()=>[(z(!0),B(R,null,I(a.value,e=>(z(),V(N(zC),{key:e.path,class:`font-mono`,onSelect:t=>u(e.path)},{default:P(()=>[U(N(Du),{class:A([`size-4 shrink-0`,e.path===r.value.path?`opacity-100`:`opacity-0`])},null,8,[`class`]),H(`span`,null,[e.relDir?(z(),B(`span`,nR,j(e.relDir)+`/`,1)):G(``,!0),W(j(e.name),1)])]),_:2},1032,[`onSelect`]))),128))]),_:1})]),_:1})])):G(``,!0),H(`h1`,rR,j(d.value),1)]),f.value?(z(),V(N(eC),{key:0},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`shrink-0 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:n[0]||=e=>N(jp)(`settings`)},j(f.value.source)+` → `+j(f.value.targets.length)+` `+j(f.value.targets.length===1?`locale`:`locales`),1)]),_:1}),U(N(qC),{side:`bottom`,class:`max-w-[28rem] leading-relaxed`},{default:P(()=>[H(`div`,iR,j(f.value.targets.join(`, `)||`—`),1),n[4]||=H(`div`,{class:`mt-1 text-background/60`},`Click to manage in Settings`,-1)]),_:1})]),_:1})):G(``,!0)]),H(`main`,aR,[N(t)===`editor`?(z(),V(NO,{key:0})):N(t)===`analytics`?(z(),V(DA,{key:1})):N(t)===`glossary`?(z(),V($A,{key:2})):N(t)===`screenshots`?(z(),V(hF,{key:3})):N(t)===`settings`?(z(),V($P,{key:4})):N(t)===`activity`?(z(),V(ZF,{key:5})):N(t)===`docs`?(z(),V(pI,{key:6})):G(``,!0)])]),U(N(hh)),U(GL,{open:N(KL),"onUpdate:open":n[1]||=e=>ln(KL)?KL.value=e:null},null,8,[`open`]),o.value?(z(),V(gL,{key:0,ref_key:`wizardRef`,ref:s,onVnodeMounted:n[2]||=e=>s.value?.init(),onDismiss:n[3]||=e=>o.value=!1,onImported:l},null,512)):G(``,!0)])]),_:1}))}});EL(),iu(oR).mount(`#app`),OL(),sO(),TT();
|
|
2684
|
+
`,text:`Troubleshooting and FAQ Setup Run it with (no global install needed), or install globally with . From a checkout, build first: . See Installation. Wrong Node version Glotfile needs Node . Check with . Translation "Install the SDK for this provider" OpenAI, OpenRouter, and Bedrock need an optional SDK. Install the one for your provider — (OpenAI or OpenRouter) or (Bedrock). See AI Providers. No API key / auth errors Set the provider's credentials in your environment or a local : , , , or the AWS chain. See AI Providers. A translation was skipped The result failed validation — a dropped placeholder, broken ICU, or an over-length value. Glotfile prints the reason and leaves the value untranslated. See Placeholders and ICU and How Translation Works. My reviewed translation didn't change after That's intentional — values are protected from being overwritten. Unmark it first to re-translate. Screenshots seem ignored The selected model may not support vision (e.g. Bedrock Meta Llama text models). The run proceeds text-only and warns how many screenshots were skipped. See Screenshots. Validation and CI fails with Your exported files don't match the catalog. Run and commit the result. See Continuous Integration. Spelling flags real words Add them to the custom dictionary in Settings ( ). The same list silences both the editor's live spell check and the lint rule. Glossary terms are accepted automatically. See Checks and Validation. A rule is too noisy Override its severity (or turn it off) in , or certain key globs. See Configuration Reference. Files and git Can I edit by hand? You can, but you rarely need to — the UI writes it for you, deterministically. If you do edit it, keep it valid: it's validated on load. See The State File. Big diffs on every save Check ( , , ). Deterministic formatting keeps diffs minimal. See The State File. General Do I already have translations I can import? Import existing locale files with — see import. You can also add keys via the Editor. Does anything leave my machine? Only the AI calls you trigger. The UI is local-only; no credentials or screenshot bytes are ever logged. See AI Log. Related - Home · Installation · AI Providers · Continuous Integration`}],$F={class:`flex min-h-0 flex-1 overflow-hidden`},eI={class:`flex w-56 shrink-0 flex-col overflow-hidden border-r bg-muted/30`},tI={class:`relative shrink-0 px-2 py-2`},nI={key:0,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},rI={class:`px-2 py-1 text-xs text-muted-foreground`},iI=[`onClick`],aI={class:`text-sm font-medium`},oI={key:0,class:`text-[10px] uppercase tracking-wider text-muted-foreground`},sI={key:1,class:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`},cI={class:`bg-primary/20 text-foreground`},lI={key:1,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},uI=[`onClick`],dI={class:`min-w-0 flex-1 overflow-y-auto`},fI=[`innerHTML`],pI=F({__name:`DocsView`,setup(e){let t=[``,`Getting Started`,`Frameworks`,`Web UI`,`CLI`,`Concepts`,`AI Translation`,`Reference`,`Guides`,`Help`];function n(){let e=Np().get(`doc`);return e&&QF.some(t=>t.id===e)?e:QF[0]?.id??``}let r=M(n()),i=M(``),a=q(()=>{let e=new Map;for(let t of QF)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return[...t,...[...e.keys()].filter(e=>!t.includes(e))].map(t=>({section:t,pages:e.get(t)??[]})).filter(e=>e.pages.length>0)}),o=q(()=>{let e=i.value.trim().toLowerCase();if(!e)return[];let t=[];for(let n of QF){let r=n.text.toLowerCase(),i=n.title.toLowerCase().includes(e),a=r.indexOf(e);if(a===-1&&!i)continue;if(a===-1){t.push({id:n.id,title:n.title,section:n.section,before:``,match:``,after:``});continue}let o=Math.max(0,a-40),s=Math.min(n.text.length,a+e.length+80);t.push({id:n.id,title:n.title,section:n.section,before:(o>0?`…`:``)+n.text.slice(o,a),match:n.text.slice(a,a+e.length),after:n.text.slice(a+e.length,s)+(s<n.text.length?`…`:``)})}return t}),s=q(()=>QF.find(e=>e.id===r.value)??QF[0]);function c(e){e!==r.value&&(r.value=e,history.pushState(null,``,`#docs?${new URLSearchParams({doc:e})}`))}function l(e){c(e),i.value=``}function u(){r.value=n()}return Gi(()=>window.addEventListener(`hashchange`,u)),Yi(()=>window.removeEventListener(`hashchange`,u)),(e,t)=>(z(),B(`div`,$F,[H(`nav`,eI,[H(`div`,tI,[U(N(pd),{class:`pointer-events-none absolute left-4 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),gr(H(`input`,{"onUpdate:modelValue":t[0]||=e=>i.value=e,type:`search`,placeholder:`Search docs…`,class:`w-full rounded-md border bg-background py-1 pl-7 pr-7 text-sm outline-none focus:ring-2 focus:ring-ring`},null,512),[[Pl,i.value]]),i.value?(z(),B(`button`,{key:0,type:`button`,class:`absolute right-4 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:t[1]||=e=>i.value=``},[U(N(kd),{class:`size-3.5`})])):G(``,!0)]),i.value.trim()?(z(),B(`div`,nI,[H(`div`,rI,j(o.value.length)+` result`+j(o.value.length===1?``:`s`),1),(z(!0),B(R,null,I(o.value,e=>(z(),B(`button`,{key:e.id,type:`button`,class:`w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground`,onClick:t=>l(e.id)},[H(`div`,aI,j(e.title),1),e.section?(z(),B(`div`,oI,j(e.section),1)):G(``,!0),e.match?(z(),B(`div`,sI,[W(j(e.before),1),H(`mark`,cI,j(e.match),1),W(j(e.after),1)])):G(``,!0)],8,iI))),128))])):(z(),B(`div`,lI,[(z(!0),B(R,null,I(a.value,(e,t)=>(z(),B(R,{key:e.section},[e.section?(z(),B(`div`,{key:0,class:A([`px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,t>0?`mt-3`:``])},j(e.section),3)):G(``,!0),(z(!0),B(R,null,I(e.pages,e=>(z(),B(`button`,{key:e.id,type:`button`,class:A([`w-full rounded-md px-2 py-1 text-left text-sm transition-colors`,r.value===e.id?`bg-primary text-primary-foreground`:`text-foreground hover:bg-accent hover:text-accent-foreground`]),onClick:t=>c(e.id)},j(e.title),11,uI))),128))],64))),128))]))]),H(`div`,dI,[H(`div`,{class:`prose prose-sm dark:prose-invert mx-auto max-w-3xl px-8 py-6`,innerHTML:s.value?.html},null,8,fI)])]))}}),mI={en:`English`,fr:`French`,de:`German`,es:`Spanish`,pt:`Portuguese`,it:`Italian`,nl:`Dutch`,ca:`Catalan`,pl:`Polish`,ru:`Russian`,uk:`Ukrainian`,cs:`Czech`,sk:`Slovak`,sv:`Swedish`,da:`Danish`,no:`Norwegian`,nb:`Norwegian Bokmål`,fi:`Finnish`,tr:`Turkish`,el:`Greek`,ro:`Romanian`,hu:`Hungarian`,bg:`Bulgarian`,hr:`Croatian`,sr:`Serbian`,sl:`Slovenian`,ja:`Japanese`,ko:`Korean`,zh:`Chinese`,ar:`Arabic`,he:`Hebrew`,hi:`Hindi`,th:`Thai`,vi:`Vietnamese`,id:`Indonesian`,ms:`Malay`,fa:`Persian`};function hI(e){let[t=``,n]=e.split(/[-_]/),r=t.toLowerCase(),i=n&&/^[A-Za-z]{2}$/.test(n)?n.toUpperCase():void 0,a=mI[r]??e;return{code:e,name:i?`${a} (${i})`:a}}var gI={class:`p-6`},_I={class:`flex items-start gap-3 pr-6`},vI={class:`grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-primary/25 bg-primary/10 font-mono text-[13px] font-semibold leading-none tracking-tight text-primary`},yI={class:`min-w-0`},bI={class:`font-medium text-foreground`},xI={class:`font-mono text-[12px]`},SI={class:`mt-4 flex items-center gap-4 rounded-lg border border-border bg-muted/40 px-3.5 py-2.5`},CI={class:`flex flex-col`},wI={class:`text-[17px] font-semibold leading-none tabular-nums`},TI={class:`flex flex-col`},EI={class:`text-[17px] font-semibold leading-none tabular-nums`},DI={class:`ml-auto flex items-center gap-1.5 whitespace-nowrap text-[11px] text-muted-foreground`},OI={class:`mt-5`},kI={class:`!flex min-w-0 items-center gap-2`},AI={class:`font-mono text-[13px]`},jI={class:`truncate text-[13px] text-muted-foreground`},MI={class:`flex items-center gap-2`},NI={class:`font-mono text-[13px]`},PI={class:`text-[13px] text-muted-foreground`},FI={class:`mt-4`},II={class:`flex items-center justify-between`},LI={class:`whitespace-nowrap text-[12px] tabular-nums text-muted-foreground`},RI={class:`mt-1.5 flex flex-wrap gap-1.5 rounded-lg border border-border bg-muted/30 p-2.5`},zI=[`disabled`,`onClick`],BI={class:`font-mono`},VI={key:0,class:`ml-0.5 rounded-sm bg-primary/15 px-1 text-[9px] font-semibold uppercase tracking-wide text-primary`},HI={key:0,class:`mt-4`},UI={class:`overflow-hidden rounded-lg border border-border`},WI={class:`ml-auto font-mono text-[11px] text-muted-foreground/70`},GI={key:0,class:`divide-y divide-border border-t border-border gf-content-fade`},KI={class:`shrink-0 font-mono text-foreground`},qI={class:`ml-auto truncate text-right text-muted-foreground`},JI={key:0,class:`px-3 py-1.5 text-[11px] text-muted-foreground/70`},YI={class:`flex items-center gap-2 border-t border-border px-6 py-4`},XI={class:`ml-1 flex cursor-pointer select-none items-center gap-1.5 text-[12px] text-muted-foreground`},ZI={class:`ml-auto`},QI={class:`flex flex-col items-center justify-center gap-4 p-6 py-8 text-center`},$I={key:0,class:`mt-1 text-[13px] text-muted-foreground`},eL={class:`p-6`},tL={class:`flex flex-col items-center gap-3 pt-1 text-center`},nL={class:`grid h-12 w-12 place-items-center rounded-full bg-success-bg text-success ring-1 ring-success-border`},rL={class:`font-semibold text-foreground tabular-nums`},iL={class:`font-semibold text-foreground`},aL={key:0,class:`mt-5 overflow-hidden rounded-lg border border-warning-border bg-warning-bg/60`},oL={class:`whitespace-nowrap text-[13px] font-medium text-warning`},sL={key:0,class:`max-h-44 divide-y divide-warning-border/40 overflow-auto border-t border-warning-border/70 gf-content-fade`},cL={class:`flex items-center border-t border-border px-6 py-4`},lL={class:`ml-auto`},uL={class:`p-6`},dL={class:`flex items-start gap-3 pr-6`},fL={class:`grid h-10 w-10 shrink-0 place-items-center rounded-full bg-destructive-soft text-destructive`},pL={class:`min-w-0`},mL={class:`flex items-center border-t border-border px-6 py-4`},hL={class:`ml-auto`},gL=F({__name:`ImportWizard`,emits:[`dismiss`,`imported`],setup(e,{expose:t,emit:n}){let r=n,i=M(!0),a=M(`confirm`),o=M(null),s=M(``),c=M({}),l=M(!1),u=M(!1),d=M(null),f=M(``),p=M(!0);t({init:m});async function m(){try{let e=await Lf();if(!e.found){r(`dismiss`);return}o.value=e,s.value=e.sourceLocale}catch{r(`dismiss`)}}let h={"laravel-php":{label:`Laravel PHP`,glyph:`</>`,file:`lang/{locale}/*.php`},"vue-i18n-json":{label:`Vue i18n JSON`,glyph:`{ }`,file:`locales/{locale}.json`},"flutter-arb":{label:`Flutter ARB`,glyph:`arb`,file:`lib/l10n/app_{locale}.arb`},"apple-strings":{label:`Apple .strings`,glyph:``,file:`{locale}.lproj/Localizable.strings`}},g=q(()=>h[o.value?.format??``]??{label:o.value?.format??``,glyph:`{}`,file:``});function _(e){return e===s.value||!c.value[e]}function v(e){e!==s.value&&(c.value={...c.value,[e]:!c.value[e]})}let y=q(()=>o.value?o.value.locales.filter(_):[]),b=q(()=>y.value.length),x=q(()=>o.value?Math.max(0,o.value.keyCount-o.value.sampleKeys.length):0);async function S(){if(o.value){a.value=`importing`;try{d.value=await Rf({format:o.value.format,sourceLocale:s.value,locales:y.value,cldr:p.value}),a.value=`done`}catch(e){f.value=e.message,a.value=`error`}}}function C(e){e||a.value!==`importing`&&(a.value===`done`?r(`imported`):r(`dismiss`))}return(e,t)=>(z(),V(N(C_),{open:i.value,"onUpdate:open":C},{default:P(()=>[U(N(uv),null,{default:P(()=>[U(N(cv),{class:`fixed inset-0 z-50 bg-foreground/40 gf-content-fade`}),U(N(av),{class:`fixed left-1/2 top-1/2 z-50 w-[28rem] max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-card text-card-foreground shadow-2xl focus:outline-none gf-content-fade`,onInteractOutside:t[9]||=Jl(()=>{},[`prevent`])},{default:P(()=>[a.value===`confirm`&&o.value?(z(),B(R,{key:0},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[0]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,gI,[H(`div`,_I,[H(`div`,vI,j(g.value.glyph),1),H(`div`,yI,[U(N(dv),{class:`text-base font-semibold leading-tight`},{default:P(()=>[...t[10]||=[W(`Import your translations`,-1)]]),_:1}),U(N(ov),{class:`mt-0.5 text-[13px] text-muted-foreground`},{default:P(()=>[t[11]||=W(` Found a `,-1),H(`span`,bI,j(g.value.label),1),t[12]||=W(` setup in `,-1),H(`span`,xI,j(g.value.file),1),t[13]||=W(`. `,-1)]),_:1})])]),H(`div`,SI,[H(`div`,CI,[H(`span`,wI,j(o.value.keyCount.toLocaleString()),1),t[14]||=H(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`keys detected`,-1)]),t[17]||=H(`div`,{class:`h-7 w-px bg-border`},null,-1),H(`div`,TI,[H(`span`,EI,j(o.value.locales.length),1),t[15]||=H(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`locales`,-1)]),H(`div`,DI,[U(N(Gu),{class:`size-3.5 opacity-70`}),t[16]||=W(` Detected automatically `,-1)])]),H(`div`,OI,[U(N(MC),{class:`flex items-center gap-1.5 whitespace-nowrap`},{default:P(()=>[...t[18]||=[W(` Source language `,-1),H(`span`,{class:`text-[12px] font-normal text-muted-foreground`},`· the original text`,-1)]]),_:1}),U(N(mS),{modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e},{default:P(()=>[U(N(cC),{class:`mt-1.5`},{default:P(()=>[H(`span`,kI,[U(jw,{code:s.value,size:14},null,8,[`code`]),H(`span`,AI,j(s.value),1),H(`span`,jI,j(N(hI)(s.value).name),1)])]),_:1}),U(N(lC),null,{default:P(()=>[(z(!0),B(R,null,I(o.value.locales,e=>(z(),V(N(dC),{key:e,value:e},{default:P(()=>[H(`span`,MI,[U(jw,{code:e,size:14},null,8,[`code`]),H(`span`,NI,j(e),1),H(`span`,PI,j(N(hI)(e).name),1)])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`modelValue`])]),H(`div`,FI,[H(`div`,II,[U(N(MC),{class:`whitespace-nowrap`},{default:P(()=>[...t[19]||=[W(`Locales to import`,-1)]]),_:1}),H(`span`,LI,j(b.value)+` of `+j(o.value.locales.length),1)]),H(`div`,RI,[(z(!0),B(R,null,I(o.value.locales,e=>(z(),V(N(eC),{key:e},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,disabled:e===s.value,class:A([`group inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md border pl-1.5 pr-2 text-[12px] transition-colors`,e===s.value?`border-primary/40 bg-primary/10 cursor-default`:_(e)?`border-input bg-card text-foreground hover:bg-muted`:`border-dashed border-border bg-transparent text-muted-foreground hover:bg-muted/50`]),onClick:t=>v(e)},[U(jw,{code:e,size:14},null,8,[`code`]),H(`span`,BI,j(e),1),e===s.value?(z(),B(`span`,VI,`src`)):(z(),B(`span`,{key:1,class:A([`grid size-3.5 place-items-center rounded-[3px] border`,_(e)?`border-primary bg-primary text-primary-foreground`:`border-border text-transparent`])},[U(N(Du),{class:`size-2.5`,"stroke-width":3})],2))],10,zI)]),_:2},1024),U(N(qC),null,{default:P(()=>[W(j(e===s.value?`Source language — always imported`:_(e)?`Click to exclude`:`Click to include`),1)]),_:2},1024)]),_:2},1024))),128))])]),o.value.sampleKeys.length?(z(),B(`div`,HI,[H(`div`,UI,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2 text-[13px] text-muted-foreground transition-colors hover:bg-muted/50`,onClick:t[2]||=e=>l.value=!l.value},[U(N(ku),{class:A([`size-3.5 shrink-0 transition-transform`,l.value?`rotate-90`:``])},null,8,[`class`]),t[20]||=H(`span`,{class:`whitespace-nowrap`},`Preview sample keys`,-1),H(`span`,WI,j(g.value.glyph),1)]),l.value?(z(),B(`div`,GI,[(z(!0),B(R,null,I(o.value.sampleKeys,e=>(z(),B(`div`,{key:e.key,class:`flex items-baseline gap-3 px-3 py-1.5 text-[12px]`},[H(`span`,KI,j(e.key),1),H(`span`,qI,j(e.value),1)]))),128)),x.value>0?(z(),B(`div`,JI,` + `+j(x.value.toLocaleString())+` more keys `,1)):G(``,!0)])):G(``,!0)])])):G(``,!0)]),H(`div`,YI,[U(N($),{variant:`ghost`,size:`sm`,onClick:t[3]||=e=>r(`dismiss`)},{default:P(()=>[...t[21]||=[W(`Skip`,-1)]]),_:1}),U(N(eC),null,{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`label`,XI,[gr(H(`input`,{type:`checkbox`,"data-testid":`cldr-toggle`,"onUpdate:modelValue":t[4]||=e=>p.value=e,class:`size-3.5 accent-primary`},null,512),[[Fl,p.value]]),t[22]||=W(` Convert plurals to CLDR categories `,-1)])]),_:1}),U(N(qC),{class:`max-w-xs`},{default:P(()=>[...t[23]||=[W(`Rewrite exact =N plural selectors (e.g. =1) into each language's CLDR plural categories, the way Crowdin does.`,-1)]]),_:1})]),_:1}),H(`div`,ZI,[U(N($),{"data-testid":`import-btn`,disabled:b.value===0,onClick:S},{default:P(()=>[U(N(Ad),{class:`size-4`}),W(` Import `+j(b.value)+` `+j(b.value===1?`locale`:`locales`),1)]),_:1},8,[`disabled`])])])],64)):a.value===`importing`?(z(),B(R,{key:1},[U(N(dv),{class:`sr-only`},{default:P(()=>[...t[24]||=[W(`Importing translations`,-1)]]),_:1}),H(`div`,QI,[U(N($u),{class:`size-10 text-primary gf-spin`}),H(`div`,null,[t[25]||=H(`div`,{class:`text-sm font-semibold`},`Importing translations…`,-1),o.value?(z(),B(`div`,$I,` Reading `+j(o.value.keyCount.toLocaleString())+` keys across `+j(b.value)+` locales `,1)):G(``,!0)])])],64)):a.value===`done`&&d.value?(z(),B(R,{key:2},[H(`div`,eL,[H(`div`,tL,[H(`div`,nL,[U(N(Du),{class:`size-6`,"stroke-width":2.5})]),H(`div`,null,[U(N(dv),{class:`text-base font-semibold`},{default:P(()=>[...t[26]||=[W(`Import complete`,-1)]]),_:1}),U(N(ov),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[H(`span`,rL,j(d.value.keyCount.toLocaleString())+` keys`,1),t[27]||=W(` across `,-1),H(`span`,iL,j(d.value.localeCount)+` locales`,1),t[28]||=W(` imported. `,-1)]),_:1})])]),d.value.warnings.length?(z(),B(`div`,aL,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2.5 text-left`,onClick:t[5]||=e=>u.value=!u.value},[U(N(Td),{class:`size-3.5 shrink-0 text-warning`}),H(`span`,oL,j(d.value.warnings.length)+` `+j(d.value.warnings.length===1?`warning`:`warnings`),1),t[29]||=H(`span`,{class:`whitespace-nowrap text-[12px] text-warning/70`},`· import still succeeded`,-1),U(N(ku),{class:A([`ml-auto size-3.5 shrink-0 text-warning transition-transform`,u.value?`rotate-90`:``])},null,8,[`class`])]),u.value?(z(),B(`ul`,sL,[(z(!0),B(R,null,I(d.value.warnings,(e,t)=>(z(),B(`li`,{key:t,class:`px-3 py-2 text-[12px] text-muted-foreground`},j(e),1))),128))])):G(``,!0)])):G(``,!0)]),H(`div`,cL,[H(`div`,lL,[U(N($),{onClick:t[6]||=e=>r(`imported`)},{default:P(()=>[t[30]||=W(`Open editor `,-1),U(N(bu),{class:`size-4`})]),_:1})])])],64)):a.value===`error`?(z(),B(R,{key:3},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[7]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,uL,[H(`div`,dL,[H(`div`,fL,[U(N(Td),{class:`size-5`})]),H(`div`,pL,[U(N(dv),{class:`text-base font-semibold`},{default:P(()=>[...t[31]||=[W(`Couldn't import translations`,-1)]]),_:1}),U(N(ov),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[W(j(f.value),1)]),_:1})])])]),H(`div`,mL,[H(`div`,hL,[U(N($),{variant:`outline`,onClick:t[8]||=e=>r(`dismiss`)},{default:P(()=>[...t[32]||=[W(`Dismiss`,-1)]]),_:1})])])],64)):G(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),_L=`glotfile-theme`,vL=[`system`,`light`,`dark`],yL=e=>vL.includes(e);function bL(){let e=localStorage.getItem(_L);return yL(e)?e:`system`}var xL=window.matchMedia(`(prefers-color-scheme: dark)`),SL=M(xL.matches);xL.addEventListener(`change`,e=>{SL.value=e.matches});var CL=M(bL()),wL=q(()=>CL.value===`system`?SL.value:CL.value===`dark`);function TL(){document.documentElement.classList.toggle(`dark`,wL.value)}function EL(){Er(wL,TL,{immediate:!0,flush:`sync`})}function DL(e){CL.value=e,localStorage.setItem(_L,e),uf({theme:e}).catch(()=>{})}async function OL(){try{let{theme:e}=await lf();yL(e)&&e!==CL.value&&(CL.value=e,localStorage.setItem(_L,e))}catch{}}var kL={class:`flex flex-col items-center gap-0.5 rounded-lg bg-black/15 p-0.5`},AL=[`data-mode`,`aria-label`,`aria-pressed`,`onClick`],jL=F({__name:`ThemeToggle`,setup(e){let t=[{value:`light`,label:`Light`,icon:xd},{value:`system`,label:`System`,icon:nd},{value:`dark`,label:`Dark`,icon:rd}];return(e,n)=>(z(),B(`div`,kL,[(z(),B(R,null,I(t,e=>U(N(eC),{key:e.value},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"data-mode":e.value,"aria-label":e.label,"aria-pressed":N(CL)===e.value,class:A(N(lh)(`flex size-8 items-center justify-center rounded-md transition-colors`,N(CL)===e.value?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>N(DL)(e.value)},[(z(),V(ia(e.icon),{class:`size-4`}))],10,AL)]),_:2},1024),U(N(qC),{side:`right`},{default:P(()=>[W(j(e.label),1)]),_:2},1024)]),_:2},1024)),64))]))}}),ML=F({__name:`Kbd`,props:{class:{}},setup(e){return(e,t)=>(z(),B(`kbd`,{class:A(N(lh)(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground`,e.$props.class))},[L(e.$slots,`default`)],2))}}),NL=[{route:`editor`,keys:[`g`,`e`],label:`Editor`},{route:`analytics`,keys:[`g`,`a`],label:`Analytics`},{route:`glossary`,keys:[`g`,`g`],label:`Glossary`},{route:`screenshots`,keys:[`g`,`i`],label:`Screenshots`},{route:`settings`,keys:[`g`,`s`],label:`Settings`},{route:`activity`,keys:[`g`,`l`],label:`Activity`},{route:`docs`,keys:[`g`,`d`],label:`Docs`}];function PL(e,t){if(e.pending===`g`){let e=NL.find(e=>e.keys[1]===t);return{state:{pending:null},action:e?{type:`navigate`,route:e.route}:null}}return t===`g`?{state:{pending:`g`},action:null}:t===`?`?{state:{pending:null},action:{type:`toggleHelp`}}:{state:{pending:null},action:null}}var FL={class:`flex w-14 shrink-0 flex-col items-center gap-1 bg-rail py-3 text-rail-foreground`},IL=[`aria-label`,`onClick`],LL={key:0,class:`flex items-center gap-0.5`},RL={class:`mt-auto flex flex-col items-center gap-1.5`},zL={class:`font-mono text-[10px] text-rail-foreground/50`},BL=F({__name:`NavRail`,setup(e){let t=Mp(),n=[{id:`editor`,label:`Editor`,icon:Zu},{id:`analytics`,label:`Analytics`,icon:Eu},{id:`glossary`,label:`Glossary`,icon:Tu},{id:`screenshots`,label:`Screenshots`,icon:Yu},{id:`settings`,label:`Settings`,icon:md},{id:`activity`,label:`Activity`,icon:fd},{id:`docs`,label:`Docs`,icon:Cu}].map(e=>({...e,keys:NL.find(t=>t.route===e.id)?.keys}));return(e,r)=>(z(),V(N(XS),{"delay-duration":300},{default:P(()=>[H(`nav`,FL,[r[0]||=H(`div`,{class:`mb-3 flex size-9 items-center justify-center rounded-md bg-primary font-mono text-base font-semibold text-primary-foreground`},` G `,-1),(z(!0),B(R,null,I(N(n),e=>(z(),V(N(eC),{key:e.id},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"aria-label":e.label,class:A(N(lh)(`relative flex size-10 items-center justify-center rounded-md transition-colors`,N(t)===e.id?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>N(jp)(e.id)},[(z(),V(ia(e.icon),{class:`size-5`}))],10,IL)]),_:2},1024),U(N(qC),{side:`right`,class:`flex items-center gap-2`},{default:P(()=>[H(`span`,null,j(e.label),1),e.keys?(z(),B(`span`,LL,[(z(!0),B(R,null,I(e.keys,(e,t)=>(z(),V(ML,{key:t},{default:P(()=>[W(j(e),1)]),_:2},1024))),128))])):G(``,!0)]),_:2},1024)]),_:2},1024))),128)),H(`div`,RL,[U(jL),H(`span`,zL,`v`+j(N(`1.0.0`)),1)])])]),_:1}))}}),VL={class:`flex flex-col gap-1`},HL={class:`flex items-center gap-1`},UL={class:`flex items-center justify-between py-1 text-sm`},WL={class:`flex items-center gap-1`},GL=F({__name:`ShortcutsDialog`,props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:[`update:open`],setup(e){let t=Xa(e,`open`);return(e,n)=>(z(),V(N(C_),{open:t.value,"onUpdate:open":n[0]||=e=>t.value=e},{default:P(()=>[U(N(NC),{class:`max-w-sm`},{default:P(()=>[U(N(PC),null,{default:P(()=>[U(N(IC),null,{default:P(()=>[...n[1]||=[W(`Keyboard shortcuts`,-1)]]),_:1})]),_:1}),H(`ul`,VL,[(z(!0),B(R,null,I(N(NL),e=>(z(),B(`li`,{key:e.route,class:`flex items-center justify-between py-1 text-sm`},[H(`span`,null,j(e.label),1),H(`span`,HL,[(z(!0),B(R,null,I(e.keys,(e,t)=>(z(),V(ML,{key:t},{default:P(()=>[W(j(e),1)]),_:2},1024))),128))])]))),128)),H(`li`,UL,[n[3]||=H(`span`,null,`Search keys`,-1),H(`span`,WL,[U(ML,null,{default:P(()=>[...n[2]||=[W(`/`,-1)]]),_:1})])])])]),_:1})]),_:1},8,[`open`]))}}),KL=M(!1),qL=1e3;function JL(){let e={pending:null},t=null;function n(){t!==null&&(clearTimeout(t),t=null)}function r(r){if(r.metaKey||r.ctrlKey||r.altKey||r.repeat)return;let i=r.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.isContentEditable))return;let a=r.key.toLowerCase(),o=!!document.querySelector(`[role="dialog"],[role="menu"],[role="listbox"]`),s=a===`?`&&KL.value;if(o&&!s)return;let c=PL(e,a);e=c.state,n(),e.pending===`g`&&(t=window.setTimeout(()=>{e={pending:null},t=null},qL));let{action:l}=c;l&&(l.type===`navigate`?jp(l.route):KL.value=!KL.value,r.preventDefault())}Gi(()=>window.addEventListener(`keydown`,r)),Yi(()=>{n(),window.removeEventListener(`keydown`,r)})}var YL={class:`flex h-screen bg-background text-foreground`},XL={class:`flex min-w-0 flex-1 flex-col`},ZL={class:`flex h-12 shrink-0 items-center justify-between border-b px-4`},QL={class:`flex min-w-0 items-center gap-3`},$L={key:0,class:`flex min-w-0 items-center gap-1.5`},eR={class:`max-w-[12rem] shrink-0 truncate font-mono text-sm font-medium`},tR={class:`truncate`},nR={key:0,class:`text-muted-foreground`},rR={class:`text-sm font-semibold`},iR={class:`font-mono`},aR={class:`flex min-h-0 flex-1 flex-col overflow-hidden`},oR=F({__name:`App`,setup(e){let t=Mp();JL();let n=un(null),r=M(null),i=M([]),a=q(()=>[...i.value].sort((e,t)=>{let n=e.relDir?`${e.relDir}/${e.name}`:e.name,r=t.relDir?`${t.relDir}/${t.name}`:t.name;return n.localeCompare(r)})),o=M(!1),s=M(null);async function c(){n.value=await jd()}Th(c),Gi(async()=>{await c(),Ch();try{[r.value,i.value]=await Promise.all([kf(),Af()]),document.title=r.value.project?`${r.value.project} — Glotfile`:`Glotfile`}catch(e){Q.error(e.message)}n.value&&Object.keys(n.value.keys).length===0&&(o.value=!0)});function l(){location.reload()}async function u(e){if(e!==r.value?.path)try{await jf(e),location.reload()}catch(e){Q.error(e.message)}}let d=q(()=>({editor:`Editor`,analytics:`Analytics`,glossary:`Glossary`,screenshots:`Screenshots`,settings:`Settings`,activity:`Activity`,docs:`Docs`})[t.value]),f=q(()=>{if(!n.value)return null;let{sourceLocale:e,locales:t}=n.value.config;return{source:e,targets:t.filter(t=>t!==e)}});return(e,n)=>(z(),V(N(XS),{"delay-duration":300},{default:P(()=>[H(`div`,YL,[U(BL),H(`div`,XL,[H(`header`,ZL,[H(`div`,QL,[r.value?(z(),B(`div`,$L,[U(N(eC),null,{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`span`,eR,j(r.value.project),1)]),_:1}),U(N(qC),{side:`bottom`,class:`font-mono`},{default:P(()=>[W(j(r.value.dir),1)]),_:1})]),_:1}),U(N(ku),{class:`size-3.5 shrink-0 text-muted-foreground`}),U(N(Qx),null,{default:P(()=>[U(N(iS),{"as-child":``},{default:P(()=>[U(N($),{variant:`outline`,size:`sm`,class:`max-w-[16rem] gap-1.5 font-mono`},{default:P(()=>[H(`span`,tR,j(r.value.name),1),U(N(Au),{class:`size-3.5 shrink-0 text-muted-foreground`})]),_:1})]),_:1}),U(N(RC),{align:`start`,class:`w-max`},{default:P(()=>[(z(!0),B(R,null,I(a.value,e=>(z(),V(N(zC),{key:e.path,class:`font-mono`,onSelect:t=>u(e.path)},{default:P(()=>[U(N(Du),{class:A([`size-4 shrink-0`,e.path===r.value.path?`opacity-100`:`opacity-0`])},null,8,[`class`]),H(`span`,null,[e.relDir?(z(),B(`span`,nR,j(e.relDir)+`/`,1)):G(``,!0),W(j(e.name),1)])]),_:2},1032,[`onSelect`]))),128))]),_:1})]),_:1})])):G(``,!0),H(`h1`,rR,j(d.value),1)]),f.value?(z(),V(N(eC),{key:0},{default:P(()=>[U(N(aC),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`shrink-0 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:n[0]||=e=>N(jp)(`settings`)},j(f.value.source)+` → `+j(f.value.targets.length)+` `+j(f.value.targets.length===1?`locale`:`locales`),1)]),_:1}),U(N(qC),{side:`bottom`,class:`max-w-[28rem] leading-relaxed`},{default:P(()=>[H(`div`,iR,j(f.value.targets.join(`, `)||`—`),1),n[4]||=H(`div`,{class:`mt-1 text-background/60`},`Click to manage in Settings`,-1)]),_:1})]),_:1})):G(``,!0)]),H(`main`,aR,[N(t)===`editor`?(z(),V(NO,{key:0})):N(t)===`analytics`?(z(),V(DA,{key:1})):N(t)===`glossary`?(z(),V($A,{key:2})):N(t)===`screenshots`?(z(),V(hF,{key:3})):N(t)===`settings`?(z(),V($P,{key:4})):N(t)===`activity`?(z(),V(ZF,{key:5})):N(t)===`docs`?(z(),V(pI,{key:6})):G(``,!0)])]),U(N(hh)),U(GL,{open:N(KL),"onUpdate:open":n[1]||=e=>ln(KL)?KL.value=e:null},null,8,[`open`]),o.value?(z(),V(gL,{key:0,ref_key:`wizardRef`,ref:s,onVnodeMounted:n[2]||=e=>s.value?.init(),onDismiss:n[3]||=e=>o.value=!1,onImported:l},null,512)):G(``,!0)])]),_:1}))}});EL(),iu(oR).mount(`#app`),OL(),sO(),TT();
|
package/dist/ui/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Glotfile</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-B7j9yFsz.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-BaHu118N.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|