@@ -32,10 +32,10 @@ export const sortContacts = contacts => contacts.sort(sortLastNameFirst)
32
32
* @returns {string } header
33
33
*/
34
34
const makeHeader = ( contact , t ) => {
35
- if ( contact . me ) return t ( 'me' )
35
+ if ( contact . me ) return t ( 'ContactsList. me' )
36
36
37
37
const name = buildLastNameFirst ( contact )
38
- return name [ 0 ] || t ( 'empty' )
38
+ return name [ 0 ] || t ( 'ContactsList. empty' )
39
39
}
40
40
41
41
/**
@@ -45,8 +45,8 @@ const makeHeader = (contact, t) => {
45
45
* @returns {string } header
46
46
*/
47
47
const makeHeaderForIndexedContacts = ( contact , t ) => {
48
- if ( contact . me ) return t ( 'me' )
49
- if ( contact . cozyMetadata ?. favorite ) return t ( 'favorite' )
48
+ if ( contact . me ) return t ( 'ContactsList. me' )
49
+ if ( contact . cozyMetadata ?. favorite ) return t ( 'ContactsList. favorite' )
50
50
51
51
const index = get ( contact , 'indexes.byFamilyNameGivenNameEmailCozyUrl' , '' )
52
52
const hasIndex = index !== null && index . length > 0
@@ -58,7 +58,7 @@ const makeHeaderForIndexedContacts = (contact, t) => {
58
58
return firstLetterWithoutAccent
59
59
}
60
60
61
- return t ( 'empty' )
61
+ return t ( 'ContactsList. empty' )
62
62
}
63
63
64
64
/**
@@ -89,7 +89,8 @@ export const categorizeContacts = (contacts, t) =>
89
89
export const sortHeaders = ( categorized , t ) => {
90
90
const headers = Object . keys ( categorized )
91
91
const notEmptyAndMyselfHeaders = headers . filter (
92
- header => header !== t ( 'empty' ) && header !== t ( 'me' )
92
+ header =>
93
+ header !== t ( 'ContactsList.empty' ) && header !== t ( 'ContactsList.me' )
93
94
)
94
95
const notEmptyAndMyselfSorted = notEmptyAndMyselfHeaders . slice ( ) . sort ( )
95
96
@@ -98,11 +99,11 @@ export const sortHeaders = (categorized, t) => {
98
99
}
99
100
100
101
const headersSorted = [ ]
101
- if ( headers . includes ( t ( 'me' ) ) ) {
102
- headersSorted . push ( t ( 'me' ) )
102
+ if ( headers . includes ( t ( 'ContactsList. me' ) ) ) {
103
+ headersSorted . push ( t ( 'ContactsList. me' ) )
103
104
}
104
- if ( headers . includes ( t ( 'empty' ) ) ) {
105
- headersSorted . push ( t ( 'empty' ) )
105
+ if ( headers . includes ( t ( 'ContactsList. empty' ) ) ) {
106
+ headersSorted . push ( t ( 'ContactsList. empty' ) )
106
107
}
107
108
108
109
return headersSorted . concat ( notEmptyAndMyselfSorted )
0 commit comments