Ver Fonte

add “Loading...” from providers to i18n so we can translate it

Artur Paikin há 6 anos atrás
pai
commit
749cc1388b

+ 2 - 1
packages/@uppy/core/src/index.js

@@ -52,7 +52,8 @@ class Uppy {
         cancel: 'Cancel',
         logOut: 'Log out',
         filter: 'Filter',
-        resetFilter: 'Reset filter'
+        resetFilter: 'Reset filter',
+        loading: 'Loading...'
       }
     }
 

+ 1 - 1
packages/@uppy/provider-views/src/Loader.js

@@ -2,6 +2,6 @@ const { h } = require('preact')
 
 module.exports = (props) => {
   return <div class="uppy-Provider-loading">
-    <span>Loading...</span>
+    <span>{props.i18n('loading')}</span>
   </div>
 }

+ 1 - 1
packages/@uppy/provider-views/src/index.js

@@ -523,7 +523,7 @@ module.exports = class ProviderView {
     if (this.plugin.getPluginState().loading) {
       return (
         <CloseWrapper onUnmount={this.clearSelection}>
-          <LoaderView />
+          <LoaderView i18n={this.plugin.uppy.i18n} />
         </CloseWrapper>
       )
     }