diff --git a/.travis.yml b/.travis.yml index d2cb9a7aa..2915dcc3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ install: - yarn install script: - yarn run generate - - yarn prepare-build + - yarn prepare-beta-build - yarn eslint - yarn test-server - yarn lint diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b6ed1662b..814fff7be 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -19,79 +19,65 @@ "message": "&Help", "description": "The label that is used for the Help menu in the program main menu. The '&' indicates that the following letter will be used as the keyboard 'shortcut letter' for accessing the menu with the Alt- combination." }, + "menuSetupWithImport": { + "message": "Set up with import", + "description": "When the application is not yet set up, menu option to start up the import sequence" + }, + "menuSetupAsNewDevice": { + "message": "Set up as new device", + "description": "When the application is not yet set up, menu option to start up the set up as fresh device" + }, + "menuSetupAsStandalone": { + "message": "Set up as standalone device", + "description": "Only available on development modes, menu option to open up the standalone device setup sequence" + }, "loading": { "message": "Loading...", "description": "Message shown on the loading screen before we've loaded any messages" }, - "exportInstructions": { - "message": "The first step is to choose a directory to store this application's exported data. It will contain your message history and sensitive cryptographic data, so be sure to save it somewhere private.", - "description": "Description of the export process" - }, "chooseDirectory": { - "message": "Choose directory", - "description": "Button to allow the user to export all data from app as part of migration process" - }, - "exportButton": { - "message": "Export", - "desription": "Button shown on the choose directory dialog which starts the export process" - }, - "exportChooserTitle": { - "message": "Choose target directory for data", - "description": "Title of the popup window used to select data storage location" - }, - "exportAgain": { - "message": "Export again", - "description": "If user has already exported once, this button allows user to do it again if needed" - }, - "exportError": { - "message": "Unfortunately, something went wrong during the export. First, double-check your target empty directory for write access and enough space. Then, please submit a debug log so we can help you get migrated!", - "description": "Helper text if the user went forward on migrating the app, but ran into an error" - }, - "exporting": { - "message": "Please wait while we export your data. It may take several minutes. You can still use Signal on your phone and other devices during this time.", - "description": "Message shown on the migration screen while we export data" - }, - "exportComplete": { - "message": "Your data has been exported to:

$location$

You'll be able to import this data as you set up the new Signal Desktop.", - "description": "Message shown on the migration screen when we are done exporting data", - "placeholders": { - "location": { - "content": "$1", - "example": "/Users/someone/somewhere" - } - } + "message": "Choose folder", + "description": "Button to allow the user to find a folder on disk" }, - "installNewSignal": { - "message": "Install new Signal Desktop", - "description": "When export is complete, a button shows which sends user to Signal Desktop install instructions" + "loadDataHeader": { + "message": "Load your data", + "description": "Header shown on the first screen in the data import process" }, - "importButton": { - "message": "Import", - "desription": "Button shown on the choose directory dialog which starts the import process" + "loadDataDescription": { + "message": "You've just gone through the export process, and your contacts and messages are waiting patiently on your computer. Select the folder that contains your saved Signal data.", + "description": "Introduction to the process of importing messages and contacts from disk" }, "importChooserTitle": { "message": "Choose directory with exported data", "description": "Title of the popup window used to select data previously exported" }, + "importErrorHeader": { + "message": "Something went wrong!", + "description": "Header of the error screen after a failed import" + }, + "importingHeader": { + "message": "Loading contacts and messages", + "description": "Header of screen shown as data is import" + }, "importError": { - "message": "Unfortunately, something went wrong during the import.

First, double-check your target directory. It should start with 'Signal Export.'

Next, try with a new export of your data from the Chrome App.

If that still fails, please submit a debug log so we can help you get migrated!", + "message": "Make sure you have chosen the correct directory that contains your saved Signal data. Its name should begin with 'Signal Export.' You can also save a new copy of your data from the Chrome App.

If these steps don't work for you, please submit a debug log so that we can help you get migrated!

", "description": "Message shown if the import went wrong." }, - "tryAgain": { - "message": "Try again", + "importAgain": { + "message": "Choose folder and try again", "description": "Button shown if the user runs into an error during import, allowing them to start over" }, - "importInstructions": { - "message": "The first step is to tell us where you previously exported your Signal data. It will be a directory whose name starts with 'Signal Export.'

NOTE: You must only import a set of exported data once. Import makes a copy of the exported client, and duplicate clients interfere with each other.", - "description": "Description of the export process" + "importCompleteHeader": { + "message": "Success!", + "description": "Header shown on the screen at the end of a successful import process" }, - "importing": { - "message": "Please wait while we import your data...", - "description": "Shown as we are loading the user's data from disk" + "importCompleteStartButton": { + "message": "Start using Signal Desktop", + "description": "Button shown at end of successful import process, nothing left but a restart" }, - "importComplete": { - "message": "We've successfully loaded your data. The next step is to restart the application!", - "description": "Shown when the import is complete." + "importCompleteLinkButton": { + "message": "Link this device to your phone", + "description": "Button shown at end of successful 'light' import process, so the standard linking process still needs to happen" }, "selectedLocation": { "message": "your selected location", @@ -526,86 +512,45 @@ "message": "Privacy is possible. Signal makes it easy.", "description": "Tagline displayed under 'installWelcome' string on the install page" }, - "installNew": { - "message": "Set up as new install", - "description": "One of two choices presented on the screen shown on first launch" - }, - "installImport": { - "message": "Set up with exported data", - "description": "One of two choices presented on the screen shown on first launch" - }, - "installGetStartedButton": { - "message": "Get started" - }, - "installSignalLink": { - "message": "First, install Signal on your mobile phone. We'll link your devices and keep your messages in sync.", - "description": "Prompt the user to install Signal on their phone before linking", - "placeholders": { - "a_params": { - "content": "$1", - "example": "href='http://example.com'" - } - } + "linkYourPhone": { + "message": "Link your phone to Signal Desktop", + "description": "Shown on the front page when the application first starst, above the QR code" }, - "installSignalLinks": { - "message": "First, install Signal on your Android or iPhone.
We'll link your devices and keep your messages in sync.", - "description": "Prompt the user to install Signal on their phone before linking", - "placeholders": { - "play_store": { - "content": "$1", - "example": "href='http://example.com'" - }, - "app_store": { - "content": "$2", - "example": "href='http://example.com'" - } - } + "signalSettings": { + "message": "Signal Settings", + "description": "Used in the guidance to help people find the 'link new device' area of their Signal mobile app" }, - "installGotIt": { - "message": "Got it", - "description": "Button for the user to confirm that they have Signal installed." - }, - "installIHaveSignalButton": { - "message": "I have Signal for Android", - "description": "Button for the user to confirm that they have Signal for Android" - }, - "installFollowUs": { - "message": "Follow us for updates about multi-device support for iOS.", - "placeholders": { - "a_params": { - "content": "$1", - "example": "href='http://example.com'" - } - } + "linkedDevices": { + "message": "Linked Devices", + "description": "Used in the guidance to help people find the 'link new device' area of their Signal mobile app" }, - "installAndroidInstructions": { - "message": "Open Signal on your phone and navigate to Settings > Linked devices. Tap the button to add a new device, then scan the code above." + "plusButton": { + "message": "'+' Button", + "description": "The button used in Signal Android to add a new linked device" }, - "installConnecting": { - "message": "Connecting...", - "description": "Displayed when waiting for the QR Code" + "linkNewDevice": { + "message": "Link New Device", + "description": "The menu option shown in Signal iOS to add a new linked device" }, - "installConnectionFailed": { - "message": "Failed to connect to server.", - "description": "Displayed when we can't connect to the server." - }, - "installGeneratingKeys": { - "message": "Generating Keys" + "deviceName": { + "message": "Device name", + "description": "The label in settings panel shown for the user-provided name for this desktop instance" }, - "installSyncingGroupsAndContacts": { - "message": "Syncing groups and contacts" + "chooseDeviceName": { + "message": "Choose this device's name", + "description": "The header shown on the 'choose device name' screen in the device linking process" }, - "installComputerName": { - "message": "This computer's name will be", - "description": "Text displayed before the input where the user can enter the name for this device." + "finishLinkingPhone": { + "message": "Finish linking phone", + "description": "The text on the button to finish the linking process, after choosing the device name" }, - "installLinkingWithNumber": { - "message": "Linking with", - "description": "Text displayed before the phone number that the user is in the process of linking with" + "initialSync": { + "message": "Syncing contacts and groups", + "description": "Shown during initial link while contacts and groups are being pulled from mobile device" }, - "installFinalButton": { - "message": "Looking good", - "description": "The final button for the install process, after the user has entered a name for their device" + "installConnectionFailed": { + "message": "Failed to connect to server.", + "description": "Displayed when we can't connect to the server." }, "installTooManyDevices": { "message": "Sorry, you have too many devices linked already. Try removing some." diff --git a/app/menu.js b/app/menu.js index f12c6a35b..ce3111258 100644 --- a/app/menu.js +++ b/app/menu.js @@ -6,6 +6,9 @@ function createTemplate(options, messages) { openNewBugForm, openSupportPage, openForums, + setupWithImport, + setupAsNewDevice, + setupAsStandalone, } = options; const template = [{ @@ -123,6 +126,27 @@ function createTemplate(options, messages) { ], }]; + if (options.includeSetup) { + const fileMenu = template[0]; + + // These are in reverse order, since we're prepending them one at a time + if (options.development) { + fileMenu.submenu.unshift({ + label: messages.menuSetupAsStandalone.message, + click: setupAsStandalone, + }); + } + + fileMenu.submenu.unshift({ + label: messages.menuSetupAsNewDevice.message, + click: setupAsNewDevice, + }); + fileMenu.submenu.unshift({ + label: messages.menuSetupWithImport.message, + click: setupWithImport, + }); + } + if (process.platform === 'darwin') { return updateForMac(template, messages, options); } @@ -134,14 +158,46 @@ function updateForMac(template, messages, options) { const { showWindow, showAbout, + setupWithImport, + setupAsNewDevice, + setupAsStandalone, } = options; // Remove About item and separator from Help menu, since it's on the first menu template[4].submenu.pop(); template[4].submenu.pop(); - // Replace File menu + // Remove File menu template.shift(); + + if (options.includeSetup) { + // Add a File menu just for these setup options. Because we're using unshift(), we add + // the file menu first, though it ends up to the right of the Signal Desktop menu. + const fileMenu = { + label: messages.mainMenuFile.message, + submenu: [ + { + label: messages.menuSetupWithImport.message, + click: setupWithImport, + }, + { + label: messages.menuSetupAsNewDevice.message, + click: setupAsNewDevice, + }, + ], + }; + + if (options.development) { + fileMenu.submenu.push({ + label: messages.menuSetupAsStandalone.message, + click: setupAsStandalone, + }); + } + + template.unshift(fileMenu); + } + + // Add the OSX-specific Signal Desktop menu at the far left template.unshift({ submenu: [ { @@ -170,7 +226,8 @@ function updateForMac(template, messages, options) { }); // Add to Edit menu - template[1].submenu.push( + const editIndex = options.includeSetup ? 2 : 1; + template[editIndex].submenu.push( { type: 'separator', }, diff --git a/appveyor.yml b/appveyor.yml index 8f0ffee4e..f7a95d3a9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,7 +19,7 @@ build_script: - node build\grunt.js - type package.json | findstr /v certificateSubjectName > temp.json - move temp.json package.json - - yarn prepare-build + - yarn prepare-beta-build - node_modules\.bin\build --em.environment=%SIGNAL_ENV% --publish=never test_script: diff --git a/background.html b/background.html index 193e4a19b..10233e918 100644 --- a/background.html +++ b/background.html @@ -571,6 +571,9 @@

{{ settings }}

+
+ {{ deviceNameLabel }}: {{ deviceName }} +

{{ theme }}

@@ -652,151 +655,198 @@ {{/action }} - - - -