From 3fabb33fc5bf5ff2ea13eadf7c2a7d2e5acd2f49 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 13 May 2024 15:35:52 +0300 Subject: [PATCH] Refactor #5715 --- components/lib/config/PrimeVue.d.ts | 2 +- components/lib/config/PrimeVue.js | 2 +- components/lib/fileupload/FileUpload.vue | 6 +++--- doc/configuration/locale/LocaleApiDoc.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/lib/config/PrimeVue.d.ts b/components/lib/config/PrimeVue.d.ts index cdfd259e9..740ae44a7 100644 --- a/components/lib/config/PrimeVue.d.ts +++ b/components/lib/config/PrimeVue.d.ts @@ -393,7 +393,7 @@ export interface PrimeVueLocaleOptions { emptySearchMessage?: string; emptyMessage?: string; fileChosenMessage?: string; - emptyFileChosenMessage?: string; + noFileChosenMessage?: string; aria?: PrimeVueLocaleAriaOptions; } diff --git a/components/lib/config/PrimeVue.js b/components/lib/config/PrimeVue.js index c03feb622..937c651b1 100644 --- a/components/lib/config/PrimeVue.js +++ b/components/lib/config/PrimeVue.js @@ -73,7 +73,7 @@ export const defaultOptions = { emptySelectionMessage: 'No selected item', emptySearchMessage: 'No results found', fileChosenMessage: '{0} files', - emptyFileChosenMessage: 'No file chosen', + noFileChosenMessage: 'No file chosen', emptyMessage: 'No available options', aria: { trueLabel: 'True', diff --git a/components/lib/fileupload/FileUpload.vue b/components/lib/fileupload/FileUpload.vue index 40fc4ae92..7cd1509e1 100755 --- a/components/lib/fileupload/FileUpload.vue +++ b/components/lib/fileupload/FileUpload.vue @@ -56,7 +56,7 @@ - {{ basicChooseButtonLabel }} + {{ basicFileChosenLabel }} @@ -379,7 +379,7 @@ export default { chooseButtonClass() { return [this.cx('pcChooseButton'), this.class]; }, - basicChooseButtonLabel() { + basicFileChosenLabel() { if (this.auto) return this.chooseButtonLabel; else if (this.hasFiles) { if (this.files && this.files.length === 1) return this.files[0].name; @@ -387,7 +387,7 @@ export default { return this.$primevue.config.locale?.fileChosenMessage?.replace('{0}', this.files.length); } - return this.$primevue.config.locale?.emptyFileChosenMessage || ''; + return this.$primevue.config.locale?.noFileChosenMessage || ''; }, hasFiles() { return this.files && this.files.length > 0; diff --git a/doc/configuration/locale/LocaleApiDoc.vue b/doc/configuration/locale/LocaleApiDoc.vue index dba651223..e1079a629 100644 --- a/doc/configuration/locale/LocaleApiDoc.vue +++ b/doc/configuration/locale/LocaleApiDoc.vue @@ -277,7 +277,7 @@ {0} files - emptyFileChosenMessage + noFileChosenMessage No file chosen