https://bugzilla.wikimedia.org/show_bug.cgi?id=19304
jida...@jidanni.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #3 from jida...@jidanni.org 2009-07-06 01:48:54 UTC --- Also, using >function >JidanniLessRedContentActionsVectorSkin(&$a,&$links){var_dump($a,$links);die();return > true;} >$wgHooks['SkinTemplateNavigation'][]='JidanniLessRedContentActions'; I was shocked to find in $links that local language strings have crept into variable names themselves, at the markers @@1@@, and @@3@@, that I put in below: >array(4) { > ["namespaces"]=> > array(2) { > ["分類"]=> @@1@@ > array(3) { > ["class"]=> > string(12) "selected new" > ["text"]=> > string(6) "分類" @@2@@ > ["href"]=> > string(66) > "/index.php?title=%E5%88%86%E9%A1%9E:489.0750&action=edit&redlink=1" > } > ["分類_talk"]=> @@3@@ > array(3) { > ["class"]=> > string(3) "new" > ["text"]=> > string(10) "Discussion" @@4@@ > ["href"]=> > string(84) > "/index.php?title=%E5%88%86%E9%A1%9E%E8%A8%8E%E8%AB%96:489.0750&action=edit&redlink=1" > } > } I mean how can anybody write a hook now that even the variable names themselves could be in a hundred different languages?! Furthermore, compare @@2@@ and @@4@@, one is English, the other not... I didn't investigate, but I can tell you one thing, using this shell script, >for site in localhost; do > for lang in en zh-tw; do > for skin in monobook vector; do > > URL="http://$site/index.php?title=Category:486.3875&uselang=$lang&useskin=$skin" > echo $((++c)). $URL > w3m -no-cookie -no-proxy -dump $URL|egrep '• (分類|Category)' > done; echo ==== > done >done I produced this output: >1. >http://localhost/index.php?title=Category:486.3875&uselang=en&useskin=monobook > • Category >2. http://localhost/index.php?title=Category:486.3875&uselang=en&useskin=vector > • 分類 >==== >3. >http://localhost/index.php?title=Category:486.3875&uselang=zh-tw&useskin=monobook > • 分類 >4. >http://localhost/index.php?title=Category:486.3875&uselang=zh-tw&useskin=vector > • 分類 What it says is is that you have caused the local word for categories here to become so embedded that not even a uselang=en could conquer it! I.e., even though the user changes his Preferences to English, he still must face the 'categories' tab written in in zh-tw. However I couldn't reproduce that when $wgLanguageCode = 'en' and uselang=zh-tw. Only visa-versa. Nor could I reproduce it with this script: >#!/bin/bash >for URL1 in \ > http://en.wikipedia.org/wiki/Category:United_States \ > http://zh.wikipedia.org/wiki/Category:美国 >do > for lang in en zh-tw; do > for skin in monobook vector; do > URL="$URL1?uselang=$lang&useskin=$skin" > echo $((++c)). $URL > w3m -no-cookie -dump $URL|egrep '• (分類|Category)' > done; echo ==== > done >done Now finally returning to the original topic of this bug. If the two skins could use the same hook, that would be great I suppose... OK, each should have its own hook, but users will dare to do $wgHooks['SkinTemplateTabs'][]=$wgHooks['SkinTemplateNavigation'][]='MyFunction'; so there should be some statement about how safe that is. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l