From e4fe6ead68caf62d944ae25149a8cd3747c5c9b0 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Sun, 11 Jul 2021 02:10:48 +0200 Subject: [PATCH] i18n: pull out strings in package.json --- CONTRIBUTING.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 8 ++++---- package.nls.json | 6 ++++++ 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 package.nls.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c08ef21 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,46 @@ +# Contributing + +## Prerequisites + +* [Git](https://git-scm.com/) +* [Node.js](https://nodejs.org/) + +## Getting Started + +Clone the repository and install dependencies: + +```sh +git clone https://github.com/CodeZombieCH/vscode-gitignore.git +cd vscode-gitignore +npm i +``` + +## Debugging + +To debug the extension, run the following command to compile and watch for changes: + +``` +npm run watch +``` + +You'll find the output from Webpack in the `dist/` directory, these are the sources that's bundled into the extension, so put breakpoints here. + +## Testing + +Before pushing back any changes or opening a pull request, you should run the tests locally. + +```sh +npm run test +``` + +If you're on Linux and have [xvfb](https://www.x.org/releases/X11R7.7/doc/man/man1/Xvfb.1.xhtml) installed, you can run the tests in a headless process: + +```sh +npm run test:headless +``` + +Check your distributions package manager for how to install it. On Debian based distributions for example, you can use `apt-file` to search for packages that provide the `xvfb-run` binary. + +```sh +apt-file search xvfb-run +``` diff --git a/package.json b/package.json index 9ded372..89d86aa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gitignore", - "displayName": "gitignore", - "description": "Lets you pull .gitignore templates from the https://github.com/github/gitignore repository. Language support for .gitignore files.", + "displayName": "%displayName%", + "description": "%description%", "version": "0.9.0", "author": "Marc-André Bühler", "publisher": "codezombiech", @@ -38,12 +38,12 @@ ], "configuration": { "type": "object", - "title": "gitignore extension configuration", + "title": "%config.title%", "properties": { "gitignore.cacheExpirationInterval": { "type": "integer", "default": 3600, - "description": "Number of seconds the list of `.gitignore` files retrieved from github will be cached" + "description": "%config.cacheExpirationInterval%" } } }, diff --git a/package.nls.json b/package.nls.json new file mode 100644 index 0000000..2486bbd --- /dev/null +++ b/package.nls.json @@ -0,0 +1,6 @@ +{ + "displayName": "gitignore", + "description": "Lets you pull .gitignore templates from the https://github.com/github/gitignore repository. Language support for .gitignore files.", + "config.title": "gitignore", + "config.cacheExpirationInterval": "Number of seconds the list of `.gitignore` files retrieved from github will be cached." +}