Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Guild of Archivists
Search
Editing
User:Pharap/Wiki Improvement Proposals
(section)
From Guild of Archivists
Namespaces
User page
Discussion
More
More
Page actions
Read
Edit
Edit source
History
User contributions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Inline D'ni Dictionary Template === {{ User:Pharap/Templates/Improvement Proposal Box |reference=IP-001 |type=Template |status=Unimplemented }} ==== Summary ==== The wiki has [[Dictionary:Full_Word_List|an extensive dictionary]] which at the moment isn't being particularly well leveraged from within templates and articles. I propose to change that by adding some templates that could make use of the dictionary in conjuction with the D'ni rendering capabilities of the wiki to provide rendered D'ni with hover text that provides information from the D'ni dictionary. Notably, the hover text would be able display the three main ways of writing that word ([[Dnifont]], [[OTS]], and [[NTS]]), as well as the IPA pronunciation of the word. ==== Reasoning ==== This feature would make it easier to provide more linguistic information with less markup and less effort. The primary way of implementing this template (see [[#Example|Example]] below) would allow using the name of the dictionary entry, which is likely easier for those who are not well-versed in Dnifont. However, a secondary implementation supporting Dnifont may be provided. Having the IPA pronunciation would be particularly useful considering how many pages currently feature rendered Dnifont and OTS-style words but lack any corresponding IPA. The presence of IPA would be incredibly useful for readers who understand the meaning of the IPA symbols, as it would help them to know how to pronounce the various D'ni words and names that crop up throughout the wiki. ==== Example ==== A usage like <code><nowiki>{{D'ni word OTS|Teledahn}}</nowiki></code> could appear as thus: {{User:Pharap/Templates/D'ni word OTS|Teledahn}}. Hence one would only need to remember the name of the dictionary entry, and the template will generate all relevant information as part of the hover text. Alternatively, a variant like <code><nowiki>{{D'ni word Dnifont|teleDan}}</nowiki></code> accepting Dnifont could also be permitted, as well as possibly a form that could accept either argument, such as <code><nowiki>{{D'ni word|ots=Teledahn}}</nowiki></code> and <code><nowiki>{{D'ni dict|dnifont=teleDan}}</nowiki></code>, perhaps even having <code><nowiki>{{D'ni word|Teledahn}}</nowiki></code> be treated as <code><nowiki>{{D'ni word|ots=Teledahn}}</nowiki></code>. Ideally the hover text would be better formatted, more like the <nowiki>[[Has length::30 cm]]</nowiki> property from the Semantic MediaWiki addons: [[Has length::30 cm]], but I have yet to investigate how that might be achieved. ==== Implementation ==== As a proof of concept, I have implemented all the aforementioned templates: * A template that accepts a [[Dictionary:Full Word List|Dictionary]] page name: ** <code><nowiki>{{</nowiki>[[User:Pharap/Templates/D'ni word OTS]]<nowiki>|</nowiki>Teledahn<nowiki>}}</nowiki></code> β {{User:Pharap/Templates/D'ni word OTS|Teledahn}} * A template that accepts [[Dnifont]]: ** <code><nowiki>{{</nowiki>[[User:Pharap/Templates/D'ni word Dnifont]]<nowiki>|</nowiki>teleDan<nowiki>}}</nowiki></code> β {{User:Pharap/Templates/D'ni word Dnifont|teleDan}} * A template that accepts either: ** <code><nowiki>{{</nowiki>[[User:Pharap/Templates/D'ni word]]<nowiki>|</nowiki>Teledahn<nowiki>}}</nowiki></code> β {{User:Pharap/Templates/D'ni word|Teledahn}} ** <code><nowiki>{{</nowiki>[[User:Pharap/Templates/D'ni word]]<nowiki>|</nowiki>ots=Teledahn<nowiki>}}</nowiki></code> β {{User:Pharap/Templates/D'ni word|ots=Teledahn}} ** <code><nowiki>{{</nowiki>[[User:Pharap/Templates/D'ni word]]<nowiki>|</nowiki>dnifont=teleDan<nowiki>}}</nowiki></code> β {{User:Pharap/Templates/D'ni word|dnifont=teleDan}} Discovering how to implement this solution took me quite a lot of research as at first I didn't know about the existance of the [[Property:OTS|OTS]], [[Property:NTS|NTS]], and [[Property:IPA|IPA]] properties, as their existence was somewhat buried in the [[Module:Dict D'ni|Dict D'ni]] module and {{tl|IPA}} template respectively. After figuring those out I managed to discover some modules that support the '<code>dnifont2ots</code>' and '<code>dnifont2nts</code>' functions. It also took me a while to realise that the syntax <code><nowiki>[[Property::Value]]</nowiki></code> can be used to declare a value for a property in the same way as <code><nowiki>{{#set: Property=Value}}</nowiki></code>, and that consequently the following two lines of the D'ni Dict module are producing two properties: * <code><nowiki>output = output..'* [[OTS]]: [[OTS::'..dnifont2ots(args['dnifont'])..']]\n'</nowiki></code> * <code><nowiki>output = output..'* [[NTS]]: [[NTS::'..dnifont2nts(args['dnifont'])..']] '</nowiki></code> Specifically: * If the expression <code><nowiki>dnifont2ots(args['dnifont'])</nowiki></code> were to produce <code>teledahn</code> then the output <code><nowiki>* [[OTS]]: [[OTS::teledahn]]</nowiki></code> would be inserted into the page. * If the expression <code><nowiki>dnifont2nts(args['dnifont'])</nowiki></code> were to produce <code>teledan</code> then the output <code><nowiki>* [[NTS]]: [[NTS::teledan]]</nowiki></code> would be inserted into the page. In the case of the {{tl|IPA}} template, I simply hadn't peeked at its source. At one point I had separately thought of the possibility of including such a property in the {{tl|IPA}} template, but for a while after I had simply presumed that it wouldn't be there and hadn't thought to check until I ended up looking at the source by chance when editing my User page and noticing the property's presence. After getting a working prototype, I went back and refined the templates several times, including changes such as adding a <code>link</code> parameter, changing how I was using the 'dnifont2ots' facilities (due to discovering a second module with the same functionality), and splitting the hover text over multiple lines.
Summary:
Please note that all contributions to Guild of Archivists may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GoArch:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main Page
Random page
Categories
All pages
Recent changes
Resources
D'ni dictionary
Reference material
Utilities
Community
Forums
Jalak Game Directory
Projects
Apocrypha
Unexplored Branches
All projects
Contribute
Stubs
Wanted
Cleanup
Dead ends
Image requested
Help
Help
Guide
Policies
Wiki tools
Wiki tools
Special pages
Page values
Page tools
Page tools
User page tools
Logs
View user groups
More
What links here
Related changes
Page information
Page logs