application/luci-statistics: fix i18n binding, use string() instead of translate

This commit is contained in:
Jo-Philipp Wich 2009-07-31 00:02:53 +00:00
parent d8eb5b292d
commit 45d9fe0b16

View file

@ -43,13 +43,13 @@ end
function Instance.title( self, plugin, pinst, dtype, dinst ) function Instance.title( self, plugin, pinst, dtype, dinst )
local title = self.i18n.translate( local title = self.i18n.string(
string.format( "stat_dg_title_%s_%s_%s", plugin, pinst, dtype ), string.format( "stat_dg_title_%s_%s_%s", plugin, pinst, dtype ),
self.i18n.translate( self.i18n.string(
string.format( "stat_dg_title_%s_%s", plugin, pinst ), string.format( "stat_dg_title_%s_%s", plugin, pinst ),
self.i18n.translate( self.i18n.string(
string.format( "stat_dg_title_%s__%s", plugin, dtype ), string.format( "stat_dg_title_%s__%s", plugin, dtype ),
self.i18n.translate( self.i18n.string(
string.format( "stat_dg_title_%s", plugin ), string.format( "stat_dg_title_%s", plugin ),
self.graph:_mkpath( plugin, pinst, dtype ) self.graph:_mkpath( plugin, pinst, dtype )
) )
@ -68,13 +68,13 @@ end
function Instance.label( self, plugin, pinst, dtype, dinst ) function Instance.label( self, plugin, pinst, dtype, dinst )
local label = self.i18n.translate( local label = self.i18n.string(
string.format( "stat_dg_label_%s_%s_%s", plugin, pinst, dtype ), string.format( "stat_dg_label_%s_%s_%s", plugin, pinst, dtype ),
self.i18n.translate( self.i18n.string(
string.format( "stat_dg_label_%s_%s", plugin, pinst ), string.format( "stat_dg_label_%s_%s", plugin, pinst ),
self.i18n.translate( self.i18n.string(
string.format( "stat_dg_label_%s__%s", plugin, dtype ), string.format( "stat_dg_label_%s__%s", plugin, dtype ),
self.i18n.translate( self.i18n.string(
string.format( "stat_dg_label_%s", plugin ), string.format( "stat_dg_label_%s", plugin ),
self.graph:_mkpath( plugin, pinst, dtype ) self.graph:_mkpath( plugin, pinst, dtype )
) )
@ -93,13 +93,13 @@ end
function Instance.ds( self, source ) function Instance.ds( self, source )
local label = self.i18n.translate( local label = self.i18n.string(
string.format( "stat_ds_%s_%s_%s", source.type, source.instance, source.ds ), string.format( "stat_ds_%s_%s_%s", source.type, source.instance, source.ds ),
self.i18n.translate( self.i18n.string(
string.format( "stat_ds_%s_%s", source.type, source.instance ), string.format( "stat_ds_%s_%s", source.type, source.instance ),
self.i18n.translate( self.i18n.string(
string.format( "stat_ds_label_%s__%s", source.type, source.ds ), string.format( "stat_ds_label_%s__%s", source.type, source.ds ),
self.i18n.translate( self.i18n.string(
string.format( "stat_ds_%s", source.type ), string.format( "stat_ds_%s", source.type ),
source.type .. "_" .. source.instance:gsub("[^%w]","_") .. "_" .. source.ds source.type .. "_" .. source.instance:gsub("[^%w]","_") .. "_" .. source.ds
) )