Skip to content

Commit b4ae1a9

Browse files
committed
Provide a way to go back to search from onestring view
1 parent e2fceec commit b4ae1a9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/views/onestring.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@
2323
<tr>
2424
<th>Locale</th>
2525
<th>Translation</th>
26+
<th>&nbsp;</th>
2627
</tr>
2728
<?php
29+
$reference_locale = Project::getReferenceLocale($repo);
2830
foreach ($translations as $locale => $translation) {
2931
$rtl_support = RTLSupport::isRTL($locale) ? 'dir="rtl"' : '';
32+
$search_link = "/?sourcelocale={$reference_locale}&locale={$locale}&repo={$repo}&search_type=entities&recherche={$entity}&perfect_match=perfect_match";
3033
echo "<tr id='{$locale}''>\n" .
3134
" <th><a href='#{$locale}'>{$locale}</a></th>\n" .
3235
" <td lang='#{$locale}' {$rtl_support} >" . Utils::secureText($translation) . "</td>\n" .
36+
" <td><a class='onestring_search' href='{$search_link}' title='Search for the entity in this locale'>🔍</a></td>\n" .
3337
"</tr>\n";
3438
}
3539
?>

web/style/transvision.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,16 @@ td {
267267
display: none;
268268
}
269269

270+
td a.onestring_search {
271+
display: block;
272+
margin: 0 auto;
273+
padding: 0 4px;
274+
}
275+
276+
td a.onestring_search:hover {
277+
text-decoration: none;
278+
}
279+
270280
td a em,
271281
td em.error {
272282
font-style: normal;

0 commit comments

Comments
 (0)