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!
==== 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