Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Consistent Terminology Regarding Documents, Files, Messages, and Submissions #6543

Merged
merged 5 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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 securedrop/journalist_templates/col.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1 class="visually-hidden">{{ source.journalist_designation }}</h1>

{% with %}
{% if doc.filename.endswith('-doc.gz.gpg') %}
{% set type = gettext('Uploaded Document') %}
{% set type = gettext('Uploaded File') %}
{% set icon = 'files' %}
{% elif doc.filename.endswith('-reply.gpg') %}
{% set type = gettext('Reply') %}
Expand Down
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h2 id="config-preventuploads">{{ gettext('Submission Preferences') }}</h2>
<div class="config_form_element">
{{ submission_preferences_form.prevent_document_uploads() }}
<label
for="prevent_document_uploads">{{ gettext('Prevent sources from uploading documents. Sources will still be able to send messages.') }}</label>
for="prevent_document_uploads">{{ gettext('Prevent sources from uploading files. Sources will still be able to send messages.') }}</label>
</div>

<div class="config_form_element">
Expand Down
4 changes: 2 additions & 2 deletions securedrop/journalist_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1 id="all-sources-heading" class="headline">{{ gettext('All Sources') }}</h1>
<thead hidden aria-hidden="false">
<tr>
<th scope="col">{{ gettext('Designation') }}</th>
<th scope="col">{{ gettext('Documents') }}</th>
<th scope="col">{{ gettext('Files') }}</th>
<th scope="col">{{ gettext('Messages') }}</th>
<th scope="col">{{ gettext('Unread') }}</th>
<th scope="col">{{ gettext('Date') }}</th>
Expand Down Expand Up @@ -77,7 +77,7 @@ <h1 id="all-sources-heading" class="headline">{{ gettext('All Sources') }}</h1>
</table>
</form>
{% else %}
<p>{{ gettext('No documents have been submitted!') }}</p>
<p>{{ gettext('There are no submissions!') }}</p>
{% endif %}
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion securedrop/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def get_args() -> argparse.ArgumentParser:
parser.add_argument(
"--store-dir",
default=config.STORE_DIR,
help=("directory in which the documents are stored"),
help=("directory in which the files are stored"),
)
subps = parser.add_subparsers()
# Add/remove journalists + admins
Expand Down
4 changes: 2 additions & 2 deletions securedrop/source_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ def submit(logged_in_source: SourceUser) -> werkzeug.Response:
elif msg and not fh:
html_contents = gettext("Thanks! We received your message.")
elif fh and not msg:
html_contents = gettext("Thanks! We received your document.")
html_contents = gettext("Thanks! We received your file.")
else:
html_contents = gettext("Thanks! We received your message and document.")
html_contents = gettext("Thanks! We received your file and message.")

flash_msg("success", gettext("Success!"), html_contents)

Expand Down
2 changes: 1 addition & 1 deletion securedrop/source_templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ gettext('Powered by') }} <b>SecureDrop {{ version }}</b>.
</p>
<p id="footer-advisory">
{{ gettext('Please note: Sharing sensitive documents may put you at risk, even when using Tor and SecureDrop.') }}
{{ gettext('Please note: Sharing sensitive information may put you at risk, even when using Tor and SecureDrop.') }}
</p>
<p id="footer-fpf">
{{ gettext('SecureDrop is a project of Freedom of the Press Foundation.') }}
Expand Down
2 changes: 1 addition & 1 deletion securedrop/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def test_delete_collection(mocker, source_app, journalist_app, test_journo):
in text
)

assert "No documents have been submitted!" in text
assert "There are no submissions!" in text

# Make sure the collection is deleted from the filesystem
def assertion():
Expand Down
2 changes: 1 addition & 1 deletion securedrop/tests/test_journalist.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def test_login_valid_credentials(config, journalist_app, test_journo, locale):
follow_redirects=True,
)
assert page_language(resp.data) == language_tag(locale)
msgids = ["All Sources", "No documents have been submitted!"]
msgids = ["All Sources", "There are no submissions!"]
with xfail_untranslated_messages(config, locale, msgids):
resp_text = resp.data.decode("utf-8")
for msgid in msgids:
Expand Down
4 changes: 2 additions & 2 deletions securedrop/tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def test_submit_file(source_app):
)
assert resp.status_code == 200
text = resp.data.decode("utf-8")
assert "Thanks! We received your document" in text
assert "Thanks! We received your file" in text


def test_submit_both(source_app):
Expand All @@ -481,7 +481,7 @@ def test_submit_both(source_app):
)
assert resp.status_code == 200
text = resp.data.decode("utf-8")
assert "Thanks! We received your message and document" in text
assert "Thanks! We received your file and message" in text


def test_submit_antispam(source_app):
Expand Down