* For consistencies sake also translate transport scripting

comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36965 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer
2010-05-28 15:41:56 +00:00
parent f591d304a7
commit 8b0a06ad7a
2 changed files with 22 additions and 6 deletions
+3
View File
@@ -34,7 +34,10 @@ DoCatalogs print_server :
x-vnd.Be-PSRV
:
ConfigWindow.cpp
Printer.Scripting.cpp
PrintServerApp.cpp
PrintServerApp.R5.cpp
PrintServerApp.Scripting.cpp
Transport.Scripting.cpp2
;
+19 -6
View File
@@ -8,17 +8,22 @@
#include "Transport.h"
// BeOS API
#include <PropertyInfo.h>
#include <Messenger.h>
#include <Message.h>
#include <AppDefs.h>
#include <Catalog.h>
#include <Locale.h>
#include <Message.h>
#include <Messenger.h>
#include <PropertyInfo.h>
#define B_TRANSLATE_CONTEXT "Transport Scripting"
static property_info prop_list[] = {
{ "Name", { B_GET_PROPERTY }, { B_DIRECT_SPECIFIER },
"Get name of transport" },
B_TRANSLATE_MARK("Get name of transport") },
{ "Ports", { B_GET_PROPERTY }, { B_DIRECT_SPECIFIER },
"Get currently available ports/devices" },
B_TRANSLATE_MARK("Get currently available ports/devices") },
{ 0 } // terminate list
};
@@ -87,6 +92,14 @@ status_t Transport::GetSupportedSuites(BMessage* msg)
{
msg->AddString("suites", "application/x-vnd.OpenBeOS-transport");
static bool localized = false;
if (!localized) {
localized = true;
for (int i = 0; prop_list[i].name != NULL; i ++)
prop_list[i].usage = be_catalog->GetString(prop_list[i].usage,
B_TRANSLATE_CONTEXT);
}
BPropertyInfo prop_info(prop_list);
msg->AddFlat("messages", &prop_info);