Jump to content

Template talk:CAint

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Conversion to Module:Jctint/USA

[edit]

{{CAint}} is the last {{jctint}} template for the lower 48 states still to be converted to invoke Module:Jctint/USA (see Wikipedia talk:WikiProject U.S. Roads#Module:Jctint/USA). One reason for the delay was the manipulation of arguments to handle postmiles in the current template. The idea was to have |postmile= behave identically to |mile=, but the implementation fell short for a few reasons. First, some California routes do have mileposts listed instead of postmiles, requiring two columns, but a parameter for postmile interferes with this behavior so another parameter is needed to achieve the expected appearance. Second, a blank postmile cell requires adding a space as the content of the cell.

As part of converting this template, I am proposing a few changes to simplify the use of this template, shown in the following table:

Behavior Old markup New markup
Nonempty postmile |postmile=... (no change)
Blank postmile cell |postmile=  |postmile=none
Skipping postmile cell (e.g., when |pmspan= is used) |postmile=none |mile=none
Nonempty mile |mile=... (no change)
Blank mile cell |columns=yes (default, when |postmile= is unspecified)
Skipping mile cell (e.g., when |mspan= is used) |mile=none (no change)

The idea is to think of the postmile column in the same way as the location column instead of the milepost column. When we want a blank location cell, we use |location=none. We do the same with postmile. When we don't want the postmile and milepost columns at all, we simply use |mile=none. In this way we don't need |columns= parameter, and this template can work in the same way as those for other states.

I have rewritten all |postmile=none to |mile=none, which results in the same behavior. The |column= parameter will simply be ignored after the conversion, and I will remove them afterwards. Blank postmile cells using |postmile=  will continue to work, but I will also rewrite them to use |postmile=none after the conversion. In short, no non-user pages would break if this template were to be converted now.

Note that I am only editing pages not in userspace. The owners of user pages can follow the outlined changes above for transitioning to the new template.

Comments welcome. I will convert this template after a few days of inactivity on this thread. Chinissai (talk) 23:13, 23 November 2016 (UTC)[reply]