Vancouver style in french / style Vancouver en français

Bonjour,

pour des besoins universitaires, j'ai tenté d'adapter le style Vancouver en français (à partir de la version du style repository "Vancouver with superscript" du 11 mai 2011), du moins pour le format de dates (transformé en jour/mois abrégé/année) ainsi que les mentions concernant les documents électroniques (date d'accès, de consultation et adresse de consultation).

Comme je ne suis pas un expert en codage, j'aurais besoin de conseils.
En particulier, je n'arrive pas à obtenir :
- les mois abrégés en français (avec l'accentuation, et le point en suffixe)
- la suppression d'un double espace précédant la date de publication quand seule l'année est renseignée dans la notice (alors que la forme est correcte sinon)
- les guillemets français.

J'ai pourtant pris connaissance du fichier .xml local correspondant (https://github.com/citation-style-language/locales/blob/master/locales-fr-FR.xml), mais j'ignore de quelle manière intégrer ces codes dans la feuille de style, et faire en sorte que ce soit fonctionne !

Si quelqu'un veut bien jeter un coup d'oeil à ma fiche de style, j'en serais ravi ! Elle est disponible ici : http://ia700809.us.archive.org/5/items/VancouverFrench/

Merci
  • please put the style somewhere where I don't need to login to look at it - a public gist at gist.github.com or a new paste a http://pastebin.com/
    is useful.

    You can "force" the French locale by adding
    default-locale="fr" in the line starting with <style...
    that should give you French quotation marks and months - the second issue I'm not sure I understand, could you give an example?
    (sorry for writing in English, my French is pretty much read-only)
  • edited November 17, 2011
    I'm sorry about the link : I changed it to be public (http://ia700809.us.archive.org/5/items/VancouverFrench/).

    I tried to force the language with xml:lang="fr-FR" at the beginning of my style, but the changes are largely unperfect, so I had to modify many codelines. It's the same with default-locale="fr".

    So, the point I can't understand is to integrate in my style the xml codelines from github - cf. first post -, particularly the short forms of the months (for example "nov.", not "nov" without any point).

    The second issue was about the publish date : for example, if the date is (french form) "[...] JAMA. 17 nov 2011. [...]", it's OK, but if I can get only the year of a document, it appears like that (with the same example) : "[...] JAMA. 2011. [...]", so with a double space. If I modify the space before the year, the complete dates becoms "[...]. 17 nov2011.[...]", with no space !!

    If you have solutions, I'd be glad !

    Thanks
  • For the spacing, change lines 162-166 to
    <date variable="issued" delimiter=" ">

    <date-part name="day"/>

    <date-part name="month" form="short" strip-periods="true"/>

    <date-part name="year"/>

    </date>

    i.e. add delimiter=" " in the first line and then remove the prefixes.

    As for language, you do need to use default-locale="fr-FR" and take out the xml:lang statement - that's not valid csl there. It should work then - does for me.
  • Thanks a lot for the space !

    I'll try another time for the language (for the less to get a correct csl file !), but it wasn't good last time I tried...
  • Can you explain what the problem is with the fr locale (language)? It's not clear to me what is broken for you.
  • edited November 18, 2011
    Easy : after trying to convert Vancouver style (from the style repository) with [default-locale="fr-FR"], as suggested by Adam, you can see the result here : http://ia600800.us.archive.org/26/items/VanvouverFrenchFailed/

    There is only few modifications from english to french language in the style (only "cited" to "cité", french translation for months, but no modification from english to french date form, nor english words as "Available from" -not translated to "Disponible sur", nor the points after the short forms of the months, like "feb" = "févr.", etc.) !

    I forgot to focuse that I've manually modified the csl file in my second post (up) to obtain the right dates and words...
    Anyway, I'd prefer an automatic translation, based on your locale citation style, Frank (but I don't know how to do that).

    Could exist an exact place to put this mention [default-locale="fr-FR"], elsewhere as at the ending of the second line ?

    Or do other modifications exist to obtain the result I expect ?

    Thanks for your help
  • edited November 18, 2011
    It's clear what's happening. Only three localized terms are used by the style in its current form: "cite", "internet" and "in". The "Available from" string is set as a value, so that won't change. The dates are also set in the full (non-localized) syntax, so they won't localize either.

    You can read about the syntax for localized dates and terms here:

    http://citationstyles.org/downloads/specification.html#localized-dates
    http://citationstyles.org/downloads/specification.html#label
    http://citationstyles.org/downloads/specification.html#text

    If you use localized terms, they will be translated using the default texts from the standard locale files. If the locale strings are not correct for your style, you can include a locale block in your style itself, with whatever text you want. There is an example in the CSL 1.0 specification, here:

    http://citationstyles.org/downloads/specification.html#locale

    Punctuation should be localizing for you already.

    Hope this helps.
  • Thank you very much for your help.

    About the local dates, I'm afraid it exceeds my competencies (I've trouble to know concretely, in my style file, where and how to change it), but I'll try to convert dates as localized terms in my style.

    For the other words as values, I'll translate them once for all.


    Thanks
  • edited November 22, 2011
    Finally, my last version of the "Vancouver french style" is available there :
    http://ia600809.us.archive.org/26/items/VancouverFrenchStyle_101/

    Thanks fo your help, Adam and Frank.
  • The generic Vancouver style now has localized dates and adjusted French terms so that it should work pretty well in French. I used the terms and date format from Sylvain's style.
Sign In or Register to comment.