Open riversdev0 opened 4 years ago
I'm working on adding a new item to the Spikekill Menu (the little icon next to a graph), but I'm not certain how to handle the language localization for the new phrase. Can someone please tell me how to do it, or could I just statically make it English and someone fix it after i submit it?
If you are doing localization within PHP, use ('this text') for the core or ('this plugin text','my plugin') for plugins. To get this in JavaScript you need to basically inject a script and then print the output of that function into a javascript variable.
print "<script>var text = '<?php print __('this text'); ?>';</script>";
Then you can access that text variable.
Feature Request
Is your feature request related to a problem? Please describe
Sometime when trying to kill a spike in a graph, it's very easy to say, for example, that any value over a certain amount is not correct. (If the correct max was used when creating the DS in the RRD, this would not be a problem, but we don't always have that luxury after the fact.) Therefore, it would be nice to have a method within Spikekill to kill spikes larger than a certain arbitrary value that you can adjust.
Describe the solution you'd like
I'd like to have a Spikekill method that allows the user to easily kill spikes over a specific arbitrary value.
Describe alternatives you've considered
n/a
Additional context
n/a