Skip to content

Commit

Permalink
chore: standardize on "drive" for USB export devices
Browse files Browse the repository at this point in the history
Per feedback from Localization Lab that "device" is ambiguous out of
context.
  • Loading branch information
cfm committed Nov 28, 2024
1 parent e5402cd commit 4ac928e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ class Pages(IntEnum):

# Human-readable status info
STATUS_MESSAGES = {
ExportStatus.NO_DEVICE_DETECTED: _("No device detected"),
ExportStatus.NO_DEVICE_DETECTED: _("No USB drives detected"),
ExportStatus.MULTI_DEVICE_DETECTED: _(
"Too many USB devices detected; please insert one supported device."
"Too many USB drives detected; please insert one supported drive."
),
ExportStatus.INVALID_DEVICE_DETECTED: _(
"Either the drive is not encrypted or there is something else wrong with it."
"<br />"
"If this is a VeraCrypt drive, please unlock it from within "
"the sd-devices VM, then try again."
),
ExportStatus.DEVICE_WRITABLE: _("The device is ready for export."),
ExportStatus.DEVICE_LOCKED: _("The device is locked."),
ExportStatus.DEVICE_WRITABLE: _("The drive is ready for export."),
ExportStatus.DEVICE_LOCKED: _("The drive is locked."),
ExportStatus.ERROR_UNLOCK_LUKS: _("The passphrase provided did not work. Please try again."),
ExportStatus.ERROR_MOUNT: _("Error mounting drive"),
ExportStatus.ERROR_EXPORT: _("Error during export"),
ExportStatus.ERROR_UNMOUNT_VOLUME_BUSY: _(
"Files were exported successfully, but the USB device could not be unmounted."
"Files were exported successfully, but the USB drive could not be unmounted."
),
ExportStatus.ERROR_EXPORT_CLEANUP: _(
"Files were exported successfully, but some temporary files remain on disk. "
"Reboot to remove them."
),
ExportStatus.SUCCESS_EXPORT: _("Export successful"),
ExportStatus.DEVICE_ERROR: _(
"Error encountered with this device. See your administrator for help."
"Error encountered with this drive. See your administrator for help."
),
ExportStatus.ERROR_MISSING_FILES: _("Files were moved or missing and could not be exported."),
ExportStatus.CALLED_PROCESS_ERROR: _("Error encountered. Please contact support."),
Expand Down
12 changes: 6 additions & 6 deletions client/securedrop_client/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -294,19 +294,19 @@ msgstr ""
msgid "BACK"
msgstr ""

msgid "No device detected"
msgid "No USB drives detected"
msgstr ""

msgid "Too many USB devices detected; please insert one supported device."
msgid "Too many USB drives detected; please insert one supported drive."
msgstr ""

msgid "Either the drive is not encrypted or there is something else wrong with it.<br />If this is a VeraCrypt drive, please unlock it from within the sd-devices VM, then try again."
msgstr ""

msgid "The device is ready for export."
msgid "The drive is ready for export."
msgstr ""

msgid "The device is locked."
msgid "The drive is locked."
msgstr ""

msgid "The passphrase provided did not work. Please try again."
Expand All @@ -318,7 +318,7 @@ msgstr ""
msgid "Error during export"
msgstr ""

msgid "Files were exported successfully, but the USB device could not be unmounted."
msgid "Files were exported successfully, but the USB drive could not be unmounted."
msgstr ""

msgid "Files were exported successfully, but some temporary files remain on disk. Reboot to remove them."
Expand All @@ -327,7 +327,7 @@ msgstr ""
msgid "Export successful"
msgstr ""

msgid "Error encountered with this device. See your administrator for help."
msgid "Error encountered with this drive. See your administrator for help."
msgstr ""

msgid "Files were moved or missing and could not be exported."
Expand Down
4 changes: 2 additions & 2 deletions export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Printer support is currently limited to a subset of Brother and HP printers that

## Supported Export Devices

Export to LUKS-encrypted or VeraCrypt-encrypted USB devices is supported.
Export to LUKS-encrypted or VeraCrypt-encrypted USB drives is supported.

### LUKS
Partition a drive (either the MBR/DOS or the GPT partition scheme is fine)
Expand Down Expand Up @@ -114,7 +114,7 @@ The supported device types for export are as follows, including the possible err
Note: locked VeraCrypt drives also return this status, and a hint is shown to the user that they must
manually unlock such drives before proceeding.
- `DEVICE_LOCKED` if a supported drive is inserted but locked (a LUKS drive, since locked Veracrypt detection is not supported)
- `DEVICE_WRITABLE` if a supported USB device is attached and unlocked. (Only used for Preflight check)
- `DEVICE_WRITABLE` if a supported USB drive is attached and unlocked. (Only used for Preflight check)
- `DEVICE_ERROR`: A problem was encountered and device state cannot be reported.

2. `disk`: Attempts to send files to disk. Can return any Preflight status except `DEVICE_WRITABLE`, as well as
Expand Down
2 changes: 1 addition & 1 deletion export/files/application-x-sd-export.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-sd-export">
<comment>Archive for transfering files from the SecureDrop workstation to an external USB device.</comment>
<comment>Archive for transfering files from the SecureDrop workstation to an external USB drive.</comment>
<glob pattern="*.sd-export"/>
</mime-type>
</mime-info>

0 comments on commit 4ac928e

Please sign in to comment.