Commit eb7d2115 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE

Adding new titles to explain more "allowed users" Closing #142

parent cc99e7a3
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-11-08 13:37+0100\n"
"POT-Creation-Date: 2019-11-13 11:35+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -53,7 +53,7 @@ msgid "The file to upload."
msgstr ""
msgid "new_allowed_users__label"
msgstr "Users you want to grant permission to see the data source"
msgstr "List of users allowed to see the data source:"
msgid "new_allowed_users__help_text"
msgstr ""
......@@ -424,7 +424,9 @@ msgid "public__verbose_name"
msgstr "Public"
msgid "public__help_text"
msgstr "Is the data source publicly readable"
msgstr ""
"Is the data source publicly readable ? Otherwise you can allow specific "
"users."
msgid "data_source__name__verbose_name"
msgstr "Name"
......@@ -1083,8 +1085,26 @@ msgstr ""
msgid "Contribution"
msgstr ""
msgid "Provide a new data source"
msgstr ""
msgid "DataSourceWizard.title.Information"
msgstr "Provide a new data source: General information"
msgid "DataSourceWizard.title.Visibility"
msgstr "Provide a new data source: Adjusting its visibility"
msgid "DataSourceWizard.title.Description"
msgstr "Provide a new data source: Description"
msgid "DataSourceWizard.title.UploadOrLiveInput"
msgstr "Provide a new data source: Way to provide it"
msgid "DataSourceWizard.title.Upload"
msgstr "Provide a new data source: Upload a file"
msgid "DataSourceWizard.title.LiveInput"
msgstr "Provide a new data source: Preparing the template"
msgid "DataSourceWizard.title.UploadTemplate"
msgstr "Provide a new data source: Uploading the template"
msgid "Proceed"
msgstr ""
......@@ -1120,8 +1140,8 @@ msgstr "_"
msgid "step_message_Visibility"
msgstr ""
"As your data source is not public, you can allow specific users to visualize "
"your data source."
"As your data source is <b>not public</b>, you can allow specific users to "
"visualize your data source."
msgid "step_message_UploadOrLiveInput"
msgstr "_"
......@@ -1142,34 +1162,6 @@ msgstr ""
"\" href=\"http://hub.pages.pasteur.fr/12765-viralhostrangedb/compatible_file."
"html\">documentation</a>.</p>"
#, python-format
msgid ""
"step_message_Template%(template_file_url)s%(scheme)s%(table_template)s"
"%(table_example)s"
msgstr ""
"<div class=\"row\"><div class=\"col text-center\">%(table_template)s</"
"div><div class=\"col-1 text-center h1 mt-4\"><i class=\"fa fa-arrow-circle-"
"right mt-4\"></i></div><div class=\"col text-center\">%(table_example)s</"
"div></div>Template filling process:<ul><li>Download the template file <a "
"href=\"%(template_file_url)s\" target=\"_blank\">(<i class=\"fa fa-download"
"\"> link)</i></a>.</li><li>Fill and adapte the template (Fig 1) with your "
"hosts, viruses and responses: <ul><li>Note that colors are only indicative "
"and are not sufficient.</li><li>Infection status is entered as a number and "
"the recommended values to use are: %(scheme)s.</li><li><b>NCBI identifiers</"
"b> of host and virus can be provided within the excel file between "
"parenthesis after the name of host or virus (see example in Fig 2). </"
"li><li>Fig 2 is an example of what you could achieve. </li></ul></"
"li><li>Upload the file here bellow</li></ul>"
msgid "Fig 1: the template<br/>"
msgstr ""
msgid "download template file"
msgstr ""
msgid "Fig 2: How the template could be filled<br/>"
msgstr ""
msgid "step_message_LiveInput when is_bound"
msgstr ""
"You can now provide the list of viruses and hosts you want to add to your "
......@@ -1190,11 +1182,8 @@ msgstr ""
"you can copy/paste them from a spreadsheet in a format with two column where "
"the first column is the name, and the second column is the identifier."
msgid "Fig 1: A (subset of) your template<br/>"
msgstr ""
#, python-format
msgid "step_message_LiveTemplate%(scheme)s%(template_file_url)s"
msgid "step_message_UploadTemplate%(scheme)s%(template_file_url)s"
msgstr ""
"<p>A template have been generated, and a sample is displayed on the right. "
"You now have to download the template <a href=\"%(template_file_url)s\" "
......@@ -1203,9 +1192,12 @@ msgstr ""
"response is entered as a number and the recommended values to use are: "
"%(scheme)s. <b>NCBI identifiers</b> of host and virus can still be provided "
"within the spreadsheet file between parenthesis after the name of host or "
"virus : <code class=\"p-2 d-inline-block\"><span title=\"Name\" class=\"border border-"
"secondary\">Virus 1</span> (<span title=\"Identifier\" class=\"border border-"
"secondary\">id of Virus 1</span>)</code></p>"
"virus : <code class=\"p-2 d-inline-block\"><span title=\"Name\" class="
"\"border border-secondary\">Virus 1</span> (<span title=\"Identifier\" class="
"\"border border-secondary\">id of Virus 1</span>)</code></p>"
msgid "Fig 1: A (subset of) your template<br/>"
msgstr ""
msgid "download complete template"
msgstr ""
......
......@@ -110,7 +110,7 @@ class DataSourceUserCreateOrUpdateForm(forms.ModelForm):
new_allowed_users = forms.CharField(
label=_("new_allowed_users__label"),
help_text=_("new_allowed_users__help_text"),
widget=widgets.Textarea(),
widget=widgets.Textarea(attrs={'rows': '4'}),
required=False,
)
allowed_users = ByLastFirstNameModelMultipleChoiceField(
......
......@@ -1075,12 +1075,12 @@ class DataSourceWizard(wizard_views.NamedUrlSessionWizardView):
("UploadOrLiveInput", forms.UploadOrLiveInput),
("Upload", forms.UploadDataSourceForm),
("LiveInput", forms.LiveInputVirusHostForm),
("LiveTemplate", forms.UploadDataSourceForm),
("UploadTemplate", forms.UploadDataSourceForm),
]
condition_dict = {
"Visibility": show_visibility,
"LiveInput": live_input,
"LiveTemplate": live_template_data,
"UploadTemplate": live_template_data,
"Upload": upload_data,
}
template_name = 'viralhostrangedb/wizard_form.html'
......@@ -1089,13 +1089,25 @@ class DataSourceWizard(wizard_views.NamedUrlSessionWizardView):
def get_context_data(self, form, step=None, **kwargs):
context = super().get_context_data(form=form, step=step, **kwargs)
context["submit_text"] = _("Next")
if step == "Intro":
context["title"] = _("Contribution")
else:
context["title"] = _("Provide a new data source")
if step is None:
step = self.steps.current
if step == "Upload" or step == "LiveTemplate":
if step == "Intro":
context["title"] = _("Contribution")
elif step == "Information":
context["title"] = _("DataSourceWizard.title.Information")
elif step == "Visibility":
context["title"] = _("DataSourceWizard.title.Visibility")
elif step == "Description":
context["title"] = _("DataSourceWizard.title.Description")
elif step == "UploadOrLiveInput":
context["title"] = _("DataSourceWizard.title.UploadOrLiveInput")
elif step == "Upload":
context["title"] = _("DataSourceWizard.title.Upload")
elif step == "LiveInput":
context["title"] = _("DataSourceWizard.title.LiveInput")
elif step == "UploadTemplate":
context["title"] = _("DataSourceWizard.title.UploadTemplate")
if step == "Upload" or step == "UploadTemplate":
context["submit_text"] = _("Save")
elif step == "UploadOrLiveInput":
context["submit_text"] = _("Proceed")
......@@ -1136,12 +1148,12 @@ class DataSourceWizard(wizard_views.NamedUrlSessionWizardView):
# so give more details
context["step_message"] = mark_safe(_("step_message_LiveInput when not is_bound"))
context["custom_css_width"] = "col-lg-10 offset-lg-1 "
elif step == "LiveTemplate":
elif step == "UploadTemplate":
f = self.get_form("LiveInput", self.storage.get_step_data("LiveInput"))
f.is_valid()
templates = f.get_template_files()
context["step_message"] = self.get_decorated_message_with_table_example(
ugettext("step_message_LiveTemplate%(scheme)s%(template_file_url)s") % dict(
ugettext("step_message_UploadTemplate%(scheme)s%(template_file_url)s") % dict(
scheme=self.compute_scheme(),
template_file_url=templates["file_url"],
),
......@@ -1259,7 +1271,7 @@ class DataSourceWizard(wizard_views.NamedUrlSessionWizardView):
if self.upload_data():
key = "Upload"
else: # if self.live_template_data():
key = "LiveTemplate"
key = "UploadTemplate"
form_dict[key].save(importation_observer=MessageImportationObserver(request=self.request))
url = reverse("viralhostrangedb:data-source-mapping-edit", args=[self.instance.pk])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment