mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 03:08:34 +00:00
* Fix translations that did not respect word order Fixes #2069 We were still using raw string concatenation in these two places. To maintain backwards compatibility, this commit adds _new_ translations that are substitution-based instead of concatenation-based. The old translation is passed in as a possible substitution parameter `backwardsCompat`, and the default (English) translations use this parameter. With this, if you are using a custom locale that overrides eg. the `exceedsSize` string, Uppy will first get your `exceedsSize` translation, and then use the default `exceedsSize2` translation which concatenates that result and the file size. So it works the same as it did in the past. If a translation requires a different word order, it can override the `exceedsSize2` translation instead. ```js new Uppy({ locale: { strings: { exceedsSize2: 'Maximum file size of %{size} exceeded', poweredBy2: '%{uppy} made this!' } } }) ``` In 2.0, we can remove all the old strings and only use `poweredBy2` (and probably rename them to `poweredBy` too, heh) * website: add missing dashboard strings to docs * locales: remove unused second plural form from EN and NL * build: allow different numbers of plural forms * utils: add test for new throwing behaviour * docs: insert PR url * locales: revert ko_KR changes * changelog: add 2.0 backlog entry * locales: var → const * docs: add brief note that translators should supply a pluralize function * locales: update en_US with new template * fix HEIGHT_MD = 400 Co-authored-by: Artur Paikin <artur@arturpaikin.com> |
||
|---|---|---|
| .. | ||
| after-version-bump.js | ||
| build-bundle.js | ||
| build-css.js | ||
| build-lib.js | ||
| companion | ||
| disc.js | ||
| endtoend-build | ||
| endtoend-build-ci | ||
| endtoend-build-tests | ||
| locale-packs.js | ||
| make-new-versions-table | ||
| release | ||
| remove-accidental-git-tags.sh | ||
| run-example.js | ||
| to-gif-hd.sh | ||
| to-gif-hq.sh | ||
| to-gif.sh | ||
| travis-deploy | ||
| travis-deploy-companion | ||
| update-contributors.js | ||
| upload-to-cdn.js | ||
| web-deploy | ||