-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3030 from Giveth/release-2.18.0
Release 2.18.0
- Loading branch information
Showing
100 changed files
with
2,839 additions
and
1,085 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const fs = require('fs'); | ||
|
||
// Read the JSON file | ||
const enJsonData = fs.readFileSync('en.json'); | ||
const en = JSON.parse(enJsonData); | ||
|
||
const esJsonData = fs.readFileSync('es.json'); | ||
const es = JSON.parse(esJsonData); | ||
|
||
const caJsonData = fs.readFileSync('ca.json'); | ||
const ca = JSON.parse(caJsonData); | ||
|
||
function findSameKeyValue(obj) { | ||
const sameKeyValue = {}; | ||
for (let key in obj) { | ||
if (obj.hasOwnProperty(key) && en[key] === obj[key]) { | ||
sameKeyValue[key] = obj[key]; | ||
} | ||
} | ||
return sameKeyValue; | ||
} | ||
|
||
function save(obj, name) { | ||
// Write the sorted data back to the JSON file | ||
fs.writeFileSync(name, JSON.stringify(obj, null, 2)); | ||
|
||
console.log('Saving completed!'); | ||
} | ||
|
||
const ntEs = findSameKeyValue(es); | ||
const ntCa = findSameKeyValue(ca); | ||
|
||
save(ntEs, 'nt_es.json'); | ||
save(ntCa, 'nt_ca.json'); |
Oops, something went wrong.
3bc1b1c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
giveth-dapps-v2 – ./
giveth.io
giveth-dapps-v2-givethio.vercel.app
www.giveth.io
giveth-dapps-v2-git-main-givethio.vercel.app