From 2c77d94af7aa25ed643191f27700f3a71c63ecd4 Mon Sep 17 00:00:00 2001 From: Abhinav Adduri Date: Thu, 20 Jul 2017 15:47:59 -0700 Subject: [PATCH 1/9] refactored ftl file --- frontend/src/upload.js | 2 +- .../{send.en-US.ftl => en-US/send.ftl} | 46 ++++++++++--------- views/index.handlebars | 8 ++-- views/layouts/main.handlebars | 2 +- 4 files changed, 31 insertions(+), 27 deletions(-) rename public/locales/{send.en-US.ftl => en-US/send.ftl} (81%) diff --git a/frontend/src/upload.js b/frontend/src/upload.js index 194d50af..892ce4ca 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -321,7 +321,7 @@ $(document).ready(function() { popupDiv.classList.add('popup'); const popupDelSpan = document.createElement('span'); $(popupDelSpan).addClass('del-file'); - $(popupDelSpan).attr('data-l10n-id', 'sentFilesTitle4'); + $(popupDelSpan).attr('data-l10n-id', 'deleteFileList'); const popupNvmSpan = document.createElement('span'); $(popupNvmSpan).addClass('nvm'); diff --git a/public/locales/send.en-US.ftl b/public/locales/en-US/send.ftl similarity index 81% rename from public/locales/send.en-US.ftl rename to public/locales/en-US/send.ftl index a3873fbb..a9c58880 100644 --- a/public/locales/send.en-US.ftl +++ b/public/locales/en-US/send.ftl @@ -7,7 +7,7 @@ uploadPageLearnMore = Learn more uploadPageDropMessage = Drop your file here to start uploading uploadPageSizeMessage = For the most reliable operation, it’s best to keep your file under 1GB uploadPageBrowseButton = Select a file on your computer - .title = {uploadPageBrowseButtonTitle} + .title = Select a file on your computer uploadPageMultipleFilesAlert = Uploading multiple files or a folder is currently not supported. uploadPageBrowseButtonTitle = Upload file @@ -19,66 +19,70 @@ notifyUploadDone = Your upload has finished. uploadingPageMessage = Once your file uploads you will be able to set expiry options. uploadingPageCancel = Cancel upload - .title = {uploadingPageCancel} + .title = Cancel upload 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. uploadSuccessConfirmHeader = Ready to Send -uploadSvgAlt.alt = Upload - - -//Note the spec suggests that this string is editable. That feature will not appear at Launch +uploadSvgAlt + .alt = Upload uploadSuccessTimingHeader = The link to your file will expire after 1 download or in 24 hours. copyUrlFormLabel = Copy and share the link to send your file: copyUrlFormLabelWithName = Copy and share the link to send your file: { $filename } + // Note: Title text for button should be the same copyUrlFormButton = Copy to clipboard - .title = {copyUrlFormButton} + .title = Copy to clipboard copiedUrl = Copied! deleteFileButton = Delete file - .title = {deleteFileButton} + .title = Delete file sendAnotherFileLink = Send another file - .title = {sendAnotherFileLink} + .title = Send another file -downloadAltText.alt = Download +downloadAltText + .alt = Download downloadFileName = Download { $filename } downloadFileSize = ({ $size }) downloadMessage = Your friend is sending you a file with Firefox Send, a service that allows you to share files with a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. downloadButtonLabel = Download - .title = {downloadButtonLabel} + .title = Download downloadNotification = Your download has completed. downloadFinish = Download Complete sendYourFilesLink = Try Firefox Send - .title = {sendYourFilesLink} + .title = Try Firefox Send downloadingPageProgress = Downloading { $filename } ({ $size }) downloadingPageMessage = Please leave this tab open while we fetch your file and decrypt it. -errorAltText.alt = Upload error +errorAltText + .alt = Upload error errorPageHeader = Something went wrong! errorPageMessage = There has been an error uploading the file. errorPageLink = Send another file -linkExpiredAlt.alt = Link expired +linkExpiredAlt + .alt = Link expired expiredPageHeader = This link has expired or never existed in the first place! notSupportedHeader = Your browser is not supported. notSupportedDetail = Unfortunately this browser does not support the web technology that powers Firefox Send. You'll need to try another browser. We recommend Firefox! downloadFirefoxButtonSub = Free Download -sentFilesTitle1 = File -sentFilesTitle2 = Copy URL -sentFilesTitle3 = Expires In -sentFilesTitle4 = Delete - +uploadedFile = File +copyFileList = Copy URL +expiryFileList = Expires In +deleteFileList = Delete nevermindButton = Nevermind -deleteButtonHover.title = {sentFilesTitle4} -copyUrlHover.title = {sentFilesTitle2} + +deleteButtonHover + .title = Delete +copyUrlHover + .title = Copy URL footerLinkLegal = Legal footerLinkAbout = About Test Pilot diff --git a/views/index.handlebars b/views/index.handlebars index 30ae6a97..3a2dfbbf 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -20,10 +20,10 @@ - - - - + + + + diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars index 285ad3c7..ac886ed5 100644 --- a/views/layouts/main.handlebars +++ b/views/layouts/main.handlebars @@ -9,7 +9,7 @@ - + From 47fd3877990bf7eac063febcaf142fcb0addb914 Mon Sep 17 00:00:00 2001 From: Abhinav Adduri Date: Fri, 21 Jul 2017 10:39:41 -0700 Subject: [PATCH 2/9] added toml file --- l10n.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 l10n.toml diff --git a/l10n.toml b/l10n.toml new file mode 100644 index 00000000..531ad8fd --- /dev/null +++ b/l10n.toml @@ -0,0 +1,12 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +basepath = "." + +[env] + l = "{l10n_base}/public/locales/{locale}/" + +[[paths]] + reference = "public/locales/en-US/**" + l10n = "{l}**" From 8ebfaf9ad9a3af34b373a0d507872553ce414a26 Mon Sep 17 00:00:00 2001 From: Abhinav Adduri Date: Fri, 21 Jul 2017 10:56:01 -0700 Subject: [PATCH 3/9] adding requested changes --- frontend/src/upload.js | 3 +-- public/locales/en-US/send.ftl | 13 ++++++++++--- views/index.handlebars | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/src/upload.js b/frontend/src/upload.js index 892ce4ca..82f6c55b 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -329,8 +329,7 @@ $(document).ready(function() { $popupText.html([ popupDelSpan, - ' ', - ' ', + '
', popupNvmSpan ]); diff --git a/public/locales/en-US/send.ftl b/public/locales/en-US/send.ftl index a9c58880..68e38104 100644 --- a/public/locales/en-US/send.ftl +++ b/public/locales/en-US/send.ftl @@ -1,3 +1,4 @@ +// We might not need to localize this if it's a brand name. title = Firefox Send uploadPageHeader = Private, Encrypted File Sharing @@ -22,7 +23,7 @@ uploadingPageCancel = Cancel upload .title = Cancel upload uploadCancelNotification = Your upload was cancelled. -uploadingPageLargeFileMessage = This file is large and may take awhile to upload. Sit tight! +uploadingPageLargeFileMessage = This file is large and may take a while to upload. Sit tight! uploadingFileNotification = Notify me when the upload is complete. uploadSuccessConfirmHeader = Ready to Send @@ -43,16 +44,21 @@ deleteFileButton = Delete file sendAnotherFileLink = Send another file .title = Send another file +// This alt text and the download filename string are actions. downloadAltText .alt = Download downloadFileName = Download { $filename } + downloadFileSize = ({ $size }) downloadMessage = Your friend is sending you a file with Firefox Send, a service that allows you to share files with a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. + +// This is also an action. downloadButtonLabel = Download .title = Download downloadNotification = Your download has completed. downloadFinish = Download Complete +// We might not need to localize this if it's a brand name. sendYourFilesLink = Try Firefox Send .title = Try Firefox Send downloadingPageProgress = Downloading { $filename } ({ $size }) @@ -69,7 +75,8 @@ linkExpiredAlt .alt = Link expired expiredPageHeader = This link has expired or never existed in the first place! notSupportedHeader = Your browser is not supported. -notSupportedDetail = Unfortunately this browser does not support the web technology that powers Firefox Send. You'll need to try another browser. We recommend Firefox! +// We might not need to localize the Firefox Send part of this string if it's a brand name. +notSupportedDetail = Unfortunately this browser does not support the web technology that powers Firefox Send. You’ll need to try another browser. We recommend Firefox! downloadFirefoxButtonSub = Free Download @@ -77,7 +84,7 @@ uploadedFile = File copyFileList = Copy URL expiryFileList = Expires In deleteFileList = Delete -nevermindButton = Nevermind +nevermindButton = Never mind deleteButtonHover .title = Delete diff --git a/views/index.handlebars b/views/index.handlebars index 3a2dfbbf..35516497 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -54,7 +54,7 @@