-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Set plugin titles from locale #3023
Conversation
this.translator = new Translator([this.defaultLocale, this.uppy.locale, this.opts.locale]) | ||
this.i18n = this.translator.translate.bind(this.translator) | ||
this.i18nArray = this.translator.translateArray.bind(this.translator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move translator
and i18nArray
to private properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you mean the new #
thing? I think so, shouldn’t be public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18nArray should be accessible by subclasses so they can use it in preact code
…adit/uppy into plugin-title-from-locale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get rid of those bind
calls.
E2E tests are failing (packages/@uppy/locales/src/en_US.js
issue again).
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Is this still necessary if uppy/packages/@uppy/transloadit/src/index.js Lines 90 to 95 in 9a46b0d
|
BasePlugin
class, since around 70% of the plugins use locales, and right now we have this dance duplicated in each of them. Good idea?pluginNameInstagram
,pluginNameWebcam
to group them in the locale file and distinguish from general keywords likeCamera
orWebcam
vspluginNameWebcam
.Closes #2279