浏览代码

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

Artur Paikin 6 年之前
父节点
当前提交
749cc1388b

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

@@ -52,7 +52,8 @@ class Uppy {
         cancel: 'Cancel',
         cancel: 'Cancel',
         logOut: 'Log out',
         logOut: 'Log out',
         filter: 'Filter',
         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) => {
 module.exports = (props) => {
   return <div class="uppy-Provider-loading">
   return <div class="uppy-Provider-loading">
-    <span>Loading...</span>
+    <span>{props.i18n('loading')}</span>
   </div>
   </div>
 }
 }

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

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