Commit graph

16 commits

Author SHA1 Message Date
Artur Paikin
5e35987079
Log error in uppy.addFile try/catch (#1680)
* Log error in uppy.addFile try/catch

* Add `.isRestriction` to a custom RestrictionError, check for that before logging

* keep throwing for robodog.upload

//cc @goto-bus-stop
2019-06-28 20:25:17 +03:00
Renée Kooi
d57403025e
robodog: use chooseFiles string like @uppy/file-input (#1669)
* robodog: use chooseFiles string like @uppy/file-input

* robodog: add default chooseFiles string

* file-input: add update notice above chooseFiles default

* Add locale docs
2019-06-17 18:38:47 +02:00
Renée Kooi
b64705fce2
New sync version (#1600)
New sync version
2019-06-05 16:19:48 +02:00
Artur Paikin
9926853b18 Clear input[type=file] in FileInput too, updated comments and changed ev to event 2019-05-30 17:46:58 +03:00
Renée Kooi
980210f76c
Add VERSION properties to all plugins.
And remove the proposal-object-rest-spread plugin because it is built
into preset-env now.
2019-05-27 16:53:47 +02:00
Artur Paikin
28fce1a137 Default locale for all plugins (#1443)
* first swing at building locale pack

* expose default locale on the plugin instance

* write a pretty en_US locale to a file, using stringify-object and template.js

* generated locale pack

* start adding a script that checks for unused locale strings

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Update bin/build-locale-pack.js

* Console output improvements

* Also sort plugin locale keys

* Support dependencies when digging up sources

because e.g. 'emptyFolderAdded' is used in provider-views but set in Dashboard's defaultLocale

* More complex matching

So can can support cases like: `uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')`

* Remaining const defaultLocale -> this.defaultLocale

* Update packages/@uppy/locales/en_US.js

* Mock browser environment so all plugins can be instantiated

* Clean up output a bit

* Update bin/build-locale-pack.js

* Add all remaining plugin's locales to en_US bundle

* Update packages/@uppy/dashboard/src/index.js

* Update en_US.js

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* remove unused strings

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Also write csv because that makes it real easy to import to friendlier places for translators /cc @arturi

* don’t set locale: this.defaultLocale — it overrides the lang pack

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Add 'russian plural' for english, for consistency

Allows us to signal that this is possible in new target languages, and also run better linting

* Cleanup

* No longer write csv

* WIP for NL

* Create package.json

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* move locales to /src

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* ignore locales themselves

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* build minified locale packs

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* expose Uppy.locale = {} placeholder object

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Update ru_RU.js

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* add locale bundles to example

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Upload locales to cdn

* Allow to run tests with upload-to-cdn by setting a versionSuffix

* Move locale build to function, to make room for test()

* Bring ru_RU in sync with English

now that we've added 3 plural types across the board

* Document using locales as a consuming dev, and plugin dev

* Add linting for missing/excess locale strings

* Add the locales we had to remove to the legacy folder

and explain why they cannot make it back

* Move legacy outside of src so they are definitely not transpiled, etc

* Update packages/@uppy/locales/src/nl_NL.js

* Update website/src/docs/uppy.md
2019-04-17 13:34:23 +02:00
Alexander Zaytsev
ea80f830d9 Rename missing color variables 2019-04-10 14:56:08 +03:00
Alexander Zaytsev
f1916f6712 Simplify color name: cornflower-blue -> blue 2019-04-09 15:42:04 +03:00
Renée Kooi
dd718ac02e
Merge branch 'master' into feature/tl-preset 2018-12-13 16:10:15 +01:00
Artur Paikin
cd8fae0ac9 Don’t bundle Core styles with everything, because of CSS conflicts
To use Dashboard, you now have to include the following css:
```js
import '@uppy/core/dist/style.css'
import '@uppy/dashboard/dist/style.css'
```
2018-11-22 13:59:02 +03:00
Renée Kooi
615581501f
fix join() error 2018-11-15 13:19:16 +01:00
Renée Kooi
c51652bf6b
transloadit: Add AttachFileInputs plugin 2018-11-15 13:19:15 +01:00
Artur Paikin
5ec15c11ca update this.translator = new Translator in all plugins that use i18n
I wonder if this could somehow be done in Plugin class once
2018-10-20 12:50:34 -04:00
Renée Kooi
72689d01ac
Export Plugin class from @uppy/core. 2018-06-28 12:20:21 +02:00
Renée Kooi
382f4fba95
Move stylesheets into packages. 2018-06-18 12:35:47 +02:00
Artur Paikin
e3e4200375 Move FileInput plugin to @uppy/file-input.
Steps taken:

```bash
cp -R package-template packages/@uppy/file-input
vim packages/@uppy/file-input/{README.md,package.json}
# figure out how to exit
vim packages/@uppy/file-input/package.json # Update descriptions
```
2018-06-14 11:14:02 -04:00