mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
refactor(i18n): use JSON with flattened key and namespace (#30114)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -65,14 +65,14 @@ const InstallPluginDropdown = ({
|
||||
useEffect(() => {
|
||||
const methods = []
|
||||
if (enable_marketplace)
|
||||
methods.push({ icon: MagicBox, text: t('plugin.source.marketplace'), action: 'marketplace' })
|
||||
methods.push({ icon: MagicBox, text: t('source.marketplace', { ns: 'plugin' }), action: 'marketplace' })
|
||||
|
||||
if (plugin_installation_permission.restrict_to_marketplace_only) {
|
||||
setInstallMethods(methods)
|
||||
}
|
||||
else {
|
||||
methods.push({ icon: Github, text: t('plugin.source.github'), action: 'github' })
|
||||
methods.push({ icon: FileZip, text: t('plugin.source.local'), action: 'local' })
|
||||
methods.push({ icon: Github, text: t('source.github', { ns: 'plugin' }), action: 'github' })
|
||||
methods.push({ icon: FileZip, text: t('source.local', { ns: 'plugin' }), action: 'local' })
|
||||
setInstallMethods(methods)
|
||||
}
|
||||
}, [plugin_installation_permission, enable_marketplace, t])
|
||||
@ -90,14 +90,14 @@ const InstallPluginDropdown = ({
|
||||
className={cn('h-full w-full p-2 text-components-button-secondary-text', isMenuOpen && 'bg-state-base-hover')}
|
||||
>
|
||||
<RiAddLine className="h-4 w-4" />
|
||||
<span className="pl-1">{t('plugin.installPlugin')}</span>
|
||||
<span className="pl-1">{t('installPlugin', { ns: 'plugin' })}</span>
|
||||
<RiArrowDownSLine className="ml-1 h-4 w-4" />
|
||||
</Button>
|
||||
</PortalToFollowElemTrigger>
|
||||
<PortalToFollowElemContent className="z-[1002]">
|
||||
<div className="shadows-shadow-lg flex w-[200px] flex-col items-start rounded-xl border border-components-panel-border bg-components-panel-bg-blur p-1 pb-2">
|
||||
<span className="system-xs-medium-uppercase flex items-start self-stretch pb-0.5 pl-2 pr-3 pt-1 text-text-tertiary">
|
||||
{t('plugin.installFrom')}
|
||||
{t('installFrom', { ns: 'plugin' })}
|
||||
</span>
|
||||
<input
|
||||
type="file"
|
||||
|
||||
Reference in New Issue
Block a user