vlsi / ksar

A sar grapher, fork of http://sourceforge.net/projects/ksar/
Other
246 stars 59 forks source link

sar output - add LANGUAGE support #265

Open Pitterling opened 1 year ago

Pitterling commented 1 year ago

currently only "english" sar outputs are supported - this is independend form the date/time formats. language influences how Summary/Average lines are written to the sar files.

These lines must be filtered out, to avoid errors in later processing. A simple workaround would be to list all translations ... https://github.com/vlsi/ksar/blob/9a6cabe2973a971a271b7d759aa749beeb331561/src/main/java/net/atomique/ksar/parser/Linux.java#L32-L34

  private final HashSet<String> IgnoreLinesBeginningWith = new HashSet<>(Arrays.asList(
      "##",
      "Average:", "Summary:", "Summary",  // en.po
      "Moyenne :", "Résumé:",         // fr.po
      "Durchschn.:", "Zusammenfassung:"   // de.po
  ));

but there are a lot of translations .. https://translationproject.org/domain/sysstat.html https://github.com/sysstat/sysstat/tree/master/nls

Another approach could be to include the translation *.po files and extract the corresponding msgid values: msgid "Average:" msgid "Summary:"