Ticket #7151: syslog_daemon-localization.patch

File syslog_daemon-localization.patch, 1.8 KB (added by Karvjorm, 13 years ago)

A syslog_daemon localization patch.

  • src/servers/syslog_daemon/SyslogDaemon.cpp

     
    99#include "syslog_output.h"
    1010
    1111#include <Alert.h>
    12 #include <TextView.h>
     12#include <Catalog.h>
     13#include <FindDirectory.h>
    1314#include <Font.h>
    14 #include <FindDirectory.h>
    1515#include <Path.h>
     16#include <TextView.h>
    1617
    1718#include <stdio.h>
    1819#include <string.h>
    1920
     21#undef B_TRANSLATE_CONTEXT
     22#define B_TRANSLATE_CONTEXT "SyslogDaemon"
    2023
     24
    2125const char *kSignature = "application/x-vnd.Haiku-SystemLogger";
     26static const BString kAboutStr(B_TRANSLATE_MARK("Syslog Daemon\n\n"
     27        "This daemon is responsible for collecting "
     28        "all system messages and write them to the "
     29        "system-wide log at \"%s\".\n\n"));
     30static const BString kOKStr(B_TRANSLATE_MARK("OK"));
    2231
    2332
    2433SyslogDaemon::SyslogDaemon()
     
    5362
    5463    char message[512];
    5564    sprintf(message,
    56         "Syslog Daemon\n\n"
    57         "This daemon is responsible for collecting "
    58         "all system messages and write them to the "
    59         "system-wide log at \"%s\".\n\n", path.Path());
     65        kAboutStr.String(), path.Path());
    6066
    61     BAlert *alert = new BAlert("Syslog daemon", message, "OK");
     67    BAlert *alert = new BAlert("Syslog daemon", message,
     68        kAboutStr.String());
    6269    BTextView *view = alert->TextView();
    6370    BFont font;
    6471
  • src/servers/syslog_daemon/Jamfile

     
    1616    be $(TARGET_LIBSUPC++)
    1717;
    1818
     19DoCatalogs syslog_daemon :
     20    x-vnd.Haiku-SystemLogger
     21    :
     22    SyslogDaemon.cpp
     23;
     24
    1925SEARCH on [ FGristFiles
    2026        strlcpy.c
    2127    ] = [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;