From 8f2144fdb0ef279d4f1056e73cd8f8f66f49d836 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Thu, 10 Feb 2022 14:49:47 -0700 Subject: [PATCH] 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 --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index bcc9d38ef..16c2e89c8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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