1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Suppress diffs for translation files by default (#13537)

In feature branches, it is very common to make ancillary changes to
translation files. For instance, a key may be no longer in use, so in
order to satisfy CI, it must be removed across all translation files.
These changes can make reviewing PRs difficult, as one has to scroll
past them in order to find the more impactful changes. To address this
problem, this commit updates `.gitattributes` to suppress diffs
involving translation files by default.

A tradeoff to this change is that it will make it more difficult to
review PRs whose sole purpose is to update translations. That said, for
small PRs submitted by contributors, it is likely that only one or two
translation files will be updated, so it is easy to expand the diffs for
such files. For larger PRs such as those submitted by Crowdin, these
diffs are so large that GitHub ends up suppressing them anyway.

If this ends up being bothersome, one way to work around this is to use
the [Refined GitHub][1] browser extension, which allows you to
Alt/Opt-click on a single "Load diff" message to load all diffs which
are currently suppressed. So at most this would take one click to solve.

[Refined GitHub]: https://github.com/refined-github/refined-github
This commit is contained in:
Elliot Winkler 2022-02-10 14:49:47 -07:00 committed by GitHub
parent 7223d4cd2c
commit 8f2144fdb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
.gitattributes vendored
View File

@ -10,3 +10,9 @@ yarn.lock linguist-generated=false
test/e2e/send-eth-with-private-key-test/ethereumjs-tx.js linguist-vendored linguist-generated -diff
test/e2e/send-eth-with-private-key-test/web3js.js linguist-vendored linguist-generated -diff
# Collapse changes to translation files by default in diffs as it is very common
# to remove keys in PRs. Of course this means that PRs that solely update
# translations will be a little harder to review but those do not get submitted
# as often as other PRs.
app/_locales/** linguist-generated