@@ -117,14 +117,28 @@ class Contractors extends Component {
117117 }
118118
119119 render ( ) {
120- let description = ''
121120 const con_count = this . state . contractor_response && this . state . contractor_response . count
122- if ( con_count && this . state . selected_subject ) {
123- const msg_id_suffix = con_count === 1 ? 'single' : 'plural'
124- description = this . props . root . get_text ( 'subject_filter_summary_' + msg_id_suffix , {
125- count : con_count ,
126- subject : this . state . selected_subject . name ,
127- } )
121+ const location_pretty = (
122+ this . state . contractor_response &&
123+ this . state . contractor_response . location &&
124+ this . state . contractor_response . location . pretty
125+ )
126+
127+ let description = ''
128+ if ( con_count ) {
129+ const description_prefix = [ ]
130+ if ( location_pretty ) {
131+ description_prefix . push ( location_pretty )
132+ }
133+ if ( this . state . selected_subject ) {
134+ description_prefix . push ( this . state . selected_subject . name )
135+ }
136+ if ( description_prefix . length > 0 ) {
137+ description = this . props . root . get_text ( 'filter_summary_' + ( con_count === 1 ? 'single' : 'plural' ) , {
138+ count : con_count ,
139+ prefix : description_prefix . join ( '; ' ) ,
140+ } )
141+ }
128142 }
129143 const DisplayComponent = this . props . config . mode === 'grid' ? Grid : List
130144 return (
@@ -152,7 +166,9 @@ class Contractors extends Component {
152166 root = { this . props . root } />
153167 < If v = { this . state . contractor_response && this . state . contractor_response . count === 0 } >
154168 < div className = "tcs-no-contractors" >
155- { this . props . root . get_text ( this . state . location_str === null ? 'no_tutors_found' : 'no_tutors_found_loc' ) }
169+ { this . props . root . get_text (
170+ this . state . location_str === null ? 'no_tutors_found' : 'no_tutors_found_loc' , { location_pretty}
171+ ) }
156172 </ div >
157173 </ If >
158174
0 commit comments