|
|
(515 intermediate revisions by 41 users not shown) |
Line 1: |
Line 1: |
| {{:User:Zai_Lynch/Award}}You found my talk page... Find old discussions at: [[User:Strife_Onizuka/Talkpage_Archive_01]] | | {{:User:Zai_Lynch/Award}}You found my talk page... Find old discussions take a look at the archives: [[User:Strife_Onizuka/Talkpage_Archive_01|1]] [[User:Strife_Onizuka/Talkpage_Archive_02|2]] [[User:Strife_Onizuka/Talkpage_Archive_03|3]] |
|
| |
|
| == Question about [[Template:Multi-lang]] == | | == linking keywords with <nowiki><syntaxhighlight></nowiki> == |
| Heyas =)<br>
| |
| I was trying to add the new ''version'' feature to the [[Template:Help/de|help template]] and stumbled upon a difficulty where I hoped you could help me with... I made a testpage at [[User:Zai Lynch/Sandbox/MLtest/de]] but it acts weird... when i make a change to [[User:Zai_Lynch/Sandbox/MLtest/version]] then the box is displayed at the test page. When I just edit and save the test page (without changing anything) it eats up the language bar. It acts somehow unexpectedly/random. I don't really know why it is... (o.O) Any ideas?<br>
| |
| [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 19:42, 5 November 2008 (UTC)
| |
| :I'll take a look at the template and fidget with it. No ideas come to mind. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 20:00, 5 November 2008 (UTC)
| |
| ::Kewl, thx! :-)
| |
| ::And I'll go to bed as early as 9PM for the first time in ages (o.O) gotta be ill... ^^
| |
| ::<nowiki>*</nowiki>sleepy* [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 20:07, 5 November 2008 (UTC)
| |
| :hm... the bug seems to be very strange. And it isn't part of the template.
| |
| :Please try the following and tell me what you see:
| |
| :*Log out of the Wiki and then browse to [[Quickie_Wiki_Intro/Usercategories]] (or [[User:Zai_Lynch/Sandbox/MLtest/de]]). Notice: there is a language bar on top
| |
| :*Log in the Wiki and look at the same page. Notice: Language bar is gone.
| |
| :*Edit the article and preview. Notice: Language bar is visible in preview.
| |
| :*Save the article. Notice: Language bar is gone again.
| |
| :*Go to [[Special:Preferences]] and change the interface language (to German, for example). Notice: The language bar is visible...
| |
| :*Change the language back to English. Notice: The language bar is gone again...
| |
| :o.O [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 07:47, 6 November 2008 (UTC)
| |
| ::Had to sacrifice a (unused) feature but it's working now. Weird bug nevertheless... Sorry for spamming
| |
| ::[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 02:16, 7 November 2008 (UTC)
| |
|
| |
|
| == grid list ==
| | Looks like keyword linking is a [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Default_Links_for_Keywords server side variable], don't know if LL will want that enabled or not this time. --[[User:ObviousAltIsObvious Resident|ObviousAltIsObvious Resident]] ([[User talk:ObviousAltIsObvious Resident|talk]]) 21:42, 21 January 2015 (PST) |
| | * If that works differently than it did before (no first hand knowledge here), please create a JIRA with how things worked before and now, and maybe drop a link to the JIRA on the open source list or raise it at Oz's meeting. A lot of work was done on shedding a lot of special case dependencies related to the old auth mechanism and enhancing our security posture. It would be unsurprising if something were lost in the transition. --[[User:Soft Linden|Soft Linden]] ([[User talk:Soft Linden|talk]]) 07:30, 22 January 2015 (PST) |
|
| |
|
| Strife, I was wondering if you'd mind if I took the idea from the grids and downloads list that you have and turned it into a template since I know of a few places (my userpage for one :) ) where it could be useful and I didn't just want to copy off the code especially without your permission. [[User:Gordon Wendt|Gordon Wendt]] 16:34, 6 November 2008 (UTC)
| | *Whilst working as an admin on [https://community.bistudio.com/wiki/ the BIStudio (Arma) Wiki], I worked on implementing auto linked <sqf> (Arma's scripting language) syntax highlighting via MediaWiki's GeSHi extension. Whilst attempting to convince the server admin to make the changes needed, I made [https://www.youtube.com/watch?v=KWMwmXNUhQE this YouTube video] explaining how simple it is. I had a stinking cold at the time, and am rambling close to incoherently, but the basics are there if needed. I can also dig out more detailed info if required. M'Kay? :-) [[User:Fred_Gandt|'''<span style="font-family:arial;color:#055;font-size:16px;">f<i style="color:#0dd;font-size:10px;">red</i>g<i style="color:#0dd;font-size:10px;">andt</i></span>''']] 08:29, 22 January 2015 (PST) |
|
| |
|
| :Do what you want with it, I didn't put it in the global space because...
| | *{{JIRA|BUG-8283}} - Not related to highlighting but to other changes as a result of the upgrade. I am very happy we now have proper collapsible sections. I will go forth and have fun. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 12:13, 23 January 2015 (PST) |
| :*Make changes without having to fix what it breaks.
| |
| :*Unsure about who would want to use it.
| |
| :*Didn't want to fix my content when others changed it.
| |
| :To recap, you are welcome to reuse the code. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 20:24, 6 November 2008 (UTC)
| |
|
| |
|
| == LSL Category Localization Template == | | == Thank you! == |
|
| |
|
| Heyas! =)<br>
| | It's good to be back! I've been away for far too long. Thanks for the pointers, RE: [[llPassTouches]] and [[llPassCollisions]]. I'll be sure to review my tweaks to [[touch_start]] ASAP and update as necessary. I'm very glad to see you're still around. ;) |
| It's me again... I wanted to ask for feedback/input on these two templates: [[User:Zai_Lynch/Sandbox/Template:LSL_Cat_L10n/de|German]], [[User:Zai_Lynch/Sandbox/Template:LSL_Cat_L10n/fr|French]].<br> It would be supposed to easily provide unified localized LSL cats so translators wouldn't accidentally connect an article to a wrong category when they'd choose another translation for the same word. I implemented a small test version in [[Template:LSL Function/de]], [[Template:LSL Event/de]], [[Template:LSL Constant/de]], [[Template:LSLC/de]] and [[Template:LSLGC/de]]. I tried about 5 different ways of implementing the template itself (without database-slaves) but they all failed due to either wiki limitations or parser function bugs (it worked well in the sandbox wiki). I'd like to try it in the German localization (can't break much content there at the moment...) and in case it works out fine, Gally would be willing to help me for the French implementation. Do you have any objections against the template (could it break something? slow the wiki down?) or input, thoughts, ...? Are there more templates besides the 5 I already altered, where I should pay attention to?<br> | | [[User:Nava Muni|Nava]] ([[User talk:Nava Muni|talk]]) 12:39, 3 January 2016 (PST) |
| Greetz, [[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 00:35, 21 November 2008 (UTC)
| |
|
| |
|
| :I've given a lot of thought to slaves in the past (there was a time I wanted a centralized function/constant/event description lookup for the "Also..." section). The correct way to implement them is to have a slave for each letter, the advantage is that slaves can have slaves. If implemented properly the cost is very small. The problem however is that you have to be conscious of the format. If you want to change the format you have to change the entire DB. I believe the best solution is to version each of the entries. Now at this point you need to take a step back and ask "Am I reinventing the wheel?" And the answer is "Yes". Essentially what you want is a database where you can feed it a key and get the stored value pair.
| | -- Oh, never mind! I see you updated the [[touch_start]] page. Excellent! |
| | [[User:Nava Muni|Nava]] ([[User talk:Nava Muni|talk]]) 15:51, 3 January 2016 (PST) |
|
| |
|
| :There is of course another solution to this problem. Make all the Categories smart so they can be included (like the PRIM_* flags), and pass it a parameter that tells it to only return the foreign language category name you specify OR you could make a subpage like we do for the translation version (which would be really smart) and just have the lookup table there. | | :I honestly made about the most minimal edit I could. I really wasn't up for rewriting the article and what you wrote was good. I mostly lurk these days and only spring into action when there is some new function or constant that needs documenting or the documentation is globally contradictory. |
|
| |
|
| :Anywho there are my initial thoughts on this. Last time I checked MW executes both sides of a conditional, so you need to make it so what is inside the conditional is not the template but just the name of the template (so it only executes text and not a template). -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 01:42, 21 November 2008 (UTC) | | :I'm thinking of moving some of that content into templates or something, merging the touch event articles maybe, like [[llSetPrimitiveParams]]. The new Bento project has me excited. I just wish there were more attach points on the wings. ---- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 20:18, 5 January 2016 (PST) |
|
| |
|
| ::Thx for the feedback =)
| | == Pages with Haiku needing updating. == |
| ::@Slaves: I didn't wanted to use any slaves for this. My goal was, to have all translations stored on one page so that only that one needed to be localized. Unfortunatly, the else-if chain exceeded the maximum depth allowed by the mediawiki. So I tried to break the chain into two chains and store a variable value in case the first chain didn't give a result, so the second chain starts. This [http://wiki.zeitenwerk.de/index.php/Template:LSL_Cat_L10n/de works in the sandbox] but not over here due to [[Help:Known_caveats_in_parser_functions|the nasty bug you mentioned as well]]. I also tried a recursive process where the template called itself with a value but the Wiki complained again (it doesn't like loops...). After two other work arounds failed too, I had to create the slaves to do the job... But I'm not really happy with that solution since it splits my database into 2. Splitting it further (for every letter) would erase one of the benefits: easy localization. I think the database (around 100 terms in worst case, usually less cause not all terms need a translation) is to small to justify that.
| |
| ::The smart cat version is a way I thought about too (and Gally had a similar idea to unify categories on translated subpages), but the problem with it would be again that it is a decentralized implementation. Someone who wants to begin with a new translation of the portal would have to edit all smart-cat pages instead of only one (or two) database pages. So I would consider this method in case it notably decreases the load on the Wiki. I don't know how computationally intensive it is for the Wiki to check the current database slaves. In case it's to much, I'd like the subpage-lookup best. With some preperation (collecting translations for more than one language, like done with the [[Mentor_Linguist_Scribe_Translation_Project/HP_L10N|HP L10n]]) and then add them all when we got maybe 5 or 6 languages.
| |
| ::[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 17:03, 21 November 2008 (UTC)
| |
|
| |
|
| :::You would actually want to use "switch" instead of "ifeq", that said, you don't want to have a huge switch statement, it's not good for the wiki. Huge templates take a long time to execute (take a look at the templates on [[LSO]], they take so long to rebuild that the connection times out and the wiki has a fit). Anyway you cut it, to add a new language would require duplicating the slave DB. It would not be fun. You may gain some centralization by having the Slave DB but to keep it from bringing the wiki to it's knees you won't have much. If we decide to forgo the centralization altogether and go with a system like the article versioning, we can solve several problems all at once that would have popped up as a result of having it in a DB. If we do it properly we can set it up like multi-lang with the articles in need of translation. Sure it would be a bear to setup for each language but the alternatives just don't scale or require maintenance to allow it to scale. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 04:25, 22 November 2008 (UTC)
| | Hello Strife. I recall you being the one interested in putting haikus in .... something something wiki magic something to make them not show up in search. I'll post here haikus and their pages that I find, and unless I hear otherwise will be removing them from the body of the page. <br> |
| | ---<br> |
| | [[Jump]] |
| | <h6>Haiku</h6> |
| | Beware of goto's.<br> |
| | Accidental recursion.<br> |
| | Beware of goto's. |
|
| |
|
| ::::Just to make sure that we're on the same page: I meant one DB (or X slaves) for each language. Not one DB for all languages. The German templates would only call the German DB, French only French, etc. So the maximum else-if depth got an upper bound at the count of LSL cats (worst case, when every cat has a translation other than cat/ISO-CODE) which seems to be something between 100 and 110.
| |
| ::::That beeing said, I got to agree about the [[LSO]] article. I also checked the L10n lookup database and got to say that it needs like forever to load... Might be since I included it a hundret times in the table to verify that all translations work right and (since most of the translations are missing) it needs to run the else-if chain till the end. So it would only be included about 4 times on an average article I guess. Load would then be roughly ((current load)/100)*4 + (load of other templates).
| |
| ::::So I think we'll go with the smart-cat-subpage-lookup? I'd then need a complete list of LSL cats to hand them out to linguists to translate. I ''think'' the [[User:Zai_Lynch/Sandbox/Template:LSL_Cat_L10n/de|table]] should be complete but I'm not 100% sure. For implementation we'd need to take care of the input format. French translations use "cat/fr" as input while Japanese and German translations just use "cat". So we'd either need to add these differences at the subpages (bad imho) or make the template unify the input before passing it to the lookup (better imho).
| |
| ::::[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 14:46, 22 November 2008 (UTC)
| |
|
| |
|
| :::::It won't be ((current load)/100)*4 + (load of other templates), it will be (current load)*4 + (load of other templates); there is no speed gain to my knowledge to a big switch statement (that I know of), it's O(N), not O(1). You probably don't want more than 25 items per slave, properly configured, it won't be much more costly then the slaves. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 01:27, 23 November 2008 (UTC)
| | --[[User:Joanne Furlough|Joanne Furlough]] ([[User talk:Joanne Furlough|talk]]) 23:47, 5 June 2019 (PDT) |
| | |
| ::::::Currently, the template is included about 100 times in the table. At an average article, it would be only included maybe 3, 4 or 5 times. So it would be ((the load of the 100 includes table) / 100) * (number of inclusions in the article). That is what I meant. Not the else-if depth or the switch.
| |
| ::::::[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 01:37, 23 November 2008 (UTC)
| |
| | |
| == MIA ==
| |
| Ouch, I hope you get yourself setup soon with a new job and computer, your a valuable member of the community and it would be somewhat depressing to lose you. I wish you good luck. --[[User:Nexii Malthus|Nexii Malthus]] 10:53, 30 November 2008 (UTC)
| |
| | |
| What Nexii said... *adds home, job and PC to Santa's list for Strife, as well as a four leaf clover and a fresh polished horseshoe for the x-tra boost of luck*<br>[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 13:37, 30 November 2008 (UTC)
| |
| | |
| :It all basically means I can't write scripts, login to SL or do much template work (alignment gets funky at smaller than 100% zoom). -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 01:31, 1 December 2008 (UTC)
| |
| | |
| == Geek Award ==
| |
| LOL. That really makes my day. As to the inspiration... I got sick of having to manually double embed templates to avoid the call cost. I had been wanting a null/empty template so I could have an if on the template name and so nothing would get included... but then I'm like, why not a variable template? So I start to write it and I'm then like? What to name it... I know "Template". On review though, the null/empty template is the better idea. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 21:44, 10 December 2008 (UTC)
| |
| :Glad you like it (^_^)
| |
| :Can you explain why an empty template is reducing the load on the Wiki when you call it with a parser function as an argument? Has it got something to do with {{Jira|WEB-896}}?
| |
| :[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 22:45, 10 December 2008 (UTC)
| |
| ::Yep it has to do with {{Jira|WEB-896}}. Say you had the following code but you wanted it conditional:
| |
| ::<code><nowiki>{{ugly|ugly param1|ugly param2}}</nowiki></code>
| |
| ::The easy thing would be to just wrap it:
| |
| ::<code><nowiki>{{#if:{{{test|}}}|{{ugly|ugly param1|ugly param2}}}}</nowiki></code>
| |
| ::The problem is, Template:Ugly gets evaluated (and it effects #vars).
| |
| ::Lets look at this solution:
| |
| ::<code><nowiki>{{{{#if:{{{test|}}}|ugly|/dev/null}}|ugly param1|ugly param2}}</nowiki></code>
| |
| ::By putting the conditional around the name of the template, when the test fails it evaluates Template:/dev/null ... which does nothing, and with MediaWiki 1.12 template parameters aren't evaluated until they are first used by the template; so in this case, they are never evaluated. It gets us around the ugly problem of conditional templates getting called needlessly.
| |
| | |
| ::Historically I've used Template:! instead of /dev/null, for the only reason I hadn't gotten around to making the /dev/null template. This of course had it's own problems (specifically that it inserted a | (pipe character)). I'll probably start converting things over to /dev/null when I do template updates.
| |
| | |
| ::P.S. You nailed it on the head though, Template:Template is the result of me giving into my more nerdy tendencies. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 23:49, 10 December 2008 (UTC)
| |
| | |
| Haha, nice award. Template:Template is definitely something interesting. --[[User:Nexii Malthus|Nexii Malthus]] 02:11, 11 December 2008 (UTC)
| |