@@ -41,7 +41,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
4141 <span class =" profile-fields-personal__readonly-text" >{{ resolvedDisplayValue(field) }}</span >
4242 <NcPopover placement =" bottom" :triggers =" ['hover', 'focus']" :popover-triggers =" ['hover']" no-focus-trap >
4343 <template #trigger =" { attrs } " >
44- <span v-bind =" attrs" class =" profile-fields-personal__info-trigger" :aria-label =" t('profile_fields', '{fieldLabel}: managed by your administrator', { fieldLabel: field.definition.label } )" >
44+ <span v-bind =" attrs" class =" profile-fields-personal__info-trigger" :aria-label =" managedByAdminAriaLabel( field.definition.label)" >
4545 <NcIconSvgWrapper :path =" mdiInformationOutline" :size =" 14" />
4646 </span >
4747 </template >
@@ -57,7 +57,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
5757 <label :for =" field.can_edit ? fieldInputId(field.definition.id) : undefined" >{{ field.definition.label }}</label >
5858 <NcPopover v-if =" !embedded && !field.can_edit" placement =" end" :triggers =" ['hover', 'focus']" :popover-triggers =" ['hover']" no-focus-trap >
5959 <template #trigger =" { attrs } " >
60- <span v-bind =" attrs" class =" profile-fields-personal__chip-trigger" :aria-label =" t('profile_fields', 'Read-only field')" >
60+ <span v-bind =" attrs" class =" profile-fields-personal__chip-trigger" :aria-label =" t('profile_fields', 'Read-only field value ')" >
6161 <span class =" profile-fields-personal__readonly-indicator" aria-hidden =" true" >
6262 <NcIconSvgWrapper :path =" mdiLockOutline" :size =" 12" />
6363 </span >
@@ -105,7 +105,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
105105 </span >
106106
107107 <div v-if =" !embedded" class =" profile-fields-personal__embedded-toolbar" >
108- <label class =" profile-fields-personal__embedded-visibility-label" :for =" `profile-fields-personal-visibility-${field.definition.id}`" >{{ t('profile_fields', 'Who can see this') }}</label >
108+ <label class =" profile-fields-personal__embedded-visibility-label" :for =" `profile-fields-personal-visibility-${field.definition.id}`" >{{ visibilityFieldLabel }}</label >
109109 <NcSelect
110110 :input-id =" `profile-fields-personal-visibility-${field.definition.id}`"
111111 class =" profile-fields-personal__visibility-select"
@@ -228,6 +228,10 @@ const inputModeForType = (type: FieldType): 'text' | 'decimal' => {
228228 return inputModesByType [type ]
229229}
230230
231+ const visibilityFieldLabel = t (' profile_fields' , ' Who can view this field value' )
232+ // TRANSLATORS "{fieldLabel}" is replaced with a profile field label such as "Department".
233+ const managedByAdminAriaLabel = (fieldLabel : string ) => t (' profile_fields' , ' {fieldLabel}: managed by your administrator' , { fieldLabel })
234+
231235const fieldInputId = (fieldId : number ) => ` profile-fields-personal-value-${fieldId } `
232236
233237const componentInputTypesByType: Record <FieldType , ' text' | ' number' > = {
@@ -281,6 +285,7 @@ const isSaved = (fieldId: number) => successIds.value.includes(fieldId)
281285const fieldHasError = (fieldId : number ) => Boolean (fieldErrors [fieldId ])
282286const fieldHelperText = (fieldId : number ) => fieldErrors [fieldId ] ?? ' '
283287const fieldSaveSucceeded = (fieldId : number ) => isSaved (fieldId ) && ! fieldHasError (fieldId )
288+ // TRANSLATORS "{fieldLabel}" is replaced with a profile field label shown in the settings form.
284289const visibilityInputLabel = (fieldLabel : string ) => t (' profile_fields' , ' Visibility for {fieldLabel}' , { fieldLabel })
285290const fieldSaveState = (fieldId : number ) => {
286291 if (fieldHasError (fieldId )) {
@@ -302,17 +307,20 @@ const currentDraftValue = (field: EditableField) => draftValues[field.definition
302307const autosaveAnnouncement = (field : EditableField ) => {
303308 const fieldId = field .definition .id
304309 if (fieldHasError (fieldId )) {
310+ // TRANSLATORS "{fieldLabel}" is the field label and "{message}" is a validation or API error message.
305311 return t (' profile_fields' , ' {fieldLabel}: {message}' , {
306312 fieldLabel: field .definition .label ,
307313 message: fieldHelperText (fieldId ),
308314 })
309315 }
310316
311317 if (fieldSaveSucceeded (fieldId )) {
318+ // TRANSLATORS "{fieldLabel}" is the field label that was saved.
312319 return t (' profile_fields' , ' {fieldLabel} saved.' , { fieldLabel: field .definition .label })
313320 }
314321
315322 if (isSaving (fieldId )) {
323+ // TRANSLATORS "{fieldLabel}" is the field label currently being saved.
316324 return t (' profile_fields' , ' Saving {fieldLabel}.' , { fieldLabel: field .definition .label })
317325 }
318326
@@ -340,7 +348,7 @@ const currentStoredValue = (field: EditableField) => {
340348
341349const resolvedDisplayValue = (field : EditableField ) => {
342350 const value = currentStoredValue (field ) || draftValues [field .definition .id ] || ' '
343- return value === ' ' ? t (' profile_fields' , ' Not set' ) : value
351+ return value === ' ' ? t (' profile_fields' , ' No value set' ) : value
344352}
345353
346354const findField = (fieldId : number ) => fields .value .find ((field : EditableField ) => field .definition .id === fieldId )
0 commit comments