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

fix: use Internet-Draft more consistently across the UI #5104

Merged
merged 13 commits into from
Feb 11, 2023
2 changes: 1 addition & 1 deletion bin/daily
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $DTDIR/ietf/manage.py populate_yang_model_dirs -v0
# Re-run yang checks on active documents
$DTDIR/ietf/manage.py run_yang_model_checks -v0

# Expire internet drafts
# Expire Internet-Drafts
# Enable when removed from /a/www/ietf-datatracker/scripts/Cron-runner:
$DTDIR/ietf/bin/expire-ids

Expand Down
12 changes: 6 additions & 6 deletions ietf/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def check_id_submission_directories(app_configs, **kwargs):
p = getattr(settings, s)
if not os.path.exists(p):
errors.append(checks.Critical(
"A directory used by the ID submission tool does not\n"
"A directory used by the I-D submission tool does not\n"
"exist at the path given in the settings file. The setting is:\n"
" %s = %s" % (s, p),
hint = ("Please either update the local settings to point at the correct\n"
Expand All @@ -134,7 +134,7 @@ def check_id_submission_files(app_configs, **kwargs):
p = getattr(settings, s)
if not os.path.exists(p):
errors.append(checks.Critical(
"A file used by the ID submission tool does not exist\n"
"A file used by the I-D submission tool does not exist\n"
"at the path given in the settings file. The setting is:\n"
" %s = %s" % (s, p),
hint = ("Please either update the local settings to point at the correct\n"
Expand Down Expand Up @@ -179,7 +179,7 @@ def check_id_submission_checkers(app_configs, **kwargs):
except Exception as e:
errors.append(checks.Critical(
"An exception was raised when trying to import the\n"
"draft submission checker class '%s':\n %s" % (checker_path, e),
"Internet-Draft submission checker class '%s':\n %s" % (checker_path, e),
hint = "Please check that the class exists and can be imported.\n",
id = "datatracker.E0008",
))
Expand All @@ -188,15 +188,15 @@ def check_id_submission_checkers(app_configs, **kwargs):
except Exception as e:
errors.append(checks.Critical(
"An exception was raised when trying to instantiate\n"
"the draft submission checker class '%s':\n %s" % (checker_path, e),
"the Internet-Draft submission checker class '%s':\n %s" % (checker_path, e),
hint = "Please check that the class can be instantiated.\n",
id = "datatracker.E0009",
))
continue
for attr in ('name',):
if not hasattr(checker, attr):
errors.append(checks.Critical(
"The draft submission checker\n '%s'\n"
"The Internet-Draft submission checker\n '%s'\n"
"has no attribute '%s', which is required" % (checker_path, attr),
hint = "Please update the class.\n",
id = "datatracker.E0010",
Expand All @@ -207,7 +207,7 @@ def check_id_submission_checkers(app_configs, **kwargs):
break
else:
errors.append(checks.Critical(
"The draft submission checker\n '%s'\n"
"The Internet-Draft submission checker\n '%s'\n"
" has no recognised checker method; "
"should be one or more of %s." % (checker_path, checker_methods),
hint = "Please update the class.\n",
Expand Down
2 changes: 1 addition & 1 deletion ietf/community/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ietf.person.fields import SearchablePersonField

class AddDocumentsForm(forms.Form):
documents = SearchableDocumentsField(label="Add documents to track", doc_type="draft")
documents = SearchableDocumentsField(label="Add Internet-Drafts to track", doc_type="draft")

class SearchRuleTypeForm(forms.Form):
rule_type = forms.ChoiceField(choices=[('', '--------------')] + SearchRule.RULE_TYPES)
Expand Down
6 changes: 3 additions & 3 deletions ietf/community/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class CommunityList(models.Model):

def long_name(self):
if self.user:
return 'Personal ID list of %s' % self.user.username
return 'Personal I-D list of %s' % self.user.username
elif self.group:
return 'ID list for %s' % self.group.name
return 'I-D list for %s' % self.group.name
else:
return 'ID list'
return 'I-D list'

def __str__(self):
return self.long_name()
Expand Down
4 changes: 2 additions & 2 deletions ietf/doc/expire.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright The IETF Trust 2010-2020, All Rights Reserved
# -*- coding: utf-8 -*-
# expiry of Internet Drafts
# expiry of Internet-Drafts


from django.conf import settings
Expand Down Expand Up @@ -179,7 +179,7 @@ def expire_draft(doc):
doc.save_with_history(events)

def clean_up_draft_files():
"""Move unidentified and old files out of the Internet Draft directory."""
"""Move unidentified and old files out of the Internet-Draft directory."""
cut_off = date_today(DEADLINE_TZINFO)

pattern = os.path.join(settings.INTERNET_DRAFT_PATH, "draft-*.*")
Expand Down
4 changes: 2 additions & 2 deletions ietf/doc/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class AddDownrefForm(forms.Form):
required=True)
drafts = SearchableDocAliasesField(
label="Internet-Drafts that makes the reference",
help_text="The drafts that approve the downref in their Last Call",
help_text="The Internet-Drafts that approve the downref in their Last Call",
required=True)

def clean_rfc(self):
Expand All @@ -163,7 +163,7 @@ def clean_drafts(self):
if not state or state.slug not in IESG_APPROVED_STATE_LIST:
v_err_names.append(da.name)
if v_err_names:
raise forms.ValidationError("Draft is not yet approved: " + ", ".join(v_err_names))
raise forms.ValidationError("Internet-Draft is not yet approved: " + ", ".join(v_err_names))
return drafts

def clean(self):
Expand Down
4 changes: 2 additions & 2 deletions ietf/doc/lastcall.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# helpers for handling last calls on Internet Drafts
# helpers for handling last calls on Internet-Drafts

from django.db.models import Q

Expand Down Expand Up @@ -73,4 +73,4 @@ def expire_last_call(doc):
if doc.type_id == 'draft':
lc_text = doc.latest_event(LastCallDocEvent, type="sent_last_call").desc
if "document makes the following downward references" in lc_text:
email_last_call_expired_with_downref(doc, lc_text)
email_last_call_expired_with_downref(doc, lc_text)
6 changes: 3 additions & 3 deletions ietf/doc/mails.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def email_stream_changed(request, doc, old_stream, new_stream, text=""):
text = strip_tags(text)

send_mail(request, to, None,
"ID Tracker Stream Change Notice: %s" % doc.file_tag(),
"I-D Tracker Stream Change Notice: %s" % doc.file_tag(),
"doc/mail/stream_changed_email.txt",
dict(text=text,
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()),
Expand Down Expand Up @@ -288,7 +288,7 @@ def generate_approval_mail_approved(request, doc):
else:
contacts = "The IESG contact person is %s." % responsible_directors[0]

doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet Draft"
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet-Draft"

addrs = gather_address_lists('ballot_approved_ietf_stream',doc=doc).as_strings()
return render_to_string("doc/mail/approval_mail.txt",
Expand All @@ -308,7 +308,7 @@ def generate_approval_mail_rfc_editor(request, doc):
# This is essentially dead code - it is only exercised if the IESG ballots on some other stream's document,
# which does not happen now that we have conflict reviews.
disapproved = doc.get_state_slug("draft-iesg") in DO_NOT_PUBLISH_IESG_STATES
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet Draft"
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet-Draft"
addrs = gather_address_lists('ballot_approved_conflrev', doc=doc).as_strings()

return render_to_string("doc/mail/approval_mail_rfc_editor.txt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
class Command(BaseCommand):
help = ('Generate draft bibxml files for xml2rfc references, placing them in the '
'directory configured in settings.BIBXML_BASE_PATH: %s. '
'By default, generate files as needed for new draft revisions from the '
'By default, generate files as needed for new Internet-Draft revisions from the '
'last %s days.' % (settings.BIBXML_BASE_PATH, DEFAULT_DAYS))

def add_arguments(self, parser):
Expand Down
2 changes: 1 addition & 1 deletion ietf/doc/templatetags/mail_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def std_level_prompt(doc):
to the object's intended_std_level (with the word RFC appended in some
cases), or a prompt requesting that the intended_std_level be set."""

prompt = "*** YOU MUST SELECT AN INTENDED STATUS FOR THIS DRAFT AND REGENERATE THIS TEXT ***"
prompt = "*** YOU MUST SELECT AN INTENDED STATUS FOR THIS INTERNET-DRAFT AND REGENERATE THIS TEXT ***"

if doc.intended_std_level:
prompt = doc.intended_std_level.name
Expand Down
2 changes: 1 addition & 1 deletion ietf/doc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2522,7 +2522,7 @@ def test_personal_chart(self):
self.assertValidJSONResponse(r)
d = r.json()
self.assertEqual(d['chart']['type'], settings.CHART_TYPE_COLUMN_OPTIONS['chart']['type'])
self.assertEqual("New draft revisions over time for %s" % person.name, d['title']['text'])
self.assertEqual("New Internet-Draft revisions over time for %s" % person.name, d['title']['text'])

data_url = urlreverse('ietf.doc.views_stats.chart_data_person_drafts', kwargs=dict(id=person.id))

Expand Down
6 changes: 3 additions & 3 deletions ietf/doc/tests_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ def test_requires_txt_or_xml(self):
result = rebuild_reference_relations(self.doc, {})
self.assertCountEqual(result.keys(), ['errors'])
self.assertEqual(len(result['errors']), 1)
self.assertIn('No draft text available', result['errors'][0],
'Error should be reported if no draft file is given')
self.assertIn('No Internet-Draft text available', result['errors'][0],
'Error should be reported if no Internet-Draft file is given')

result = rebuild_reference_relations(self.doc, {'md': 'cant-do-this.md'})
self.assertCountEqual(result.keys(), ['errors'])
self.assertEqual(len(result['errors']), 1)
self.assertIn('No draft text available', result['errors'][0],
self.assertIn('No Internet-Draft text available', result['errors'][0],
'Error should be reported if no XML or plaintext file is given')

@patch.object(XMLDraft, 'get_refs')
Expand Down
2 changes: 1 addition & 1 deletion ietf/doc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ def rebuild_reference_relations(doc, filenames):
except IOError as e:
return { 'errors': ["%s :%s" % (e.strerror, filename)] }
else:
return {'errors': ['No draft text available for rebuilding reference relations. Need XML or plaintext.']}
return {'errors': ['No Internet-Draft text available for rebuilding reference relations. Need XML or plaintext.']}

doc.relateddocument_set.filter(relationship__slug__in=['refnorm','refinfo','refold','refunk']).delete()

Expand Down
2 changes: 1 addition & 1 deletion ietf/doc/views_ballot.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ class MakeLastCallForm(forms.Form):

@role_required('Secretariat')
def make_last_call(request, name):
"""Make last call for Internet Draft, sending out announcement."""
"""Make last call for Internet-Draft, sending out announcement."""
doc = get_object_or_404(Document, docalias__name=name)
if not (doc.get_state("draft-iesg") or doc.get_state("statchg")):
raise Http404
Expand Down
20 changes: 10 additions & 10 deletions ietf/doc/views_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-


# changing state and metadata on Internet Drafts
# changing state and metadata on Internet-Drafts

import datetime
import os
Expand Down Expand Up @@ -84,7 +84,7 @@ def clean(self):

@role_required('Area Director','Secretariat')
def change_state(request, name):
"""Change IESG state of Internet Draft, notifying parties as necessary
"""Change IESG state of Internet-Draft, notifying parties as necessary
and logging the change as a comment."""
doc = get_object_or_404(Document, docalias__name=name)

Expand Down Expand Up @@ -229,7 +229,7 @@ def __init__(self, state_type, *args, **kwargs):

@role_required('Secretariat', 'IANA')
def change_iana_state(request, name, state_type):
"""Change IANA review state of Internet Draft. Normally, this is done via
"""Change IANA review state of Internet-Draft. Normally, this is done via
automatic sync, but this form allows one to set it manually."""
doc = get_object_or_404(Document, docalias__name=name)

Expand Down Expand Up @@ -344,9 +344,9 @@ def __init__(self, *args, **kwargs):
def clean_replaces(self):
for d in self.cleaned_data['replaces']:
if d.document == self.doc:
raise forms.ValidationError("A draft can't replace itself")
raise forms.ValidationError("An Internet-Draft can't replace itself")
if d.document.type_id == "draft" and d.document.get_state_slug() == "rfc":
raise forms.ValidationError("A draft can't replace an RFC")
raise forms.ValidationError("An Internet-Draft can't replace an RFC")
return self.cleaned_data['replaces']

def replaces(request, name):
Expand Down Expand Up @@ -631,7 +631,7 @@ def to_iesg(request,name):

@role_required('Area Director','Secretariat')
def edit_info(request, name):
"""Edit various Internet Draft attributes, notifying parties as
"""Edit various Internet-Draft attributes, notifying parties as
necessary and logging changes as document events."""
doc = get_object_or_404(Document, docalias__name=name)
if doc.get_state_slug() == "expired":
Expand Down Expand Up @@ -790,7 +790,7 @@ def diff(attr, name):

@role_required('Area Director','Secretariat')
def request_resurrect(request, name):
"""Request resurrect of expired Internet Draft."""
"""Request resurrect of expired Internet-Draft."""
doc = get_object_or_404(Document, docalias__name=name)
if doc.get_state_slug() != "expired":
raise Http404
Expand All @@ -813,7 +813,7 @@ def request_resurrect(request, name):

@role_required('Secretariat')
def resurrect(request, name):
"""Resurrect expired Internet Draft."""
"""Resurrect expired Internet-Draft."""
doc = get_object_or_404(Document, docalias__name=name)
if doc.get_state_slug() != "expired":
raise Http404
Expand Down Expand Up @@ -858,7 +858,7 @@ def restore_draft_file(request, draft):
shutil.move(file, settings.INTERNET_DRAFT_PATH)
log.log(" Moved file %s to %s" % (file, settings.INTERNET_DRAFT_PATH))
except shutil.Error as ex:
messages.warning(request, 'There was an error restoring the draft file: {} ({})'.format(file, ex))
messages.warning(request, 'There was an error restoring the Internet-Draft file: {} ({})'.format(file, ex))
log.log(" Exception %s when attempting to move %s" % (ex, file))


Expand Down Expand Up @@ -1152,7 +1152,7 @@ def clean_ad(self):
state = self.doc.get_state('draft-iesg')
if not ad:
if state.slug not in ['idexists','dead']:
raise forms.ValidationError("Drafts in state %s must have an assigned AD." % state)
raise forms.ValidationError("Internet-Drafts in state %s must have an assigned AD." % state)
return ad

@role_required("Area Director", "Secretariat")
Expand Down
8 changes: 4 additions & 4 deletions ietf/doc/views_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def get_doctypes(queryargs, pluralize=False):
or queryargs.get('activedrafts') == 'on'
or queryargs.get('olddrafts') == 'on'):
if pluralize:
doctypes.append('Drafts')
doctypes.append('Internet-Drafts')
else:
doctypes.append('Draft')
doctypes.append('Internet-Draft')
alltypes = DocTypeName.objects.exclude(slug__in='draft').order_by('name');
for doctype in alltypes:
if 'include-' + doctype.slug in queryargs:
Expand Down Expand Up @@ -166,8 +166,8 @@ def chart_conf_person_drafts(request, id):
conf = {}
else:
conf = copy.deepcopy(settings.CHART_TYPE_COLUMN_OPTIONS)
conf['title']['text'] = "New draft revisions over time for %s" % person.name
conf['series'][0]['name'] = "Submitted drafts"
conf['title']['text'] = "New Internet-Draft revisions over time for %s" % person.name
conf['series'][0]['name'] = "Submitted Internet-Drafts"
return JsonResponse(conf)

@cache_page(60*15)
Expand Down
2 changes: 1 addition & 1 deletion ietf/group/milestones.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MilestoneForm(forms.Form):
desc = forms.CharField(max_length=500, label="Milestone", required=True)
due = DatepickerDateField(date_format="MM yyyy", picker_settings={"min-view-mode": "months", "autoclose": "1", "view-mode": "years" }, required=True)
order = forms.IntegerField(required=True, widget=forms.HiddenInput)
docs = SearchableDocumentsField(label="Drafts", required=False, help_text="Any drafts that the milestone concerns.")
docs = SearchableDocumentsField(label="Internet-Drafts", required=False, help_text="Any Internet-Drafts that the milestone concerns.")
resolved_checkbox = forms.BooleanField(required=False, label="Resolved")
resolved = forms.CharField(label="Resolved as", max_length=50, required=False)

Expand Down
2 changes: 1 addition & 1 deletion ietf/idindex/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def add_line(f1, f2, f3, f4):
state += "::" + "::".join(tags)
add_line(d.name + "-" + d.rev,
formatted_rev_date(d.name),
"In IESG processing - ID Tracker state <" + state + ">",
"In IESG processing - I-D Tracker state <" + state + ">",
"",
)

Expand Down
4 changes: 2 additions & 2 deletions ietf/ipr/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def save(self, *args, **kwargs):

class SearchForm(forms.Form):
state = forms.MultipleChoiceField(choices=[], widget=forms.CheckboxSelectMultiple,required=False)
draft = forms.CharField(label="Draft name", max_length=128, required=False)
draft = forms.CharField(label="Internet-Draft name", max_length=128, required=False)
rfc = forms.IntegerField(label="RFC number", required=False)
holder = forms.CharField(label="Name of patent owner/applicant", max_length=128,required=False)
patent = forms.CharField(label="Text in patent information", max_length=128,required=False)
Expand All @@ -428,4 +428,4 @@ def __init__(self, *args, **kwargs):
class StateForm(forms.Form):
state = forms.ModelChoiceField(queryset=IprDisclosureStateName.objects,label="New State",empty_label=None)
comment = forms.CharField(required=False, widget=forms.Textarea, help_text="You may add a comment to be included in the disclosure history.", strip=False)
private = forms.BooleanField(label="Private comment", required=False, help_text="If this box is checked the comment will not appear in the disclosure's public history view.")
private = forms.BooleanField(label="Private comment", required=False, help_text="If this box is checked the comment will not appear in the disclosure's public history view.")
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class Command(BaseCommand):
help = ("Generate machine-readable list of IPR disclosures by draft name (recursive)")
help = ("Generate machine-readable list of IPR disclosures by Internet-Draft name (recursive)")

def handle(self, *args, **options):
try:
Expand Down
2 changes: 1 addition & 1 deletion ietf/ipr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def generate_draft_recursive_txt():
docipr[name] = []
docipr[name].append(o.disclosure_id)

lines = [ "# Machine-readable list of IPR disclosures by draft name" ]
lines = [ "# Machine-readable list of IPR disclosures by Internet-Draft name" ]
for name, iprs in docipr.items():
lines.append(name + "\t" + "\t".join(str(ipr_id) for ipr_id in sorted(iprs)))

Expand Down
Loading