Skip to content

Commit

Permalink
VPN: fix links to source file when showing results for all projects (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
flodolo authored Sep 19, 2024
1 parent 01f2366 commit bbe3bd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/classes/Transvision/VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ public static function gitPath($locale, $repo, $path)

return "https://github.com/{$git_repo}/blob/{$git_branch}/{$file_path}";
}
if ($repo == 'vpn_client') {
if ($locale == 'en_US') {
$locale = 'en';
}

return "https://github.com/{$git_repo}/blob/{$git_branch}/{$locale}/{$file_path}";
}
} else {
$file_path = $path;
$git_repo = $repo;
Expand Down
6 changes: 6 additions & 0 deletions tests/units/Transvision/VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ public function getPathDP()
'vpn_client/mozillavpn.xliff.xliff:0f4d892c',
'https://github.com/mozilla-l10n/mozilla-vpn-client-l10n/blob/main/sv_SE/mozillavpn.xliff.xliff',
],
[
'en-US',
'vpn_client',
'vpn_client/mozillavpn.xliff.xliff:0f4d892c',
'https://github.com/mozilla-l10n/mozilla-vpn-client-l10n/blob/main/en/mozillavpn.xliff.xliff',
],
];
}

Expand Down

0 comments on commit bbe3bd1

Please sign in to comment.