Template talk:Legifrance
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Redirect or merge
[edit]@Jonesey95:, only looked at this briefly, and linked the doc page to the original French template, but it looks at first glance like this should be redirected or merged to Template:Cite French law. Mathglot (talk) 00:16, 2 May 2022 (UTC)
- I created it six years ago, so I don't remember any details, but it looks like I created it so that people could copy-paste straight from French Wikipedia. I have no idea whether a merger would help or hinder that process. It might be possible to turn this template into a subst-only template that converted to Template:Cite French law, but I haven't looked into it at all. – Jonesey95 (talk) 23:03, 2 May 2022 (UTC)
- This can, and should be, made to something like Template:Cite web/French so it automatically substs as having non-English language code in articles should never happen. Probably best to send it to TfD if you don't know how to do it so someone working in the /holding cell can take care of it. Gonnym (talk) 08:39, 3 May 2022 (UTC)
- I'm not hearing that Jonesey95 doesn't know how to do it, rather, that he hasn't looked into it yet. I'm sure that if it's doable, he could do it (probably so could I). Also, I don't know what a holding cell is, but is that a better solution than just leaving it here, until someone gets around to converting it as may be needed? As far as its creation as a copy-paste from fr-wiki, that makes sense, and reminds me of {{Lien web}}. Mathglot (talk) 09:29, 3 May 2022 (UTC)
- Not planning on this any time soon. Mathglot (talk) 07:34, 6 January 2023 (UTC)
- I'm not hearing that Jonesey95 doesn't know how to do it, rather, that he hasn't looked into it yet. I'm sure that if it's doable, he could do it (probably so could I). Also, I don't know what a holding cell is, but is that a better solution than just leaving it here, until someone gets around to converting it as may be needed? As far as its creation as a copy-paste from fr-wiki, that makes sense, and reminds me of {{Lien web}}. Mathglot (talk) 09:29, 3 May 2022 (UTC)
- This can, and should be, made to something like Template:Cite web/French so it automatically substs as having non-English language code in articles should never happen. Probably best to send it to TfD if you don't know how to do it so someone working in the /holding cell can take care of it. Gonnym (talk) 08:39, 3 May 2022 (UTC)
Rename to title without accents
[edit]I've made changes to the template to provide unaccented param aliases, and also added a redirect so it's entirely usable now without typing any accented letters. Compare examples 1 (new style; in English), and 2 (old style, accents required) in section § Examples. This makes it easier for users of English keyboards that lack accented letters.
As the final step, I wish to move the template to "Template:Legifrance", swapping the redirect which is there now, to the accented, current title. If there are no objections, I'll go ahead with this. @Jonesey95 and Newystats:.
P.S. I've also beefed up the doc a bit, so if you didn't know what the |url=
param was doing there before, now you do. One day, I'll translate the whole thing, if I ever get the time. If there are particular pain points in the French doc right now, lmk and I'll start with those asap.Mathglot (talk) 07:34, 6 January 2023 (UTC)
Thanks. Happy with the rename. Newystats (talk) 08:02, 6 January 2023 (UTC)
- Nice work. I have no problem with moving the template, though I don't see the point if a redirect exists and if the accent is proper French. My only small quibble is that I would change the
|num=
alias to|number=
, since it is new. Needlessly creating abbreviated aliases is contrary to clear communication and ease of use, IMO. – Jonesey95 (talk) 14:21, 6 January 2023 (UTC)- I've made an additional change to add
|number=
to the template and /doc, and to drop the unaccented "numero" (which seems pointless, especially given the new one). Test cases are adjusted, and this version is now live. Regarding the point of a move: it's to keep the bar as low as possible for entry, and to encourage editors who may not be used to using templates, and who are maybe a bit spooked about using one, and for whom just that single, accented letter appearing in the title at the top of this page would be enough to tip them into the "no" category, and not use it, with resulting loss of one quantum of verifiability. (With respect to experienced users, I would agree with you: redirect, schmedirect; who cares? But the move wouldn't be for them.) - The accented 'e' is, indeed, correct in French, but English is more lax about copying French usage, and if you look at usage in English books, some use it, some don't, and most of the top ten don't; this Ngrams chart demonstrates the gap between them. (Somewhat surprisingly, even in French books, the accented version is less than twice as common than the unaccented one: French ngrams.) So, we shouldn't worry too much about going with the version that is most common in English. Beyond that, this is a template, and the name would never appear on an article page rendered to the user, so we are really targeting editors here, not readers, so for me it really comes down to, what is best/easiest for editors and for verifiability. Mathglot (talk) 23:46, 6 January 2023 (UTC)
- Done. Without further objection, I've gone ahead with this move. Feel free to revert, if there are late-breaking objections. Thanks, Mathglot (talk) 10:00, 10 January 2023 (UTC)
- I've made an additional change to add
Change to make title optional, and provide a default
[edit]A backward-compatible change now provides a default for the |title=
param if it is omitted. This change in functionality means that the former error message, "missing title parameter" goes away. If |title=
is omitted, then the title will be created as a function of the values for the |base=
and |number=
params: e.g., if |base=CP
and |number=121-3
, then |title=
will be set to "CP art. 121-3" (and linked, as before, to the law in the Legifrance database). This change makes it easier to use the template, by reducing the number of required parameter to two. Mathglot (talk) 09:50, 10 January 2023 (UTC)
Suite of Legifrance templates
[edit]This template is now a part of a suite of three templates, that can generate inline citations, reference list citations, or short citations referring to Légifrance. See {{cite Legifrance}}, and {{sfn Legifrance}}. Mathglot (talk) 11:27, 13 January 2023 (UTC)
- This suite is slowly getting more powerful, and there's a kind of leap-frog incremental improvement, that involves adding little improvements to the template suite as I discover new stuff and reverse engineer it (or add sections below to remind myself to add it later) and add new features to the templates, alternating with adding improvements to the doc pages. The real problem with the French Légifrance website, is how to find what you're looking for, because there's so much there, that any search you do turns up piles of stuff you're not looking for. The goal of the template suite, and the doc, is to cut through all that, and make it easier for the user to find what they are looking for, and then to create a citation for it. There's still a big bucket of stuff that you have to go back to the Légifrance website and find it yourself (and then you can still cite it, using the
|text=
and|url=
params, but you have to find it the hard way first), and one of the goals is to continually reduce the size of that bucket where you have to search the site yourself, and make the suite more powerful so it can find more and more of that stuff for you. Anyone reading this is encouraged to add new sections to this page to flag anything that isn't clear in the doc, or ideas of how to improve it. If you're an expert searcher at Légifrance, by all means add your ideas of features to add here to make that bucket smaller. Mathglot (talk) 08:48, 13 April 2023 (UTC)
Proposed upgrade for optional params
[edit]If params url and text are provided, base and number are not needed; currently, the workaround is to provide dummy values for base and number, which are then ignored (but only after validation; should just be ignored a priori instead). What should happen, is that if url is present, then we need either param text, or params base and number. Mathglot (talk) 00:24, 26 January 2023 (UTC)
Tag working post-2008 codes in the doc table
[edit]The code du transport (|base=CTRANSP
) and the code penitentiaire (|base=CPEN
) are post-2008 codes, of the type that the original template did not handle. However, these two have been converted (via subtemplates {{Legifrance/CTRANSP}} and CPEN). The table of base codes should be updated to indicate somehow that these codes are now available, even though they're among the post-2008 codes, maybe via an icon, or link, or expl. note, or something. As other codes are converted, the table should be updated to match. Mathglot (talk) 05:38, 9 April 2023 (UTC)
Enhancement: add date for versioned law or article
[edit]We should add a new param |date=
, which could be added on to at least certain url paths (not sure if all of them) in the form YYYY-MM-DD/. For example, the 1958 constitution, as of today, is https://www.legifrance.gouv.fr/loda/id/JORFTEXT000000571356/2023-04-13/, and as of 2009, was https://www.legifrance.gouv.fr/loda/id/JORFTEXT000000571356/2009-04-13/. This might work with all laws, decrees, and regulations; t.b.d. Mathglot (talk) 06:34, 13 April 2023 (UTC)
Enhancement: newer JO links
[edit]Some newer JO links are available, e.g., https://www.legifrance.gouv.fr/jorf/jo/2008/07/24/0171 containing the published JO material from 24 July 2008, including a mix of laws, decrees, and texts from numerous ministries. Mathglot (talk) 08:30, 13 April 2023 (UTC)