Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

refactored ftl file #269

Merged
merged 10 commits into from
Jul 25, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
46 changes: 25 additions & 21 deletions public/locales/send.en-US.ftl → public/locales/en-US/send.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you actually need the string on the entity, or only on the title attribute? If it's the former, this should be

uploadPageBrowseButton
    .title = Select a file on your computer

Same question for similar strings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the string on the entity as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. @mathjazz is this going to work without issues in Pontoon?

.title = {uploadPageBrowseButtonTitle}
.title = Select a file on your computer
uploadPageMultipleFilesAlert = Uploading multiple files or a folder is currently not supported.

uploadPageBrowseButtonTitle = Upload file
Expand All @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 spaces indentation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

uploadCancelNotification = Your upload was cancelled.

uploadingPageLargeFileMessage = This file is large and may take awhile to upload. Sit tight!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure "awhile" -> "a while"

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 }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between these two strings?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show me a screenshot of these two strings? I'm not sure I understand how and when they would be used, e.g. the first has a colon because it's followed by something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copyUrlFormLabel is only being used in one place. I refactored that line so we can safely remove this string now.


// 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an alt text on a button or link? We need a comment to explain it's an action, not a noun

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an alt text on an svg element. I'll go ahead and add in a comment.

.alt = Download
downloadFileName = Download { $filename }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One space before =

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

downloadFileSize = ({ $size })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does size come from and how it's formatted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file size comes in from the server and is rendered through handlebars to the ftl file. It's a string in a human readable format, i.e. 12 Mb.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a note in case Firefox Send should not be localized

.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!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: proper apostrophe instead of straight quote.

Note about Firefox Send if needed.

downloadFirefoxButtonSub = Free Download


sentFilesTitle1 = File
sentFilesTitle2 = Copy URL
sentFilesTitle3 = Expires In
sentFilesTitle4 = Delete

uploadedFile = File
copyFileList = Copy URL
expiryFileList = Expires In
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this string used? It smells of contenation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this string followed by?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Expires In is a column header. It isn't followed by anything, but there are times listed below it (one for each file).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, can you add a comment explaining that? As simple as

// expiryFileList is used as a column header

P.S. I'm in EU timezone, I'll probably catch up next week with this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing. Thanks for all the suggestions!

deleteFileList = Delete
nevermindButton = Nevermind
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Never mind"?

deleteButtonHover.title = {sentFilesTitle4}
copyUrlHover.title = {sentFilesTitle2}

deleteButtonHover
.title = Delete
copyUrlHover
.title = Copy URL

footerLinkLegal = Legal
footerLinkAbout = About Test Pilot
Expand Down
8 changes: 4 additions & 4 deletions views/index.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<thead>
<tr>
<!-- htmllint attr-bans="false" -->
<th width="35%" data-l10n-id="sentFilesTitle1"></th>
<th width="25%" data-l10n-id="sentFilesTitle2"></th>
<th width="21%" data-l10n-id="sentFilesTitle3"></th>
<th width="12%" data-l10n-id="sentFilesTitle4"></th>
<th width="35%" data-l10n-id="uploadedFile"></th>
<th width="25%" data-l10n-id="copyFileList"></th>
<th width="21%" data-l10n-id="expiryFileList"></th>
<th width="12%" data-l10n-id="deleteFileList"></th>
<!-- htmllint tag-bans="$previous" -->
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion views/layouts/main.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="defaultLanguage" content="en-US">
<meta name="availableLanguages" content="en-US">
<link rel="localization" href="/locales/send.{locale}.ftl">
<link rel="localization" href="/locales/{locale}/send.ftl">
<script defer src="/l20n/dist/web/l20n.js"></script>
</head>
<body>
Expand Down