Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: remove CJS-related hack in build:locale-pack script #3764

Merged
merged 1 commit into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions private/locale-pack/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,11 @@ async function generateLocaleDocs (pluginName) {
// Replace all nodes after the locale heading until the next heading (or eof)
headingRange(tree, rangeOptions, (start, _, end) => [
start,
{
type: 'html',
// `module.exports` is not allowed by eslint in our docs.
// The script outputs an extra newline which also isn't excepted by eslint
// TODO: remove the no-restricted-globals when switch to ESM is completed.
value: '<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->',
},
{
type: 'code',
lang: 'js',
meta: null,
value: fs.readFileSync(localePath, 'utf-8'),
value: fs.readFileSync(localePath, 'utf-8').trimEnd(),
},
end,
])
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ Configures whether to show a dropdown which enables to choose the audio device t

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand Down Expand Up @@ -98,5 +96,4 @@ export default {
discardRecordedFile: 'Discard recorded file',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/aws-s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,12 @@ This option is useful when uploading to an S3-like service that doesn’t reply

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
timedOut: 'Upload stalled for %{seconds} seconds, aborting.',
},
}

```

## S3 Bucket configuration
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameBox: 'Box',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ const uppy = new Uppy({

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand Down Expand Up @@ -338,7 +336,6 @@ export default {
},
},
}

```

### `store: defaultStore()`
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ Dashboard ships with the `ThumbnailGenerator` plugin that adds small resized ima

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand Down Expand Up @@ -425,7 +423,6 @@ export default {
},
},
}

```

### `theme: 'light'`
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/drag-drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Optionally, specify a string of text that explains something about the upload fo

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand All @@ -98,7 +96,6 @@ export default {
browse: 'browse',
},
}

```

### `onDragOver(event)`
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/dropbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameDropbox: 'Dropbox',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/facebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameFacebook: 'Facebook',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/file-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ The `name` attribute for the `<input type="file">` element.

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand All @@ -95,7 +93,6 @@ export default {
chooseFiles: 'Choose files',
},
}

```

## Custom file input
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/google-drive.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameGoogleDrive: 'Google Drive',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/image-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ uppy.on('file-editor:complete', (updatedFile) => {

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand All @@ -138,5 +136,4 @@ export default {
aspectRatioPortrait: 'Crop portrait (9:16)',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/instagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameInstagram: 'Instagram',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/onedrive.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,10 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameOneDrive: 'OneDrive',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/screen-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ If no preferred video mime type is given, the ScreenCapture plugin will prefer t

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand All @@ -116,5 +114,4 @@ export default {
recording: 'Recording',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/status-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ const doneButtonHandler = () => {

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand Down Expand Up @@ -172,7 +170,6 @@ export default {
showErrorDetails: 'Show error details',
},
}

```

[`@uppy/file-input`]: /docs/file-input
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/thumbnail-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,12 @@ A unique identifier for this plugin. It defaults to `'ThumbnailGenerator'`.

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
generatingThumbnails: 'Generating thumbnails...',
},
}

```

### `thumbnailWidth: 200`
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/transloadit.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ Limit the amount of uploads going on at the same time. Setting this to `0` means

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand All @@ -316,7 +314,6 @@ export default {
encoding: 'Encoding...',
},
}

```

## Errors
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand All @@ -99,7 +97,6 @@ export default {
enterCorrectUrl: 'Incorrect URL: Please make sure you are entering a direct link to a file',
},
}

```

## Methods
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/webcam.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ If no preferred image mime type is given, the Webcam plugin will prefer types li

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
Expand Down Expand Up @@ -189,5 +187,4 @@ export default {
allowAccessDescription: 'In order to take pictures or record video with your camera, please allow camera access for this site.',
},
}

```
3 changes: 0 additions & 3 deletions website/src/docs/xhr-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,13 @@ Indicates whether cross-site Access-Control requests should be made using creden

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
// Shown in the Informer if an upload is being canceled because it stalled for too long.
timedOut: 'Upload stalled for %{seconds} seconds, aborting.',
},
}

```

## POST Parameters / Form Fields
Expand Down
3 changes: 0 additions & 3 deletions website/src/docs/zoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,12 @@ This option correlates to the [RequestCredentials value](https://developer.mozil

### `locale: {}`

<!-- eslint-disable no-restricted-globals, no-multiple-empty-lines -->

```js
export default {
strings: {
pluginNameZoom: 'Zoom',
},
}

```

## Zoom Marketplace
Expand Down