From 6670d9ad69fa326a5dc7ab78eb52232cd1dc7951 Mon Sep 17 00:00:00 2001 From: Abhinav Adduri Date: Wed, 19 Jul 2017 12:17:24 -0700 Subject: [PATCH] fixing conflicts --- frontend/src/upload.js | 10 +++++++--- public/locales/send.en-US.ftl | 1 + server/server.js | 4 ++-- views/layouts/main.handlebars | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/upload.js b/frontend/src/upload.js index bc79e49c..1cb0985c 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -87,7 +87,11 @@ $(document).ready(function() { $('#cancel-upload').click(() => { fileSender.cancel(); location.reload(); - notify('Your upload was cancelled.'); + document.l10n.formatValue('uploadCancelNotification') + .then(str => { + console.log('here') + notify(str); + }) }); fileSender.on('progress', progress => { @@ -212,10 +216,10 @@ $(document).ready(function() { const row = document.createElement('tr'); const name = document.createElement('td'); const link = document.createElement('td'); - const $copyIcon = $('', { src: '/resources/copy-16.svg', class: 'icon-copy', title: 'Copy URL' }); + const $copyIcon = $('', { src: '/resources/copy-16.svg', class: 'icon-copy', 'data-l10n-id': 'copyUrlHover'}); const expiry = document.createElement('td'); const del = document.createElement('td'); - const $delIcon = $('', { src: '/resources/close-16.svg', class: 'icon-delete', title: 'Delete' }); + const $delIcon = $('', { src: '/resources/close-16.svg', class: 'icon-delete', 'data-l10n-id': 'deleteButtonHover' }); const popupDiv = document.createElement('div'); const $popupText = $('
', { class: 'popuptext' }); const cellText = document.createTextNode(file.name); diff --git a/public/locales/send.en-US.ftl b/public/locales/send.en-US.ftl index da7dfb80..a296e1b6 100644 --- a/public/locales/send.en-US.ftl +++ b/public/locales/send.en-US.ftl @@ -18,6 +18,7 @@ notifyUploadDone = Your upload has finished. uploadingPageMessage = Once your file uploads you will be able to set expiry options. uploadingPageCancel = Cancel upload .title = {uploadingPageCancel} +uploadCancelNotification = Your upload was cancelled. uploadingPageLargeFileMessage = This file is large and may take awhile to upload. Sit tight! uploadingFileNotification = Notify me when the upload is complete. diff --git a/server/server.js b/server/server.js index e599e681..bc2f3df7 100644 --- a/server/server.js +++ b/server/server.js @@ -66,8 +66,8 @@ app.use(busboy()); app.use(bodyParser.json()); app.use(express.static(STATIC_PATH)); app.use('/l20n', express.static(L20N)); -app.use('/download/*/l20n', express.static(L20N)); -app.use('/download/*/locales', express.static(LOCALES)); +// app.use('/download/*/l20n', express.static(L20N)); +app.use('/locales', express.static(LOCALES)); app.get('/', (req, res) => { res.render('index', { diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars index c3826ccb..d3a660ba 100644 --- a/views/layouts/main.handlebars +++ b/views/layouts/main.handlebars @@ -14,7 +14,7 @@ - +