[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-06-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Brad Jorsch  changed:

   What|Removed |Added

 Blocks||66051

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-03-18 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #30 from Niklas Laxström  ---
(In reply to PiRSquared17 from comment #29)
> Does it support caching correctly? Is there any reason not to use this?

It would if it used $parser->getOptions()->getUserLang().

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-03-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #29 from PiRSquared17  ---
(In reply to Nemo from comment #28)
> (In reply to Melancholie from comment #13)
> > Note: On Betawiki (translatewiki.net) there is such a magic word; but they
> > call it {{UILANGCODE}}
> 
> That's https://git.wikimedia.org/blob/translatewiki.git/HEAD/nikext.php btw.

Does it support caching correctly? Is there any reason not to use this?

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-03-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #28 from Nemo  ---
(In reply to Melancholie from comment #13)
> Note: On Betawiki (translatewiki.net) there is such a magic word; but they
> call it {{UILANGCODE}}

That's https://git.wikimedia.org/blob/translatewiki.git/HEAD/nikext.php btw.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-03-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #27 from PiRSquared17  ---
(In reply to ziggy from comment #26)
> For those who'd like this feature, I've hacked a new magic word as part of
> my copy of UniversalLanguageSelector: {{USERLANG}}
> 
> New UniversalLanguageSelector.i18n.magic.php file:
> $magicWords = array();
> $magicWords['en'] = array('userlang' => array(0,'USERLANG'));
> 
> Added to UniversalLanguageSelector.php, below last hook:
> $wgHooks['ParserGetVariableValueSwitch'][] =
> 'UniversalLanguageSelectorHooks::getLanguageMagic';
> $wgHooks['MagicWordwgVariableIDs'][] =
> 'UniversalLanguageSelectorHooks::getLanguageMagicDeclareVarIds';
> 
> Added to UniversalLanguageSelector.hooks.php, above getLanguage(...):
> public static function getLanguageMagicDeclareVarIds( &$customVariableIds ) {
> $customVariableIds[] = 'userlang'; return true; }
> public static function getLanguageMagic(&$parser, &$cache, &$magicWordId,
> &$ret
> ) { if ( 'userlang' == $magicWordId ) {
>   $context = RequestContext::getMain();
>   $code = $context->getLanguage()->getCode();
>   $ret = self::getLanguage($context->getUser(), $code) ? $code : '';
>   if($ret != $wgLanguageCode) $parser->disableCache(); }
> return true; } 
> 
> 
> Works like charm, although heeding the warnings of the previous posters the
> cache gets disabled if the userlang is different than the wgLanguageCode :-)
> It now behaves very much like the dynamic results obtained from a database
> (e.g. WikiDB)

Could you please commit this to Gerrit?

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-02-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Nemo  changed:

   What|Removed |Added

   See Also||https://bugzilla.wikimedia.
   ||org/show_bug.cgi?id=57603

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2014-02-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Nemo  changed:

   What|Removed |Added

   See Also||https://bugzilla.wikimedia.
   ||org/show_bug.cgi?id=61695

-- 
You are receiving this mail because:
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-03-29 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Tilman Bayer  changed:

   What|Removed |Added

 CC||tba...@wikimedia.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-03-20 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #26 from zi...@rbem.org ---
For those who'd like this feature, I've hacked a new magic word as part of my
copy of UniversalLanguageSelector: {{USERLANG}}

New UniversalLanguageSelector.i18n.magic.php file:
$magicWords = array();
$magicWords['en'] = array('userlang' => array(0,'USERLANG'));

Added to UniversalLanguageSelector.php, below last hook:
$wgHooks['ParserGetVariableValueSwitch'][] =
'UniversalLanguageSelectorHooks::getLanguageMagic';
$wgHooks['MagicWordwgVariableIDs'][] =
'UniversalLanguageSelectorHooks::getLanguageMagicDeclareVarIds';

Added to UniversalLanguageSelector.hooks.php, above getLanguage(...):
public static function getLanguageMagicDeclareVarIds( &$customVariableIds ) {
$customVariableIds[] = 'userlang'; return true; }
public static function getLanguageMagic(&$parser, &$cache, &$magicWordId, &$ret
) { if ( 'userlang' == $magicWordId ) {
  $context = RequestContext::getMain();
  $code = $context->getLanguage()->getCode();
  $ret = self::getLanguage($context->getUser(), $code) ? $code : '';
  if($ret != $wgLanguageCode) $parser->disableCache(); }
return true; } 


Works like charm, although heeding the warnings of the previous posters the
cache gets disabled if the userlang is different than the wgLanguageCode :-) It
now behaves very much like the dynamic results obtained from a database (e.g.
WikiDB)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-03-20 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Nemo  changed:

   What|Removed |Added

 CC||zi...@rbem.org

--- Comment #25 from Nemo  ---
*** Bug 46372 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-03-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

pirsquare...@gmail.com changed:

   What|Removed |Added

 CC||pirsquare...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-03-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #24 from Nemo  ---
(In reply to comment #23)
> Also one reason for this feature: using in the URLs as in the 
> http://www.wikidata.org/wiki/MediaWiki:Sitesupport-url

In this example, however, you have the non-hacky workaround of creating the
subpages with correct uselang. We should do it by bot at least on Meta, Commons
and Wikidata, perhaps. (Better to discuss on Meta though.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-03-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #23 from Paul Kaganer  ---
Also one reason for this feature: using in the URLs as in the 
http://www.wikidata.org/wiki/MediaWiki:Sitesupport-url

In the multilang. Wikimedia projects (Meta, Commons, Wikidata, Wikispecies,
Wikimania, WMF wiki, ...), fundraising's URL was generated with
English-language option "&uselang=en".

With using {{USERLANG}} variable, will be able to direct users to the donation
page on the language that they use in the his interface.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Amir E. Aharoni  changed:

   What|Removed |Added

   Keywords||i18n
 CC||amir.ahar...@mail.huji.ac.i
   ||l

--- Comment #22 from Amir E. Aharoni  ---
(In reply to comment #21)
> NB: I inform of Amir E. Aharoni (from Language engineering team) about this
> issue. He seems willing to do it soon.

More precisely, I suggested opening a bug about this issue in a private chat. I
didn't know that this one is open already, but it makes sense.

That's the kind of thing that the Language engineering team does, but just as
Mormegil says: the important part is getting the consensus to accept it into
core.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #21 from Paul Kaganer  ---
NB: I inform of Amir E. Aharoni (from Language engineering team) about this
issue. He seems willing to do it soon.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Nemo  changed:

   What|Removed |Added

   Keywords||performance, platformeng
 CC||afeld...@wikimedia.org,
   ||maxsem.w...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #20 from Mormegil  ---
(In reply to comment #18)
> I'm sorry but per comment 14 this is considered a lowest priority bug and
> nobody is working on it; don't mislead users.

Note that the comment was made before the time every page on Commons used the
{{int:lang}} hack. After that, and especially after bug 14404 was fixed, I
don’t see the reason why the {{int:lang}} hack shouldn’t be implemented
properly instead of abusing a different construction. The cache coherence
issues should have been resolved by bug 14404, AFAICS. So, there is no need why
this should be a WONTFIX. (See also
http://lists.wikimedia.org/pipermail/wikitech-l/2012-January/057763.html
(corrected link from comment #15).)

As for “nobody is working on it”: this is not difficult to implement,
programming-wise. Just to make sure it gets accepted to core.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #19 from Paul Kaganer  ---
(In reply to comment #18)
> I'm sorry but per comment 14 this is considered a lowest priority bug and
> nobody is working on it; don't mislead users.
> I'd like to have it, too, but voting is how to express it.

Hard to argue with the beautiful words of the Brion The Great and Chad H.

But thing is that this feature is _really_ needed, and still _really_ used all
these years. Okay, "we hardly want to encourage the behavior" - we want to
encourage creating of large sets of faked MediaWiki messages?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Nemo  changed:

   What|Removed |Added

   Priority|Normal  |Lowest

--- Comment #18 from Nemo  ---
I'm sorry but per comment 14 this is considered a lowest priority bug and
nobody is working on it; don't mislead users.
I'd like to have it, too, but voting is how to express it.

By the way:

(In reply to comment #16)
> Note comment 13: it could be enough to enable Translate extension on Commons.

That magic word is a local hack, but for templates et al. see:
[[mw:Help:Extension:Translate/Unstructured element translation]]
[[Help:Extension:Translate/Page_translation_administration#Markup_examples]]

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Paul Kaganer  changed:

   What|Removed |Added

   Priority|Lowest  |Normal

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

--- Comment #17 from Paul Kaganer  ---
Very support of this request! Current realization of Template:Autotranslate
(widely used in the multilanguage sites as Commons and Meta) forced to use a
hack with calling MediaWiki:Lang/ sub-messages.

If MediaWiki engine is still defines the user-interface language, there is no
valid reason not to return the language through such magic word.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2013-01-17 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Paul Kaganer  changed:

   What|Removed |Added

 CC||asha...@wikimedia.org,
   ||niklas.laxst...@gmail.com,
   ||paul.kaga...@mail.ru,
   ||s.mazel...@xs4all.nl
  Component|General/Unknown |Internationalization

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2012-01-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

Nemo_bis  changed:

   What|Removed |Added

 CC||federicol...@tiscali.it

--- Comment #16 from Nemo_bis  2012-01-27 10:06:18 UTC 
---
Note comment 13: it could be enough to enable Translate extension on Commons.

(In reply to comment #14)
> Patiently awaiting a fix for bug 14404.

The bug has been fixed, but the current behaviour isn't documented anywhere but
https://meta.wikimedia.org/wiki/Help:System_message which should be updated.
Even if there isn't a decision about what behaviour is the best and should be
kept forever, documenting the current system is necessary, as well as keeping
it until we have proper alternatives.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 2085] Add a {{USERLANGUAGE}}/{{USERLANG}} magic word

2012-01-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=2085

MZMcBride  changed:

   What|Removed |Added

Summary|Variable {{USERIFCODE}} |Add a
   |(user interface language|{{USERLANGUAGE}}/{{USERLANG
   |code)   |}} magic word

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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