diff --git a/packages/webapp/README.md b/packages/webapp/README.md index 6b0feb1e..a636fc7a 100644 --- a/packages/webapp/README.md +++ b/packages/webapp/README.md @@ -42,11 +42,11 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm # Generate I18n resource ## Extract -`yarn extract -- 'src/*.js' --out-file lang/en.json` +`yarn extract 'src/**/*.ts*' --out-file lang/en.json` ## Compile -`yarn compile -- lang/en.json --ast --out-file src/compiled-lang/en.json` -`yarn compile -- lang/es.json --ast --out-file src/compiled-lang/es.json` +`yarn compile lang/en.json --ast --out-file src/compiled-lang/en.json` +`yarn compile lang/es.json --ast --out-file src/compiled-lang/es.json` ## License diff --git a/packages/webapp/lang/en.json b/packages/webapp/lang/en.json index f4c5fe51..46dae4cd 100644 --- a/packages/webapp/lang/en.json +++ b/packages/webapp/lang/en.json @@ -1,60 +1,96 @@ { - "footer.aboutus": { - "defaultMessage": "About Us" - }, - "footer.contactus": { - "defaultMessage": "Contact Us" - }, - "footer.donations": { - "defaultMessage": "Donations" - }, - "header.donthaveaccount": { - "defaultMessage": "Don't have an account ?" - }, - "login.email": { - "defaultMessage": "Email" - }, - "footer.faq": { - "defaultMessage": "F.A.Q." - }, - "footer.feedback": { - "defaultMessage": "Feedback" - }, - "login.forgotpwd": { - "defaultMessage": "Forgot Password ?" - }, - "login.error": { - "defaultMessage": "The email address or password you entered is not valid." - }, - "login.loginto": { - "defaultMessage": "Log Into Your Account" - }, - "login.hsqldbcofig": { - "defaultMessage": "Warning: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL", - "description": "Missing production database configured" - }, - "footer.opensource": { - "defaultMessage": "Open Source" - }, - "login.password": { - "defaultMessage": "Password" - }, - "login.remberme": { - "defaultMessage": "Remember me" - }, - "login.signin": { - "defaultMessage": "Sign In" - }, - "login.signup": { - "defaultMessage": "Sign Up" - }, - "footer.termsandconditions": { - "defaultMessage": "Term And Conditions" - }, - "login.userinactive": { - "defaultMessage": "Sorry, your account has not been activated yet. You'll receive a notification email when it becomes active. Stay tuned!." - }, - "login.welcome": { - "defaultMessage": "Welcome" - } + "common.wait": { + "defaultMessage": "Please wait ..." + }, + "footer.aboutus": { + "defaultMessage": "About Us" + }, + "footer.contactus": { + "defaultMessage": "Contact Us" + }, + "footer.donations": { + "defaultMessage": "PayPal Donations" + }, + "footer.faq": { + "defaultMessage": "F.A.Q." + }, + "footer.feedback": { + "defaultMessage": "Feedback" + }, + "footer.opensource": { + "defaultMessage": "Open Source" + }, + "footer.termsandconditions": { + "defaultMessage": "Term And Conditions" + }, + "header.donthaveaccount": { + "defaultMessage": "Don't have an account ?" + }, + "header.haveaccount": { + "defaultMessage": "Already have an account?" + }, + "login.email": { + "defaultMessage": "Email" + }, + "login.error": { + "defaultMessage": "The login.email address or login.password you entered is not valid." + }, + "login.forgotpwd": { + "defaultMessage": "Forgot Password ?" + }, + "login.hsqldbcofig": { + "defaultMessage": "Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.7 instead. You can find more information how to configure MySQL", + "description": "Missing production database configured" + }, + "login.loginto": { + "defaultMessage": "Log Into Your Account" + }, + "login.password": { + "defaultMessage": "Password" + }, + "login.remberme": { + "defaultMessage": "Remember me" + }, + "login.signin": { + "defaultMessage": "Sign In" + }, + "login.signup": { + "defaultMessage": "Sign Up" + }, + "login.userinactive": { + "defaultMessage": "Sorry, your account has not been activated yet. You'll receive a notification login.email when it becomes active. Stay tuned!." + }, + "login.welcome": { + "defaultMessage": "Welcome" + }, + "registration.become": { + "defaultMessage": "Become a member of our comunity" + }, + "registration.email": { + "defaultMessage": "Email" + }, + "registration.firstname": { + "defaultMessage": "First Name" + }, + "registration.lastname": { + "defaultMessage": "Last Name" + }, + "registration.password": { + "defaultMessage": "Password" + }, + "registration.register": { + "defaultMessage": "Register" + }, + "registration.signup": { + "defaultMessage": "Signing up is free and just take a moment" + }, + "registration.success.desc": { + "defaultMessage": "Your account has been created successfully, click to sign in and start enjoying WiseMapping." + }, + "registration.success.title": { + "defaultMessage": "Your account has been created successfully" + }, + "registration.termandconditions": { + "defaultMessage": "Terms of Service: Please check the WiseMapping Account information you've entered above, and review the Terms of Service here. By clicking on 'Register' below you are agreeing to the Terms of Service above and the Privacy Policy" + } } \ No newline at end of file diff --git a/packages/webapp/package.json b/packages/webapp/package.json index a95277fb..2dcfdc71 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -5,7 +5,10 @@ "scripts": { "start": "webpack serve", "build": "webpack --mode production", - "lint": "eslint src" + "lint": "eslint src", + "extract": "formatjs extract", + "compile": "formatjs compile" + }, "repository": "http://www.wisemapping.com", "author": "Paulo Veiga , Ezequiel Bergamaschi ", @@ -14,6 +17,7 @@ "devDependencies": { "@babel/preset-env": "^7.12.7", "@babel/preset-react": "^7.12.7", + "@formatjs/cli": "^2.13.15", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/react-router-dom": "^5.1.6", diff --git a/packages/webapp/src/compiled-lang/en.json b/packages/webapp/src/compiled-lang/en.json index bb3cef94..601066df 100644 --- a/packages/webapp/src/compiled-lang/en.json +++ b/packages/webapp/src/compiled-lang/en.json @@ -1,4 +1,10 @@ { + "common.wait": [ + { + "type": 0, + "value": "Please wait ..." + } + ], "footer.aboutus": [ { "type": 0, @@ -161,6 +167,18 @@ "value": "Signing up is free and just take a moment" } ], + "registration.success.desc": [ + { + "type": 0, + "value": "Your account has been created successfully, click to sign in and start enjoying WiseMapping." + } + ], + "registration.success.title": [ + { + "type": 0, + "value": "Your account has been created successfully" + } + ], "registration.termandconditions": [ { "type": 0, diff --git a/packages/webapp/src/css/core.css b/packages/webapp/src/css/core.css index 23790eff..052a13f7 100644 --- a/packages/webapp/src/css/core.css +++ b/packages/webapp/src/css/core.css @@ -234,7 +234,8 @@ input[type=checkbox] { background-color: #f9a826; } -input[type=submit] { +input[type=submit], +input[type=button] { width: 258px; height: 53px; padding: 0px 20px; diff --git a/yarn.lock b/yarn.lock index 1459dfc0..40228086 100644 --- a/yarn.lock +++ b/yarn.lock @@ -981,6 +981,27 @@ unique-filename "^1.1.1" which "^1.3.1" +"@formatjs/cli@^2.13.15": + version "2.13.15" + resolved "https://registry.yarnpkg.com/@formatjs/cli/-/cli-2.13.15.tgz#6aa53c01ce28e87067e39845dd7fbd0eb1e09de4" + integrity sha512-QyCS7hbge5VJ5lFNTrk1zvUW6Um+6gnKd+Vz7aSPr3fWvTBz3xfmdhacoHbC5dtJdiQOPCwX9x1Yy9VjnVfUAw== + dependencies: + "@formatjs/ts-transformer" "2.12.10" + "@types/json-stable-stringify" "^1.0.32" + "@types/lodash" "^4.14.150" + "@types/loud-rejection" "^2.0.0" + "@types/node" "14" + chalk "^4.0.0" + commander "^6.1.0" + fast-glob "^3.2.4" + fs-extra "^9.0.0" + intl-messageformat-parser "6.0.18" + json-stable-stringify "^1.0.1" + lodash "^4.17.15" + loud-rejection "^2.2.0" + tslib "^2.0.1" + typescript "^4.0" + "@formatjs/ecma402-abstract@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.5.0.tgz#759c8f11ff45e96f8fb58741e7fbdb41096d5ddd" @@ -1035,6 +1056,15 @@ intl-messageformat-parser "6.0.18" tslib "^2.0.1" +"@formatjs/ts-transformer@2.12.10": + version "2.12.10" + resolved "https://registry.yarnpkg.com/@formatjs/ts-transformer/-/ts-transformer-2.12.10.tgz#4f8758ea89e2536239b573da98f99454a4952ebf" + integrity sha512-H8mtPQcyXxLo3GJGkNVj3ZlmebeqxQfVTIvGsdpE1oXKZ/SxKqvC7ZeHlbZUyXUEiRwdJ4Hfsgw1QzsmTJnicw== + dependencies: + intl-messageformat-parser "6.0.18" + tslib "^2.0.1" + typescript "^4.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -1926,6 +1956,23 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== +"@types/json-stable-stringify@^1.0.32": + version "1.0.32" + resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.32.tgz#121f6917c4389db3923640b2e68de5fa64dda88e" + integrity sha512-q9Q6+eUEGwQkv4Sbst3J4PNgDOvpuVuKj79Hl/qnmBMEIPzB5QoFRUtjcgcg2xNUZyYUGXBk5wYIBKHt0A+Mxw== + +"@types/lodash@^4.14.150": + version "4.14.165" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.165.tgz#74d55d947452e2de0742bad65270433b63a8c30f" + integrity sha512-tjSSOTHhI5mCHTy/OOXYIhi2Wt1qcbHmuXD1Ha7q70CgI/I71afO4XtLb/cVexki1oVYchpul/TOuu3Arcdxrg== + +"@types/loud-rejection@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/loud-rejection/-/loud-rejection-2.0.0.tgz#271bb21c63f51776e1156604cda3b21a2d3f60f3" + integrity sha512-oTHISsIybJGoh3b3Ay/10csbAd2k0su7G7DGrE1QWciC+IdydPm0WMw1+Gr9YMYjPiJ5poB3g5Ev73IlLoavLw== + dependencies: + loud-rejection "*" + "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1936,7 +1983,7 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== -"@types/node@*", "@types/node@>= 8": +"@types/node@*", "@types/node@14", "@types/node@>= 8": version "14.14.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.10.tgz#5958a82e41863cfc71f2307b3748e3491ba03785" integrity sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ== @@ -2612,6 +2659,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + atob-lite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" @@ -3220,7 +3272,7 @@ commander@^4.1.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^6.2.0: +commander@^6.1.0, commander@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.0.tgz#b990bfb8ac030aedc6d11bc04d1488ffef56db75" integrity sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q== @@ -4385,7 +4437,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.1.1: +fast-glob@^3.1.1, fast-glob@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== @@ -4631,6 +4683,16 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + fs-minipass@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -5793,6 +5855,13 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -5824,6 +5893,20 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -6075,6 +6158,14 @@ loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4 dependencies: js-tokens "^3.0.0 || ^4.0.0" +loud-rejection@*, loud-rejection@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-2.2.0.tgz#4255eb6e9c74045b0edc021fa7397ab655a8517c" + integrity sha512-S0FayMXku80toa5sZ6Ro4C+s+EtFDCsyJNG/AzFMfX3AxD5Si4dZsgzm/kKnbOxHl5Cv8jBlno8+3XYIh2pNjQ== + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.2" + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -9168,7 +9259,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.1.2: +typescript@^4.0, typescript@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== @@ -9262,6 +9353,16 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"