Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor(web): drop dead empty-string fallbacks on i18n t() calls (#45418)

yyhffb795feeb54
diff --git a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx
index 27370f60278..6a952563ee2 100644
--- a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx
+++ b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx
@@ -92,7 +92,7 @@ export default function CheckCode() {
onValueChange={setVerifyCode}
maxLength={6}
className="mt-1"
- placeholder={t(($) => $['checkCode.verificationCodePlaceholder'], { ns: 'login' }) || ''}
+ placeholder={t(($) => $['checkCode.verificationCodePlaceholder'], { ns: 'login' })}
/>
<Button loading={loading} className="my-3 w-full" variant="primary" onClick={verify}>
{t(($) => $['checkCode.verify'], { ns: 'login' })}
diff --git a/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx b/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx
index 95cd1f3b038..d43564fd843 100644
--- a/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx
+++ b/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx
@@ -112,7 +112,7 @@ const ChangePasswordForm = () => {
autoComplete="new-password"
value={password}
onValueChange={setPassword}
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
@@ -130,7 +130,7 @@ const ChangePasswordForm = () => {
autoComplete="new-password"
value={confirmPassword}
onValueChange={setConfirmPassword}
- placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/app/(shareLayout)/webapp-signin/check-code/page.tsx b/web/app/(shareLayout)/webapp-signin/check-code/page.tsx
index 987cb9063e6..5553addebab 100644
--- a/web/app/(shareLayout)/webapp-signin/check-code/page.tsx
+++ b/web/app/(shareLayout)/webapp-signin/check-code/page.tsx
@@ -143,7 +143,7 @@ export default function CheckCode() {
onValueChange={setCode}
maxLength={6}
className="mt-1"
- placeholder={t(($) => $['checkCode.verificationCodePlaceholder'], { ns: 'login' }) || ''}
+ placeholder={t(($) => $['checkCode.verificationCodePlaceholder'], { ns: 'login' })}
/>
<Button type="submit" loading={loading} className="my-3 w-full" variant="primary">
{t(($) => $['checkCode.verify'], { ns: 'login' })}
diff --git a/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx
index 7550e2a04f1..20a22f0465f 100644
--- a/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx
+++ b/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx
@@ -117,7 +117,7 @@ export default function MailAndPasswordAuth({ isEmailSetup }: MailAndPasswordAut
inputMode="email"
autoComplete="email"
spellCheck={false}
- placeholder={t(($) => $.emailPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.emailPlaceholder, { ns: 'login' })}
/>
</div>
<FieldError />
@@ -149,7 +149,7 @@ export default function MailAndPasswordAuth({ isEmailSetup }: MailAndPasswordAut
<PasswordFieldInput
id="password"
autoComplete="current-password"
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx b/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx
index 3ad26656da9..5989ee580e6 100644
--- a/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx
+++ b/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx
@@ -67,7 +67,7 @@ const EditModal: FC<Props> = ({ isShow, saveLoading, data, onClose, onSave }) =>
assistant_prefix: e.target.value,
})
}
- placeholder={t(($) => $['chat.conversationNamePlaceholder'], { ns: 'common' }) || ''}
+ placeholder={t(($) => $['chat.conversationNamePlaceholder'], { ns: 'common' })}
/>
</DialogBody>
diff --git a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx
index 8473c9b33d2..72354f9aeed 100644
--- a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx
@@ -263,7 +263,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
value={localeCurrentDataset.name}
onValueChange={(value) => handleValueChange('name', value)}
className="block h-9"
- placeholder={t(($) => $['form.namePlaceholder'], { ns: 'datasetSettings' }) || ''}
+ placeholder={t(($) => $['form.namePlaceholder'], { ns: 'datasetSettings' })}
/>
</div>
<div className={cn(rowClass)}>
@@ -278,7 +278,7 @@ const SettingsModal: FC<SettingsModalProps> = ({
value={localeCurrentDataset.description || ''}
onValueChange={(value) => handleValueChange('description', value)}
className="resize-none"
- placeholder={t(($) => $['form.descPlaceholder'], { ns: 'datasetSettings' }) || ''}
+ placeholder={t(($) => $['form.descPlaceholder'], { ns: 'datasetSettings' })}
/>
</div>
</div>
diff --git a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx b/web/app/components/app/configuration/tools/external-data-tool-modal.tsx
index 271b8302ae9..1551f0c4a2f 100644
--- a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx
+++ b/web/app/components/app/configuration/tools/external-data-tool-modal.tsx
@@ -168,9 +168,9 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
value={localeData.label || ''}
onChange={(e) => handleValueChange({ label: e.target.value })}
className="mr-2 block h-9 grow appearance-none rounded-lg bg-components-input-bg-normal px-3 text-sm text-components-input-text-filled outline-hidden"
- placeholder={
- t(($) => $['feature.tools.modal.name.placeholder'], { ns: 'appDebug' }) || ''
- }
+ placeholder={t(($) => $['feature.tools.modal.name.placeholder'], {
+ ns: 'appDebug',
+ })}
/>
<IconPicker
value={
@@ -209,10 +209,9 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
value={localeData.variable || ''}
onChange={(e) => handleValueChange({ variable: e.target.value })}
className="block h-9 w-full appearance-none rounded-lg bg-components-input-bg-normal px-3 text-sm text-components-input-text-filled outline-hidden"
- placeholder={
- t(($) => $['feature.tools.modal.variableName.placeholder'], { ns: 'appDebug' }) ||
- ''
- }
+ placeholder={t(($) => $['feature.tools.modal.variableName.placeholder'], {
+ ns: 'appDebug',
+ })}
/>
</div>
{localeData.type === 'api' && (
diff --git a/web/app/components/app/create-app-modal/index.tsx b/web/app/components/app/create-app-modal/index.tsx
index fdfb9a807ad..4421331ceed 100644
--- a/web/app/components/app/create-app-modal/index.tsx
+++ b/web/app/components/app/create-app-modal/index.tsx
@@ -322,7 +322,7 @@ function CreateApp({ onClose, onCreateFromTemplate, defaultAppMode }: CreateAppP
aria-label={t(($) => $['newApp.name'], { ns: 'app' })}
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder={t(($) => $['newApp.appNamePlaceholder'], { ns: 'app' }) || ''}
+ placeholder={t(($) => $['newApp.appNamePlaceholder'], { ns: 'app' })}
/>
</Field>
</div>
@@ -351,7 +351,7 @@ function CreateApp({ onClose, onCreateFromTemplate, defaultAppMode }: CreateAppP
<Textarea
id={descriptionInputId}
className="resize-none"
- placeholder={t(($) => $['newApp.appDescriptionPlaceholder'], { ns: 'app' }) || ''}
+ placeholder={t(($) => $['newApp.appDescriptionPlaceholder'], { ns: 'app' })}
value={description}
onValueChange={(value) => setDescription(value)}
/>
diff --git a/web/app/components/app/create-from-dsl-modal/index.tsx b/web/app/components/app/create-from-dsl-modal/index.tsx
index f42f56aa1ff..5d813068179 100644
--- a/web/app/components/app/create-from-dsl-modal/index.tsx
+++ b/web/app/components/app/create-from-dsl-modal/index.tsx
@@ -370,7 +370,7 @@ function CreateFromDSLModal({
autoComplete="off"
required
disabled={isImporting}
- placeholder={t(($) => $.importAppUrlPlaceholder, { ns: 'app' }) || ''}
+ placeholder={t(($) => $.importAppUrlPlaceholder, { ns: 'app' })}
defaultValue={dslUrl}
/>
<FieldError />
diff --git a/web/app/components/app/duplicate-modal/index.tsx b/web/app/components/app/duplicate-modal/index.tsx
index fcc241e62f6..1c4aba80601 100644
--- a/web/app/components/app/duplicate-modal/index.tsx
+++ b/web/app/components/app/duplicate-modal/index.tsx
@@ -149,7 +149,7 @@ const DuplicateAppModal = ({
value={name}
onChange={(e) => setName(e.target.value)}
className="h-10"
- placeholder={t(($) => $['placeholder.input'], { ns: 'common' }) || ''}
+ placeholder={t(($) => $['placeholder.input'], { ns: 'common' })}
/>
</Field>
</div>
diff --git a/web/app/components/app/switch-app-modal/index.tsx b/web/app/components/app/switch-app-modal/index.tsx
index cae445d6d27..447bb95406c 100644
--- a/web/app/components/app/switch-app-modal/index.tsx
+++ b/web/app/components/app/switch-app-modal/index.tsx
@@ -251,7 +251,7 @@ function SwitchAppSession({
required
readOnly={isPending}
defaultValue={`${sourceApp.name}(copy)`}
- placeholder={t(($) => $['newApp.appNamePlaceholder'], { ns: 'app' }) || ''}
+ placeholder={t(($) => $['newApp.appNamePlaceholder'], { ns: 'app' })}
className="h-10 grow"
/>
<FieldError className="col-span-2" />
diff --git a/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx b/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
index a207a188aab..2b8556ed616 100644
--- a/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
+++ b/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
@@ -187,7 +187,7 @@ const HeaderInMobile = () => {
{t(($) => $['chat.deleteConversation.title'], { ns: 'share' })}
</AlertDialogTitle>
<AlertDialogDescription>
- {t(($) => $['chat.deleteConversation.content'], { ns: 'share' }) || ''}
+ {t(($) => $['chat.deleteConversation.content'], { ns: 'share' })}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
diff --git a/web/app/components/base/chat/chat-with-history/header/index.tsx b/web/app/components/base/chat/chat-with-history/header/index.tsx
index 16d54eb6342..5baedf2dd7f 100644
--- a/web/app/components/base/chat/chat-with-history/header/index.tsx
+++ b/web/app/components/base/chat/chat-with-history/header/index.tsx
@@ -175,7 +175,7 @@ const Header = ({ toggleButtonRef }: { toggleButtonRef?: Ref<HTMLButtonElement>
{t(($) => $['chat.deleteConversation.title'], { ns: 'share' })}
</AlertDialogTitle>
<AlertDialogDescription>
- {t(($) => $['chat.deleteConversation.content'], { ns: 'share' }) || ''}
+ {t(($) => $['chat.deleteConversation.content'], { ns: 'share' })}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
diff --git a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx
index d03d8aaa610..b60506dc524 100644
--- a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx
+++ b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx
@@ -83,9 +83,8 @@ const Sidebar = ({ isPanel, toggleButtonRef }: Props) => {
},
[showRename, handleRenameConversation, handleCancelRename],
)
- const pinnedTitle = t(($) => $['chat.pinnedTitle'], { ns: 'share' }) || ''
- const deleteConversationContent =
- t(($) => $['chat.deleteConversation.content'], { ns: 'share' }) || ''
+ const pinnedTitle = t(($) => $['chat.pinnedTitle'], { ns: 'share' })
+ const deleteConversationContent = t(($) => $['chat.deleteConversation.content'], { ns: 'share' })
return (
<div
diff --git a/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx b/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx
index 4594398e330..940860a2a5b 100644
--- a/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx
+++ b/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx
@@ -27,8 +27,9 @@ type IRenameModalProps = {
const RenameModal: FC<IRenameModalProps> = ({ isShow, saveLoading, name, onClose, onSave }) => {
const { t } = useTranslation(['common'])
const [tempName, setTempName] = useState(name)
- const conversationNamePlaceholder =
- t(($) => $['chat.conversationNamePlaceholder'], { ns: 'common' }) || ''
+ const conversationNamePlaceholder = t(($) => $['chat.conversationNamePlaceholder'], {
+ ns: 'common',
+ })
return (
<Dialog open={isShow} onOpenChange={(open) => !open && onClose()}>
diff --git a/web/app/components/base/chat/chat/chat-input-area/index.tsx b/web/app/components/base/chat/chat/chat-input-area/index.tsx
index ed8b42d3fa0..97eff287648 100644
--- a/web/app/components/base/chat/chat/chat-input-area/index.tsx
+++ b/web/app/components/base/chat/chat/chat-input-area/index.tsx
@@ -335,7 +335,7 @@ const ChatInputArea = ({
($) =>
$[readonly ? 'chat.inputDisabledPlaceholder' : 'chat.inputPlaceholder'],
{ ns: 'common', botName: botName ?? '' },
- ) || '',
+ ),
)
}
// oxlint-disable-next-line jsx-a11y/no-autofocus -- Existing chat behavior focuses the composer as soon as it opens.
diff --git a/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx b/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx
index 71291d5d87c..eeb2582bb68 100644
--- a/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx
+++ b/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx
@@ -285,11 +285,12 @@ function FollowUpSettingsForm({ data, onSave }: Omit<FollowUpSettingsDialogProps
value={prompt}
onValueChange={(value) => setPrompt(value)}
maxLength={CUSTOM_FOLLOW_UP_PROMPT_MAX_LENGTH}
- placeholder={
- t(($) => $['feature.suggestedQuestionsAfterAnswer.modal.promptPlaceholder'], {
+ placeholder={t(
+ ($) => $['feature.suggestedQuestionsAfterAnswer.modal.promptPlaceholder'],
+ {
ns: 'appDebug',
- }) || ''
- }
+ },
+ )}
/>
)}
</FieldItem>
diff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx b/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx
index 0b789cefdc9..ccdf36dfcff 100644
--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx
+++ b/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx
@@ -77,10 +77,9 @@ const ModerationContent: FC<ModerationContentProps> = ({
}
value={presetResponse}
className="size-full resize-none pb-8"
- placeholder={
- t(($) => $['feature.moderation.modal.content.placeholder'], { ns: 'appDebug' }) ||
- ''
- }
+ placeholder={t(($) => $['feature.moderation.modal.content.placeholder'], {
+ ns: 'appDebug',
+ })}
onValueChange={handlePresetResponseChange}
/>
<div className="absolute right-2 bottom-2 flex h-5 items-center rounded-md bg-background-section px-1 system-2xs-medium-uppercase text-text-quaternary">
diff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx b/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
index 3e020381fb0..780ca3fcc87 100644
--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
+++ b/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
@@ -410,11 +410,9 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({ data, onCance
value={localeData.config?.keywords || ''}
onValueChange={handleDataKeywordsChange}
className="size-full resize-none pb-8"
- placeholder={
- t(($) => $['feature.moderation.modal.keywords.placeholder'], {
- ns: 'appDebug',
- }) || ''
- }
+ placeholder={t(($) => $['feature.moderation.modal.keywords.placeholder'], {
+ ns: 'appDebug',
+ })}
/>
<div className="absolute right-2 bottom-2 flex h-5 items-center rounded-md bg-background-section px-1 system-2xs-medium-uppercase text-text-quaternary">
<span>
@@ -465,9 +463,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({ data, onCance
</LabeledDivider>
<ModerationContent
key={`inputs-${localeData.type}-${localeData.config?.inputs_config?.preset_response ?? ''}`}
- title={
- t(($) => $['feature.moderation.modal.content.input'], { ns: 'appDebug' }) || ''
- }
+ title={t(($) => $['feature.moderation.modal.content.input'], { ns: 'appDebug' })}
config={localeData.config?.inputs_config || { enabled: false, preset_response: '' }}
onConfigChange={(config) => handleDataContentChange('inputs_config', config)}
info={
@@ -479,9 +475,7 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({ data, onCance
/>
<ModerationContent
key={`outputs-${localeData.type}-${localeData.config?.outputs_config?.preset_response ?? ''}`}
- title={
- t(($) => $['feature.moderation.modal.content.output'], { ns: 'appDebug' }) || ''
- }
+ title={t(($) => $['feature.moderation.modal.content.output'], { ns: 'appDebug' })}
config={
localeData.config?.outputs_config || { enabled: false, preset_response: '' }
}
diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx
index c0f744bdd57..a49d374192f 100644
--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx
+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx
@@ -107,7 +107,7 @@ const CreateFromDSLModal = ({
</FieldLabel>
<Input
autoComplete="off"
- placeholder={t(($) => $.importFromDSLUrlPlaceholder, { ns: 'app' }) || ''}
+ placeholder={t(($) => $.importFromDSLUrlPlaceholder, { ns: 'app' })}
value={dslUrlValue}
onChange={(e) => setDslUrlValue(e.target.value)}
/>
diff --git a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx
index ac89f353442..f7aae2a3171 100644
--- a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx
+++ b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx
@@ -88,9 +88,7 @@ const EmptyDatasetCreationContent = ({
</FieldLabel>
<Input
value={inputValue}
- placeholder={
- t(($) => $['stepOne.modal.placeholder'], { ns: 'datasetCreation' }) || ''
- }
+ placeholder={t(($) => $['stepOne.modal.placeholder'], { ns: 'datasetCreation' })}
onValueChange={setInputValue}
/>
</Field>
diff --git a/web/app/components/datasets/documents/components/rename-document-form.tsx b/web/app/components/datasets/documents/components/rename-document-form.tsx
index 43d6519a527..08258ac5195 100644
--- a/web/app/components/datasets/documents/components/rename-document-form.tsx
+++ b/web/app/components/datasets/documents/components/rename-document-form.tsx
@@ -68,7 +68,7 @@ export function RenameDocumentForm({
<Input
className="h-10"
value={newName}
- placeholder={t(($) => $['placeholder.input'], { ns: 'common' }) || ''}
+ placeholder={t(($) => $['placeholder.input'], { ns: 'common' })}
onValueChange={setNewName}
/>
</Field>
diff --git a/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx b/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx
index f33bd7f6b1c..fac274992bc 100644
--- a/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx
+++ b/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx
@@ -100,7 +100,7 @@ const QATextArea: FC<IQATextAreaProps> = React.memo(
className="text-sm tracking-[-0.07px] text-text-secondary caret-[#295EFF]"
value={question}
aria-labelledby={questionLabelId}
- placeholder={t(($) => $['segment.questionPlaceholder'], { ns: 'datasetDocuments' }) || ''}
+ placeholder={t(($) => $['segment.questionPlaceholder'], { ns: 'datasetDocuments' })}
onValueChange={(value) => onQuestionChange(value)}
disabled={!isEditMode}
containerRef={containerRef}
@@ -113,7 +113,7 @@ const QATextArea: FC<IQATextAreaProps> = React.memo(
className="text-sm tracking-[-0.07px] text-text-secondary caret-[#295EFF]"
value={answer ?? ''}
aria-labelledby={answerLabelId}
- placeholder={t(($) => $['segment.answerPlaceholder'], { ns: 'datasetDocuments' }) || ''}
+ placeholder={t(($) => $['segment.answerPlaceholder'], { ns: 'datasetDocuments' })}
onValueChange={(value) => onAnswerChange?.(value)}
disabled={!isEditMode}
autoFocus
@@ -172,8 +172,8 @@ const ChunkContent: FC<IChunkContentProps> = ({
<Textarea
className="h-full min-h-0 w-full resize-none rounded-none border-none bg-transparent p-0 pb-6 body-md-regular tracking-[-0.07px] text-text-secondary caret-[#295EFF] hover:border-none hover:bg-transparent focus:border-none focus:bg-transparent focus-visible:ring-inset disabled:bg-transparent disabled:text-text-secondary disabled:hover:bg-transparent"
value={question}
- aria-label={t(($) => $['segment.contentPlaceholder'], { ns: 'datasetDocuments' }) || ''}
- placeholder={t(($) => $['segment.contentPlaceholder'], { ns: 'datasetDocuments' }) || ''}
+ aria-label={t(($) => $['segment.contentPlaceholder'], { ns: 'datasetDocuments' })}
+ placeholder={t(($) => $['segment.contentPlaceholder'], { ns: 'datasetDocuments' })}
onValueChange={(value) => onQuestionChange(value)}
disabled={!isEditMode}
autoFocus
diff --git a/web/app/components/datasets/external-api/external-api-modal/Form.tsx b/web/app/components/datasets/external-api/external-api-modal/Form.tsx
index 14b19c92a22..a56fbe76178 100644
--- a/web/app/components/datasets/external-api/external-api-modal/Form.tsx
+++ b/web/app/components/datasets/external-api/external-api-modal/Form.tsx
@@ -85,7 +85,7 @@ const ExternalAPIForm: FC<ExternalAPIFormProps> = React.memo(
type={type === 'secret' ? 'password' : 'text'}
autoComplete="off"
inputMode={variable === 'endpoint' ? 'url' : undefined}
- placeholder={t(($) => $['placeholder.input'], { ns: 'common' }) || ''}
+ placeholder={t(($) => $['placeholder.input'], { ns: 'common' })}
spellCheck={variable === 'endpoint' || type === 'secret' ? false : undefined}
id={variable}
value={fieldValue}
diff --git a/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx b/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx
index f18dc3ab691..6cba2caf8b8 100644
--- a/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx
+++ b/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx
@@ -110,7 +110,7 @@ const ExternalApiSelection: React.FC<ExternalApiSelectionProps> = ({
onValueChange={(value) =>
onChange({ external_knowledge_id: value, external_knowledge_api_id })
}
- placeholder={t(($) => $.externalKnowledgeIdPlaceholder, { ns: 'dataset' }) ?? ''}
+ placeholder={t(($) => $.externalKnowledgeIdPlaceholder, { ns: 'dataset' })}
/>
</div>
</form>
diff --git a/web/app/components/datasets/external-knowledge-base/create/KnowledgeBaseInfo.tsx b/web/app/components/datasets/external-knowledge-base/create/KnowledgeBaseInfo.tsx
index 19bb8dbead9..3abe9bbd9e5 100644
--- a/web/app/components/datasets/external-knowledge-base/create/KnowledgeBaseInfo.tsx
+++ b/web/app/components/datasets/external-knowledge-base/create/KnowledgeBaseInfo.tsx
@@ -26,7 +26,7 @@ const KnowledgeBaseInfo: React.FC<KnowledgeBaseInfoProps> = ({ name, description
id={nameInputId}
value={name}
onValueChange={(nextValue) => onChange({ name: nextValue })}
- placeholder={t(($) => $.externalKnowledgeNamePlaceholder, { ns: 'dataset' }) ?? ''}
+ placeholder={t(($) => $.externalKnowledgeNamePlaceholder, { ns: 'dataset' })}
/>
</div>
<div className="flex flex-col gap-1 self-stretch">
@@ -40,9 +40,7 @@ const KnowledgeBaseInfo: React.FC<KnowledgeBaseInfoProps> = ({ name, description
id={descriptionInputId}
value={description}
onChange={(e) => onChange({ description: e.target.value })}
- placeholder={
- t(($) => $.externalKnowledgeDescriptionPlaceholder, { ns: 'dataset' }) ?? ''
- }
+ placeholder={t(($) => $.externalKnowledgeDescriptionPlaceholder, { ns: 'dataset' })}
className={`flex h-20 items-start self-stretch rounded-lg bg-components-input-bg-normal p-3 py-2 ${description ? 'text-components-input-text-filled' : 'text-components-input-text-placeholder'} system-sm-regular`}
/>
</div>
diff --git a/web/app/components/datasets/rename-modal/index.tsx b/web/app/components/datasets/rename-modal/index.tsx
index 8786d5e0521..5c41ce9b584 100644
--- a/web/app/components/datasets/rename-modal/index.tsx
+++ b/web/app/components/datasets/rename-modal/index.tsx
@@ -198,7 +198,7 @@ function RenameDatasetForm({
value={name}
onChange={(e) => setName(e.target.value)}
className="h-9 grow"
- placeholder={t(($) => $['form.namePlaceholder'], { ns: 'datasetSettings' }) || ''}
+ placeholder={t(($) => $['form.namePlaceholder'], { ns: 'datasetSettings' })}
/>
</div>
</Field>
@@ -212,7 +212,7 @@ function RenameDatasetForm({
value={description}
onValueChange={(value) => setDescription(value)}
className="resize-none"
- placeholder={t(($) => $['form.descPlaceholder'], { ns: 'datasetSettings' }) || ''}
+ placeholder={t(($) => $['form.descPlaceholder'], { ns: 'datasetSettings' })}
/>
</Field>
</DialogBody>
diff --git a/web/app/components/datasets/settings/form/components/basic-info-section.tsx b/web/app/components/datasets/settings/form/components/basic-info-section.tsx
index e3ee8956ef3..21d46efa98f 100644
--- a/web/app/components/datasets/settings/form/components/basic-info-section.tsx
+++ b/web/app/components/datasets/settings/form/components/basic-info-section.tsx
@@ -112,7 +112,7 @@ const BasicInfoSection = ({
aria-label={t(($) => $['form.desc'], { ns: 'datasetSettings' })}
disabled={!currentDataset?.embedding_available || readonly}
className="resize-none"
- placeholder={t(($) => $['form.descPlaceholder'], { ns: 'datasetSettings' }) || ''}
+ placeholder={t(($) => $['form.descPlaceholder'], { ns: 'datasetSettings' })}
value={description}
onValueChange={(value) => setDescription(value)}
/>
diff --git a/web/app/components/datasets/settings/permission-selector/index.tsx b/web/app/components/datasets/settings/permission-selector/index.tsx
index a3baabcde93..13e01b2f73e 100644
--- a/web/app/components/datasets/settings/permission-selector/index.tsx
+++ b/web/app/components/datasets/settings/permission-selector/index.tsx
@@ -259,7 +259,7 @@ const PermissionSelector = ({
disabled={isDisabled}
name="member-search"
value={keywords}
- placeholder={t(($) => $['operation.search'], { ns: 'common' }) || ''}
+ placeholder={t(($) => $['operation.search'], { ns: 'common' })}
onValueChange={setKeywords}
/>
</div>
diff --git a/web/app/components/header/account-setting/api-based-extension-page/item.tsx b/web/app/components/header/account-setting/api-based-extension-page/item.tsx
index 3edabd052ec..50165b9fdc3 100644
--- a/web/app/components/header/account-setting/api-based-extension-page/item.tsx
+++ b/web/app/components/header/account-setting/api-based-extension-page/item.tsx
@@ -91,7 +91,7 @@ export function Item({ apiBasedExtension, onEdit, canManage = true }: ItemProps)
disabled={!canManage || deleteApiBasedExtensionMutation.isPending}
onClick={handleDeleteApiBasedExtension}
>
- {t(($) => $['operation.delete'], { ns: 'common' }) || ''}
+ {t(($) => $['operation.delete'], { ns: 'common' })}
</AlertDialogConfirmButton>
</AlertDialogFooter>
</AlertDialogContent>
diff --git a/web/app/components/header/account-setting/api-based-extension-page/modal.tsx b/web/app/components/header/account-setting/api-based-extension-page/modal.tsx
index 86474fe418e..f2ff535e2eb 100644
--- a/web/app/components/header/account-setting/api-based-extension-page/modal.tsx
+++ b/web/app/components/header/account-setting/api-based-extension-page/modal.tsx
@@ -109,9 +109,9 @@ export function ApiBasedExtensionModal(props: ApiBasedExtensionModalProps) {
<Input
required
defaultValue={editingApiBasedExtension?.name || ''}
- placeholder={
- t(($) => $['apiBasedExtension.modal.name.placeholder'], { ns: 'common' }) || ''
- }
+ placeholder={t(($) => $['apiBasedExtension.modal.name.placeholder'], {
+ ns: 'common',
+ })}
/>
<FieldError match="valueMissing">
{t(($) => $['errorMsg.fieldRequired'], { ns: 'common', field: nameLabel })}
@@ -123,11 +123,9 @@ export function ApiBasedExtensionModal(props: ApiBasedExtensionModalProps) {
<Input
required
defaultValue={editingApiBasedExtension?.api_endpoint || ''}
- placeholder={
- t(($) => $['apiBasedExtension.modal.apiEndpoint.placeholder'], {
- ns: 'common',
- }) || ''
- }
+ placeholder={t(($) => $['apiBasedExtension.modal.apiEndpoint.placeholder'], {
+ ns: 'common',
+ })}
/>
<FieldDescription>
<a
@@ -161,9 +159,9 @@ export function ApiBasedExtensionModal(props: ApiBasedExtensionModalProps) {
<Input
required
defaultValue={editingApiBasedExtension?.api_key || ''}
- placeholder={
- t(($) => $['apiBasedExtension.modal.apiKey.placeholder'], { ns: 'common' }) || ''
- }
+ placeholder={t(($) => $['apiBasedExtension.modal.apiKey.placeholder'], {
+ ns: 'common',
+ })}
/>
<FieldError match="valueMissing">
{t(($) => $['errorMsg.fieldRequired'], { ns: 'common', field: apiKeyLabel })}
diff --git a/web/app/components/header/account-setting/members-page/invite-modal/email-recipients-field.tsx b/web/app/components/header/account-setting/members-page/invite-modal/email-recipients-field.tsx
index 489f5c62525..b3b5fdc0146 100644
--- a/web/app/components/header/account-setting/members-page/invite-modal/email-recipients-field.tsx
+++ b/web/app/components/header/account-setting/members-page/invite-modal/email-recipients-field.tsx
@@ -250,7 +250,7 @@ export function EmailRecipientsField({
inputMode="email"
placeholder={
recipients.length === 0
- ? t(($) => $['members.emailPlaceholder'], { ns: 'workspaceMembers' }) || ''
+ ? t(($) => $['members.emailPlaceholder'], { ns: 'workspaceMembers' })
: ''
}
value={draft}
diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/popup-layout.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/popup-layout.tsx
index 28a0e72f7ee..f10f282fa3b 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-selector/popup-layout.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/popup-layout.tsx
@@ -24,8 +24,8 @@ export function ModelSelectorSearchHeader({
return (
<div className="shrink-0 bg-components-panel-bg px-2 pt-2 pb-1">
<SearchInput
- aria-label={t(($) => $['form.searchModel'], { ns: 'modelProvider' }) || ''}
- placeholder={t(($) => $['form.searchModel'], { ns: 'modelProvider' }) || ''}
+ aria-label={t(($) => $['form.searchModel'], { ns: 'modelProvider' })}
+ placeholder={t(($) => $['form.searchModel'], { ns: 'modelProvider' })}
value={inputValue}
onValueChange={onInputValueChange}
/>
diff --git a/web/app/components/plugins/marketplace/home/catalog-languages-filter.tsx b/web/app/components/plugins/marketplace/home/catalog-languages-filter.tsx
index eb9a01fd3d2..e9541958ce4 100644
--- a/web/app/components/plugins/marketplace/home/catalog-languages-filter.tsx
+++ b/web/app/components/plugins/marketplace/home/catalog-languages-filter.tsx
@@ -135,13 +135,11 @@ export default function CatalogLanguagesFilter() {
name="language-query"
autoComplete="off"
enterKeyHint="search"
- aria-label={t(($) => $['marketplace.searchFilterLanguage'], { ns: 'plugin' }) || ''}
+ aria-label={t(($) => $['marketplace.searchFilterLanguage'], { ns: 'plugin' })}
className="[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none"
value={searchText}
onValueChange={setSearchText}
- placeholder={
- t(($) => $['marketplace.searchFilterLanguage'], { ns: 'plugin' }) || ''
- }
+ placeholder={t(($) => $['marketplace.searchFilterLanguage'], { ns: 'plugin' })}
/>
<InputGroupAddon className="ps-1.75 pe-0.75">
<span
diff --git a/web/app/components/plugins/plugin-tags-filter/index.tsx b/web/app/components/plugins/plugin-tags-filter/index.tsx
index 1ce1f8f9c45..eca03b3ce7b 100644
--- a/web/app/components/plugins/plugin-tags-filter/index.tsx
+++ b/web/app/components/plugins/plugin-tags-filter/index.tsx
@@ -49,11 +49,11 @@ export function PluginTagsFilter({
name="tag-query"
autoComplete="off"
enterKeyHint="search"
- aria-label={t(($) => $.searchTags, { ns: 'pluginTags' }) || ''}
+ aria-label={t(($) => $.searchTags, { ns: 'pluginTags' })}
className="[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none"
value={searchText}
onValueChange={setSearchText}
- placeholder={t(($) => $.searchTags, { ns: 'pluginTags' }) || ''}
+ placeholder={t(($) => $.searchTags, { ns: 'pluginTags' })}
/>
<InputGroupAddon className="ps-1.75 pe-0.75">
<span
diff --git a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
index d3025f8b183..e61f837b092 100644
--- a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
+++ b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
@@ -98,10 +98,9 @@ const PublishAsKnowledgePipelineModal = ({
autoComplete="off"
value={pipelineName}
onChange={(e) => setPipelineName(e.target.value)}
- placeholder={
- t(($) => $['common.publishAsPipeline.namePlaceholder'], { ns: 'pipeline' }) ||
- ''
- }
+ placeholder={t(($) => $['common.publishAsPipeline.namePlaceholder'], {
+ ns: 'pipeline',
+ })}
/>
</Field>
<IconPicker
@@ -136,11 +135,9 @@ const PublishAsKnowledgePipelineModal = ({
<Textarea
autoComplete="off"
className="resize-none"
- placeholder={
- t(($) => $['common.publishAsPipeline.descriptionPlaceholder'], {
- ns: 'pipeline',
- }) || ''
- }
+ placeholder={t(($) => $['common.publishAsPipeline.descriptionPlaceholder'], {
+ ns: 'pipeline',
+ })}
value={description}
onValueChange={(value) => setDescription(value)}
/>
diff --git a/web/app/components/snippets/create-snippet-dialog.tsx b/web/app/components/snippets/create-snippet-dialog.tsx
index 77d3c45b760..e0afbb04267 100644
--- a/web/app/components/snippets/create-snippet-dialog.tsx
+++ b/web/app/components/snippets/create-snippet-dialog.tsx
@@ -139,7 +139,7 @@ export function CreateSnippetDialog({
id={nameInputId}
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder={t(($) => $['snippet.namePlaceholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['snippet.namePlaceholder'], { ns: 'workflow' })}
disabled={isSubmitting}
/>
</div>
@@ -156,9 +156,7 @@ export function CreateSnippetDialog({
className="resize-none"
value={description}
onValueChange={(value) => setDescription(value)}
- placeholder={
- t(($) => $['snippet.descriptionPlaceholder'], { ns: 'workflow' }) || ''
- }
+ placeholder={t(($) => $['snippet.descriptionPlaceholder'], { ns: 'workflow' })}
disabled={isSubmitting}
/>
</div>
diff --git a/web/app/components/snippets/import-snippet-dsl-dialog.tsx b/web/app/components/snippets/import-snippet-dsl-dialog.tsx
index 86dc10b5214..0d0b8c4ec56 100644
--- a/web/app/components/snippets/import-snippet-dsl-dialog.tsx
+++ b/web/app/components/snippets/import-snippet-dsl-dialog.tsx
@@ -284,7 +284,7 @@ function ImportSnippetDSLDialog({ isOpen, onClose }: ImportSnippetDSLDialogProps
</label>
<Input
id={dslUrlInputId}
- placeholder={t(($) => $.importFromDSLUrlPlaceholder, { ns: 'snippet' }) || ''}
+ placeholder={t(($) => $.importFromDSLUrlPlaceholder, { ns: 'snippet' })}
value={dslUrl}
onChange={(event) => setDslUrl(event.target.value)}
/>
diff --git a/web/app/components/tools/edit-custom-collection-modal/index.tsx b/web/app/components/tools/edit-custom-collection-modal/index.tsx
index f7cf24889b3..3d459059256 100644
--- a/web/app/components/tools/edit-custom-collection-modal/index.tsx
+++ b/web/app/components/tools/edit-custom-collection-modal/index.tsx
@@ -451,10 +451,9 @@ const EditCustomCollectionModal: FC<Props> = ({
setCustomCollection(newCollection)
}}
className="h-10 grow"
- placeholder={
- t(($) => $['createTool.privacyPolicyPlaceholder'], { ns: 'tools' }) ||
- ''
- }
+ placeholder={t(($) => $['createTool.privacyPolicyPlaceholder'], {
+ ns: 'tools',
+ })}
/>
</div>
@@ -475,11 +474,9 @@ const EditCustomCollectionModal: FC<Props> = ({
setCustomCollection(newCollection)
}}
className="h-10 grow"
- placeholder={
- t(($) => $['createTool.customDisclaimerPlaceholder'], {
- ns: 'tools',
- }) || ''
- }
+ placeholder={t(($) => $['createTool.customDisclaimerPlaceholder'], {
+ ns: 'tools',
+ })}
/>
</div>
</div>
diff --git a/web/app/components/tools/workflow-tool/index.tsx b/web/app/components/tools/workflow-tool/index.tsx
index 9b515d5141a..34cbfb028a5 100644
--- a/web/app/components/tools/workflow-tool/index.tsx
+++ b/web/app/components/tools/workflow-tool/index.tsx
@@ -410,9 +410,7 @@ export function WorkflowToolDrawer({
{t(($) => $['createTool.description'], { ns: 'tools' })}
</FieldLabel>
<Textarea
- placeholder={
- t(($) => $['createTool.descriptionPlaceholder'], { ns: 'tools' }) || ''
- }
+ placeholder={t(($) => $['createTool.descriptionPlaceholder'], { ns: 'tools' })}
value={description}
onValueChange={(value) => setDescription(value)}
/>
@@ -571,9 +569,7 @@ export function WorkflowToolDrawer({
className="h-10"
value={privacyPolicy}
onValueChange={(value) => setPrivacyPolicy(value)}
- placeholder={
- t(($) => $['createTool.privacyPolicyPlaceholder'], { ns: 'tools' }) || ''
- }
+ placeholder={t(($) => $['createTool.privacyPolicyPlaceholder'], { ns: 'tools' })}
/>
</Field>
</div>
diff --git a/web/app/components/workflow/block-selector/snippets/snippet-tags-filter.tsx b/web/app/components/workflow/block-selector/snippets/snippet-tags-filter.tsx
index 01626a926e8..992a3155058 100644
--- a/web/app/components/workflow/block-selector/snippets/snippet-tags-filter.tsx
+++ b/web/app/components/workflow/block-selector/snippets/snippet-tags-filter.tsx
@@ -95,13 +95,13 @@ const SnippetTagsFilter = ({ embedded = false, value, onChange }: SnippetTagsFil
<InputGroupInput
type="search"
name="tag-query"
- aria-label={t(($) => $.searchTags, { ns: 'pluginTags' }) || ''}
+ aria-label={t(($) => $.searchTags, { ns: 'pluginTags' })}
autoComplete="off"
enterKeyHint="search"
className="[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none"
value={searchText}
onValueChange={setSearchText}
- placeholder={t(($) => $.searchTags, { ns: 'pluginTags' }) || ''}
+ placeholder={t(($) => $.searchTags, { ns: 'pluginTags' })}
/>
<InputGroupAddon className="ps-1.75 pe-0.75">
<span
diff --git a/web/app/components/workflow/hooks/use-nodes-interactions.ts b/web/app/components/workflow/hooks/use-nodes-interactions.ts
index c11f3ba30d7..956e439918a 100644
--- a/web/app/components/workflow/hooks/use-nodes-interactions.ts
+++ b/web/app/components/workflow/hooks/use-nodes-interactions.ts
@@ -722,7 +722,7 @@ export const useNodesInteractions = () => {
if (!showConfirm) {
setShowConfirm({
title: t(($) => $['nodes.iteration.deleteTitle'], { ns: 'workflow' }),
- desc: t(($) => $['nodes.iteration.deleteDesc'], { ns: 'workflow' }) || '',
+ desc: t(($) => $['nodes.iteration.deleteDesc'], { ns: 'workflow' }),
onConfirm: () => {
iterationChildren.forEach((child) => {
handleNodeDelete(child.id)
@@ -759,7 +759,7 @@ export const useNodesInteractions = () => {
if (!showConfirm) {
setShowConfirm({
title: t(($) => $['nodes.loop.deleteTitle'], { ns: 'workflow' }),
- desc: t(($) => $['nodes.loop.deleteDesc'], { ns: 'workflow' }) || '',
+ desc: t(($) => $['nodes.loop.deleteDesc'], { ns: 'workflow' }),
onConfirm: () => {
loopChildren.forEach((child) => {
handleNodeDelete(child.id)
diff --git a/web/app/components/workflow/nodes/_base/components/title-description-input.tsx b/web/app/components/workflow/nodes/_base/components/title-description-input.tsx
index 47a257377c9..a5d4274fe57 100644
--- a/web/app/components/workflow/nodes/_base/components/title-description-input.tsx
+++ b/web/app/components/workflow/nodes/_base/components/title-description-input.tsx
@@ -52,7 +52,7 @@ export const TitleInput = memo(({ value, onBlur }: TitleInputProps) => {
onChange={handleChange}
onKeyDown={handleKeyDown}
className={`h-7 w-full min-w-0 appearance-none rounded-md border border-transparent bg-transparent px-1 system-xl-semibold text-text-primary outline-hidden focus:shadow-xs focus-visible:ring-1 focus-visible:ring-components-input-border-hover`}
- placeholder={t(($) => $['common.addTitle'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['common.addTitle'], { ns: 'workflow' })}
onBlur={handleBlur}
/>
</div>
@@ -93,7 +93,7 @@ export const DescriptionInput = memo(({ value, onChange, inputRef }: Description
onFocus={handleFocus}
onBlur={handleBlur}
className={`w-full resize-none appearance-none bg-transparent text-xs leading-4.5 text-text-primary caret-[#295EFF] outline-hidden placeholder:text-text-quaternary focus-visible:ring-1 focus-visible:ring-components-input-border-hover`}
- placeholder={t(($) => $['common.addDescription'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['common.addDescription'], { ns: 'workflow' })}
/>
</div>
</div>
diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-popup.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-popup.tsx
index 5ccd346ed57..a51020ae679 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-popup.tsx
+++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-popup.tsx
@@ -44,7 +44,7 @@ const VarReferencePopup: FC<Props> = ({
{(!vars || vars.length === 0) && popupFor ? (
popupFor === 'toAssigned' ? (
<ListEmpty
- title={t(($) => $['variableReference.noAvailableVars'], { ns: 'workflow' }) || ''}
+ title={t(($) => $['variableReference.noAvailableVars'], { ns: 'workflow' })}
description={
<div className="system-xs-regular text-text-tertiary">
{t(($) => $['variableReference.noVarsForOperation'], { ns: 'workflow' })}
@@ -53,7 +53,7 @@ const VarReferencePopup: FC<Props> = ({
/>
) : (
<ListEmpty
- title={t(($) => $['variableReference.noAssignedVars'], { ns: 'workflow' }) || ''}
+ title={t(($) => $['variableReference.noAssignedVars'], { ns: 'workflow' })}
description={
<div className="system-xs-regular text-text-tertiary">
{t(($) => $['variableReference.assignedVarsDescription'], { ns: 'workflow' })}
diff --git a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-input.tsx b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-input.tsx
index abf5c19a653..b104cbb3ec3 100644
--- a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-input.tsx
+++ b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-input.tsx
@@ -30,7 +30,7 @@ const ConditionInput = ({
key={controlPromptEditorRerenderKey}
compact
value={value}
- placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' }) || ''}
+ placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' })}
workflowVariableBlock={{
show: true,
variables: nodesOutputVars || [],
diff --git a/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx b/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx
index 4e3a2458366..7f2538e320b 100644
--- a/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx
+++ b/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx
@@ -138,7 +138,7 @@ const ConditionNumberInput = ({
type="number"
value={value}
onChange={(e) => onValueChange(e.target.value)}
- placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' }) || ''}
+ placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' })}
onFocus={setFocus}
onBlur={setBlur}
/>
diff --git a/web/app/components/workflow/nodes/loop/components/condition-list/condition-input.tsx b/web/app/components/workflow/nodes/loop/components/condition-list/condition-input.tsx
index 6f8f013c5db..60d0216c55d 100644
--- a/web/app/components/workflow/nodes/loop/components/condition-list/condition-input.tsx
+++ b/web/app/components/workflow/nodes/loop/components/condition-list/condition-input.tsx
@@ -24,7 +24,7 @@ const ConditionInput = ({ value, onChange, disabled, availableNodes }: Condition
key={controlPromptEditorRerenderKey}
compact
value={value}
- placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' }) || ''}
+ placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' })}
workflowVariableBlock={{
show: true,
variables: [],
diff --git a/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx b/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx
index 4e3a2458366..7f2538e320b 100644
--- a/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx
+++ b/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx
@@ -138,7 +138,7 @@ const ConditionNumberInput = ({
type="number"
value={value}
onChange={(e) => onValueChange(e.target.value)}
- placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' }) || ''}
+ placeholder={t(($) => $['nodes.ifElse.enterValue'], { ns: 'workflowLogic' })}
onFocus={setFocus}
onBlur={setBlur}
/>
diff --git a/web/app/components/workflow/note-node/index.tsx b/web/app/components/workflow/note-node/index.tsx
index a81b9e4f7ed..841c1c734d5 100644
--- a/web/app/components/workflow/note-node/index.tsx
+++ b/web/app/components/workflow/note-node/index.tsx
@@ -87,7 +87,7 @@ const NoteNode = ({ id, data }: NodeProps<NoteNodeType>) => {
<div className={cn(data.selected && 'nodrag nopan nowheel cursor-text')}>
<NoteEditor
containerElement={ref.current}
- placeholder={t(($) => $['nodes.note.editor.placeholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['nodes.note.editor.placeholder'], { ns: 'workflow' })}
onChange={handleEditorChange}
/>
</div>
diff --git a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx
index 4e477b11395..c22de6c4f81 100644
--- a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx
+++ b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx
@@ -94,7 +94,7 @@ const LinkEditorComponent = ({ containerElement }: LinkEditorComponentProps) =>
if (url) handleSaveLink(url)
}
}}
- placeholder={t(($) => $['nodes.note.editor.enterUrl'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['nodes.note.editor.enterUrl'], { ns: 'workflow' })}
autoFocus
/>
<Button
diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
index 0d20582a259..e4ecd7959e9 100644
--- a/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
+++ b/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
@@ -108,7 +108,7 @@ const ObjectValueItem: FC<Props> = ({ index, list, onChange }) => {
<div className="w-30 border-r border-gray-200">
<input
className="block h-7 w-full appearance-none px-2 system-xs-regular text-text-secondary caret-primary-600 outline-hidden placeholder:system-xs-regular placeholder:text-components-input-text-placeholder hover:bg-state-base-hover focus:bg-components-input-bg-active"
- placeholder={t(($) => $['chatVariable.modal.objectKey'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['chatVariable.modal.objectKey'], { ns: 'workflow' })}
value={list[index].key}
onChange={handleKeyChange(index)}
/>
@@ -127,7 +127,7 @@ const ObjectValueItem: FC<Props> = ({ index, list, onChange }) => {
<div className="relative w-57.5">
<input
className="block h-7 w-full appearance-none px-2 pr-9 system-xs-regular text-text-secondary caret-primary-600 outline-hidden placeholder:system-xs-regular placeholder:text-components-input-text-placeholder hover:bg-state-base-hover focus:bg-components-input-bg-active"
- placeholder={t(($) => $['chatVariable.modal.objectValue'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['chatVariable.modal.objectValue'], { ns: 'workflow' })}
value={list[index].value}
onChange={handleValueChange(index)}
onFocus={() => handleFocusChange()}
diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx
index 35cbbe7376c..0852f8f62a9 100644
--- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx
+++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx
@@ -146,9 +146,7 @@ export const ValueSection = ({
<textarea
className="block h-20 w-full resize-none appearance-none rounded-lg border border-transparent bg-components-input-bg-normal p-2 system-sm-regular text-components-input-text-filled caret-primary-600 outline-hidden placeholder:system-sm-regular placeholder:text-components-input-text-placeholder hover:border-components-input-border-hover hover:bg-components-input-bg-hover focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs"
value={(value as string) || ''}
- placeholder={
- t(($) => $['chatVariable.modal.valuePlaceholder'], { ns: 'workflow' }) || ''
- }
+ placeholder={t(($) => $['chatVariable.modal.valuePlaceholder'], { ns: 'workflow' })}
onChange={(e) => onArrayChange([e.target.value])}
/>
)}
diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx
index 6f59d50f9cb..77b38fa1eec 100644
--- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx
+++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx
@@ -91,7 +91,7 @@ const ChatVariableModal = ({ chatVar, onClose, onSave }: ModalPropsType) => {
name={name}
onBlur={(nextName) => validateVariableName({ name: nextName, notify, t })}
onChange={handleNameChange}
- placeholder={t(($) => $['chatVariable.modal.namePlaceholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['chatVariable.modal.namePlaceholder'], { ns: 'workflow' })}
title={t(($) => $['chatVariable.modal.name'], { ns: 'workflow' })}
/>
<TypeSection
@@ -132,9 +132,7 @@ const ChatVariableModal = ({ chatVar, onClose, onSave }: ModalPropsType) => {
description={description}
maxLength={MAX_DESCRIPTION_LENGTH}
onChange={setDescription}
- placeholder={
- t(($) => $['chatVariable.modal.descriptionPlaceholder'], { ns: 'workflow' }) || ''
- }
+ placeholder={t(($) => $['chatVariable.modal.descriptionPlaceholder'], { ns: 'workflow' })}
title={t(($) => $['chatVariable.modal.description'], { ns: 'workflow' })}
/>
</div>
diff --git a/web/app/components/workflow/panel/env-panel/variable-modal.tsx b/web/app/components/workflow/panel/env-panel/variable-modal.tsx
index 99ed0f328ed..7cb7f54b9eb 100644
--- a/web/app/components/workflow/panel/env-panel/variable-modal.tsx
+++ b/web/app/components/workflow/panel/env-panel/variable-modal.tsx
@@ -233,7 +233,7 @@ const VariableModal = ({ env, onClose, onSave }: ModalPropsType) => {
{t(($) => $['env.modal.name'], { ns: 'workflow' })}
</FieldLabel>
<Input
- placeholder={t(($) => $['env.modal.namePlaceholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['env.modal.namePlaceholder'], { ns: 'workflow' })}
value={name}
onChange={handleVarNameChange}
onBlur={(e) => checkVariableName(e.target.value)}
@@ -262,7 +262,7 @@ const VariableModal = ({ env, onClose, onSave }: ModalPropsType) => {
<Textarea
className="h-20 p-2"
value={typeof value === 'string' || typeof value === 'number' ? value : ''}
- placeholder={t(($) => $['env.modal.valuePlaceholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['env.modal.valuePlaceholder'], { ns: 'workflow' })}
onValueChange={(value) => setValue(value)}
/>
) : (
@@ -287,7 +287,7 @@ const VariableModal = ({ env, onClose, onSave }: ModalPropsType) => {
<Textarea
className="h-20 p-2"
value={description}
- placeholder={t(($) => $['env.modal.descriptionPlaceholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['env.modal.descriptionPlaceholder'], { ns: 'workflow' })}
onValueChange={(value) => setDescription(value)}
/>
</Field>
diff --git a/web/app/components/workflow/variable-inspect/listening.tsx b/web/app/components/workflow/variable-inspect/listening.tsx
index a0b237d6ffc..d64eae54192 100644
--- a/web/app/components/workflow/variable-inspect/listening.tsx
+++ b/web/app/components/workflow/variable-inspect/listening.tsx
@@ -195,11 +195,9 @@ const Listening: FC<ListeningProps> = ({ onStop, message }) => {
render={
<button
type="button"
- aria-label={
- t(($) => $['nodes.triggerWebhook.debugUrlCopy'], {
- ns: 'workflowIntegrations',
- }) || ''
- }
+ aria-label={t(($) => $['nodes.triggerWebhook.debugUrlCopy'], {
+ ns: 'workflowIntegrations',
+ })}
className={`inline-flex items-center rounded-md border border-divider-regular bg-components-badge-white-to-dark px-1.5 py-0.5 font-mono text-[13px] leading-4.5 text-text-secondary transition-colors hover:bg-components-panel-on-panel-item-bg-hover focus:outline-hidden focus-visible:outline-2 focus-visible:outline-components-panel-border focus-visible:outline-solid ${debugUrlCopied ? 'bg-components-panel-on-panel-item-bg-hover text-text-primary' : ''}`}
onClick={() => {
copy(webhookDebugUrl)
diff --git a/web/app/components/workflow/workflow-preview/components/note-node/index.tsx b/web/app/components/workflow/workflow-preview/components/note-node/index.tsx
index 3b65cf5d647..4e11409bac1 100644
--- a/web/app/components/workflow/workflow-preview/components/note-node/index.tsx
+++ b/web/app/components/workflow/workflow-preview/components/note-node/index.tsx
@@ -36,7 +36,7 @@ const NoteNode = ({ data }: NodeProps<NoteNodeType>) => {
<div className={cn(data.selected && 'nodrag nopan nowheel cursor-text')}>
<NoteEditor
containerElement={ref.current}
- placeholder={t(($) => $['nodes.note.editor.placeholder'], { ns: 'workflow' }) || ''}
+ placeholder={t(($) => $['nodes.note.editor.placeholder'], { ns: 'workflow' })}
/>
</div>
</div>
diff --git a/web/app/forgot-password/ChangePasswordForm.tsx b/web/app/forgot-password/ChangePasswordForm.tsx
index 576482406a8..3ae86bd56f2 100644
--- a/web/app/forgot-password/ChangePasswordForm.tsx
+++ b/web/app/forgot-password/ChangePasswordForm.tsx
@@ -144,7 +144,7 @@ const ChangePasswordForm = () => {
if (confirmPasswordRef.current?.value)
formActionsRef.current?.validate('confirmPassword')
}}
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
@@ -189,7 +189,7 @@ const ChangePasswordForm = () => {
required
autoComplete="new-password"
ref={confirmPasswordRef}
- placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/app/forgot-password/ForgotPasswordForm.tsx b/web/app/forgot-password/ForgotPasswordForm.tsx
index 0c189a55469..332e0999127 100644
--- a/web/app/forgot-password/ForgotPasswordForm.tsx
+++ b/web/app/forgot-password/ForgotPasswordForm.tsx
@@ -97,7 +97,7 @@ const ForgotPasswordForm = () => {
autoComplete="email"
spellCheck={false}
required
- placeholder={t(($) => $.emailPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.emailPlaceholder, { ns: 'login' })}
/>
<FieldError>{t(($) => $['error.emailInValid'], { ns: 'login' })}</FieldError>
</Field>
diff --git a/web/app/install/installForm.tsx b/web/app/install/installForm.tsx
index e7ef582a23a..638196a4b23 100644
--- a/web/app/install/installForm.tsx
+++ b/web/app/install/installForm.tsx
@@ -156,7 +156,7 @@ const InstallForm = () => {
autoComplete="email"
spellCheck={false}
required
- placeholder={t(($) => $.emailPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.emailPlaceholder, { ns: 'login' })}
/>
<FieldError>{t(($) => $['error.emailInValid'], { ns: 'login' })}</FieldError>
</Field>
@@ -175,7 +175,7 @@ const InstallForm = () => {
autoComplete="name"
required
maxLength={30}
- placeholder={t(($) => $.namePlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.namePlaceholder, { ns: 'login' })}
/>
<FieldError>{t(($) => $['error.nameEmpty'], { ns: 'login' })}</FieldError>
</Field>
@@ -195,7 +195,7 @@ const InstallForm = () => {
autoComplete="new-password"
required
minLength={8}
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/app/reset-password/set-password/page.tsx b/web/app/reset-password/set-password/page.tsx
index 5da3554dfbb..7b51daecb1f 100644
--- a/web/app/reset-password/set-password/page.tsx
+++ b/web/app/reset-password/set-password/page.tsx
@@ -137,7 +137,7 @@ const ChangePasswordForm = () => {
if (confirmPasswordRef.current?.value)
formActionsRef.current?.validate('confirmPassword')
}}
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
@@ -182,7 +182,7 @@ const ChangePasswordForm = () => {
required
autoComplete="new-password"
ref={confirmPasswordRef}
- placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/app/signin/components/mail-and-password-auth.tsx b/web/app/signin/components/mail-and-password-auth.tsx
index 126328356ba..24f125435eb 100644
--- a/web/app/signin/components/mail-and-password-auth.tsx
+++ b/web/app/signin/components/mail-and-password-auth.tsx
@@ -102,7 +102,7 @@ export default function MailAndPasswordAuth({ isInvite, isEmailSetup }: MailAndP
required
autoComplete="email"
spellCheck={false}
- placeholder={t(($) => $.emailPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.emailPlaceholder, { ns: 'login' })}
/>
<FieldError>
{t(($) => $[email ? 'error.emailInValid' : 'error.emailEmpty'], { ns: 'login' })}
@@ -117,7 +117,7 @@ export default function MailAndPasswordAuth({ isInvite, isEmailSetup }: MailAndP
onValueChange={setPassword}
required
autoComplete="current-password"
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/app/signin/invite-settings/page.tsx b/web/app/signin/invite-settings/page.tsx
index faa58316540..9cf8176757b 100644
--- a/web/app/signin/invite-settings/page.tsx
+++ b/web/app/signin/invite-settings/page.tsx
@@ -247,7 +247,7 @@ export default function InviteSettingsPage() {
required
value={name}
onValueChange={setName}
- placeholder={t(($) => $.namePlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.namePlaceholder, { ns: 'login' })}
/>
<FieldError>{t(($) => $.enterYourName, { ns: 'login' })}</FieldError>
</Field>
diff --git a/web/app/signin/one-more-step.tsx b/web/app/signin/one-more-step.tsx
index bd346d423a9..6e046ef9b8f 100644
--- a/web/app/signin/one-more-step.tsx
+++ b/web/app/signin/one-more-step.tsx
@@ -162,7 +162,7 @@ const OneMoreStep = () => {
<Input
value={state.invitation_code}
type="text"
- placeholder={t(($) => $.invitationCodePlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.invitationCodePlaceholder, { ns: 'login' })}
onValueChange={(value) => dispatch({ type: 'invitation_code', value })}
/>
</Field>
diff --git a/web/app/signup/components/input-mail.tsx b/web/app/signup/components/input-mail.tsx
index a6a285b9ad5..dc4c6a65e16 100644
--- a/web/app/signup/components/input-mail.tsx
+++ b/web/app/signup/components/input-mail.tsx
@@ -57,7 +57,7 @@ export default function SignupEmailForm({ onSuccess }: Props) {
required
autoComplete="email"
spellCheck={false}
- placeholder={t(($) => $.emailPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.emailPlaceholder, { ns: 'login' })}
/>
<FieldValidity>
{({ validity }) => (
diff --git a/web/app/signup/set-password/page.tsx b/web/app/signup/set-password/page.tsx
index 999ee60e923..c6af1249c84 100644
--- a/web/app/signup/set-password/page.tsx
+++ b/web/app/signup/set-password/page.tsx
@@ -145,7 +145,7 @@ const ChangePasswordForm = () => {
if (confirmPasswordRef.current?.value)
formActionsRef.current?.validate('confirmPassword')
}}
- placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.passwordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
@@ -188,7 +188,7 @@ const ChangePasswordForm = () => {
required
autoComplete="new-password"
ref={confirmPasswordRef}
- placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' }) || ''}
+ placeholder={t(($) => $.confirmPasswordPlaceholder, { ns: 'login' })}
/>
<PasswordFieldToggle aria-label={t(($) => $.showPassword, { ns: 'login' })} />
</PasswordField>
diff --git a/web/features/tag-management/components/tag-management-modal.tsx b/web/features/tag-management/components/tag-management-modal.tsx
index 3e07fca5eec..d2df570a63f 100644
--- a/web/features/tag-management/components/tag-management-modal.tsx
+++ b/web/features/tag-management/components/tag-management-modal.tsx
@@ -89,9 +89,9 @@ export const TagManagementModal = ({
</DialogHeader>
<DialogBody className="flex flex-wrap gap-2">
<input
- aria-label={t(($) => $['tag.addNew'], { ns: 'common' }) || ''}
+ aria-label={t(($) => $['tag.addNew'], { ns: 'common' })}
className="w-25 shrink-0 appearance-none rounded-lg border border-dashed border-divider-regular bg-transparent px-2 py-1 text-sm/5 text-text-secondary caret-primary-600 outline-hidden placeholder:text-text-quaternary focus:border-solid"
- placeholder={t(($) => $['tag.addNew'], { ns: 'common' }) || ''}
+ placeholder={t(($) => $['tag.addNew'], { ns: 'common' })}
value={name}
readOnly={createTagMutation.isPending}
onChange={(e) => setName(e.target.value)}
diff --git a/web/features/tag-management/components/tag-search-content.tsx b/web/features/tag-management/components/tag-search-content.tsx
index 9a28d2b1655..cd16d76c172 100644
--- a/web/features/tag-management/components/tag-search-content.tsx
+++ b/web/features/tag-management/components/tag-search-content.tsx
@@ -44,7 +44,7 @@ export const TagSearchContentView = ({
const canChangeBindings = requiresTargetEditPermission
? canBindOrUnbindTags
: canBindOrUnbindTags || canManageTags
- const placeholder = t(($) => $['tag.selectorPlaceholder'], { ns: 'common' }) || ''
+ const placeholder = t(($) => $['tag.selectorPlaceholder'], { ns: 'common' })
return (
<>