1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
Commit Graph

35 Commits

Author SHA1 Message Date
Filip Sekulic
6e13524bcd
Remove related UI code from the app dir (#15384)
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-09-16 14:05:21 -05:00
legobeat
2a1c4a00f1
development scripts: add node shebang; mark as executable (#15655) 2022-08-24 12:25:27 -05:00
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
Brad Decker
1db0ee87ec
Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
Erik Marks
0e4005b1e7
Fix manifest i18n substitutions for Beta and Flask (#12717) 2021-11-16 08:43:21 -08:00
Brad Decker
09d81ac5f2
remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
Brad Decker
aabe653240
Add Custom Network UI (#10310) 2021-02-22 10:20:42 -06:00
Mark Stacey
b885cd1b40
Ignore unit tests when verifying localized messages (#10449)
The `verify-locale-strings` script now ignores unit tests. This ensures
the use of a string literal in a unit test won't mistakenly make this
script believe that a message is used in the extension.

This came up recently in #10396, where the deletion of unit tests for
dead code triggered an unused message lint failure. This was then fixed
in #10395.
2021-02-15 11:57:28 -03:30
Brad Decker
8e2d4e6fdd
add MetaMaskTranslation component (#10405)
* add MetaMaskTranslation component

* add stories

* Update ui/app/components/app/metamask-translation/metamask-translation.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update ui/app/components/app/metamask-translation/metamask-translation.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* fix regex

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-02-12 11:24:50 -06:00
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
Mark Stacey
181bd7bc16
Require English descriptions in locale files (#10260)
The `verify-locale-strings.js` script now validates that the
descriptions from the `en` locale are also present in all other
locales.

These descriptions are intended to help with translation, and are not
meant to be translated. This check will ensure that translators don't
accidentally translate these. It also ensures they're present alongside
each translated message, which might be helpful for understanding
context.
2021-02-03 15:19:41 +08:00
Mark Stacey
b441b7cfdc
Remove missing messages from verify locales script (#10259)
The report on missing messages has been removed from the verify
locales script. This report was making the console output of this
command unreasonably long, and would obscure the reports on any invalid
entries.

A new script was written to report on missing localized messages.
This can be run with the command `yarn locale-coverage`. This will
print a report to the console on the coverage for each locale.
2021-01-26 14:03:40 -03:30
Mark Stacey
5b1da2cd4b
Fix verification of single locale (#10262)
The `verify-locale-strings.js` script would blow up if you tried to
verify a single locale. It now works.
2021-01-26 13:29:14 -03:30
Brad Decker
026a06b39d
add shared transaction constants (#9459)
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2020-11-03 16:57:51 -06:00
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
Mark Stacey
7d0a7ab301
Update @metamask/eslint-config to v4.1.0 (#9663)
`@metamask/eslint-config` has been updated to v4.1.0. This update
requires that we update `eslint` to v7 as well, which in turn requires
updating most `eslint`-related packages.

Most notably, `babel-eslint` was replaced with `@babel/eslint-parser`,
and `babel-eslint-plugin` was replaced by `@babel/eslint-plugin`. This
required renaming all the `babel/*` rules to `@babel/*`.

Most new or updated rules that resulted in lint errors have been
temporarily disabled. They will be fixed and re-enabled in subsequent
PRs.
2020-10-21 14:01:03 -02:30
Whymarrh Whitby
b6ccd22d6c
Update ESLint shared config to v3 (#9274)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-08-19 13:57:05 -02:30
Whymarrh Whitby
4357cda7b8
Fix no-shadow issues (#9246)
See [`no-shadow`](https://eslint.org/docs/rules/no-shadow) for more information.

This change enables `no-shadow` and fixes the issues raised by the rule.
2020-08-18 14:06:45 -02:30
Whymarrh Whitby
5d42a9b773
Fix require-unicode-regexp issues (#9212)
* Fix require-unicode-regexp issues

See [`require-unicode-regexp`](https://eslint.org/docs/rules/require-unicode-regexp) for more information.

This change enables `require-unicode-regexp` and fixes the issues raised by the rule.

* Remove case-insensitive flag from regexps
2020-08-14 09:18:42 -02:30
Whymarrh Whitby
a8863a3446
Fix consistent-return issues (#9192)
See [`consistent-return`](https://eslint.org/docs/rules/consistent-return) for more information.

This change enables `consistent-return` and fixes the issues raised by the rule.
2020-08-12 16:36:57 -02:30
Whymarrh Whitby
a78cf0ef3a Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
Whymarrh Whitby
92971d3c87
Migrate codebase to use ESM (#7730)
* Update eslint-plugin-import version

* Convert JS files to use ESM

* Update ESLint rules to check imports

* Fix test:unit:global command env

* Cleanup mock-dev script
2020-01-09 00:04:58 -03:30
Erik Marks
f9eac81a85
Disallow template strings to t function in verify-locales script (#7694) 2019-12-12 08:49:52 -08:00
Whymarrh Whitby
13a1de061d
Allow translation keys to be in single- or double-quotes (#7588) 2019-11-27 18:50:00 -03:30
Mark Stacey
9f21317a30
Verify locales on CI (#7199)
* Add '--quiet' flag to verify locales script

The `--quiet` flag reduces the console output to just the essential
information for running in a CI environment. For each locale, it will
print the number of unused messages (if any).

* Add `verify-locales` script to lint CI job

The locales are now verified as part of the lint CI job. Any unused
messages detected will result in the job failing.
2019-09-21 13:31:33 -03:00
Mark Stacey
48bf2f8731
Remove unused locale messages (#7190)
* Switch to using string literals for locale keys

Various message keys were being specified with a string template
instead of a string literal. They have been switched to use string
literals so that the script for detecting unused messages can find
them.

* Remove unused locale messages

A number of unused locale messages have been removed - probably
leftover from old UI elements that have since been removed.

The `verify_locale_strings` script has been augmented to search the UI
for string literals, and match those against the locale message keys in
the `en` locale. Any messages without a corresponding string literal
are assumed to be unused.

The script has also been updated with an optional `--fix` parameter,
which will automatically delete any unused messages from locales.

148 unused messages were found in this case, out of a total of about
650 messages. Another 70 messages are _potentially_ unused and require
further investigation, but weren't as easy to rule out because they
were found in string literals.

* Remove additional unused locale messages

The following messages were more difficult to rule out because they
were present as string literals in the UI. They do appear to be
unused as locale keys though.
2019-09-18 20:29:46 -03:00
Brian R. Bondy
93204a578b Update localization from Transifex Brave order (#7099)
* Add extra locales to index.json

* Fix verify locale script bugs

- All locales didn't work because it was putting an object inside of an object.
- Individual checks didn't work because of how the destructuring was done.
- Extra items were being printed as missing items.

* Sync up string changes w/ Brave wallet

* Add 33 new locales from Brave wallet

* Merge tml into ta code
2019-09-05 14:05:33 -03:00
Whymarrh Whitby
4d88e1cf86 Enable indent linting via ESLint (#6936)
* Enable indent linting via ESLint

* yarn run lint:fix
2019-07-31 10:17:11 -10:00
kumavis
338c826961 development tools - fix i18n verify tool 2018-11-04 22:18:30 -05:00
Vincent
cd91b45686 100% French locale, reordering of English locale, fixes #5457 (#5470)
* french locales: fix typos and improve wording

* french locales: more fixes and rewording

* fixed typo

* fixed typo

* added missing translations

* fixed alphabetical order

* fixed alphabetical order

* added missing translations for FR

* fixed verify-locale-strings.js

* fixed indentation

* fixed indentation

* updated french locale

* updated changelog with changes logs

* a few fixes after receiving comments, mostly Caps removing and adding
2018-10-09 12:17:38 -02:30
brunobar79
26e4f87ce4 fix verify-locale-strings.js 2018-07-02 18:58:31 -04:00
brunobar79
a8f745f9fe eslint --fix . 2018-07-02 18:49:33 -04:00
kumavis
812a06ffcd i18n - further improve locale verifier 2018-03-27 20:29:29 -07:00
kumavis
3e7d7205b8 i18n - cleanup verify locales util 2018-03-27 20:09:15 -07:00
Herman Junge
03587c96d8 Move file to development, fix JS 2018-03-20 14:53:29 -03:00