Commit fde32336 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Re-enfoce the rule for the publication_url field. It should point to a pdf file.

parent fb1ac760
......@@ -105,6 +105,7 @@
'check and validate': 'vérifier et valider',
'Check and validate took %s seconds': 'Vérifier et valider a duré %s secondes',
'Check latex syntax in the title': 'Vérifier la syntaxe latex dans le titre',
'Check that the publication URL corresponds to a pdf file.': 'Check that the publication URL corresponds to a pdf file.',
'Check to delete': 'Check to delete',
'Click on the link %(link)s to verify your email': 'Click on the link %(link)s to verify your email',
'Click on the link http://localhost:8000/track_publications/default/user/reset_password/%(key)s to reset your password': 'Click on the link http://localhost:8000/track_publications/default/user/reset_password/%(key)s to reset your password',
......@@ -397,6 +398,7 @@
"Password fields don't match": "Password fields don't match",
'Password reset': 'Password reset',
'patent': 'brevet',
'PDF file url': 'URL du fichier pdf',
'Period': 'Période',
'PhD Thesis, ...': 'Doctorat, habilitation à diriger les recherches, ...',
'PhDs': 'PhDs',
......@@ -590,7 +592,7 @@
'The URL of conference: http://....': "L'URL de la conférence : http://....",
'The URL of the associated record in cds or inspirehep: http://cds.cern.ch/record/1669557': "L'URL de l'enregistrement dans cds ou inspirehep: http://cds.cern.ch/record/1669557",
'The URL of the conference: http://....': "L'URL de la conférence: http://....",
'The URL of the publication (open access): http://arxiv.org/abs/1103.2465': "L'URL de la publication (open access): http://arxiv.org/abs/1103.2465",
'The URL pointing to the pdf file of the the publication (open access): http://arxiv.org/pdf/1103.2465': "l'URL du fichier pdf (open access): http://arxiv.org/pdf/1103.2465",
'The volume number: 123 or 64-65': 'Numéro du volume : 123 ou 64-65',
'The XML string describing the MARC12 record. It Starts with "<?xml" and ends with "</collection>"': 'Chaîne de charactère XML définissant un enregistrement MARC12. Elle commence par "<?xml" et fini par "</collection>"',
'Theses': 'Theses',
......@@ -636,8 +638,8 @@
'User ID': 'User ID',
'users': 'utilisateurs',
'Users can login when the value is equal to yes or true.': 'Les utilisateurs peuvent se logger quand cette valuer est égale à yes ou true.',
'Usual': 'Usuel',
'usual': 'usuel',
'Usual': 'Usuel',
'Validate': 'Valider',
'Validated': 'Validé',
'Value': 'Valeur',
......
......@@ -51,7 +51,7 @@ tp_universities = \
T("List of university separated by comma")
tp_url = \
T("The URL of the publication (open access): http://arxiv.org/abs/1103.2465")
T("The URL pointing to the pdf file of the the publication (open access): http://arxiv.org/pdf/1103.2465")
tp_volume = \
T("The volume number: 123 or 64-65")
......@@ -70,7 +70,7 @@ db.define_table("publications",
Field("pages", "string", length=255, comment=tp_pages, default=""),
Field("submitted", "string", length=255, comment=tp_submitted, notnull=True),
Field("preprint", "string", length=255, comment=tp_preprint, default=""),
Field("publication_url", "string", length=255, comment=tp_url, default="", label="url"),
Field("publication_url", "string", length=255, comment=tp_url, default="", label="PDF file url"),
Field("conference_title", "text", comment=tp_conference_title, default="", label='Title'),
Field("conference_url", "string", length=255, comment=tp_conference_url, default="", label='url'),
Field("conference_dates", "string", length=255, comment=tp_conference_dates, default="", label='Dates'),
......
......@@ -75,6 +75,12 @@ def check_publication(row):
text = T("Submitted date is not valid")
li.append(text)
# publication URL
if row.publications.publication_url:
if 'pdf' not in row.publications.publication_url:
text = T("Check that the publication URL corresponds to a pdf file.")
li.append(text)
# latex syntax
title = row.publications.title
rules = "√" in title or \
......
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