Skip to content

Commit

Permalink
Merge pull request #6543 from freedomofpress/2421-use-consistent-term…
Browse files Browse the repository at this point in the history
…inology

Use Consistent Terminology Regarding Documents, Files, Messages, and Submissions
  • Loading branch information
zenmonkeykstop committed Sep 15, 2022
2 parents 4d70851 + ea746fe commit 542b59d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion securedrop/journalist_templates/col.html
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
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
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
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
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
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
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
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
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

0 comments on commit 542b59d

Please sign in to comment.