[Owncloud] JavaScript translation function with interpolation support

Thomas Müller thomas.mueller at tmit.eu
Mon Sep 17 11:16:59 UTC 2012


Am Montag, dem 17.09.2012 um 12:32 schrieb Thomas Tanghus:
> On Monday 17 September 2012 10:18 Thomas Müller wrote:
> > Hi,
> > 
> > maybe I'm not looking at the correct file [0], but we have no support for
> > string interpolation on the translation function in JavaScript - right?
> > 
> > Any specific reason for this?
> > Who can implement it?
> 
> I have used [1] for variable interpolation in a micro-templating jquery 
> plugin in my process of rewriting the Contacts UI. Not extending the String
> prototype as in the example, but as a separate function. 
> I guess something like that could be used, maybe by simply adding an 
> optional variable map/object argument to the t() function.
> 
> [1] http://stackoverflow.com/questions/1408289/best-way-to-do-variable-interpolation-in-javascript#answer-1408373
> 

Hi Thomas,

I like this approach - can we target this for 5.0?

Thanks a lot,

Tom

> -- 
> Med venlig hilsen / Best Regards
> 
> Thomas Tanghus
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud



More information about the Owncloud mailing list