feat(plugin-market): move extension count into search box placeholder

Mirror the langbot-space marketplace change: drop the '共 xxx 个扩展'
stats line below the tag filter, surface the count in the search
placeholder ('搜索 xxx 个扩展、能力或场景...') when no query is active,
and show the total at the bottom via allLoadedCount when searching.
Adds searchPlaceholderCount + allLoadedCount to all 8 locales.
This commit is contained in:
RockChinQ
2026-06-06 11:33:46 -04:00
parent 38759b229d
commit 073acaa053
9 changed files with 30 additions and 11 deletions

View File

@@ -632,7 +632,11 @@ function MarketPageContent({
<div className="relative min-w-0 flex-1 lg:max-w-xl">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4" />
<Input
placeholder={t('market.searchPlaceholder')}
placeholder={
total > 0
? t('market.searchPlaceholderCount', { count: total })
: t('market.searchPlaceholder')
}
value={searchQuery}
onChange={(e) => handleSearchInputChange(e.target.value)}
onCompositionStart={() => {
@@ -816,15 +820,6 @@ function MarketPageContent({
);
})}
</div>
{/* 搜索结果统计 */}
{total > 0 && (
<div className="text-center text-muted-foreground text-sm">
{searchQuery
? t('market.searchResults', { count: total })
: t('market.totalPlugins', { count: total })}
</div>
)}
</div>
{/* Scrollable extension list section */}
@@ -884,7 +879,9 @@ function MarketPageContent({
{/* No more data hint */}
{!hasMore && plugins.length > 0 && (
<div className="text-center text-muted-foreground py-6">
{t('market.allLoaded')}
{searchQuery
? t('market.allLoadedCount', { count: total })
: t('market.allLoaded')}
{' · '}
<a
href="https://github.com/langbot-app/langbot-plugin-demo/issues/new?template=plugin-request.yml"

View File

@@ -632,6 +632,8 @@ const enUS = {
},
market: {
searchPlaceholder: 'Search plugins...',
searchPlaceholderCount:
'Search {{count}} extensions, capabilities, or use cases...',
searchResults: 'Found {{count}} extensions',
totalPlugins: 'Total {{count}} extensions',
noPlugins: 'No plugins available',
@@ -639,6 +641,7 @@ const enUS = {
loadingMore: 'Loading more...',
loading: 'Loading...',
allLoaded: 'All plugins displayed',
allLoadedCount: 'All {{count}} extensions displayed',
install: 'Install',
installCard: 'Install {{name}}',
installConfirm:

View File

@@ -645,6 +645,8 @@ const esES = {
},
market: {
searchPlaceholder: 'Buscar plugins...',
searchPlaceholderCount:
'Buscar {{count}} extensiones, capacidades o casos de uso...',
searchResults: 'Se encontraron {{count}} extensiones',
totalPlugins: 'Total {{count}} extensiones',
noPlugins: 'No hay plugins disponibles',
@@ -652,6 +654,7 @@ const esES = {
loadingMore: 'Cargando más...',
loading: 'Cargando...',
allLoaded: 'Todos los plugins mostrados',
allLoadedCount: 'Se muestran las {{count}} extensiones',
install: 'Instalar',
installConfirm:
'¿Estás seguro de que deseas instalar el plugin "{{name}}" ({{version}})?',

View File

@@ -637,6 +637,8 @@ const jaJP = {
},
market: {
searchPlaceholder: 'プラグインを検索...',
searchPlaceholderCount:
'{{count}} 個の拡張機能・機能・ユースケースを検索...',
searchResults: '{{count}} 個の拡張機能が見つかりました',
totalPlugins: '合計 {{count}} 個の拡張機能',
noPlugins: '利用可能なプラグインがありません',
@@ -644,6 +646,7 @@ const jaJP = {
loadingMore: 'さらに読み込み中...',
loading: '読み込み中...',
allLoaded: 'すべてのプラグインが表示されました',
allLoadedCount: '{{count}} 個の拡張機能をすべて表示しました',
install: 'インストール',
installConfirm:
'プラグイン "{{name}}" ({{version}}) をインストールしますか?',

View File

@@ -643,6 +643,8 @@ const ruRU = {
},
market: {
searchPlaceholder: 'Поиск плагинов...',
searchPlaceholderCount:
'Поиск среди {{count}} расширений, возможностей или сценариев...',
searchResults: 'Найдено {{count}} расширений',
totalPlugins: 'Всего {{count}} расширений',
noPlugins: 'Нет доступных плагинов',
@@ -650,6 +652,7 @@ const ruRU = {
loadingMore: 'Загрузка ещё...',
loading: 'Загрузка...',
allLoaded: 'Все плагины отображены',
allLoadedCount: 'Показаны все {{count}} расширений',
install: 'Установить',
installConfirm:
'Вы уверены, что хотите установить плагин "{{name}}" ({{version}})?',

View File

@@ -624,6 +624,8 @@ const thTH = {
},
market: {
searchPlaceholder: 'ค้นหาปลั๊กอิน...',
searchPlaceholderCount:
'ค้นหา {{count}} ส่วนขยาย ความสามารถ หรือกรณีใช้งาน...',
searchResults: 'พบ {{count}} ส่วนขยาย',
totalPlugins: 'ทั้งหมด {{count}} ส่วนขยาย',
noPlugins: 'ไม่มีปลั๊กอินที่พร้อมใช้งาน',
@@ -631,6 +633,7 @@ const thTH = {
loadingMore: 'กำลังโหลดเพิ่มเติม...',
loading: 'กำลังโหลด...',
allLoaded: 'แสดงปลั๊กอินทั้งหมดแล้ว',
allLoadedCount: 'แสดงส่วนขยายทั้งหมด {{count}} รายการแล้ว',
install: 'ติดตั้ง',
installConfirm:
'คุณแน่ใจหรือไม่ว่าต้องการติดตั้งปลั๊กอิน "{{name}}" ({{version}})?',

View File

@@ -638,6 +638,8 @@ const viVN = {
},
market: {
searchPlaceholder: 'Tìm kiếm plugin...',
searchPlaceholderCount:
'Tìm kiếm {{count}} tiện ích mở rộng, khả năng hoặc tình huống...',
searchResults: 'Tìm thấy {{count}} tiện ích mở rộng',
totalPlugins: 'Tổng cộng {{count}} tiện ích mở rộng',
noPlugins: 'Không có plugin nào',
@@ -645,6 +647,7 @@ const viVN = {
loadingMore: 'Đang tải thêm...',
loading: 'Đang tải...',
allLoaded: 'Đã hiển thị tất cả plugin',
allLoadedCount: 'Đã hiển thị tất cả {{count}} tiện ích mở rộng',
install: 'Cài đặt',
installConfirm:
'Bạn có chắc chắn muốn cài đặt plugin "{{name}}" ({{version}}) không?',

View File

@@ -606,6 +606,7 @@ const zhHans = {
},
market: {
searchPlaceholder: '搜索插件...',
searchPlaceholderCount: '搜索 {{count}} 个扩展、能力或场景...',
searchResults: '搜索到 {{count}} 个扩展',
totalPlugins: '共 {{count}} 个扩展',
noPlugins: '暂无插件',
@@ -613,6 +614,7 @@ const zhHans = {
loadingMore: '加载更多...',
loading: '加载中...',
allLoaded: '已显示全部插件',
allLoadedCount: '已显示全部 {{count}} 个扩展',
install: '安装',
installCard: '安装 {{name}}',
installConfirm: '确定要安装插件 "{{name}}" ({{version}}) 吗?',

View File

@@ -606,6 +606,7 @@ const zhHant = {
},
market: {
searchPlaceholder: '搜尋插件...',
searchPlaceholderCount: '搜尋 {{count}} 個擴展、能力或場景...',
searchResults: '搜尋到 {{count}} 個擴展',
totalPlugins: '共 {{count}} 個擴展',
noPlugins: '暫無插件',
@@ -613,6 +614,7 @@ const zhHant = {
loadingMore: '載入更多...',
loading: '載入中...',
allLoaded: '已顯示全部插件',
allLoadedCount: '已顯示全部 {{count}} 個擴展',
install: '安裝',
installCard: '安裝 {{name}}',
installConfirm: '確定要安裝插件 "{{name}}" ({{version}}) 嗎?',