Merge pull request #1166 from mozilla/update-strings

update strings
This commit is contained in:
John Gruen 2019-02-22 19:40:55 +01:00 committed by GitHub
commit c23da8f6b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 92 additions and 57 deletions

View File

@ -17,7 +17,9 @@ export default class FileSender extends Nanobus {
} }
get progressIndefinite() { get progressIndefinite() {
return ['fileSizeProgress', 'notifyUploadDone'].indexOf(this.msg) === -1; return (
['fileSizeProgress', 'notifyUploadEncryptDone'].indexOf(this.msg) === -1
);
} }
get sizes() { get sizes() {
@ -75,7 +77,7 @@ export default class FileSender extends Nanobus {
try { try {
const result = await this.uploadRequest.result; const result = await this.uploadRequest.result;
const time = Date.now() - start; const time = Date.now() - start;
this.msg = 'notifyUploadDone'; this.msg = 'notifyUploadEncryptDone';
this.uploadRequest = null; this.uploadRequest = null;
this.progress = [1, 1]; this.progress = [1, 1];
const secretKey = arrayToB64(this.keychain.rawSecret); const secretKey = arrayToB64(this.keychain.rawSecret);

View File

@ -1,4 +1,4 @@
/* global Android */ /* global Android LIMITS */
const html = require('choo/html'); const html = require('choo/html');
const raw = require('choo/html/raw'); const raw = require('choo/html/raw');
@ -266,8 +266,8 @@ module.exports.wip = function(state, emit) {
onchange="${add}" onchange="${add}"
/> />
<div <div
for="file-upload"
class="flex flex-row items-center justify-between w-full p-2" class="flex flex-row items-center justify-between w-full p-2"
title="${state.translate('addFilesButton')}"
> >
<label <label
for="file-upload" for="file-upload"
@ -278,7 +278,9 @@ module.exports.wip = function(state, emit) {
${state.translate('addFilesButton')} ${state.translate('addFilesButton')}
</label> </label>
<div class="font-normal text-sm text-grey-darker"> <div class="font-normal text-sm text-grey-darker">
${state.translate('totalSize', { size: bytes(state.archive.size) })} ${state.translate('totalSize', {
size: bytes(state.archive.size)
})}
</div> </div>
</div> </div>
</div> </div>
@ -370,8 +372,8 @@ module.exports.uploading = function(state, emit) {
<button <button
class="text-blue-dark hover:text-blue-darker focus:text-blue-darker self-end font-medium" class="text-blue-dark hover:text-blue-darker focus:text-blue-darker self-end font-medium"
onclick=${cancel} onclick=${cancel}
title="${state.translate('uploadingPageCancel')}"> title="${state.translate('uploadingPageCancelShort')}">
${state.translate('uploadingPageCancel')} ${state.translate('uploadingPageCancelShort')}
</button> </button>
</send-upload-area>`; </send-upload-area>`;
@ -383,6 +385,15 @@ module.exports.uploading = function(state, emit) {
}; };
module.exports.empty = function(state, emit) { module.exports.empty = function(state, emit) {
const upsell = state.user.loggedIn
? ''
: html`
<p class="center font-medium text-xs text-grey-dark mt-4 mb-2">
${state.translate('signInSizeBump', {
size: bytes(LIMITS.MAX_FILE_SIZE, 0)
})}
</p>
`;
return html` return html`
<send-upload-area <send-upload-area
class="flex flex-col items-center justify-center border-2 border-dashed border-grey rounded px-6 py-16 h-full w-full" class="flex flex-col items-center justify-center border-2 border-dashed border-grey rounded px-6 py-16 h-full w-full"
@ -398,8 +409,8 @@ module.exports.empty = function(state, emit) {
> >
${state.translate('uploadDropDragMessage')} ${state.translate('uploadDropDragMessage')}
</div> </div>
<div class="text-center text-base italic"> <div class="pb-6 text-center text-base">
${state.translate('uploadDropClickMessage')} ${state.translate('uploadDropButtonMessage')}
</div> </div>
<input <input
id="file-upload" id="file-upload"
@ -415,10 +426,15 @@ module.exports.empty = function(state, emit) {
for="file-upload" for="file-upload"
role="button" role="button"
class="btn rounded-lg flex items-center mt-4" class="btn rounded-lg flex items-center mt-4"
title="${state.translate('addFilesButton')}" title="${state.translate('addFilesButtonWithSize', {
size: bytes(state.user.maxSize, 0)
})}"
> >
${state.translate('addFilesButton')} ${state.translate('addFilesButtonWithSize', {
size: bytes(state.user.maxSize, 0)
})}
</label> </label>
${upsell}
</send-upload-area> </send-upload-area>
`; `;

View File

@ -7,9 +7,12 @@ module.exports = function(name, url) {
<send-copy-dialog <send-copy-dialog
class="flex flex-col items-center text-center p-4 max-w-sm" class="flex flex-col items-center text-center p-4 max-w-sm"
> >
<h1 class="font-bold my-4">${state.translate('notifyUploadDone')}</h1> <h1 class="font-bold my-4">
${state.translate('notifyUploadEncryptDone')}
</h1>
<p class="font-normal leading-normal text-grey-darker word-break-all"> <p class="font-normal leading-normal text-grey-darker word-break-all">
${state.translate('copyUrlFormLabelWithName', { filename: name })} ${state.translate('copyUrlFormLabel')} <br />
${name}
</p> </p>
<input <input
type="text" type="text"
@ -21,9 +24,9 @@ module.exports = function(name, url) {
<button <button
class="btn rounded-lg w-full flex-no-shrink focus:outline" class="btn rounded-lg w-full flex-no-shrink focus:outline"
onclick="${copy}" onclick="${copy}"
title="${state.translate('copyUrlFormButton')}" title="${state.translate('copyUrlFormButtonText')}"
> >
${state.translate('copyUrlFormButton')} ${state.translate('copyUrlFormButtonText')}
</button> </button>
<button <button
class="text-blue-dark hover:text-blue-darker focus:text-blue-darker my-4 font-medium cursor-pointer focus:outline" class="text-blue-dark hover:text-blue-darker focus:text-blue-darker my-4 font-medium cursor-pointer focus:outline"

View File

@ -12,7 +12,7 @@ function password(state, emit) {
<div <div
class="h-full w-full flex flex-col items-center justify-center bg-white py-8" class="h-full w-full flex flex-col items-center justify-center bg-white py-8"
> >
<h1 class="mb-4">${state.translate('downloadFileTitle')}</h1> <h1 class="mb-4">${state.translate('downloadFilesTitle')}</h1>
<form <form
class="flex flex-row flex-no-wrap w-full md:w-4/5" class="flex flex-row flex-no-wrap w-full md:w-4/5"
onsubmit="${checkPassword}" onsubmit="${checkPassword}"
@ -118,15 +118,17 @@ module.exports = function(state, emit) {
content = html` content = html`
<div <div
id="download-complete" id="download-complete"
class="flex flex-col items-center justify-center h-full w-full bg-white border border-grey-light p-2" class="flex flex-col items-center justify-center h-full w-full bg-white p-2"
> >
<h1 class="text-center font-bold my-4 text-2xl"> <h1 class="text-center font-bold my-4 text-2xl">
${state.translate('downloadFinish')} ${state.translate('downloadFinish')}
</h1> </h1>
<p class="pb-2">${state.translate('downloadFinishText')}</p>
<p class="mb-4"> <p class="mb-4">
<a <a
href="/" href="/"
class="text-blue hover:text-blue-dark focus:text-blue-darker font-medium" class="btn rounded-lg flex items-center mt-4"
role="button"
>${state.translate('sendYourFilesLink')}</a >${state.translate('sendYourFilesLink')}</a
> >
</p> </p>
@ -136,7 +138,14 @@ module.exports = function(state, emit) {
default: default:
content = html` content = html`
<div class="flex flex-col w-full h-full items-center mt-12"> <div class="flex flex-col w-full h-full items-center mt-12">
<h1 class="">${state.translate('downloadFileTitle')}</h1> <h1 class="mb-4">${state.translate('downloadFilesTitle')}</h1>
<p class="w-full md:w-4/5 pb-4 mb-4 text-center">
${state.translate('downloadFileText', {
name: 'name',
timeSpan: 'time span',
downloadCount: 'download count'
})}
</p>
${archiveTile.preview(state, emit)} ${archiveTile.preview(state, emit)}
</div> </div>
`; `;

View File

@ -10,19 +10,22 @@ module.exports = function(state, emit) {
class="flex flex-col items-center bg-white m-6 px-6 py-8 border border-grey-light md:border-none md:px-12 md:py-16 shadow w-full" class="flex flex-col items-center bg-white m-6 px-6 py-8 border border-grey-light md:border-none md:px-12 md:py-16 shadow w-full"
> >
<h1 class="text-pink-dark text-2xl text-center"> <h1 class="text-pink-dark text-2xl text-center">
${state.translate('expiredPageHeader')} ${state.translate('expiredPageHeaderUpdate')}
</h1> </h1>
<img <img
class="my-16" class="my-16"
src="${assets.get('illustration_expired.svg')}" src="${assets.get('illustration_expired.svg')}"
id="expired-img" id="expired-img"
/> />
<p class="max-w-md leading-normal"> <p class="pb-2">${state.translate('downloadFinishText')}</p>
${state.translate('uploadPageExplainer')} <p class="mb-4">
<a
href="/"
class="btn rounded-lg flex items-center mt-4"
role="button"
>${state.translate('sendYourFilesLink')}</a
>
</p> </p>
<a class="text-blue mt-10 font-medium" href="/">
${state.translate('sendYourFilesLink')}
</a>
</div> </div>
</main> </main>
`; `;

View File

@ -9,16 +9,15 @@ module.exports = function(trigger) {
let submitting = false; let submitting = false;
return html` return html`
<send-signup-dialog class="flex flex-col p-4"> <send-signup-dialog class="flex flex-col p-4">
<p class="p-8"> <h2 class="font-bold">${state.translate('accountBenefitTitle')}</h3>
${state.translate('accountBenefitTitle')} <ul class="my-2 leading-normal list-reset text-lg mb-8 mt-4">
<ul class="my-2 leading-normal">
<li>${state.translate('accountBenefitLargeFiles', { <li>${state.translate('accountBenefitLargeFiles', {
size: bytes(LIMITS.MAX_FILE_SIZE) size: bytes(LIMITS.MAX_FILE_SIZE)
})}</li> })}</li>
<li>${state.translate('accountBenefitExpiry')}</li> <li>${state.translate('accountBenefitExpiry')}</li>
<li>${state.translate('accountBenefitExpiryTwo')}</li>
<li>${state.translate('accountBenefitSync')}</li> <li>${state.translate('accountBenefitSync')}</li>
</ul> </ul>
</p>
<form <form
onsubmit=${submitEmail} onsubmit=${submitEmail}
data-no-csrf> data-no-csrf>
@ -26,7 +25,7 @@ module.exports = function(trigger) {
id="email-input" id="email-input"
type="text" type="text"
class="${hidden} border rounded-lg w-full px-2 py-1 h-12 mb-4 text-lg text-grey-darker leading-loose" class="${hidden} border rounded-lg w-full px-2 py-1 h-12 mb-4 text-lg text-grey-darker leading-loose"
placeholder=${state.translate('emailEntryPlaceholder')} /> placeholder=${state.translate('emailEntryPlaceholderUpdate')} />
<input <input
class="btn rounded-lg w-full flex flex-no-shrink items-center justify-center" class="btn rounded-lg w-full flex flex-no-shrink items-center justify-center"
value="${state.translate('signInMenuOption')}" value="${state.translate('signInMenuOption')}"

View File

@ -69,7 +69,7 @@ function outdatedStrings(state) {
function unsupportedStrings(state) { function unsupportedStrings(state) {
return { return {
header: state.translate('notSupportedHeader'), header: state.translate('notSupportedHeader'),
description: state.translate('notSupportedDetail'), description: state.translate('notSupportedDetailUpdate'),
button: state.translate('downloadFirefoxButtonSub') button: state.translate('downloadFirefoxButtonSub')
}; };
} }

View File

@ -57,7 +57,7 @@ const LOCALIZE_NUMBERS = !!(
); );
const UNITS = ['B', 'kB', 'MB', 'GB']; const UNITS = ['B', 'kB', 'MB', 'GB'];
function bytes(num) { function bytes(num, decimalDigits = 1) {
if (num < 1) { if (num < 1) {
return '0B'; return '0B';
} }
@ -68,8 +68,8 @@ function bytes(num) {
try { try {
const locale = document.querySelector('html').lang; const locale = document.querySelector('html').lang;
nStr = n.toLocaleString(locale, { nStr = n.toLocaleString(locale, {
minimumFractionDigits: 1, minimumFractionDigits: decimalDigits,
maximumFractionDigits: 1 maximumFractionDigits: decimalDigits
}); });
} catch (e) { } catch (e) {
// fall through // fall through

View File

@ -1,6 +1,5 @@
# Firefox Send is a brand name and should not be localized. # Firefox Send is a brand name and should not be localized.
title = Firefox Send title = Firefox Send
siteSubtitle = web experiment
siteFeedback = Feedback siteFeedback = Feedback
uploadPageHeader = Private, Encrypted File Sharing uploadPageHeader = Private, Encrypted File Sharing
uploadPageExplainer = Send files through a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. uploadPageExplainer = Send files through a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever.
@ -16,9 +15,9 @@ importingFile = Importing…
verifyingFile = Verifying… verifyingFile = Verifying…
encryptingFile = Encrypting… encryptingFile = Encrypting…
decryptingFile = Decrypting… decryptingFile = Decrypting…
notifyUploadDone = Your upload has finished. notifyUploadEncryptDone = Your file is encrypted and ready to send.
uploadingPageMessage = Once your file uploads you will be able to set expiry options. uploadingPageMessage = Once your file uploads you will be able to set expiry options.
uploadingPageCancel = Cancel upload uploadingPageCancel = Cancel
uploadCancelNotification = Your upload was cancelled. uploadCancelNotification = Your upload was cancelled.
downloadCancel = Cancel download downloadCancel = Cancel download
uploadingPageLargeFileMessage = This file is large and may take a while to upload. Sit tight! uploadingPageLargeFileMessage = This file is large and may take a while to upload. Sit tight!
@ -52,9 +51,9 @@ fileCount = { $num ->
[one] 1 file [one] 1 file
*[other] { $num } files *[other] { $num } files
} }
totalSize = Total Size: { $size } totalSize = Total size: { $size }
copyUrlFormLabelWithName = Copy and share the link to send your file: { $filename } copyUrlFormLabel = Copy the link to share your file:
copyUrlFormButton = Copy to clipboard copyUrlFormButtonText = Copy link
copiedUrl = Copied! copiedUrl = Copied!
deleteFileButton = Delete file deleteFileButton = Delete file
sendAnotherFileLink = Send another file sendAnotherFileLink = Send another file
@ -71,13 +70,15 @@ downloadFileSize = ({ $size })
unlockInputLabel = Enter Password unlockInputLabel = Enter Password
unlockInputPlaceholder = Password unlockInputPlaceholder = Password
unlockButtonLabel = Unlock unlockButtonLabel = Unlock
downloadFileTitle = Download Encrypted File downloadFilesTitle = Download Files
downloadFileText = {$name} was encrypted with Firefox Send, and will expire after { $timeSpan } or { $downloadCount }.
# Firefox Send is a brand name and should not be localized. # Firefox Send is a brand name and should not be localized.
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. 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.
# Text and title used on the download link/button (indicates an action). # Text and title used on the download link/button (indicates an action).
downloadButtonLabel = Download downloadButtonLabel = Download
downloadNotification = Your download has completed. downloadNotification = Your download has completed.
downloadFinish = Download Complete downloadFinish = Download Complete
downloadFinishText = Try Firefox Send for simple, safe file sharing.
# This message is displayed when uploading or downloading a file, e.g. "(1,3 MB of 10 MB)". # This message is displayed when uploading or downloading a file, e.g. "(1,3 MB of 10 MB)".
fileSizeProgress = ({ $partialSize } of { $totalSize }) fileSizeProgress = ({ $partialSize } of { $totalSize })
# Firefox Send is a brand name and should not be localized. # Firefox Send is a brand name and should not be localized.
@ -98,10 +99,10 @@ tooManyArchives = { $count ->
*[other] Only { $count } archives are allowed. *[other] Only { $count } archives are allowed.
} }
linkExpiredAlt = Link expired linkExpiredAlt = Link expired
expiredPageHeader = This link has expired or never existed in the first place! expiredPageHeaderUpdate = This link has expired.
notSupportedHeader = Your browser is not supported. notSupportedHeader = Your browser is not supported.
# Firefox Send is a brand name and should not be localized. # Firefox Send is a brand name and should not be localized.
notSupportedDetail = Unfortunately this browser does not support the web technology that powers Firefox Send. Youll need to try another browser. We recommend Firefox! notSupportedDetailUpdate = Firefox Send will not work with this browser. Send works best with the latest version of Firefox, and will work with the current version of most browsers.
notSupportedLink = Why is my browser not supported? notSupportedLink = Why is my browser not supported?
notSupportedOutdatedDetail = Unfortunately this version of Firefox does not support the web technology that powers Firefox Send. Youll need to update your browser. notSupportedOutdatedDetail = Unfortunately this version of Firefox does not support the web technology that powers Firefox Send. Youll need to update your browser.
updateFirefox = Update Firefox updateFirefox = Update Firefox
@ -121,8 +122,6 @@ deletePopupCancel = Cancel
deleteButtonHover = Delete deleteButtonHover = Delete
copyUrlHover = Copy URL copyUrlHover = Copy URL
footerLinkLegal = Legal footerLinkLegal = Legal
# Test Pilot is a proper name and should not be localized.
footerLinkAbout = About Test Pilot
footerLinkPrivacy = Privacy footerLinkPrivacy = Privacy
footerLinkTerms = Terms footerLinkTerms = Terms
footerLinkPrivacyAndTerms = Privacy & Terms footerLinkPrivacyAndTerms = Privacy & Terms
@ -149,9 +148,10 @@ maxPasswordLength = Maximum password length: { $length }
passwordSetError = This password could not be set passwordSetError = This password could not be set
pageHeaderCredits = from the makers of Firefox pageHeaderCredits = from the makers of Firefox
addFilesButton = Add file(s) addFilesButton = Add file(s)
addFilesButtonWithSize = Add file(s) up to { $size }
uploadFilesButton = Upload uploadFilesButton = Upload
uploadDropDragMessage = Drop files here uploadDropDragMessage = Drop files here
uploadDropClickMessage = or click to select a file uploadDropButtonMessage = or click to select files
addPasswordMessage = Protect with password addPasswordMessage = Protect with password
addPasswordLabel = Password: addPasswordLabel = Password:
copyUrlLabel = Copy and share this link: copyUrlLabel = Copy and share this link:
@ -162,15 +162,18 @@ signInLearnMore = Learn more!
downloadProgressButton = Downloading... { $progress } downloadProgressButton = Downloading... { $progress }
downloadMessage2 = Firefox Send lets you share files with a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. downloadMessage2 = Firefox Send lets you share files with a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever.
signInEmailEnter = Enter your Email signInEmailEnter = Enter your Email
emailEntryPlaceholder = Email emailEntryPlaceholder = Enter your email
signInSizeBump = Sign in to send up to {$size}
signInContinueMessage = to continue to Firefox Send signInContinueMessage = to continue to Firefox Send
signInContinueButton = Continue signInContinueButton = Continue
signInMenuOption = Sign in/up signInMenuOption = Sign in/up
signInNextOption = Continue
accountMenuOption = Firefox Account accountMenuOption = Firefox Account
accountBenefitTitle = With a free Firefox Account with Send you can: accountBenefitTitle = Create a Firefox Account or sign in to:
accountBenefitLargeFiles = Upload larger files (up to { $size }) accountBenefitLargeFiles = Share files up to { $size}
accountBenefitExpiry = Have more expiry options accountBenefitExpiry = Share files with more people
accountBenefitSync = Manage your uploads across devices accountBenefitExpiryTwo = Keep links active for up to { days } days
accountBenefitSync = Manage shared files from any device
manageAccount = Manage Account manageAccount = Manage Account
logOut = Sign Out logOut = Sign Out
okButton = Ok okButton = Ok