Skip to content

Commit 5f6e1e1

Browse files
authored
Include identifiers when searching in Pontoon (#1040)
1 parent c0671bd commit 5f6e1e1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

app/classes/Transvision/ShowResults.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public static function getEditLink($tool, $repo, $key, $text, $locale)
373373
}
374374
}
375375

376-
$edit_link = "https://pontoon.mozilla.org/{$locale}/{$project_name}/{$resource_path}?search={$search_key}";
376+
$edit_link = "https://pontoon.mozilla.org/{$locale}/{$project_name}/{$resource_path}?search_identifiers=true&search_translations_only=true&search={$search_key}";
377377

378378
return "&nbsp;<a class='edit_link' target='_blank' href='{$edit_link}'>&lt;edit in {$tool_name}&gt;</a>";
379379
}

tests/units/Transvision/ShowResults.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -458,31 +458,31 @@ public function getEditLinkDP()
458458
'browser/chrome/browser/browser.properties:webextPerms.hostDescription.allUrls',
459459
'test',
460460
'fr',
461-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/firefox/browser/chrome/browser/browser.properties?search=webextPerms.hostDescription.allUrls'>&lt;edit in Pontoon&gt;</a>",
461+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/firefox/browser/chrome/browser/browser.properties?search_identifiers=true&search_translations_only=true&search=webextPerms.hostDescription.allUrls'>&lt;edit in Pontoon&gt;</a>",
462462
],
463463
[
464464
'pontoon',
465465
'comm_l10n',
466466
'calendar/chrome/calendar/calendar.dtd:calendar.calendar.label',
467467
'test',
468468
'fr',
469-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird/calendar/chrome/calendar/calendar.dtd?search=calendar.calendar.label'>&lt;edit in Pontoon&gt;</a>",
469+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird/calendar/chrome/calendar/calendar.dtd?search_identifiers=true&search_translations_only=true&search=calendar.calendar.label'>&lt;edit in Pontoon&gt;</a>",
470470
],
471471
[
472472
'pontoon',
473473
'comm_l10n',
474474
'chat/commands.properties:dnd',
475475
'test',
476476
'fr',
477-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird/chat/commands.properties?search=dnd'>&lt;edit in Pontoon&gt;</a>",
477+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/thunderbird/chat/commands.properties?search_identifiers=true&search_translations_only=true&search=dnd'>&lt;edit in Pontoon&gt;</a>",
478478
],
479479
[
480480
'pontoon',
481481
'gecko_strings',
482482
'browser/browser/preferences/main.ftl:default-content-process-count.label',
483483
'test',
484484
'fr',
485-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/firefox/browser/browser/preferences/main.ftl?search=default-content-process-count'>&lt;edit in Pontoon&gt;</a>",
485+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/fr/firefox/browser/browser/preferences/main.ftl?search_identifiers=true&search_translations_only=true&search=default-content-process-count'>&lt;edit in Pontoon&gt;</a>",
486486
],
487487
[
488488
'pontoon',
@@ -498,39 +498,39 @@ public function getEditLinkDP()
498498
'mail/chrome/messenger/addressbook/abContactsPanel.dtd:ccButton.label',
499499
'test',
500500
'de',
501-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/de/thunderbird/mail/chrome/messenger/addressbook/abContactsPanel.dtd?search=ccButton.label'>&lt;edit in Pontoon&gt;</a>",
501+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/de/thunderbird/mail/chrome/messenger/addressbook/abContactsPanel.dtd?search_identifiers=true&search_translations_only=true&search=ccButton.label'>&lt;edit in Pontoon&gt;</a>",
502502
],
503503
[
504504
'pontoon',
505505
'comm_l10n',
506506
'suite/chrome/browser/taskbar.properties:taskbar.tasks.composeMessage.description',
507507
'test',
508508
'it',
509-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/seamonkey/suite/chrome/browser/taskbar.properties?search=taskbar.tasks.composeMessage.description'>&lt;edit in Pontoon&gt;</a>",
509+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/seamonkey/suite/chrome/browser/taskbar.properties?search_identifiers=true&search_translations_only=true&search=taskbar.tasks.composeMessage.description'>&lt;edit in Pontoon&gt;</a>",
510510
],
511511
[
512512
'pontoon',
513513
'mozilla_org',
514514
'mozilla_org/en/banners/firefox-mobile.ftl:banner-firefox-mobile-get-android-title',
515515
'test',
516516
'it',
517-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/mozillaorg/en/banners/firefox-mobile.ftl?search=banner-firefox-mobile-get-android-title'>&lt;edit in Pontoon&gt;</a>",
517+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/mozillaorg/en/banners/firefox-mobile.ftl?search_identifiers=true&search_translations_only=true&search=banner-firefox-mobile-get-android-title'>&lt;edit in Pontoon&gt;</a>",
518518
],
519519
[
520520
'pontoon',
521521
'android_l10n',
522522
'android_l10n/mozilla-mobile/fenix/app/src/main/res/values/strings.xml:preference_experiments',
523523
'test',
524524
'it',
525-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/firefox-for-android/mozilla-mobile/fenix/app/src/main/res/values/strings.xml?search=preference_experiments'>&lt;edit in Pontoon&gt;</a>",
525+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/firefox-for-android/mozilla-mobile/fenix/app/src/main/res/values/strings.xml?search_identifiers=true&search_translations_only=true&search=preference_experiments'>&lt;edit in Pontoon&gt;</a>",
526526
],
527527
[
528528
'pontoon',
529529
'firefox_ios',
530530
'firefox_ios/firefox-ios.xliff:4e0bc9d4',
531531
'test',
532532
'it',
533-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/firefox-for-ios/firefox-ios.xliff?search=test'>&lt;edit in Pontoon&gt;</a>",
533+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/firefox-for-ios/firefox-ios.xliff?search_identifiers=true&search_translations_only=true&search=test'>&lt;edit in Pontoon&gt;</a>",
534534
],
535535
[
536536
'pontoon',
@@ -555,7 +555,7 @@ public function getEditLinkDP()
555555
'firefox_ios/firefox-ios.xliff:4e0bc9d4',
556556
'%(test)',
557557
'it',
558-
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/firefox-for-ios/firefox-ios.xliff?search=%25%28test%29'>&lt;edit in Pontoon&gt;</a>",
558+
"&nbsp;<a class='edit_link' target='_blank' href='https://pontoon.mozilla.org/it/firefox-for-ios/firefox-ios.xliff?search_identifiers=true&search_translations_only=true&search=%25%28test%29'>&lt;edit in Pontoon&gt;</a>",
559559
],
560560
// Test unknown tool
561561
[

0 commit comments

Comments
 (0)