aboutsummaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
authorThomas <tmashuang@gmail.com>2018-03-22 03:25:41 +0800
committerThomas <tmashuang@gmail.com>2018-03-22 03:25:41 +0800
commitd646f377416ea6bfcd7682d21e011be5fa65cd3f (patch)
treedd5a1116920bc73738dcc1fefcc649927230a369 /development
parent6306c7b1901fa831e25ddd29607618122f805749 (diff)
parent072dd7ea2f7ce189b551b9fc8fd8e58aaaec4158 (diff)
downloadtangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.tar
tangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.tar.gz
tangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.tar.bz2
tangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.tar.lz
tangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.tar.xz
tangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.tar.zst
tangerine-wallet-browser-d646f377416ea6bfcd7682d21e011be5fa65cd3f.zip
Merge branch 'master' into selenium-e2e
Diffstat (limited to 'development')
-rw-r--r--development/README.md5
-rw-r--r--development/states/confirm-new-ui.json2
-rw-r--r--development/states/send-edit.json2
-rw-r--r--development/verify-locale-strings.js96
4 files changed, 103 insertions, 2 deletions
diff --git a/development/README.md b/development/README.md
new file mode 100644
index 000000000..1e18d4f16
--- /dev/null
+++ b/development/README.md
@@ -0,0 +1,5 @@
+# Development
+
+Several files which are needed for developing on(!) MetaMask.
+
+Usually each files contains information about its scope / usage. \ No newline at end of file
diff --git a/development/states/confirm-new-ui.json b/development/states/confirm-new-ui.json
index 6ea8e64cd..6981781a9 100644
--- a/development/states/confirm-new-ui.json
+++ b/development/states/confirm-new-ui.json
@@ -116,7 +116,7 @@
"send": {
"gasLimit": "0xea60",
"gasPrice": "0xba43b7400",
- "gasTotal": "0xb451dc41b578",
+ "gasTotal": "0xaa87bee538000",
"tokenBalance": null,
"from": {
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb",
diff --git a/development/states/send-edit.json b/development/states/send-edit.json
index 6ea8e64cd..6981781a9 100644
--- a/development/states/send-edit.json
+++ b/development/states/send-edit.json
@@ -116,7 +116,7 @@
"send": {
"gasLimit": "0xea60",
"gasPrice": "0xba43b7400",
- "gasTotal": "0xb451dc41b578",
+ "gasTotal": "0xaa87bee538000",
"tokenBalance": null,
"from": {
"address": "0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb",
diff --git a/development/verify-locale-strings.js b/development/verify-locale-strings.js
new file mode 100644
index 000000000..b8fe5a7dc
--- /dev/null
+++ b/development/verify-locale-strings.js
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Locale verification script
+//
+// usage:
+//
+// node app/scripts/verify-locale-strings.js <locale>
+//
+// will check the given locale against the strings in english
+//
+////////////////////////////////////////////////////////////////////////////////
+
+var fs = require('fs')
+var path = require('path')
+
+console.log('Locale Verification')
+
+var locale = process.argv[2]
+if (!locale || locale == '') {
+ console.log('Must enter a locale as argument. exitting')
+ process.exit(1)
+}
+
+console.log("verifying for locale " + locale)
+
+localeFilePath = path.join(process.cwd(), 'app', '_locales', locale, 'messages.json')
+try {
+ localeObj = JSON.parse(fs.readFileSync(localeFilePath, 'utf8'));
+} catch (e) {
+ if(e.code == 'ENOENT') {
+ console.log('Locale file not found')
+ } else {
+ console.log('Error opening your locale file: ', e)
+ }
+ process.exit(1)
+}
+
+englishFilePath = path.join(process.cwd(), 'app', '_locales', 'en', 'messages.json')
+try {
+ englishObj = JSON.parse(fs.readFileSync(englishFilePath, 'utf8'));
+} catch (e) {
+ if(e.code == 'ENOENT') {
+ console.log("English File not found")
+ } else {
+ console.log("Error opening english locale file: ", e)
+ }
+ process.exit(1)
+}
+
+console.log('\tverifying whether all your locale strings are contained in the english one')
+
+var counter = 0
+var foundErrorA = false
+var notFound = [];
+Object.keys(localeObj).forEach(function(key){
+ if (!englishObj[key]) {
+ foundErrorA = true
+ notFound.push(key)
+ }
+ counter++
+})
+
+if (foundErrorA) {
+ console.log('\nThe following string(s) is(are) not found in the english locale:')
+ notFound.forEach(function(key) {
+ console.log(key)
+ })
+} else {
+ console.log('\tall ' + counter +' strings declared in your locale were found in the english one')
+}
+
+console.log('\n\tverifying whether your locale contains all english strings')
+
+var counter = 0
+var foundErrorB = false
+var notFound = [];
+Object.keys(englishObj).forEach(function(key){
+ if (!localeObj[key]) {
+ foundErrorB = true
+ notFound.push(key)
+ }
+ counter++
+})
+
+if (foundErrorB) {
+ console.log('\nThe following string(s) is(are) not found in the your locale:')
+ notFound.forEach(function(key) {
+ console.log(key)
+ })
+} else {
+ console.log('\tall ' + counter +' english strings were found in your locale!')
+}
+
+if (!foundErrorA && !foundErrorB) {
+ console.log('You are good to go')
+} \ No newline at end of file