pontoon
pontoon copied to clipboard
Linkify PO file occurences to source repository
This issue was created automatically by a script.
Bug 1501561
Bug Reporter: @mathjazz CC: @upwinxp
PO strings often come with a list of occurences in the source code.
Take a look at this string for example: https://pontoon.mozilla.org/sl/amo-frontend/LC_MESSAGES/amo.po/?string=192062
In the source string panel, you'll find an occurence presented as: #: src/amo/components/AddonTitle/index.js:39
It would be convenient if we could link the occurence to the repository: https://github.com/mozilla/addons-frontend/blob/master/src/amo/components/AddonTitle/index.js#L39
The url could be generated like this:
url = project.source_repository.website + '/blob/master/' + entity.source[i][0] + '#L' + entity.source[i][1];
Caveats:
- some projects use L10n-only repos
- /blob/master/ is probably a Github-specific path