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

View File

@ -1,4 +1,4 @@
/* global Android */
/* global Android LIMITS */
const html = require('choo/html');
const raw = require('choo/html/raw');
@ -266,8 +266,8 @@ module.exports.wip = function(state, emit) {
onchange="${add}"
/>
<div
for="file-upload"
class="flex flex-row items-center justify-between w-full p-2"
title="${state.translate('addFilesButton')}"
>
<label
for="file-upload"
@ -278,7 +278,9 @@ module.exports.wip = function(state, emit) {
${state.translate('addFilesButton')}
</label>
<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>
@ -370,8 +372,8 @@ module.exports.uploading = function(state, emit) {
<button
class="text-blue-dark hover:text-blue-darker focus:text-blue-darker self-end font-medium"
onclick=${cancel}
title="${state.translate('uploadingPageCancel')}">
${state.translate('uploadingPageCancel')}
title="${state.translate('uploadingPageCancelShort')}">
${state.translate('uploadingPageCancelShort')}
</button>
</send-upload-area>`;
@ -383,6 +385,15 @@ module.exports.uploading = 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`
<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"
@ -398,8 +409,8 @@ module.exports.empty = function(state, emit) {
>
${state.translate('uploadDropDragMessage')}
</div>
<div class="text-center text-base italic">
${state.translate('uploadDropClickMessage')}
<div class="pb-6 text-center text-base">
${state.translate('uploadDropButtonMessage')}
</div>
<input
id="file-upload"
@ -415,10 +426,15 @@ module.exports.empty = function(state, emit) {
for="file-upload"
role="button"
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>
${upsell}
</send-upload-area>
`;

View File

@ -7,9 +7,12 @@ module.exports = function(name, url) {
<send-copy-dialog
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">
${state.translate('copyUrlFormLabelWithName', { filename: name })}
${state.translate('copyUrlFormLabel')} <br />
${name}
</p>
<input
type="text"
@ -21,9 +24,9 @@ module.exports = function(name, url) {
<button
class="btn rounded-lg w-full flex-no-shrink focus:outline"
onclick="${copy}"
title="${state.translate('copyUrlFormButton')}"
title="${state.translate('copyUrlFormButtonText')}"
>
${state.translate('copyUrlFormButton')}
${state.translate('copyUrlFormButtonText')}
</button>
<button
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
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
class="flex flex-row flex-no-wrap w-full md:w-4/5"
onsubmit="${checkPassword}"
@ -118,15 +118,17 @@ module.exports = function(state, emit) {
content = html`
<div
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">
${state.translate('downloadFinish')}
</h1>
<p class="pb-2">${state.translate('downloadFinishText')}</p>
<p class="mb-4">
<a
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
>
</p>
@ -136,7 +138,14 @@ module.exports = function(state, emit) {
default:
content = html`
<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)}
</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"
>
<h1 class="text-pink-dark text-2xl text-center">
${state.translate('expiredPageHeader')}
${state.translate('expiredPageHeaderUpdate')}
</h1>
<img
class="my-16"
src="${assets.get('illustration_expired.svg')}"
id="expired-img"
/>
<p class="max-w-md leading-normal">
${state.translate('uploadPageExplainer')}
<p class="pb-2">${state.translate('downloadFinishText')}</p>
<p class="mb-4">
<a
href="/"
class="btn rounded-lg flex items-center mt-4"
role="button"
>${state.translate('sendYourFilesLink')}</a
>
</p>
<a class="text-blue mt-10 font-medium" href="/">
${state.translate('sendYourFilesLink')}
</a>
</div>
</main>
`;

View File

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

View File

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

View File

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

View File

@ -1,6 +1,5 @@
# Firefox Send is a brand name and should not be localized.
title = Firefox Send
siteSubtitle = web experiment
siteFeedback = Feedback
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.
@ -16,9 +15,9 @@ importingFile = Importing…
verifyingFile = Verifying…
encryptingFile = Encrypting…
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.
uploadingPageCancel = Cancel upload
uploadingPageCancel = Cancel
uploadCancelNotification = Your upload was cancelled.
downloadCancel = Cancel download
uploadingPageLargeFileMessage = This file is large and may take a while to upload. Sit tight!
@ -52,9 +51,9 @@ fileCount = { $num ->
[one] 1 file
*[other] { $num } files
}
totalSize = Total Size: { $size }
copyUrlFormLabelWithName = Copy and share the link to send your file: { $filename }
copyUrlFormButton = Copy to clipboard
totalSize = Total size: { $size }
copyUrlFormLabel = Copy the link to share your file:
copyUrlFormButtonText = Copy link
copiedUrl = Copied!
deleteFileButton = Delete file
sendAnotherFileLink = Send another file
@ -71,13 +70,15 @@ downloadFileSize = ({ $size })
unlockInputLabel = Enter Password
unlockInputPlaceholder = Password
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.
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).
downloadButtonLabel = Download
downloadNotification = Your download has completed.
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)".
fileSizeProgress = ({ $partialSize } of { $totalSize })
# Firefox Send is a brand name and should not be localized.
@ -98,10 +99,10 @@ tooManyArchives = { $count ->
*[other] Only { $count } archives are allowed.
}
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.
# 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?
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
@ -121,8 +122,6 @@ deletePopupCancel = Cancel
deleteButtonHover = Delete
copyUrlHover = Copy URL
footerLinkLegal = Legal
# Test Pilot is a proper name and should not be localized.
footerLinkAbout = About Test Pilot
footerLinkPrivacy = Privacy
footerLinkTerms = Terms
footerLinkPrivacyAndTerms = Privacy & Terms
@ -149,9 +148,10 @@ maxPasswordLength = Maximum password length: { $length }
passwordSetError = This password could not be set
pageHeaderCredits = from the makers of Firefox
addFilesButton = Add file(s)
addFilesButtonWithSize = Add file(s) up to { $size }
uploadFilesButton = Upload
uploadDropDragMessage = Drop files here
uploadDropClickMessage = or click to select a file
uploadDropButtonMessage = or click to select files
addPasswordMessage = Protect with password
addPasswordLabel = Password:
copyUrlLabel = Copy and share this link:
@ -162,15 +162,18 @@ signInLearnMore = Learn more!
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.
signInEmailEnter = Enter your Email
emailEntryPlaceholder = Email
emailEntryPlaceholder = Enter your email
signInSizeBump = Sign in to send up to {$size}
signInContinueMessage = to continue to Firefox Send
signInContinueButton = Continue
signInMenuOption = Sign in/up
signInNextOption = Continue
accountMenuOption = Firefox Account
accountBenefitTitle = With a free Firefox Account with Send you can:
accountBenefitLargeFiles = Upload larger files (up to { $size })
accountBenefitExpiry = Have more expiry options
accountBenefitSync = Manage your uploads across devices
accountBenefitTitle = Create a Firefox Account or sign in to:
accountBenefitLargeFiles = Share files up to { $size}
accountBenefitExpiry = Share files with more people
accountBenefitExpiryTwo = Keep links active for up to { days } days
accountBenefitSync = Manage shared files from any device
manageAccount = Manage Account
logOut = Sign Out
okButton = Ok