User:Pharap/Wiki Improvement Proposals

From Guild of Archivists
< User:Pharap
Revision as of 22:57, 23 December 2023 by Alahmnat (talk | contribs) (Refine explanation. Demonstrate the code for the proof of concept.)

Module Improvement Proposals

Inline D'ni Dictionary Module

Summary

At the moment the it is possible to insert D'ni text and write D'ni words in romanised form, and the wiki has an extensive dictionary. (See: Category:D'ni words.)

What I would like to propose is a Lua module that could leverage these features and produce a tooltip that provides information from the D'ni dictionary. Most importantly, it should include the three main ways of writing that word (Dnifont, OTS, and NTS) as well as the IPA pronunciation of the word. This could ideally be applied to words written in any of Dnifont, OTS, or NTS, so that any of the three could provide relevant contextual information.

It may also be worth including the meaning or meanings, or whether the word is e.g. a noun or a verb, provided that those don't flood the tooltip with too much information. Though I am less committed to those than I am to the basic romanisation and pronunciation.

Reasoning

This feature would make it easier to provide more linguistic information with less markup or effort on the part of an article writer. If implemented in the ideal way (see Example below), contributors would (for the most part) no longer have to remember how to write Dnifont. They would only have to remember the name of the corresponding Dictionary: page.

Paradoxically, despite no longer having to remember how to write in Dnifont, this feature would actually make using Dnifont easier as it would be displayed within the tooltip on any in-page D'ni words.

This would also avoid the potential confusion that might arise as to which of the romanisation styles is in use since all three styles would always be displayed.

Having the IPA pronunciation code as well would be a nice little bonus considering how many pages feature rendered Dnifont and OTS-style words but lack any corresponding IPA. The presence of IPA would be incredibly useful for readers who understand it as it would help them to know how to pronounce the various D'ni words and names that crop up throughout the wiki. Particularly on Age articles, and on articles for characters with D'ni names like Aitrus, Ti'ana, and Gehn.

Example

Ideally a usage like {{dnidict|word=Teledahn|display=dnidict}} could appear as thus: teleDan

Hence one only needs to remember the name of the dictionary entry and the dictionary system could do the rest.

Though ideally the toolbox would be better formatted, more like the [[Has length::30 cm]] property from the Semantic MediaWiki addons: 30 cm0.0622 sp <br />11.801 in <br />0.983 ft <br />0.3 m <br />.

Implementation Details

So far I have been able to implement all the tooltip information and a Dnifont argument, as well as the ability to specify a dictionary entry name, but I haven't yet worked out how to create a template that supports both.

However, it may actually be better to simply offer two different templates rather than one dual-purpose template. To avoid maintenance issues, one could be implemented in terms of the other.

Here is a quick proof of concept: teleDan

Which is implemented as:

<span title="Dnifont: teleDan, OTS: {{User:Pharap/Templates/Dni to OTS|teleDan}}, NTS: {{User:Pharap/Templates/Dni to NTS|teleDan}}, IPA: {{#show: Dictionary:{{User:Pharap/Templates/Dni to OTS|teleDan}}|?pronunciation}}" style="border-bottom: 1px dotted"><dni>teleDan</dni></span>

Note that I am temporarily using subpages of my user page to provide templates that call the dnifont2ots and dnifont2nts functions exposed by the Dict D'ni module as template wrappers are necessary for them to function correctly outside of the module. I have also temporarily added a Pronunciation property to the Teledahn dictionary entry to demonstrate how IPA information could be extracted from dictionary entries using Semantic MediaWiki.

A template that accepts Dnifont would be used as {{Dnidict word|teleDan}}. A template that accepts a page name would be used as {{Dnidict page|Teledahn}}.

As for the backend, there are two possible ways to implement this:

The first is to create 'Dnifont to OTS' and 'Dnifont to NTS' templates that wrap the dnifont2ots and dnifont2nts functions exposed by the Dict D'ni module, as mentioned above.

<span title="Dnifont: {{{1|}}}, OTS: {{Dnifont to OTS|{{{1|}}}}}, NTS: {{Dnifont to NTS|{{{1|}}}}}, IPA: {{#show: Dictionary:{{Dnifont to OTS|{{{1|}}}}}|?pronunciation}}" style="border-bottom: 1px dotted"><dni>{{{1|}}}</dni></span>

The second option would be to add new properties to all dictionary entries specifying their Dnifont, OTS, and NTS forms. The creation of these properties could be made part of the Dict D'ni module as it's already responsible for producing the OTS and NTS for a dictionary entry from the Dnifont form of a word.

<span title="Dnifont: {{#show: Dictionary:{{{1|}}}|?dnifont}}, OTS: {{#show: Dictionary:{{{1|}}}|?ots}}, NTS: {{#show: Dictionary:{{{1|}}}|?nts}}, IPA: {{#show: Dictionary:{{Dnifont to OTS|{{{1|}}}}}|?ipa}}" style="border-bottom: 1px dotted"><dni>{{#show: Dictionary:{{{1|}}}|?dnifont}}</dni></span>

This has the added bonus of producing the proper data when passing a prefix or suffix page name.

Note that regardless of which method is chosen, supporting IPA would require an IPA or Pronunciation property be added to dictionary entries. Adding these to the dictionary pages would be a long and gruelling task, but would also mean that the IPA representation of a D'ni word could be queried from anywhere on the wiki, which would help to keep the wiki consistent, reduce room for error, and make data entry for pages much easier.

I suspect the method chosen should probably be based on which approach is more efficient for the Wiki engine, but I am in favour of the latter approach because it would add more data that could be queried with the Semantic MediaWiki extension, which could then be used to build other complex datasets. For example, the DictLine property could either be implemented in terms of the other properties, or potentially be replaced with a template that has the same effect. In effect it would be trading speed for server space.

IPA Hover Guides

Summary

Wikipedia has an {{IPAc-en}} template that produces IPA that provides a pronunciation guide when hovering over the individual characters. For example, the Basalt page features examples such as /ˈbæsɔːlt/ where hovering over the 'b' gives "'b' in 'buy'", hovering over the 'æ' gives "'a' in 'bad'", hovering over the 's' gives "'s' in 'sigh'", et cetera.

It would be useful if similar functionality could be reproduced on this wiki.

Reasoning

It would provide a useful starting point for people who aren't familiar with IPA and are trying to understand how to pronounce various names and D'ni words.

Example

A hypothetical {{IPAc-en|t|ɛ|.|l|ɛ|.|d|ɑ|n}} would give /tɛ.lɛ.dɑn/.

Implementation Details

Despite being used as a template, this would be best implemented as a module.

The exact implementation is currently to be confirmed, but the general idea is simple enough:

  • Each numbered parameter will be examined.
  • The specific IPA character will be looked up in a table of tooltips.
  • If a corresponding piece of tooltip text was found:
    • The character will be inserted into the page surrounded by a span with the title set to whatever the found tooltip was.
    • Otherwise, the character will be inserted without any additional processing.

The whole thing would be wrapped in a span element with its style attribute set to produce a dotted line, and that would be bookended by forward slashes.

Template Improvement Proposals

Apocrypha Banner

Summary

At the moment, apocrypha articles using the {{apocrypha}} template are marked with a small badge at the top right of the page which is unobvious and easily overlooked.

I propose that instead of (or in addition to) a small badge, apocrypha articles be marked with a large banner at the top of the page as is done with both Out-of-Cavern artices (e.g. Riven (game)) via the {{OOC}} tag and Unexplored Branches articles (e.g. Chiso Preniv) via the {{Unexplored Branches}} tag.

Reasoning

The reasoning behind this suggestion is to make apocrypha articles more obvious and less likely to be mistaken for 'official' content, particularly in cases where particularly well-made apocrypha with similar quality and/or appearance to official content might easily be mistaken for official content if one has overlooked the badge.

Example

The banner by including the {{apocrypha}} template would appear as thus:

The badge on the top right of the page could appear as it currently does or be omitted.

Implementation Details

The change could be enacted by the use of an {{ambox}} template.

<indicator name="apocrypha">[[File:Apocrypha.png|30px|link=GoArch:Apocrypha]]</indicator><includeonly>[[Category:Apocrypha]]</includeonly>
{{ambox
| type=notice
| image=[[File:Apocrypha.png|50px]]
| issue = is [[GoArch:Apocrypha|apocrypha]]. It should be considered [[GoArch:Canon policy|non-canon]] and may consist of fan-created content.
| small = {{#if:{{{sect|{{{section|{{{1|}}}}}}}}}|{{#if:{{{small|{{{left|}}}}}}|left}} }}
| sect = {{{1|}}}
}}
<noinclude>
'''This template is for indicating that an article is about a non-canon subject. Non-canon subjects include:
* Fan-created content, such as the [[Lara Documents]] or fan-created Ages
* Material from the Dark Horse comics
* Ret-conned content from the Myst novels (such as [[Tadjinar]])</noinclude>

This template currently includes no documentation, though if any were needed it should simply be a matter of adapting the documentation provided for the {{OOC}} or {{Unexplored Branches}} templates.

Add a quote Parameter to {{cite journal}}

Summary

I propose to add a quote parameter to the {{cite journal}} template so that references may include specific quotes relevant to the claim being supported by the citation.

Reasoning

The intent of such a quotation would be to make it easier to verify claims as readers would not have to (for example) go hunting through entire journals just to find the one sentence that supports the claim made in the article.

Example

The quote parameter could then be used as thus:

<ref name="Tay">{{cite journal|author=Catherine|journal=Personal journal|journal-page=Reference:Catherine, personal journal (Riven)|game=Riven|quote=They have named it "Tay"}}</ref>

Producing an output of:

Catherine, Personal journal. Riven. "They have named it "Tay""

The presence or absence of quote marks and/or the style of the quote marks would be up for discussion.

Should anyone find the nesting of the same style of quotes unsatisfactory, I believe it should be possible to enforce the inner quotes being made a different style.

Implementation Details

This proposal could be implemented by simply adding {{#if:{{{quote|}}}| "{{{quote}}}"|}} to the existing template, such that it becomes:

{{{author}}}. ''{{{journal-nolink|[[{{{journal-page|Reference:{{{author}}}, {{{journal}}}}}}|{{{journal}}}]]}}}''. {{{game-nolink|[[{{{game-page|{{{game}}}}}}|{{{game}}}]]}}}.{{#if:{{{quote|}}}| "{{{quote}}}"|}}<noinclude>{{documentation}}</noinclude>

The documentation for the template could be ammended with:

"quote":
{
	"label": "Quote",
	"description": "A selected quote from the referenced journal. The chosen quote should be relevant to the article content that makes use of the citation. If omitted, no quote is included in the reference.",
	"example": "They have named it \"Tay\"",
	"type": "string"
}

As well as the addition of "quote" to the end of the paramOrder array.

Note: In regards to enforcing that nested quotes use a different style, I don't believe templates alone are capable of text replacement that sophisticated, though it's possible they support some sort of regex-replacement feature that I'm unaware of at the time of writing. To support such a feature would, I believe, require a Lua module. I haven't researched that as I'm presuming it won't be an issue, but should it be an issue I have sufficient experience with Lua and parsing that I'm confident I could make a good go of it.

Incomplete Proposals

  • Add a {{hover}} template like the one found on UESP.
    • Use this new {{hover}} template to add hover text for n., adj., v., prep., suf. et cetera, thus making it easier for people to know what these abbreviations mean. E.g. n., adj., b., prep., , suf..
      • For that matter, a general {{abbreviation}} (short form: {{abbr}}) template would also be useful for other abbreviations like , KIPS, and could incorporate an HTML abbr element rather than a span. (The abbr element has the added bonus of already including the dotted line underneath and thus not neading an extra style attribute.)
  • Further proposals for adding quote parameters to other cite templates, such as {{cite dialog}}.
  • Add an access-date parameter to the {{cite forum post}} template.
  • Add relevant details to Reference: pages that archive forum posts such that they can be properly cited with a {{cite forum post}}. In particular, the original forum post URL would be useful - the reference page should be considered the archived form if no Wayback Machine page exists.
  • Adapting the {{sic}} template to produce an output more akin to what UESP produces. (A surplus of examples can be found in the Bloodmoon:Airship Captain's Journal article.
    • For those who are unwilling or unable to visit the linked page, if one were to use UESP's {{sic}} template as {{sic|Incorrect|Correct}}, that would cause the text to appear as thus: Incorrect [sic]. Naturally the text in the hover box could be adapted to say whatever might be appropriate. It could be as simple as including only the correct text.
      • UESP also has the 'sic' link to an appropriate section of one of the style guide articles. For the Guild of Archivists, the most obvious candidate at the moment would be the Quotations section of the style guide.
    • To provide a more concrete example, Gehn's Lab Journal incorrectly says "discreet" instead of "discrete", and at present that looks like discreet [discrete] [sic]. With the proposed change, it would appear as something more like discreet [sic], with the exact tooltip text being up for debate.