make “powered by” translatable with i18n

This commit is contained in:
Artur Paikin 2019-04-23 18:03:33 +03:00
parent 103116e48c
commit 6d36309b72
2 changed files with 3 additions and 2 deletions

View file

@ -3,7 +3,7 @@ const { localIcon } = require('./icons')
const { h, Component } = require('preact')
const poweredByUppy = (props) => {
return <a tabindex="-1" href="https://uppy.io" rel="noreferrer noopener" target="_blank" class="uppy-Dashboard-poweredBy">Powered by <svg aria-hidden="true" class="UppyIcon uppy-Dashboard-poweredByIcon" width="11" height="11" viewBox="0 0 11 11">
return <a tabindex="-1" href="https://uppy.io" rel="noreferrer noopener" target="_blank" class="uppy-Dashboard-poweredBy">{props.i18n('poweredBy')} <svg aria-hidden="true" class="UppyIcon uppy-Dashboard-poweredByIcon" width="11" height="11" viewBox="0 0 11 11">
<path d="M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z" fill-rule="evenodd" />
</svg><span class="uppy-Dashboard-poweredByUppy">Uppy</span></a>
}

View file

@ -104,7 +104,8 @@ module.exports = class Dashboard extends Plugin {
0: 'Added %{smart_count} file from %{folder}',
1: 'Added %{smart_count} files from %{folder}',
2: 'Added %{smart_count} files from %{folder}'
}
},
poweredBy: 'Powered by'
}
}