diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 2d6de8ed33..554109dab8 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -240,7 +240,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { .filter(c => selected[c.id]) .map(c => ({ name: c.name, - url: `/api/raw/?path=${path}/${c.name}${hashedToken ? `&odpt=${hashedToken}` : ''}`, + url: `/api/raw/?path=${path}/${encodeURIComponent(c.name)}${hashedToken ? `&odpt=${hashedToken}` : ''}`, })) if (files.length == 1) { diff --git a/components/SearchModal.tsx b/components/SearchModal.tsx index 6061c1209e..f02c9d49f1 100644 --- a/components/SearchModal.tsx +++ b/components/SearchModal.tsx @@ -113,12 +113,22 @@ function SearchResultItemTemplate({ } function SearchResultItemLoadRemote({ result }: { result: OdSearchResult[number] }) { - const { data, error }: SWRResponse = useSWR(`/api/item/?id=${result.id}`, fetcher) + const { data, error }: SWRResponse = useSWR( + `/api/item/?id=${result.id}`, + fetcher + ) const { t } = useTranslation() if (error) { - return + return ( + + ) } if (!data) { return ( diff --git a/components/SwitchLang.tsx b/components/SwitchLang.tsx index 2f88daa44d..d31b5f2070 100644 --- a/components/SwitchLang.tsx +++ b/components/SwitchLang.tsx @@ -21,6 +21,12 @@ const localeText = (locale: string): string => { return '🇬🇧 English' case 'zh-CN': return '🇨🇳 简体中文' + case 'hi': + return '🇮🇳 हिन्दी' + case 'tr-TR': + return '🇹🇷 Türkçe' + case 'zh-TW': + return '🇹🇼 繁體中文' default: return '🇬🇧 English' } diff --git a/components/previews/AudioPreview.tsx b/components/previews/AudioPreview.tsx index aa16b55ac0..9beb3a0fc7 100644 --- a/components/previews/AudioPreview.tsx +++ b/components/previews/AudioPreview.tsx @@ -26,6 +26,7 @@ const AudioPreview: FC<{ file: OdFileObject }> = ({ file }) => { const rapRef = useRef(null) const [playerStatus, setPlayerStatus] = useState(PlayerState.Loading) + const [playerVolume, setPlayerVolume] = useState(1) // Render audio thumbnail, and also check for broken thumbnails const thumbnail = `/api/thumbnail/?path=${asPath}&size=medium${hashedToken ? `&odpt=${hashedToken}` : ''}` @@ -35,7 +36,7 @@ const AudioPreview: FC<{ file: OdFileObject }> = ({ file }) => { // Manually get the HTML audio element and set onplaying event. // - As the default event callbacks provided by the React component does not guarantee playing state to be set // - properly when the user seeks through the timeline or the audio is buffered. - const rap = (rapRef.current as ReactAudioPlayer).audioEl.current + const rap = rapRef.current?.audioEl.current if (rap) { rap.oncanplay = () => setPlayerStatus(PlayerState.Ready) rap.onended = () => setPlayerStatus(PlayerState.Paused) @@ -45,6 +46,7 @@ const AudioPreview: FC<{ file: OdFileObject }> = ({ file }) => { rap.onseeking = () => setPlayerStatus(PlayerState.Loading) rap.onwaiting = () => setPlayerStatus(PlayerState.Loading) rap.onerror = () => setPlayerStatus(PlayerState.Paused) + rap.onvolumechange = () => setPlayerVolume(rap.volume) } }, []) @@ -98,6 +100,7 @@ const AudioPreview: FC<{ file: OdFileObject }> = ({ file }) => { ref={rapRef} controls preload="auto" + volume={playerVolume} /> diff --git a/components/previews/EPUBPreview.tsx b/components/previews/EPUBPreview.tsx index 416a970887..1f62b7a29c 100644 --- a/components/previews/EPUBPreview.tsx +++ b/components/previews/EPUBPreview.tsx @@ -56,7 +56,7 @@ const EPUBPreview: FC<{ file: OdFileObject }> = ({ file }) => { }} > fixEpub(rendition)} loadingView={} location={location} diff --git a/next-i18next.config.js b/next-i18next.config.js index ea149e4849..5cd3728916 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -3,7 +3,7 @@ const path = require('path') module.exports = { i18n: { defaultLocale: 'en', - locales: ['en', 'zh-CN'] + locales: ['en', 'zh-CN', 'hi', 'tr-TR', 'zh-TW'] }, localePath: path.resolve('public/locales'), reloadOnPrerender: process.env.NODE_ENV === 'development', diff --git a/pages/api/index.ts b/pages/api/index.ts index 771f40f453..56fe2956a3 100644 --- a/pages/api/index.ts +++ b/pages/api/index.ts @@ -134,7 +134,7 @@ export async function checkAuthRoute( if ( !compareHashedToken({ odTokenHeader: odTokenHeader, - dotPassword: odProtectedToken.data, + dotPassword: odProtectedToken.data.toString(), }) ) { return { code: 401, message: 'Password required.' } diff --git a/public/locales/hi/common.json b/public/locales/hi/common.json new file mode 100644 index 0000000000..2e80362653 --- /dev/null +++ b/public/locales/hi/common.json @@ -0,0 +1,116 @@ +{ + "- showing {{count}} page(s) ——other": "पेज {{count}} दिखा रहा है|", + "{{count}} item(s)——other": "{{count}} दिखा रहा है|", + "<0> If you are not the owner of this website, stop now, as continuing with this process may expose your personal files in OneDrive.": "<0> यदि आप इस वेबसाइट के स्वामी नहीं हैं, तो अभी रुकें, क्योंकि इस प्रक्रिया को जारी रखने से आपकी व्यक्तिगत फ़ाइलें OneDrive में दिखाई दे सकती हैं।", + "<0> If you have not specified a REDIS_URL inside your Vercel env variable, go initialise one at <3>Upstash. Docs: <6>Vercel Integration - Upstash.": "यदि आपने अपने Vercel env वेरिएबल के अंदर REDIS_URL निर्दिष्ट नहीं किया है, तो एक को इनिशियलाइज़ करें<3>Upstash दस्तावेज़ीकरण。文档:<6>Vercel 集成 - Upstash。", + "<0> If you see anything missing or incorrect, you need to reconfigure <3>/config/api.config.js and redeploy this instance.": "<0> यदि आपको कुछ गुम या गलत दिखाई देता है, तो आपको पुन: कॉन्फ़िगर करने की आवश्यकता है| <3>/config/api.config.js पुन: नियोजित करने का प्रयास करें|", + "✅ You can now proceed onto the next step: requesting your access token and refresh token.": "✅ अब आप अगले चरण पर आगे बढ़ सकते हैं: अपने एक्सेस टोकन का अनुरोध करना और टोकन रीफ्रेश करना ", + "❌ No valid code extracted.": "❌ कोई मान्य कोड नहीं निकाला गया ", + "Acquired access_token: ": "अधिग्रहीत access_token", + "Acquired refresh_token: ": "अधिग्रहीत refresh_token", + "Actions": "कार्रवाई", + "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.": "प्राधिकरण की आवश्यकता है क्योंकि कोई मान्य नहीं है <2>access_token या <5>refresh_token,इस तैनात उदाहरण पर मौजूद है। अधिकृत करने के साथ आगे बढ़ने से पहले निम्नलिखित विन्यासों की जाँच करें onedrive-vercel-index अपना Microsoft account。", + "Cancel": "रद्द करें", + "Cannot preview {{path}}": "नहीं दिखा सकता {{path}}", + "Change the raw file direct link to a URL ending with the extension of the file.": "फ़ाइल एक्सटेंशन के साथ समाप्त करने के लिए फ़ाइल का सीधा लिंक बदलें URL。", + "Check out <2>Microsoft's official explanation on the error message.": "कृपया जांचें <2>Microsoft आधिकारिक स्पष्टीकरण विस्तृत त्रुटि जानकारी के लिए。", + "Clear all": "सभी साफ करें", + "Clear all tokens?": "सभी टोकन साफ़ करें?", + "Cleared all tokens": "सभी टोकन साफ़ कर दिए", + "clearing them means that you will need to re-enter the passwords again.": "उन्हें साफ़ करने का अर्थ है कि आपको पासवर्ड फिर से दर्ज करने होंगे。", + "Copied direct link to clipboard.": "क्लिपबोर्ड पर सीधा लिंक कॉपी किया गया。", + "Copied folder permalink.": "कॉपी किया हुआ फोल्डर परमालिंक。", + "Copied raw file permalink.": "कॉपी की गई कच्ची फ़ाइल परमालिंक。", + "Copy direct link": "सीधा लिंक कॉपी करें", + "Copy folder permalink": "कॉपी फोल्डर परमालिंक", + "Copy raw file permalink": "कच्ची फ़ाइल को कॉपी करें स्थायी लिंक", + "Copy the permalink to the file to the clipboard": "फ़ाइल के परमालिंक को क्लिपबोर्ड पर कॉपी करें", + "Customise direct link": "सीधा लिंक अनुकूलित करें", + "Customise link": "लिंक अनुकूलित करें", + "Customised": "स्वनिर्धारित", + "Customised and encoded": "अनुकूलित और एन्कोडेड", + "Default": "चूक जाना", + "Do not pretend to be the site owner": "साइट के स्वामी होने का दिखावा न करें", + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "चिंता न करें, उन्हें स्टोर करने के बाद,onedrive-vercel-index आपकी साइट के लाइव होने के बाद टोकन रीफ्रेश और अपडेट का ध्यान रखेगा।", + "Download": "डाउनलोड", + "Download file": "फ़ाइल डाउनलोड करें", + "Download folder": "डाउनलोड फ़ोल्डर", + "Download selected files": "चयनित फ़ाइलें डाउनलोड करें", + "Download the file directly through OneDrive": "फ़ाइल को सीधे OneDrive के माध्यम से डाउनलोड करें", + "Downloading {{progress}}%": "डाउनलोड {{progress}}%", + "Downloading folder, refresh page to cancel": "फोल्डर डाउनलोड हो रहा है, रद्द करने के लिए पेज को रिफ्रेश करें", + "Downloading selected files, refresh page to cancel": "चयनित फ़ाइलें डाउनलोड कर रहा है, रद्द करने के लिए पृष्ठ को ताज़ा करें", + "Downloading selected files...": "चयनित फ़ाइलें डाउनलोड हो रही हैं...", + "Email": "ईमेल", + "Enter Password": "पास वर्ड दर्ज करें", + "Error storing the token": "टोकन संग्रहीत करने में त्रुटि", + "Error validating identify, restart": "पहचान सत्यापित करने में त्रुटि, पुनरारंभ करें", + "Error: {{message}}": "त्रुटि:{{message}}", + "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "फ़ोल्डर डाउनलोड करने में विफल {{path}} विफल:{{status}} {{message}} जारी रखने के लिए इसे छोड़ दिया।", + "Failed to download folder.": "फ़ोल्डर डाउनलोड करने में विफल", + "Failed to download selected files.": "चयनित फ़ाइल डाउनलोड करने में विफल", + "File is empty.": "फ़ाइल खाली है", + "File size": "फाइल का आकार", + "Filename": "फ़ाइल का नाम", + "Final step, click the button below to store these tokens persistently before they expire after {{minutes}} minutes {{seconds}} seconds. ": "अंतिम चरण, इन टोकन के समाप्त होने से पहले लगातार स्टोर करने के लिए नीचे दिए गए बटन पर क्लिक करें {{minutes}} मिनट {{seconds}} सेकंड.", + "Finished downloading folder.": "फ़ोल्डर डाउनलोड करना समाप्त हुआ", + "Finished downloading selected files.": "चयनित फ़ाइलों को डाउनलोड करना समाप्त।", + "Get tokens": "प्राप्त tokens", + "Grid": "ग्रिड", + "Hashes": "हैश", + "Home": "घर", + "If you go back home and still see the welcome page telling you to re-authenticate, ": "यदि आप घर वापस जाते हैं और फिर भी स्वागत पृष्ठ देखते हैं जो आपको पुनः प्रमाणित करने के लिए कह रहा है,", + "If you know the password, please enter it below.": "यदि आप पासवर्ड जानते हैं, तो कृपया इसे नीचे दर्ज करें।", + "Last modified": "अंतिम बार संशोधित", + "Last Modified": "अंतिम बार संशोधित", + "Last modified:": "अंतिम बार संशोधित:", + "List": "सूची", + "Load more": "और लोड करें", + "Loading ...": "लोड हो रहा है ...", + "Loading EPUB ...": "EPUB लोड हो रहा है...", + "Loading file content...": "फ़ाइल सामग्री लोड हो रही है...", + "Loading FLV extension...": "FLV एक्सटेंशन लोड हो रहा है...", + "Logout": "लॉग आउट", + "MIME type": "MIME प्रकार", + "Name": "नाम", + "No more files": "कोई और फाइल नहीं", + "Nothing here.": "यहाँ कुछ नहीं।", + "OAuth Step 1 - {{title}}": "OAuth कदम 1 - {{title}}", + "OAuth Step 2 - {{title}}": "OAuth कदम 2 - {{title}}", + "OAuth Step 3 - {{title}}": "OAuth कदम 3 - {{title}}", + "of {{count}} file(s) -——loaded——other": "का {{count}} फ़ाइलें", + "of {{count}} file(s) -——loading——other": "का…फ़ाइलें", + "Oops, that's a <1>four-oh-four.": "उफ़,यहाँ है <1>404 पृष्ठ", + "Open URL": "खोलो URL", + "Open URL{{url}}": "खोलो URL{{url}}", + "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "कृपया दबाएं <2>F12 विवरण के लिए डेवलपर टूल विंडो खोलने के लिए, या यहां जाएं <6>onedrive-vercel-index सामुदायिक चर्चा सहायता के लिए।", + "Proceed to OAuth": "OAuth के लिए आगे बढ़ें", + "Requesting tokens": "टोकन का अनुरोध", + "Restart": "पुनर्प्रारंभ करें", + "revisit home and do a hard refresh.": "घर फिर से आएं और एक कठिन रिफ्रेश करें।", + "Search ...": "खोज ...", + "Select all files": "सभी फाइलों का चयन करें", + "Select file": "इस फ़ाइल का चयन करें", + "Select files": "निम्नलिखित फाइलों का चयन करें", + "Size": "फाइल का आकार", + "Step 1/3: Preparations": "कदम 1/3:तैयार करना", + "Step 2/3: Get authorisation code": "कदम 2/3:प्राधिकरण कोड प्राप्त करें", + "Step 3/3: Get access and refresh tokens": "कदम 3/3:पहुंच प्राप्त करें और टोकन रीफ्रेश करें", + "Store tokens": "टोकन स्टोर करें", + "Stored! Going home...": "संग्रहित! घर जा रहा है...", + "Storing tokens": "टोकन जमा कर रहे हैं...", + "Success! The API returned what we needed.": "सफलता! एपीआई ने वही लौटाया जो हमें चाहिए था।", + "The authorisation code extracted is:": "निकाला गया प्राधिकरण कोड है:", + "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser willopen a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <6>the entire redirected URL down below.": "बनाए गए OAuth लिंक का उपयोग प्राधिकरण कोड प्राप्त करने के लिए किया जाता है। आवश्यक <2>प्राधिकरण कोड प्राप्त करने के लिए ऊपर दिए गए लिंक पर क्लिक करें। आपका ब्राउज़र एक नए टैब में Microsoft खाता लॉगिन पृष्ठ खोलेगा। लॉग इन करने और अपने Microsoft खाते को सत्यापित करने के बाद, आपको डोमेन नाम localhost के साथ एक रिक्त पृष्ठ पर पुनर्निर्देशित किया जाएगा। कृपया नीचे <6>पूर्ण पुनर्निर्देशित URL को कॉपी और पेस्ट करें।", + "These tokens are used to authenticate yourself into password protected folders, ": "इन टोकन का उपयोग पासवर्ड से सुरक्षित फ़ोल्डरों में खुद को प्रमाणित करने के लिए किया जाता है, ", + "These tokens may take a few seconds to populate after you click the button below. ": "आपके द्वारा नीचे दिए गए बटन पर क्लिक करने के बाद इन टोकन को पॉप्युलेट होने में कुछ सेकंड लग सकते हैं।", + "This route (the folder itself and the files inside) is password protected. ": "यह मार्ग (स्वयं फ़ोल्डर और अंदर की फाइलें) पासवर्ड से सुरक्षित है। ", + "Unavailable": "अनुपलब्ध", + "URL encoded": "URL एन्कोडेड", + "Waiting for code...": "कोड की प्रतीक्षा की जा रही है...", + "Weibo": "Weibo", + "Welcome to your new onedrive-vercel-index 🎉": "आपके नए onedrive-vercel-index में आपका स्वागत है 🎉", + "What is this?": "यह क्या है?", + "Where is the auth code? Did you follow step 2 you silly donut?": "ऑथ कोड कहां है? क्या आपने चरण 2 का पालन किया, मूर्ख डोनट?", + "Whoops, looks like we got a problem: {{error}}.": "ओह, ऐसा लगता है कि हमें कोई समस्या हो गई है:{{error}}" +} diff --git a/public/locales/tr-TR/common.json b/public/locales/tr-TR/common.json new file mode 100644 index 0000000000..592612f2ff --- /dev/null +++ b/public/locales/tr-TR/common.json @@ -0,0 +1,120 @@ +{ + "- showing {{count}} page(s) ——one": "- {{count}} sayfa gösteriliyor ", + "- showing {{count}} page(s) ——other": "- {{count}} sayfalar gösteriliyor ", + "{{count}} item(s)——one": "{{count}} öğe", + "{{count}} item(s)——other": "{{count}} öğeler", + "<0> If you are not the owner of this website, stop now, as continuing with this process may expose your personal files in OneDrive.": "<0> Bu web sitesinin sahibi değilseniz, şimdi durun, çünkü bu işleme devam etmek OneDrive'daki kişisel dosyalarınızı açığa çıkarabilir..", + "<0> If you have not specified a REDIS_URL inside your Vercel env variable, go initialise one at <3>Upstash. Docs: <6>Vercel Integration - Upstash.": "<0> Vercel env değişkeninizin içinde bir REDIS_URL belirtmediyseniz, gidin ve bir tane başlatın. <3> Upstash . Docs: <6>Vercel Entegrasyonu - Upstash.", + "<0> If you see anything missing or incorrect, you need to reconfigure <3>/config/api.config.js and redeploy this instance.": "<0> Eksik veya yanlış bir şey görürseniz, yeniden yapılandırmanız gerekir. <3>/config/api.config.js ve bu örneği yeniden dağıtın.", + "✅ You can now proceed onto the next step: requesting your access token and refresh token.": "✅ Artık bir sonraki adıma geçebilirsiniz: erişim tokeninizi isteyin ve tokeni yenileyin..", + "❌ No valid code extracted.": "❌ Geçerli Kod Çıkarılmadı.", + "Acquired access_token: ": "Alınan access_token: ", + "Acquired refresh_token: ": "Alınan refresh_token: ", + "Actions": "Hareketler", + "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.": "Geçerli olmadığı için yetkilendirme gerekli <2>access_token ya da <5>refresh_token bu dağıtılan örnekte mevcut. Onedrive-vercel-index'i kendi Microsoft hesabınızla yetkilendirmeye devam etmeden önce aşağıdaki yapılandırmaları kontrol edin.", + "Cancel": "Iptal", + "Cannot preview {{path}}": "{{path}} önizlenemiyor", + "Change the raw file direct link to a URL ending with the extension of the file.": "Ham dosyanın doğrudan bağlantısını, dosyanın uzantısıyla biten bir URL'ye değiştirin.", + "Check out <2>Microsoft's official explanation on the error message.": "Hata mesajıyla ilgili <2>Microsoft'un resmi açıklamasıni inceleyin.", + "Clear all": "Hepsini Sil", + "Clear all tokens?": "Tüm Tokenleri Sil ?", + "Cleared all tokens": "Tüm Tokenler Silindi..", + "clearing them means that you will need to re-enter the passwords again.": "Tokenleri temizlemek, şifreleri tekrar girmeniz gerekeceği anlamına gelir..", + "Copied direct link to clipboard.": "Panoya Bağlantı Kopyalandı.", + "Copied folder permalink.": "Kopyalanan Klasör Bağlantısı.", + "Copied raw file permalink.": "Kopyalanan Dosya Bağlantısı.", + "Copy direct link": "Doğrudan Bağlantıyı Kopyalayın", + "Copy folder permalink": "Klasör Bağlantısını Kopyala", + "Copy raw file permalink": "Ham dosya Bağlantısını Kopyala", + "Copy the permalink to the file to the clipboard": "Dosyanın Bağlantısını Kopyalayın", + "Customise direct link": "Doğrudan Bağlantıyı Ozelleştir", + "Customise link": "Bağlantıyı Ozelleştir", + "Customised": "Özelleştirilmiş", + "Customised and encoded": "Özelleştirilmiş ve Kodlanmış", + "Default": "Varsayılan", + "Do not pretend to be the site owner": "Site sahibiymiş gibi davranmayın..", + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "Endişelenmeyin, bunları depoladıktan sonra onedrive-vercel-index siteniz yayına girdikten sonra belirteç yenilemeleri ve güncellemeleriyle ilgilenecektir..", + "Download": "Indir", + "Download file": "Dosyayı Indir", + "Download folder": "Klasörü Indir", + "Download selected files": "Seçili Dosyaları Indir", + "Download the file directly through OneDrive": "Dosyayı doğrudan OneDrive üzerinden indirin", + "Downloading {{progress}}%": "indiriliyor {{progress}}%", + "Downloading folder, refresh page to cancel": "Klasör indiriliyor, iptal etmek için sayfayı yenileyin", + "Downloading selected files, refresh page to cancel": "Seçili dosyalar indiriliyor, iptal etmek için sayfayı yenileyin", + "Downloading selected files...": "Seçilen Dosyalar Indiriliyor...", + "Email": "Mail", + "Enter Password": "Parola Gir", + "Error storing the token": "Token Yedeklenirken Hata Oluştu", + "Error validating identify, restart": "Tanımlama Doğrulanırken Hata Oluştu, Yeniden Başlat", + "Error: {{message}}": "Hata: {{message}}", + "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "Klasör indirilemedi {{path}}: {{status}} {{message}} Devam etmek için atlandı.", + "Failed to download folder.": "Klasor Indirme tamamlanmadı.", + "Failed to download selected files.": "Seçilen Dosyalar Indirilemedi.", + "File is empty.": "Dosya Boş.", + "File size": "Dosya Boyutu", + "Filename": "Dosya Adı", + "Final step, click the button below to store these tokens persistently before they expire after {{minutes}} minutes {{seconds}} seconds. ": "Son adım, {{minutes}} dakika {{seconds}} saniye sonra sona ermeden önce bu tokenleri kalıcı olarak saklamak için aşağıdaki düğmeye tıklayın.. ", + "Finished downloading folder.": "Klasor Indirme Tamamlandı.", + "Finished downloading selected files.": "Seçilen Dosyaların Indirilmesi Tamamlandı.", + "Get tokens": "Token Al", + "Grid": "Izgara", + "Hashes": "Karmalar", + "Home": "Anasayfa", + "If you go back home and still see the welcome page telling you to re-authenticate, ": "Anasayfa'ya dönün ve yeniden kimlik doğrulamanızı söyleyen hoş geldiniz sayfasını görmeye devam edin, ", + "If you know the password, please enter it below.": "Şifreyi Biliyorsanız, lütfen Girin.", + "Last modified": "Son Düzenleme", + "Last Modified": "Son Düzenleme", + "Last modified:": "Son Düzenleme:", + "List": "Liste", + "Load more": "Daha Fazla Göster", + "Loading ...": "Yükleniyor ...", + "Loading EPUB ...": "EPUB Yükleniyor ...", + "Loading file content...": "Dosya içeriği Yükleniyor...", + "Loading FLV extension...": "FLV uzantısı Yükleniyor...", + "Logout": "Çıkış", + "MIME type": "Dosya Tipi", + "Name": "Ad", + "No more files": "Başka Dosya Yok", + "Nothing here.": "Burada Hiçbir Yok.", + "OAuth Step 1 - {{title}}": "OAuth Adım 1 - {{title}}", + "OAuth Step 2 - {{title}}": "OAuth Adım 2 - {{title}}", + "OAuth Step 3 - {{title}}": "OAuth Adım 3 - {{title}}", + "of {{count}} file(s) -——loaded——one": "{{count}} dosya -", + "of {{count}} file(s) -——loaded——other": "... {{count}} Dosyalar -", + "of {{count}} file(s) -——loading——one": "... {{count}} Dosya -", + "of {{count}} file(s) -——loading——other": "... Dosya(lar) -", + "Oops, that's a <1>four-oh-four.": "Hata, bu bir <1>four-oh-four Bilgileri Kontrol Et.", + "Open URL": "Link Aç", + "Open URL{{url}}": "URL'yi Aç {{url}}", + "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "Daha fazla ayrıntı için <2>F12 Basın Devtools'u açın veya şu adresten yardım isteyin: <6>Onedrive-vercel-index Tartışmalar.", + "Proceed to OAuth": "OAuth'a Devam Edin", + "Requesting tokens": "Token Isteniyor..", + "Restart": "Yeniden Başlat", + "revisit home and do a hard refresh.": "Anasayfa'ya Tekrar Gidin ve Yenileme Yapın.", + "Search ...": "Ara ...", + "Select all files": "Tüm dosyaları seç", + "Select file": "Dosya Seç", + "Select files": "Dosyaları seçin", + "Size": "Boyut", + "Step 1/3: Preparations": "Adım 1/3: Hazırlıklar", + "Step 2/3: Get authorisation code": "Adım 2/3: Yetkilendirme kodunu alın", + "Step 3/3: Get access and refresh tokens": "Adım 3/3: Erişim elde edin ve belirteçleri yenileyin", + "Store tokens": "Tokeni Saklayın", + "Stored! Going home...": "Yedeklendi! Anasayfa'ya Gidiliyor...", + "Storing tokens": "Token Yedeklendi", + "Success! The API returned what we needed.": "Başarılı! API ihtiyacımız Olan Değeri Döndürdü.", + "The authorisation code extracted is:": "Çıkarılan Yetkilendirme Kodu:", + "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser willopen a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <6>the entire redirected URL down below.": "Yetkilendirme kodunu almak için OAuth bağlantısı oluşturuldu. almak için yukarıdaki linke tıklayın <2>Yetkilendirme Kodu. Tarayıcınız, Microsoft'un hesap oturum açma sayfasına yeni bir sekme açacaktır. Giriş yaptıktan ve Microsoft hesabınızla kimlik doğrulaması yaptıktan sonra, localhost'ta boş bir sayfaya yönlendirileceksiniz. <6>Yönlendirilen URL'nin tamamını yapıştırın.", + "These tokens are used to authenticate yourself into password protected folders, ": "Bu tokenler, kendinizi parola korumalı klasörlerde doğrulamak için kullanılır, ", + "These tokens may take a few seconds to populate after you click the button below. ": "Aşağıdaki düğmeyi tıkladıktan sonra bu tokenlerin doldurulması birkaç saniye sürebilir. ", + "This route (the folder itself and the files inside) is password protected. ": "Klasör ve Içindeki Dosyalar Parola Ile Korumalıdır...", + "Unavailable": "Kullanım Dışı", + "URL encoded": "URL Kodlanmış", + "Waiting for code...": "Kod Bekleniyor...", + "Weibo": "Weibo", + "Welcome to your new onedrive-vercel-index 🎉": "Onedrive-vercel-index'inize hoş geldiniz 🎉", + "What is this?": "Bu Nedir?", + "Where is the auth code? Did you follow step 2 you silly donut?": "Yetkilendirme kodu nerede? 2. adımı izledin mi seni Aptal ?", + "Whoops, looks like we got a problem: {{error}}.": "Hata! Bir sorunumuz var gibi görünüyor: {{error}}." +} diff --git a/public/locales/zh-TW/common.json b/public/locales/zh-TW/common.json new file mode 100644 index 0000000000..6b6223a6dd --- /dev/null +++ b/public/locales/zh-TW/common.json @@ -0,0 +1,116 @@ +{ + "- showing {{count}} page(s) ——other": "已顯示 {{count}} 頁", + "{{count}} item(s)——other": "{{count}} 個檔案", + "<0> If you are not the owner of this website, stop now, as continuing with this process may expose your personal files in OneDrive.": "<0> 如果你不是這網站的擁有者,請立即停止操作,因為接下來的動作可能造成你的 OneDrive 私人檔案外洩。", + "<0> If you have not specified a REDIS_URL inside your Vercel env variable, go initialise one at <3>Upstash. Docs: <6>Vercel Integration - Upstash.": "<0> 如果你還沒在 Vercel 中設置環境變數 REDIS_URL,你可以從 <3>Upstash 取得一個 REDIS 來使用。操作說明:<6>Vercel 集成 - Upstash。", + "<0> If you see anything missing or incorrect, you need to reconfigure <3>/config/api.config.js and redeploy this instance.": "<0> 如果你看到有遺漏或錯誤的資訊,你需要重新編輯 <3>/config/api.config.js 並重新佈署。", + "✅ You can now proceed onto the next step: requesting your access token and refresh token.": "✅ 你現在可以進行下一步了:取得你的 access token 及 refresh token。", + "❌ No valid code extracted.": "❌ 無法取得授權碼。", + "Acquired access_token: ": "取得 access_token", + "Acquired refresh_token: ": "取得 refresh_token", + "Actions": "操作", + "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.": "系統還沒設定有效的 <2>access_token 及 <5>refresh_token,需要進行授權。在繼續對 onedrive-vercel-index 授權你的 Microsoft 帳號前,請檢查下方的配置設定是否正確。", + "Cancel": "取消", + "Cannot preview {{path}}": "無法預覽 {{path}}", + "Change the raw file direct link to a URL ending with the extension of the file.": "將檔案的直接下載連結更改為以文件附檔名結尾的 URL。", + "Check out <2>Microsoft's official explanation on the error message.": "請查看 <2>Microsoft 官方說明 來取得詳細的錯誤資訊。", + "Clear all": "清除所有密碼", + "Clear all tokens?": "清除所有密碼?", + "Cleared all tokens": "已清除所有密碼", + "clearing them means that you will need to re-enter the passwords again.": "清除後代表下次訪問時需要重新輸入密碼。", + "Copied direct link to clipboard.": "已複製直接下載的連結置剪貼簿。", + "Copied folder permalink.": "已複製資料夾的永久連結。", + "Copied raw file permalink.": "已複製檔案的永久連結。", + "Copy direct link": "複製直接下載的連結", + "Copy folder permalink": "複製資料夾的永久連結", + "Copy raw file permalink": "複製檔案的永久連結", + "Copy the permalink to the file to the clipboard": "複製檔案的永久連結到剪貼簿", + "Customise direct link": "自訂檔案直接下載連結", + "Customise link": "自訂直接下載連結", + "Customised": "自訂下載連結", + "Customised and encoded": "URL 編碼的自訂連結", + "Default": "預設", + "Do not pretend to be the site owner": "你不是網站的擁有者", + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "不用擔心,保存 token 之後,onedrive-vercel-index 會定期的幫助你更新 token", + "Download": "下載", + "Download file": "下載此檔案", + "Download folder": "下載此資料夾", + "Download selected files": "下載已選擇檔案", + "Download the file directly through OneDrive": "直接從 OneDrive 下載檔案", + "Downloading {{progress}}%": "已下載 {{progress}}%", + "Downloading folder, refresh page to cancel": "下載資料夾中,重新整理頁面將取消下載", + "Downloading selected files, refresh page to cancel": "下載選擇的檔案中,重新整理頁面將取消下載", + "Downloading selected files...": "下載選擇的檔案中…", + "Email": "電子郵件", + "Enter Password": "輸入密碼", + "Error storing the token": "儲存 token 時出現錯誤", + "Error validating identify, restart": "驗證身分時出現錯誤,請重新開始", + "Error: {{message}}": "錯誤:{{message}}", + "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "{{path}} 資料夾下載失敗:{{status}} {{message}} 已略過此錯誤並繼續下載。", + "Failed to download folder.": "資料夾下載失敗。", + "Failed to download selected files.": "您選擇的檔案下載失敗。", + "File is empty.": "資料夾是空的。", + "File size": "檔案大小", + "Filename": "檔案名稱", + "Final step, click the button below to store these tokens persistently before they expire after {{minutes}} minutes {{seconds}} seconds. ": "最後一步,在這些 tokens 於 {{minutes}} 分鐘 {{seconds}} 秒後失效前,點擊下方的按鈕來保存這個 tokens。", + "Finished downloading folder.": "下載資料夾成功。", + "Finished downloading selected files.": "下載選擇的檔案成功。", + "Get tokens": "取得 tokens", + "Grid": "圖示", + "Hashes": "hash", + "Home": "首頁", + "If you go back home and still see the welcome page telling you to re-authenticate, ": "如果你回到首頁卻還是看到歡迎畫面代表你需要重新驗證,", + "If you know the password, please enter it below.": "如果你知道密碼,請在下面輸入。", + "Last modified": "最後修改時間", + "Last Modified": "最後修改時間", + "Last modified:": "最後修改時間:", + "List": "列表", + "Load more": "載入更多", + "Loading ...": "載入中…", + "Loading EPUB ...": "載入 EPUB 中…", + "Loading file content...": "載入檔案內容中…", + "Loading FLV extension...": "載入 FLV 擴充工具中…", + "Logout": "登出", + "MIME type": "MIME 檔案類型", + "Name": "檔案名稱", + "No more files": "載入完畢", + "Nothing here.": "沒有內容。", + "OAuth Step 1 - {{title}}": "OAuth 第 1 步 - {{title}}", + "OAuth Step 2 - {{title}}": "OAuth 第 2 步 - {{title}}", + "OAuth Step 3 - {{title}}": "OAuth 第 3 步 - {{title}}", + "of {{count}} file(s) -——loaded——other": "共 {{count}} 個檔案", + "of {{count}} file(s) -——loading——other": "共…個檔案", + "Oops, that's a <1>four-oh-four.": "Oops,這裡是 <1>404 頁面。", + "Open URL": "開啟 URL", + "Open URL{{url}}": "開啟 URL{{url}}", + "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "請按下 <2>F12 開啟開發人員選項取得詳細資訊,或是前往 <6>onedrive-vercel-index Github 討論區 尋找解答。", + "Proceed to OAuth": "繼續進行 OAuth", + "Requesting tokens": "正在取得 token", + "Restart": "重新開始", + "revisit home and do a hard refresh.": "回到首頁並重新整理", + "Search ...": "搜尋…", + "Select all files": "選擇所有檔案", + "Select file": "選擇此檔案", + "Select files": "選擇以下檔案", + "Size": "檔案大小", + "Step 1/3: Preparations": "步驟 1/3:準備", + "Step 2/3: Get authorisation code": "步驟 2/3:取得授權碼", + "Step 3/3: Get access and refresh tokens": "步驟 3/3:取得 access token 及 refresh token", + "Store tokens": "儲存 tokens", + "Stored! Going home...": "已儲存!正在返回首頁…", + "Storing tokens": "正在儲存 token…", + "Success! The API returned what we needed.": "需要的 token 已成功取得!", + "The authorisation code extracted is:": "取得的授權碼為:", + "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser willopen a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <6>the entire redirected URL down below.": "創建出的這個 OAuth 連結是用來取得授權碼的。點選上方連結來取得所需的 <2>授權碼。你的瀏覽器會開啟新分頁打開 Microsoft 帳號登入畫面。在登入並驗證你的 Microsoft 帳號之後,你會被導向到一個域名叫做 localhost 的空白頁面。請將此空白頁面上<6>完整的網址 URL 複製並貼到下方。", + "These tokens are used to authenticate yourself into password protected folders, ": "這些 token 是用來確認你的身分,讓你可以開啟受密碼保護的資料夾,", + "These tokens may take a few seconds to populate after you click the button below. ": "當你點選下方按鈕後,這些 tokens 可能需要花幾秒鐘來產生。", + "This route (the folder itself and the files inside) is password protected. ": "此路徑(此資料夾及資料夾內的檔案)有密碼保護。", + "Unavailable": "無", + "URL encoded": "URL 編碼的連結", + "Waiting for code...": "等待授權碼…", + "Weibo": "微博", + "Welcome to your new onedrive-vercel-index 🎉": "歡迎來到全新的 onedrive-vercel-index 🎉", + "What is this?": "這是什麼?", + "Where is the auth code? Did you follow step 2 you silly donut?": "授權碼在哪裡?你有跟著第 2 步完成了嗎?o( ̄ヘ ̄o#)", + "Whoops, looks like we got a problem: {{error}}.": "Whoops,看來現在遇到一些問題:{{error}}" +} diff --git a/utils/getFileIcon.ts b/utils/getFileIcon.ts index 8b4318f7e7..7c6d6aa3d0 100644 --- a/utils/getFileIcon.ts +++ b/utils/getFileIcon.ts @@ -1,4 +1,4 @@ -import type { IconPrefix, IconName } from '@fortawesome/fontawesome-common-types' +import type { IconPrefix, IconName } from '@fortawesome/fontawesome-svg-core' const icons: { [key: string]: [IconPrefix, IconName] } = { image: ['far', 'file-image'],