mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-22 12:26:08 +00:00
feat: marketplace page
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { ReactNode } from 'react';
|
||||
import '@/i18n';
|
||||
import { I18nLabel } from '@/app/infra/entities/common';
|
||||
import { I18nObject } from '@/app/infra/entities/common';
|
||||
|
||||
interface I18nProviderProps {
|
||||
children: ReactNode;
|
||||
@@ -11,7 +11,7 @@ interface I18nProviderProps {
|
||||
export default function I18nProvider({ children }: I18nProviderProps) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
export function i18nObj(i18nLabel: I18nLabel): string {
|
||||
export function extractI18nObject(i18nLabel: I18nObject): string {
|
||||
const language = localStorage.getItem('langbot_language');
|
||||
if ((language === 'zh-Hans' && i18nLabel.zh_Hans) || !i18nLabel.en_US) {
|
||||
return i18nLabel.zh_Hans;
|
||||
|
||||
@@ -189,6 +189,51 @@ const enUS = {
|
||||
uploadSuccess: 'Upload successful',
|
||||
uploadFailed: 'Upload failed',
|
||||
selectFileToUpload: 'Select plugin file to upload',
|
||||
fromGithub: 'From GitHub',
|
||||
fromLocal: 'From Local',
|
||||
fromMarketplace: 'From Marketplace',
|
||||
},
|
||||
market: {
|
||||
searchPlaceholder: 'Search plugins...',
|
||||
searchResults: 'Found {{count}} plugins',
|
||||
totalPlugins: 'Total {{count}} plugins',
|
||||
noPlugins: 'No plugins available',
|
||||
noResults: 'No relevant plugins found',
|
||||
loadingMore: 'Loading more...',
|
||||
allLoaded: 'All plugins displayed',
|
||||
install: 'Install',
|
||||
installConfirm:
|
||||
'Are you sure you want to install plugin "{{name}}" ({{version}})?',
|
||||
downloadComplete: 'Plugin "{{name}}" download completed',
|
||||
installFailed: 'Installation failed, please try again later',
|
||||
loadFailed: 'Failed to get plugin list, please try again later',
|
||||
noDescription: 'No description available',
|
||||
notFound: 'Plugin information not found',
|
||||
sortBy: 'Sort by',
|
||||
sort: {
|
||||
recentlyAdded: 'Recently Added',
|
||||
recentlyUpdated: 'Recently Updated',
|
||||
mostDownloads: 'Most Downloads',
|
||||
leastDownloads: 'Least Downloads',
|
||||
},
|
||||
downloads: 'downloads',
|
||||
download: 'Download',
|
||||
repository: 'Repository',
|
||||
downloadFailed: 'Download failed',
|
||||
noReadme: 'This plugin does not provide README documentation',
|
||||
description: 'Description',
|
||||
tags: 'Tags',
|
||||
submissionTitle: 'You have a plugin submission under review: {{name}}',
|
||||
submissionPending: 'Your plugin submission is under review: {{name}}',
|
||||
submissionApproved: 'Your plugin submission has been approved: {{name}}',
|
||||
submissionRejected: 'Your plugin submission has been rejected: {{name}}',
|
||||
clickToRevoke: 'Revoke',
|
||||
revokeSuccess: 'Revoke success',
|
||||
revokeFailed: 'Revoke failed',
|
||||
submissionDetails: 'Plugin Submission Details',
|
||||
markAsRead: 'Mark as Read',
|
||||
markAsReadSuccess: 'Marked as read',
|
||||
markAsReadFailed: 'Mark as read failed',
|
||||
},
|
||||
pipelines: {
|
||||
title: 'Pipelines',
|
||||
|
||||
@@ -189,6 +189,52 @@ const jaJP = {
|
||||
uploadSuccess: 'アップロード成功',
|
||||
uploadFailed: 'アップロード失敗',
|
||||
selectFileToUpload: 'アップロードするプラグインファイルを選択',
|
||||
fromGithub: 'GitHubから',
|
||||
fromLocal: 'ローカルから',
|
||||
fromMarketplace: 'プラグインマーケットから',
|
||||
},
|
||||
market: {
|
||||
searchPlaceholder: 'プラグインを検索...',
|
||||
searchResults: '{{count}} 個のプラグインが見つかりました',
|
||||
totalPlugins: '合計 {{count}} 個のプラグイン',
|
||||
noPlugins: '利用可能なプラグインがありません',
|
||||
noResults: '関連するプラグインが見つかりません',
|
||||
loadingMore: 'さらに読み込み中...',
|
||||
allLoaded: 'すべてのプラグインが表示されました',
|
||||
install: 'インストール',
|
||||
installConfirm:
|
||||
'プラグイン "{{name}}" ({{version}}) をインストールしますか?',
|
||||
downloadComplete: 'プラグイン "{{name}}" のダウンロードが完了しました',
|
||||
installFailed: 'インストールに失敗しました。後でもう一度お試しください',
|
||||
loadFailed:
|
||||
'プラグインリストの取得に失敗しました。後でもう一度お試しください',
|
||||
noDescription: '説明がありません',
|
||||
notFound: 'プラグイン情報が見つかりません',
|
||||
sortBy: '並び順',
|
||||
sort: {
|
||||
recentlyAdded: '最近追加',
|
||||
recentlyUpdated: '最近更新',
|
||||
mostDownloads: 'ダウンロード数多',
|
||||
leastDownloads: 'ダウンロード数少',
|
||||
},
|
||||
downloads: '回ダウンロード',
|
||||
download: 'ダウンロード',
|
||||
repository: 'リポジトリ',
|
||||
downloadFailed: 'ダウンロード失敗',
|
||||
noReadme: 'このプラグインはREADMEドキュメントを提供していません',
|
||||
description: '説明',
|
||||
tags: 'タグ',
|
||||
submissionTitle: 'プラグインの提出が審査中です: {{name}}',
|
||||
submissionPending: 'プラグインの提出が審査中です: {{name}}',
|
||||
submissionApproved: 'プラグインの提出が承認されました: {{name}}',
|
||||
submissionRejected: 'プラグインの提出が拒否されました: {{name}}',
|
||||
clickToRevoke: '取り消し',
|
||||
revokeSuccess: '取り消し成功',
|
||||
revokeFailed: '取り消し失敗',
|
||||
submissionDetails: 'プラグイン提出詳細',
|
||||
markAsRead: '既読',
|
||||
markAsReadSuccess: '既読に設定しました',
|
||||
markAsReadFailed: '既読に設定に失敗しました',
|
||||
},
|
||||
pipelines: {
|
||||
title: 'パイプライン',
|
||||
|
||||
@@ -184,6 +184,49 @@ const zhHans = {
|
||||
uploadSuccess: '上传成功',
|
||||
uploadFailed: '上传失败',
|
||||
selectFileToUpload: '选择要上传的插件文件',
|
||||
fromGithub: '来自 GitHub',
|
||||
fromLocal: '来自本地',
|
||||
fromMarketplace: '来自市场',
|
||||
},
|
||||
market: {
|
||||
searchPlaceholder: '搜索插件...',
|
||||
searchResults: '搜索到 {{count}} 个插件',
|
||||
totalPlugins: '共 {{count}} 个插件',
|
||||
noPlugins: '暂无插件',
|
||||
noResults: '未找到相关插件',
|
||||
loadingMore: '加载更多...',
|
||||
allLoaded: '已显示全部插件',
|
||||
install: '安装',
|
||||
installConfirm: '确定要安装插件 "{{name}}" ({{version}}) 吗?',
|
||||
downloadComplete: '插件 "{{name}}" 下载完成',
|
||||
installFailed: '安装失败,请稍后重试',
|
||||
loadFailed: '获取插件列表失败,请稍后重试',
|
||||
noDescription: '暂无描述',
|
||||
notFound: '插件信息未找到',
|
||||
sortBy: '排序方式',
|
||||
sort: {
|
||||
recentlyAdded: '最近新增',
|
||||
recentlyUpdated: '最近更新',
|
||||
mostDownloads: '最多下载',
|
||||
leastDownloads: '最少下载',
|
||||
},
|
||||
downloads: '次下载',
|
||||
download: '下载',
|
||||
repository: '代码仓库',
|
||||
downloadFailed: '下载失败',
|
||||
noReadme: '该插件没有提供 README 文档',
|
||||
description: '描述',
|
||||
tags: '标签',
|
||||
submissionTitle: '您有插件提交正在审核中: {{name}}',
|
||||
submissionApproved: '您的插件提交已通过审核: {{name}}',
|
||||
submissionRejected: '您的插件提交已被拒绝: {{name}}',
|
||||
clickToRevoke: '撤回',
|
||||
revokeSuccess: '撤回成功',
|
||||
revokeFailed: '撤回失败',
|
||||
submissionDetails: '插件提交详情',
|
||||
markAsRead: '已读',
|
||||
markAsReadSuccess: '已标记为已读',
|
||||
markAsReadFailed: '标记为已读失败',
|
||||
},
|
||||
pipelines: {
|
||||
title: '流水线',
|
||||
|
||||
Reference in New Issue
Block a user