uppy/bin
Renée Kooi 5e25b2a939
Fix translations that did not respect word order (#2077)
* 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>
2020-03-19 14:41:14 +01:00
..
after-version-bump.js add events.once 2019-05-29 10:52:00 +02:00
build-bundle.js Default locale for all plugins (#1443) 2019-04-17 13:34:23 +02:00
build-css.js Update eslint to v6 (#1777) 2019-08-13 21:45:30 +03:00
build-lib.js Upgrade Babel to v7 and Jest to 24 2019-05-20 11:27:00 +02:00
companion Refactor npm scripts, clean up unused ones (#1392) 2019-03-29 14:55:23 +01:00
disc.js Fix discify script now that we have .json files in build 2019-05-27 16:53:47 +02:00
endtoend-build Split integration tests and add one using create-react-app (#952) 2018-07-18 11:24:55 +02:00
endtoend-build-ci build: i guess --npm-client is no longer a thing? 2019-12-11 14:43:57 +01:00
endtoend-build-tests Use more cancellation-friendly strategy for limit: N uploads (#1736) 2019-09-25 15:21:17 +02:00
locale-packs.js Fix translations that did not respect word order (#2077) 2020-03-19 14:41:14 +01:00
make-new-versions-table Fix new versions table script. 2018-11-01 13:21:59 +01:00
release Let lerna ask for OTP 2019-10-14 16:37:13 +02:00
remove-accidental-git-tags.sh add remove-accidental-git-tags.sh 2019-02-15 23:24:44 +03:00
run-example.js examples: add npm run example script 2020-01-15 11:16:56 +01:00
to-gif-hd.sh video to gif script, decent quality 2019-01-15 11:16:19 +03:00
to-gif-hq.sh add better gif creating script 2019-01-14 18:16:37 +03:00
to-gif.sh new demo video and gif, update frontpage code sample, design goals, add developed by transloasdit 2018-10-12 12:59:37 -04:00
travis-deploy CI refactor: shaving yaks (#2137) 2020-03-17 10:46:28 +01:00
travis-deploy-companion CI refactor: shaving yaks (#2137) 2020-03-17 10:46:28 +01:00
update-contributors.js build: contributors:save fix — the node.js version (#2078) 2020-02-18 15:36:14 +01:00
upload-to-cdn.js Upload downloadable zip archive of releases to CDN (#2052) 2020-02-05 13:49:47 +01:00
web-deploy Speed up website deploys 2019-03-28 10:50:01 +01:00