-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jfdoming/fix-send-types-2
- Loading branch information
Showing
52 changed files
with
402 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env node | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Local path to the cloned translations repository | ||
const localRepoPath = './packages/desktop-client/locale'; | ||
|
||
// Compare JSON files and delete incomplete ones | ||
const processTranslations = () => { | ||
try { | ||
const files = fs.readdirSync(localRepoPath); | ||
const enJsonPath = path.join(localRepoPath, 'en.json'); | ||
|
||
if (!fs.existsSync(enJsonPath)) { | ||
throw new Error('en.json not found in the repository.'); | ||
} | ||
|
||
const enJson = JSON.parse(fs.readFileSync(enJsonPath, 'utf8')); | ||
const enKeysCount = Object.keys(enJson).length; | ||
|
||
console.log(`en.json has ${enKeysCount} keys.`); | ||
|
||
files.forEach((file) => { | ||
if (file === 'en.json' || path.extname(file) !== '.json') return; | ||
|
||
const filePath = path.join(localRepoPath, file); | ||
const jsonData = JSON.parse(fs.readFileSync(filePath, 'utf8')); | ||
const fileKeysCount = Object.keys(jsonData).length; | ||
|
||
// Calculate the percentage of keys present compared to en.json | ||
const percentage = (fileKeysCount / enKeysCount) * 100; | ||
console.log(`${file} has ${fileKeysCount} keys (${percentage.toFixed(2)}%).`); | ||
|
||
if (percentage < 50) { | ||
fs.unlinkSync(filePath); | ||
console.log(`Deleted ${file} due to insufficient keys.`); | ||
} else { | ||
console.log(`Keeping ${file}.`); | ||
} | ||
}); | ||
|
||
console.log('Processing completed.'); | ||
} catch (error) { | ||
console.error(`Error: ${error.message}`); | ||
} | ||
}; | ||
|
||
processTranslations(); |
Binary file modified
BIN
+302 Bytes
(100%)
...ustom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+60 Bytes
(100%)
...ustom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+594 Bytes
(100%)
...ustom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+813 Bytes
(100%)
...stom-reports-Switches-to-Line-Graph-and-checks-the-visuals-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+387 Bytes
(100%)
...stom-reports-Switches-to-Line-Graph-and-checks-the-visuals-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+108 Bytes
(100%)
...stom-reports-Switches-to-Line-Graph-and-checks-the-visuals-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+131 Bytes
(100%)
...alidates-that-show-legend-button-shows-the-legend-side-bar-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+91 Bytes
(100%)
...alidates-that-show-legend-button-shows-the-legend-side-bar-2-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13 Bytes
(100%)
...alidates-that-show-legend-button-shows-the-legend-side-bar-3-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.