Browse Source

feat: add Hindi language support

imwald
codytseng 6 months ago
parent
commit
f2bb65acf0
  1. 3
      src/i18n/index.ts
  2. 406
      src/i18n/locales/hi.ts
  3. 4
      src/lib/utils.ts

3
src/i18n/index.ts

@ -8,6 +8,7 @@ import en from './locales/en' @@ -8,6 +8,7 @@ import en from './locales/en'
import es from './locales/es'
import fa from './locales/fa'
import fr from './locales/fr'
import hi from './locales/hi'
import it from './locales/it'
import ja from './locales/ja'
import ko from './locales/ko'
@ -25,6 +26,7 @@ const languages = { @@ -25,6 +26,7 @@ const languages = {
es: { resource: es, name: 'Español' },
fa: { resource: fa, name: 'فارسی' },
fr: { resource: fr, name: 'Français' },
hi: { resource: hi, name: 'हि' },
it: { resource: it, name: 'Italiano' },
ja: { resource: ja, name: '日本語' },
ko: { resource: ko, name: '한국어' },
@ -81,6 +83,7 @@ i18n.services.formatter?.add('date', (timestamp, lng) => { @@ -81,6 +83,7 @@ i18n.services.formatter?.add('date', (timestamp, lng) => {
case 'pt-BR':
case 'pt-PT':
case 'ar':
case 'hi':
case 'th':
return dayjs(timestamp).format('DD/MM/YYYY')
case 'ko':

406
src/i18n/locales/hi.ts

@ -0,0 +1,406 @@ @@ -0,0 +1,406 @@
export default {
translation: {
'Welcome! 🥳': 'सगत ह! 🥳',
About: 'क',
'New Note': 'नयट',
Post: 'पट',
Home: 'हम',
'Relay settings': 'रििस',
Settings: 'सिस',
SidebarRelays: 'रि',
Refresh: 'रश',
Profile: 'पइल',
Logout: 'लगआउट',
Following: 'फ कर रह',
followings: 'फग',
reposted: 'रट कि',
'just now': 'अभ',
'n minutes ago': '{{n}} मिनट पहल',
'n m': '{{n}}मि',
'n hours ago': '{{n}} घ पहल',
'n h': '{{n}}घ',
'n days ago': '{{n}} दिन पहल',
'n d': '{{n}}दि',
date: '{{timestamp, date}}',
Follow: 'फ कर',
Unfollow: 'अनफ कर',
'Follow failed': 'फ असफल',
'Unfollow failed': 'अनफ असफल',
'show new notes': 'नए नस दि',
'loading...': 'लड ह रह...',
'Loading...': 'लड ह रह...',
'no more notes': 'कई और नट नह',
'reply to': 'क उततर',
reply: 'उततर',
Reply: 'उततर',
'load more older replies': 'अधिक प उततर लड कर',
'Write something...': 'कछ लि...',
Cancel: 'रदद कर',
Mentions: 'उलख',
'Failed to post': 'पट असफल',
'Post successful': 'पट सफल',
'Your post has been published': 'आपकट परकित ह गई ह',
Repost: 'रट',
Quote: 'उदधरण',
'Copy event ID': 'इवट आईड कर',
'Copy user ID': 'यजर आईड कर',
'View raw event': 'कच इवट द',
Like: 'पसद',
'switch to light theme': 'लइट थम पर सिच कर',
'switch to dark theme': 'डक थम पर सिच कर',
'switch to system theme': 'सिटम थम पर सिच कर',
Note: 'नट',
note: 'नट',
"username's following": '{{username}} कग',
"username's used relays": '{{username}} क उपयग किए गए रि',
"username's muted": '{{username}} कट किए गए',
Login: 'लिन',
'Follows you': 'आपक करत',
'Relay Settings': 'रििस',
'Relay set name': 'रिट नम',
'Add a new relay set': 'नयिट ज',
Add: 'ज',
'n relays': '{{n}} रि',
Rename: 'नम बदल',
'Copy share link': 'शयर लिक क कर',
Delete: 'हट',
'Relay already exists': 'रि पहलद ह',
'invalid relay URL': 'अमय रि URL',
'Add a new relay': 'नयि',
back: 'वपस',
'Lost in the void': 'शय म गय',
'Carry me home': 'म घर ल चल',
'no replies': 'कई उततर नह',
'Reply to': 'क उततर द',
Search: 'ख',
'The relays you are connected to do not support search':
'आप जिन रिज क समरथन नह करत',
'Show more...': 'और दि...',
'All users': 'सभ उपयगकर',
'Display replies': 'उततर परदरित कर',
Notes: 'नस',
Replies: 'उततर',
Notifications: 'सचन',
'no more notifications': 'कई और सचन नह',
'Using private key login is insecure. It is recommended to use a browser extension for login, such as alby, nostr-keyx or nos2x. If you must use a private key, please set a password for encryption at minimum.':
'पइवट किन क उपयग असरकित ह। लिन किए बउजर एकसटशन क उपयग करनििश क, ज alby, nostr-keyx य nos2x। यदि आपकइवट क उपयग करन, त कम स कम एनिशन किए पसवरड सट कर।',
'Login with Browser Extension': 'बउजर एकसटशन सिन कर',
'Login with Bunker': 'बकर सिन कर',
'Login with Private Key': 'पइवट किन कर',
'reload notes': 'नस रड कर',
'Logged in Accounts': 'लग इन अकट',
'Add an Account': 'अकट ज',
'More options': 'अधिक विकलप',
'Add client tag': 'कट टग ज',
'Show others this was sent via Jumble':
'दसरिि यह Jumble कयम स गय',
'Are you sure you want to logout?': 'क आप वकई लगआउट करनहत?',
'relay sets': 'रिट',
edit: 'सित कर',
Languages: 'भ',
Theme: 'थम',
System: 'सिटम',
Light: 'लइट',
Dark: 'डक',
Temporary: 'अस',
'Choose a relay set': 'रिट च',
'Switch account': 'अकट सिच कर',
Pictures: 'तस',
'Picture note': 'तसर नट',
'A special note for picture-first clients like Olas':
'Olas जिचर-फरट कट किए एक विष नट',
'Picture note requires images': 'तसर नट किए इमज आवशयक ह',
Relays: 'रि',
Image: 'इमज',
'R & W': 'R & W',
Read: 'पढ',
Write: 'लि',
'Pull relay sets': 'रिट ख',
'Select the relay sets you want to pull': 'विट चि आप खचनहत',
'No relay sets found': 'कई रिट नहि',
'Pull n relay sets': '{{n}} रिट ख',
Pull: 'ख',
'Select all': 'सभ',
'Relay Sets': 'रिट',
'Read & Write Relays': 'रड और रइट रि',
'read relays description':
'रड रि उपयग आपक इवट खजनिए कि। अनय उपयगकर आपकि इवट आपकड रि पर परकित कर।',
'write relays description':
'रइट रि उपयग आपक इवट परकित करनिए कि। अनय उपयगकर आपकइट रि आपक इवट ख।',
'read & write relays notice':
'रड और रइट सरवर क आदरश रप स 2 और 4 कच रखिए।',
"Don't have an account yet?": 'अभ तक कई अकट नह?',
'or simply generate a private key': 'य बस एक पइवट कनरट कर',
'This is a private key. Do not share it with anyone. Keep it safe and secure. You will not be able to recover it if you lose it.':
'यह एक पइवट क। इसिथ स न कर। इसरकित रख। यदि आप इस आप इसनरत नह कर प।',
Edit: 'सित कर',
Save: 'सव कर',
'Display Name': 'परदरशन नम',
Bio: 'ब',
'Nostr Address (NIP-05)': 'Nostr पत (NIP-05)',
'Invalid NIP-05 address': 'अमय NIP-05 पत',
'Copy private key': 'पइवट क कर',
'Enter the password to decrypt your ncryptsec':
'अपन ncryptsec डििट करनिए पसवरड दरज कर',
Back: 'वपस',
'optional: encrypt nsec': 'वकलिक: nsec एनिट कर',
password: 'पसवरड',
'Sign up': 'सइन अप',
'Save to': 'सव कर',
'Enter a name for the new relay set': 'नए रिट किए नम दरज कर',
'Save to a new relay set': 'नए रिट मव कर',
Mute: 'मट',
Muted: 'मट कि गय',
Unmute: 'अनमट',
'Unmute user': 'उपयगकर अनमट कर',
'Append n relays': '{{n}} रि',
Append: 'ज',
'Select relays to append': 'जिए रि',
'calculating...': 'गणन कर रह...',
'Calculate optimal read relays': 'इषटतम रड रि गणन कर',
'Login to set': 'सट करनिए लिन कर',
'Please login to view following feed': 'फग फड दखनिए कपयिन कर',
'Send only to r': 'कवल {{r}} क',
'Send only to these relays': 'कवल इन रि',
Explore: 'एकसपर कर',
'Search relays': 'रि',
relayInfoBadgeAuth: 'परमकरण',
relayInfoBadgeSearch: 'खज',
relayInfoBadgePayment: 'भगतन',
Operator: 'ऑपरटर',
Contact: 'सपरक',
Software: 'सटवयर',
Version: 'सकरण',
'Random Relays': 'रडम रि',
randomRelaysRefresh: 'रश',
'Explore more': 'और एकसपर कर',
'Payment page': 'भगतन पज',
'Supported NIPs': 'समरित NIPs',
'Open in a': '{{a}} म',
'Cannot handle event of kind k': 'परकर {{k}} क इवट कडल नह कर सकत',
'Sorry! The note cannot be found 😔': 'मफ कर! नट नहिल सक 😔',
'This user has been muted': 'इस उपयगकरट कर दि गय',
Wallet: 'वट',
Sats: 'सस',
sats: 'सस',
'Zap to': 'कप कर',
'Zap n sats': '{{n}} सस जप कर',
zapComment: 'टिपण',
'Default zap amount': 'डिट जप रि',
'Default zap comment': 'डिट जप टिपण',
'Lightning Address (or LNURL)': 'लइटनिग पत (य LNURL)',
'Quick zap': 'तवरित जप',
'If enabled, you can zap with a single click. Click and hold for custom amounts':
'यदि सकषम ह, त आप एक किक सप कर सकत। कसटम रििए किक करक',
All: 'सभ',
Reactions: 'परतिि',
Zaps: 'जस',
'Enjoying Jumble?': 'Jumble क आनद ल रह?',
'Your donation helps me maintain Jumble and make it better! 😊':
'आपकन म Jumble क बनए रखन और इसहतर बन मदद करत! 😊',
'Earlier notifications': 'पचन',
'Temporarily display this note': 'इस नट क असप सरदरित कर',
buttonFollowing: 'फ कर रह',
'Are you sure you want to unfollow this user?':
'क आप वकई इस उपयगकर अनफ करनहत?',
'Recent Supporters': 'हल क समरथक',
'Seen on': 'पर द गय',
'Temporarily display this reply': 'इस उततर क असप सरदरित कर',
'Note not found': 'नट नहि',
'no more replies': 'कई और उततर नह',
'Relay sets': 'रिट',
'Favorite Relays': 'पसि',
"Following's Favorites": 'फग क पस',
'no more relays': 'कई और रि नह',
'Favorited by': 'द पस',
'Post settings': 'पट सिस',
'Media upload service': 'मि अपलड स',
'Choose a relay': 'रि',
'no relays found': 'कई रि नहि',
video: 'वि',
'Show n new notes': '{{n}} नए नस दि',
YouTabName: 'आप',
Bookmark: 'बकमक',
'Remove bookmark': 'बकमक हट',
'no bookmarks found': 'कई बकमक नहि',
'no more bookmarks': 'कई और बकमक नह',
Bookmarks: 'बकमक',
'Show more': 'और दि',
General: 'सय',
Autoplay: 'ऑट',
'Enable video autoplay on this device': 'इस डिइस पर वि ऑट सकषम कर',
'Paste or drop media files to upload': 'अपलड करनिए मिइलट यप कर',
Preview: 'पवलकन',
'You are about to publish an event signed by [{{eventAuthorName}}]. You are currently logged in as [{{currentUsername}}]. Are you sure?':
'आप [{{eventAuthorName}}] द हसषरित एक इवट परकित करन। आप वरतमन म [{{currentUsername}}] कप मग इन ह। क आप सिित ह?',
'Platinum Sponsors': 'पिनम ससर',
From: 'स',
'Comment on': 'पर टिपण कर',
'View on njump.me': 'njump.me पर द',
'Hide content from untrusted users': 'अविवसनय उपयगकरमग',
'Only show content from your followed users and the users they follow':
'कवल आपकिए गए उपयगकर और उनकिए गए उपयगकरमगि',
'Followed by': 'दि गय',
'Mute user privately': 'उपयगकरिप सट कर',
'Mute user publicly': 'उपयगकरवजनिक रप सट कर',
Quotes: 'उदधरण',
'Lightning Invoice': 'लइटनिग इनवइस',
'Bookmark failed': 'बकमक असफल',
'Remove bookmark failed': 'बकमक हट असफल',
Translation: 'अनद',
Balance: 'बस',
characters: 'अकषर',
jumbleTranslateApiKeyDescription:
'आप इस API क कह उपयग कर सकत LibreTranslate क समरथन करत। स URL ह {{serviceUrl}}',
'Top up': 'टप अप',
'Will receive: {n} characters': 'पत ह: {{n}} अकषर',
'Top up {n} sats': '{{n}} सस टप अप कर',
'Minimum top up is {n} sats': 'ननतम टप अप {{n}} सस ह',
Service: 'स',
'Reset API key': 'API कट कर',
'Are you sure you want to reset your API key? This action cannot be undone.':
'क आप वकई अपन API कट करनहत? यह कय पववत नहि सकत।',
Warning: 'चवन',
'Your current API key will become invalid immediately, and any applications using it will stop working until you update them with the new key.':
'आपक वरतमन API कत अमय हएग, और इसक उपयग करन सभ एपिशन तब तक कम करनद कर द जब तक आप उन नई कथ अपडट नह करत।',
'Service address': 'स पत',
Pay: 'भगतन कर',
interactions: 'इटरशन',
notifications: 'सचन',
'Show untrusted {type}': 'अविवसनय {{type}} दि',
'Hide untrusted {type}': 'अविवसनय {{type}} छ',
'Currently hiding {type} from untrusted users.':
'वरतमन म अविवसनय उपयगकर {{type}} छ रह।',
'Currently showing all {type}.': 'वरतमन म सभ {{type}} दि रह।',
'Click continue to show all {type}.': 'सभ {{type}} दििए ज रख पर किक कर।',
'Click continue to hide {type} from untrusted users.':
'अविवसनय उपयगकर {{type}} छिए ज रख पर किक कर।',
'Trusted users include people you follow and people they follow.':
'विवसनय उपयगकरग शिल हि आप फ करत और जि करत।',
Continue: 'ज रख',
'Successfully updated mute list': 'मट स सफलतवक अपडट क गई',
'No pubkeys found from {url}': '{{url}} सई pubkeys नहि',
'Translating...': 'अनद कर रह...',
Translate: 'अनद कर',
'Show original': 'मल दि',
Website: 'वबसइट',
'Hide untrusted notes': 'अविवसनय नस छ',
'Open in another client': 'दसरट म',
Community: 'समय',
Group: 'समह',
'Live event': 'लइव इवट',
Article: 'लख',
Unfavorite: 'पस हट',
'Recommended relays': 'अनित रि',
'Blossom server URLs': 'बसम सरवर URLs',
'You need to add at least one blossom server in order to upload media files.':
'मिइल अपलड करनिए आपक कम स कम एक बसम सरवर ज।',
'Recommended blossom servers': 'अनित बसम सरवर',
'Enter Blossom server URL': 'बसम सरवर URL दरज कर',
Preferred: 'पथमिकत',
'Multiple choice (select one or more)': 'बहिकलय (एक य अधिक च)',
Vote: 'वट',
'{{number}} votes': '{{number}} वट',
'Total votes': 'कल वट',
'Poll has ended': 'पल समत ह गय',
'Poll ends at {{time}}': 'पल {{time}} पर समत ह',
'Load results': 'परिम लड कर',
'This is a poll note.': 'यह एक पल नट ह।',
'Unlike regular notes, polls are not widely supported and may not display on other clients.':
'नियमित नस किपरत, पल वपक रप स समरित नह और अनय कट पर परदरित नह सकत।',
'Option {{number}}': 'विकलप {{number}}',
'Add Option': 'विकलप ज',
'Allow multiple choices': 'एकिक विकल अनमति',
'End Date (optional)': 'समििि (वकलिक)',
'Clear end date': 'समििि कर',
'Relay URLs (optional, comma-separated)': 'रि URLs (वकलिक, क अलग)',
'Remove poll': 'पल हट',
'Refresh results': 'परिम रश कर',
Poll: 'पल',
Media: 'मि',
'Republish to ...': 'परकित कर...',
'Successfully republish to your write relays': 'आपकइट रि पर सफलतवक परकित',
'Failed to republish to your write relays: {{error}}':
'आपकइट रि पर परकित करन असफल: {{error}}',
'Successfully republish to relay set: {{name}}':
'रिट म सफलतवक परकित: {{name}}',
'Failed to republish to relay set: {{name}}. Error: {{error}}':
'रिट मरकित करन असफल: {{name}}। ति: {{error}}',
'Successfully republish to relay: {{url}}': 'रि पर सफलतवक परकित: {{url}}',
'Failed to republish to relay: {{url}}. Error: {{error}}':
'रि पर परकित करन असफल: {{url}}। ति: {{error}}',
'Write relays': 'रइट रि',
'No more reactions': 'कई और परतिि नह',
'No reactions yet': 'अभ तक कई परतिि नह',
'No more zaps': 'कई और जस नह',
'No zaps yet': 'अभ तक कई जस नह',
'No more reposts': 'कई और रट नह',
'No reposts yet': 'अभ तक कई रट नह',
Reposts: 'रट',
FollowListNotFoundConfirmation:
'फ नहि। क आप एक नई बनहत? यदि आपन पहल उपयगकरि, तपयि न करि इस ऑपरशन स आपकिछल नषट हएग।',
MuteListNotFoundConfirmation:
'मट स नहि। क आप एक नई बनहत? यदि आपन पहल उपयगकरट कि, तपयि न करि इस ऑपरशन स आपकिछलट स नषट हएग।',
'Show NSFW content by default': 'डिट रप स NSFW समगि',
'Custom emoji management': 'कसटम इमरबधन',
'After changing emojis, you may need to refresh the page':
'इम बदलनद, आपकज रश करन पड सकत',
'Too many read relays': 'बहत सड रि',
'Too many write relays': 'बहत सइट रि',
'You have {{count}} read relays. Most clients only use 2-4 relays, setting more is unnecessary.':
'आपकस {{count}} रड रि। अधिश कट कवल 2-4 रि उपयग करत, अधिक सट करन अनवशयक ह।',
'You have {{count}} write relays. Most clients only use 2-4 relays, setting more is unnecessary.':
'आपकस {{count}} रइट रि। अधिश कट कवल 2-4 रि उपयग करत, अधिक सट करन अनवशयक ह।',
'Optimize Relay Settings': 'रििस क अनित कर',
'Your current relay configuration may not be optimal. This could make it difficult for others to find your posts and may result in incomplete notifications.':
'आपक वरतमन रििगरशन इषटतम नह सकत। इसससरिए आपकट ढढनिल ह सकत और अधचनिल सकत।',
'Optimize Now': 'अभ अनित कर',
'Maybe Later': 'शयद बद म',
"Don't remind me again": 'मद न दि',
Posts: 'पट',
Articles: 'लख',
Highlights: 'हइलइटस',
Polls: 'पल',
'Voice Posts': 'वयस पट',
'Photo Posts': 'फट',
'Video Posts': 'विट',
'Select All': 'सभ',
'Clear All': 'सभ कर',
'Set as default filter': 'डिट फिटर कप मट कर',
Apply: 'ल कर',
Reset: 'रट',
'Share something on this Relay': 'इस रि पर कछ स कर',
'Try deleting this note': 'इस नट क हटरयस कर',
'Deletion request sent to {{count}} relays': '{{count}} रििट अनध भ गय',
'Suitable Relays': 'उपयत रि',
'Type searching for people, keywords, or relays':
'ल, कवरड यिज किए टइप कर',
'Hide content mentioning muted users':
'मट किए गए उपयगकर उलख करनमग',
'This note mentions a user you muted':
'यह नट एक उपयगकर उलख करति आपनट कि',
Filter: 'फिटर',
'mentioned you in a note': 'न आपक एक नट म उलख कि',
'quoted your note': 'न आपकट क उदत कि',
'voted in your poll': 'न आपकल मट कि',
'reacted to your note': 'न आपकट पर परतिि',
'reposted your note': 'न आपकट कट कि',
'zapped your note': 'न आपकट कप कि',
'zapped you': 'न आपकप कि',
'Mark as read': 'पढआ मक कर',
Report: 'रिट कर',
'Successfully report': 'सफलतवक रिट कि गय',
'Failed to report': 'रिट करन असफल',
nudity: 'नगनत',
malware: 'मलवयर',
profanity: 'अशलत',
illegal: 'अवध समग',
spam: 'सम',
other: 'अनय',
'Notification list style': 'सचन',
'See extra info for each notification': 'परतक सचनिए अतिित जनक',
'See more notifications at a glance': 'एक नजर म अधिक सचन',
Detailed: 'वित',
Compact: 'सित'
}
}

4
src/lib/utils.ts

@ -105,6 +105,9 @@ export function detectLanguage(text?: string): string | null { @@ -105,6 +105,9 @@ export function detectLanguage(text?: string): string | null {
if (/[\u0400-\u04ff]/.test(cleanText)) {
return 'ru'
}
if (/[\u0900-\u097f]/.test(cleanText)) {
return 'hi'
}
try {
const detectedLang = franc(cleanText)
@ -116,6 +119,7 @@ export function detectLanguage(text?: string): string | null { @@ -116,6 +119,7 @@ export function detectLanguage(text?: string): string | null {
fas: 'fa', // Persian (Farsi)
pes: 'fa', // Persian (alternative code)
fra: 'fr', // French
hin: 'hi', // Hindi
ita: 'it', // Italian
jpn: 'ja', // Japanese
pol: 'pl', // Polish

Loading…
Cancel
Save