Files
OrbbecSDK_ROS2/docs/_ext/__pycache__/language_switch.cpython-310.pyc
T

11 lines
2.4 KiB
Plaintext
Raw Normal View History

o
!0ëi%
ã@s$dZddlmZdd„Zdd„ZdS)z¶Sphinx extension to inject language switch links between English (en) and Chinese (zh) builds.
Updated to work with GitHub Pages project URLs like /<repo>/en/... and /<repo>/zh/....
é)ÚnodescCs| dt¡dddœS)Nzdoctree-resolvedz0.4T)ÚversionÚparallel_read_safe)ÚconnectÚinject_language_switch)Úapp©rúZ/home/yalian/work/camera/ROS2_v2main_doc/OrbbecSDK_ROS2/docs/en/../_ext/language_switch.pyÚsetups 
r
cCs\|jjpd}| d¡}|rdnd}|rdnd}d|›d|›d�}| dtjd|d d
�¡dS) NÚenu中文ÚEnglishzU<div class="lang-switch docs-floating-switches__item"><a class="lang-other" href="#">z(</a> | <a class="lang-current" href="#">u:</a></div><script>(function(){function getDockHost(){ if(window.matchMedia && window.matchMedia('(max-width: 768px)').matches){ return document.body; } return document.querySelector('.wy-nav-side') || document.body;}function ensureDock(){ var dock=document.querySelector('[data-docs-switch-dock]'); var host=getDockHost(); if(!dock){ dock=document.createElement('div'); dock.className='docs-floating-switches'; dock.setAttribute('data-docs-switch-dock',''); } if(dock.parentNode!==host){ host.appendChild(dock); } return dock;}function mountSwitch(){var p=window.location.pathname;var isEn=p.indexOf('/en/')!==-1 && p.indexOf('/zh/')===-1;if(p.indexOf('/zh/')!==-1) isEn=false;var other = isEn ? p.replace(/\/en\//, '/zh/') : p.replace(/\/zh\//, '/en/');var current=p;var sw=document.querySelector('.lang-switch'); if(!sw) return;ensureDock().appendChild(sw);var o=sw.querySelector('.lang-other'); var c=sw.querySelector('.lang-current');if(isEn){ o.textContent='中文'; c.textContent='English'; } else { o.textContent='English'; c.textContent='中文'; }o.setAttribute('href', other); c.setAttribute('href', current);}if(document.body){ mountSwitch(); }else { document.addEventListener('DOMContentLoaded', mountSwitch, {once:true}); }window.addEventListener('resize', mountSwitch, {passive:true});})();</script>rÚÚhtml)Úformat)ÚconfigÚlanguageÚ
startswithÚinsertrÚraw)rÚdoctreeÚdocnameÚlangÚis_enÚ other_labelÚ
current_labelrrrr r s 
  ÿþÿ*rN)Ú__doc__Údocutilsrr