@@ -250,6 +250,9 @@ public static function resultsTable($search_object, $search_results, $page)
250250
251251 $ extra_column_header = '' ;
252252
253+ // Get the tool used to edit strings for the target locale
254+ $ toolUsedByTargetLocale = Project::getLocaleTool ($ locale2 );
255+
253256 if ($ extra_locale ) {
254257 $ locale3 = $ search_object ->getLocale ('extra ' );
255258 $ direction3 = RTLSupport::getDirection ($ locale3 );
@@ -285,6 +288,7 @@ public static function resultsTable($search_object, $search_results, $page)
285288 }
286289
287290 $ component = explode ('/ ' , $ key )[0 ];
291+ $ fileAndRawString = explode (': ' , $ key );
288292 $ source_string = trim ($ strings [0 ]);
289293 $ target_string = trim ($ strings [1 ]);
290294
@@ -321,6 +325,13 @@ public static function resultsTable($search_object, $search_results, $page)
321325 if we aren't in the 3locales view and if we have a $target_string
322326 */
323327 $ transliterate = $ locale2 == 'sr ' && ! $ extra_locale && $ target_string && $ target_string != '@@missing@@ ' ;
328+ if ($ current_repo == 'aurora ' && $ toolUsedByTargetLocale == 'locamotion ' ) {
329+ $ edit_link = "https://mozilla.locamotion.org/ {$ locale2 }/firefox/translate/ {$ fileAndRawString [0 ]}.po#search= {$ fileAndRawString [1 ]}&sfields=locations " ;
330+ $ edit_message = 'edit in Pootle ' ;
331+ } elseif ($ current_repo == 'aurora ' && $ toolUsedByTargetLocale == 'pontoon ' ) {
332+ $ edit_link = "https://pontoon.mozilla.org/ {$ locale2 }/firefox-aurora/ {$ fileAndRawString [0 ]}?search= {$ fileAndRawString [1 ]}" ;
333+ $ edit_message = 'edit in Pontoon ' ;
334+ }
324335
325336 if ($ transliterate ) {
326337 $ transliterated_string = self ::getTransliteratedString (urlencode ($ target_string ), 'sr-Cyrl ' );
@@ -479,7 +490,15 @@ public static function resultsTable($search_object, $search_results, $page)
479490 <div dir='ltr' class='result_meta_link'>
480491 <a class='source_link' href=' {$ locale2_path }'>
481492 <source>
482- </a>
493+ </a> " ;
494+ if (isset ($ edit_link )) {
495+ $ table .= "
496+
497+ <a class='edit_link' target='_blank' href=' {$ edit_link }'>
498+ < {$ edit_message }>
499+ </a> " ;
500+ }
501+ $ table .= "
483502
484503 <a class='bug_link' target='_blank' href=' {$ bz_link [0 ]}'>
485504 <report a bug>
0 commit comments