@@ -162,7 +162,7 @@ public static function getRepositorySearchResults($entities, $array_strings)
162162
163163 foreach ($ search_results as $ entity => $ set ) {
164164 // We only want results for which we have a translation
165- if ($ set [1 ]) {
165+ if ($ set [1 ] != ' @@missing@@ ' ) {
166166 $ output [$ entity ] = [
167167 $ clean_string ($ set [0 ]) => $ clean_string ($ set [1 ]),
168168 ];
@@ -181,9 +181,9 @@ public static function getRepositorySearchResults($entities, $array_strings)
181181 */
182182 public static function getStringFromEntity ($ entity , $ strings )
183183 {
184- return isset ($ strings [$ entity ]) && $ strings [ $ entity ] != ''
184+ return isset ($ strings [$ entity ])
185185 ? $ strings [$ entity ]
186- : false ;
186+ : ' @@missing@@ ' ;
187187 }
188188
189189 /**
@@ -380,17 +380,21 @@ public static function resultsTable($search_object, $search_results, $page)
380380 }
381381
382382 // If there is no target_string, display an error, otherwise display the string + meta links
383- if (! $ target_string ) {
383+ if ($ target_string == ' @@missing@@ ' ) {
384384 $ target_string = '<em class="error">Warning: Missing string</em> ' ;
385+ } elseif (! $ target_string ) {
386+ $ target_string = '<em class="error">Warning: Empty string</em> ' ;
385387 } else {
386388 $ meta_target = "
387389 <span class='clipboard' data-clipboard-target='# {$ clipboard_target_string }' alt='Copy to clipboard'><img src='/img/copy_icon_black_18x18.png'></span>
388390 {$ error_message }" ;
389391 }
390392
391393 // If there is no target_string2, display an error, otherwise display the string + meta links
392- if (! $ target_string2 ) {
394+ if ($ target_string2 == ' @@missing@@ ' ) {
393395 $ target_string2 = '<em class="error">Warning: Missing string</em> ' ;
396+ } elseif (! $ target_string2 ) {
397+ $ target_string2 = '<em class="error">Warning: Empty string</em> ' ;
394398 } else {
395399 $ meta_target2 = "<span class='clipboard' data-clipboard-target='# {$ clipboard_target_string2 }' alt='Copy to clipboard'><img src='/img/copy_icon_black_18x18.png'></span> " ;
396400 }
0 commit comments