@liberfi.io/i18n 0.1.28 → 0.1.30
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.
- package/README.md +102 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -1,6 +1,85 @@
|
|
|
1
1
|
# @liberfi.io/i18n
|
|
2
2
|
|
|
3
|
-
Internationalization and
|
|
3
|
+
Internationalization and CLI tools for Liberfi React SDK. Built on the i18next ecosystem, this package provides locale management, language detection, async resource loading, and CLI tools for translation workflows. Consumed by `@liberfi.io/react-app` and downstream apps.
|
|
4
|
+
|
|
5
|
+
## Design Philosophy
|
|
6
|
+
|
|
7
|
+
- **Inversion of Control** — Side effects (e.g. language-change callbacks, resource loading URLs) are injected via props/options rather than hardcoded. The `Backend` class receives its i18n instance via constructor injection for testability.
|
|
8
|
+
- **Provider-optional** — The package exports a singleton `i18n` instance with sensible defaults (English fallback). Components work without `LocaleProvider`; the provider adds resource loading, language switching callbacks, and context-based configuration.
|
|
9
|
+
- **Separation of concerns** — Pure utility functions (`parseI18nLang`, `removeLangPrefix`, etc.) live in `utils/` with no dependencies on React or i18n state, making them usable in both client and server contexts.
|
|
10
|
+
- **Single source of truth** — All locale types, enums, and default language data are defined once in `types.ts` and `constant.ts`, shared across client and server entry points.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @liberfi.io/i18n
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Peer dependencies: `react >= 18`, `react-dom >= 18`.
|
|
19
|
+
|
|
20
|
+
## API Reference
|
|
21
|
+
|
|
22
|
+
### Components
|
|
23
|
+
|
|
24
|
+
| Component | Props | Description |
|
|
25
|
+
| ---------------- | --------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `LocaleProvider` | `LocaleProviderProps` | Wraps the app with i18next context, manages resource loading, language detection, and exposes `LocaleContext`. |
|
|
27
|
+
|
|
28
|
+
**`LocaleProviderProps`**:
|
|
29
|
+
|
|
30
|
+
| Prop | Type | Description |
|
|
31
|
+
| ------------------------- | ------------------------------------- | ------------------------------------------------------------ |
|
|
32
|
+
| `locale` | `LocaleCode` | Current locale to force. |
|
|
33
|
+
| `resource` | `Record<string, string>` | Resource bundle for the current locale. |
|
|
34
|
+
| `resources` | `Resources` | All synchronously loaded resources keyed by locale. |
|
|
35
|
+
| `supportedLanguages` | `LocaleCode[]` | Subset of `defaultLanguages` to expose. |
|
|
36
|
+
| `convertDetectedLanguage` | `(lang: string) => LocaleCode` | Custom conversion for the detected browser language. |
|
|
37
|
+
| `backend` | `BackendOptions` | Options for async resource loading via HTTP (`loadPath`). |
|
|
38
|
+
| `languages` | `Language[]` | Fully custom language list (overrides `supportedLanguages`). |
|
|
39
|
+
| `beforeLanguageChange` | `(lang: LocaleCode) => Promise<void>` | Called before language switch (e.g. load resources). |
|
|
40
|
+
| `afterLanguageChange` | `(lang: LocaleCode) => Promise<void>` | Called after language switch (e.g. update cookie/URL). |
|
|
41
|
+
|
|
42
|
+
### Hooks
|
|
43
|
+
|
|
44
|
+
| Hook | Return | Description |
|
|
45
|
+
| ------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
46
|
+
| `useTranslation(ns?, options?)` | `UseTranslationResponse` | Wraps `react-i18next`'s `useTranslation`, auto-falls back to the singleton i18n instance when used outside `I18nextProvider`. |
|
|
47
|
+
| `useLocale()` | `LocaleCode` | Returns the current locale code and re-renders on language change. |
|
|
48
|
+
| `useChangeLocale()` | `(locale: LocaleCode) => Promise<void>` | Returns a function that triggers `beforeLanguageChange` → `i18n.changeLanguage` → `afterLanguageChange`. |
|
|
49
|
+
| `useLocaleContext()` | `LocaleContextState` | Access `languages`, `beforeLanguageChange`, `afterLanguageChange` from context. |
|
|
50
|
+
|
|
51
|
+
### Utilities
|
|
52
|
+
|
|
53
|
+
| Function | Signature | Description |
|
|
54
|
+
| --------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
55
|
+
| `parseI18nLang` | `(lang: string, localeCodes?: LocaleCode[], defaultLang?: LocaleCode) => string` | Normalize a browser language string (e.g. `en-US`) to a supported locale code. |
|
|
56
|
+
| `getLocalePathFromPathname` | `(pathname: string, localeCodes?: string[]) => string \| null` | Extract the locale segment from a URL pathname (e.g. `/en/markets` → `"en"`). |
|
|
57
|
+
| `removeLangPrefix` | `(pathname: string, localeCodes?: string[]) => string` | Strip the locale prefix from a pathname. |
|
|
58
|
+
| `generatePath` | `(params: { path: string; locale?: string; search?: string }) => string` | Build a localized URL path with locale prefix and search params. |
|
|
59
|
+
|
|
60
|
+
### Types & Enums
|
|
61
|
+
|
|
62
|
+
| Export | Description |
|
|
63
|
+
| ---------------------- | --------------------------------------------------------------------------------- |
|
|
64
|
+
| `LocaleEnum` | Enum of all 16 supported locale codes. |
|
|
65
|
+
| `LocaleCode` | `keyof typeof LocaleEnum \| (string & {})` — locale code type allowing extension. |
|
|
66
|
+
| `Language` | `{ localCode: LocaleCode; displayName: string }` |
|
|
67
|
+
| `Resources<T>` | Map of `LocaleCode` → partial locale messages, optionally extended with `T`. |
|
|
68
|
+
| `LocaleMessages` | Full English message type merged with `ExtendLocaleMessages`. |
|
|
69
|
+
| `ExtendLocaleMessages` | `Record<"extend.${string}", string>` — type for custom extension keys. |
|
|
70
|
+
| `BackendOptions` | `{ loadPath: (lang, ns) => string \| string[] }` |
|
|
71
|
+
| `LocaleContextState` | Context shape: `languages`, `beforeLanguageChange`, `afterLanguageChange`. |
|
|
72
|
+
|
|
73
|
+
### Constants
|
|
74
|
+
|
|
75
|
+
| Export | Value | Description |
|
|
76
|
+
| --------------------- | ------------------------ | ---------------------------------------------- |
|
|
77
|
+
| `defaultLanguages` | `Language[]` | All 16 supported languages with display names. |
|
|
78
|
+
| `defaultLng` | `"en"` | Default fallback language. |
|
|
79
|
+
| `defaultNS` | `"translation"` | Default i18next namespace. |
|
|
80
|
+
| `i18nLocalStorageKey` | `"liberfi_i18nLng"` | localStorage key for persisted language. |
|
|
81
|
+
| `i18nCookieKey` | `"liberfi_i18nLng"` | Cookie key for persisted language. |
|
|
82
|
+
| `en` | `Record<string, string>` | Built-in English translations. |
|
|
4
83
|
|
|
5
84
|
## Integration Guide
|
|
6
85
|
|
|
@@ -332,3 +411,25 @@ Example:
|
|
|
332
411
|
```bash
|
|
333
412
|
npx @liberfi.io/i18n mergeJson ./dist/locales1 ./dist/locales2
|
|
334
413
|
```
|
|
414
|
+
|
|
415
|
+
## Testing
|
|
416
|
+
|
|
417
|
+
Run unit tests:
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
pnpm test
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Tests cover:
|
|
424
|
+
|
|
425
|
+
- **Utility functions** — `parseI18nLang`, `getLocalePathFromPathname`, `removeLangPrefix`, `generatePath`
|
|
426
|
+
- **Backend class** — async resource fetching, caching, error handling
|
|
427
|
+
- **React hooks** — `useLocale`, `useChangeLocale` lifecycle and state updates
|
|
428
|
+
- **LocaleProvider** — rendering, resource injection, language switching, context propagation
|
|
429
|
+
|
|
430
|
+
## Future Improvements
|
|
431
|
+
|
|
432
|
+
- Accept an `i18n` instance prop on `LocaleProvider` instead of relying on the module-level singleton, enabling multiple isolated i18n contexts.
|
|
433
|
+
- Add `onError` callback to `BackendOptions` for caller-controlled error handling instead of `console.warn`.
|
|
434
|
+
- Expose loading/error state from `Backend` so consumers can show loading indicators.
|
|
435
|
+
- Consider lazy-loading locale modules to reduce initial bundle size for apps that only need a subset of languages.
|
package/dist/index.js
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
1. Search for @BotFather on Telegram
|
|
8
8
|
2. Send /newbot to create a bot and get Token
|
|
9
9
|
3. Enter the Bot Token here and save
|
|
10
|
-
4. Add the bot to your group/channel`,"channels.forms.socials.telegram.placeholder":"Enter your Telegram Bot Token","channels.list.title":"Channel List","channels.trending.title":"Trending Channels","channels.my.title":"My Channels","channels.subscribe.submit":"Subscribe","channels.subscribe.error":"Subscribe channel error","channels.subscribe.success":"Subscribe channel successfully","channels.unsubscribe.submit":"Subscribed","channels.unsubscribe.error":"Unsubscribe channel error","channels.unsubscribe.success":"Unsubscribe channel successfully","channels.subscribed.title":"Subscribed Channels","channels.create.title":"Create Channel","channels.create.success":"Channel created successfully","channels.create.error":"Create channel error","channels.create.eligibility.title":"Check Eligibility","channels.create.eligibility.description":"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.","channels.create.eligibility.xConnection":"X Account Connection","channels.create.eligibility.connected":"Connected as","channels.create.eligibility.notConnected":"No X account connected","channels.create.eligibility.connect":"Connect X Account","channels.create.eligibility.disconnect":"Disconnect","channels.create.eligibility.verifying":"Verifying eligibility...","channels.create.eligibility.requirementsTitle":"Eligibility Requirements","channels.create.eligibility.followersCount":"Followers Count","channels.create.eligibility.accountAge":"Account Age","channels.create.eligibility.behaviorScore":"Behavior Score","channels.create.eligibility.clean":"Clean","channels.create.eligibility.allPassed":"All eligibility checks passed! You can now create a channel.","channels.create.eligibility.failed":"Some requirements are not met. Please check your account.","channels.update.title":"Update Channel","channels.update.success":"Channel updated successfully","channels.update.error":"Update channel error","channels.info.walletCount":"Wallet Count","channels.info.subscribeCount":"Subscribe Count","channels.info.createdAt":"created at","channels.info.updatedAt":"last updated at","channels.stats.7dTxs.title":"7D TXs","channels.stats.7dTxs.hint":"7 Days Transactions","channels.stats.7dPnl.title":"7D PnL","channels.stats.7dPnl.hint":"7 Days Profit and Loss","channels.stats.7dWr.title":"7D WR","channels.stats.7dWr.hint":"7 Days Winning Rate","channels.detail.title":"Channel Detail","channels.detail.notfound":"Channel not found","channels.events.title":"Channel Events","channels.events.empty":"No events yet","channels.events.walletTrade.buy":"bought","channels.events.walletTrade.sell":"sold","channels.events.walletTrade.got":"got","channels.events.walletTrade.cost":"cost","channels.events.walletTrade.price":"price"};var H={"common.cancel":"Cancel","common.confirm":"Confirm","common.reset":"Reset","common.apply":"Apply","common.ok":"OK","common.yes":"Yes","common.no":"No","common.all":"All","common.buy":"Buy","common.sell":"Sell","common.long":"Long","common.short":"Short","common.edit":"Edit","common.save":"Save","common.add":"Add","common.delete":"Delete","common.tips":"Tips","common.max":"Max","common.download":"Download","common.copy":"Copy","common.copy.failed":"Copy failed","common.copy.copied":"Copied to clipboard","common.share":"Share","common.export":"Export","common.empty":"No data","common.unauthenticated":"Please sign in to continue","common.signIn":"Sign In","common.signOut":"Sign Out","common.resolution.1s":"1s","common.resolution.15s":"15s","common.resolution.30s":"30s","common.resolution.1m":"1m","common.resolution.5m":"5m","common.resolution.15m":"15m","common.resolution.30m":"30m","common.resolution.1h":"1h","common.resolution.4h":"4h","common.resolution.12h":"12h","common.resolution.24h":"24h","common.upload.submit":"Upload","common.upload.resubmit":"Reupload","common.upload.error":"Upload error","common.loadingMore":"Loading more...","common.continue":"Continue","common.months":"months","common.days":"days"};var B={"mediaTrack.tweets.translate.show":"Show Translation","mediaTrack.tweets.translate.hide":"Hide Translation","mediaTrack.tweets.expand":"Expand","mediaTrack.tweets.collapse":"Collapse"};var R={"portfolio.tabs.spot":"Spot","portfolio.tabs.perps":"Perps","portfolio.tabs.prediction":"Prediction","portfolio.address.allWallets":"All Wallets","portfolio.address.aggregated":"Aggregated","portfolio.address.copy":"Copy Address","portfolio.address.copied":"Address copied","portfolio.address.owner":"Owner","portfolio.address.viewing":"Viewing","portfolio.address.search.placeholder":"Search wallet address\u2026","portfolio.address.search.view":"View","portfolio.address.search.invalid":"Enter a valid address","portfolio.balance.uPnl":"uPNL","portfolio.balance.realized":"Realized","portfolio.balance.gas":"Gas","portfolio.curve.netWorth":"Net Worth","portfolio.curve.pnl":"PNL","portfolio.curve.noData":"Not enough data","portfolio.distribution.title":"Distribution","portfolio.distribution.other":"Other","portfolio.viewing.banner":"Viewing external portfolio","portfolio.viewing.back":"Back to My Portfolio","portfolio.spot.holdings":"Holdings","portfolio.spot.history":"History","portfolio.spot.search.placeholder":"Search token\u2026","portfolio.spot.hideSmall":"Hide small","portfolio.spot.group.tokens":"Tokens","portfolio.spot.header.asset":"Asset","portfolio.spot.header.balance":"Balance","portfolio.spot.header.price":"Price","portfolio.spot.header.value":"Value","portfolio.spot.header.24h":"24h","portfolio.spot.empty":"No tokens found","portfolio.spot.empty.hint":"Your spot tokens will appear here","portfolio.spot.history.header.type":"Type","portfolio.spot.history.header.detail":"Detail","portfolio.spot.history.header.amount":"Amount","portfolio.spot.history.header.value":"Value","portfolio.spot.history.header.time":"Time","portfolio.spot.history.header.txHash":"TxHash","portfolio.spot.history.type.swap":"Swap","portfolio.spot.history.type.send":"Send","portfolio.spot.history.type.receive":"Receive","portfolio.perps.openPositions":"Open Positions","portfolio.perps.tradeHistory":"Trade History","portfolio.perps.closeAll":"Close All","portfolio.perps.close":"Close","portfolio.perps.closeAll.confirm":"Close all positions? This will route to each protocol to execute.","portfolio.perps.closeAll.confirmBtn":"Confirm Close All","portfolio.perps.closeAll.cancel":"Cancel","portfolio.perps.header.pair":"Pair / Side","portfolio.perps.header.size":"Size","portfolio.perps.header.entry":"Entry","portfolio.perps.header.mark":"Mark","portfolio.perps.header.uPnl":"uPNL","portfolio.perps.search.placeholder":"Search pair\u2026","portfolio.perps.empty":"No open positions","portfolio.perps.empty.hint":"Start trading \u2192","portfolio.perps.history.header.pair":"Pair","portfolio.perps.history.header.side":"Side","portfolio.perps.history.header.size":"Size","portfolio.perps.history.header.pnl":"PNL","portfolio.perps.history.header.closePrice":"Close Price","portfolio.perps.history.header.time":"Time","portfolio.prediction.activeBets":"Active Bets","portfolio.prediction.settled":"Settled","portfolio.prediction.sellAll":"Sell All","portfolio.prediction.sell":"Sell","portfolio.prediction.sellAll.confirm":"Sell all positions? This will route to each platform to execute.","portfolio.prediction.sellAll.confirmBtn":"Confirm Sell All","portfolio.prediction.sellAll.cancel":"Cancel","portfolio.prediction.header.market":"Market / Source","portfolio.prediction.header.position":"Position","portfolio.prediction.header.stake":"Stake","portfolio.prediction.header.potential":"Potential","portfolio.prediction.header.status":"Status","portfolio.prediction.search.placeholder":"Search market\u2026","portfolio.prediction.empty":"No active bets","portfolio.prediction.empty.hint":"Explore prediction markets \u2192","portfolio.prediction.settled.header.market":"Market","portfolio.prediction.settled.header.source":"Source","portfolio.prediction.settled.header.position":"Position","portfolio.prediction.settled.header.stake":"Stake","portfolio.prediction.settled.header.result":"Result","portfolio.prediction.settled.header.payout":"Payout","portfolio.connectWallet":"Connect Wallet","portfolio.connectWallet.hint":"Connect your wallet to view your portfolio","portfolio.error.load":"Failed to load portfolio data","portfolio.error.retry":"Retry"};var F={"predict.categories.trending":"Trending","predict.categories.allMarkets":"All Markets","predict.event.status.closed":"Closed","predict.event.status.live":"Live","predict.event.status.pending":"Pending","predict.event.volume":"vol","predict.event.endDate":"Ends {{date}}","predict.event.rules":"Rules","predict.event.rules.collapse":"Collapse","predict.event.rules.expand":"Expand all","predict.event.showMore":"Show More","predict.event.back":"Back","predict.event.moreMarkets":"+{{count}} more","predict.market.table.outcome":"Outcome","predict.market.table.chance":"Chance","predict.market.table.actions":"Actions","predict.market.action.yes":"Yes {{price}}\xA2","predict.market.action.no":"No {{price}}\xA2","predict.market.yes":"Yes","predict.market.no":"No","predict.market.sharesYes":"{{shares}} Yes","predict.market.sharesNo":"{{shares}} No","predict.market.tradeYes":"Trade Yes","predict.market.tradeNo":"Trade No","predict.market.graph":"Graph","predict.trade.action":"Trade","predict.trade.buy":"Buy","predict.trade.sell":"Sell","predict.trade.yes":"Yes","predict.trade.no":"No","predict.trade.limit":"Limit","predict.trade.market":"Market","predict.trade.price":"Price","predict.trade.amount":"Amount","predict.trade.contracts":"Contracts","predict.trade.estimatedCost":"Est. Cost","predict.trade.potentialPayout":"Potential Payout","predict.trade.potentialProfit":"Potential Profit","predict.trade.potentialWin":"Potential Win","predict.trade.estimatedReceive":"Est. Receive","predict.trade.balance":"Available Balance","predict.trade.bestBid":"Bid","predict.trade.bestAsk":"Ask","predict.trade.priceImpact":"Price Impact","predict.trade.quoteError":"Unable to get quote. Please try again.","predict.trade.connectWallet":"Connect Wallet","predict.trade.submitting":"Submitting\u2026","predict.trade.submitSuccess":"Transaction submitted successfully!","predict.trade.submitError":"Transaction failed. Please try again.","predict.orderBook.title":"Order Book","predict.orderBook.empty":"No orders yet","predict.orderBook.type":"Type","predict.orderBook.price":"Price","predict.orderBook.contracts":"Contracts","predict.orderBook.qty":"Qty","predict.orderBook.total":"Total","predict.orderBook.spread":"Spread","predict.openOrders.title":"Open Orders","predict.openOrders.empty":"No open orders","predict.openOrders.side":"Side","predict.openOrders.outcome":"Outcome","predict.openOrders.type":"Type","predict.openOrders.price":"Price","predict.openOrders.filled":"Filled","predict.openOrders.status":"Status","predict.openOrders.time":"Time","predict.openOrders.cancel":"Cancel","predict.tradeHistory.title":"Trade History","predict.tradeHistory.empty":"No trades yet","predict.tradeHistory.side":"Side","predict.tradeHistory.outcome":"Outcome","predict.tradeHistory.price":"Price","predict.tradeHistory.qty":"Qty","predict.tradeHistory.total":"Total","predict.tradeHistory.fee":"Fee","predict.tradeHistory.time":"Time","predict.positions.title":"Positions","predict.positions.empty":"No positions","predict.positions.market":"Market","predict.positions.outcome":"Outcome","predict.positions.qty":"Qty","predict.positions.avgCost":"Avg Cost","predict.positions.currentPrice":"Price","predict.positions.value":"Value","predict.positions.pnl":"P&L","predict.positions.totalValue":"Total Value","predict.positions.unrealizedPnl":"Unrealized P&L","predict.positions.realizedPnl":"Realized P&L","predict.pagination.prev":"Prev","predict.pagination.next":"Next","predict.pagination.page":"Page {{page}}"};var I={"scaffold.draggableModal.snapToEdge":"Drag to edge to show side panel","scaffold.draggablePanel.snapToModal":"Drag away to show floating modal","scaffold.home":"Home"};var O={"tokens.search.placeholder":"Search by token or CA...","tokens.copied.address":"Token address copied to clipboard","tokens.listHeader.token":"Token","tokens.listHeader.priceHistories":"Price Histories","tokens.listHeader.price":"Price","tokens.listHeader.priceChange":"{{resolution}}%","tokens.listHeader.marketCap":"Market Cap","tokens.listHeader.liquidity":"Liquidity","tokens.listHeader.volumes":"{{resolution}} Volumes","tokens.listHeader.txs":"{{resolution}} TXNS","tokens.listHeader.traders":"{{resolution}} Traders","tokens.listHeader.bluechip":"BlueChip","tokens.listHeader.tokenInfo":"Token Info","tokens.listHeader.actions":"Actions","tokens.listHeader.filter":"Filter","tokens.listType.trending":"Trending","tokens.listType.new":"New","tokens.listType.stocks":"Stocks","tokens.filters.protocols.title":"Protocols","tokens.filters.protocols.selectAll":"Select All","tokens.filters.protocols.unselectAll":"Unselect All","tokens.filters.keywords.title":"Search Keywords","tokens.filters.keywords.exclude.title":"Exclude Keywords","tokens.filters.keywords.placeholder":"keyword1, keyword2...","tokens.filters.stats.min":"Min","tokens.filters.stats.max":"Max","tokens.filters.stats.audits":"Audits","tokens.filters.stats.audits.holders":"Holders Count","tokens.filters.stats.audits.top10HoldingsRatio":"Top 10 Holders %","tokens.filters.stats.audits.top100HoldingsRatio":"Top 100 Holders %","tokens.filters.stats.audits.devHoldingsRatio":"Dev Holdings %","tokens.filters.stats.metrics":"Metrics","tokens.filters.stats.metrics.volumes":"{{resolution}} Volumes ($)","tokens.filters.stats.metrics.txns":"{{resolution}} Transactions","tokens.filters.stats.metrics.liquidity":"Liquidity ($)","tokens.filters.stats.metrics.marketCap":"Market Cap ($)","tokens.filters.modal.title":"Filters","tokens.tokenInfo.holders":"Holders","tokens.tokenInfo.proHolders":"Pro Holders","tokens.tokenInfo.kolHolders":"KOL Holders","tokens.tokenInfo.top10HoldingsRatio":"Top 10 Holders","tokens.tokenInfo.top100HoldingsRatio":"Top 100 Holders","tokens.tokenInfo.devHoldingsRatio":"Dev Holders","tokens.tokenInfo.sniperHoldingsRatio":"Snipers","tokens.tokenInfo.insiderHoldingsRatio":"Insiders","tokens.tokenInfo.bundleHoldingsRatio":"Bundlers","tokens.bluechip.explained":"BlueChip index is the ratio of holders who also own BlueChip tokens","tokens.pulse.new":"New","tokens.pulse.migrated":"Migrated","tokens.pulse.finalStretch":"Final Stretch","tokens.pulse.paused":"Paused","tokens.pulse.vol":"Vol","tokens.pulse.txs":"Txs"};var D={...H,...B,...F,...I,...O,...N,...R};var M=i18next.createInstance();M.use(K__default.default).use(reactI18next.initReactI18next).init({fallbackLng:k,ns:[i],defaultNS:i,interpolation:{escapeValue:false},detection:{lookupLocalStorage:S,lookupCookie:A,caches:["cookie","localStorage"],order:["cookie","localStorage","htmlTag","navigator"]},resources:{[k]:{[i]:D}}});var o=M;var u=class{constructor(e){this.options=e;this.cache=new Set;}cache;async fetchData(e){try{return await(await fetch(e)).json()}catch(r){return console.warn(`Failed to fetch locale resource bundle from ${e}:`,r),{}}}async loadLanguage(e,r){if(typeof this.options?.loadPath!="function")return;let s=this.options.loadPath(e,r);if(typeof s=="string"&&(s=[s]),!s.length)return;let n=s.filter(c=>!o.hasResourceBundle(e,r)||!this.cache.has(c)).map(async c=>{let p=await this.fetchData(c);o.addResourceBundle(e,r,p,true,true),this.cache.add(c);});await Promise.all(n);}};var C=react.createContext({languages:[],beforeLanguageChange:()=>Promise.resolve(),afterLanguageChange:()=>Promise.resolve()}),W=()=>{let a=react.useContext(C);if(!a)throw new Error("useLocaleContext must be used within a LocaleProvider");return a};function h(a,e){let r=a.split("/")[1];return e=e||Object.values(m),e.includes(r)?r:null}function f(a,e,r){e=e||Object.values(m),r=r||"en";let s=/^([a-z]{2})/i,l=a?.match(s);if(!l)return r;let n=l[1];return e.includes(a)?a:e.includes(n)?n:r}function $e(a){let{path:e,locale:r,search:s}=a,l=s||(typeof window<"u"?window.location.search:""),n=h(e);return n?`${e}${l}`:(n=r||f(o.language),`/${n}${e}${l}`)}function Qe(a,e){let r=h(a,e);return r?a.replace(new RegExp(`^/${r}(?=/)`),""):a}function Z({children:a,locale:e,resource:r,resources:s,backend:l,supportedLanguages:n,convertDetectedLanguage:c,languages:p,beforeLanguageChange:b,afterLanguageChange:x}){let[w,P]=react.useState(y),L=react.useRef(new u(l));react.useEffect(()=>{if(s){Object.entries(s).forEach(([t,d])=>{o.addResourceBundle(t,i,d,true,true);});return}r&&e&&o.addResourceBundle(e,i,r,true,true);},[e,r,s]),react.useEffect(()=>{e&&e!==o.language&&o.changeLanguage(e);},[e]),react.useEffect(()=>{Array.isArray(p)?P(p):Array.isArray(n)&&P(n.map(t=>y.find(d=>d.localCode===t)).filter(t=>!!t));},[n,p]),react.useEffect(()=>{(async()=>{let d=typeof c=="function"?c(o.language):f(o.language);await L.current.loadLanguage(d,i),d!==o.language&&await o.changeLanguage(d);})();},[o.language]);let v=react.useCallback(async t=>{await b?.(t),await L.current.loadLanguage(t,i);},[b]),T=react.useCallback(async t=>{x?.(t);},[x]),z=react.useMemo(()=>({languages:w,beforeLanguageChange:v,afterLanguageChange:T}),[w,v,T]);return jsxRuntime.jsx(C.Provider,{value:z,children:jsxRuntime.jsx(reactI18next.I18nextProvider,{i18n:o,defaultNS:i,children:a})})}function te(a,e){let r=react.useContext(reactI18next.I18nContext);return reactI18next.useTranslation(a,{i18n:r?.i18n||o,...e})}function ae(){let[a,e]=react.useState(o.language);return react.useEffect(()=>(o.on("languageChanged",e),()=>{o.off("languageChanged",e);}),[o]),a}function ne(){let{beforeLanguageChange:a,afterLanguageChange:e}=W();return react.useCallback(async s=>{await a(s),await o.changeLanguage(s),await e(s);},[a,e,o])}Object.defineProperty(exports,"createInstance",{enumerable:true,get:function(){return i18next.createInstance}});Object.defineProperty(exports,"i18next",{enumerable:true,get:function(){return i18next__default.default}});exports.LocaleContext=C;exports.LocaleEnum=m;exports.LocaleProvider=Z;exports.defaultLanguages=y;exports.defaultLng=k;exports.defaultNS=i;exports.en=D;exports.generatePath=$e;exports.getLocalePathFromPathname=h;exports.i18n=o;exports.i18nCookieKey=A;exports.i18nLocalStorageKey=S;exports.parseI18nLang=f;exports.removeLangPrefix=Qe;exports.useChangeLocale=ne;exports.useLocale=ae;exports.useLocaleContext=W;exports.useTranslation=te;Object.keys(reactI18next).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactI18next[k]}})});//# sourceMappingURL=index.js.map
|
|
10
|
+
4. Add the bot to your group/channel`,"channels.forms.socials.telegram.placeholder":"Enter your Telegram Bot Token","channels.list.title":"Channel List","channels.trending.title":"Trending Channels","channels.my.title":"My Channels","channels.subscribe.submit":"Subscribe","channels.subscribe.error":"Subscribe channel error","channels.subscribe.success":"Subscribe channel successfully","channels.unsubscribe.submit":"Subscribed","channels.unsubscribe.error":"Unsubscribe channel error","channels.unsubscribe.success":"Unsubscribe channel successfully","channels.subscribed.title":"Subscribed Channels","channels.create.title":"Create Channel","channels.create.success":"Channel created successfully","channels.create.error":"Create channel error","channels.create.eligibility.title":"Check Eligibility","channels.create.eligibility.description":"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.","channels.create.eligibility.xConnection":"X Account Connection","channels.create.eligibility.connected":"Connected as","channels.create.eligibility.notConnected":"No X account connected","channels.create.eligibility.connect":"Connect X Account","channels.create.eligibility.disconnect":"Disconnect","channels.create.eligibility.verifying":"Verifying eligibility...","channels.create.eligibility.requirementsTitle":"Eligibility Requirements","channels.create.eligibility.followersCount":"Followers Count","channels.create.eligibility.accountAge":"Account Age","channels.create.eligibility.behaviorScore":"Behavior Score","channels.create.eligibility.clean":"Clean","channels.create.eligibility.allPassed":"All eligibility checks passed! You can now create a channel.","channels.create.eligibility.failed":"Some requirements are not met. Please check your account.","channels.update.title":"Update Channel","channels.update.success":"Channel updated successfully","channels.update.error":"Update channel error","channels.info.walletCount":"Wallet Count","channels.info.subscribeCount":"Subscribe Count","channels.info.createdAt":"created at","channels.info.updatedAt":"last updated at","channels.stats.7dTxs.title":"7D TXs","channels.stats.7dTxs.hint":"7 Days Transactions","channels.stats.7dPnl.title":"7D PnL","channels.stats.7dPnl.hint":"7 Days Profit and Loss","channels.stats.7dWr.title":"7D WR","channels.stats.7dWr.hint":"7 Days Winning Rate","channels.detail.title":"Channel Detail","channels.detail.notfound":"Channel not found","channels.events.title":"Channel Events","channels.events.empty":"No events yet","channels.events.walletTrade.buy":"bought","channels.events.walletTrade.sell":"sold","channels.events.walletTrade.got":"got","channels.events.walletTrade.cost":"cost","channels.events.walletTrade.price":"price"};var H={"common.cancel":"Cancel","common.confirm":"Confirm","common.reset":"Reset","common.apply":"Apply","common.ok":"OK","common.yes":"Yes","common.no":"No","common.all":"All","common.buy":"Buy","common.sell":"Sell","common.long":"Long","common.short":"Short","common.edit":"Edit","common.save":"Save","common.add":"Add","common.delete":"Delete","common.tips":"Tips","common.max":"Max","common.download":"Download","common.copy":"Copy","common.copy.failed":"Copy failed","common.copy.copied":"Copied to clipboard","common.share":"Share","common.export":"Export","common.empty":"No data","common.unauthenticated":"Please sign in to continue","common.signIn":"Sign In","common.signOut":"Sign Out","common.resolution.1s":"1s","common.resolution.15s":"15s","common.resolution.30s":"30s","common.resolution.1m":"1m","common.resolution.5m":"5m","common.resolution.15m":"15m","common.resolution.30m":"30m","common.resolution.1h":"1h","common.resolution.4h":"4h","common.resolution.12h":"12h","common.resolution.24h":"24h","common.upload.submit":"Upload","common.upload.resubmit":"Reupload","common.upload.error":"Upload error","common.loadingMore":"Loading more...","common.continue":"Continue","common.months":"months","common.days":"days"};var B={"mediaTrack.tweets.translate.show":"Show Translation","mediaTrack.tweets.translate.hide":"Hide Translation","mediaTrack.tweets.expand":"Expand","mediaTrack.tweets.collapse":"Collapse"};var I={"portfolio.tabs.spot":"Spot","portfolio.tabs.perps":"Perps","portfolio.tabs.prediction":"Prediction","portfolio.address.allWallets":"All Wallets","portfolio.address.aggregated":"Aggregated","portfolio.address.copy":"Copy Address","portfolio.address.copied":"Address copied","portfolio.address.owner":"Owner","portfolio.address.viewing":"Viewing","portfolio.address.search.placeholder":"Search wallet address\u2026","portfolio.address.search.view":"View","portfolio.address.search.invalid":"Enter a valid address","portfolio.balance.uPnl":"uPNL","portfolio.balance.realized":"Realized","portfolio.balance.gas":"Gas","portfolio.curve.netWorth":"Net Worth","portfolio.curve.pnl":"PNL","portfolio.curve.noData":"Not enough data","portfolio.distribution.title":"Distribution","portfolio.distribution.other":"Other","portfolio.viewing.banner":"Viewing external portfolio","portfolio.viewing.back":"Back to My Portfolio","portfolio.spot.holdings":"Holdings","portfolio.spot.history":"History","portfolio.spot.search.placeholder":"Search token\u2026","portfolio.spot.hideSmall":"Hide small","portfolio.spot.group.tokens":"Tokens","portfolio.spot.header.asset":"Asset","portfolio.spot.header.balance":"Balance","portfolio.spot.header.price":"Price","portfolio.spot.header.value":"Value","portfolio.spot.header.24h":"24h","portfolio.spot.empty":"No tokens found","portfolio.spot.empty.hint":"Your spot tokens will appear here","portfolio.spot.history.header.type":"Type","portfolio.spot.history.header.detail":"Detail","portfolio.spot.history.header.amount":"Amount","portfolio.spot.history.header.value":"Value","portfolio.spot.history.header.time":"Time","portfolio.spot.history.header.txHash":"TxHash","portfolio.spot.history.type.swap":"Swap","portfolio.spot.history.type.send":"Send","portfolio.spot.history.type.receive":"Receive","portfolio.perps.openPositions":"Open Positions","portfolio.perps.tradeHistory":"Trade History","portfolio.perps.closeAll":"Close All","portfolio.perps.close":"Close","portfolio.perps.closeAll.confirm":"Close all positions? This will route to each protocol to execute.","portfolio.perps.closeAll.confirmBtn":"Confirm Close All","portfolio.perps.closeAll.cancel":"Cancel","portfolio.perps.header.pair":"Pair / Side","portfolio.perps.header.size":"Size","portfolio.perps.header.entry":"Entry","portfolio.perps.header.mark":"Mark","portfolio.perps.header.uPnl":"uPNL","portfolio.perps.search.placeholder":"Search pair\u2026","portfolio.perps.empty":"No open positions","portfolio.perps.empty.hint":"Start trading \u2192","portfolio.perps.history.header.pair":"Pair","portfolio.perps.history.header.side":"Side","portfolio.perps.history.header.size":"Size","portfolio.perps.history.header.pnl":"PNL","portfolio.perps.history.header.closePrice":"Close Price","portfolio.perps.history.header.time":"Time","portfolio.prediction.activeBets":"Active Bets","portfolio.prediction.settled":"Settled","portfolio.prediction.sellAll":"Sell All","portfolio.prediction.sell":"Sell","portfolio.prediction.sellAll.confirm":"Sell all positions? This will route to each platform to execute.","portfolio.prediction.sellAll.confirmBtn":"Confirm Sell All","portfolio.prediction.sellAll.cancel":"Cancel","portfolio.prediction.header.market":"Market / Source","portfolio.prediction.header.position":"Position","portfolio.prediction.header.stake":"Stake","portfolio.prediction.header.potential":"Potential","portfolio.prediction.header.status":"Status","portfolio.prediction.search.placeholder":"Search market\u2026","portfolio.prediction.empty":"No active bets","portfolio.prediction.empty.hint":"Explore prediction markets \u2192","portfolio.prediction.settled.header.market":"Market","portfolio.prediction.settled.header.source":"Source","portfolio.prediction.settled.header.position":"Position","portfolio.prediction.settled.header.stake":"Stake","portfolio.prediction.settled.header.result":"Result","portfolio.prediction.settled.header.payout":"Payout","portfolio.connectWallet":"Connect Wallet","portfolio.connectWallet.hint":"Connect your wallet to view your portfolio","portfolio.error.load":"Failed to load portfolio data","portfolio.error.retry":"Retry"};var R={"predict.categories.trending":"Trending","predict.categories.allMarkets":"All Markets","predict.event.status.closed":"Closed","predict.event.status.live":"Live","predict.event.status.pending":"Pending","predict.event.volume":"vol","predict.event.endDate":"Ends {{date}}","predict.event.rules":"Rules","predict.event.rules.collapse":"Collapse","predict.event.rules.expand":"Expand all","predict.event.showMore":"Show More","predict.event.back":"Back","predict.event.moreMarkets":"+{{count}} more","predict.market.table.outcome":"Outcome","predict.market.table.chance":"Chance","predict.market.table.actions":"Actions","predict.market.action.yes":"Yes {{price}}\xA2","predict.market.action.no":"No {{price}}\xA2","predict.market.yes":"Yes","predict.market.no":"No","predict.market.sharesYes":"{{shares}} Yes","predict.market.sharesNo":"{{shares}} No","predict.market.tradeYes":"Trade Yes","predict.market.tradeNo":"Trade No","predict.market.graph":"Graph","predict.trade.action":"Trade","predict.trade.buy":"Buy","predict.trade.sell":"Sell","predict.trade.yes":"Yes","predict.trade.no":"No","predict.trade.limit":"Limit","predict.trade.market":"Market","predict.trade.price":"Price","predict.trade.amount":"Amount","predict.trade.contracts":"Contracts","predict.trade.estimatedCost":"Est. Cost","predict.trade.potentialPayout":"Potential Payout","predict.trade.potentialProfit":"Potential Profit","predict.trade.potentialWin":"Potential Win","predict.trade.estimatedReceive":"Est. Receive","predict.trade.balance":"Available Balance","predict.trade.bestBid":"Bid","predict.trade.bestAsk":"Ask","predict.trade.priceImpact":"Price Impact","predict.trade.quoteError":"Unable to get quote. Please try again.","predict.trade.connectWallet":"Connect Wallet","predict.trade.submitting":"Submitting\u2026","predict.trade.submitSuccess":"Transaction submitted successfully!","predict.trade.submitError":"Transaction failed. Please try again.","predict.orderBook.title":"Order Book","predict.orderBook.empty":"No orders yet","predict.orderBook.type":"Type","predict.orderBook.price":"Price","predict.orderBook.contracts":"Contracts","predict.orderBook.qty":"Qty","predict.orderBook.total":"Total","predict.orderBook.spread":"Spread","predict.openOrders.title":"Open Orders","predict.openOrders.empty":"No open orders","predict.openOrders.side":"Side","predict.openOrders.outcome":"Outcome","predict.openOrders.type":"Type","predict.openOrders.price":"Price","predict.openOrders.filled":"Filled","predict.openOrders.status":"Status","predict.openOrders.time":"Time","predict.openOrders.cancel":"Cancel","predict.tradeHistory.title":"Trade History","predict.tradeHistory.empty":"No trades yet","predict.tradeHistory.side":"Side","predict.tradeHistory.outcome":"Outcome","predict.tradeHistory.price":"Price","predict.tradeHistory.qty":"Qty","predict.tradeHistory.total":"Total","predict.tradeHistory.fee":"Fee","predict.tradeHistory.time":"Time","predict.positions.title":"Positions","predict.positions.empty":"No positions","predict.positions.market":"Market","predict.positions.outcome":"Outcome","predict.positions.qty":"Qty","predict.positions.avgCost":"Avg Cost","predict.positions.currentPrice":"Price","predict.positions.value":"Value","predict.positions.pnl":"P&L","predict.positions.totalValue":"Total Value","predict.positions.unrealizedPnl":"Unrealized P&L","predict.positions.realizedPnl":"Realized P&L","predict.pagination.prev":"Prev","predict.pagination.next":"Next","predict.pagination.page":"Page {{page}}"};var F={"scaffold.draggableModal.snapToEdge":"Drag to edge to show side panel","scaffold.draggablePanel.snapToModal":"Drag away to show floating modal","scaffold.home":"Home"};var O={"tokens.search.placeholder":"Search by token or CA...","tokens.copied.address":"Token address copied to clipboard","tokens.listHeader.token":"Token","tokens.listHeader.priceHistories":"Price Histories","tokens.listHeader.price":"Price","tokens.listHeader.priceChange":"{{resolution}}%","tokens.listHeader.marketCap":"Market Cap","tokens.listHeader.liquidity":"Liquidity","tokens.listHeader.volumes":"{{resolution}} Volumes","tokens.listHeader.txs":"{{resolution}} TXNS","tokens.listHeader.traders":"{{resolution}} Traders","tokens.listHeader.bluechip":"BlueChip","tokens.listHeader.tokenInfo":"Token Info","tokens.listHeader.actions":"Actions","tokens.listHeader.filter":"Filter","tokens.listType.trending":"Trending","tokens.listType.new":"New","tokens.listType.stocks":"Stocks","tokens.filters.protocols.title":"Protocols","tokens.filters.protocols.selectAll":"Select All","tokens.filters.protocols.unselectAll":"Unselect All","tokens.filters.keywords.title":"Search Keywords","tokens.filters.keywords.exclude.title":"Exclude Keywords","tokens.filters.keywords.placeholder":"keyword1, keyword2...","tokens.filters.stats.min":"Min","tokens.filters.stats.max":"Max","tokens.filters.stats.audits":"Audits","tokens.filters.stats.audits.holders":"Holders Count","tokens.filters.stats.audits.top10HoldingsRatio":"Top 10 Holders %","tokens.filters.stats.audits.top100HoldingsRatio":"Top 100 Holders %","tokens.filters.stats.audits.devHoldingsRatio":"Dev Holdings %","tokens.filters.stats.metrics":"Metrics","tokens.filters.stats.metrics.volumes":"{{resolution}} Volumes ($)","tokens.filters.stats.metrics.txns":"{{resolution}} Transactions","tokens.filters.stats.metrics.liquidity":"Liquidity ($)","tokens.filters.stats.metrics.marketCap":"Market Cap ($)","tokens.filters.modal.title":"Filters","tokens.tokenInfo.holders":"Holders","tokens.tokenInfo.proHolders":"Pro Holders","tokens.tokenInfo.kolHolders":"KOL Holders","tokens.tokenInfo.top10HoldingsRatio":"Top 10 Holders","tokens.tokenInfo.top100HoldingsRatio":"Top 100 Holders","tokens.tokenInfo.devHoldingsRatio":"Dev Holders","tokens.tokenInfo.sniperHoldingsRatio":"Snipers","tokens.tokenInfo.insiderHoldingsRatio":"Insiders","tokens.tokenInfo.bundleHoldingsRatio":"Bundlers","tokens.bluechip.explained":"BlueChip index is the ratio of holders who also own BlueChip tokens","tokens.pulse.new":"New","tokens.pulse.migrated":"Migrated","tokens.pulse.finalStretch":"Final Stretch","tokens.pulse.paused":"Paused","tokens.pulse.vol":"Vol","tokens.pulse.txs":"Txs"};var D={...H,...B,...R,...F,...O,...N,...I};var M=i18next.createInstance();M.use(K__default.default).use(reactI18next.initReactI18next).init({fallbackLng:k,ns:[i],defaultNS:i,interpolation:{escapeValue:false},detection:{lookupLocalStorage:S,lookupCookie:A,caches:["cookie","localStorage"],order:["cookie","localStorage","htmlTag","navigator"]},resources:{[k]:{[i]:D}}});var r=M;var u=class{constructor(e,o){this.i18n=e;this.options=o;this.cache=new Set;}cache;async fetchData(e){try{return await(await fetch(e)).json()}catch(o){return console.warn(`Failed to fetch locale resource bundle from ${e}:`,o),{}}}async loadLanguage(e,o){if(typeof this.options?.loadPath!="function")return;let s=this.options.loadPath(e,o);if(typeof s=="string"&&(s=[s]),!s.length)return;let n=s.filter(c=>!this.i18n.hasResourceBundle(e,o)||!this.cache.has(c)).map(async c=>{let p=await this.fetchData(c);this.i18n.addResourceBundle(e,o,p,true,true),this.cache.add(c);});await Promise.all(n);}};var C=react.createContext({languages:[],beforeLanguageChange:()=>Promise.resolve(),afterLanguageChange:()=>Promise.resolve()}),W=()=>{let a=react.useContext(C);if(!a)throw new Error("useLocaleContext must be used within a LocaleProvider");return a};function h(a,e){let o=a.split("/")[1];return e=e||Object.values(m),e.includes(o)?o:null}function f(a,e,o){e=e||Object.values(m),o=o||"en";let s=/^([a-z]{2})/i,l=a?.match(s);if(!l)return o;let n=l[1];return e.includes(a)?a:e.includes(n)?n:o}function Ke(a){let{path:e,locale:o,search:s}=a,l=s||(typeof window<"u"?window.location.search:""),n=h(e);return n?`${e}${l}`:(n=o||f(r.language),`/${n}${e}${l}`)}function je(a,e){let o=h(a,e);return o?a.replace(new RegExp(`^/${o}(?=/)`),""):a}function Z({children:a,locale:e,resource:o,resources:s,backend:l,supportedLanguages:n,convertDetectedLanguage:c,languages:p,beforeLanguageChange:b,afterLanguageChange:x}){let[w,P]=react.useState(y),L=react.useRef(new u(r,l));react.useEffect(()=>{if(s){Object.entries(s).forEach(([t,d])=>{r.addResourceBundle(t,i,d,true,true);});return}o&&e&&r.addResourceBundle(e,i,o,true,true);},[e,o,s]),react.useEffect(()=>{e&&e!==r.language&&r.changeLanguage(e);},[e]),react.useEffect(()=>{Array.isArray(p)?P(p):Array.isArray(n)&&P(n.map(t=>y.find(d=>d.localCode===t)).filter(t=>!!t));},[n,p]),react.useEffect(()=>{(async()=>{let d=typeof c=="function"?c(r.language):f(r.language);await L.current.loadLanguage(d,i),d!==r.language&&await r.changeLanguage(d);})();},[r.language]);let v=react.useCallback(async t=>{await b?.(t),await L.current.loadLanguage(t,i);},[b]),T=react.useCallback(async t=>{x?.(t);},[x]),z=react.useMemo(()=>({languages:w,beforeLanguageChange:v,afterLanguageChange:T}),[w,v,T]);return jsxRuntime.jsx(C.Provider,{value:z,children:jsxRuntime.jsx(reactI18next.I18nextProvider,{i18n:r,defaultNS:i,children:a})})}function te(a,e){let o=react.useContext(reactI18next.I18nContext);return reactI18next.useTranslation(a,{i18n:o?.i18n||r,...e})}function ae(){let[a,e]=react.useState(r.language);return react.useEffect(()=>(r.on("languageChanged",e),()=>{r.off("languageChanged",e);}),[r]),a}function ne(){let{beforeLanguageChange:a,afterLanguageChange:e}=W();return react.useCallback(async s=>{await a(s),await r.changeLanguage(s),await e(s);},[a,e,r])}Object.defineProperty(exports,"createInstance",{enumerable:true,get:function(){return i18next.createInstance}});Object.defineProperty(exports,"i18next",{enumerable:true,get:function(){return i18next__default.default}});exports.LocaleContext=C;exports.LocaleEnum=m;exports.LocaleProvider=Z;exports.defaultLanguages=y;exports.defaultLng=k;exports.defaultNS=i;exports.en=D;exports.generatePath=Ke;exports.getLocalePathFromPathname=h;exports.i18n=r;exports.i18nCookieKey=A;exports.i18nLocalStorageKey=S;exports.parseI18nLang=f;exports.removeLangPrefix=je;exports.useChangeLocale=ne;exports.useLocale=ae;exports.useLocaleContext=W;exports.useTranslation=te;Object.keys(reactI18next).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return reactI18next[k]}})});//# sourceMappingURL=index.js.map
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts","../src/constant.ts","../src/locale/module/channels.ts","../src/locale/module/common.ts","../src/locale/module/mediaTrack.ts","../src/locale/module/portfolio.ts","../src/locale/module/predict.ts","../src/locale/module/scaffold.ts","../src/locale/module/tokens.ts","../src/locale/en.ts","../src/i18n.ts","../src/backend.ts","../src/context.ts","../src/utils/getLocalePathFromPathname.ts","../src/utils/parseI18nLang.ts","../src/utils/generatePath.ts","../src/utils/removeLangPrefix.ts","../src/provider.tsx","../src/useTranslation.ts","../src/useLocale.ts","../src/useChangeLocale.ts"],"names":["LocaleEnum","defaultLanguages","defaultLng","defaultNS","i18nLocalStorageKey","i18nCookieKey","channels","common","mediaTrack","portfolio","predict","scaffold","tokens","en","i18n","createInstance","LanguageDetector","initReactI18next","i18n_default","Backend","options","url","error","lang","ns","paths","promises","path","data","LocaleContext","createContext","useLocaleContext","context","useContext","getLocalePathFromPathname","pathname","localeCodes","locale","parseI18nLang","defaultLang","regex","match","matchLang","generatePath","params","search","searchUrl","localePath","removeLangPrefix","LocaleProvider","children","resource","resources","backend","supportedLanguages","convertDetectedLanguage","languagesProp","beforeLanguageChange","afterLanguageChange","languages","setLanguages","useState","backendRef","useRef","useEffect","messages","localCode","l","item","beforeLanguageChangeHandler","useCallback","afterLanguageChangeHandler","contextValue","useMemo","jsx","I18nextProvider","useTranslation","I18nContext","_useTranslation","useLocale","localeCode","setLocaleCode","useChangeLocale"],"mappings":"0WAKO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GAEVA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,EAAA,CAAK,IAAA,CAELA,CAAAA,CAAA,EAAA,CAAK,KAELA,CAAAA,CAAA,EAAA,CAAK,KAELA,CAAAA,CAAA,EAAA,CAAK,KAELA,CAAAA,CAAA,EAAA,CAAK,IAAA,CAELA,CAAAA,CAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAELA,EAAA,EAAA,CAAK,IAAA,CAhCKA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,ECHL,IAAMC,CAAAA,CAA+B,CAC1C,CAAE,SAAA,CAAA,IAAA,CAA0B,YAAa,SAAU,CAAA,CACnD,CAAE,SAAA,CAAA,IAAA,CAA0B,WAAA,CAAa,cAAK,CAAA,CAC9C,CAAE,SAAA,CAAA,IAAA,CAA0B,YAAa,oBAAM,CAAA,CAC/C,CAAE,SAAA,CAAA,IAAA,CAA0B,WAAA,CAAa,YAAU,CAAA,CACnD,CAAE,SAAA,CAAA,IAAA,CAA0B,WAAA,CAAa,oBAAM,CAAA,CAC/C,CAAE,SAAA,CAAA,IAAA,CAA0B,WAAA,CAAa,sBAAa,CAAA,CACtD,CAAE,eAA0B,WAAA,CAAa,SAAU,EACnD,CAAE,SAAA,CAAA,IAAA,CAA0B,YAAa,aAAW,CAAA,CACpD,CAAE,SAAA,CAAA,IAAA,CAA0B,WAAA,CAAa,4CAAU,CAAA,CAC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M,GAAGE,CAAQ,CAAC,CACxE,CChBO,SAAS2D,EAAAA,EAAY,CAC1B,GAAM,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAIpB,eAAqB3C,CAAAA,CAAK,QAAQ,EAEtE,OAAA8C,eAAAA,CAAU,KACR9C,CAAAA,CAAK,EAAA,CAAG,kBAAmB+D,CAAa,CAAA,CACjC,IAAM,CACX/D,CAAAA,CAAK,IAAI,iBAAA,CAAmB+D,CAAa,EAC3C,CAAA,CAAA,CACC,CAAC/D,CAAI,CAAC,EAEF8D,CACT,CCdO,SAASE,EAAAA,EAAkB,CAChC,GAAM,CAAE,qBAAAzB,CAAAA,CAAsB,mBAAA,CAAAC,CAAoB,CAAA,CAAI3B,CAAAA,GAWtD,OATqBuC,iBAAAA,CACnB,MAAOjC,CAAAA,EAAuB,CAC5B,MAAMoB,CAAAA,CAAqBpB,CAAM,EACjC,MAAMnB,CAAAA,CAAK,eAAemB,CAAM,CAAA,CAChC,MAAMqB,CAAAA,CAAoBrB,CAAM,EAClC,CAAA,CACA,CAACoB,EAAsBC,CAAAA,CAAqBxC,CAAI,CAClD,CAGF","file":"index.js","sourcesContent":["// import the original type declarations\nimport \"i18next\";\n// import all namespaces (for the default language, only)\nimport { en } from \"./locale/en\";\n\nexport enum LocaleEnum {\n /** English */\n en = \"en\",\n /** Chinese */\n zh = \"zh\",\n /** Japanese */\n ja = \"ja\",\n /** Spanish */\n es = \"es\",\n /** Korean */\n ko = \"ko\",\n /** Vietnamese */\n vi = \"vi\",\n /** German */\n de = \"de\",\n /** French */\n fr = \"fr\",\n /** Russian */\n ru = \"ru\",\n /** Indonesian */\n id = \"id\",\n /** Turkish */\n tr = \"tr\",\n /** Italian */\n it = \"it\",\n /** Portuguese */\n pt = \"pt\",\n /** Ukrainian */\n uk = \"uk\",\n /** Polish */\n pl = \"pl\",\n /** Dutch */\n nl = \"nl\",\n}\n\nexport type LocaleCode = keyof typeof LocaleEnum | (string & {});\n\nexport type Language = {\n localCode: LocaleCode;\n displayName: string;\n};\n\nexport type ExtendLocaleMessages = Record<`extend.${string}`, string>;\n\nexport type LocaleMessages = typeof en & ExtendLocaleMessages;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type Resources<T extends {} = {}> = {\n [key in LocaleCode]?: Partial<LocaleMessages & T>;\n};\n\n// https://www.i18next.com/overview/typescript#create-a-declaration-file\n// Enhance the input parameter intelliSense for the t function.\ndeclare module \"i18next\" {\n // Extend CustomTypeOptions\n interface CustomTypeOptions {\n // custom namespace type, if you changed it\n defaultNS: \"translation\";\n // custom resources type\n resources: {\n translation: LocaleMessages;\n };\n }\n}\n","import { Language, LocaleEnum } from \"./types\";\n\nexport const defaultLanguages: Language[] = [\n { localCode: LocaleEnum.en, displayName: \"English\" }, // English\n { localCode: LocaleEnum.zh, displayName: \"中文\" }, // Chinese\n { localCode: LocaleEnum.ja, displayName: \"日本語\" }, // Japanese\n { localCode: LocaleEnum.es, displayName: \"Español\" }, // Spanish\n { localCode: LocaleEnum.ko, displayName: \"한국어\" }, // Korean\n { localCode: LocaleEnum.vi, displayName: \"Tiếng Việt\" }, // Vietnamese\n { localCode: LocaleEnum.de, displayName: \"Deutsch\" }, // German\n { localCode: LocaleEnum.fr, displayName: \"Français\" }, // French\n { localCode: LocaleEnum.ru, displayName: \"Русский\" }, // Russian\n { localCode: LocaleEnum.id, displayName: \"Bahasa Indonesia\" }, // Indonesian\n { localCode: LocaleEnum.tr, displayName: \"Türkçe\" }, // Turkish\n { localCode: LocaleEnum.it, displayName: \"Italiano\" }, // Italian\n { localCode: LocaleEnum.pt, displayName: \"Português\" }, // Portuguese\n { localCode: LocaleEnum.uk, displayName: \"Українська\" }, // Ukrainian\n { localCode: LocaleEnum.pl, displayName: \"Polski\" }, // Polish\n { localCode: LocaleEnum.nl, displayName: \"Nederlands\" }, // Dutch\n];\n\nexport const defaultLng = LocaleEnum.en;\n\nexport const defaultNS = \"translation\";\n\nexport const i18nLocalStorageKey = \"liberfi_i18nLng\";\n\nexport const i18nCookieKey = \"liberfi_i18nLng\";\n","export const channels = {\n \"channels.forms.base.title\": \"Base Info\",\n \"channels.forms.base.name.label\": \"Name\",\n \"channels.forms.base.name.placeholder\": \"Please enter the channel name\",\n \"channels.forms.base.name.required\": \"Name is required\",\n \"channels.forms.base.name.min\": \"Name must be at least 1 character\",\n \"channels.forms.base.name.max\": \"Name must be less than 24 characters\",\n \"channels.forms.base.description.label\": \"Description\",\n \"channels.forms.base.description.placeholder\":\n \"Please enter the channel description\",\n \"channels.forms.base.icon.label\": \"Icon\",\n \"channels.forms.base.icon.placeholder\": \"Please upload the channel icon\",\n \"channels.forms.base.icon.hint\":\n \"A square image of at least 128x128 is suggested. File size cannot exceed 10mb.\",\n \"channels.forms.base.icon.required\": \"Icon is required\",\n \"channels.forms.base.icon.maxSize\": \"Icon size cannot exceed 10MB\",\n \"channels.forms.base.submit\": \"Create Channel\",\n \"channels.forms.base.update.submit\": \"Update Channel\",\n \"channels.forms.wallets.title\": \"Wallet Management\",\n \"channels.forms.wallets.label\": \"Add Wallets\",\n \"channels.forms.wallets.placeholder\":\n \"Text Format:\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.required\": \"Wallets are required\",\n \"channels.forms.wallets.invalid\": \"Invalid wallets format\",\n \"channels.forms.wallets.chain.required\": \"Chain is required\",\n \"channels.forms.wallets.address.required\": \"Wallet address is required\",\n \"channels.forms.wallets.address.duplicated\":\n \"There are {{count}} duplicated wallet addresses in the input\",\n \"channels.forms.wallets.address.invalid\":\n \"There are {{count}} invalid wallet addresses\",\n \"channels.forms.wallets.address.alreadyAdded\":\n \"There are {{count}} wallet addresses already added\",\n \"channels.forms.wallets.maxCount\": \"Wallet count cannot exceed 500\",\n \"channels.forms.wallets.submit\": \"Add Wallets\",\n \"channels.forms.wallets.supportedFormats\": \"Supported Formats\",\n \"channels.forms.wallets.supportedFormats.text\": \"Text\",\n \"channels.forms.wallets.supportedFormats.text.hint\":\n \"Text Format:\\n\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.addedCount\": \"added wallets\",\n \"channels.forms.wallets.list.title\": \"Added Wallets\",\n \"channels.forms.wallets.list.header.address\": \"Alias/Address\",\n \"channels.forms.wallets.list.header.balance\": \"Balance\",\n \"channels.forms.wallets.list.header.importedAt\": \"Imported At\",\n \"channels.forms.wallets.list.header.lastActiveAt\": \"Last Active At\",\n \"channels.forms.wallets.list.header.7dBuys\": \"7 Days Buys\",\n \"channels.forms.wallets.list.header.7dSells\": \"7 Days Sells\",\n \"channels.forms.wallets.list.header.actions\": \"Actions\",\n \"channels.forms.wallets.list.empty\": \"No wallets added yet\",\n \"channels.forms.wallets.list.search.placeholder\":\n \"Search by address or alias\",\n \"channels.forms.wallets.update.success\": \"Update wallets successfully\",\n \"channels.forms.wallets.update.error\": \"Update wallets error\",\n \"channels.forms.socials.title\": \"Social Medias\",\n \"channels.forms.socials.telegram.guide\":\n \"⚡️ Quick Start\\n1. Search for @BotFather on Telegram\\n2. Send /newbot to create a bot and get Token\\n3. Enter the Bot Token here and save\\n4. Add the bot to your group/channel\",\n \"channels.forms.socials.telegram.placeholder\":\n \"Enter your Telegram Bot Token\",\n \"channels.list.title\": \"Channel List\",\n \"channels.trending.title\": \"Trending Channels\",\n \"channels.my.title\": \"My Channels\",\n \"channels.subscribe.submit\": \"Subscribe\",\n \"channels.subscribe.error\": \"Subscribe channel error\",\n \"channels.subscribe.success\": \"Subscribe channel successfully\",\n \"channels.unsubscribe.submit\": \"Subscribed\",\n \"channels.unsubscribe.error\": \"Unsubscribe channel error\",\n \"channels.unsubscribe.success\": \"Unsubscribe channel successfully\",\n \"channels.subscribed.title\": \"Subscribed Channels\",\n \"channels.create.title\": \"Create Channel\",\n \"channels.create.success\": \"Channel created successfully\",\n \"channels.create.error\": \"Create channel error\",\n \"channels.create.eligibility.title\": \"Check Eligibility\",\n \"channels.create.eligibility.description\":\n \"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.\",\n \"channels.create.eligibility.xConnection\": \"X Account Connection\",\n \"channels.create.eligibility.connected\": \"Connected as\",\n \"channels.create.eligibility.notConnected\": \"No X account connected\",\n \"channels.create.eligibility.connect\": \"Connect X Account\",\n \"channels.create.eligibility.disconnect\": \"Disconnect\",\n \"channels.create.eligibility.verifying\": \"Verifying eligibility...\",\n \"channels.create.eligibility.requirementsTitle\": \"Eligibility Requirements\",\n \"channels.create.eligibility.followersCount\": \"Followers Count\",\n \"channels.create.eligibility.accountAge\": \"Account Age\",\n \"channels.create.eligibility.behaviorScore\": \"Behavior Score\",\n \"channels.create.eligibility.clean\": \"Clean\",\n \"channels.create.eligibility.allPassed\":\n \"All eligibility checks passed! You can now create a channel.\",\n \"channels.create.eligibility.failed\":\n \"Some requirements are not met. Please check your account.\",\n \"channels.update.title\": \"Update Channel\",\n \"channels.update.success\": \"Channel updated successfully\",\n \"channels.update.error\": \"Update channel error\",\n \"channels.info.walletCount\": \"Wallet Count\",\n \"channels.info.subscribeCount\": \"Subscribe Count\",\n \"channels.info.createdAt\": \"created at\",\n \"channels.info.updatedAt\": \"last updated at\",\n \"channels.stats.7dTxs.title\": \"7D TXs\",\n \"channels.stats.7dTxs.hint\": \"7 Days Transactions\",\n \"channels.stats.7dPnl.title\": \"7D PnL\",\n \"channels.stats.7dPnl.hint\": \"7 Days Profit and Loss\",\n \"channels.stats.7dWr.title\": \"7D WR\",\n \"channels.stats.7dWr.hint\": \"7 Days Winning Rate\",\n \"channels.detail.title\": \"Channel Detail\",\n \"channels.detail.notfound\": \"Channel not found\",\n \"channels.events.title\": \"Channel Events\",\n \"channels.events.empty\": \"No events yet\",\n \"channels.events.walletTrade.buy\": \"bought\",\n \"channels.events.walletTrade.sell\": \"sold\",\n \"channels.events.walletTrade.got\": \"got\",\n \"channels.events.walletTrade.cost\": \"cost\",\n \"channels.events.walletTrade.price\": \"price\",\n};\n","export const common = {\n \"common.cancel\": \"Cancel\",\n \"common.confirm\": \"Confirm\",\n \"common.reset\": \"Reset\",\n \"common.apply\": \"Apply\",\n \"common.ok\": \"OK\",\n \"common.yes\": \"Yes\",\n \"common.no\": \"No\",\n \"common.all\": \"All\",\n \"common.buy\": \"Buy\",\n \"common.sell\": \"Sell\",\n \"common.long\": \"Long\",\n \"common.short\": \"Short\",\n \"common.edit\": \"Edit\",\n \"common.save\": \"Save\",\n \"common.add\": \"Add\",\n \"common.delete\": \"Delete\",\n \"common.tips\": \"Tips\",\n \"common.max\": \"Max\",\n \"common.download\": \"Download\",\n \"common.copy\": \"Copy\",\n \"common.copy.failed\": \"Copy failed\",\n \"common.copy.copied\": \"Copied to clipboard\",\n \"common.share\": \"Share\",\n \"common.export\": \"Export\",\n \"common.empty\": \"No data\",\n \"common.unauthenticated\": \"Please sign in to continue\",\n \"common.signIn\": \"Sign In\",\n \"common.signOut\": \"Sign Out\",\n \"common.resolution.1s\": \"1s\",\n \"common.resolution.15s\": \"15s\",\n \"common.resolution.30s\": \"30s\",\n \"common.resolution.1m\": \"1m\",\n \"common.resolution.5m\": \"5m\",\n \"common.resolution.15m\": \"15m\",\n \"common.resolution.30m\": \"30m\",\n \"common.resolution.1h\": \"1h\",\n \"common.resolution.4h\": \"4h\",\n \"common.resolution.12h\": \"12h\",\n \"common.resolution.24h\": \"24h\",\n \"common.upload.submit\": \"Upload\",\n \"common.upload.resubmit\": \"Reupload\",\n \"common.upload.error\": \"Upload error\",\n \"common.loadingMore\": \"Loading more...\",\n \"common.continue\": \"Continue\",\n \"common.months\": \"months\",\n \"common.days\": \"days\",\n};\n","export const mediaTrack = {\n \"mediaTrack.tweets.translate.show\": \"Show Translation\",\n \"mediaTrack.tweets.translate.hide\": \"Hide Translation\",\n \"mediaTrack.tweets.expand\": \"Expand\",\n \"mediaTrack.tweets.collapse\": \"Collapse\",\n};\n","export const portfolio = {\n // Asset Tabs\n \"portfolio.tabs.spot\": \"Spot\",\n \"portfolio.tabs.perps\": \"Perps\",\n \"portfolio.tabs.prediction\": \"Prediction\",\n\n // Address Row\n \"portfolio.address.allWallets\": \"All Wallets\",\n \"portfolio.address.aggregated\": \"Aggregated\",\n \"portfolio.address.copy\": \"Copy Address\",\n \"portfolio.address.copied\": \"Address copied\",\n \"portfolio.address.owner\": \"Owner\",\n \"portfolio.address.viewing\": \"Viewing\",\n \"portfolio.address.search.placeholder\": \"Search wallet address…\",\n \"portfolio.address.search.view\": \"View\",\n \"portfolio.address.search.invalid\": \"Enter a valid address\",\n\n // Balance Row\n \"portfolio.balance.uPnl\": \"uPNL\",\n \"portfolio.balance.realized\": \"Realized\",\n \"portfolio.balance.gas\": \"Gas\",\n\n // Curve Card\n \"portfolio.curve.netWorth\": \"Net Worth\",\n \"portfolio.curve.pnl\": \"PNL\",\n \"portfolio.curve.noData\": \"Not enough data\",\n\n // Distribution Card\n \"portfolio.distribution.title\": \"Distribution\",\n \"portfolio.distribution.other\": \"Other\",\n\n // Viewing Mode\n \"portfolio.viewing.banner\": \"Viewing external portfolio\",\n \"portfolio.viewing.back\": \"Back to My Portfolio\",\n\n // Spot Holdings\n \"portfolio.spot.holdings\": \"Holdings\",\n \"portfolio.spot.history\": \"History\",\n \"portfolio.spot.search.placeholder\": \"Search token…\",\n \"portfolio.spot.hideSmall\": \"Hide small\",\n \"portfolio.spot.group.tokens\": \"Tokens\",\n \"portfolio.spot.header.asset\": \"Asset\",\n \"portfolio.spot.header.balance\": \"Balance\",\n \"portfolio.spot.header.price\": \"Price\",\n \"portfolio.spot.header.value\": \"Value\",\n \"portfolio.spot.header.24h\": \"24h\",\n \"portfolio.spot.empty\": \"No tokens found\",\n \"portfolio.spot.empty.hint\": \"Your spot tokens will appear here\",\n\n // Spot History\n \"portfolio.spot.history.header.type\": \"Type\",\n \"portfolio.spot.history.header.detail\": \"Detail\",\n \"portfolio.spot.history.header.amount\": \"Amount\",\n \"portfolio.spot.history.header.value\": \"Value\",\n \"portfolio.spot.history.header.time\": \"Time\",\n \"portfolio.spot.history.header.txHash\": \"TxHash\",\n \"portfolio.spot.history.type.swap\": \"Swap\",\n \"portfolio.spot.history.type.send\": \"Send\",\n \"portfolio.spot.history.type.receive\": \"Receive\",\n\n // Perps\n \"portfolio.perps.openPositions\": \"Open Positions\",\n \"portfolio.perps.tradeHistory\": \"Trade History\",\n \"portfolio.perps.closeAll\": \"Close All\",\n \"portfolio.perps.close\": \"Close\",\n \"portfolio.perps.closeAll.confirm\":\n \"Close all positions? This will route to each protocol to execute.\",\n \"portfolio.perps.closeAll.confirmBtn\": \"Confirm Close All\",\n \"portfolio.perps.closeAll.cancel\": \"Cancel\",\n \"portfolio.perps.header.pair\": \"Pair / Side\",\n \"portfolio.perps.header.size\": \"Size\",\n \"portfolio.perps.header.entry\": \"Entry\",\n \"portfolio.perps.header.mark\": \"Mark\",\n \"portfolio.perps.header.uPnl\": \"uPNL\",\n \"portfolio.perps.search.placeholder\": \"Search pair…\",\n \"portfolio.perps.empty\": \"No open positions\",\n \"portfolio.perps.empty.hint\": \"Start trading →\",\n \"portfolio.perps.history.header.pair\": \"Pair\",\n \"portfolio.perps.history.header.side\": \"Side\",\n \"portfolio.perps.history.header.size\": \"Size\",\n \"portfolio.perps.history.header.pnl\": \"PNL\",\n \"portfolio.perps.history.header.closePrice\": \"Close Price\",\n \"portfolio.perps.history.header.time\": \"Time\",\n\n // Prediction\n \"portfolio.prediction.activeBets\": \"Active Bets\",\n \"portfolio.prediction.settled\": \"Settled\",\n \"portfolio.prediction.sellAll\": \"Sell All\",\n \"portfolio.prediction.sell\": \"Sell\",\n \"portfolio.prediction.sellAll.confirm\":\n \"Sell all positions? This will route to each platform to execute.\",\n \"portfolio.prediction.sellAll.confirmBtn\": \"Confirm Sell All\",\n \"portfolio.prediction.sellAll.cancel\": \"Cancel\",\n \"portfolio.prediction.header.market\": \"Market / Source\",\n \"portfolio.prediction.header.position\": \"Position\",\n \"portfolio.prediction.header.stake\": \"Stake\",\n \"portfolio.prediction.header.potential\": \"Potential\",\n \"portfolio.prediction.header.status\": \"Status\",\n \"portfolio.prediction.search.placeholder\": \"Search market…\",\n \"portfolio.prediction.empty\": \"No active bets\",\n \"portfolio.prediction.empty.hint\": \"Explore prediction markets →\",\n \"portfolio.prediction.settled.header.market\": \"Market\",\n \"portfolio.prediction.settled.header.source\": \"Source\",\n \"portfolio.prediction.settled.header.position\": \"Position\",\n \"portfolio.prediction.settled.header.stake\": \"Stake\",\n \"portfolio.prediction.settled.header.result\": \"Result\",\n \"portfolio.prediction.settled.header.payout\": \"Payout\",\n\n // Empty / Error states\n \"portfolio.connectWallet\": \"Connect Wallet\",\n \"portfolio.connectWallet.hint\": \"Connect your wallet to view your portfolio\",\n \"portfolio.error.load\": \"Failed to load portfolio data\",\n \"portfolio.error.retry\": \"Retry\",\n};\n","export const predict = {\n // Categories\n \"predict.categories.trending\": \"Trending\",\n \"predict.categories.allMarkets\": \"All Markets\",\n\n // Event status\n \"predict.event.status.closed\": \"Closed\",\n \"predict.event.status.live\": \"Live\",\n \"predict.event.status.pending\": \"Pending\",\n\n // Event detail\n \"predict.event.volume\": \"vol\",\n \"predict.event.endDate\": \"Ends {{date}}\",\n \"predict.event.rules\": \"Rules\",\n \"predict.event.rules.collapse\": \"Collapse\",\n \"predict.event.rules.expand\": \"Expand all\",\n \"predict.event.showMore\": \"Show More\",\n \"predict.event.back\": \"Back\",\n \"predict.event.moreMarkets\": \"+{{count}} more\",\n\n // Markets table\n \"predict.market.table.outcome\": \"Outcome\",\n \"predict.market.table.chance\": \"Chance\",\n \"predict.market.table.actions\": \"Actions\",\n \"predict.market.action.yes\": \"Yes {{price}}¢\",\n \"predict.market.action.no\": \"No {{price}}¢\",\n\n // Market options\n \"predict.market.yes\": \"Yes\",\n \"predict.market.no\": \"No\",\n \"predict.market.sharesYes\": \"{{shares}} Yes\",\n \"predict.market.sharesNo\": \"{{shares}} No\",\n \"predict.market.tradeYes\": \"Trade Yes\",\n \"predict.market.tradeNo\": \"Trade No\",\n \"predict.market.graph\": \"Graph\",\n\n // Trade form\n \"predict.trade.action\": \"Trade\",\n \"predict.trade.buy\": \"Buy\",\n \"predict.trade.sell\": \"Sell\",\n \"predict.trade.yes\": \"Yes\",\n \"predict.trade.no\": \"No\",\n \"predict.trade.limit\": \"Limit\",\n \"predict.trade.market\": \"Market\",\n \"predict.trade.price\": \"Price\",\n \"predict.trade.amount\": \"Amount\",\n \"predict.trade.contracts\": \"Contracts\",\n \"predict.trade.estimatedCost\": \"Est. Cost\",\n \"predict.trade.potentialPayout\": \"Potential Payout\",\n \"predict.trade.potentialProfit\": \"Potential Profit\",\n \"predict.trade.potentialWin\": \"Potential Win\",\n \"predict.trade.estimatedReceive\": \"Est. Receive\",\n \"predict.trade.balance\": \"Available Balance\",\n \"predict.trade.bestBid\": \"Bid\",\n \"predict.trade.bestAsk\": \"Ask\",\n \"predict.trade.priceImpact\": \"Price Impact\",\n \"predict.trade.quoteError\": \"Unable to get quote. Please try again.\",\n \"predict.trade.connectWallet\": \"Connect Wallet\",\n \"predict.trade.submitting\": \"Submitting…\",\n \"predict.trade.submitSuccess\": \"Transaction submitted successfully!\",\n \"predict.trade.submitError\": \"Transaction failed. Please try again.\",\n\n // Order book\n \"predict.orderBook.title\": \"Order Book\",\n \"predict.orderBook.empty\": \"No orders yet\",\n \"predict.orderBook.type\": \"Type\",\n \"predict.orderBook.price\": \"Price\",\n \"predict.orderBook.contracts\": \"Contracts\",\n \"predict.orderBook.qty\": \"Qty\",\n \"predict.orderBook.total\": \"Total\",\n \"predict.orderBook.spread\": \"Spread\",\n\n // Open orders\n \"predict.openOrders.title\": \"Open Orders\",\n \"predict.openOrders.empty\": \"No open orders\",\n \"predict.openOrders.side\": \"Side\",\n \"predict.openOrders.outcome\": \"Outcome\",\n \"predict.openOrders.type\": \"Type\",\n \"predict.openOrders.price\": \"Price\",\n \"predict.openOrders.filled\": \"Filled\",\n \"predict.openOrders.status\": \"Status\",\n \"predict.openOrders.time\": \"Time\",\n \"predict.openOrders.cancel\": \"Cancel\",\n\n // Trade history\n \"predict.tradeHistory.title\": \"Trade History\",\n \"predict.tradeHistory.empty\": \"No trades yet\",\n \"predict.tradeHistory.side\": \"Side\",\n \"predict.tradeHistory.outcome\": \"Outcome\",\n \"predict.tradeHistory.price\": \"Price\",\n \"predict.tradeHistory.qty\": \"Qty\",\n \"predict.tradeHistory.total\": \"Total\",\n \"predict.tradeHistory.fee\": \"Fee\",\n \"predict.tradeHistory.time\": \"Time\",\n\n // Positions\n \"predict.positions.title\": \"Positions\",\n \"predict.positions.empty\": \"No positions\",\n \"predict.positions.market\": \"Market\",\n \"predict.positions.outcome\": \"Outcome\",\n \"predict.positions.qty\": \"Qty\",\n \"predict.positions.avgCost\": \"Avg Cost\",\n \"predict.positions.currentPrice\": \"Price\",\n \"predict.positions.value\": \"Value\",\n \"predict.positions.pnl\": \"P&L\",\n \"predict.positions.totalValue\": \"Total Value\",\n \"predict.positions.unrealizedPnl\": \"Unrealized P&L\",\n \"predict.positions.realizedPnl\": \"Realized P&L\",\n\n // Pagination\n \"predict.pagination.prev\": \"Prev\",\n \"predict.pagination.next\": \"Next\",\n \"predict.pagination.page\": \"Page {{page}}\",\n};\n","export const scaffold = {\n \"scaffold.draggableModal.snapToEdge\": \"Drag to edge to show side panel\",\n \"scaffold.draggablePanel.snapToModal\": \"Drag away to show floating modal\",\n \"scaffold.home\": \"Home\",\n};\n","export const tokens = {\n \"tokens.search.placeholder\": \"Search by token or CA...\",\n \"tokens.copied.address\": \"Token address copied to clipboard\",\n \"tokens.listHeader.token\": \"Token\",\n \"tokens.listHeader.priceHistories\": \"Price Histories\",\n \"tokens.listHeader.price\": \"Price\",\n \"tokens.listHeader.priceChange\": \"{{resolution}}%\",\n \"tokens.listHeader.marketCap\": \"Market Cap\",\n \"tokens.listHeader.liquidity\": \"Liquidity\",\n \"tokens.listHeader.volumes\": \"{{resolution}} Volumes\",\n \"tokens.listHeader.txs\": \"{{resolution}} TXNS\",\n \"tokens.listHeader.traders\": \"{{resolution}} Traders\",\n \"tokens.listHeader.bluechip\": \"BlueChip\",\n \"tokens.listHeader.tokenInfo\": \"Token Info\",\n \"tokens.listHeader.actions\": \"Actions\",\n \"tokens.listHeader.filter\": \"Filter\",\n \"tokens.listType.trending\": \"Trending\",\n \"tokens.listType.new\": \"New\",\n \"tokens.listType.stocks\": \"Stocks\",\n \"tokens.filters.protocols.title\": \"Protocols\",\n \"tokens.filters.protocols.selectAll\": \"Select All\",\n \"tokens.filters.protocols.unselectAll\": \"Unselect All\",\n \"tokens.filters.keywords.title\": \"Search Keywords\",\n \"tokens.filters.keywords.exclude.title\": \"Exclude Keywords\",\n \"tokens.filters.keywords.placeholder\": \"keyword1, keyword2...\",\n \"tokens.filters.stats.min\": \"Min\",\n \"tokens.filters.stats.max\": \"Max\",\n \"tokens.filters.stats.audits\": \"Audits\",\n \"tokens.filters.stats.audits.holders\": \"Holders Count\",\n \"tokens.filters.stats.audits.top10HoldingsRatio\": \"Top 10 Holders %\",\n \"tokens.filters.stats.audits.top100HoldingsRatio\": \"Top 100 Holders %\",\n \"tokens.filters.stats.audits.devHoldingsRatio\": \"Dev Holdings %\",\n \"tokens.filters.stats.metrics\": \"Metrics\",\n \"tokens.filters.stats.metrics.volumes\": \"{{resolution}} Volumes ($)\",\n \"tokens.filters.stats.metrics.txns\": \"{{resolution}} Transactions\",\n \"tokens.filters.stats.metrics.liquidity\": \"Liquidity ($)\",\n \"tokens.filters.stats.metrics.marketCap\": \"Market Cap ($)\",\n \"tokens.filters.modal.title\": \"Filters\",\n \"tokens.tokenInfo.holders\": \"Holders\",\n \"tokens.tokenInfo.proHolders\": \"Pro Holders\",\n \"tokens.tokenInfo.kolHolders\": \"KOL Holders\",\n \"tokens.tokenInfo.top10HoldingsRatio\": \"Top 10 Holders\",\n \"tokens.tokenInfo.top100HoldingsRatio\": \"Top 100 Holders\",\n \"tokens.tokenInfo.devHoldingsRatio\": \"Dev Holders\",\n \"tokens.tokenInfo.sniperHoldingsRatio\": \"Snipers\",\n \"tokens.tokenInfo.insiderHoldingsRatio\": \"Insiders\",\n \"tokens.tokenInfo.bundleHoldingsRatio\": \"Bundlers\",\n \"tokens.bluechip.explained\":\n \"BlueChip index is the ratio of holders who also own BlueChip tokens\",\n \"tokens.pulse.new\": \"New\",\n \"tokens.pulse.migrated\": \"Migrated\",\n \"tokens.pulse.finalStretch\": \"Final Stretch\",\n \"tokens.pulse.paused\": \"Paused\",\n \"tokens.pulse.vol\": \"Vol\",\n \"tokens.pulse.txs\": \"Txs\",\n};\n","import { channels } from \"./module/channels\";\nimport { common } from \"./module/common\";\nimport { mediaTrack } from \"./module/mediaTrack\";\nimport { portfolio } from \"./module/portfolio\";\nimport { predict } from \"./module/predict\";\nimport { scaffold } from \"./module/scaffold\";\nimport { tokens } from \"./module/tokens\";\n\nexport const en = {\n ...common,\n ...mediaTrack,\n ...predict,\n ...scaffold,\n ...tokens,\n ...channels,\n ...portfolio,\n};\n","import { initReactI18next } from \"react-i18next\";\nimport { i18n as I18nInstance, createInstance } from \"i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport {\n defaultLng,\n defaultNS,\n i18nCookieKey,\n i18nLocalStorageKey,\n} from \"./constant\";\nimport { en } from \"./locale/en\";\n\nconst i18n: I18nInstance = createInstance();\n\ni18n\n .use(LanguageDetector)\n .use(initReactI18next) // bind react-i18next to the instance\n .init({\n fallbackLng: defaultLng,\n ns: [defaultNS],\n defaultNS,\n interpolation: {\n escapeValue: false, // not needed for react!!\n },\n detection: {\n lookupLocalStorage: i18nLocalStorageKey,\n lookupCookie: i18nCookieKey,\n caches: [\"cookie\", \"localStorage\"],\n order: [\"cookie\", \"localStorage\", \"htmlTag\", \"navigator\"],\n },\n resources: {\n [defaultLng]: { [defaultNS]: en },\n },\n });\n\nexport default i18n;\n","import i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\nexport type BackendOptions = {\n /**\n * Load url for a given language and namespace\n * @param lang language code\n * @param ns namespace\n * @returns url or urls\n */\n loadPath: (lang: LocaleCode, ns: string) => string | string[];\n};\n\n/**\n * Async resources loading through HTTP, resources must be placed in the site's public directory\n */\nexport class Backend {\n private readonly cache: Set<string>;\n\n constructor(private readonly options?: BackendOptions) {\n this.cache = new Set();\n }\n\n async fetchData(url: string): Promise<Record<string, string>> {\n try {\n const res = await fetch(url);\n return await res.json();\n } catch (error) {\n console.warn(\n `Failed to fetch locale resource bundle from ${url}:`,\n error,\n );\n return {};\n }\n }\n\n async loadLanguage(lang: LocaleCode, ns: string) {\n if (typeof this.options?.loadPath !== \"function\") return;\n\n // get load url paths\n let paths = this.options.loadPath(lang, ns);\n if (typeof paths === \"string\") paths = [paths];\n if (!paths.length) return;\n\n // filter out the paths that have already been loaded\n const urls = paths.filter((path) => {\n const loaded = i18n.hasResourceBundle(lang, ns);\n return !loaded || !this.cache.has(path);\n });\n\n const promises = urls.map(async (url) => {\n const data = await this.fetchData(url);\n i18n.addResourceBundle(lang, ns, data, true, true);\n this.cache.add(url);\n });\n await Promise.all(promises);\n }\n}\n","import { createContext, useContext } from \"react\";\nimport { Language, LocaleCode } from \"./types\";\n\nexport type LocaleContextState = {\n /**\n * Supported languages\n */\n languages: Language[];\n\n /**\n * Called before language change\n * @param lang - new language code\n * @returns\n */\n beforeLanguageChange: (lang: LocaleCode) => Promise<void>;\n /**\n * Called after language changed\n * @param lang - new language code\n * @returns\n */\n afterLanguageChange: (lang: LocaleCode) => Promise<void>;\n};\n\nexport const LocaleContext = createContext<LocaleContextState>({\n languages: [],\n beforeLanguageChange: () => Promise.resolve(),\n afterLanguageChange: () => Promise.resolve(),\n});\n\nexport const useLocaleContext = () => {\n const context = useContext(LocaleContext);\n if (!context) {\n throw new Error(\"useLocaleContext must be used within a LocaleProvider\");\n }\n return context;\n};\n","import { LocaleEnum } from \"../types\";\n\n/**\n * get locale path from pathname\n * @param pathname - pathname to get locale path\n * @param localeCodes - locale codes to check\n * @example\n * getLocalePathFromPathname('/en/perp/PERP_ETH_USDC') => 'en'\n * getLocalePathFromPathname('/perp/PERP_ETH_USDC') => null\n * getLocalePathFromPathname('/en/markets') => 'en'\n * getLocalePathFromPathname('/markets') => null\n */\nexport function getLocalePathFromPathname(\n pathname: string,\n localeCodes?: string[],\n) {\n const locale = pathname.split(\"/\")[1];\n localeCodes = localeCodes || Object.values(LocaleEnum);\n return localeCodes.includes(locale as LocaleEnum) ? locale : null;\n}\n","import { type LocaleCode, LocaleEnum } from \"../types\";\n\n/**\n * transform browser language to i18n locale codes\n * @param lang - browser language\n * @param localeCodes - locale codes to check\n * @param defaultLang - default locale code\n * @example\n * parseI18nLang('en-US') => 'en'\n * parseI18nLang('zh-CN') => 'zh'\n * parseI18nLang('zh-TW') => 'zh'\n * parseI18nLang('ja') => 'ja'\n * */\nexport function parseI18nLang(\n lang: string,\n localeCodes?: LocaleCode[],\n defaultLang?: LocaleCode,\n) {\n localeCodes = localeCodes || Object.values(LocaleEnum);\n defaultLang = defaultLang || LocaleEnum.en;\n\n const regex = /^([a-z]{2})/i;\n const match = lang?.match(regex);\n\n if (!match) {\n return defaultLang;\n }\n\n const matchLang = match[1];\n\n if (localeCodes.includes(lang)) {\n return lang;\n }\n\n if (localeCodes.includes(matchLang)) {\n return matchLang;\n }\n\n return defaultLang;\n}\n","import i18n from \"../i18n\";\nimport { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\nimport { parseI18nLang } from \"./parseI18nLang\";\n\n/**\n * Generate a localized path with proper locale prefix and search parameters\n *\n * This function ensures that the returned path includes the appropriate locale prefix.\n * If the path already contains a valid locale prefix, it returns the path as-is.\n * Otherwise, it prepends the specified locale or falls back to the current i18n language.\n *\n * @param params - Configuration object for path generation\n * @param params.path - The base pathname (e.g., '/markets', '/perp/PERP_ETH_USDC')\n * @param params.locale - Optional locale code to use as prefix. If not provided, uses i18n.language\n * @param params.search - Optional search query string. If not provided, uses window.location.search\n *\n * @returns A complete URL path with locale prefix and search parameters\n *\n * @example\n * generatePath({ path: '/markets' }) => '/en/markets?tab=spot'\n * generatePath({ path: '/en/markets', search: '?tab=futures' }) => '/en/markets?tab=futures'\n * generatePath({ path: '/perp/PERP_ETH_USDC', locale: 'zh' }) => '/zh/perp/PERP_ETH_USDC'\n * generatePath({ path: '/en/perp/PERP_ETH_USDC' }) => '/en/perp/PERP_ETH_USDC'\n */\nexport function generatePath(params: {\n path: string;\n locale?: string;\n search?: string;\n}) {\n const { path, locale, search } = params;\n const searchUrl =\n search || (typeof window !== \"undefined\" ? window.location.search : \"\");\n\n let localePath = getLocalePathFromPathname(path);\n\n // If path already contains a valid locale prefix, return it unchanged\n if (localePath) {\n return `${path}${searchUrl}`;\n }\n\n // Use provided locale or fall back to current i18n language\n localePath = locale || parseI18nLang(i18n.language);\n\n // Prepend locale prefix to path\n return `/${localePath}${path}${searchUrl}`;\n}\n","import { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\n\n/**\n * remove lang prefix from pathname\n * @param pathname - pathname to remove lang prefix\n * @param localeCodes - locale codes to check\n * @example\n * removeLangPrefix('/en/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/en/markets') => '/markets'\n * removeLangPrefix('/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/markets') => '/markets'\n */\nexport function removeLangPrefix(pathname: string, localeCodes?: string[]) {\n const localePath = getLocalePathFromPathname(pathname, localeCodes);\n\n return localePath\n ? pathname.replace(new RegExp(`^/${localePath}(?=/)`), \"\")\n : pathname;\n}\n","import {\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { Backend, BackendOptions } from \"./backend\";\nimport { defaultLanguages, defaultNS } from \"./constant\";\nimport { LocaleContext, LocaleContextState } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode, Resources, Language } from \"./types\";\nimport { parseI18nLang } from \"./utils\";\n\nexport type LocaleProviderProps = PropsWithChildren<\n {\n /** current locale */\n locale?: LocaleCode;\n /** current locale's resource */\n resource?: Record<string, string>;\n /** all synchronously loaded resources */\n resources?: Resources;\n /** supported languages, must be a subset of {@link defaultLanguages}, used when {@link languages} is not provided */\n supportedLanguages?: LocaleCode[];\n /** optional conversion function to modify the detected language code */\n convertDetectedLanguage?: (lang: string) => LocaleCode;\n /** options to load resources asynchronously */\n backend?: BackendOptions;\n } & Partial<LocaleContextState>\n>;\n\nexport function LocaleProvider({\n children,\n locale,\n resource,\n resources,\n backend,\n supportedLanguages,\n convertDetectedLanguage,\n languages: languagesProp,\n beforeLanguageChange,\n afterLanguageChange,\n}: LocaleProviderProps) {\n // calculated supported languages\n const [languages, setLanguages] = useState<Language[]>(defaultLanguages);\n\n // backend instance to load resources asynchronously\n const backendRef = useRef(new Backend(backend!));\n\n // load resources synchronously\n useEffect(() => {\n if (resources) {\n Object.entries(resources).forEach(([locale, messages]) => {\n i18n.addResourceBundle(locale, defaultNS, messages, true, true);\n });\n return;\n }\n if (resource && locale) {\n i18n.addResourceBundle(locale, defaultNS, resource, true, true);\n }\n }, [locale, resource, resources]);\n\n // change language when locale changed\n useEffect(() => {\n if (locale && locale !== i18n.language) {\n i18n.changeLanguage(locale);\n }\n }, [locale]);\n\n // calculate supported languages\n useEffect(() => {\n if (Array.isArray(languagesProp)) {\n setLanguages(languagesProp);\n } else if (Array.isArray(supportedLanguages)) {\n setLanguages(\n supportedLanguages\n .map((localCode) =>\n defaultLanguages.find((l) => l.localCode === localCode),\n )\n .filter((item) => !!item),\n );\n }\n }, [supportedLanguages, languagesProp]);\n\n // if browser language is not a valid language, change language\n useEffect(() => {\n const fixLanguage = async () => {\n const lang =\n typeof convertDetectedLanguage === \"function\"\n ? convertDetectedLanguage(i18n.language)\n : parseI18nLang(i18n.language);\n await backendRef.current.loadLanguage(lang, defaultNS);\n if (lang !== i18n.language) {\n await i18n.changeLanguage(lang);\n }\n };\n fixLanguage();\n }, [i18n.language]);\n\n const beforeLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n await beforeLanguageChange?.(lang);\n // load language before language changed\n await backendRef.current.loadLanguage(lang, defaultNS);\n },\n [beforeLanguageChange],\n );\n\n const afterLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n afterLanguageChange?.(lang);\n },\n [afterLanguageChange],\n );\n\n const contextValue = useMemo<LocaleContextState>(() => {\n return {\n languages,\n beforeLanguageChange: beforeLanguageChangeHandler,\n afterLanguageChange: afterLanguageChangeHandler,\n };\n }, [languages, beforeLanguageChangeHandler, afterLanguageChangeHandler]);\n\n return (\n <LocaleContext.Provider value={contextValue}>\n <I18nextProvider i18n={i18n} defaultNS={defaultNS}>\n {children}\n </I18nextProvider>\n </LocaleContext.Provider>\n );\n}\n","import { useContext } from \"react\";\nimport {\n FallbackNs,\n useTranslation as _useTranslation,\n UseTranslationOptions,\n I18nContext,\n} from \"react-i18next\";\nimport { FlatNamespace, KeyPrefix } from \"i18next\";\nimport i18n from \"./i18n\";\n\ntype $Tuple<T> = readonly [T?, ...T[]];\n\n/**\n * Hook to get translation function\n * @param ns\n * @param options\n * @returns\n */\nexport function useTranslation<\n Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined = undefined,\n KPrefix extends KeyPrefix<FallbackNs<Ns>> = undefined,\n>(ns?: Ns, options?: UseTranslationOptions<KPrefix>) {\n const context = useContext(I18nContext);\n return _useTranslation(ns, { i18n: context?.i18n || i18n, ...options });\n}\n","import { useEffect, useState } from \"react\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\n/**\n * Hooks to get current locale code\n * @returns current locale code\n */\nexport function useLocale() {\n const [localeCode, setLocaleCode] = useState<LocaleCode>(i18n.language);\n\n useEffect(() => {\n i18n.on(\"languageChanged\", setLocaleCode);\n return () => {\n i18n.off(\"languageChanged\", setLocaleCode);\n };\n }, [i18n]);\n\n return localeCode;\n}\n","import { useCallback } from \"react\";\nimport { useLocaleContext } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\nexport function useChangeLocale() {\n const { beforeLanguageChange, afterLanguageChange } = useLocaleContext();\n\n const changeLocale = useCallback(\n async (locale: LocaleCode) => {\n await beforeLanguageChange(locale);\n await i18n.changeLanguage(locale);\n await afterLanguageChange(locale);\n },\n [beforeLanguageChange, afterLanguageChange, i18n],\n );\n\n return changeLocale;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types.ts","../src/constant.ts","../src/locale/module/channels.ts","../src/locale/module/common.ts","../src/locale/module/mediaTrack.ts","../src/locale/module/portfolio.ts","../src/locale/module/predict.ts","../src/locale/module/scaffold.ts","../src/locale/module/tokens.ts","../src/locale/en.ts","../src/i18n.ts","../src/backend.ts","../src/context.ts","../src/utils/getLocalePathFromPathname.ts","../src/utils/parseI18nLang.ts","../src/utils/generatePath.ts","../src/utils/removeLangPrefix.ts","../src/provider.tsx","../src/useTranslation.ts","../src/useLocale.ts","../src/useChangeLocale.ts"],"names":["LocaleEnum","defaultLanguages","defaultLng","defaultNS","i18nLocalStorageKey","i18nCookieKey","channels","common","mediaTrack","portfolio","predict","scaffold","tokens","en","i18n","createInstance","LanguageDetector","initReactI18next","i18n_default","Backend","options","url","error","lang","ns","paths","promises","path","data","LocaleContext","createContext","useLocaleContext","context","useContext","getLocalePathFromPathname","pathname","localeCodes","locale","parseI18nLang","defaultLang","regex","match","matchLang","generatePath","params","search","searchUrl","localePath","removeLangPrefix","LocaleProvider","children","resource","resources","backend","supportedLanguages","convertDetectedLanguage","languagesProp","beforeLanguageChange","afterLanguageChange","languages","setLanguages","useState","backendRef","useRef","useEffect","messages","localCode","l","item","beforeLanguageChangeHandler","useCallback","afterLanguageChangeHandler","contextValue","useMemo","jsx","I18nextProvider","useTranslation","I18nContext","_useTranslation","useLocale","localeCode","setLocaleCode","useChangeLocale"],"mappings":"0W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AAIpB,eAAqB3C,CAAAA,CAAK,QAAQ,EAEtE,OAAA8C,eAAAA,CAAU,KACR9C,CAAAA,CAAK,EAAA,CAAG,kBAAmB+D,CAAa,CAAA,CACjC,IAAM,CACX/D,CAAAA,CAAK,IAAI,iBAAA,CAAmB+D,CAAa,EAC3C,CAAA,CAAA,CACC,CAAC/D,CAAI,CAAC,EAEF8D,CACT,CCdO,SAASE,EAAAA,EAAkB,CAChC,GAAM,CAAE,qBAAAzB,CAAAA,CAAsB,mBAAA,CAAAC,CAAoB,CAAA,CAAI3B,CAAAA,GAWtD,OATqBuC,iBAAAA,CACnB,MAAOjC,CAAAA,EAAuB,CAC5B,MAAMoB,CAAAA,CAAqBpB,CAAM,EACjC,MAAMnB,CAAAA,CAAK,eAAemB,CAAM,CAAA,CAChC,MAAMqB,CAAAA,CAAoBrB,CAAM,EAClC,CAAA,CACA,CAACoB,EAAsBC,CAAAA,CAAqBxC,CAAI,CAClD,CAGF","file":"index.js","sourcesContent":["// import the original type declarations\nimport \"i18next\";\n// import all namespaces (for the default language, only)\nimport { en } from \"./locale/en\";\n\nexport enum LocaleEnum {\n /** English */\n en = \"en\",\n /** Chinese */\n zh = \"zh\",\n /** Japanese */\n ja = \"ja\",\n /** Spanish */\n es = \"es\",\n /** Korean */\n ko = \"ko\",\n /** Vietnamese */\n vi = \"vi\",\n /** German */\n de = \"de\",\n /** French */\n fr = \"fr\",\n /** Russian */\n ru = \"ru\",\n /** Indonesian */\n id = \"id\",\n /** Turkish */\n tr = \"tr\",\n /** Italian */\n it = \"it\",\n /** Portuguese */\n pt = \"pt\",\n /** Ukrainian */\n uk = \"uk\",\n /** Polish */\n pl = \"pl\",\n /** Dutch */\n nl = \"nl\",\n}\n\nexport type LocaleCode = keyof typeof LocaleEnum | (string & {});\n\nexport type Language = {\n localCode: LocaleCode;\n displayName: string;\n};\n\nexport type ExtendLocaleMessages = Record<`extend.${string}`, string>;\n\nexport type LocaleMessages = typeof en & ExtendLocaleMessages;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type Resources<T extends {} = {}> = {\n [key in LocaleCode]?: Partial<LocaleMessages & T>;\n};\n\n// https://www.i18next.com/overview/typescript#create-a-declaration-file\n// Enhance the input parameter intelliSense for the t function.\ndeclare module \"i18next\" {\n // Extend CustomTypeOptions\n interface CustomTypeOptions {\n // custom namespace type, if you changed it\n defaultNS: \"translation\";\n // custom resources type\n resources: {\n translation: LocaleMessages;\n };\n }\n}\n","import { Language, LocaleEnum } from \"./types\";\n\nexport const defaultLanguages: Language[] = [\n { localCode: LocaleEnum.en, displayName: \"English\" }, // English\n { localCode: LocaleEnum.zh, displayName: \"中文\" }, // Chinese\n { localCode: LocaleEnum.ja, displayName: \"日本語\" }, // Japanese\n { localCode: LocaleEnum.es, displayName: \"Español\" }, // Spanish\n { localCode: LocaleEnum.ko, displayName: \"한국어\" }, // Korean\n { localCode: LocaleEnum.vi, displayName: \"Tiếng Việt\" }, // Vietnamese\n { localCode: LocaleEnum.de, displayName: \"Deutsch\" }, // German\n { localCode: LocaleEnum.fr, displayName: \"Français\" }, // French\n { localCode: LocaleEnum.ru, displayName: \"Русский\" }, // Russian\n { localCode: LocaleEnum.id, displayName: \"Bahasa Indonesia\" }, // Indonesian\n { localCode: LocaleEnum.tr, displayName: \"Türkçe\" }, // Turkish\n { localCode: LocaleEnum.it, displayName: \"Italiano\" }, // Italian\n { localCode: LocaleEnum.pt, displayName: \"Português\" }, // Portuguese\n { localCode: LocaleEnum.uk, displayName: \"Українська\" }, // Ukrainian\n { localCode: LocaleEnum.pl, displayName: \"Polski\" }, // Polish\n { localCode: LocaleEnum.nl, displayName: \"Nederlands\" }, // Dutch\n];\n\nexport const defaultLng = LocaleEnum.en;\n\nexport const defaultNS = \"translation\";\n\nexport const i18nLocalStorageKey = \"liberfi_i18nLng\";\n\nexport const i18nCookieKey = \"liberfi_i18nLng\";\n","export const channels = {\n \"channels.forms.base.title\": \"Base Info\",\n \"channels.forms.base.name.label\": \"Name\",\n \"channels.forms.base.name.placeholder\": \"Please enter the channel name\",\n \"channels.forms.base.name.required\": \"Name is required\",\n \"channels.forms.base.name.min\": \"Name must be at least 1 character\",\n \"channels.forms.base.name.max\": \"Name must be less than 24 characters\",\n \"channels.forms.base.description.label\": \"Description\",\n \"channels.forms.base.description.placeholder\":\n \"Please enter the channel description\",\n \"channels.forms.base.icon.label\": \"Icon\",\n \"channels.forms.base.icon.placeholder\": \"Please upload the channel icon\",\n \"channels.forms.base.icon.hint\":\n \"A square image of at least 128x128 is suggested. File size cannot exceed 10mb.\",\n \"channels.forms.base.icon.required\": \"Icon is required\",\n \"channels.forms.base.icon.maxSize\": \"Icon size cannot exceed 10MB\",\n \"channels.forms.base.submit\": \"Create Channel\",\n \"channels.forms.base.update.submit\": \"Update Channel\",\n \"channels.forms.wallets.title\": \"Wallet Management\",\n \"channels.forms.wallets.label\": \"Add Wallets\",\n \"channels.forms.wallets.placeholder\":\n \"Text Format:\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.required\": \"Wallets are required\",\n \"channels.forms.wallets.invalid\": \"Invalid wallets format\",\n \"channels.forms.wallets.chain.required\": \"Chain is required\",\n \"channels.forms.wallets.address.required\": \"Wallet address is required\",\n \"channels.forms.wallets.address.duplicated\":\n \"There are {{count}} duplicated wallet addresses in the input\",\n \"channels.forms.wallets.address.invalid\":\n \"There are {{count}} invalid wallet addresses\",\n \"channels.forms.wallets.address.alreadyAdded\":\n \"There are {{count}} wallet addresses already added\",\n \"channels.forms.wallets.maxCount\": \"Wallet count cannot exceed 500\",\n \"channels.forms.wallets.submit\": \"Add Wallets\",\n \"channels.forms.wallets.supportedFormats\": \"Supported Formats\",\n \"channels.forms.wallets.supportedFormats.text\": \"Text\",\n \"channels.forms.wallets.supportedFormats.text.hint\":\n \"Text Format:\\n\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.addedCount\": \"added wallets\",\n \"channels.forms.wallets.list.title\": \"Added Wallets\",\n \"channels.forms.wallets.list.header.address\": \"Alias/Address\",\n \"channels.forms.wallets.list.header.balance\": \"Balance\",\n \"channels.forms.wallets.list.header.importedAt\": \"Imported At\",\n \"channels.forms.wallets.list.header.lastActiveAt\": \"Last Active At\",\n \"channels.forms.wallets.list.header.7dBuys\": \"7 Days Buys\",\n \"channels.forms.wallets.list.header.7dSells\": \"7 Days Sells\",\n \"channels.forms.wallets.list.header.actions\": \"Actions\",\n \"channels.forms.wallets.list.empty\": \"No wallets added yet\",\n \"channels.forms.wallets.list.search.placeholder\":\n \"Search by address or alias\",\n \"channels.forms.wallets.update.success\": \"Update wallets successfully\",\n \"channels.forms.wallets.update.error\": \"Update wallets error\",\n \"channels.forms.socials.title\": \"Social Medias\",\n \"channels.forms.socials.telegram.guide\":\n \"⚡️ Quick Start\\n1. Search for @BotFather on Telegram\\n2. Send /newbot to create a bot and get Token\\n3. Enter the Bot Token here and save\\n4. Add the bot to your group/channel\",\n \"channels.forms.socials.telegram.placeholder\":\n \"Enter your Telegram Bot Token\",\n \"channels.list.title\": \"Channel List\",\n \"channels.trending.title\": \"Trending Channels\",\n \"channels.my.title\": \"My Channels\",\n \"channels.subscribe.submit\": \"Subscribe\",\n \"channels.subscribe.error\": \"Subscribe channel error\",\n \"channels.subscribe.success\": \"Subscribe channel successfully\",\n \"channels.unsubscribe.submit\": \"Subscribed\",\n \"channels.unsubscribe.error\": \"Unsubscribe channel error\",\n \"channels.unsubscribe.success\": \"Unsubscribe channel successfully\",\n \"channels.subscribed.title\": \"Subscribed Channels\",\n \"channels.create.title\": \"Create Channel\",\n \"channels.create.success\": \"Channel created successfully\",\n \"channels.create.error\": \"Create channel error\",\n \"channels.create.eligibility.title\": \"Check Eligibility\",\n \"channels.create.eligibility.description\":\n \"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.\",\n \"channels.create.eligibility.xConnection\": \"X Account Connection\",\n \"channels.create.eligibility.connected\": \"Connected as\",\n \"channels.create.eligibility.notConnected\": \"No X account connected\",\n \"channels.create.eligibility.connect\": \"Connect X Account\",\n \"channels.create.eligibility.disconnect\": \"Disconnect\",\n \"channels.create.eligibility.verifying\": \"Verifying eligibility...\",\n \"channels.create.eligibility.requirementsTitle\": \"Eligibility Requirements\",\n \"channels.create.eligibility.followersCount\": \"Followers Count\",\n \"channels.create.eligibility.accountAge\": \"Account Age\",\n \"channels.create.eligibility.behaviorScore\": \"Behavior Score\",\n \"channels.create.eligibility.clean\": \"Clean\",\n \"channels.create.eligibility.allPassed\":\n \"All eligibility checks passed! You can now create a channel.\",\n \"channels.create.eligibility.failed\":\n \"Some requirements are not met. Please check your account.\",\n \"channels.update.title\": \"Update Channel\",\n \"channels.update.success\": \"Channel updated successfully\",\n \"channels.update.error\": \"Update channel error\",\n \"channels.info.walletCount\": \"Wallet Count\",\n \"channels.info.subscribeCount\": \"Subscribe Count\",\n \"channels.info.createdAt\": \"created at\",\n \"channels.info.updatedAt\": \"last updated at\",\n \"channels.stats.7dTxs.title\": \"7D TXs\",\n \"channels.stats.7dTxs.hint\": \"7 Days Transactions\",\n \"channels.stats.7dPnl.title\": \"7D PnL\",\n \"channels.stats.7dPnl.hint\": \"7 Days Profit and Loss\",\n \"channels.stats.7dWr.title\": \"7D WR\",\n \"channels.stats.7dWr.hint\": \"7 Days Winning Rate\",\n \"channels.detail.title\": \"Channel Detail\",\n \"channels.detail.notfound\": \"Channel not found\",\n \"channels.events.title\": \"Channel Events\",\n \"channels.events.empty\": \"No events yet\",\n \"channels.events.walletTrade.buy\": \"bought\",\n \"channels.events.walletTrade.sell\": \"sold\",\n \"channels.events.walletTrade.got\": \"got\",\n \"channels.events.walletTrade.cost\": \"cost\",\n \"channels.events.walletTrade.price\": \"price\",\n};\n","export const common = {\n \"common.cancel\": \"Cancel\",\n \"common.confirm\": \"Confirm\",\n \"common.reset\": \"Reset\",\n \"common.apply\": \"Apply\",\n \"common.ok\": \"OK\",\n \"common.yes\": \"Yes\",\n \"common.no\": \"No\",\n \"common.all\": \"All\",\n \"common.buy\": \"Buy\",\n \"common.sell\": \"Sell\",\n \"common.long\": \"Long\",\n \"common.short\": \"Short\",\n \"common.edit\": \"Edit\",\n \"common.save\": \"Save\",\n \"common.add\": \"Add\",\n \"common.delete\": \"Delete\",\n \"common.tips\": \"Tips\",\n \"common.max\": \"Max\",\n \"common.download\": \"Download\",\n \"common.copy\": \"Copy\",\n \"common.copy.failed\": \"Copy failed\",\n \"common.copy.copied\": \"Copied to clipboard\",\n \"common.share\": \"Share\",\n \"common.export\": \"Export\",\n \"common.empty\": \"No data\",\n \"common.unauthenticated\": \"Please sign in to continue\",\n \"common.signIn\": \"Sign In\",\n \"common.signOut\": \"Sign Out\",\n \"common.resolution.1s\": \"1s\",\n \"common.resolution.15s\": \"15s\",\n \"common.resolution.30s\": \"30s\",\n \"common.resolution.1m\": \"1m\",\n \"common.resolution.5m\": \"5m\",\n \"common.resolution.15m\": \"15m\",\n \"common.resolution.30m\": \"30m\",\n \"common.resolution.1h\": \"1h\",\n \"common.resolution.4h\": \"4h\",\n \"common.resolution.12h\": \"12h\",\n \"common.resolution.24h\": \"24h\",\n \"common.upload.submit\": \"Upload\",\n \"common.upload.resubmit\": \"Reupload\",\n \"common.upload.error\": \"Upload error\",\n \"common.loadingMore\": \"Loading more...\",\n \"common.continue\": \"Continue\",\n \"common.months\": \"months\",\n \"common.days\": \"days\",\n};\n","export const mediaTrack = {\n \"mediaTrack.tweets.translate.show\": \"Show Translation\",\n \"mediaTrack.tweets.translate.hide\": \"Hide Translation\",\n \"mediaTrack.tweets.expand\": \"Expand\",\n \"mediaTrack.tweets.collapse\": \"Collapse\",\n};\n","export const portfolio = {\n // Asset Tabs\n \"portfolio.tabs.spot\": \"Spot\",\n \"portfolio.tabs.perps\": \"Perps\",\n \"portfolio.tabs.prediction\": \"Prediction\",\n\n // Address Row\n \"portfolio.address.allWallets\": \"All Wallets\",\n \"portfolio.address.aggregated\": \"Aggregated\",\n \"portfolio.address.copy\": \"Copy Address\",\n \"portfolio.address.copied\": \"Address copied\",\n \"portfolio.address.owner\": \"Owner\",\n \"portfolio.address.viewing\": \"Viewing\",\n \"portfolio.address.search.placeholder\": \"Search wallet address…\",\n \"portfolio.address.search.view\": \"View\",\n \"portfolio.address.search.invalid\": \"Enter a valid address\",\n\n // Balance Row\n \"portfolio.balance.uPnl\": \"uPNL\",\n \"portfolio.balance.realized\": \"Realized\",\n \"portfolio.balance.gas\": \"Gas\",\n\n // Curve Card\n \"portfolio.curve.netWorth\": \"Net Worth\",\n \"portfolio.curve.pnl\": \"PNL\",\n \"portfolio.curve.noData\": \"Not enough data\",\n\n // Distribution Card\n \"portfolio.distribution.title\": \"Distribution\",\n \"portfolio.distribution.other\": \"Other\",\n\n // Viewing Mode\n \"portfolio.viewing.banner\": \"Viewing external portfolio\",\n \"portfolio.viewing.back\": \"Back to My Portfolio\",\n\n // Spot Holdings\n \"portfolio.spot.holdings\": \"Holdings\",\n \"portfolio.spot.history\": \"History\",\n \"portfolio.spot.search.placeholder\": \"Search token…\",\n \"portfolio.spot.hideSmall\": \"Hide small\",\n \"portfolio.spot.group.tokens\": \"Tokens\",\n \"portfolio.spot.header.asset\": \"Asset\",\n \"portfolio.spot.header.balance\": \"Balance\",\n \"portfolio.spot.header.price\": \"Price\",\n \"portfolio.spot.header.value\": \"Value\",\n \"portfolio.spot.header.24h\": \"24h\",\n \"portfolio.spot.empty\": \"No tokens found\",\n \"portfolio.spot.empty.hint\": \"Your spot tokens will appear here\",\n\n // Spot History\n \"portfolio.spot.history.header.type\": \"Type\",\n \"portfolio.spot.history.header.detail\": \"Detail\",\n \"portfolio.spot.history.header.amount\": \"Amount\",\n \"portfolio.spot.history.header.value\": \"Value\",\n \"portfolio.spot.history.header.time\": \"Time\",\n \"portfolio.spot.history.header.txHash\": \"TxHash\",\n \"portfolio.spot.history.type.swap\": \"Swap\",\n \"portfolio.spot.history.type.send\": \"Send\",\n \"portfolio.spot.history.type.receive\": \"Receive\",\n\n // Perps\n \"portfolio.perps.openPositions\": \"Open Positions\",\n \"portfolio.perps.tradeHistory\": \"Trade History\",\n \"portfolio.perps.closeAll\": \"Close All\",\n \"portfolio.perps.close\": \"Close\",\n \"portfolio.perps.closeAll.confirm\":\n \"Close all positions? This will route to each protocol to execute.\",\n \"portfolio.perps.closeAll.confirmBtn\": \"Confirm Close All\",\n \"portfolio.perps.closeAll.cancel\": \"Cancel\",\n \"portfolio.perps.header.pair\": \"Pair / Side\",\n \"portfolio.perps.header.size\": \"Size\",\n \"portfolio.perps.header.entry\": \"Entry\",\n \"portfolio.perps.header.mark\": \"Mark\",\n \"portfolio.perps.header.uPnl\": \"uPNL\",\n \"portfolio.perps.search.placeholder\": \"Search pair…\",\n \"portfolio.perps.empty\": \"No open positions\",\n \"portfolio.perps.empty.hint\": \"Start trading →\",\n \"portfolio.perps.history.header.pair\": \"Pair\",\n \"portfolio.perps.history.header.side\": \"Side\",\n \"portfolio.perps.history.header.size\": \"Size\",\n \"portfolio.perps.history.header.pnl\": \"PNL\",\n \"portfolio.perps.history.header.closePrice\": \"Close Price\",\n \"portfolio.perps.history.header.time\": \"Time\",\n\n // Prediction\n \"portfolio.prediction.activeBets\": \"Active Bets\",\n \"portfolio.prediction.settled\": \"Settled\",\n \"portfolio.prediction.sellAll\": \"Sell All\",\n \"portfolio.prediction.sell\": \"Sell\",\n \"portfolio.prediction.sellAll.confirm\":\n \"Sell all positions? This will route to each platform to execute.\",\n \"portfolio.prediction.sellAll.confirmBtn\": \"Confirm Sell All\",\n \"portfolio.prediction.sellAll.cancel\": \"Cancel\",\n \"portfolio.prediction.header.market\": \"Market / Source\",\n \"portfolio.prediction.header.position\": \"Position\",\n \"portfolio.prediction.header.stake\": \"Stake\",\n \"portfolio.prediction.header.potential\": \"Potential\",\n \"portfolio.prediction.header.status\": \"Status\",\n \"portfolio.prediction.search.placeholder\": \"Search market…\",\n \"portfolio.prediction.empty\": \"No active bets\",\n \"portfolio.prediction.empty.hint\": \"Explore prediction markets →\",\n \"portfolio.prediction.settled.header.market\": \"Market\",\n \"portfolio.prediction.settled.header.source\": \"Source\",\n \"portfolio.prediction.settled.header.position\": \"Position\",\n \"portfolio.prediction.settled.header.stake\": \"Stake\",\n \"portfolio.prediction.settled.header.result\": \"Result\",\n \"portfolio.prediction.settled.header.payout\": \"Payout\",\n\n // Empty / Error states\n \"portfolio.connectWallet\": \"Connect Wallet\",\n \"portfolio.connectWallet.hint\": \"Connect your wallet to view your portfolio\",\n \"portfolio.error.load\": \"Failed to load portfolio data\",\n \"portfolio.error.retry\": \"Retry\",\n};\n","export const predict = {\n // Categories\n \"predict.categories.trending\": \"Trending\",\n \"predict.categories.allMarkets\": \"All Markets\",\n\n // Event status\n \"predict.event.status.closed\": \"Closed\",\n \"predict.event.status.live\": \"Live\",\n \"predict.event.status.pending\": \"Pending\",\n\n // Event detail\n \"predict.event.volume\": \"vol\",\n \"predict.event.endDate\": \"Ends {{date}}\",\n \"predict.event.rules\": \"Rules\",\n \"predict.event.rules.collapse\": \"Collapse\",\n \"predict.event.rules.expand\": \"Expand all\",\n \"predict.event.showMore\": \"Show More\",\n \"predict.event.back\": \"Back\",\n \"predict.event.moreMarkets\": \"+{{count}} more\",\n\n // Markets table\n \"predict.market.table.outcome\": \"Outcome\",\n \"predict.market.table.chance\": \"Chance\",\n \"predict.market.table.actions\": \"Actions\",\n \"predict.market.action.yes\": \"Yes {{price}}¢\",\n \"predict.market.action.no\": \"No {{price}}¢\",\n\n // Market options\n \"predict.market.yes\": \"Yes\",\n \"predict.market.no\": \"No\",\n \"predict.market.sharesYes\": \"{{shares}} Yes\",\n \"predict.market.sharesNo\": \"{{shares}} No\",\n \"predict.market.tradeYes\": \"Trade Yes\",\n \"predict.market.tradeNo\": \"Trade No\",\n \"predict.market.graph\": \"Graph\",\n\n // Trade form\n \"predict.trade.action\": \"Trade\",\n \"predict.trade.buy\": \"Buy\",\n \"predict.trade.sell\": \"Sell\",\n \"predict.trade.yes\": \"Yes\",\n \"predict.trade.no\": \"No\",\n \"predict.trade.limit\": \"Limit\",\n \"predict.trade.market\": \"Market\",\n \"predict.trade.price\": \"Price\",\n \"predict.trade.amount\": \"Amount\",\n \"predict.trade.contracts\": \"Contracts\",\n \"predict.trade.estimatedCost\": \"Est. Cost\",\n \"predict.trade.potentialPayout\": \"Potential Payout\",\n \"predict.trade.potentialProfit\": \"Potential Profit\",\n \"predict.trade.potentialWin\": \"Potential Win\",\n \"predict.trade.estimatedReceive\": \"Est. Receive\",\n \"predict.trade.balance\": \"Available Balance\",\n \"predict.trade.bestBid\": \"Bid\",\n \"predict.trade.bestAsk\": \"Ask\",\n \"predict.trade.priceImpact\": \"Price Impact\",\n \"predict.trade.quoteError\": \"Unable to get quote. Please try again.\",\n \"predict.trade.connectWallet\": \"Connect Wallet\",\n \"predict.trade.submitting\": \"Submitting…\",\n \"predict.trade.submitSuccess\": \"Transaction submitted successfully!\",\n \"predict.trade.submitError\": \"Transaction failed. Please try again.\",\n\n // Order book\n \"predict.orderBook.title\": \"Order Book\",\n \"predict.orderBook.empty\": \"No orders yet\",\n \"predict.orderBook.type\": \"Type\",\n \"predict.orderBook.price\": \"Price\",\n \"predict.orderBook.contracts\": \"Contracts\",\n \"predict.orderBook.qty\": \"Qty\",\n \"predict.orderBook.total\": \"Total\",\n \"predict.orderBook.spread\": \"Spread\",\n\n // Open orders\n \"predict.openOrders.title\": \"Open Orders\",\n \"predict.openOrders.empty\": \"No open orders\",\n \"predict.openOrders.side\": \"Side\",\n \"predict.openOrders.outcome\": \"Outcome\",\n \"predict.openOrders.type\": \"Type\",\n \"predict.openOrders.price\": \"Price\",\n \"predict.openOrders.filled\": \"Filled\",\n \"predict.openOrders.status\": \"Status\",\n \"predict.openOrders.time\": \"Time\",\n \"predict.openOrders.cancel\": \"Cancel\",\n\n // Trade history\n \"predict.tradeHistory.title\": \"Trade History\",\n \"predict.tradeHistory.empty\": \"No trades yet\",\n \"predict.tradeHistory.side\": \"Side\",\n \"predict.tradeHistory.outcome\": \"Outcome\",\n \"predict.tradeHistory.price\": \"Price\",\n \"predict.tradeHistory.qty\": \"Qty\",\n \"predict.tradeHistory.total\": \"Total\",\n \"predict.tradeHistory.fee\": \"Fee\",\n \"predict.tradeHistory.time\": \"Time\",\n\n // Positions\n \"predict.positions.title\": \"Positions\",\n \"predict.positions.empty\": \"No positions\",\n \"predict.positions.market\": \"Market\",\n \"predict.positions.outcome\": \"Outcome\",\n \"predict.positions.qty\": \"Qty\",\n \"predict.positions.avgCost\": \"Avg Cost\",\n \"predict.positions.currentPrice\": \"Price\",\n \"predict.positions.value\": \"Value\",\n \"predict.positions.pnl\": \"P&L\",\n \"predict.positions.totalValue\": \"Total Value\",\n \"predict.positions.unrealizedPnl\": \"Unrealized P&L\",\n \"predict.positions.realizedPnl\": \"Realized P&L\",\n\n // Pagination\n \"predict.pagination.prev\": \"Prev\",\n \"predict.pagination.next\": \"Next\",\n \"predict.pagination.page\": \"Page {{page}}\",\n};\n","export const scaffold = {\n \"scaffold.draggableModal.snapToEdge\": \"Drag to edge to show side panel\",\n \"scaffold.draggablePanel.snapToModal\": \"Drag away to show floating modal\",\n \"scaffold.home\": \"Home\",\n};\n","export const tokens = {\n \"tokens.search.placeholder\": \"Search by token or CA...\",\n \"tokens.copied.address\": \"Token address copied to clipboard\",\n \"tokens.listHeader.token\": \"Token\",\n \"tokens.listHeader.priceHistories\": \"Price Histories\",\n \"tokens.listHeader.price\": \"Price\",\n \"tokens.listHeader.priceChange\": \"{{resolution}}%\",\n \"tokens.listHeader.marketCap\": \"Market Cap\",\n \"tokens.listHeader.liquidity\": \"Liquidity\",\n \"tokens.listHeader.volumes\": \"{{resolution}} Volumes\",\n \"tokens.listHeader.txs\": \"{{resolution}} TXNS\",\n \"tokens.listHeader.traders\": \"{{resolution}} Traders\",\n \"tokens.listHeader.bluechip\": \"BlueChip\",\n \"tokens.listHeader.tokenInfo\": \"Token Info\",\n \"tokens.listHeader.actions\": \"Actions\",\n \"tokens.listHeader.filter\": \"Filter\",\n \"tokens.listType.trending\": \"Trending\",\n \"tokens.listType.new\": \"New\",\n \"tokens.listType.stocks\": \"Stocks\",\n \"tokens.filters.protocols.title\": \"Protocols\",\n \"tokens.filters.protocols.selectAll\": \"Select All\",\n \"tokens.filters.protocols.unselectAll\": \"Unselect All\",\n \"tokens.filters.keywords.title\": \"Search Keywords\",\n \"tokens.filters.keywords.exclude.title\": \"Exclude Keywords\",\n \"tokens.filters.keywords.placeholder\": \"keyword1, keyword2...\",\n \"tokens.filters.stats.min\": \"Min\",\n \"tokens.filters.stats.max\": \"Max\",\n \"tokens.filters.stats.audits\": \"Audits\",\n \"tokens.filters.stats.audits.holders\": \"Holders Count\",\n \"tokens.filters.stats.audits.top10HoldingsRatio\": \"Top 10 Holders %\",\n \"tokens.filters.stats.audits.top100HoldingsRatio\": \"Top 100 Holders %\",\n \"tokens.filters.stats.audits.devHoldingsRatio\": \"Dev Holdings %\",\n \"tokens.filters.stats.metrics\": \"Metrics\",\n \"tokens.filters.stats.metrics.volumes\": \"{{resolution}} Volumes ($)\",\n \"tokens.filters.stats.metrics.txns\": \"{{resolution}} Transactions\",\n \"tokens.filters.stats.metrics.liquidity\": \"Liquidity ($)\",\n \"tokens.filters.stats.metrics.marketCap\": \"Market Cap ($)\",\n \"tokens.filters.modal.title\": \"Filters\",\n \"tokens.tokenInfo.holders\": \"Holders\",\n \"tokens.tokenInfo.proHolders\": \"Pro Holders\",\n \"tokens.tokenInfo.kolHolders\": \"KOL Holders\",\n \"tokens.tokenInfo.top10HoldingsRatio\": \"Top 10 Holders\",\n \"tokens.tokenInfo.top100HoldingsRatio\": \"Top 100 Holders\",\n \"tokens.tokenInfo.devHoldingsRatio\": \"Dev Holders\",\n \"tokens.tokenInfo.sniperHoldingsRatio\": \"Snipers\",\n \"tokens.tokenInfo.insiderHoldingsRatio\": \"Insiders\",\n \"tokens.tokenInfo.bundleHoldingsRatio\": \"Bundlers\",\n \"tokens.bluechip.explained\":\n \"BlueChip index is the ratio of holders who also own BlueChip tokens\",\n \"tokens.pulse.new\": \"New\",\n \"tokens.pulse.migrated\": \"Migrated\",\n \"tokens.pulse.finalStretch\": \"Final Stretch\",\n \"tokens.pulse.paused\": \"Paused\",\n \"tokens.pulse.vol\": \"Vol\",\n \"tokens.pulse.txs\": \"Txs\",\n};\n","import { channels } from \"./module/channels\";\nimport { common } from \"./module/common\";\nimport { mediaTrack } from \"./module/mediaTrack\";\nimport { portfolio } from \"./module/portfolio\";\nimport { predict } from \"./module/predict\";\nimport { scaffold } from \"./module/scaffold\";\nimport { tokens } from \"./module/tokens\";\n\nexport const en = {\n ...common,\n ...mediaTrack,\n ...predict,\n ...scaffold,\n ...tokens,\n ...channels,\n ...portfolio,\n};\n","import { initReactI18next } from \"react-i18next\";\nimport { i18n as I18nInstance, createInstance } from \"i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport {\n defaultLng,\n defaultNS,\n i18nCookieKey,\n i18nLocalStorageKey,\n} from \"./constant\";\nimport { en } from \"./locale/en\";\n\nconst i18n: I18nInstance = createInstance();\n\ni18n\n .use(LanguageDetector)\n .use(initReactI18next) // bind react-i18next to the instance\n .init({\n fallbackLng: defaultLng,\n ns: [defaultNS],\n defaultNS,\n interpolation: {\n escapeValue: false, // not needed for react!!\n },\n detection: {\n lookupLocalStorage: i18nLocalStorageKey,\n lookupCookie: i18nCookieKey,\n caches: [\"cookie\", \"localStorage\"],\n order: [\"cookie\", \"localStorage\", \"htmlTag\", \"navigator\"],\n },\n resources: {\n [defaultLng]: { [defaultNS]: en },\n },\n });\n\nexport default i18n;\n","import { i18n as I18nInstance } from \"i18next\";\nimport { LocaleCode } from \"./types\";\n\nexport type BackendOptions = {\n /**\n * Load url for a given language and namespace\n * @param lang language code\n * @param ns namespace\n * @returns url or urls\n */\n loadPath: (lang: LocaleCode, ns: string) => string | string[];\n};\n\n/**\n * Async resources loading through HTTP, resources must be placed in the site's public directory\n */\nexport class Backend {\n private readonly cache: Set<string>;\n\n constructor(\n private readonly i18n: I18nInstance,\n private readonly options?: BackendOptions,\n ) {\n this.cache = new Set();\n }\n\n async fetchData(url: string): Promise<Record<string, string>> {\n try {\n const res = await fetch(url);\n return await res.json();\n } catch (error) {\n console.warn(\n `Failed to fetch locale resource bundle from ${url}:`,\n error,\n );\n return {};\n }\n }\n\n async loadLanguage(lang: LocaleCode, ns: string) {\n if (typeof this.options?.loadPath !== \"function\") return;\n\n let paths = this.options.loadPath(lang, ns);\n if (typeof paths === \"string\") paths = [paths];\n if (!paths.length) return;\n\n const urls = paths.filter((path) => {\n const loaded = this.i18n.hasResourceBundle(lang, ns);\n return !loaded || !this.cache.has(path);\n });\n\n const promises = urls.map(async (url) => {\n const data = await this.fetchData(url);\n this.i18n.addResourceBundle(lang, ns, data, true, true);\n this.cache.add(url);\n });\n await Promise.all(promises);\n }\n}\n","import { createContext, useContext } from \"react\";\nimport { Language, LocaleCode } from \"./types\";\n\nexport type LocaleContextState = {\n /**\n * Supported languages\n */\n languages: Language[];\n\n /**\n * Called before language change\n * @param lang - new language code\n * @returns\n */\n beforeLanguageChange: (lang: LocaleCode) => Promise<void>;\n /**\n * Called after language changed\n * @param lang - new language code\n * @returns\n */\n afterLanguageChange: (lang: LocaleCode) => Promise<void>;\n};\n\nexport const LocaleContext = createContext<LocaleContextState>({\n languages: [],\n beforeLanguageChange: () => Promise.resolve(),\n afterLanguageChange: () => Promise.resolve(),\n});\n\nexport const useLocaleContext = () => {\n const context = useContext(LocaleContext);\n if (!context) {\n throw new Error(\"useLocaleContext must be used within a LocaleProvider\");\n }\n return context;\n};\n","import { LocaleEnum } from \"../types\";\n\n/**\n * get locale path from pathname\n * @param pathname - pathname to get locale path\n * @param localeCodes - locale codes to check\n * @example\n * getLocalePathFromPathname('/en/perp/PERP_ETH_USDC') => 'en'\n * getLocalePathFromPathname('/perp/PERP_ETH_USDC') => null\n * getLocalePathFromPathname('/en/markets') => 'en'\n * getLocalePathFromPathname('/markets') => null\n */\nexport function getLocalePathFromPathname(\n pathname: string,\n localeCodes?: string[],\n) {\n const locale = pathname.split(\"/\")[1];\n localeCodes = localeCodes || Object.values(LocaleEnum);\n return localeCodes.includes(locale as LocaleEnum) ? locale : null;\n}\n","import { type LocaleCode, LocaleEnum } from \"../types\";\n\n/**\n * transform browser language to i18n locale codes\n * @param lang - browser language\n * @param localeCodes - locale codes to check\n * @param defaultLang - default locale code\n * @example\n * parseI18nLang('en-US') => 'en'\n * parseI18nLang('zh-CN') => 'zh'\n * parseI18nLang('zh-TW') => 'zh'\n * parseI18nLang('ja') => 'ja'\n * */\nexport function parseI18nLang(\n lang: string,\n localeCodes?: LocaleCode[],\n defaultLang?: LocaleCode,\n) {\n localeCodes = localeCodes || Object.values(LocaleEnum);\n defaultLang = defaultLang || LocaleEnum.en;\n\n const regex = /^([a-z]{2})/i;\n const match = lang?.match(regex);\n\n if (!match) {\n return defaultLang;\n }\n\n const matchLang = match[1];\n\n if (localeCodes.includes(lang)) {\n return lang;\n }\n\n if (localeCodes.includes(matchLang)) {\n return matchLang;\n }\n\n return defaultLang;\n}\n","import i18n from \"../i18n\";\nimport { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\nimport { parseI18nLang } from \"./parseI18nLang\";\n\n/**\n * Generate a localized path with proper locale prefix and search parameters\n *\n * This function ensures that the returned path includes the appropriate locale prefix.\n * If the path already contains a valid locale prefix, it returns the path as-is.\n * Otherwise, it prepends the specified locale or falls back to the current i18n language.\n *\n * @param params - Configuration object for path generation\n * @param params.path - The base pathname (e.g., '/markets', '/perp/PERP_ETH_USDC')\n * @param params.locale - Optional locale code to use as prefix. If not provided, uses i18n.language\n * @param params.search - Optional search query string. If not provided, uses window.location.search\n *\n * @returns A complete URL path with locale prefix and search parameters\n *\n * @example\n * generatePath({ path: '/markets' }) => '/en/markets?tab=spot'\n * generatePath({ path: '/en/markets', search: '?tab=futures' }) => '/en/markets?tab=futures'\n * generatePath({ path: '/perp/PERP_ETH_USDC', locale: 'zh' }) => '/zh/perp/PERP_ETH_USDC'\n * generatePath({ path: '/en/perp/PERP_ETH_USDC' }) => '/en/perp/PERP_ETH_USDC'\n */\nexport function generatePath(params: {\n path: string;\n locale?: string;\n search?: string;\n}) {\n const { path, locale, search } = params;\n const searchUrl =\n search || (typeof window !== \"undefined\" ? window.location.search : \"\");\n\n let localePath = getLocalePathFromPathname(path);\n\n // If path already contains a valid locale prefix, return it unchanged\n if (localePath) {\n return `${path}${searchUrl}`;\n }\n\n // Use provided locale or fall back to current i18n language\n localePath = locale || parseI18nLang(i18n.language);\n\n // Prepend locale prefix to path\n return `/${localePath}${path}${searchUrl}`;\n}\n","import { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\n\n/**\n * remove lang prefix from pathname\n * @param pathname - pathname to remove lang prefix\n * @param localeCodes - locale codes to check\n * @example\n * removeLangPrefix('/en/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/en/markets') => '/markets'\n * removeLangPrefix('/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/markets') => '/markets'\n */\nexport function removeLangPrefix(pathname: string, localeCodes?: string[]) {\n const localePath = getLocalePathFromPathname(pathname, localeCodes);\n\n return localePath\n ? pathname.replace(new RegExp(`^/${localePath}(?=/)`), \"\")\n : pathname;\n}\n","import {\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { Backend, BackendOptions } from \"./backend\";\nimport { defaultLanguages, defaultNS } from \"./constant\";\nimport { LocaleContext, LocaleContextState } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode, Resources, Language } from \"./types\";\nimport { parseI18nLang } from \"./utils\";\n\nexport type LocaleProviderProps = PropsWithChildren<\n {\n /** current locale */\n locale?: LocaleCode;\n /** current locale's resource */\n resource?: Record<string, string>;\n /** all synchronously loaded resources */\n resources?: Resources;\n /** supported languages, must be a subset of {@link defaultLanguages}, used when {@link languages} is not provided */\n supportedLanguages?: LocaleCode[];\n /** optional conversion function to modify the detected language code */\n convertDetectedLanguage?: (lang: string) => LocaleCode;\n /** options to load resources asynchronously */\n backend?: BackendOptions;\n } & Partial<LocaleContextState>\n>;\n\nexport function LocaleProvider({\n children,\n locale,\n resource,\n resources,\n backend,\n supportedLanguages,\n convertDetectedLanguage,\n languages: languagesProp,\n beforeLanguageChange,\n afterLanguageChange,\n}: LocaleProviderProps) {\n // calculated supported languages\n const [languages, setLanguages] = useState<Language[]>(defaultLanguages);\n\n // backend instance to load resources asynchronously\n const backendRef = useRef(new Backend(i18n, backend!));\n\n // load resources synchronously\n useEffect(() => {\n if (resources) {\n Object.entries(resources).forEach(([locale, messages]) => {\n i18n.addResourceBundle(locale, defaultNS, messages, true, true);\n });\n return;\n }\n if (resource && locale) {\n i18n.addResourceBundle(locale, defaultNS, resource, true, true);\n }\n }, [locale, resource, resources]);\n\n // change language when locale changed\n useEffect(() => {\n if (locale && locale !== i18n.language) {\n i18n.changeLanguage(locale);\n }\n }, [locale]);\n\n // calculate supported languages\n useEffect(() => {\n if (Array.isArray(languagesProp)) {\n setLanguages(languagesProp);\n } else if (Array.isArray(supportedLanguages)) {\n setLanguages(\n supportedLanguages\n .map((localCode) =>\n defaultLanguages.find((l) => l.localCode === localCode),\n )\n .filter((item) => !!item),\n );\n }\n }, [supportedLanguages, languagesProp]);\n\n // if browser language is not a valid language, change language\n useEffect(() => {\n const fixLanguage = async () => {\n const lang =\n typeof convertDetectedLanguage === \"function\"\n ? convertDetectedLanguage(i18n.language)\n : parseI18nLang(i18n.language);\n await backendRef.current.loadLanguage(lang, defaultNS);\n if (lang !== i18n.language) {\n await i18n.changeLanguage(lang);\n }\n };\n fixLanguage();\n }, [i18n.language]);\n\n const beforeLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n await beforeLanguageChange?.(lang);\n // load language before language changed\n await backendRef.current.loadLanguage(lang, defaultNS);\n },\n [beforeLanguageChange],\n );\n\n const afterLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n afterLanguageChange?.(lang);\n },\n [afterLanguageChange],\n );\n\n const contextValue = useMemo<LocaleContextState>(() => {\n return {\n languages,\n beforeLanguageChange: beforeLanguageChangeHandler,\n afterLanguageChange: afterLanguageChangeHandler,\n };\n }, [languages, beforeLanguageChangeHandler, afterLanguageChangeHandler]);\n\n return (\n <LocaleContext.Provider value={contextValue}>\n <I18nextProvider i18n={i18n} defaultNS={defaultNS}>\n {children}\n </I18nextProvider>\n </LocaleContext.Provider>\n );\n}\n","import { useContext } from \"react\";\nimport {\n FallbackNs,\n useTranslation as _useTranslation,\n UseTranslationOptions,\n I18nContext,\n} from \"react-i18next\";\nimport { FlatNamespace, KeyPrefix } from \"i18next\";\nimport i18n from \"./i18n\";\n\ntype $Tuple<T> = readonly [T?, ...T[]];\n\n/**\n * Hook to get translation function\n * @param ns\n * @param options\n * @returns\n */\nexport function useTranslation<\n Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined = undefined,\n KPrefix extends KeyPrefix<FallbackNs<Ns>> = undefined,\n>(ns?: Ns, options?: UseTranslationOptions<KPrefix>) {\n const context = useContext(I18nContext);\n return _useTranslation(ns, { i18n: context?.i18n || i18n, ...options });\n}\n","import { useEffect, useState } from \"react\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\n/**\n * Hooks to get current locale code\n * @returns current locale code\n */\nexport function useLocale() {\n const [localeCode, setLocaleCode] = useState<LocaleCode>(i18n.language);\n\n useEffect(() => {\n i18n.on(\"languageChanged\", setLocaleCode);\n return () => {\n i18n.off(\"languageChanged\", setLocaleCode);\n };\n }, [i18n]);\n\n return localeCode;\n}\n","import { useCallback } from \"react\";\nimport { useLocaleContext } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\nexport function useChangeLocale() {\n const { beforeLanguageChange, afterLanguageChange } = useLocaleContext();\n\n const changeLocale = useCallback(\n async (locale: LocaleCode) => {\n await beforeLanguageChange(locale);\n await i18n.changeLanguage(locale);\n await afterLanguageChange(locale);\n },\n [beforeLanguageChange, afterLanguageChange, i18n],\n );\n\n return changeLocale;\n}\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -7,5 +7,5 @@ import {initReactI18next,I18nextProvider,I18nContext,useTranslation}from'react-i
|
|
|
7
7
|
1. Search for @BotFather on Telegram
|
|
8
8
|
2. Send /newbot to create a bot and get Token
|
|
9
9
|
3. Enter the Bot Token here and save
|
|
10
|
-
4. Add the bot to your group/channel`,"channels.forms.socials.telegram.placeholder":"Enter your Telegram Bot Token","channels.list.title":"Channel List","channels.trending.title":"Trending Channels","channels.my.title":"My Channels","channels.subscribe.submit":"Subscribe","channels.subscribe.error":"Subscribe channel error","channels.subscribe.success":"Subscribe channel successfully","channels.unsubscribe.submit":"Subscribed","channels.unsubscribe.error":"Unsubscribe channel error","channels.unsubscribe.success":"Unsubscribe channel successfully","channels.subscribed.title":"Subscribed Channels","channels.create.title":"Create Channel","channels.create.success":"Channel created successfully","channels.create.error":"Create channel error","channels.create.eligibility.title":"Check Eligibility","channels.create.eligibility.description":"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.","channels.create.eligibility.xConnection":"X Account Connection","channels.create.eligibility.connected":"Connected as","channels.create.eligibility.notConnected":"No X account connected","channels.create.eligibility.connect":"Connect X Account","channels.create.eligibility.disconnect":"Disconnect","channels.create.eligibility.verifying":"Verifying eligibility...","channels.create.eligibility.requirementsTitle":"Eligibility Requirements","channels.create.eligibility.followersCount":"Followers Count","channels.create.eligibility.accountAge":"Account Age","channels.create.eligibility.behaviorScore":"Behavior Score","channels.create.eligibility.clean":"Clean","channels.create.eligibility.allPassed":"All eligibility checks passed! You can now create a channel.","channels.create.eligibility.failed":"Some requirements are not met. Please check your account.","channels.update.title":"Update Channel","channels.update.success":"Channel updated successfully","channels.update.error":"Update channel error","channels.info.walletCount":"Wallet Count","channels.info.subscribeCount":"Subscribe Count","channels.info.createdAt":"created at","channels.info.updatedAt":"last updated at","channels.stats.7dTxs.title":"7D TXs","channels.stats.7dTxs.hint":"7 Days Transactions","channels.stats.7dPnl.title":"7D PnL","channels.stats.7dPnl.hint":"7 Days Profit and Loss","channels.stats.7dWr.title":"7D WR","channels.stats.7dWr.hint":"7 Days Winning Rate","channels.detail.title":"Channel Detail","channels.detail.notfound":"Channel not found","channels.events.title":"Channel Events","channels.events.empty":"No events yet","channels.events.walletTrade.buy":"bought","channels.events.walletTrade.sell":"sold","channels.events.walletTrade.got":"got","channels.events.walletTrade.cost":"cost","channels.events.walletTrade.price":"price"};var H={"common.cancel":"Cancel","common.confirm":"Confirm","common.reset":"Reset","common.apply":"Apply","common.ok":"OK","common.yes":"Yes","common.no":"No","common.all":"All","common.buy":"Buy","common.sell":"Sell","common.long":"Long","common.short":"Short","common.edit":"Edit","common.save":"Save","common.add":"Add","common.delete":"Delete","common.tips":"Tips","common.max":"Max","common.download":"Download","common.copy":"Copy","common.copy.failed":"Copy failed","common.copy.copied":"Copied to clipboard","common.share":"Share","common.export":"Export","common.empty":"No data","common.unauthenticated":"Please sign in to continue","common.signIn":"Sign In","common.signOut":"Sign Out","common.resolution.1s":"1s","common.resolution.15s":"15s","common.resolution.30s":"30s","common.resolution.1m":"1m","common.resolution.5m":"5m","common.resolution.15m":"15m","common.resolution.30m":"30m","common.resolution.1h":"1h","common.resolution.4h":"4h","common.resolution.12h":"12h","common.resolution.24h":"24h","common.upload.submit":"Upload","common.upload.resubmit":"Reupload","common.upload.error":"Upload error","common.loadingMore":"Loading more...","common.continue":"Continue","common.months":"months","common.days":"days"};var B={"mediaTrack.tweets.translate.show":"Show Translation","mediaTrack.tweets.translate.hide":"Hide Translation","mediaTrack.tweets.expand":"Expand","mediaTrack.tweets.collapse":"Collapse"};var R={"portfolio.tabs.spot":"Spot","portfolio.tabs.perps":"Perps","portfolio.tabs.prediction":"Prediction","portfolio.address.allWallets":"All Wallets","portfolio.address.aggregated":"Aggregated","portfolio.address.copy":"Copy Address","portfolio.address.copied":"Address copied","portfolio.address.owner":"Owner","portfolio.address.viewing":"Viewing","portfolio.address.search.placeholder":"Search wallet address\u2026","portfolio.address.search.view":"View","portfolio.address.search.invalid":"Enter a valid address","portfolio.balance.uPnl":"uPNL","portfolio.balance.realized":"Realized","portfolio.balance.gas":"Gas","portfolio.curve.netWorth":"Net Worth","portfolio.curve.pnl":"PNL","portfolio.curve.noData":"Not enough data","portfolio.distribution.title":"Distribution","portfolio.distribution.other":"Other","portfolio.viewing.banner":"Viewing external portfolio","portfolio.viewing.back":"Back to My Portfolio","portfolio.spot.holdings":"Holdings","portfolio.spot.history":"History","portfolio.spot.search.placeholder":"Search token\u2026","portfolio.spot.hideSmall":"Hide small","portfolio.spot.group.tokens":"Tokens","portfolio.spot.header.asset":"Asset","portfolio.spot.header.balance":"Balance","portfolio.spot.header.price":"Price","portfolio.spot.header.value":"Value","portfolio.spot.header.24h":"24h","portfolio.spot.empty":"No tokens found","portfolio.spot.empty.hint":"Your spot tokens will appear here","portfolio.spot.history.header.type":"Type","portfolio.spot.history.header.detail":"Detail","portfolio.spot.history.header.amount":"Amount","portfolio.spot.history.header.value":"Value","portfolio.spot.history.header.time":"Time","portfolio.spot.history.header.txHash":"TxHash","portfolio.spot.history.type.swap":"Swap","portfolio.spot.history.type.send":"Send","portfolio.spot.history.type.receive":"Receive","portfolio.perps.openPositions":"Open Positions","portfolio.perps.tradeHistory":"Trade History","portfolio.perps.closeAll":"Close All","portfolio.perps.close":"Close","portfolio.perps.closeAll.confirm":"Close all positions? This will route to each protocol to execute.","portfolio.perps.closeAll.confirmBtn":"Confirm Close All","portfolio.perps.closeAll.cancel":"Cancel","portfolio.perps.header.pair":"Pair / Side","portfolio.perps.header.size":"Size","portfolio.perps.header.entry":"Entry","portfolio.perps.header.mark":"Mark","portfolio.perps.header.uPnl":"uPNL","portfolio.perps.search.placeholder":"Search pair\u2026","portfolio.perps.empty":"No open positions","portfolio.perps.empty.hint":"Start trading \u2192","portfolio.perps.history.header.pair":"Pair","portfolio.perps.history.header.side":"Side","portfolio.perps.history.header.size":"Size","portfolio.perps.history.header.pnl":"PNL","portfolio.perps.history.header.closePrice":"Close Price","portfolio.perps.history.header.time":"Time","portfolio.prediction.activeBets":"Active Bets","portfolio.prediction.settled":"Settled","portfolio.prediction.sellAll":"Sell All","portfolio.prediction.sell":"Sell","portfolio.prediction.sellAll.confirm":"Sell all positions? This will route to each platform to execute.","portfolio.prediction.sellAll.confirmBtn":"Confirm Sell All","portfolio.prediction.sellAll.cancel":"Cancel","portfolio.prediction.header.market":"Market / Source","portfolio.prediction.header.position":"Position","portfolio.prediction.header.stake":"Stake","portfolio.prediction.header.potential":"Potential","portfolio.prediction.header.status":"Status","portfolio.prediction.search.placeholder":"Search market\u2026","portfolio.prediction.empty":"No active bets","portfolio.prediction.empty.hint":"Explore prediction markets \u2192","portfolio.prediction.settled.header.market":"Market","portfolio.prediction.settled.header.source":"Source","portfolio.prediction.settled.header.position":"Position","portfolio.prediction.settled.header.stake":"Stake","portfolio.prediction.settled.header.result":"Result","portfolio.prediction.settled.header.payout":"Payout","portfolio.connectWallet":"Connect Wallet","portfolio.connectWallet.hint":"Connect your wallet to view your portfolio","portfolio.error.load":"Failed to load portfolio data","portfolio.error.retry":"Retry"};var F={"predict.categories.trending":"Trending","predict.categories.allMarkets":"All Markets","predict.event.status.closed":"Closed","predict.event.status.live":"Live","predict.event.status.pending":"Pending","predict.event.volume":"vol","predict.event.endDate":"Ends {{date}}","predict.event.rules":"Rules","predict.event.rules.collapse":"Collapse","predict.event.rules.expand":"Expand all","predict.event.showMore":"Show More","predict.event.back":"Back","predict.event.moreMarkets":"+{{count}} more","predict.market.table.outcome":"Outcome","predict.market.table.chance":"Chance","predict.market.table.actions":"Actions","predict.market.action.yes":"Yes {{price}}\xA2","predict.market.action.no":"No {{price}}\xA2","predict.market.yes":"Yes","predict.market.no":"No","predict.market.sharesYes":"{{shares}} Yes","predict.market.sharesNo":"{{shares}} No","predict.market.tradeYes":"Trade Yes","predict.market.tradeNo":"Trade No","predict.market.graph":"Graph","predict.trade.action":"Trade","predict.trade.buy":"Buy","predict.trade.sell":"Sell","predict.trade.yes":"Yes","predict.trade.no":"No","predict.trade.limit":"Limit","predict.trade.market":"Market","predict.trade.price":"Price","predict.trade.amount":"Amount","predict.trade.contracts":"Contracts","predict.trade.estimatedCost":"Est. Cost","predict.trade.potentialPayout":"Potential Payout","predict.trade.potentialProfit":"Potential Profit","predict.trade.potentialWin":"Potential Win","predict.trade.estimatedReceive":"Est. Receive","predict.trade.balance":"Available Balance","predict.trade.bestBid":"Bid","predict.trade.bestAsk":"Ask","predict.trade.priceImpact":"Price Impact","predict.trade.quoteError":"Unable to get quote. Please try again.","predict.trade.connectWallet":"Connect Wallet","predict.trade.submitting":"Submitting\u2026","predict.trade.submitSuccess":"Transaction submitted successfully!","predict.trade.submitError":"Transaction failed. Please try again.","predict.orderBook.title":"Order Book","predict.orderBook.empty":"No orders yet","predict.orderBook.type":"Type","predict.orderBook.price":"Price","predict.orderBook.contracts":"Contracts","predict.orderBook.qty":"Qty","predict.orderBook.total":"Total","predict.orderBook.spread":"Spread","predict.openOrders.title":"Open Orders","predict.openOrders.empty":"No open orders","predict.openOrders.side":"Side","predict.openOrders.outcome":"Outcome","predict.openOrders.type":"Type","predict.openOrders.price":"Price","predict.openOrders.filled":"Filled","predict.openOrders.status":"Status","predict.openOrders.time":"Time","predict.openOrders.cancel":"Cancel","predict.tradeHistory.title":"Trade History","predict.tradeHistory.empty":"No trades yet","predict.tradeHistory.side":"Side","predict.tradeHistory.outcome":"Outcome","predict.tradeHistory.price":"Price","predict.tradeHistory.qty":"Qty","predict.tradeHistory.total":"Total","predict.tradeHistory.fee":"Fee","predict.tradeHistory.time":"Time","predict.positions.title":"Positions","predict.positions.empty":"No positions","predict.positions.market":"Market","predict.positions.outcome":"Outcome","predict.positions.qty":"Qty","predict.positions.avgCost":"Avg Cost","predict.positions.currentPrice":"Price","predict.positions.value":"Value","predict.positions.pnl":"P&L","predict.positions.totalValue":"Total Value","predict.positions.unrealizedPnl":"Unrealized P&L","predict.positions.realizedPnl":"Realized P&L","predict.pagination.prev":"Prev","predict.pagination.next":"Next","predict.pagination.page":"Page {{page}}"};var I={"scaffold.draggableModal.snapToEdge":"Drag to edge to show side panel","scaffold.draggablePanel.snapToModal":"Drag away to show floating modal","scaffold.home":"Home"};var O={"tokens.search.placeholder":"Search by token or CA...","tokens.copied.address":"Token address copied to clipboard","tokens.listHeader.token":"Token","tokens.listHeader.priceHistories":"Price Histories","tokens.listHeader.price":"Price","tokens.listHeader.priceChange":"{{resolution}}%","tokens.listHeader.marketCap":"Market Cap","tokens.listHeader.liquidity":"Liquidity","tokens.listHeader.volumes":"{{resolution}} Volumes","tokens.listHeader.txs":"{{resolution}} TXNS","tokens.listHeader.traders":"{{resolution}} Traders","tokens.listHeader.bluechip":"BlueChip","tokens.listHeader.tokenInfo":"Token Info","tokens.listHeader.actions":"Actions","tokens.listHeader.filter":"Filter","tokens.listType.trending":"Trending","tokens.listType.new":"New","tokens.listType.stocks":"Stocks","tokens.filters.protocols.title":"Protocols","tokens.filters.protocols.selectAll":"Select All","tokens.filters.protocols.unselectAll":"Unselect All","tokens.filters.keywords.title":"Search Keywords","tokens.filters.keywords.exclude.title":"Exclude Keywords","tokens.filters.keywords.placeholder":"keyword1, keyword2...","tokens.filters.stats.min":"Min","tokens.filters.stats.max":"Max","tokens.filters.stats.audits":"Audits","tokens.filters.stats.audits.holders":"Holders Count","tokens.filters.stats.audits.top10HoldingsRatio":"Top 10 Holders %","tokens.filters.stats.audits.top100HoldingsRatio":"Top 100 Holders %","tokens.filters.stats.audits.devHoldingsRatio":"Dev Holdings %","tokens.filters.stats.metrics":"Metrics","tokens.filters.stats.metrics.volumes":"{{resolution}} Volumes ($)","tokens.filters.stats.metrics.txns":"{{resolution}} Transactions","tokens.filters.stats.metrics.liquidity":"Liquidity ($)","tokens.filters.stats.metrics.marketCap":"Market Cap ($)","tokens.filters.modal.title":"Filters","tokens.tokenInfo.holders":"Holders","tokens.tokenInfo.proHolders":"Pro Holders","tokens.tokenInfo.kolHolders":"KOL Holders","tokens.tokenInfo.top10HoldingsRatio":"Top 10 Holders","tokens.tokenInfo.top100HoldingsRatio":"Top 100 Holders","tokens.tokenInfo.devHoldingsRatio":"Dev Holders","tokens.tokenInfo.sniperHoldingsRatio":"Snipers","tokens.tokenInfo.insiderHoldingsRatio":"Insiders","tokens.tokenInfo.bundleHoldingsRatio":"Bundlers","tokens.bluechip.explained":"BlueChip index is the ratio of holders who also own BlueChip tokens","tokens.pulse.new":"New","tokens.pulse.migrated":"Migrated","tokens.pulse.finalStretch":"Final Stretch","tokens.pulse.paused":"Paused","tokens.pulse.vol":"Vol","tokens.pulse.txs":"Txs"};var D={...H,...B,...F,...I,...O,...N,...R};var M=createInstance();M.use(K).use(initReactI18next).init({fallbackLng:k,ns:[i],defaultNS:i,interpolation:{escapeValue:false},detection:{lookupLocalStorage:S,lookupCookie:A,caches:["cookie","localStorage"],order:["cookie","localStorage","htmlTag","navigator"]},resources:{[k]:{[i]:D}}});var o=M;var u=class{constructor(e){this.options=e;this.cache=new Set;}cache;async fetchData(e){try{return await(await fetch(e)).json()}catch(r){return console.warn(`Failed to fetch locale resource bundle from ${e}:`,r),{}}}async loadLanguage(e,r){if(typeof this.options?.loadPath!="function")return;let s=this.options.loadPath(e,r);if(typeof s=="string"&&(s=[s]),!s.length)return;let n=s.filter(c=>!o.hasResourceBundle(e,r)||!this.cache.has(c)).map(async c=>{let p=await this.fetchData(c);o.addResourceBundle(e,r,p,true,true),this.cache.add(c);});await Promise.all(n);}};var C=createContext({languages:[],beforeLanguageChange:()=>Promise.resolve(),afterLanguageChange:()=>Promise.resolve()}),W=()=>{let a=useContext(C);if(!a)throw new Error("useLocaleContext must be used within a LocaleProvider");return a};function h(a,e){let r=a.split("/")[1];return e=e||Object.values(m),e.includes(r)?r:null}function f(a,e,r){e=e||Object.values(m),r=r||"en";let s=/^([a-z]{2})/i,l=a?.match(s);if(!l)return r;let n=l[1];return e.includes(a)?a:e.includes(n)?n:r}function $e(a){let{path:e,locale:r,search:s}=a,l=s||(typeof window<"u"?window.location.search:""),n=h(e);return n?`${e}${l}`:(n=r||f(o.language),`/${n}${e}${l}`)}function Qe(a,e){let r=h(a,e);return r?a.replace(new RegExp(`^/${r}(?=/)`),""):a}function Z({children:a,locale:e,resource:r,resources:s,backend:l,supportedLanguages:n,convertDetectedLanguage:c,languages:p,beforeLanguageChange:b,afterLanguageChange:x}){let[w,P]=useState(y),L=useRef(new u(l));useEffect(()=>{if(s){Object.entries(s).forEach(([t,d])=>{o.addResourceBundle(t,i,d,true,true);});return}r&&e&&o.addResourceBundle(e,i,r,true,true);},[e,r,s]),useEffect(()=>{e&&e!==o.language&&o.changeLanguage(e);},[e]),useEffect(()=>{Array.isArray(p)?P(p):Array.isArray(n)&&P(n.map(t=>y.find(d=>d.localCode===t)).filter(t=>!!t));},[n,p]),useEffect(()=>{(async()=>{let d=typeof c=="function"?c(o.language):f(o.language);await L.current.loadLanguage(d,i),d!==o.language&&await o.changeLanguage(d);})();},[o.language]);let v=useCallback(async t=>{await b?.(t),await L.current.loadLanguage(t,i);},[b]),T=useCallback(async t=>{x?.(t);},[x]),z=useMemo(()=>({languages:w,beforeLanguageChange:v,afterLanguageChange:T}),[w,v,T]);return jsx(C.Provider,{value:z,children:jsx(I18nextProvider,{i18n:o,defaultNS:i,children:a})})}function te(a,e){let r=useContext(I18nContext);return useTranslation(a,{i18n:r?.i18n||o,...e})}function ae(){let[a,e]=useState(o.language);return useEffect(()=>(o.on("languageChanged",e),()=>{o.off("languageChanged",e);}),[o]),a}function ne(){let{beforeLanguageChange:a,afterLanguageChange:e}=W();return useCallback(async s=>{await a(s),await o.changeLanguage(s),await e(s);},[a,e,o])}export{C as LocaleContext,m as LocaleEnum,Z as LocaleProvider,y as defaultLanguages,k as defaultLng,i as defaultNS,D as en,$e as generatePath,h as getLocalePathFromPathname,o as i18n,A as i18nCookieKey,S as i18nLocalStorageKey,f as parseI18nLang,Qe as removeLangPrefix,ne as useChangeLocale,ae as useLocale,W as useLocaleContext,te as useTranslation};//# sourceMappingURL=index.mjs.map
|
|
10
|
+
4. Add the bot to your group/channel`,"channels.forms.socials.telegram.placeholder":"Enter your Telegram Bot Token","channels.list.title":"Channel List","channels.trending.title":"Trending Channels","channels.my.title":"My Channels","channels.subscribe.submit":"Subscribe","channels.subscribe.error":"Subscribe channel error","channels.subscribe.success":"Subscribe channel successfully","channels.unsubscribe.submit":"Subscribed","channels.unsubscribe.error":"Unsubscribe channel error","channels.unsubscribe.success":"Unsubscribe channel successfully","channels.subscribed.title":"Subscribed Channels","channels.create.title":"Create Channel","channels.create.success":"Channel created successfully","channels.create.error":"Create channel error","channels.create.eligibility.title":"Check Eligibility","channels.create.eligibility.description":"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.","channels.create.eligibility.xConnection":"X Account Connection","channels.create.eligibility.connected":"Connected as","channels.create.eligibility.notConnected":"No X account connected","channels.create.eligibility.connect":"Connect X Account","channels.create.eligibility.disconnect":"Disconnect","channels.create.eligibility.verifying":"Verifying eligibility...","channels.create.eligibility.requirementsTitle":"Eligibility Requirements","channels.create.eligibility.followersCount":"Followers Count","channels.create.eligibility.accountAge":"Account Age","channels.create.eligibility.behaviorScore":"Behavior Score","channels.create.eligibility.clean":"Clean","channels.create.eligibility.allPassed":"All eligibility checks passed! You can now create a channel.","channels.create.eligibility.failed":"Some requirements are not met. Please check your account.","channels.update.title":"Update Channel","channels.update.success":"Channel updated successfully","channels.update.error":"Update channel error","channels.info.walletCount":"Wallet Count","channels.info.subscribeCount":"Subscribe Count","channels.info.createdAt":"created at","channels.info.updatedAt":"last updated at","channels.stats.7dTxs.title":"7D TXs","channels.stats.7dTxs.hint":"7 Days Transactions","channels.stats.7dPnl.title":"7D PnL","channels.stats.7dPnl.hint":"7 Days Profit and Loss","channels.stats.7dWr.title":"7D WR","channels.stats.7dWr.hint":"7 Days Winning Rate","channels.detail.title":"Channel Detail","channels.detail.notfound":"Channel not found","channels.events.title":"Channel Events","channels.events.empty":"No events yet","channels.events.walletTrade.buy":"bought","channels.events.walletTrade.sell":"sold","channels.events.walletTrade.got":"got","channels.events.walletTrade.cost":"cost","channels.events.walletTrade.price":"price"};var H={"common.cancel":"Cancel","common.confirm":"Confirm","common.reset":"Reset","common.apply":"Apply","common.ok":"OK","common.yes":"Yes","common.no":"No","common.all":"All","common.buy":"Buy","common.sell":"Sell","common.long":"Long","common.short":"Short","common.edit":"Edit","common.save":"Save","common.add":"Add","common.delete":"Delete","common.tips":"Tips","common.max":"Max","common.download":"Download","common.copy":"Copy","common.copy.failed":"Copy failed","common.copy.copied":"Copied to clipboard","common.share":"Share","common.export":"Export","common.empty":"No data","common.unauthenticated":"Please sign in to continue","common.signIn":"Sign In","common.signOut":"Sign Out","common.resolution.1s":"1s","common.resolution.15s":"15s","common.resolution.30s":"30s","common.resolution.1m":"1m","common.resolution.5m":"5m","common.resolution.15m":"15m","common.resolution.30m":"30m","common.resolution.1h":"1h","common.resolution.4h":"4h","common.resolution.12h":"12h","common.resolution.24h":"24h","common.upload.submit":"Upload","common.upload.resubmit":"Reupload","common.upload.error":"Upload error","common.loadingMore":"Loading more...","common.continue":"Continue","common.months":"months","common.days":"days"};var B={"mediaTrack.tweets.translate.show":"Show Translation","mediaTrack.tweets.translate.hide":"Hide Translation","mediaTrack.tweets.expand":"Expand","mediaTrack.tweets.collapse":"Collapse"};var I={"portfolio.tabs.spot":"Spot","portfolio.tabs.perps":"Perps","portfolio.tabs.prediction":"Prediction","portfolio.address.allWallets":"All Wallets","portfolio.address.aggregated":"Aggregated","portfolio.address.copy":"Copy Address","portfolio.address.copied":"Address copied","portfolio.address.owner":"Owner","portfolio.address.viewing":"Viewing","portfolio.address.search.placeholder":"Search wallet address\u2026","portfolio.address.search.view":"View","portfolio.address.search.invalid":"Enter a valid address","portfolio.balance.uPnl":"uPNL","portfolio.balance.realized":"Realized","portfolio.balance.gas":"Gas","portfolio.curve.netWorth":"Net Worth","portfolio.curve.pnl":"PNL","portfolio.curve.noData":"Not enough data","portfolio.distribution.title":"Distribution","portfolio.distribution.other":"Other","portfolio.viewing.banner":"Viewing external portfolio","portfolio.viewing.back":"Back to My Portfolio","portfolio.spot.holdings":"Holdings","portfolio.spot.history":"History","portfolio.spot.search.placeholder":"Search token\u2026","portfolio.spot.hideSmall":"Hide small","portfolio.spot.group.tokens":"Tokens","portfolio.spot.header.asset":"Asset","portfolio.spot.header.balance":"Balance","portfolio.spot.header.price":"Price","portfolio.spot.header.value":"Value","portfolio.spot.header.24h":"24h","portfolio.spot.empty":"No tokens found","portfolio.spot.empty.hint":"Your spot tokens will appear here","portfolio.spot.history.header.type":"Type","portfolio.spot.history.header.detail":"Detail","portfolio.spot.history.header.amount":"Amount","portfolio.spot.history.header.value":"Value","portfolio.spot.history.header.time":"Time","portfolio.spot.history.header.txHash":"TxHash","portfolio.spot.history.type.swap":"Swap","portfolio.spot.history.type.send":"Send","portfolio.spot.history.type.receive":"Receive","portfolio.perps.openPositions":"Open Positions","portfolio.perps.tradeHistory":"Trade History","portfolio.perps.closeAll":"Close All","portfolio.perps.close":"Close","portfolio.perps.closeAll.confirm":"Close all positions? This will route to each protocol to execute.","portfolio.perps.closeAll.confirmBtn":"Confirm Close All","portfolio.perps.closeAll.cancel":"Cancel","portfolio.perps.header.pair":"Pair / Side","portfolio.perps.header.size":"Size","portfolio.perps.header.entry":"Entry","portfolio.perps.header.mark":"Mark","portfolio.perps.header.uPnl":"uPNL","portfolio.perps.search.placeholder":"Search pair\u2026","portfolio.perps.empty":"No open positions","portfolio.perps.empty.hint":"Start trading \u2192","portfolio.perps.history.header.pair":"Pair","portfolio.perps.history.header.side":"Side","portfolio.perps.history.header.size":"Size","portfolio.perps.history.header.pnl":"PNL","portfolio.perps.history.header.closePrice":"Close Price","portfolio.perps.history.header.time":"Time","portfolio.prediction.activeBets":"Active Bets","portfolio.prediction.settled":"Settled","portfolio.prediction.sellAll":"Sell All","portfolio.prediction.sell":"Sell","portfolio.prediction.sellAll.confirm":"Sell all positions? This will route to each platform to execute.","portfolio.prediction.sellAll.confirmBtn":"Confirm Sell All","portfolio.prediction.sellAll.cancel":"Cancel","portfolio.prediction.header.market":"Market / Source","portfolio.prediction.header.position":"Position","portfolio.prediction.header.stake":"Stake","portfolio.prediction.header.potential":"Potential","portfolio.prediction.header.status":"Status","portfolio.prediction.search.placeholder":"Search market\u2026","portfolio.prediction.empty":"No active bets","portfolio.prediction.empty.hint":"Explore prediction markets \u2192","portfolio.prediction.settled.header.market":"Market","portfolio.prediction.settled.header.source":"Source","portfolio.prediction.settled.header.position":"Position","portfolio.prediction.settled.header.stake":"Stake","portfolio.prediction.settled.header.result":"Result","portfolio.prediction.settled.header.payout":"Payout","portfolio.connectWallet":"Connect Wallet","portfolio.connectWallet.hint":"Connect your wallet to view your portfolio","portfolio.error.load":"Failed to load portfolio data","portfolio.error.retry":"Retry"};var R={"predict.categories.trending":"Trending","predict.categories.allMarkets":"All Markets","predict.event.status.closed":"Closed","predict.event.status.live":"Live","predict.event.status.pending":"Pending","predict.event.volume":"vol","predict.event.endDate":"Ends {{date}}","predict.event.rules":"Rules","predict.event.rules.collapse":"Collapse","predict.event.rules.expand":"Expand all","predict.event.showMore":"Show More","predict.event.back":"Back","predict.event.moreMarkets":"+{{count}} more","predict.market.table.outcome":"Outcome","predict.market.table.chance":"Chance","predict.market.table.actions":"Actions","predict.market.action.yes":"Yes {{price}}\xA2","predict.market.action.no":"No {{price}}\xA2","predict.market.yes":"Yes","predict.market.no":"No","predict.market.sharesYes":"{{shares}} Yes","predict.market.sharesNo":"{{shares}} No","predict.market.tradeYes":"Trade Yes","predict.market.tradeNo":"Trade No","predict.market.graph":"Graph","predict.trade.action":"Trade","predict.trade.buy":"Buy","predict.trade.sell":"Sell","predict.trade.yes":"Yes","predict.trade.no":"No","predict.trade.limit":"Limit","predict.trade.market":"Market","predict.trade.price":"Price","predict.trade.amount":"Amount","predict.trade.contracts":"Contracts","predict.trade.estimatedCost":"Est. Cost","predict.trade.potentialPayout":"Potential Payout","predict.trade.potentialProfit":"Potential Profit","predict.trade.potentialWin":"Potential Win","predict.trade.estimatedReceive":"Est. Receive","predict.trade.balance":"Available Balance","predict.trade.bestBid":"Bid","predict.trade.bestAsk":"Ask","predict.trade.priceImpact":"Price Impact","predict.trade.quoteError":"Unable to get quote. Please try again.","predict.trade.connectWallet":"Connect Wallet","predict.trade.submitting":"Submitting\u2026","predict.trade.submitSuccess":"Transaction submitted successfully!","predict.trade.submitError":"Transaction failed. Please try again.","predict.orderBook.title":"Order Book","predict.orderBook.empty":"No orders yet","predict.orderBook.type":"Type","predict.orderBook.price":"Price","predict.orderBook.contracts":"Contracts","predict.orderBook.qty":"Qty","predict.orderBook.total":"Total","predict.orderBook.spread":"Spread","predict.openOrders.title":"Open Orders","predict.openOrders.empty":"No open orders","predict.openOrders.side":"Side","predict.openOrders.outcome":"Outcome","predict.openOrders.type":"Type","predict.openOrders.price":"Price","predict.openOrders.filled":"Filled","predict.openOrders.status":"Status","predict.openOrders.time":"Time","predict.openOrders.cancel":"Cancel","predict.tradeHistory.title":"Trade History","predict.tradeHistory.empty":"No trades yet","predict.tradeHistory.side":"Side","predict.tradeHistory.outcome":"Outcome","predict.tradeHistory.price":"Price","predict.tradeHistory.qty":"Qty","predict.tradeHistory.total":"Total","predict.tradeHistory.fee":"Fee","predict.tradeHistory.time":"Time","predict.positions.title":"Positions","predict.positions.empty":"No positions","predict.positions.market":"Market","predict.positions.outcome":"Outcome","predict.positions.qty":"Qty","predict.positions.avgCost":"Avg Cost","predict.positions.currentPrice":"Price","predict.positions.value":"Value","predict.positions.pnl":"P&L","predict.positions.totalValue":"Total Value","predict.positions.unrealizedPnl":"Unrealized P&L","predict.positions.realizedPnl":"Realized P&L","predict.pagination.prev":"Prev","predict.pagination.next":"Next","predict.pagination.page":"Page {{page}}"};var F={"scaffold.draggableModal.snapToEdge":"Drag to edge to show side panel","scaffold.draggablePanel.snapToModal":"Drag away to show floating modal","scaffold.home":"Home"};var O={"tokens.search.placeholder":"Search by token or CA...","tokens.copied.address":"Token address copied to clipboard","tokens.listHeader.token":"Token","tokens.listHeader.priceHistories":"Price Histories","tokens.listHeader.price":"Price","tokens.listHeader.priceChange":"{{resolution}}%","tokens.listHeader.marketCap":"Market Cap","tokens.listHeader.liquidity":"Liquidity","tokens.listHeader.volumes":"{{resolution}} Volumes","tokens.listHeader.txs":"{{resolution}} TXNS","tokens.listHeader.traders":"{{resolution}} Traders","tokens.listHeader.bluechip":"BlueChip","tokens.listHeader.tokenInfo":"Token Info","tokens.listHeader.actions":"Actions","tokens.listHeader.filter":"Filter","tokens.listType.trending":"Trending","tokens.listType.new":"New","tokens.listType.stocks":"Stocks","tokens.filters.protocols.title":"Protocols","tokens.filters.protocols.selectAll":"Select All","tokens.filters.protocols.unselectAll":"Unselect All","tokens.filters.keywords.title":"Search Keywords","tokens.filters.keywords.exclude.title":"Exclude Keywords","tokens.filters.keywords.placeholder":"keyword1, keyword2...","tokens.filters.stats.min":"Min","tokens.filters.stats.max":"Max","tokens.filters.stats.audits":"Audits","tokens.filters.stats.audits.holders":"Holders Count","tokens.filters.stats.audits.top10HoldingsRatio":"Top 10 Holders %","tokens.filters.stats.audits.top100HoldingsRatio":"Top 100 Holders %","tokens.filters.stats.audits.devHoldingsRatio":"Dev Holdings %","tokens.filters.stats.metrics":"Metrics","tokens.filters.stats.metrics.volumes":"{{resolution}} Volumes ($)","tokens.filters.stats.metrics.txns":"{{resolution}} Transactions","tokens.filters.stats.metrics.liquidity":"Liquidity ($)","tokens.filters.stats.metrics.marketCap":"Market Cap ($)","tokens.filters.modal.title":"Filters","tokens.tokenInfo.holders":"Holders","tokens.tokenInfo.proHolders":"Pro Holders","tokens.tokenInfo.kolHolders":"KOL Holders","tokens.tokenInfo.top10HoldingsRatio":"Top 10 Holders","tokens.tokenInfo.top100HoldingsRatio":"Top 100 Holders","tokens.tokenInfo.devHoldingsRatio":"Dev Holders","tokens.tokenInfo.sniperHoldingsRatio":"Snipers","tokens.tokenInfo.insiderHoldingsRatio":"Insiders","tokens.tokenInfo.bundleHoldingsRatio":"Bundlers","tokens.bluechip.explained":"BlueChip index is the ratio of holders who also own BlueChip tokens","tokens.pulse.new":"New","tokens.pulse.migrated":"Migrated","tokens.pulse.finalStretch":"Final Stretch","tokens.pulse.paused":"Paused","tokens.pulse.vol":"Vol","tokens.pulse.txs":"Txs"};var D={...H,...B,...R,...F,...O,...N,...I};var M=createInstance();M.use(K).use(initReactI18next).init({fallbackLng:k,ns:[i],defaultNS:i,interpolation:{escapeValue:false},detection:{lookupLocalStorage:S,lookupCookie:A,caches:["cookie","localStorage"],order:["cookie","localStorage","htmlTag","navigator"]},resources:{[k]:{[i]:D}}});var r=M;var u=class{constructor(e,o){this.i18n=e;this.options=o;this.cache=new Set;}cache;async fetchData(e){try{return await(await fetch(e)).json()}catch(o){return console.warn(`Failed to fetch locale resource bundle from ${e}:`,o),{}}}async loadLanguage(e,o){if(typeof this.options?.loadPath!="function")return;let s=this.options.loadPath(e,o);if(typeof s=="string"&&(s=[s]),!s.length)return;let n=s.filter(c=>!this.i18n.hasResourceBundle(e,o)||!this.cache.has(c)).map(async c=>{let p=await this.fetchData(c);this.i18n.addResourceBundle(e,o,p,true,true),this.cache.add(c);});await Promise.all(n);}};var C=createContext({languages:[],beforeLanguageChange:()=>Promise.resolve(),afterLanguageChange:()=>Promise.resolve()}),W=()=>{let a=useContext(C);if(!a)throw new Error("useLocaleContext must be used within a LocaleProvider");return a};function h(a,e){let o=a.split("/")[1];return e=e||Object.values(m),e.includes(o)?o:null}function f(a,e,o){e=e||Object.values(m),o=o||"en";let s=/^([a-z]{2})/i,l=a?.match(s);if(!l)return o;let n=l[1];return e.includes(a)?a:e.includes(n)?n:o}function Ke(a){let{path:e,locale:o,search:s}=a,l=s||(typeof window<"u"?window.location.search:""),n=h(e);return n?`${e}${l}`:(n=o||f(r.language),`/${n}${e}${l}`)}function je(a,e){let o=h(a,e);return o?a.replace(new RegExp(`^/${o}(?=/)`),""):a}function Z({children:a,locale:e,resource:o,resources:s,backend:l,supportedLanguages:n,convertDetectedLanguage:c,languages:p,beforeLanguageChange:b,afterLanguageChange:x}){let[w,P]=useState(y),L=useRef(new u(r,l));useEffect(()=>{if(s){Object.entries(s).forEach(([t,d])=>{r.addResourceBundle(t,i,d,true,true);});return}o&&e&&r.addResourceBundle(e,i,o,true,true);},[e,o,s]),useEffect(()=>{e&&e!==r.language&&r.changeLanguage(e);},[e]),useEffect(()=>{Array.isArray(p)?P(p):Array.isArray(n)&&P(n.map(t=>y.find(d=>d.localCode===t)).filter(t=>!!t));},[n,p]),useEffect(()=>{(async()=>{let d=typeof c=="function"?c(r.language):f(r.language);await L.current.loadLanguage(d,i),d!==r.language&&await r.changeLanguage(d);})();},[r.language]);let v=useCallback(async t=>{await b?.(t),await L.current.loadLanguage(t,i);},[b]),T=useCallback(async t=>{x?.(t);},[x]),z=useMemo(()=>({languages:w,beforeLanguageChange:v,afterLanguageChange:T}),[w,v,T]);return jsx(C.Provider,{value:z,children:jsx(I18nextProvider,{i18n:r,defaultNS:i,children:a})})}function te(a,e){let o=useContext(I18nContext);return useTranslation(a,{i18n:o?.i18n||r,...e})}function ae(){let[a,e]=useState(r.language);return useEffect(()=>(r.on("languageChanged",e),()=>{r.off("languageChanged",e);}),[r]),a}function ne(){let{beforeLanguageChange:a,afterLanguageChange:e}=W();return useCallback(async s=>{await a(s),await r.changeLanguage(s),await e(s);},[a,e,r])}export{C as LocaleContext,m as LocaleEnum,Z as LocaleProvider,y as defaultLanguages,k as defaultLng,i as defaultNS,D as en,Ke as generatePath,h as getLocalePathFromPathname,r as i18n,A as i18nCookieKey,S as i18nLocalStorageKey,f as parseI18nLang,je as removeLangPrefix,ne as useChangeLocale,ae as useLocale,W as useLocaleContext,te as useTranslation};//# sourceMappingURL=index.mjs.map
|
|
11
11
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts","../src/constant.ts","../src/locale/module/channels.ts","../src/locale/module/common.ts","../src/locale/module/mediaTrack.ts","../src/locale/module/portfolio.ts","../src/locale/module/predict.ts","../src/locale/module/scaffold.ts","../src/locale/module/tokens.ts","../src/locale/en.ts","../src/i18n.ts","../src/backend.ts","../src/context.ts","../src/utils/getLocalePathFromPathname.ts","../src/utils/parseI18nLang.ts","../src/utils/generatePath.ts","../src/utils/removeLangPrefix.ts","../src/provider.tsx","../src/useTranslation.ts","../src/useLocale.ts","../src/useChangeLocale.ts"],"names":["LocaleEnum","defaultLanguages","defaultLng","defaultNS","i18nLocalStorageKey","i18nCookieKey","channels","common","mediaTrack","portfolio","predict","scaffold","tokens","en","i18n","createInstance","LanguageDetector","initReactI18next","i18n_default","Backend","options","url","error","lang","ns","paths","promises","path","data","LocaleContext","createContext","useLocaleContext","context","useContext","getLocalePathFromPathname","pathname","localeCodes","locale","parseI18nLang","defaultLang","regex","match","matchLang","generatePath","params","search","searchUrl","localePath","removeLangPrefix","LocaleProvider","children","resource","resources","backend","supportedLanguages","convertDetectedLanguage","languagesProp","beforeLanguageChange","afterLanguageChange","languages","setLanguages","useState","backendRef","useRef","useEffect","messages","localCode","l","item","beforeLanguageChangeHandler","useCallback","afterLanguageChangeHandler","contextValue","useMemo","jsx","I18nextProvider","useTranslation","I18nContext","_useTranslation","useLocale","localeCode","setLocaleCode","useChangeLocale"],"mappings":"8XAKO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GAEVA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,EAAA,CAAK,IAAA,CA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A,CAAmB+D,CAAa,EAC3C,CAAA,CAAA,CACC,CAAC/D,CAAI,CAAC,EAEF8D,CACT,CCdO,SAASE,EAAAA,EAAkB,CAChC,GAAM,CAAE,qBAAAzB,CAAAA,CAAsB,mBAAA,CAAAC,CAAoB,CAAA,CAAI3B,CAAAA,GAWtD,OATqBuC,WAAAA,CACnB,MAAOjC,CAAAA,EAAuB,CAC5B,MAAMoB,CAAAA,CAAqBpB,CAAM,EACjC,MAAMnB,CAAAA,CAAK,eAAemB,CAAM,CAAA,CAChC,MAAMqB,CAAAA,CAAoBrB,CAAM,EAClC,CAAA,CACA,CAACoB,EAAsBC,CAAAA,CAAqBxC,CAAI,CAClD,CAGF","file":"index.mjs","sourcesContent":["// import the original type declarations\nimport \"i18next\";\n// import all namespaces (for the default language, only)\nimport { en } from \"./locale/en\";\n\nexport enum LocaleEnum {\n /** English */\n en = \"en\",\n /** Chinese */\n zh = \"zh\",\n /** Japanese */\n ja = \"ja\",\n /** Spanish */\n es = \"es\",\n /** Korean */\n ko = \"ko\",\n /** Vietnamese */\n vi = \"vi\",\n /** German */\n de = \"de\",\n /** French */\n fr = \"fr\",\n /** Russian */\n ru = \"ru\",\n /** Indonesian */\n id = \"id\",\n /** Turkish */\n tr = \"tr\",\n /** Italian */\n it = \"it\",\n /** Portuguese */\n pt = \"pt\",\n /** Ukrainian */\n uk = \"uk\",\n /** Polish */\n pl = \"pl\",\n /** Dutch */\n nl = \"nl\",\n}\n\nexport type LocaleCode = keyof typeof LocaleEnum | (string & {});\n\nexport type Language = {\n localCode: LocaleCode;\n displayName: string;\n};\n\nexport type ExtendLocaleMessages = Record<`extend.${string}`, string>;\n\nexport type LocaleMessages = typeof en & ExtendLocaleMessages;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type Resources<T extends {} = {}> = {\n [key in LocaleCode]?: Partial<LocaleMessages & T>;\n};\n\n// https://www.i18next.com/overview/typescript#create-a-declaration-file\n// Enhance the input parameter intelliSense for the t function.\ndeclare module \"i18next\" {\n // Extend CustomTypeOptions\n interface CustomTypeOptions {\n // custom namespace type, if you changed it\n defaultNS: \"translation\";\n // custom resources type\n resources: {\n translation: LocaleMessages;\n };\n }\n}\n","import { Language, LocaleEnum } from \"./types\";\n\nexport const defaultLanguages: Language[] = [\n { localCode: LocaleEnum.en, displayName: \"English\" }, // English\n { localCode: LocaleEnum.zh, displayName: \"中文\" }, // Chinese\n { localCode: LocaleEnum.ja, displayName: \"日本語\" }, // Japanese\n { localCode: LocaleEnum.es, displayName: \"Español\" }, // Spanish\n { localCode: LocaleEnum.ko, displayName: \"한국어\" }, // Korean\n { localCode: LocaleEnum.vi, displayName: \"Tiếng Việt\" }, // Vietnamese\n { localCode: LocaleEnum.de, displayName: \"Deutsch\" }, // German\n { localCode: LocaleEnum.fr, displayName: \"Français\" }, // French\n { localCode: LocaleEnum.ru, displayName: \"Русский\" }, // Russian\n { localCode: LocaleEnum.id, displayName: \"Bahasa Indonesia\" }, // Indonesian\n { localCode: LocaleEnum.tr, displayName: \"Türkçe\" }, // Turkish\n { localCode: LocaleEnum.it, displayName: \"Italiano\" }, // Italian\n { localCode: LocaleEnum.pt, displayName: \"Português\" }, // Portuguese\n { localCode: LocaleEnum.uk, displayName: \"Українська\" }, // Ukrainian\n { localCode: LocaleEnum.pl, displayName: \"Polski\" }, // Polish\n { localCode: LocaleEnum.nl, displayName: \"Nederlands\" }, // Dutch\n];\n\nexport const defaultLng = LocaleEnum.en;\n\nexport const defaultNS = \"translation\";\n\nexport const i18nLocalStorageKey = \"liberfi_i18nLng\";\n\nexport const i18nCookieKey = \"liberfi_i18nLng\";\n","export const channels = {\n \"channels.forms.base.title\": \"Base Info\",\n \"channels.forms.base.name.label\": \"Name\",\n \"channels.forms.base.name.placeholder\": \"Please enter the channel name\",\n \"channels.forms.base.name.required\": \"Name is required\",\n \"channels.forms.base.name.min\": \"Name must be at least 1 character\",\n \"channels.forms.base.name.max\": \"Name must be less than 24 characters\",\n \"channels.forms.base.description.label\": \"Description\",\n \"channels.forms.base.description.placeholder\":\n \"Please enter the channel description\",\n \"channels.forms.base.icon.label\": \"Icon\",\n \"channels.forms.base.icon.placeholder\": \"Please upload the channel icon\",\n \"channels.forms.base.icon.hint\":\n \"A square image of at least 128x128 is suggested. File size cannot exceed 10mb.\",\n \"channels.forms.base.icon.required\": \"Icon is required\",\n \"channels.forms.base.icon.maxSize\": \"Icon size cannot exceed 10MB\",\n \"channels.forms.base.submit\": \"Create Channel\",\n \"channels.forms.base.update.submit\": \"Update Channel\",\n \"channels.forms.wallets.title\": \"Wallet Management\",\n \"channels.forms.wallets.label\": \"Add Wallets\",\n \"channels.forms.wallets.placeholder\":\n \"Text Format:\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.required\": \"Wallets are required\",\n \"channels.forms.wallets.invalid\": \"Invalid wallets format\",\n \"channels.forms.wallets.chain.required\": \"Chain is required\",\n \"channels.forms.wallets.address.required\": \"Wallet address is required\",\n \"channels.forms.wallets.address.duplicated\":\n \"There are {{count}} duplicated wallet addresses in the input\",\n \"channels.forms.wallets.address.invalid\":\n \"There are {{count}} invalid wallet addresses\",\n \"channels.forms.wallets.address.alreadyAdded\":\n \"There are {{count}} wallet addresses already added\",\n \"channels.forms.wallets.maxCount\": \"Wallet count cannot exceed 500\",\n \"channels.forms.wallets.submit\": \"Add Wallets\",\n \"channels.forms.wallets.supportedFormats\": \"Supported Formats\",\n \"channels.forms.wallets.supportedFormats.text\": \"Text\",\n \"channels.forms.wallets.supportedFormats.text.hint\":\n \"Text Format:\\n\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.addedCount\": \"added wallets\",\n \"channels.forms.wallets.list.title\": \"Added Wallets\",\n \"channels.forms.wallets.list.header.address\": \"Alias/Address\",\n \"channels.forms.wallets.list.header.balance\": \"Balance\",\n \"channels.forms.wallets.list.header.importedAt\": \"Imported At\",\n \"channels.forms.wallets.list.header.lastActiveAt\": \"Last Active At\",\n \"channels.forms.wallets.list.header.7dBuys\": \"7 Days Buys\",\n \"channels.forms.wallets.list.header.7dSells\": \"7 Days Sells\",\n \"channels.forms.wallets.list.header.actions\": \"Actions\",\n \"channels.forms.wallets.list.empty\": \"No wallets added yet\",\n \"channels.forms.wallets.list.search.placeholder\":\n \"Search by address or alias\",\n \"channels.forms.wallets.update.success\": \"Update wallets successfully\",\n \"channels.forms.wallets.update.error\": \"Update wallets error\",\n \"channels.forms.socials.title\": \"Social Medias\",\n \"channels.forms.socials.telegram.guide\":\n \"⚡️ Quick Start\\n1. Search for @BotFather on Telegram\\n2. Send /newbot to create a bot and get Token\\n3. Enter the Bot Token here and save\\n4. Add the bot to your group/channel\",\n \"channels.forms.socials.telegram.placeholder\":\n \"Enter your Telegram Bot Token\",\n \"channels.list.title\": \"Channel List\",\n \"channels.trending.title\": \"Trending Channels\",\n \"channels.my.title\": \"My Channels\",\n \"channels.subscribe.submit\": \"Subscribe\",\n \"channels.subscribe.error\": \"Subscribe channel error\",\n \"channels.subscribe.success\": \"Subscribe channel successfully\",\n \"channels.unsubscribe.submit\": \"Subscribed\",\n \"channels.unsubscribe.error\": \"Unsubscribe channel error\",\n \"channels.unsubscribe.success\": \"Unsubscribe channel successfully\",\n \"channels.subscribed.title\": \"Subscribed Channels\",\n \"channels.create.title\": \"Create Channel\",\n \"channels.create.success\": \"Channel created successfully\",\n \"channels.create.error\": \"Create channel error\",\n \"channels.create.eligibility.title\": \"Check Eligibility\",\n \"channels.create.eligibility.description\":\n \"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.\",\n \"channels.create.eligibility.xConnection\": \"X Account Connection\",\n \"channels.create.eligibility.connected\": \"Connected as\",\n \"channels.create.eligibility.notConnected\": \"No X account connected\",\n \"channels.create.eligibility.connect\": \"Connect X Account\",\n \"channels.create.eligibility.disconnect\": \"Disconnect\",\n \"channels.create.eligibility.verifying\": \"Verifying eligibility...\",\n \"channels.create.eligibility.requirementsTitle\": \"Eligibility Requirements\",\n \"channels.create.eligibility.followersCount\": \"Followers Count\",\n \"channels.create.eligibility.accountAge\": \"Account Age\",\n \"channels.create.eligibility.behaviorScore\": \"Behavior Score\",\n \"channels.create.eligibility.clean\": \"Clean\",\n \"channels.create.eligibility.allPassed\":\n \"All eligibility checks passed! You can now create a channel.\",\n \"channels.create.eligibility.failed\":\n \"Some requirements are not met. Please check your account.\",\n \"channels.update.title\": \"Update Channel\",\n \"channels.update.success\": \"Channel updated successfully\",\n \"channels.update.error\": \"Update channel error\",\n \"channels.info.walletCount\": \"Wallet Count\",\n \"channels.info.subscribeCount\": \"Subscribe Count\",\n \"channels.info.createdAt\": \"created at\",\n \"channels.info.updatedAt\": \"last updated at\",\n \"channels.stats.7dTxs.title\": \"7D TXs\",\n \"channels.stats.7dTxs.hint\": \"7 Days Transactions\",\n \"channels.stats.7dPnl.title\": \"7D PnL\",\n \"channels.stats.7dPnl.hint\": \"7 Days Profit and Loss\",\n \"channels.stats.7dWr.title\": \"7D WR\",\n \"channels.stats.7dWr.hint\": \"7 Days Winning Rate\",\n \"channels.detail.title\": \"Channel Detail\",\n \"channels.detail.notfound\": \"Channel not found\",\n \"channels.events.title\": \"Channel Events\",\n \"channels.events.empty\": \"No events yet\",\n \"channels.events.walletTrade.buy\": \"bought\",\n \"channels.events.walletTrade.sell\": \"sold\",\n \"channels.events.walletTrade.got\": \"got\",\n \"channels.events.walletTrade.cost\": \"cost\",\n \"channels.events.walletTrade.price\": \"price\",\n};\n","export const common = {\n \"common.cancel\": \"Cancel\",\n \"common.confirm\": \"Confirm\",\n \"common.reset\": \"Reset\",\n \"common.apply\": \"Apply\",\n \"common.ok\": \"OK\",\n \"common.yes\": \"Yes\",\n \"common.no\": \"No\",\n \"common.all\": \"All\",\n \"common.buy\": \"Buy\",\n \"common.sell\": \"Sell\",\n \"common.long\": \"Long\",\n \"common.short\": \"Short\",\n \"common.edit\": \"Edit\",\n \"common.save\": \"Save\",\n \"common.add\": \"Add\",\n \"common.delete\": \"Delete\",\n \"common.tips\": \"Tips\",\n \"common.max\": \"Max\",\n \"common.download\": \"Download\",\n \"common.copy\": \"Copy\",\n \"common.copy.failed\": \"Copy failed\",\n \"common.copy.copied\": \"Copied to clipboard\",\n \"common.share\": \"Share\",\n \"common.export\": \"Export\",\n \"common.empty\": \"No data\",\n \"common.unauthenticated\": \"Please sign in to continue\",\n \"common.signIn\": \"Sign In\",\n \"common.signOut\": \"Sign Out\",\n \"common.resolution.1s\": \"1s\",\n \"common.resolution.15s\": \"15s\",\n \"common.resolution.30s\": \"30s\",\n \"common.resolution.1m\": \"1m\",\n \"common.resolution.5m\": \"5m\",\n \"common.resolution.15m\": \"15m\",\n \"common.resolution.30m\": \"30m\",\n \"common.resolution.1h\": \"1h\",\n \"common.resolution.4h\": \"4h\",\n \"common.resolution.12h\": \"12h\",\n \"common.resolution.24h\": \"24h\",\n \"common.upload.submit\": \"Upload\",\n \"common.upload.resubmit\": \"Reupload\",\n \"common.upload.error\": \"Upload error\",\n \"common.loadingMore\": \"Loading more...\",\n \"common.continue\": \"Continue\",\n \"common.months\": \"months\",\n \"common.days\": \"days\",\n};\n","export const mediaTrack = {\n \"mediaTrack.tweets.translate.show\": \"Show Translation\",\n \"mediaTrack.tweets.translate.hide\": \"Hide Translation\",\n \"mediaTrack.tweets.expand\": \"Expand\",\n \"mediaTrack.tweets.collapse\": \"Collapse\",\n};\n","export const portfolio = {\n // Asset Tabs\n \"portfolio.tabs.spot\": \"Spot\",\n \"portfolio.tabs.perps\": \"Perps\",\n \"portfolio.tabs.prediction\": \"Prediction\",\n\n // Address Row\n \"portfolio.address.allWallets\": \"All Wallets\",\n \"portfolio.address.aggregated\": \"Aggregated\",\n \"portfolio.address.copy\": \"Copy Address\",\n \"portfolio.address.copied\": \"Address copied\",\n \"portfolio.address.owner\": \"Owner\",\n \"portfolio.address.viewing\": \"Viewing\",\n \"portfolio.address.search.placeholder\": \"Search wallet address…\",\n \"portfolio.address.search.view\": \"View\",\n \"portfolio.address.search.invalid\": \"Enter a valid address\",\n\n // Balance Row\n \"portfolio.balance.uPnl\": \"uPNL\",\n \"portfolio.balance.realized\": \"Realized\",\n \"portfolio.balance.gas\": \"Gas\",\n\n // Curve Card\n \"portfolio.curve.netWorth\": \"Net Worth\",\n \"portfolio.curve.pnl\": \"PNL\",\n \"portfolio.curve.noData\": \"Not enough data\",\n\n // Distribution Card\n \"portfolio.distribution.title\": \"Distribution\",\n \"portfolio.distribution.other\": \"Other\",\n\n // Viewing Mode\n \"portfolio.viewing.banner\": \"Viewing external portfolio\",\n \"portfolio.viewing.back\": \"Back to My Portfolio\",\n\n // Spot Holdings\n \"portfolio.spot.holdings\": \"Holdings\",\n \"portfolio.spot.history\": \"History\",\n \"portfolio.spot.search.placeholder\": \"Search token…\",\n \"portfolio.spot.hideSmall\": \"Hide small\",\n \"portfolio.spot.group.tokens\": \"Tokens\",\n \"portfolio.spot.header.asset\": \"Asset\",\n \"portfolio.spot.header.balance\": \"Balance\",\n \"portfolio.spot.header.price\": \"Price\",\n \"portfolio.spot.header.value\": \"Value\",\n \"portfolio.spot.header.24h\": \"24h\",\n \"portfolio.spot.empty\": \"No tokens found\",\n \"portfolio.spot.empty.hint\": \"Your spot tokens will appear here\",\n\n // Spot History\n \"portfolio.spot.history.header.type\": \"Type\",\n \"portfolio.spot.history.header.detail\": \"Detail\",\n \"portfolio.spot.history.header.amount\": \"Amount\",\n \"portfolio.spot.history.header.value\": \"Value\",\n \"portfolio.spot.history.header.time\": \"Time\",\n \"portfolio.spot.history.header.txHash\": \"TxHash\",\n \"portfolio.spot.history.type.swap\": \"Swap\",\n \"portfolio.spot.history.type.send\": \"Send\",\n \"portfolio.spot.history.type.receive\": \"Receive\",\n\n // Perps\n \"portfolio.perps.openPositions\": \"Open Positions\",\n \"portfolio.perps.tradeHistory\": \"Trade History\",\n \"portfolio.perps.closeAll\": \"Close All\",\n \"portfolio.perps.close\": \"Close\",\n \"portfolio.perps.closeAll.confirm\":\n \"Close all positions? This will route to each protocol to execute.\",\n \"portfolio.perps.closeAll.confirmBtn\": \"Confirm Close All\",\n \"portfolio.perps.closeAll.cancel\": \"Cancel\",\n \"portfolio.perps.header.pair\": \"Pair / Side\",\n \"portfolio.perps.header.size\": \"Size\",\n \"portfolio.perps.header.entry\": \"Entry\",\n \"portfolio.perps.header.mark\": \"Mark\",\n \"portfolio.perps.header.uPnl\": \"uPNL\",\n \"portfolio.perps.search.placeholder\": \"Search pair…\",\n \"portfolio.perps.empty\": \"No open positions\",\n \"portfolio.perps.empty.hint\": \"Start trading →\",\n \"portfolio.perps.history.header.pair\": \"Pair\",\n \"portfolio.perps.history.header.side\": \"Side\",\n \"portfolio.perps.history.header.size\": \"Size\",\n \"portfolio.perps.history.header.pnl\": \"PNL\",\n \"portfolio.perps.history.header.closePrice\": \"Close Price\",\n \"portfolio.perps.history.header.time\": \"Time\",\n\n // Prediction\n \"portfolio.prediction.activeBets\": \"Active Bets\",\n \"portfolio.prediction.settled\": \"Settled\",\n \"portfolio.prediction.sellAll\": \"Sell All\",\n \"portfolio.prediction.sell\": \"Sell\",\n \"portfolio.prediction.sellAll.confirm\":\n \"Sell all positions? This will route to each platform to execute.\",\n \"portfolio.prediction.sellAll.confirmBtn\": \"Confirm Sell All\",\n \"portfolio.prediction.sellAll.cancel\": \"Cancel\",\n \"portfolio.prediction.header.market\": \"Market / Source\",\n \"portfolio.prediction.header.position\": \"Position\",\n \"portfolio.prediction.header.stake\": \"Stake\",\n \"portfolio.prediction.header.potential\": \"Potential\",\n \"portfolio.prediction.header.status\": \"Status\",\n \"portfolio.prediction.search.placeholder\": \"Search market…\",\n \"portfolio.prediction.empty\": \"No active bets\",\n \"portfolio.prediction.empty.hint\": \"Explore prediction markets →\",\n \"portfolio.prediction.settled.header.market\": \"Market\",\n \"portfolio.prediction.settled.header.source\": \"Source\",\n \"portfolio.prediction.settled.header.position\": \"Position\",\n \"portfolio.prediction.settled.header.stake\": \"Stake\",\n \"portfolio.prediction.settled.header.result\": \"Result\",\n \"portfolio.prediction.settled.header.payout\": \"Payout\",\n\n // Empty / Error states\n \"portfolio.connectWallet\": \"Connect Wallet\",\n \"portfolio.connectWallet.hint\": \"Connect your wallet to view your portfolio\",\n \"portfolio.error.load\": \"Failed to load portfolio data\",\n \"portfolio.error.retry\": \"Retry\",\n};\n","export const predict = {\n // Categories\n \"predict.categories.trending\": \"Trending\",\n \"predict.categories.allMarkets\": \"All Markets\",\n\n // Event status\n \"predict.event.status.closed\": \"Closed\",\n \"predict.event.status.live\": \"Live\",\n \"predict.event.status.pending\": \"Pending\",\n\n // Event detail\n \"predict.event.volume\": \"vol\",\n \"predict.event.endDate\": \"Ends {{date}}\",\n \"predict.event.rules\": \"Rules\",\n \"predict.event.rules.collapse\": \"Collapse\",\n \"predict.event.rules.expand\": \"Expand all\",\n \"predict.event.showMore\": \"Show More\",\n \"predict.event.back\": \"Back\",\n \"predict.event.moreMarkets\": \"+{{count}} more\",\n\n // Markets table\n \"predict.market.table.outcome\": \"Outcome\",\n \"predict.market.table.chance\": \"Chance\",\n \"predict.market.table.actions\": \"Actions\",\n \"predict.market.action.yes\": \"Yes {{price}}¢\",\n \"predict.market.action.no\": \"No {{price}}¢\",\n\n // Market options\n \"predict.market.yes\": \"Yes\",\n \"predict.market.no\": \"No\",\n \"predict.market.sharesYes\": \"{{shares}} Yes\",\n \"predict.market.sharesNo\": \"{{shares}} No\",\n \"predict.market.tradeYes\": \"Trade Yes\",\n \"predict.market.tradeNo\": \"Trade No\",\n \"predict.market.graph\": \"Graph\",\n\n // Trade form\n \"predict.trade.action\": \"Trade\",\n \"predict.trade.buy\": \"Buy\",\n \"predict.trade.sell\": \"Sell\",\n \"predict.trade.yes\": \"Yes\",\n \"predict.trade.no\": \"No\",\n \"predict.trade.limit\": \"Limit\",\n \"predict.trade.market\": \"Market\",\n \"predict.trade.price\": \"Price\",\n \"predict.trade.amount\": \"Amount\",\n \"predict.trade.contracts\": \"Contracts\",\n \"predict.trade.estimatedCost\": \"Est. Cost\",\n \"predict.trade.potentialPayout\": \"Potential Payout\",\n \"predict.trade.potentialProfit\": \"Potential Profit\",\n \"predict.trade.potentialWin\": \"Potential Win\",\n \"predict.trade.estimatedReceive\": \"Est. Receive\",\n \"predict.trade.balance\": \"Available Balance\",\n \"predict.trade.bestBid\": \"Bid\",\n \"predict.trade.bestAsk\": \"Ask\",\n \"predict.trade.priceImpact\": \"Price Impact\",\n \"predict.trade.quoteError\": \"Unable to get quote. Please try again.\",\n \"predict.trade.connectWallet\": \"Connect Wallet\",\n \"predict.trade.submitting\": \"Submitting…\",\n \"predict.trade.submitSuccess\": \"Transaction submitted successfully!\",\n \"predict.trade.submitError\": \"Transaction failed. Please try again.\",\n\n // Order book\n \"predict.orderBook.title\": \"Order Book\",\n \"predict.orderBook.empty\": \"No orders yet\",\n \"predict.orderBook.type\": \"Type\",\n \"predict.orderBook.price\": \"Price\",\n \"predict.orderBook.contracts\": \"Contracts\",\n \"predict.orderBook.qty\": \"Qty\",\n \"predict.orderBook.total\": \"Total\",\n \"predict.orderBook.spread\": \"Spread\",\n\n // Open orders\n \"predict.openOrders.title\": \"Open Orders\",\n \"predict.openOrders.empty\": \"No open orders\",\n \"predict.openOrders.side\": \"Side\",\n \"predict.openOrders.outcome\": \"Outcome\",\n \"predict.openOrders.type\": \"Type\",\n \"predict.openOrders.price\": \"Price\",\n \"predict.openOrders.filled\": \"Filled\",\n \"predict.openOrders.status\": \"Status\",\n \"predict.openOrders.time\": \"Time\",\n \"predict.openOrders.cancel\": \"Cancel\",\n\n // Trade history\n \"predict.tradeHistory.title\": \"Trade History\",\n \"predict.tradeHistory.empty\": \"No trades yet\",\n \"predict.tradeHistory.side\": \"Side\",\n \"predict.tradeHistory.outcome\": \"Outcome\",\n \"predict.tradeHistory.price\": \"Price\",\n \"predict.tradeHistory.qty\": \"Qty\",\n \"predict.tradeHistory.total\": \"Total\",\n \"predict.tradeHistory.fee\": \"Fee\",\n \"predict.tradeHistory.time\": \"Time\",\n\n // Positions\n \"predict.positions.title\": \"Positions\",\n \"predict.positions.empty\": \"No positions\",\n \"predict.positions.market\": \"Market\",\n \"predict.positions.outcome\": \"Outcome\",\n \"predict.positions.qty\": \"Qty\",\n \"predict.positions.avgCost\": \"Avg Cost\",\n \"predict.positions.currentPrice\": \"Price\",\n \"predict.positions.value\": \"Value\",\n \"predict.positions.pnl\": \"P&L\",\n \"predict.positions.totalValue\": \"Total Value\",\n \"predict.positions.unrealizedPnl\": \"Unrealized P&L\",\n \"predict.positions.realizedPnl\": \"Realized P&L\",\n\n // Pagination\n \"predict.pagination.prev\": \"Prev\",\n \"predict.pagination.next\": \"Next\",\n \"predict.pagination.page\": \"Page {{page}}\",\n};\n","export const scaffold = {\n \"scaffold.draggableModal.snapToEdge\": \"Drag to edge to show side panel\",\n \"scaffold.draggablePanel.snapToModal\": \"Drag away to show floating modal\",\n \"scaffold.home\": \"Home\",\n};\n","export const tokens = {\n \"tokens.search.placeholder\": \"Search by token or CA...\",\n \"tokens.copied.address\": \"Token address copied to clipboard\",\n \"tokens.listHeader.token\": \"Token\",\n \"tokens.listHeader.priceHistories\": \"Price Histories\",\n \"tokens.listHeader.price\": \"Price\",\n \"tokens.listHeader.priceChange\": \"{{resolution}}%\",\n \"tokens.listHeader.marketCap\": \"Market Cap\",\n \"tokens.listHeader.liquidity\": \"Liquidity\",\n \"tokens.listHeader.volumes\": \"{{resolution}} Volumes\",\n \"tokens.listHeader.txs\": \"{{resolution}} TXNS\",\n \"tokens.listHeader.traders\": \"{{resolution}} Traders\",\n \"tokens.listHeader.bluechip\": \"BlueChip\",\n \"tokens.listHeader.tokenInfo\": \"Token Info\",\n \"tokens.listHeader.actions\": \"Actions\",\n \"tokens.listHeader.filter\": \"Filter\",\n \"tokens.listType.trending\": \"Trending\",\n \"tokens.listType.new\": \"New\",\n \"tokens.listType.stocks\": \"Stocks\",\n \"tokens.filters.protocols.title\": \"Protocols\",\n \"tokens.filters.protocols.selectAll\": \"Select All\",\n \"tokens.filters.protocols.unselectAll\": \"Unselect All\",\n \"tokens.filters.keywords.title\": \"Search Keywords\",\n \"tokens.filters.keywords.exclude.title\": \"Exclude Keywords\",\n \"tokens.filters.keywords.placeholder\": \"keyword1, keyword2...\",\n \"tokens.filters.stats.min\": \"Min\",\n \"tokens.filters.stats.max\": \"Max\",\n \"tokens.filters.stats.audits\": \"Audits\",\n \"tokens.filters.stats.audits.holders\": \"Holders Count\",\n \"tokens.filters.stats.audits.top10HoldingsRatio\": \"Top 10 Holders %\",\n \"tokens.filters.stats.audits.top100HoldingsRatio\": \"Top 100 Holders %\",\n \"tokens.filters.stats.audits.devHoldingsRatio\": \"Dev Holdings %\",\n \"tokens.filters.stats.metrics\": \"Metrics\",\n \"tokens.filters.stats.metrics.volumes\": \"{{resolution}} Volumes ($)\",\n \"tokens.filters.stats.metrics.txns\": \"{{resolution}} Transactions\",\n \"tokens.filters.stats.metrics.liquidity\": \"Liquidity ($)\",\n \"tokens.filters.stats.metrics.marketCap\": \"Market Cap ($)\",\n \"tokens.filters.modal.title\": \"Filters\",\n \"tokens.tokenInfo.holders\": \"Holders\",\n \"tokens.tokenInfo.proHolders\": \"Pro Holders\",\n \"tokens.tokenInfo.kolHolders\": \"KOL Holders\",\n \"tokens.tokenInfo.top10HoldingsRatio\": \"Top 10 Holders\",\n \"tokens.tokenInfo.top100HoldingsRatio\": \"Top 100 Holders\",\n \"tokens.tokenInfo.devHoldingsRatio\": \"Dev Holders\",\n \"tokens.tokenInfo.sniperHoldingsRatio\": \"Snipers\",\n \"tokens.tokenInfo.insiderHoldingsRatio\": \"Insiders\",\n \"tokens.tokenInfo.bundleHoldingsRatio\": \"Bundlers\",\n \"tokens.bluechip.explained\":\n \"BlueChip index is the ratio of holders who also own BlueChip tokens\",\n \"tokens.pulse.new\": \"New\",\n \"tokens.pulse.migrated\": \"Migrated\",\n \"tokens.pulse.finalStretch\": \"Final Stretch\",\n \"tokens.pulse.paused\": \"Paused\",\n \"tokens.pulse.vol\": \"Vol\",\n \"tokens.pulse.txs\": \"Txs\",\n};\n","import { channels } from \"./module/channels\";\nimport { common } from \"./module/common\";\nimport { mediaTrack } from \"./module/mediaTrack\";\nimport { portfolio } from \"./module/portfolio\";\nimport { predict } from \"./module/predict\";\nimport { scaffold } from \"./module/scaffold\";\nimport { tokens } from \"./module/tokens\";\n\nexport const en = {\n ...common,\n ...mediaTrack,\n ...predict,\n ...scaffold,\n ...tokens,\n ...channels,\n ...portfolio,\n};\n","import { initReactI18next } from \"react-i18next\";\nimport { i18n as I18nInstance, createInstance } from \"i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport {\n defaultLng,\n defaultNS,\n i18nCookieKey,\n i18nLocalStorageKey,\n} from \"./constant\";\nimport { en } from \"./locale/en\";\n\nconst i18n: I18nInstance = createInstance();\n\ni18n\n .use(LanguageDetector)\n .use(initReactI18next) // bind react-i18next to the instance\n .init({\n fallbackLng: defaultLng,\n ns: [defaultNS],\n defaultNS,\n interpolation: {\n escapeValue: false, // not needed for react!!\n },\n detection: {\n lookupLocalStorage: i18nLocalStorageKey,\n lookupCookie: i18nCookieKey,\n caches: [\"cookie\", \"localStorage\"],\n order: [\"cookie\", \"localStorage\", \"htmlTag\", \"navigator\"],\n },\n resources: {\n [defaultLng]: { [defaultNS]: en },\n },\n });\n\nexport default i18n;\n","import i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\nexport type BackendOptions = {\n /**\n * Load url for a given language and namespace\n * @param lang language code\n * @param ns namespace\n * @returns url or urls\n */\n loadPath: (lang: LocaleCode, ns: string) => string | string[];\n};\n\n/**\n * Async resources loading through HTTP, resources must be placed in the site's public directory\n */\nexport class Backend {\n private readonly cache: Set<string>;\n\n constructor(private readonly options?: BackendOptions) {\n this.cache = new Set();\n }\n\n async fetchData(url: string): Promise<Record<string, string>> {\n try {\n const res = await fetch(url);\n return await res.json();\n } catch (error) {\n console.warn(\n `Failed to fetch locale resource bundle from ${url}:`,\n error,\n );\n return {};\n }\n }\n\n async loadLanguage(lang: LocaleCode, ns: string) {\n if (typeof this.options?.loadPath !== \"function\") return;\n\n // get load url paths\n let paths = this.options.loadPath(lang, ns);\n if (typeof paths === \"string\") paths = [paths];\n if (!paths.length) return;\n\n // filter out the paths that have already been loaded\n const urls = paths.filter((path) => {\n const loaded = i18n.hasResourceBundle(lang, ns);\n return !loaded || !this.cache.has(path);\n });\n\n const promises = urls.map(async (url) => {\n const data = await this.fetchData(url);\n i18n.addResourceBundle(lang, ns, data, true, true);\n this.cache.add(url);\n });\n await Promise.all(promises);\n }\n}\n","import { createContext, useContext } from \"react\";\nimport { Language, LocaleCode } from \"./types\";\n\nexport type LocaleContextState = {\n /**\n * Supported languages\n */\n languages: Language[];\n\n /**\n * Called before language change\n * @param lang - new language code\n * @returns\n */\n beforeLanguageChange: (lang: LocaleCode) => Promise<void>;\n /**\n * Called after language changed\n * @param lang - new language code\n * @returns\n */\n afterLanguageChange: (lang: LocaleCode) => Promise<void>;\n};\n\nexport const LocaleContext = createContext<LocaleContextState>({\n languages: [],\n beforeLanguageChange: () => Promise.resolve(),\n afterLanguageChange: () => Promise.resolve(),\n});\n\nexport const useLocaleContext = () => {\n const context = useContext(LocaleContext);\n if (!context) {\n throw new Error(\"useLocaleContext must be used within a LocaleProvider\");\n }\n return context;\n};\n","import { LocaleEnum } from \"../types\";\n\n/**\n * get locale path from pathname\n * @param pathname - pathname to get locale path\n * @param localeCodes - locale codes to check\n * @example\n * getLocalePathFromPathname('/en/perp/PERP_ETH_USDC') => 'en'\n * getLocalePathFromPathname('/perp/PERP_ETH_USDC') => null\n * getLocalePathFromPathname('/en/markets') => 'en'\n * getLocalePathFromPathname('/markets') => null\n */\nexport function getLocalePathFromPathname(\n pathname: string,\n localeCodes?: string[],\n) {\n const locale = pathname.split(\"/\")[1];\n localeCodes = localeCodes || Object.values(LocaleEnum);\n return localeCodes.includes(locale as LocaleEnum) ? locale : null;\n}\n","import { type LocaleCode, LocaleEnum } from \"../types\";\n\n/**\n * transform browser language to i18n locale codes\n * @param lang - browser language\n * @param localeCodes - locale codes to check\n * @param defaultLang - default locale code\n * @example\n * parseI18nLang('en-US') => 'en'\n * parseI18nLang('zh-CN') => 'zh'\n * parseI18nLang('zh-TW') => 'zh'\n * parseI18nLang('ja') => 'ja'\n * */\nexport function parseI18nLang(\n lang: string,\n localeCodes?: LocaleCode[],\n defaultLang?: LocaleCode,\n) {\n localeCodes = localeCodes || Object.values(LocaleEnum);\n defaultLang = defaultLang || LocaleEnum.en;\n\n const regex = /^([a-z]{2})/i;\n const match = lang?.match(regex);\n\n if (!match) {\n return defaultLang;\n }\n\n const matchLang = match[1];\n\n if (localeCodes.includes(lang)) {\n return lang;\n }\n\n if (localeCodes.includes(matchLang)) {\n return matchLang;\n }\n\n return defaultLang;\n}\n","import i18n from \"../i18n\";\nimport { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\nimport { parseI18nLang } from \"./parseI18nLang\";\n\n/**\n * Generate a localized path with proper locale prefix and search parameters\n *\n * This function ensures that the returned path includes the appropriate locale prefix.\n * If the path already contains a valid locale prefix, it returns the path as-is.\n * Otherwise, it prepends the specified locale or falls back to the current i18n language.\n *\n * @param params - Configuration object for path generation\n * @param params.path - The base pathname (e.g., '/markets', '/perp/PERP_ETH_USDC')\n * @param params.locale - Optional locale code to use as prefix. If not provided, uses i18n.language\n * @param params.search - Optional search query string. If not provided, uses window.location.search\n *\n * @returns A complete URL path with locale prefix and search parameters\n *\n * @example\n * generatePath({ path: '/markets' }) => '/en/markets?tab=spot'\n * generatePath({ path: '/en/markets', search: '?tab=futures' }) => '/en/markets?tab=futures'\n * generatePath({ path: '/perp/PERP_ETH_USDC', locale: 'zh' }) => '/zh/perp/PERP_ETH_USDC'\n * generatePath({ path: '/en/perp/PERP_ETH_USDC' }) => '/en/perp/PERP_ETH_USDC'\n */\nexport function generatePath(params: {\n path: string;\n locale?: string;\n search?: string;\n}) {\n const { path, locale, search } = params;\n const searchUrl =\n search || (typeof window !== \"undefined\" ? window.location.search : \"\");\n\n let localePath = getLocalePathFromPathname(path);\n\n // If path already contains a valid locale prefix, return it unchanged\n if (localePath) {\n return `${path}${searchUrl}`;\n }\n\n // Use provided locale or fall back to current i18n language\n localePath = locale || parseI18nLang(i18n.language);\n\n // Prepend locale prefix to path\n return `/${localePath}${path}${searchUrl}`;\n}\n","import { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\n\n/**\n * remove lang prefix from pathname\n * @param pathname - pathname to remove lang prefix\n * @param localeCodes - locale codes to check\n * @example\n * removeLangPrefix('/en/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/en/markets') => '/markets'\n * removeLangPrefix('/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/markets') => '/markets'\n */\nexport function removeLangPrefix(pathname: string, localeCodes?: string[]) {\n const localePath = getLocalePathFromPathname(pathname, localeCodes);\n\n return localePath\n ? pathname.replace(new RegExp(`^/${localePath}(?=/)`), \"\")\n : pathname;\n}\n","import {\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { Backend, BackendOptions } from \"./backend\";\nimport { defaultLanguages, defaultNS } from \"./constant\";\nimport { LocaleContext, LocaleContextState } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode, Resources, Language } from \"./types\";\nimport { parseI18nLang } from \"./utils\";\n\nexport type LocaleProviderProps = PropsWithChildren<\n {\n /** current locale */\n locale?: LocaleCode;\n /** current locale's resource */\n resource?: Record<string, string>;\n /** all synchronously loaded resources */\n resources?: Resources;\n /** supported languages, must be a subset of {@link defaultLanguages}, used when {@link languages} is not provided */\n supportedLanguages?: LocaleCode[];\n /** optional conversion function to modify the detected language code */\n convertDetectedLanguage?: (lang: string) => LocaleCode;\n /** options to load resources asynchronously */\n backend?: BackendOptions;\n } & Partial<LocaleContextState>\n>;\n\nexport function LocaleProvider({\n children,\n locale,\n resource,\n resources,\n backend,\n supportedLanguages,\n convertDetectedLanguage,\n languages: languagesProp,\n beforeLanguageChange,\n afterLanguageChange,\n}: LocaleProviderProps) {\n // calculated supported languages\n const [languages, setLanguages] = useState<Language[]>(defaultLanguages);\n\n // backend instance to load resources asynchronously\n const backendRef = useRef(new Backend(backend!));\n\n // load resources synchronously\n useEffect(() => {\n if (resources) {\n Object.entries(resources).forEach(([locale, messages]) => {\n i18n.addResourceBundle(locale, defaultNS, messages, true, true);\n });\n return;\n }\n if (resource && locale) {\n i18n.addResourceBundle(locale, defaultNS, resource, true, true);\n }\n }, [locale, resource, resources]);\n\n // change language when locale changed\n useEffect(() => {\n if (locale && locale !== i18n.language) {\n i18n.changeLanguage(locale);\n }\n }, [locale]);\n\n // calculate supported languages\n useEffect(() => {\n if (Array.isArray(languagesProp)) {\n setLanguages(languagesProp);\n } else if (Array.isArray(supportedLanguages)) {\n setLanguages(\n supportedLanguages\n .map((localCode) =>\n defaultLanguages.find((l) => l.localCode === localCode),\n )\n .filter((item) => !!item),\n );\n }\n }, [supportedLanguages, languagesProp]);\n\n // if browser language is not a valid language, change language\n useEffect(() => {\n const fixLanguage = async () => {\n const lang =\n typeof convertDetectedLanguage === \"function\"\n ? convertDetectedLanguage(i18n.language)\n : parseI18nLang(i18n.language);\n await backendRef.current.loadLanguage(lang, defaultNS);\n if (lang !== i18n.language) {\n await i18n.changeLanguage(lang);\n }\n };\n fixLanguage();\n }, [i18n.language]);\n\n const beforeLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n await beforeLanguageChange?.(lang);\n // load language before language changed\n await backendRef.current.loadLanguage(lang, defaultNS);\n },\n [beforeLanguageChange],\n );\n\n const afterLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n afterLanguageChange?.(lang);\n },\n [afterLanguageChange],\n );\n\n const contextValue = useMemo<LocaleContextState>(() => {\n return {\n languages,\n beforeLanguageChange: beforeLanguageChangeHandler,\n afterLanguageChange: afterLanguageChangeHandler,\n };\n }, [languages, beforeLanguageChangeHandler, afterLanguageChangeHandler]);\n\n return (\n <LocaleContext.Provider value={contextValue}>\n <I18nextProvider i18n={i18n} defaultNS={defaultNS}>\n {children}\n </I18nextProvider>\n </LocaleContext.Provider>\n );\n}\n","import { useContext } from \"react\";\nimport {\n FallbackNs,\n useTranslation as _useTranslation,\n UseTranslationOptions,\n I18nContext,\n} from \"react-i18next\";\nimport { FlatNamespace, KeyPrefix } from \"i18next\";\nimport i18n from \"./i18n\";\n\ntype $Tuple<T> = readonly [T?, ...T[]];\n\n/**\n * Hook to get translation function\n * @param ns\n * @param options\n * @returns\n */\nexport function useTranslation<\n Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined = undefined,\n KPrefix extends KeyPrefix<FallbackNs<Ns>> = undefined,\n>(ns?: Ns, options?: UseTranslationOptions<KPrefix>) {\n const context = useContext(I18nContext);\n return _useTranslation(ns, { i18n: context?.i18n || i18n, ...options });\n}\n","import { useEffect, useState } from \"react\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\n/**\n * Hooks to get current locale code\n * @returns current locale code\n */\nexport function useLocale() {\n const [localeCode, setLocaleCode] = useState<LocaleCode>(i18n.language);\n\n useEffect(() => {\n i18n.on(\"languageChanged\", setLocaleCode);\n return () => {\n i18n.off(\"languageChanged\", setLocaleCode);\n };\n }, [i18n]);\n\n return localeCode;\n}\n","import { useCallback } from \"react\";\nimport { useLocaleContext } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\nexport function useChangeLocale() {\n const { beforeLanguageChange, afterLanguageChange } = useLocaleContext();\n\n const changeLocale = useCallback(\n async (locale: LocaleCode) => {\n await beforeLanguageChange(locale);\n await i18n.changeLanguage(locale);\n await afterLanguageChange(locale);\n },\n [beforeLanguageChange, afterLanguageChange, i18n],\n );\n\n return changeLocale;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types.ts","../src/constant.ts","../src/locale/module/channels.ts","../src/locale/module/common.ts","../src/locale/module/mediaTrack.ts","../src/locale/module/portfolio.ts","../src/locale/module/predict.ts","../src/locale/module/scaffold.ts","../src/locale/module/tokens.ts","../src/locale/en.ts","../src/i18n.ts","../src/backend.ts","../src/context.ts","../src/utils/getLocalePathFromPathname.ts","../src/utils/parseI18nLang.ts","../src/utils/generatePath.ts","../src/utils/removeLangPrefix.ts","../src/provider.tsx","../src/useTranslation.ts","../src/useLocale.ts","../src/useChangeLocale.ts"],"names":["LocaleEnum","defaultLanguages","defaultLng","defaultNS","i18nLocalStorageKey","i18nCookieKey","channels","common","mediaTrack","portfolio","predict","scaffold","tokens","en","i18n","createInstance","LanguageDetector","initReactI18next","i18n_default","Backend","options","url","error","lang","ns","paths","promises","path","data","LocaleContext","createContext","useLocaleContext","context","useContext","getLocalePathFromPathname","pathname","localeCodes","locale","parseI18nLang","defaultLang","regex","match","matchLang","generatePath","params","search","searchUrl","localePath","removeLangPrefix","LocaleProvider","children","resource","resources","backend","supportedLanguages","convertDetectedLanguage","languagesProp","beforeLanguageChange","afterLanguageChange","languages","setLanguages","useState","backendRef","useRef","useEffect","messages","localCode","l","item","beforeLanguageChangeHandler","useCallback","afterLanguageChangeHandler","contextValue","useMemo","jsx","I18nextProvider","useTranslation","I18nContext","_useTranslation","useLocale","localeCode","setLocaleCode","useChangeLocale"],"mappings":"8XAKO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GAEVA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,GAAK,IAAA,CAELA,CAAAA,CAAA,EAAA,CAAK,IAAA,CAELA,CAAAA,CAAA,EAAA,CAAK,KAELA,CAAAA,CAAA,EAAA,CAAK,KAELA,CAAAA,CAAA,EAAA,CAAK,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CAAE,qBAAAzB,CAAAA,CAAsB,mBAAA,CAAAC,CAAoB,CAAA,CAAI3B,CAAAA,GAWtD,OATqBuC,WAAAA,CACnB,MAAOjC,CAAAA,EAAuB,CAC5B,MAAMoB,CAAAA,CAAqBpB,CAAM,EACjC,MAAMnB,CAAAA,CAAK,eAAemB,CAAM,CAAA,CAChC,MAAMqB,CAAAA,CAAoBrB,CAAM,EAClC,CAAA,CACA,CAACoB,EAAsBC,CAAAA,CAAqBxC,CAAI,CAClD,CAGF","file":"index.mjs","sourcesContent":["// import the original type declarations\nimport \"i18next\";\n// import all namespaces (for the default language, only)\nimport { en } from \"./locale/en\";\n\nexport enum LocaleEnum {\n /** English */\n en = \"en\",\n /** Chinese */\n zh = \"zh\",\n /** Japanese */\n ja = \"ja\",\n /** Spanish */\n es = \"es\",\n /** Korean */\n ko = \"ko\",\n /** Vietnamese */\n vi = \"vi\",\n /** German */\n de = \"de\",\n /** French */\n fr = \"fr\",\n /** Russian */\n ru = \"ru\",\n /** Indonesian */\n id = \"id\",\n /** Turkish */\n tr = \"tr\",\n /** Italian */\n it = \"it\",\n /** Portuguese */\n pt = \"pt\",\n /** Ukrainian */\n uk = \"uk\",\n /** Polish */\n pl = \"pl\",\n /** Dutch */\n nl = \"nl\",\n}\n\nexport type LocaleCode = keyof typeof LocaleEnum | (string & {});\n\nexport type Language = {\n localCode: LocaleCode;\n displayName: string;\n};\n\nexport type ExtendLocaleMessages = Record<`extend.${string}`, string>;\n\nexport type LocaleMessages = typeof en & ExtendLocaleMessages;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type Resources<T extends {} = {}> = {\n [key in LocaleCode]?: Partial<LocaleMessages & T>;\n};\n\n// https://www.i18next.com/overview/typescript#create-a-declaration-file\n// Enhance the input parameter intelliSense for the t function.\ndeclare module \"i18next\" {\n // Extend CustomTypeOptions\n interface CustomTypeOptions {\n // custom namespace type, if you changed it\n defaultNS: \"translation\";\n // custom resources type\n resources: {\n translation: LocaleMessages;\n };\n }\n}\n","import { Language, LocaleEnum } from \"./types\";\n\nexport const defaultLanguages: Language[] = [\n { localCode: LocaleEnum.en, displayName: \"English\" }, // English\n { localCode: LocaleEnum.zh, displayName: \"中文\" }, // Chinese\n { localCode: LocaleEnum.ja, displayName: \"日本語\" }, // Japanese\n { localCode: LocaleEnum.es, displayName: \"Español\" }, // Spanish\n { localCode: LocaleEnum.ko, displayName: \"한국어\" }, // Korean\n { localCode: LocaleEnum.vi, displayName: \"Tiếng Việt\" }, // Vietnamese\n { localCode: LocaleEnum.de, displayName: \"Deutsch\" }, // German\n { localCode: LocaleEnum.fr, displayName: \"Français\" }, // French\n { localCode: LocaleEnum.ru, displayName: \"Русский\" }, // Russian\n { localCode: LocaleEnum.id, displayName: \"Bahasa Indonesia\" }, // Indonesian\n { localCode: LocaleEnum.tr, displayName: \"Türkçe\" }, // Turkish\n { localCode: LocaleEnum.it, displayName: \"Italiano\" }, // Italian\n { localCode: LocaleEnum.pt, displayName: \"Português\" }, // Portuguese\n { localCode: LocaleEnum.uk, displayName: \"Українська\" }, // Ukrainian\n { localCode: LocaleEnum.pl, displayName: \"Polski\" }, // Polish\n { localCode: LocaleEnum.nl, displayName: \"Nederlands\" }, // Dutch\n];\n\nexport const defaultLng = LocaleEnum.en;\n\nexport const defaultNS = \"translation\";\n\nexport const i18nLocalStorageKey = \"liberfi_i18nLng\";\n\nexport const i18nCookieKey = \"liberfi_i18nLng\";\n","export const channels = {\n \"channels.forms.base.title\": \"Base Info\",\n \"channels.forms.base.name.label\": \"Name\",\n \"channels.forms.base.name.placeholder\": \"Please enter the channel name\",\n \"channels.forms.base.name.required\": \"Name is required\",\n \"channels.forms.base.name.min\": \"Name must be at least 1 character\",\n \"channels.forms.base.name.max\": \"Name must be less than 24 characters\",\n \"channels.forms.base.description.label\": \"Description\",\n \"channels.forms.base.description.placeholder\":\n \"Please enter the channel description\",\n \"channels.forms.base.icon.label\": \"Icon\",\n \"channels.forms.base.icon.placeholder\": \"Please upload the channel icon\",\n \"channels.forms.base.icon.hint\":\n \"A square image of at least 128x128 is suggested. File size cannot exceed 10mb.\",\n \"channels.forms.base.icon.required\": \"Icon is required\",\n \"channels.forms.base.icon.maxSize\": \"Icon size cannot exceed 10MB\",\n \"channels.forms.base.submit\": \"Create Channel\",\n \"channels.forms.base.update.submit\": \"Update Channel\",\n \"channels.forms.wallets.title\": \"Wallet Management\",\n \"channels.forms.wallets.label\": \"Add Wallets\",\n \"channels.forms.wallets.placeholder\":\n \"Text Format:\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.required\": \"Wallets are required\",\n \"channels.forms.wallets.invalid\": \"Invalid wallets format\",\n \"channels.forms.wallets.chain.required\": \"Chain is required\",\n \"channels.forms.wallets.address.required\": \"Wallet address is required\",\n \"channels.forms.wallets.address.duplicated\":\n \"There are {{count}} duplicated wallet addresses in the input\",\n \"channels.forms.wallets.address.invalid\":\n \"There are {{count}} invalid wallet addresses\",\n \"channels.forms.wallets.address.alreadyAdded\":\n \"There are {{count}} wallet addresses already added\",\n \"channels.forms.wallets.maxCount\": \"Wallet count cannot exceed 500\",\n \"channels.forms.wallets.submit\": \"Add Wallets\",\n \"channels.forms.wallets.supportedFormats\": \"Supported Formats\",\n \"channels.forms.wallets.supportedFormats.text\": \"Text\",\n \"channels.forms.wallets.supportedFormats.text.hint\":\n \"Text Format:\\n\\n8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd,pow\\n0x4DB5a66E937A9F4473fA95b1cAF1d1E1D62E29EA,Smart Money\",\n \"channels.forms.wallets.addedCount\": \"added wallets\",\n \"channels.forms.wallets.list.title\": \"Added Wallets\",\n \"channels.forms.wallets.list.header.address\": \"Alias/Address\",\n \"channels.forms.wallets.list.header.balance\": \"Balance\",\n \"channels.forms.wallets.list.header.importedAt\": \"Imported At\",\n \"channels.forms.wallets.list.header.lastActiveAt\": \"Last Active At\",\n \"channels.forms.wallets.list.header.7dBuys\": \"7 Days Buys\",\n \"channels.forms.wallets.list.header.7dSells\": \"7 Days Sells\",\n \"channels.forms.wallets.list.header.actions\": \"Actions\",\n \"channels.forms.wallets.list.empty\": \"No wallets added yet\",\n \"channels.forms.wallets.list.search.placeholder\":\n \"Search by address or alias\",\n \"channels.forms.wallets.update.success\": \"Update wallets successfully\",\n \"channels.forms.wallets.update.error\": \"Update wallets error\",\n \"channels.forms.socials.title\": \"Social Medias\",\n \"channels.forms.socials.telegram.guide\":\n \"⚡️ Quick Start\\n1. Search for @BotFather on Telegram\\n2. Send /newbot to create a bot and get Token\\n3. Enter the Bot Token here and save\\n4. Add the bot to your group/channel\",\n \"channels.forms.socials.telegram.placeholder\":\n \"Enter your Telegram Bot Token\",\n \"channels.list.title\": \"Channel List\",\n \"channels.trending.title\": \"Trending Channels\",\n \"channels.my.title\": \"My Channels\",\n \"channels.subscribe.submit\": \"Subscribe\",\n \"channels.subscribe.error\": \"Subscribe channel error\",\n \"channels.subscribe.success\": \"Subscribe channel successfully\",\n \"channels.unsubscribe.submit\": \"Subscribed\",\n \"channels.unsubscribe.error\": \"Unsubscribe channel error\",\n \"channels.unsubscribe.success\": \"Unsubscribe channel successfully\",\n \"channels.subscribed.title\": \"Subscribed Channels\",\n \"channels.create.title\": \"Create Channel\",\n \"channels.create.success\": \"Channel created successfully\",\n \"channels.create.error\": \"Create channel error\",\n \"channels.create.eligibility.title\": \"Check Eligibility\",\n \"channels.create.eligibility.description\":\n \"Verify your X (Twitter) account to ensure it meets the requirements for creating a channel.\",\n \"channels.create.eligibility.xConnection\": \"X Account Connection\",\n \"channels.create.eligibility.connected\": \"Connected as\",\n \"channels.create.eligibility.notConnected\": \"No X account connected\",\n \"channels.create.eligibility.connect\": \"Connect X Account\",\n \"channels.create.eligibility.disconnect\": \"Disconnect\",\n \"channels.create.eligibility.verifying\": \"Verifying eligibility...\",\n \"channels.create.eligibility.requirementsTitle\": \"Eligibility Requirements\",\n \"channels.create.eligibility.followersCount\": \"Followers Count\",\n \"channels.create.eligibility.accountAge\": \"Account Age\",\n \"channels.create.eligibility.behaviorScore\": \"Behavior Score\",\n \"channels.create.eligibility.clean\": \"Clean\",\n \"channels.create.eligibility.allPassed\":\n \"All eligibility checks passed! You can now create a channel.\",\n \"channels.create.eligibility.failed\":\n \"Some requirements are not met. Please check your account.\",\n \"channels.update.title\": \"Update Channel\",\n \"channels.update.success\": \"Channel updated successfully\",\n \"channels.update.error\": \"Update channel error\",\n \"channels.info.walletCount\": \"Wallet Count\",\n \"channels.info.subscribeCount\": \"Subscribe Count\",\n \"channels.info.createdAt\": \"created at\",\n \"channels.info.updatedAt\": \"last updated at\",\n \"channels.stats.7dTxs.title\": \"7D TXs\",\n \"channels.stats.7dTxs.hint\": \"7 Days Transactions\",\n \"channels.stats.7dPnl.title\": \"7D PnL\",\n \"channels.stats.7dPnl.hint\": \"7 Days Profit and Loss\",\n \"channels.stats.7dWr.title\": \"7D WR\",\n \"channels.stats.7dWr.hint\": \"7 Days Winning Rate\",\n \"channels.detail.title\": \"Channel Detail\",\n \"channels.detail.notfound\": \"Channel not found\",\n \"channels.events.title\": \"Channel Events\",\n \"channels.events.empty\": \"No events yet\",\n \"channels.events.walletTrade.buy\": \"bought\",\n \"channels.events.walletTrade.sell\": \"sold\",\n \"channels.events.walletTrade.got\": \"got\",\n \"channels.events.walletTrade.cost\": \"cost\",\n \"channels.events.walletTrade.price\": \"price\",\n};\n","export const common = {\n \"common.cancel\": \"Cancel\",\n \"common.confirm\": \"Confirm\",\n \"common.reset\": \"Reset\",\n \"common.apply\": \"Apply\",\n \"common.ok\": \"OK\",\n \"common.yes\": \"Yes\",\n \"common.no\": \"No\",\n \"common.all\": \"All\",\n \"common.buy\": \"Buy\",\n \"common.sell\": \"Sell\",\n \"common.long\": \"Long\",\n \"common.short\": \"Short\",\n \"common.edit\": \"Edit\",\n \"common.save\": \"Save\",\n \"common.add\": \"Add\",\n \"common.delete\": \"Delete\",\n \"common.tips\": \"Tips\",\n \"common.max\": \"Max\",\n \"common.download\": \"Download\",\n \"common.copy\": \"Copy\",\n \"common.copy.failed\": \"Copy failed\",\n \"common.copy.copied\": \"Copied to clipboard\",\n \"common.share\": \"Share\",\n \"common.export\": \"Export\",\n \"common.empty\": \"No data\",\n \"common.unauthenticated\": \"Please sign in to continue\",\n \"common.signIn\": \"Sign In\",\n \"common.signOut\": \"Sign Out\",\n \"common.resolution.1s\": \"1s\",\n \"common.resolution.15s\": \"15s\",\n \"common.resolution.30s\": \"30s\",\n \"common.resolution.1m\": \"1m\",\n \"common.resolution.5m\": \"5m\",\n \"common.resolution.15m\": \"15m\",\n \"common.resolution.30m\": \"30m\",\n \"common.resolution.1h\": \"1h\",\n \"common.resolution.4h\": \"4h\",\n \"common.resolution.12h\": \"12h\",\n \"common.resolution.24h\": \"24h\",\n \"common.upload.submit\": \"Upload\",\n \"common.upload.resubmit\": \"Reupload\",\n \"common.upload.error\": \"Upload error\",\n \"common.loadingMore\": \"Loading more...\",\n \"common.continue\": \"Continue\",\n \"common.months\": \"months\",\n \"common.days\": \"days\",\n};\n","export const mediaTrack = {\n \"mediaTrack.tweets.translate.show\": \"Show Translation\",\n \"mediaTrack.tweets.translate.hide\": \"Hide Translation\",\n \"mediaTrack.tweets.expand\": \"Expand\",\n \"mediaTrack.tweets.collapse\": \"Collapse\",\n};\n","export const portfolio = {\n // Asset Tabs\n \"portfolio.tabs.spot\": \"Spot\",\n \"portfolio.tabs.perps\": \"Perps\",\n \"portfolio.tabs.prediction\": \"Prediction\",\n\n // Address Row\n \"portfolio.address.allWallets\": \"All Wallets\",\n \"portfolio.address.aggregated\": \"Aggregated\",\n \"portfolio.address.copy\": \"Copy Address\",\n \"portfolio.address.copied\": \"Address copied\",\n \"portfolio.address.owner\": \"Owner\",\n \"portfolio.address.viewing\": \"Viewing\",\n \"portfolio.address.search.placeholder\": \"Search wallet address…\",\n \"portfolio.address.search.view\": \"View\",\n \"portfolio.address.search.invalid\": \"Enter a valid address\",\n\n // Balance Row\n \"portfolio.balance.uPnl\": \"uPNL\",\n \"portfolio.balance.realized\": \"Realized\",\n \"portfolio.balance.gas\": \"Gas\",\n\n // Curve Card\n \"portfolio.curve.netWorth\": \"Net Worth\",\n \"portfolio.curve.pnl\": \"PNL\",\n \"portfolio.curve.noData\": \"Not enough data\",\n\n // Distribution Card\n \"portfolio.distribution.title\": \"Distribution\",\n \"portfolio.distribution.other\": \"Other\",\n\n // Viewing Mode\n \"portfolio.viewing.banner\": \"Viewing external portfolio\",\n \"portfolio.viewing.back\": \"Back to My Portfolio\",\n\n // Spot Holdings\n \"portfolio.spot.holdings\": \"Holdings\",\n \"portfolio.spot.history\": \"History\",\n \"portfolio.spot.search.placeholder\": \"Search token…\",\n \"portfolio.spot.hideSmall\": \"Hide small\",\n \"portfolio.spot.group.tokens\": \"Tokens\",\n \"portfolio.spot.header.asset\": \"Asset\",\n \"portfolio.spot.header.balance\": \"Balance\",\n \"portfolio.spot.header.price\": \"Price\",\n \"portfolio.spot.header.value\": \"Value\",\n \"portfolio.spot.header.24h\": \"24h\",\n \"portfolio.spot.empty\": \"No tokens found\",\n \"portfolio.spot.empty.hint\": \"Your spot tokens will appear here\",\n\n // Spot History\n \"portfolio.spot.history.header.type\": \"Type\",\n \"portfolio.spot.history.header.detail\": \"Detail\",\n \"portfolio.spot.history.header.amount\": \"Amount\",\n \"portfolio.spot.history.header.value\": \"Value\",\n \"portfolio.spot.history.header.time\": \"Time\",\n \"portfolio.spot.history.header.txHash\": \"TxHash\",\n \"portfolio.spot.history.type.swap\": \"Swap\",\n \"portfolio.spot.history.type.send\": \"Send\",\n \"portfolio.spot.history.type.receive\": \"Receive\",\n\n // Perps\n \"portfolio.perps.openPositions\": \"Open Positions\",\n \"portfolio.perps.tradeHistory\": \"Trade History\",\n \"portfolio.perps.closeAll\": \"Close All\",\n \"portfolio.perps.close\": \"Close\",\n \"portfolio.perps.closeAll.confirm\":\n \"Close all positions? This will route to each protocol to execute.\",\n \"portfolio.perps.closeAll.confirmBtn\": \"Confirm Close All\",\n \"portfolio.perps.closeAll.cancel\": \"Cancel\",\n \"portfolio.perps.header.pair\": \"Pair / Side\",\n \"portfolio.perps.header.size\": \"Size\",\n \"portfolio.perps.header.entry\": \"Entry\",\n \"portfolio.perps.header.mark\": \"Mark\",\n \"portfolio.perps.header.uPnl\": \"uPNL\",\n \"portfolio.perps.search.placeholder\": \"Search pair…\",\n \"portfolio.perps.empty\": \"No open positions\",\n \"portfolio.perps.empty.hint\": \"Start trading →\",\n \"portfolio.perps.history.header.pair\": \"Pair\",\n \"portfolio.perps.history.header.side\": \"Side\",\n \"portfolio.perps.history.header.size\": \"Size\",\n \"portfolio.perps.history.header.pnl\": \"PNL\",\n \"portfolio.perps.history.header.closePrice\": \"Close Price\",\n \"portfolio.perps.history.header.time\": \"Time\",\n\n // Prediction\n \"portfolio.prediction.activeBets\": \"Active Bets\",\n \"portfolio.prediction.settled\": \"Settled\",\n \"portfolio.prediction.sellAll\": \"Sell All\",\n \"portfolio.prediction.sell\": \"Sell\",\n \"portfolio.prediction.sellAll.confirm\":\n \"Sell all positions? This will route to each platform to execute.\",\n \"portfolio.prediction.sellAll.confirmBtn\": \"Confirm Sell All\",\n \"portfolio.prediction.sellAll.cancel\": \"Cancel\",\n \"portfolio.prediction.header.market\": \"Market / Source\",\n \"portfolio.prediction.header.position\": \"Position\",\n \"portfolio.prediction.header.stake\": \"Stake\",\n \"portfolio.prediction.header.potential\": \"Potential\",\n \"portfolio.prediction.header.status\": \"Status\",\n \"portfolio.prediction.search.placeholder\": \"Search market…\",\n \"portfolio.prediction.empty\": \"No active bets\",\n \"portfolio.prediction.empty.hint\": \"Explore prediction markets →\",\n \"portfolio.prediction.settled.header.market\": \"Market\",\n \"portfolio.prediction.settled.header.source\": \"Source\",\n \"portfolio.prediction.settled.header.position\": \"Position\",\n \"portfolio.prediction.settled.header.stake\": \"Stake\",\n \"portfolio.prediction.settled.header.result\": \"Result\",\n \"portfolio.prediction.settled.header.payout\": \"Payout\",\n\n // Empty / Error states\n \"portfolio.connectWallet\": \"Connect Wallet\",\n \"portfolio.connectWallet.hint\": \"Connect your wallet to view your portfolio\",\n \"portfolio.error.load\": \"Failed to load portfolio data\",\n \"portfolio.error.retry\": \"Retry\",\n};\n","export const predict = {\n // Categories\n \"predict.categories.trending\": \"Trending\",\n \"predict.categories.allMarkets\": \"All Markets\",\n\n // Event status\n \"predict.event.status.closed\": \"Closed\",\n \"predict.event.status.live\": \"Live\",\n \"predict.event.status.pending\": \"Pending\",\n\n // Event detail\n \"predict.event.volume\": \"vol\",\n \"predict.event.endDate\": \"Ends {{date}}\",\n \"predict.event.rules\": \"Rules\",\n \"predict.event.rules.collapse\": \"Collapse\",\n \"predict.event.rules.expand\": \"Expand all\",\n \"predict.event.showMore\": \"Show More\",\n \"predict.event.back\": \"Back\",\n \"predict.event.moreMarkets\": \"+{{count}} more\",\n\n // Markets table\n \"predict.market.table.outcome\": \"Outcome\",\n \"predict.market.table.chance\": \"Chance\",\n \"predict.market.table.actions\": \"Actions\",\n \"predict.market.action.yes\": \"Yes {{price}}¢\",\n \"predict.market.action.no\": \"No {{price}}¢\",\n\n // Market options\n \"predict.market.yes\": \"Yes\",\n \"predict.market.no\": \"No\",\n \"predict.market.sharesYes\": \"{{shares}} Yes\",\n \"predict.market.sharesNo\": \"{{shares}} No\",\n \"predict.market.tradeYes\": \"Trade Yes\",\n \"predict.market.tradeNo\": \"Trade No\",\n \"predict.market.graph\": \"Graph\",\n\n // Trade form\n \"predict.trade.action\": \"Trade\",\n \"predict.trade.buy\": \"Buy\",\n \"predict.trade.sell\": \"Sell\",\n \"predict.trade.yes\": \"Yes\",\n \"predict.trade.no\": \"No\",\n \"predict.trade.limit\": \"Limit\",\n \"predict.trade.market\": \"Market\",\n \"predict.trade.price\": \"Price\",\n \"predict.trade.amount\": \"Amount\",\n \"predict.trade.contracts\": \"Contracts\",\n \"predict.trade.estimatedCost\": \"Est. Cost\",\n \"predict.trade.potentialPayout\": \"Potential Payout\",\n \"predict.trade.potentialProfit\": \"Potential Profit\",\n \"predict.trade.potentialWin\": \"Potential Win\",\n \"predict.trade.estimatedReceive\": \"Est. Receive\",\n \"predict.trade.balance\": \"Available Balance\",\n \"predict.trade.bestBid\": \"Bid\",\n \"predict.trade.bestAsk\": \"Ask\",\n \"predict.trade.priceImpact\": \"Price Impact\",\n \"predict.trade.quoteError\": \"Unable to get quote. Please try again.\",\n \"predict.trade.connectWallet\": \"Connect Wallet\",\n \"predict.trade.submitting\": \"Submitting…\",\n \"predict.trade.submitSuccess\": \"Transaction submitted successfully!\",\n \"predict.trade.submitError\": \"Transaction failed. Please try again.\",\n\n // Order book\n \"predict.orderBook.title\": \"Order Book\",\n \"predict.orderBook.empty\": \"No orders yet\",\n \"predict.orderBook.type\": \"Type\",\n \"predict.orderBook.price\": \"Price\",\n \"predict.orderBook.contracts\": \"Contracts\",\n \"predict.orderBook.qty\": \"Qty\",\n \"predict.orderBook.total\": \"Total\",\n \"predict.orderBook.spread\": \"Spread\",\n\n // Open orders\n \"predict.openOrders.title\": \"Open Orders\",\n \"predict.openOrders.empty\": \"No open orders\",\n \"predict.openOrders.side\": \"Side\",\n \"predict.openOrders.outcome\": \"Outcome\",\n \"predict.openOrders.type\": \"Type\",\n \"predict.openOrders.price\": \"Price\",\n \"predict.openOrders.filled\": \"Filled\",\n \"predict.openOrders.status\": \"Status\",\n \"predict.openOrders.time\": \"Time\",\n \"predict.openOrders.cancel\": \"Cancel\",\n\n // Trade history\n \"predict.tradeHistory.title\": \"Trade History\",\n \"predict.tradeHistory.empty\": \"No trades yet\",\n \"predict.tradeHistory.side\": \"Side\",\n \"predict.tradeHistory.outcome\": \"Outcome\",\n \"predict.tradeHistory.price\": \"Price\",\n \"predict.tradeHistory.qty\": \"Qty\",\n \"predict.tradeHistory.total\": \"Total\",\n \"predict.tradeHistory.fee\": \"Fee\",\n \"predict.tradeHistory.time\": \"Time\",\n\n // Positions\n \"predict.positions.title\": \"Positions\",\n \"predict.positions.empty\": \"No positions\",\n \"predict.positions.market\": \"Market\",\n \"predict.positions.outcome\": \"Outcome\",\n \"predict.positions.qty\": \"Qty\",\n \"predict.positions.avgCost\": \"Avg Cost\",\n \"predict.positions.currentPrice\": \"Price\",\n \"predict.positions.value\": \"Value\",\n \"predict.positions.pnl\": \"P&L\",\n \"predict.positions.totalValue\": \"Total Value\",\n \"predict.positions.unrealizedPnl\": \"Unrealized P&L\",\n \"predict.positions.realizedPnl\": \"Realized P&L\",\n\n // Pagination\n \"predict.pagination.prev\": \"Prev\",\n \"predict.pagination.next\": \"Next\",\n \"predict.pagination.page\": \"Page {{page}}\",\n};\n","export const scaffold = {\n \"scaffold.draggableModal.snapToEdge\": \"Drag to edge to show side panel\",\n \"scaffold.draggablePanel.snapToModal\": \"Drag away to show floating modal\",\n \"scaffold.home\": \"Home\",\n};\n","export const tokens = {\n \"tokens.search.placeholder\": \"Search by token or CA...\",\n \"tokens.copied.address\": \"Token address copied to clipboard\",\n \"tokens.listHeader.token\": \"Token\",\n \"tokens.listHeader.priceHistories\": \"Price Histories\",\n \"tokens.listHeader.price\": \"Price\",\n \"tokens.listHeader.priceChange\": \"{{resolution}}%\",\n \"tokens.listHeader.marketCap\": \"Market Cap\",\n \"tokens.listHeader.liquidity\": \"Liquidity\",\n \"tokens.listHeader.volumes\": \"{{resolution}} Volumes\",\n \"tokens.listHeader.txs\": \"{{resolution}} TXNS\",\n \"tokens.listHeader.traders\": \"{{resolution}} Traders\",\n \"tokens.listHeader.bluechip\": \"BlueChip\",\n \"tokens.listHeader.tokenInfo\": \"Token Info\",\n \"tokens.listHeader.actions\": \"Actions\",\n \"tokens.listHeader.filter\": \"Filter\",\n \"tokens.listType.trending\": \"Trending\",\n \"tokens.listType.new\": \"New\",\n \"tokens.listType.stocks\": \"Stocks\",\n \"tokens.filters.protocols.title\": \"Protocols\",\n \"tokens.filters.protocols.selectAll\": \"Select All\",\n \"tokens.filters.protocols.unselectAll\": \"Unselect All\",\n \"tokens.filters.keywords.title\": \"Search Keywords\",\n \"tokens.filters.keywords.exclude.title\": \"Exclude Keywords\",\n \"tokens.filters.keywords.placeholder\": \"keyword1, keyword2...\",\n \"tokens.filters.stats.min\": \"Min\",\n \"tokens.filters.stats.max\": \"Max\",\n \"tokens.filters.stats.audits\": \"Audits\",\n \"tokens.filters.stats.audits.holders\": \"Holders Count\",\n \"tokens.filters.stats.audits.top10HoldingsRatio\": \"Top 10 Holders %\",\n \"tokens.filters.stats.audits.top100HoldingsRatio\": \"Top 100 Holders %\",\n \"tokens.filters.stats.audits.devHoldingsRatio\": \"Dev Holdings %\",\n \"tokens.filters.stats.metrics\": \"Metrics\",\n \"tokens.filters.stats.metrics.volumes\": \"{{resolution}} Volumes ($)\",\n \"tokens.filters.stats.metrics.txns\": \"{{resolution}} Transactions\",\n \"tokens.filters.stats.metrics.liquidity\": \"Liquidity ($)\",\n \"tokens.filters.stats.metrics.marketCap\": \"Market Cap ($)\",\n \"tokens.filters.modal.title\": \"Filters\",\n \"tokens.tokenInfo.holders\": \"Holders\",\n \"tokens.tokenInfo.proHolders\": \"Pro Holders\",\n \"tokens.tokenInfo.kolHolders\": \"KOL Holders\",\n \"tokens.tokenInfo.top10HoldingsRatio\": \"Top 10 Holders\",\n \"tokens.tokenInfo.top100HoldingsRatio\": \"Top 100 Holders\",\n \"tokens.tokenInfo.devHoldingsRatio\": \"Dev Holders\",\n \"tokens.tokenInfo.sniperHoldingsRatio\": \"Snipers\",\n \"tokens.tokenInfo.insiderHoldingsRatio\": \"Insiders\",\n \"tokens.tokenInfo.bundleHoldingsRatio\": \"Bundlers\",\n \"tokens.bluechip.explained\":\n \"BlueChip index is the ratio of holders who also own BlueChip tokens\",\n \"tokens.pulse.new\": \"New\",\n \"tokens.pulse.migrated\": \"Migrated\",\n \"tokens.pulse.finalStretch\": \"Final Stretch\",\n \"tokens.pulse.paused\": \"Paused\",\n \"tokens.pulse.vol\": \"Vol\",\n \"tokens.pulse.txs\": \"Txs\",\n};\n","import { channels } from \"./module/channels\";\nimport { common } from \"./module/common\";\nimport { mediaTrack } from \"./module/mediaTrack\";\nimport { portfolio } from \"./module/portfolio\";\nimport { predict } from \"./module/predict\";\nimport { scaffold } from \"./module/scaffold\";\nimport { tokens } from \"./module/tokens\";\n\nexport const en = {\n ...common,\n ...mediaTrack,\n ...predict,\n ...scaffold,\n ...tokens,\n ...channels,\n ...portfolio,\n};\n","import { initReactI18next } from \"react-i18next\";\nimport { i18n as I18nInstance, createInstance } from \"i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport {\n defaultLng,\n defaultNS,\n i18nCookieKey,\n i18nLocalStorageKey,\n} from \"./constant\";\nimport { en } from \"./locale/en\";\n\nconst i18n: I18nInstance = createInstance();\n\ni18n\n .use(LanguageDetector)\n .use(initReactI18next) // bind react-i18next to the instance\n .init({\n fallbackLng: defaultLng,\n ns: [defaultNS],\n defaultNS,\n interpolation: {\n escapeValue: false, // not needed for react!!\n },\n detection: {\n lookupLocalStorage: i18nLocalStorageKey,\n lookupCookie: i18nCookieKey,\n caches: [\"cookie\", \"localStorage\"],\n order: [\"cookie\", \"localStorage\", \"htmlTag\", \"navigator\"],\n },\n resources: {\n [defaultLng]: { [defaultNS]: en },\n },\n });\n\nexport default i18n;\n","import { i18n as I18nInstance } from \"i18next\";\nimport { LocaleCode } from \"./types\";\n\nexport type BackendOptions = {\n /**\n * Load url for a given language and namespace\n * @param lang language code\n * @param ns namespace\n * @returns url or urls\n */\n loadPath: (lang: LocaleCode, ns: string) => string | string[];\n};\n\n/**\n * Async resources loading through HTTP, resources must be placed in the site's public directory\n */\nexport class Backend {\n private readonly cache: Set<string>;\n\n constructor(\n private readonly i18n: I18nInstance,\n private readonly options?: BackendOptions,\n ) {\n this.cache = new Set();\n }\n\n async fetchData(url: string): Promise<Record<string, string>> {\n try {\n const res = await fetch(url);\n return await res.json();\n } catch (error) {\n console.warn(\n `Failed to fetch locale resource bundle from ${url}:`,\n error,\n );\n return {};\n }\n }\n\n async loadLanguage(lang: LocaleCode, ns: string) {\n if (typeof this.options?.loadPath !== \"function\") return;\n\n let paths = this.options.loadPath(lang, ns);\n if (typeof paths === \"string\") paths = [paths];\n if (!paths.length) return;\n\n const urls = paths.filter((path) => {\n const loaded = this.i18n.hasResourceBundle(lang, ns);\n return !loaded || !this.cache.has(path);\n });\n\n const promises = urls.map(async (url) => {\n const data = await this.fetchData(url);\n this.i18n.addResourceBundle(lang, ns, data, true, true);\n this.cache.add(url);\n });\n await Promise.all(promises);\n }\n}\n","import { createContext, useContext } from \"react\";\nimport { Language, LocaleCode } from \"./types\";\n\nexport type LocaleContextState = {\n /**\n * Supported languages\n */\n languages: Language[];\n\n /**\n * Called before language change\n * @param lang - new language code\n * @returns\n */\n beforeLanguageChange: (lang: LocaleCode) => Promise<void>;\n /**\n * Called after language changed\n * @param lang - new language code\n * @returns\n */\n afterLanguageChange: (lang: LocaleCode) => Promise<void>;\n};\n\nexport const LocaleContext = createContext<LocaleContextState>({\n languages: [],\n beforeLanguageChange: () => Promise.resolve(),\n afterLanguageChange: () => Promise.resolve(),\n});\n\nexport const useLocaleContext = () => {\n const context = useContext(LocaleContext);\n if (!context) {\n throw new Error(\"useLocaleContext must be used within a LocaleProvider\");\n }\n return context;\n};\n","import { LocaleEnum } from \"../types\";\n\n/**\n * get locale path from pathname\n * @param pathname - pathname to get locale path\n * @param localeCodes - locale codes to check\n * @example\n * getLocalePathFromPathname('/en/perp/PERP_ETH_USDC') => 'en'\n * getLocalePathFromPathname('/perp/PERP_ETH_USDC') => null\n * getLocalePathFromPathname('/en/markets') => 'en'\n * getLocalePathFromPathname('/markets') => null\n */\nexport function getLocalePathFromPathname(\n pathname: string,\n localeCodes?: string[],\n) {\n const locale = pathname.split(\"/\")[1];\n localeCodes = localeCodes || Object.values(LocaleEnum);\n return localeCodes.includes(locale as LocaleEnum) ? locale : null;\n}\n","import { type LocaleCode, LocaleEnum } from \"../types\";\n\n/**\n * transform browser language to i18n locale codes\n * @param lang - browser language\n * @param localeCodes - locale codes to check\n * @param defaultLang - default locale code\n * @example\n * parseI18nLang('en-US') => 'en'\n * parseI18nLang('zh-CN') => 'zh'\n * parseI18nLang('zh-TW') => 'zh'\n * parseI18nLang('ja') => 'ja'\n * */\nexport function parseI18nLang(\n lang: string,\n localeCodes?: LocaleCode[],\n defaultLang?: LocaleCode,\n) {\n localeCodes = localeCodes || Object.values(LocaleEnum);\n defaultLang = defaultLang || LocaleEnum.en;\n\n const regex = /^([a-z]{2})/i;\n const match = lang?.match(regex);\n\n if (!match) {\n return defaultLang;\n }\n\n const matchLang = match[1];\n\n if (localeCodes.includes(lang)) {\n return lang;\n }\n\n if (localeCodes.includes(matchLang)) {\n return matchLang;\n }\n\n return defaultLang;\n}\n","import i18n from \"../i18n\";\nimport { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\nimport { parseI18nLang } from \"./parseI18nLang\";\n\n/**\n * Generate a localized path with proper locale prefix and search parameters\n *\n * This function ensures that the returned path includes the appropriate locale prefix.\n * If the path already contains a valid locale prefix, it returns the path as-is.\n * Otherwise, it prepends the specified locale or falls back to the current i18n language.\n *\n * @param params - Configuration object for path generation\n * @param params.path - The base pathname (e.g., '/markets', '/perp/PERP_ETH_USDC')\n * @param params.locale - Optional locale code to use as prefix. If not provided, uses i18n.language\n * @param params.search - Optional search query string. If not provided, uses window.location.search\n *\n * @returns A complete URL path with locale prefix and search parameters\n *\n * @example\n * generatePath({ path: '/markets' }) => '/en/markets?tab=spot'\n * generatePath({ path: '/en/markets', search: '?tab=futures' }) => '/en/markets?tab=futures'\n * generatePath({ path: '/perp/PERP_ETH_USDC', locale: 'zh' }) => '/zh/perp/PERP_ETH_USDC'\n * generatePath({ path: '/en/perp/PERP_ETH_USDC' }) => '/en/perp/PERP_ETH_USDC'\n */\nexport function generatePath(params: {\n path: string;\n locale?: string;\n search?: string;\n}) {\n const { path, locale, search } = params;\n const searchUrl =\n search || (typeof window !== \"undefined\" ? window.location.search : \"\");\n\n let localePath = getLocalePathFromPathname(path);\n\n // If path already contains a valid locale prefix, return it unchanged\n if (localePath) {\n return `${path}${searchUrl}`;\n }\n\n // Use provided locale or fall back to current i18n language\n localePath = locale || parseI18nLang(i18n.language);\n\n // Prepend locale prefix to path\n return `/${localePath}${path}${searchUrl}`;\n}\n","import { getLocalePathFromPathname } from \"./getLocalePathFromPathname\";\n\n/**\n * remove lang prefix from pathname\n * @param pathname - pathname to remove lang prefix\n * @param localeCodes - locale codes to check\n * @example\n * removeLangPrefix('/en/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/en/markets') => '/markets'\n * removeLangPrefix('/perp/PERP_ETH_USDC') => '/perp/PERP_ETH_USDC'\n * removeLangPrefix('/markets') => '/markets'\n */\nexport function removeLangPrefix(pathname: string, localeCodes?: string[]) {\n const localePath = getLocalePathFromPathname(pathname, localeCodes);\n\n return localePath\n ? pathname.replace(new RegExp(`^/${localePath}(?=/)`), \"\")\n : pathname;\n}\n","import {\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { Backend, BackendOptions } from \"./backend\";\nimport { defaultLanguages, defaultNS } from \"./constant\";\nimport { LocaleContext, LocaleContextState } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode, Resources, Language } from \"./types\";\nimport { parseI18nLang } from \"./utils\";\n\nexport type LocaleProviderProps = PropsWithChildren<\n {\n /** current locale */\n locale?: LocaleCode;\n /** current locale's resource */\n resource?: Record<string, string>;\n /** all synchronously loaded resources */\n resources?: Resources;\n /** supported languages, must be a subset of {@link defaultLanguages}, used when {@link languages} is not provided */\n supportedLanguages?: LocaleCode[];\n /** optional conversion function to modify the detected language code */\n convertDetectedLanguage?: (lang: string) => LocaleCode;\n /** options to load resources asynchronously */\n backend?: BackendOptions;\n } & Partial<LocaleContextState>\n>;\n\nexport function LocaleProvider({\n children,\n locale,\n resource,\n resources,\n backend,\n supportedLanguages,\n convertDetectedLanguage,\n languages: languagesProp,\n beforeLanguageChange,\n afterLanguageChange,\n}: LocaleProviderProps) {\n // calculated supported languages\n const [languages, setLanguages] = useState<Language[]>(defaultLanguages);\n\n // backend instance to load resources asynchronously\n const backendRef = useRef(new Backend(i18n, backend!));\n\n // load resources synchronously\n useEffect(() => {\n if (resources) {\n Object.entries(resources).forEach(([locale, messages]) => {\n i18n.addResourceBundle(locale, defaultNS, messages, true, true);\n });\n return;\n }\n if (resource && locale) {\n i18n.addResourceBundle(locale, defaultNS, resource, true, true);\n }\n }, [locale, resource, resources]);\n\n // change language when locale changed\n useEffect(() => {\n if (locale && locale !== i18n.language) {\n i18n.changeLanguage(locale);\n }\n }, [locale]);\n\n // calculate supported languages\n useEffect(() => {\n if (Array.isArray(languagesProp)) {\n setLanguages(languagesProp);\n } else if (Array.isArray(supportedLanguages)) {\n setLanguages(\n supportedLanguages\n .map((localCode) =>\n defaultLanguages.find((l) => l.localCode === localCode),\n )\n .filter((item) => !!item),\n );\n }\n }, [supportedLanguages, languagesProp]);\n\n // if browser language is not a valid language, change language\n useEffect(() => {\n const fixLanguage = async () => {\n const lang =\n typeof convertDetectedLanguage === \"function\"\n ? convertDetectedLanguage(i18n.language)\n : parseI18nLang(i18n.language);\n await backendRef.current.loadLanguage(lang, defaultNS);\n if (lang !== i18n.language) {\n await i18n.changeLanguage(lang);\n }\n };\n fixLanguage();\n }, [i18n.language]);\n\n const beforeLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n await beforeLanguageChange?.(lang);\n // load language before language changed\n await backendRef.current.loadLanguage(lang, defaultNS);\n },\n [beforeLanguageChange],\n );\n\n const afterLanguageChangeHandler = useCallback(\n async (lang: LocaleCode) => {\n afterLanguageChange?.(lang);\n },\n [afterLanguageChange],\n );\n\n const contextValue = useMemo<LocaleContextState>(() => {\n return {\n languages,\n beforeLanguageChange: beforeLanguageChangeHandler,\n afterLanguageChange: afterLanguageChangeHandler,\n };\n }, [languages, beforeLanguageChangeHandler, afterLanguageChangeHandler]);\n\n return (\n <LocaleContext.Provider value={contextValue}>\n <I18nextProvider i18n={i18n} defaultNS={defaultNS}>\n {children}\n </I18nextProvider>\n </LocaleContext.Provider>\n );\n}\n","import { useContext } from \"react\";\nimport {\n FallbackNs,\n useTranslation as _useTranslation,\n UseTranslationOptions,\n I18nContext,\n} from \"react-i18next\";\nimport { FlatNamespace, KeyPrefix } from \"i18next\";\nimport i18n from \"./i18n\";\n\ntype $Tuple<T> = readonly [T?, ...T[]];\n\n/**\n * Hook to get translation function\n * @param ns\n * @param options\n * @returns\n */\nexport function useTranslation<\n Ns extends FlatNamespace | $Tuple<FlatNamespace> | undefined = undefined,\n KPrefix extends KeyPrefix<FallbackNs<Ns>> = undefined,\n>(ns?: Ns, options?: UseTranslationOptions<KPrefix>) {\n const context = useContext(I18nContext);\n return _useTranslation(ns, { i18n: context?.i18n || i18n, ...options });\n}\n","import { useEffect, useState } from \"react\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\n/**\n * Hooks to get current locale code\n * @returns current locale code\n */\nexport function useLocale() {\n const [localeCode, setLocaleCode] = useState<LocaleCode>(i18n.language);\n\n useEffect(() => {\n i18n.on(\"languageChanged\", setLocaleCode);\n return () => {\n i18n.off(\"languageChanged\", setLocaleCode);\n };\n }, [i18n]);\n\n return localeCode;\n}\n","import { useCallback } from \"react\";\nimport { useLocaleContext } from \"./context\";\nimport i18n from \"./i18n\";\nimport { LocaleCode } from \"./types\";\n\nexport function useChangeLocale() {\n const { beforeLanguageChange, afterLanguageChange } = useLocaleContext();\n\n const changeLocale = useCallback(\n async (locale: LocaleCode) => {\n await beforeLanguageChange(locale);\n await i18n.changeLanguage(locale);\n await afterLanguageChange(locale);\n },\n [beforeLanguageChange, afterLanguageChange, i18n],\n );\n\n return changeLocale;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liberfi.io/i18n",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "Internationalization for Liberfi React SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -35,24 +35,22 @@
|
|
|
35
35
|
"react-i18next": "^15.7.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@babel/preset-react": "^7.27.1",
|
|
41
|
-
"@babel/preset-typescript": "^7.22.5",
|
|
42
|
-
"@types/react": "^19.1.13",
|
|
43
|
-
"@types/react-dom": "^19.1.9",
|
|
38
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
39
|
+
"@testing-library/react": "^16.3.0",
|
|
44
40
|
"@types/fs-extra": "^11.0.4",
|
|
45
41
|
"@types/jest": "^29.5.3",
|
|
42
|
+
"@types/react": "^19.1.13",
|
|
43
|
+
"@types/react-dom": "^19.1.9",
|
|
46
44
|
"fs-extra": "^11.3.2",
|
|
47
|
-
"babel-jest": "^29.6.1",
|
|
48
45
|
"jest": "^29.6.1",
|
|
49
46
|
"jest-environment-jsdom": "^29.7.0",
|
|
50
47
|
"react": "^19.1.1",
|
|
51
48
|
"react-dom": "^19.1.1",
|
|
49
|
+
"ts-jest": "^29.4.6",
|
|
52
50
|
"tsup": "^8.5.0",
|
|
53
51
|
"typescript": "^5.9.2",
|
|
54
52
|
"yargs": "^18.0.0",
|
|
55
|
-
"tsconfig": "0.1.
|
|
53
|
+
"tsconfig": "0.1.16"
|
|
56
54
|
},
|
|
57
55
|
"peerDependencies": {
|
|
58
56
|
"react": ">=18",
|