Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Jun 23, 2017 10:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: $graph_timespans issue in Rev 7382 - 0.8.9
PostPosted: Mon May 13, 2013 6:16 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2589
Location: Kressbronn, Germany
The $graph_timespans array in file "include/graph/graph_arrays.php" SVN Rev 7382 needs to be changed.

Either place n the original full english string, or add the localized function:

Code:
$graph_timespans = array(
...
        GT_LAST_2_HOURS         => __('Last %d Hours', 2),  // Works
        GT_LAST_4_HOURS         => 'Last 4 Hours',  // works
        GT_LAST_6_HOURS         => 'Last %d Hours', 6, // display "Last %d Hours" in drop down menu of graph_view.php
...

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: $graph_timespans issue in Rev 7382 - 0.8.9
PostPosted: Mon Aug 05, 2013 2:18 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
This file currently is 7363 and does not include such a line.
Or are we talking about different things?
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: $graph_timespans issue in Rev 7382 - 0.8.9
PostPosted: Mon Aug 05, 2013 2:22 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2589
Location: Kressbronn, Germany
http://svn.cacti.net/viewvc/cacti/branc ... iew=markup

Code:
$graph_timespans = array(
    GT_LAST_HALF_HOUR     => 'Last Half Hour',
    GT_LAST_HOUR         => 'Last Hour',
    GT_LAST_2_HOURS     => 'Last %d Hours', 2,
    GT_LAST_4_HOURS     => 'Last %d Hours', 4,
    GT_LAST_6_HOURS     => 'Last %d Hours', 6,
    GT_LAST_12_HOURS     => 'Last %d Hours', 12,
    GT_LAST_DAY         => 'Last Day',
    GT_LAST_2_DAYS         => 'Last %d Days', 2,
    GT_LAST_3_DAYS         => 'Last %d Days', 3,
    GT_LAST_4_DAYS         => 'Last %d Days', 4,
    GT_LAST_WEEK         => 'Last Week',
    GT_LAST_2_WEEKS     => 'Last %d Weeks', 2,
    GT_LAST_MONTH         => 'Last Month',
    GT_LAST_2_MONTHS     => 'Last %d Months', 2,
    GT_LAST_3_MONTHS     => 'Last %d Months', 3,
    GT_LAST_4_MONTHS     => 'Last %d Months', 4,
    GT_LAST_6_MONTHS     => 'Last %d Months', 6,
    GT_LAST_YEAR         => 'Last Year',
    GT_LAST_2_YEARS     => 'Last %d Years', 2,
    GT_DAY_SHIFT         => 'Day Shift',
    GT_THIS_DAY         => 'This Day',
    GT_THIS_WEEK         => 'This Week',
    GT_THIS_MONTH         => 'This Month',
    GT_THIS_YEAR         => 'This Year',
    GT_PREV_DAY         => 'Previous Day',
    GT_PREV_WEEK         => 'Previous Week',
    GT_PREV_MONTH         => 'Previous Month',
    GT_PREV_YEAR         => 'Previous Year',


That's what I mean.

You should either use one of the following lines, but the above code just doesn't display correctly.

Code:
        GT_LAST_2_HOURS         => __('Last %d Hours', 2),  // Works wit gettext module
        GT_LAST_4_HOURS         => 'Last 4 Hours',  // works as it's plain string


e.g. that same file contains a "$graph_timeshifts" array which works fine, and one called "$graph_timeshifts_localized" which probably doesn't work either, but is not yet being used.

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: $graph_timespans issue in Rev 7382 - 0.8.9
PostPosted: Mon Aug 05, 2013 3:42 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
ok, understood
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group