Reland "Cleanup path handling in collect-strings"

This reverts commit 29fe69257e0a2149678e1ac97bb7318457e78d41.

Reason for revert:
1. Fix Windows compatibility by fixing the various
path separators to use UNIX when they need to be UNIX.
2. Ensure that whenever we change this script, we run the corresponding
PRESUBMIT. Otherwise, you can submit a CL that passes presubmit, but
starts failing on a later CL.
3. Lastly, let's output the full `git diff` so that it makes it easier
to investigate these kind of problems. Example git diff I used:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8843531480879659408/+/u/presubmit_py3/stdout

DISABLE_THIRD_PARTY_CHECK=Fixes in presubmit and presubmit script

Original change's description:
> Revert "Cleanup path handling in collect-strings"
>
> This reverts commit 7b72fbf5d6af5c59645b222d4c151290eeb1768d.
>
> Reason for revert: speculative revert based on https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_win64/b8843551589142089360/overview
>
> Original change's description:
> > Cleanup path handling in collect-strings
> >
> > While reading through this script I spotted a lot of duplication
> > of `front_end` in its path handling. Since we assume that all
> > strings are collected from `front_end/`, we can pass in that
> > path and use that, cleaning up most of the path concatenation
> > in the script.
> >
> > DISABLE_THIRD_PARTY_CHECK=Path handling fixes in collect-strings
> > R=​[email protected]
> >
> > Bug: none
> > Change-Id: I0e7d004ad4d1d16f92cd88f3fed94dfe4c4108b0
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982134
> > Reviewed-by: Simon Zünd <[email protected]>
> > Commit-Queue: Tim van der Lippe <[email protected]>
>
> Bug: none
> Change-Id: I6e1ac7046950f78aa7339efb21559ff60f3d50f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982147
> Auto-Submit: Tim van der Lippe <[email protected]>
> Commit-Queue: Rubber Stamper <[email protected]>
> Bot-Commit: Rubber Stamper <[email protected]>

Bug: none
Change-Id: Ia42890a67e53abdc9bacfb9e98cf06a975148bde
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2983032
Auto-Submit: Tim van der Lippe <[email protected]>
Commit-Queue: Simon Zünd <[email protected]>
Reviewed-by: Simon Zünd <[email protected]>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 4891379..c2c9be6 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -441,9 +441,10 @@
 def _CollectStrings(input_api, output_api):
     devtools_root = input_api.PresubmitLocalPath()
     devtools_front_end = input_api.os_path.join(devtools_root, 'front_end')
-    affected_front_end_files = _getAffectedFiles(input_api,
-                                                 [devtools_front_end], [],
-                                                 ['.js', '.ts'])
+    script_path = input_api.os_path.join(devtools_root, 'third_party', 'i18n',
+                                         'collect-strings.js')
+    affected_front_end_files = _getAffectedFiles(
+        input_api, [devtools_front_end, script_path], [], ['.js', '.ts'])
     if len(affected_front_end_files) == 0:
         return [
             output_api.PresubmitNotifyResult(
@@ -453,9 +454,9 @@
     results = [
         output_api.PresubmitNotifyResult('Collecting strings from front_end:')
     ]
-    script_path = input_api.os_path.join(devtools_root, 'third_party', 'i18n',
-                                         'collect-strings.js')
-    results.extend(_checkWithNodeScript(input_api, output_api, script_path))
+    results.extend(
+        _checkWithNodeScript(input_api, output_api, script_path,
+                             [devtools_front_end]))
     results.append(
         output_api.PresubmitNotifyResult(
             'Please commit en-US.json/en-XL.json if changes are generated.'))
@@ -470,7 +471,7 @@
     out, _ = process.communicate()
     if process.returncode != 0:
         files_changed_process = input_api.subprocess.Popen(
-            ['git', 'diff', '--name-only'],
+            ['git', 'diff'],
             stdout=input_api.subprocess.PIPE,
             stderr=input_api.subprocess.STDOUT)
         files_changed, _ = files_changed_process.communicate()