Template talk:Jcttop/core

(Redirected from Template talk:Jcttop/core/testcases)
Latest comment: 8 years ago by Fredddie in topic sub1name order

Please move Template:Jcttop/core/sandbox into here to stop breaking articles: Wikipedia talk:Lua/Archive 2#Wikitext tables? --NE2 20:40, 22 January 2014 (UTC)Reply

What happened to sub1_ref?

edit

This template used to accept a |sub1_ref= parameter, which the wrapper template {{AUSinttop}} passes through, but I've just noticed now that it's not working. I'm not sure when it stopped working, perhaps during the switch to the lua module? Pinging @Happy5214: - Evad37 [talk] 07:53, 30 December 2014 (UTC)Reply

Why did I not get pinged? I'm just glad I've watchlisted this page. I know I ported |sub1_ref=, and I'm pretty sure it worked initially. (Later...) While typing this, I noticed a small syntax typo Jackmcbarn left when converting the module from Module:HtmlBuilder to mw.html that might be causing this. I've fixed it in the sandbox, so test it to make sure. -happy5214 18:28, 30 December 2014 (UTC)Reply
It's working with the sandbox version. I'll try another ping, because it should be working ... @Happy5214: ... - Evad37 [talk] 08:32, 3 January 2015 (UTC)Reply
I just haven't copied the fix over to the live version. I'll do that now. -happy5214 19:44, 3 January 2015 (UTC)Reply
  Done -happy5214 19:45, 3 January 2015 (UTC)Reply

sub1name order

edit

Could we get something that will allow us to flip the order of sub1 and sub1name (Foo County, Bar, becomes County Foo, Bar). This would be useful for Manitoba and Ireland (if we ever deploy there), among other locations. –Fredddie 05:18, 10 March 2015 (UTC)Reply

@Fredddie: I think this is best handled in road data modules. {{jct}} also produces locations that have the same pattern, so these specifications should be collected as road data. Perhaps something like this:
-- Common definitions for USA; can be overridden, e.g., for Louisiana.
USA[" common "] = {
	locations = {
		sub1 = {linksuffix = "County", namesuffix = "County"},
		-- The "usual" areadab, putting disambiguating text in front.
		areas = {
			city = {linksuffix = "(city)", nameprefix = "City of"},
			town = {linksuffix = "(town)", nameprefix = "Town of"},
			village = {linksuffix = "(village)", nameprefix = "Village of"}
		}
	}
}

-- Manitoba?
MB[" common "] = {
	locations = {
		sub1 = {linkprefix = "County", nameprefix = "County"}
	}
}

This way we can customize based on regions while keeping data and code separate. Chinissai (talk) 23:05, 10 May 2016 (UTC)Reply

Interesting. That's definitely in the spirit of the code we wrote when the cores were created, which was to keep the base code agnostic of any one region's nomenclature. –Fredddie 00:42, 11 May 2016 (UTC)Reply