-
From 5be9bc30ea4ddc8adfef08bd05a3034855d5f55f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dancs=C3=B3=20R=C3=B3bert?= <dancso.robert@d-rendszer.hu>
Date: Fri, 4 Jan 2013 18:48:34 +0100
Subject: [PATCH] Added localization support for Cortex app.
---
src/apps/cortex/AddOnHost/AddOnHostApp.cpp | 12 +-
src/apps/cortex/AddOnHost/Jamfile | 8 +-
.../cortex/DormantNodeView/DormantNodeListItem.cpp | 7 +-
.../cortex/DormantNodeView/DormantNodeWindow.cpp | 7 +-
src/apps/cortex/DormantNodeView/Jamfile | 1 +
src/apps/cortex/InfoView/AppNodeInfoView.cpp | 15 +-
src/apps/cortex/InfoView/ConnectionInfoView.cpp | 71 ++---
src/apps/cortex/InfoView/DormantNodeInfoView.cpp | 31 ++-
src/apps/cortex/InfoView/EndPointInfoView.cpp | 82 +++---
src/apps/cortex/InfoView/FileNodeInfoView.cpp | 24 +-
src/apps/cortex/InfoView/InfoView.cpp | 7 +-
src/apps/cortex/InfoView/Jamfile | 1 +
src/apps/cortex/InfoView/LiveNodeInfoView.cpp | 20 +-
src/apps/cortex/MediaRoutingView/Jamfile | 1 +
src/apps/cortex/MediaRoutingView/MediaJack.cpp | 13 +-
.../cortex/MediaRoutingView/MediaNodePanel.cpp | 27 +-
.../cortex/MediaRoutingView/MediaRoutingView.cpp | 33 ++-
src/apps/cortex/MediaRoutingView/MediaWire.cpp | 9 +-
src/apps/cortex/NodeManager/Jamfile | 1 +
src/apps/cortex/NodeManager/NodeManager.cpp | 17 +-
src/apps/cortex/ParameterView/Jamfile | 1 +
src/apps/cortex/ParameterView/ParameterWindow.cpp | 21 +-
src/apps/cortex/RouteApp/Jamfile | 9 +-
src/apps/cortex/RouteApp/RouteAppNodeManager.cpp | 40 +--
src/apps/cortex/RouteApp/RouteWindow.cpp | 32 ++-
src/apps/cortex/TipManager/Jamfile | 7 +
src/apps/cortex/TipManager/TipWindow.cpp | 7 +-
src/apps/cortex/TransportView/Jamfile | 7 +
src/apps/cortex/TransportView/TransportView.cpp | 37 +--
.../addons/AudioAdapter/AudioAdapterParams.cpp | 20 +-
src/apps/cortex/addons/AudioAdapter/Jamfile | 2 +-
src/apps/cortex/addons/Flanger/FlangerAddOn.cpp | 10 +-
src/apps/cortex/addons/Flanger/FlangerNode.cpp | 30 ++-
src/apps/cortex/addons/Flanger/Jamfile | 2 +-
src/apps/cortex/addons/LoggingConsumer/Jamfile | 2 +-
.../addons/LoggingConsumer/LoggingConsumer.cpp | 22 +-
.../LoggingConsumer/LoggingConsumerAddOn.cpp | 9 +-
.../addons/LoggingConsumer/NodeHarnessApp.cpp | 7 +-
.../addons/LoggingConsumer/NodeHarnessWin.cpp | 13 +-
.../cortex/addons/NullFilter/NullFilterAddOn.cpp | 12 +-
.../cortex/addons/ToneProducer/NodeHarnessApp.cpp | 7 +-
.../cortex/addons/ToneProducer/NodeHarnessWin.cpp | 11 +-
.../cortex/addons/ToneProducer/ToneProducer.cpp | 26 +-
.../addons/ToneProducer/ToneProducerAddOn.cpp | 11 +-
src/apps/cortex/addons/common/AudioFilterNode.cpp | 10 +-
.../cortex/addons/common/MediaNodeControlApp.cpp | 18 +-
src/apps/cortex/support/Jamfile | 7 +
src/apps/cortex/support/MediaString.cpp | 283 ++++++++++----------
48 files changed, 628 insertions(+), 422 deletions(-)
diff --git a/src/apps/cortex/AddOnHost/AddOnHostApp.cpp b/src/apps/cortex/AddOnHost/AddOnHostApp.cpp
index e481c4a..2c8d3fc 100644
a
|
b
|
|
35 | 35 | #include "AddOnHostProtocol.h" |
36 | 36 | |
37 | 37 | #include <Alert.h> |
| 38 | #include <Catalog.h> |
38 | 39 | #include <Debug.h> |
39 | 40 | #include <MediaRoster.h> |
40 | 41 | |
41 | 42 | #include <cstdlib> |
42 | 43 | #include <cstring> |
43 | 44 | |
| 45 | #undef B_TRANSLATION_CONTEXT |
| 46 | #define B_TRANSLATION_CONTEXT "CortexAddOnHost" |
| 47 | |
44 | 48 | __USE_CORTEX_NAMESPACE |
45 | 49 | using namespace addon_host; |
46 | 50 | |
… |
… |
main(int argc, char** argv)
|
170 | 174 | { |
171 | 175 | App app; |
172 | 176 | if (argc < 2 || strcmp(argv[1], "--addon-host") != 0) { |
173 | | BAlert* alert = new BAlert("Cortex AddOnHost", |
174 | | "This program runs in the background, and is started automatically " |
175 | | "by Cortex when necessary. You probably don't want to start it manually.", |
176 | | "Continue", "Quit"); |
| 177 | BAlert* alert = new BAlert(B_TRANSLATE("Cortex AddOnHost"), |
| 178 | B_TRANSLATE("This program runs in the background, and is started automatically " |
| 179 | "by Cortex when necessary. You probably don't want to start it manually."), |
| 180 | B_TRANSLATE("Continue"), B_TRANSLATE("Quit")); |
177 | 181 | alert->SetShortcut(1, B_ESCAPE); |
178 | 182 | int32 response = alert->Go(); |
179 | 183 | |
-
diff --git a/src/apps/cortex/AddOnHost/Jamfile b/src/apps/cortex/AddOnHost/Jamfile
index 9675986..e678027 100644
a
|
b
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
9 | 9 | |
10 | 10 | Application CortexAddOnHost : |
11 | 11 | AddOnHostApp.cpp |
12 | | : be media $(TARGET_LIBSTDC++) cortex_support.a |
| 12 | : be media $(TARGET_LIBSTDC++) cortex_support.a $(HAIKU_LOCALE_LIBS) |
13 | 13 | : AddOnHost_Resource.rsrc |
14 | 14 | ; |
| 15 | |
| 16 | DoCatalogs CorexAddOnHost : |
| 17 | application/x-vnd.Cortex.AddOnHost |
| 18 | : |
| 19 | AddOnHostApp.cpp |
| 20 | ; |
-
diff --git a/src/apps/cortex/DormantNodeView/DormantNodeListItem.cpp b/src/apps/cortex/DormantNodeView/DormantNodeListItem.cpp
index 202fe3c..d4677d7 100644
a
|
b
|
|
41 | 41 | |
42 | 42 | // Application Kit |
43 | 43 | #include <Application.h> |
| 44 | // Locale Kit |
| 45 | #include <Catalog.h> |
44 | 46 | // Interface Kit |
45 | 47 | #include <PopUpMenu.h> |
46 | 48 | #include <MenuItem.h> |
… |
… |
|
48 | 50 | #include <MediaRoster.h> |
49 | 51 | #include <MediaAddOn.h> |
50 | 52 | |
| 53 | #undef B_TRANSLATION_CONTEXT |
| 54 | #define B_TRANSLATION_CONTEXT "CortexDormantNodeView" |
| 55 | |
51 | 56 | __USE_CORTEX_NAMESPACE |
52 | 57 | |
53 | 58 | #include <Debug.h> |
… |
… |
void DormantNodeListItem::showContextMenu(
|
267 | 272 | |
268 | 273 | // Add the "Get Info" item |
269 | 274 | BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); |
270 | | menu->AddItem(new BMenuItem("Get info", message)); |
| 275 | menu->AddItem(new BMenuItem(B_TRANSLATE("Get info"), message)); |
271 | 276 | |
272 | 277 | menu->SetTargetForItems(owner); |
273 | 278 | owner->ConvertToScreen(&point); |
-
diff --git a/src/apps/cortex/DormantNodeView/DormantNodeWindow.cpp b/src/apps/cortex/DormantNodeView/DormantNodeWindow.cpp
index 52f3aed..6b3d833 100644
a
|
b
|
|
40 | 40 | |
41 | 41 | // Application Kit |
42 | 42 | #include <Application.h> |
| 43 | // Locale Kit |
| 44 | #include <Catalog.h> |
43 | 45 | // Interface Kit |
44 | 46 | #include <Screen.h> |
45 | 47 | #include <ScrollBar.h> |
46 | 48 | |
| 49 | #undef B_TRANSLATION_CONTEXT |
| 50 | #define B_TRANSLATION_CONTEXT "CortexDormantNodeView" |
| 51 | |
47 | 52 | __USE_CORTEX_NAMESPACE |
48 | 53 | |
49 | 54 | #include <Debug.h> |
… |
… |
const BRect DormantNodeWindow::s_initFrame(500.0, 350.0, 640.0, 480.0);
|
65 | 70 | |
66 | 71 | DormantNodeWindow::DormantNodeWindow( |
67 | 72 | BWindow* parent) |
68 | | : BWindow(s_initFrame, "Media add-ons", |
| 73 | : BWindow(s_initFrame, B_TRANSLATE("Media add-ons"), |
69 | 74 | B_FLOATING_WINDOW_LOOK, |
70 | 75 | B_FLOATING_SUBSET_WINDOW_FEEL, |
71 | 76 | B_WILL_ACCEPT_FIRST_CLICK|B_AVOID_FOCUS|B_ASYNCHRONOUS_CONTROLS), |
-
diff --git a/src/apps/cortex/DormantNodeView/Jamfile b/src/apps/cortex/DormantNodeView/Jamfile
index 4bf1abc..065edcb 100644
a
|
b
|
StaticLibrary cortex_dormant_node_view.a :
|
15 | 15 | DormantNodeListItem.cpp |
16 | 16 | DormantNodeView.cpp |
17 | 17 | DormantNodeWindow.cpp |
| 18 | : be $(HAIKU_LOCALE_LIBS) |
18 | 19 | ; |
-
diff --git a/src/apps/cortex/InfoView/AppNodeInfoView.cpp b/src/apps/cortex/InfoView/AppNodeInfoView.cpp
index b5c964d..6793665 100644
a
|
b
|
|
40 | 40 | |
41 | 41 | // Application Kit |
42 | 42 | #include <Roster.h> |
| 43 | // Locale Kit |
| 44 | #include <Catalog.h> |
43 | 45 | // Media Kit |
44 | 46 | #include <MediaNode.h> |
45 | 47 | #include <MediaRoster.h> |
… |
… |
|
49 | 51 | #include <File.h> |
50 | 52 | #include <Path.h> |
51 | 53 | |
| 54 | #undef B_TRANSLATION_CONTEXT |
| 55 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 56 | |
52 | 57 | __USE_CORTEX_NAMESPACE |
53 | 58 | |
54 | 59 | #include <Debug.h> |
… |
… |
AppNodeInfoView::AppNodeInfoView(
|
65 | 70 | D_METHOD(("AppNodeInfoView::AppNodeInfoView()\n")); |
66 | 71 | |
67 | 72 | // adjust view properties |
68 | | setSideBarWidth(be_plain_font->StringWidth(" File Format ") + 2 * InfoView::M_H_MARGIN); |
69 | | setSubTitle("Application-Owned Node"); |
| 73 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("File format")) + 2 * InfoView::M_H_MARGIN); |
| 74 | setSubTitle(B_TRANSLATE("Application-Owned Node")); |
70 | 75 | |
71 | 76 | // add separator |
72 | 77 | addField("", ""); |
… |
… |
AppNodeInfoView::AppNodeInfoView(
|
82 | 87 | if ((appEntry.InitCheck() == B_OK) |
83 | 88 | && (appEntry.GetName(appName) == B_OK)) |
84 | 89 | { |
85 | | addField("Application", appName); |
| 90 | addField(B_TRANSLATE("Application"), appName); |
86 | 91 | } |
87 | 92 | BFile appFile(&appInfo.ref, B_READ_ONLY); |
88 | 93 | if (appFile.InitCheck() == B_OK) |
… |
… |
AppNodeInfoView::AppNodeInfoView(
|
93 | 98 | version_info appVersion; |
94 | 99 | if (appFileInfo.GetVersionInfo(&appVersion, B_APP_VERSION_KIND) == B_OK) |
95 | 100 | { |
96 | | addField("Version", appVersion.long_info); |
| 101 | addField(B_TRANSLATE("Version"), appVersion.long_info); |
97 | 102 | } |
98 | 103 | } |
99 | 104 | } |
100 | | addField("Signature", appInfo.signature); |
| 105 | addField(B_TRANSLATE("Signature"), appInfo.signature); |
101 | 106 | } |
102 | 107 | } |
103 | 108 | |
-
diff --git a/src/apps/cortex/InfoView/ConnectionInfoView.cpp b/src/apps/cortex/InfoView/ConnectionInfoView.cpp
index 5b8cf3c..99a7bd2 100644
a
|
b
|
|
40 | 40 | // NodeManager |
41 | 41 | #include "Connection.h" |
42 | 42 | |
| 43 | // Locale Kit |
| 44 | #include <Catalog.h> |
43 | 45 | // MediaKit |
44 | 46 | #include <MediaDefs.h> |
45 | 47 | |
| 48 | #undef B_TRANSLATION_CONTEXT |
| 49 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 50 | |
46 | 51 | __USE_CORTEX_NAMESPACE |
47 | 52 | |
48 | 53 | #include <Debug.h> |
… |
… |
__USE_CORTEX_NAMESPACE
|
55 | 60 | |
56 | 61 | ConnectionInfoView::ConnectionInfoView( |
57 | 62 | const Connection &connection) |
58 | | : InfoView("Connection", "", 0), |
| 63 | : InfoView(B_TRANSLATE("Connection"), "", 0), |
59 | 64 | m_source(connection.source()), |
60 | 65 | m_destination(connection.destination()) |
61 | 66 | { |
62 | 67 | D_METHOD(("ConnectionInfoView::ConnectionInfoView()\n")); |
63 | 68 | |
64 | | setSideBarWidth(be_plain_font->StringWidth(" Destination ") |
| 69 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Destination")) |
65 | 70 | + 2 * InfoView::M_H_MARGIN); |
66 | 71 | media_input input; |
67 | 72 | media_output output; |
… |
… |
ConnectionInfoView::ConnectionInfoView(
|
72 | 77 | if (s.Length() > 0) |
73 | 78 | s << " "; |
74 | 79 | s << "(" << MediaString::getStringFor(output.source) << ")"; |
75 | | addField("Source", s); |
| 80 | addField(B_TRANSLATE("Source"), s); |
76 | 81 | } |
77 | 82 | if (connection.getInput(&input) == B_OK) { |
78 | 83 | // add "Destination" field |
… |
… |
ConnectionInfoView::ConnectionInfoView(
|
81 | 86 | if (s.Length() > 0) |
82 | 87 | s << " "; |
83 | 88 | s << "(" << MediaString::getStringFor(input.destination) << ")"; |
84 | | addField("Destination", s); |
| 89 | addField(B_TRANSLATE("Destination"), s); |
85 | 90 | } |
86 | 91 | |
87 | 92 | // add a separator field |
88 | 93 | addField("", ""); |
89 | 94 | |
90 | 95 | // add "Media Type" field |
91 | | addField("Media Type", MediaString::getStringFor(connection.format().type)); |
| 96 | addField(B_TRANSLATE("Media type"), MediaString::getStringFor(connection.format().type)); |
92 | 97 | |
93 | 98 | // add the format fields |
94 | 99 | _addFormatFields(connection.format()); |
… |
… |
void ConnectionInfoView::_addFormatFields(
|
110 | 115 | switch (format.type) { |
111 | 116 | case B_MEDIA_RAW_AUDIO: { |
112 | 117 | // adjust view properties |
113 | | setSideBarWidth(be_plain_font->StringWidth(" Sample Rate ") + 2 * InfoView::M_H_MARGIN); |
| 118 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Sample rate")) + 2 * InfoView::M_H_MARGIN); |
114 | 119 | BString s; |
115 | 120 | // add "Format" field |
116 | 121 | s = MediaString::forAudioFormat(format.u.raw_audio.format, |
117 | 122 | format.u.raw_audio.valid_bits); |
118 | | addField("Format", s); |
| 123 | addField(B_TRANSLATE("Format"), s); |
119 | 124 | // add "Sample Rate" field |
120 | 125 | s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate); |
121 | | addField("Sample Rate", s); |
| 126 | addField(B_TRANSLATE("Sample rate"), s); |
122 | 127 | // add "Channels" field |
123 | 128 | s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count); |
124 | | addField("Channels", s); |
| 129 | addField(B_TRANSLATE("Channels"), s); |
125 | 130 | // add "Channel Mask" field |
126 | 131 | s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask); |
127 | | addField("Channel Mask", s); |
| 132 | addField(B_TRANSLATE("Channel mask"), s); |
128 | 133 | // add "Matrix Mask" field |
129 | 134 | s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask); |
130 | | addField("Matrix Mask", s); |
| 135 | addField(B_TRANSLATE("Matrix mask"), s); |
131 | 136 | // add the "Byte Order" field |
132 | 137 | s = MediaString::forAudioByteOrder(format.u.raw_audio.byte_order); |
133 | | addField("Byte Order", s); |
| 138 | addField(B_TRANSLATE("Byte order"), s); |
134 | 139 | // add the "Buffer Size" field |
135 | 140 | s = MediaString::forAudioBufferSize(format.u.raw_audio.buffer_size); |
136 | | addField("Buffer Size", s); |
| 141 | addField(B_TRANSLATE("Buffer size"), s); |
137 | 142 | break; |
138 | 143 | } |
139 | 144 | case B_MEDIA_RAW_VIDEO: { |
140 | 145 | // adjust view properties |
141 | | setSideBarWidth(be_plain_font->StringWidth(" Video Data Between ") + 2 * InfoView::M_H_MARGIN); |
| 146 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Video data between")) + 2 * InfoView::M_H_MARGIN); |
142 | 147 | BString s; |
143 | 148 | // add the "Format" field |
144 | 149 | s = MediaString::forVideoFormat(format.u.raw_video.display.format); |
145 | | addField("Format", s); |
| 150 | addField(B_TRANSLATE("Format"), s); |
146 | 151 | // add the "Resolution" field |
147 | 152 | s = MediaString::forVideoResolution(format.u.raw_video.display.line_width, |
148 | 153 | format.u.raw_video.display.line_count); |
149 | | addField("Resolution", s); |
| 154 | addField(B_TRANSLATE("Resolution"), s); |
150 | 155 | // add the "Field Rate" field |
151 | 156 | s = MediaString::forVideoFieldRate(format.u.raw_video.field_rate, |
152 | 157 | format.u.raw_video.interlace); |
153 | | addField("Field Rate", s); |
| 158 | addField(B_TRANSLATE("Field rate"), s); |
154 | 159 | // add the "Orientation" field |
155 | 160 | s = MediaString::forVideoOrientation(format.u.raw_video.orientation); |
156 | | addField("Orientation", s); |
| 161 | addField(B_TRANSLATE("Orientation"), s); |
157 | 162 | // add the "Aspect Ratio" field |
158 | 163 | s = MediaString::forVideoAspectRatio(format.u.raw_video.pixel_width_aspect, |
159 | 164 | format.u.raw_video.pixel_height_aspect); |
160 | | addField("Aspect Ratio", s); |
| 165 | addField(B_TRANSLATE("Aspect ratio"), s); |
161 | 166 | // add the "Active Lines" field |
162 | 167 | s = MediaString::forVideoActiveLines(format.u.raw_video.first_active, |
163 | 168 | format.u.raw_video.last_active); |
164 | | addField("Active Lines", s); |
| 169 | addField(B_TRANSLATE("Active lines"), s); |
165 | 170 | // add the "Offset" field |
166 | 171 | s = MediaString::forVideoOffset(format.u.raw_video.display.pixel_offset, |
167 | 172 | format.u.raw_video.display.line_offset); |
168 | | addField("Offset", s); |
| 173 | addField(B_TRANSLATE("Offset"), s); |
169 | 174 | break; |
170 | 175 | } |
171 | 176 | case B_MEDIA_ENCODED_AUDIO: { |
172 | 177 | // adjust view properties |
173 | | setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN); |
| 178 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Frame size")) + 2 * InfoView::M_H_MARGIN); |
174 | 179 | BString s; |
175 | 180 | // add the "Bit Rate" field |
176 | 181 | s = MediaString::forAudioBitRate(format.u.encoded_audio.bit_rate); |
177 | | addField("Bit Rate", s); |
| 182 | addField(B_TRANSLATE("Bit rate"), s); |
178 | 183 | // add the "Frame Size" field |
179 | 184 | s = MediaString::forAudioFrameSize(format.u.encoded_audio.frame_size); |
180 | | addField("Frame Size", s); |
| 185 | addField(B_TRANSLATE("Frame size"), s); |
181 | 186 | break; |
182 | 187 | } |
183 | 188 | case B_MEDIA_ENCODED_VIDEO: { |
184 | 189 | // adjust view properties |
185 | | setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN); |
| 190 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Frame size")) + 2 * InfoView::M_H_MARGIN); |
186 | 191 | BString s; |
187 | 192 | // add the "Bit Rate" field |
188 | 193 | s = MediaString::forVideoBitRate(format.u.encoded_video.avg_bit_rate, |
189 | 194 | format.u.encoded_video.max_bit_rate); |
190 | | addField("Bit Rate", s); |
| 195 | addField(B_TRANSLATE("Bit rate"), s); |
191 | 196 | // add the "Frame Size" field |
192 | 197 | s = MediaString::forVideoFrameSize(format.u.encoded_video.frame_size); |
193 | | addField("Frame Size", s); |
| 198 | addField(B_TRANSLATE("Frame size"), s); |
194 | 199 | // add the "History" field |
195 | 200 | s = MediaString::forVideoHistory(format.u.encoded_video.forward_history, |
196 | 201 | format.u.encoded_video.backward_history); |
197 | | addField("History", s); |
| 202 | addField(B_TRANSLATE("History"), s); |
198 | 203 | break; |
199 | 204 | } |
200 | 205 | case B_MEDIA_MULTISTREAM: { |
201 | 206 | // adjust view properties |
202 | | setSideBarWidth(be_plain_font->StringWidth(" Chunk Size ") + 2 * InfoView::M_H_MARGIN); |
| 207 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Chunk size")) + 2 * InfoView::M_H_MARGIN); |
203 | 208 | BString s; |
204 | 209 | // add the "Format" field |
205 | 210 | s = MediaString::forMultistreamFormat(format.u.multistream.format); |
206 | | addField("Format", s); |
| 211 | addField(B_TRANSLATE("Format"), s); |
207 | 212 | // add the "Bit Rate" field |
208 | 213 | s = MediaString::forMultistreamBitRate(format.u.multistream.avg_bit_rate, |
209 | 214 | format.u.multistream.max_bit_rate); |
210 | | addField("Bit Rate", s); |
| 215 | addField(B_TRANSLATE("Bit rate"), s); |
211 | 216 | // add the "Chunk Size" field |
212 | 217 | s = MediaString::forMultistreamChunkSize(format.u.multistream.avg_chunk_size, |
213 | 218 | format.u.multistream.max_chunk_size); |
214 | | addField("Chunk Size", s); |
| 219 | addField(B_TRANSLATE("Chunk size"), s); |
215 | 220 | // add the "Flags" field |
216 | 221 | s = MediaString::forMultistreamFlags(format.u.multistream.flags); |
217 | | addField("Flags", s); |
| 222 | addField(B_TRANSLATE("Flags"), s); |
218 | 223 | break; |
219 | 224 | } |
220 | 225 | default: { |
-
diff --git a/src/apps/cortex/InfoView/DormantNodeInfoView.cpp b/src/apps/cortex/InfoView/DormantNodeInfoView.cpp
index 8193702..23b39dd 100644
a
|
b
|
|
38 | 38 | #include "MediaIcon.h" |
39 | 39 | #include "MediaString.h" |
40 | 40 | |
| 41 | // Locale Kit |
| 42 | #include <Catalog.h> |
41 | 43 | // Media Kit |
42 | 44 | #include <MediaAddOn.h> |
43 | 45 | #include <MediaRoster.h> |
44 | 46 | |
| 47 | #undef B_TRANSLATION_CONTEXT |
| 48 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 49 | |
45 | 50 | __USE_CORTEX_NAMESPACE |
46 | 51 | |
47 | 52 | #include <Debug.h> |
… |
… |
__USE_CORTEX_NAMESPACE
|
53 | 58 | |
54 | 59 | DormantNodeInfoView::DormantNodeInfoView( |
55 | 60 | const dormant_node_info &info) |
56 | | : InfoView(info.name, "Dormant media node", |
| 61 | : InfoView(info.name, B_TRANSLATE("Dormant media node"), |
57 | 62 | new MediaIcon(info, B_LARGE_ICON)), |
58 | 63 | m_addOnID(info.addon), |
59 | 64 | m_flavorID(info.flavor_id) |
… |
… |
DormantNodeInfoView::DormantNodeInfoView(
|
61 | 66 | D_METHOD(("DormantNodeInfoView::DormantNodeInfoView()\n")); |
62 | 67 | |
63 | 68 | // adjust view properties |
64 | | setSideBarWidth(be_plain_font->StringWidth(" Output Formats ") + 2 * InfoView::M_H_MARGIN); |
| 69 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Output formats")) + 2 * InfoView::M_H_MARGIN); |
65 | 70 | |
66 | 71 | BString s; |
67 | 72 | |
68 | 73 | // add the "AddOn ID" field |
69 | 74 | s = ""; |
70 | 75 | s << info.addon; |
71 | | addField("AddOn ID", s); |
| 76 | addField(B_TRANSLATE("AddOn ID"), s); |
72 | 77 | |
73 | 78 | // add the "Flavor ID" field |
74 | 79 | s = ""; |
75 | 80 | s << info.flavor_id; |
76 | | addField("Flavor ID", s); |
| 81 | addField(B_TRANSLATE("Flavor ID"), s); |
77 | 82 | |
78 | 83 | // add separator field |
79 | 84 | addField("", ""); |
… |
… |
DormantNodeInfoView::DormantNodeInfoView(
|
84 | 89 | { |
85 | 90 | // add the "Description" field |
86 | 91 | s = flavorInfo.info; |
87 | | addField("Description", s); |
| 92 | addField(B_TRANSLATE("Description"), s); |
88 | 93 | |
89 | 94 | // add "Kinds" field |
90 | | addField("Kinds", MediaString::getStringFor(static_cast<node_kind>(flavorInfo.kinds))); |
| 95 | addField(B_TRANSLATE("Kinds"), MediaString::getStringFor(static_cast<node_kind>(flavorInfo.kinds))); |
91 | 96 | |
92 | 97 | // add "Flavor Flags" field |
93 | | addField("Flavor flags", "?"); |
| 98 | addField(B_TRANSLATE("Flavor flags"), "?"); |
94 | 99 | |
95 | 100 | // add "Max. instances" field |
96 | 101 | if (flavorInfo.possible_count > 0) |
… |
… |
DormantNodeInfoView::DormantNodeInfoView(
|
100 | 105 | } |
101 | 106 | else |
102 | 107 | { |
103 | | s = "Any number"; |
| 108 | s = B_TRANSLATE("Any number"); |
104 | 109 | } |
105 | | addField("Max. instances", s); |
| 110 | addField(B_TRANSLATE("Max. instances"), s); |
106 | 111 | |
107 | 112 | // add "Input Formats" field |
108 | 113 | if (flavorInfo.in_format_count > 0) |
109 | 114 | { |
110 | 115 | if (flavorInfo.in_format_count == 1) |
111 | 116 | { |
112 | | addField("Input format", MediaString::getStringFor(flavorInfo.in_formats[0], false)); |
| 117 | addField(B_TRANSLATE("Input format"), MediaString::getStringFor(flavorInfo.in_formats[0], false)); |
113 | 118 | } |
114 | 119 | else |
115 | 120 | { |
116 | | addField("Input formats", ""); |
| 121 | addField(B_TRANSLATE("Input formats"), ""); |
117 | 122 | for (int32 i = 0; i < flavorInfo.in_format_count; i++) |
118 | 123 | { |
119 | 124 | s = ""; |
… |
… |
DormantNodeInfoView::DormantNodeInfoView(
|
128 | 133 | { |
129 | 134 | if (flavorInfo.out_format_count == 1) |
130 | 135 | { |
131 | | addField("Output format", MediaString::getStringFor(flavorInfo.out_formats[0], false)); |
| 136 | addField(B_TRANSLATE("Output format"), MediaString::getStringFor(flavorInfo.out_formats[0], false)); |
132 | 137 | } |
133 | 138 | else |
134 | 139 | { |
135 | | addField("Output formats", ""); |
| 140 | addField(B_TRANSLATE("Output formats"), ""); |
136 | 141 | for (int32 i = 0; i < flavorInfo.out_format_count; i++) |
137 | 142 | { |
138 | 143 | s = ""; |
-
diff --git a/src/apps/cortex/InfoView/EndPointInfoView.cpp b/src/apps/cortex/InfoView/EndPointInfoView.cpp
index 6107fca..608be37 100644
a
|
b
|
|
38 | 38 | #include "MediaIcon.h" |
39 | 39 | #include "MediaString.h" |
40 | 40 | |
| 41 | // Locale Kit |
| 42 | #include <Catalog.h> |
| 43 | |
| 44 | #undef B_TRANSLATION_CONTEXT |
| 45 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 46 | |
41 | 47 | __USE_CORTEX_NAMESPACE |
42 | 48 | |
43 | 49 | #include <Debug.h> |
… |
… |
__USE_CORTEX_NAMESPACE
|
49 | 55 | |
50 | 56 | EndPointInfoView::EndPointInfoView( |
51 | 57 | const media_input &input) |
52 | | : InfoView(input.name, "Media input", 0), |
| 58 | : InfoView(input.name, B_TRANSLATE("Media input"), 0), |
53 | 59 | m_output(false), |
54 | 60 | m_port(input.destination.port), |
55 | 61 | m_id(input.destination.id) { |
56 | 62 | D_METHOD(("EndPointInfoView::EndPointInfoView(input)\n")); |
57 | 63 | |
58 | | setSideBarWidth(be_plain_font->StringWidth(" Destination ") |
| 64 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Destination")) |
59 | 65 | + 2 * InfoView::M_H_MARGIN); |
60 | 66 | |
61 | 67 | // add "Source" field |
62 | | addField("Source", MediaString::getStringFor(input.source)); |
| 68 | addField(B_TRANSLATE("Source"), MediaString::getStringFor(input.source)); |
63 | 69 | |
64 | 70 | // add "Destination" field |
65 | | addField("Destination", MediaString::getStringFor(input.destination)); |
| 71 | addField(B_TRANSLATE("Destination"), MediaString::getStringFor(input.destination)); |
66 | 72 | |
67 | 73 | // add a separator field |
68 | 74 | addField("", ""); |
69 | 75 | |
70 | 76 | // add "Media Type" field |
71 | | addField("Media type", MediaString::getStringFor(input.format.type)); |
| 77 | addField(B_TRANSLATE("Media type"), MediaString::getStringFor(input.format.type)); |
72 | 78 | |
73 | 79 | _addFormatFields(input.format); |
74 | 80 | } |
75 | 81 | |
76 | 82 | EndPointInfoView::EndPointInfoView( |
77 | 83 | const media_output &output) |
78 | | : InfoView(output.name, "Media output", 0), |
| 84 | : InfoView(output.name, B_TRANSLATE("Media output"), 0), |
79 | 85 | m_output(true), |
80 | 86 | m_port(output.source.port), |
81 | 87 | m_id(output.source.id) { |
82 | 88 | D_METHOD(("EndPointInfoView::EndPointInfoView(output)\n")); |
83 | 89 | |
84 | | setSideBarWidth(be_plain_font->StringWidth(" Destination ") |
| 90 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Destination")) |
85 | 91 | + 2 * InfoView::M_H_MARGIN); |
86 | 92 | |
87 | 93 | // add "Source" field |
88 | | addField("Source", MediaString::getStringFor(output.source)); |
| 94 | addField(B_TRANSLATE("Source"), MediaString::getStringFor(output.source)); |
89 | 95 | |
90 | 96 | // add "Destination" field |
91 | | addField("Destination", MediaString::getStringFor(output.destination)); |
| 97 | addField(B_TRANSLATE("Destination"), MediaString::getStringFor(output.destination)); |
92 | 98 | |
93 | 99 | // add a separator field |
94 | 100 | addField("", ""); |
95 | 101 | |
96 | 102 | // add "Media Type" field |
97 | | addField("Media type", MediaString::getStringFor(output.format.type)); |
| 103 | addField(B_TRANSLATE("Media type"), MediaString::getStringFor(output.format.type)); |
98 | 104 | |
99 | 105 | _addFormatFields(output.format); |
100 | 106 | } |
… |
… |
void EndPointInfoView::_addFormatFields(
|
140 | 146 | switch (format.type) { |
141 | 147 | case B_MEDIA_RAW_AUDIO: { |
142 | 148 | // adjust view properties |
143 | | setSideBarWidth(be_plain_font->StringWidth(" Sample Rate ") + 2 * InfoView::M_H_MARGIN); |
| 149 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Sample rate")) + 2 * InfoView::M_H_MARGIN); |
144 | 150 | BString s; |
145 | 151 | // add "Format" field |
146 | 152 | s = MediaString::forAudioFormat(format.u.raw_audio.format, |
147 | 153 | format.u.raw_audio.valid_bits); |
148 | | addField("Format", s); |
| 154 | addField(B_TRANSLATE("Format"), s); |
149 | 155 | // add "Sample Rate" field |
150 | 156 | s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate); |
151 | | addField("Sample rate", s); |
| 157 | addField(B_TRANSLATE("Sample rate"), s); |
152 | 158 | // add "Channels" field |
153 | 159 | s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count); |
154 | | addField("Channels", s); |
| 160 | addField(B_TRANSLATE("Channels"), s); |
155 | 161 | // add "Channel Mask" field |
156 | 162 | s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask); |
157 | | addField("Channel mask", s); |
| 163 | addField(B_TRANSLATE("Channel mask"), s); |
158 | 164 | // add "Matrix Mask" field |
159 | 165 | s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask); |
160 | | addField("Matrix mask", s); |
| 166 | addField(B_TRANSLATE("Matrix mask"), s); |
161 | 167 | // add the "Byte Order" field |
162 | 168 | s = MediaString::forAudioByteOrder(format.u.raw_audio.byte_order); |
163 | | addField("Byte order", s); |
| 169 | addField(B_TRANSLATE("Byte order"), s); |
164 | 170 | // add the "Buffer Size" field |
165 | 171 | s = MediaString::forAudioBufferSize(format.u.raw_audio.buffer_size); |
166 | | addField("Buffer size", s); |
| 172 | addField(B_TRANSLATE("Buffer size"), s); |
167 | 173 | break; |
168 | 174 | } |
169 | 175 | case B_MEDIA_RAW_VIDEO: { |
170 | 176 | // adjust view properties |
171 | | setSideBarWidth(be_plain_font->StringWidth(" Video Data Between ") + 2 * InfoView::M_H_MARGIN); |
| 177 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Video data between")) + 2 * InfoView::M_H_MARGIN); |
172 | 178 | BString s; |
173 | 179 | // add the "Format" field |
174 | 180 | s = MediaString::forVideoFormat(format.u.raw_video.display.format); |
175 | | addField("Format", s); |
| 181 | addField(B_TRANSLATE("Format"), s); |
176 | 182 | // add the "Resolution" field |
177 | 183 | s = MediaString::forVideoResolution(format.u.raw_video.display.line_width, |
178 | 184 | format.u.raw_video.display.line_count); |
179 | | addField("Resolution", s); |
| 185 | addField(B_TRANSLATE("Resolution"), s); |
180 | 186 | // add the "Field Rate" field |
181 | 187 | s = MediaString::forVideoFieldRate(format.u.raw_video.field_rate, |
182 | 188 | format.u.raw_video.interlace); |
183 | | addField("Field rate", s); |
| 189 | addField(B_TRANSLATE("Field rate"), s); |
184 | 190 | // add the "Orientation" field |
185 | 191 | s = MediaString::forVideoOrientation(format.u.raw_video.orientation); |
186 | | addField("Orientation", s); |
| 192 | addField(B_TRANSLATE("Orientation"), s); |
187 | 193 | // add the "Aspect Ratio" field |
188 | 194 | s = MediaString::forVideoAspectRatio(format.u.raw_video.pixel_width_aspect, |
189 | 195 | format.u.raw_video.pixel_height_aspect); |
190 | | addField("Aspect ratio", s); |
| 196 | addField(B_TRANSLATE("Aspect ratio"), s); |
191 | 197 | // add the "Active Lines" field |
192 | 198 | s = MediaString::forVideoActiveLines(format.u.raw_video.first_active, |
193 | 199 | format.u.raw_video.last_active); |
194 | | addField("Active lines", s); |
| 200 | addField(B_TRANSLATE("Active lines"), s); |
195 | 201 | // add the "Offset" field |
196 | 202 | s = MediaString::forVideoOffset(format.u.raw_video.display.pixel_offset, |
197 | 203 | format.u.raw_video.display.line_offset); |
198 | | addField("Offset", s); |
| 204 | addField(B_TRANSLATE("Offset"), s); |
199 | 205 | break; |
200 | 206 | } |
201 | 207 | case B_MEDIA_ENCODED_AUDIO: { |
202 | 208 | // adjust view properties |
203 | | setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN); |
| 209 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Frame size")) + 2 * InfoView::M_H_MARGIN); |
204 | 210 | BString s; |
205 | 211 | // add the "Bit Rate" field |
206 | 212 | s = MediaString::forAudioBitRate(format.u.encoded_audio.bit_rate); |
207 | | addField("Bit rate", s); |
| 213 | addField(B_TRANSLATE("Bit rate"), s); |
208 | 214 | // add the "Frame Size" field |
209 | 215 | s = MediaString::forAudioFrameSize(format.u.encoded_audio.frame_size); |
210 | | addField("Frame size", s); |
| 216 | addField(B_TRANSLATE("Frame size"), s); |
211 | 217 | break; |
212 | 218 | } |
213 | 219 | case B_MEDIA_ENCODED_VIDEO: { |
214 | 220 | // adjust view properties |
215 | | setSideBarWidth(be_plain_font->StringWidth(" Frame Size ") + 2 * InfoView::M_H_MARGIN); |
| 221 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Frame size")) + 2 * InfoView::M_H_MARGIN); |
216 | 222 | BString s; |
217 | 223 | // add the "Bit Rate" field |
218 | 224 | s = MediaString::forVideoBitRate(format.u.encoded_video.avg_bit_rate, |
219 | 225 | format.u.encoded_video.max_bit_rate); |
220 | | addField("Bit rate", s); |
| 226 | addField(B_TRANSLATE("Bit rate"), s); |
221 | 227 | // add the "Frame Size" field |
222 | 228 | s = MediaString::forVideoFrameSize(format.u.encoded_video.frame_size); |
223 | | addField("Frame size", s); |
| 229 | addField(B_TRANSLATE("Frame size"), s); |
224 | 230 | // add the "History" field |
225 | 231 | s = MediaString::forVideoHistory(format.u.encoded_video.forward_history, |
226 | 232 | format.u.encoded_video.backward_history); |
227 | | addField("History", s); |
| 233 | addField(B_TRANSLATE("History"), s); |
228 | 234 | break; |
229 | 235 | } |
230 | 236 | case B_MEDIA_MULTISTREAM: { |
231 | 237 | // adjust view properties |
232 | | setSideBarWidth(be_plain_font->StringWidth(" Chunk Size ") + 2 * InfoView::M_H_MARGIN); |
| 238 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Chunk size")) + 2 * InfoView::M_H_MARGIN); |
233 | 239 | BString s; |
234 | 240 | // add the "Format" field |
235 | 241 | s = MediaString::forMultistreamFormat(format.u.multistream.format); |
236 | | addField("Format", s); |
| 242 | addField(B_TRANSLATE("Format"), s); |
237 | 243 | // add the "Bit Rate" field |
238 | 244 | s = MediaString::forMultistreamBitRate(format.u.multistream.avg_bit_rate, |
239 | 245 | format.u.multistream.max_bit_rate); |
240 | | addField("Bit rate", s); |
| 246 | addField(B_TRANSLATE("Bit rate"), s); |
241 | 247 | // add the "Chunk Size" field |
242 | 248 | s = MediaString::forMultistreamChunkSize(format.u.multistream.avg_chunk_size, |
243 | 249 | format.u.multistream.max_chunk_size); |
244 | | addField("Chunk size", s); |
| 250 | addField(B_TRANSLATE("Chunk size"), s); |
245 | 251 | // add the "Flags" field |
246 | 252 | s = MediaString::forMultistreamFlags(format.u.multistream.flags); |
247 | | addField("Flags", s); |
| 253 | addField(B_TRANSLATE("Flags"), s); |
248 | 254 | break; |
249 | 255 | } |
250 | 256 | default: { |
-
diff --git a/src/apps/cortex/InfoView/FileNodeInfoView.cpp b/src/apps/cortex/InfoView/FileNodeInfoView.cpp
index 1922d92..11cd550 100644
a
|
b
|
|
36 | 36 | #include "MediaString.h" |
37 | 37 | #include "NodeRef.h" |
38 | 38 | |
| 39 | #include <Catalog.h> |
39 | 40 | #include <MediaFile.h> |
40 | 41 | #include <MediaNode.h> |
41 | 42 | #include <MediaRoster.h> |
42 | 43 | #include <MediaTrack.h> |
43 | 44 | #include <TimeCode.h> |
44 | 45 | |
| 46 | #undef B_TRANSLATION_CONTEXT |
| 47 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 48 | |
45 | 49 | __USE_CORTEX_NAMESPACE |
46 | 50 | |
47 | 51 | #include <Debug.h> |
… |
… |
FileNodeInfoView::FileNodeInfoView(
|
58 | 62 | D_METHOD(("FileNodeInfoView::FileNodeInfoView()\n")); |
59 | 63 | |
60 | 64 | // adjust view properties |
61 | | setSideBarWidth(be_plain_font->StringWidth(" File Format ") + 2 * InfoView::M_H_MARGIN); |
62 | | setSubTitle("Live File-Interface Node"); |
| 65 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("File format")) + 2 * InfoView::M_H_MARGIN); |
| 66 | setSubTitle(B_TRANSLATE("Live File-Interface Node")); |
63 | 67 | |
64 | 68 | // if a ref is set for this file-interface display some info |
65 | 69 | // thru MediaFile and set the title appropriatly |
… |
… |
FileNodeInfoView::FileNodeInfoView(
|
82 | 86 | { |
83 | 87 | s = ""; |
84 | 88 | s << format.pretty_name << " (" << format.mime_type << ")"; |
85 | | addField("File Format", s); |
| 89 | addField(B_TRANSLATE("File format"), s); |
86 | 90 | } |
87 | 91 | |
88 | 92 | // add "Copyright" field |
… |
… |
FileNodeInfoView::FileNodeInfoView(
|
90 | 94 | if (copyRight) |
91 | 95 | { |
92 | 96 | s = copyRight; |
93 | | addField("Copyright", s); |
| 97 | addField(B_TRANSLATE("Copyright"), s); |
94 | 98 | } |
95 | 99 | |
96 | 100 | // add "Tracks" list |
97 | 101 | if (file.CountTracks() > 0) |
98 | 102 | { |
99 | | addField("Tracks", ""); |
| 103 | addField(B_TRANSLATE("Tracks"), ""); |
100 | 104 | for (int32 i = 0; i < file.CountTracks(); i++) |
101 | 105 | { |
102 | 106 | BString label; |
… |
… |
FileNodeInfoView::FileNodeInfoView(
|
117 | 121 | media_codec_info codec; |
118 | 122 | if (track->GetCodecInfo(&codec) == B_OK) |
119 | 123 | { |
120 | | s << "\n- Codec: " << codec.pretty_name; |
| 124 | s << B_TRANSLATE("\n- Codec: ") << codec.pretty_name; |
121 | 125 | if (codec.id > 0) |
122 | 126 | { |
123 | | s << " (ID: " << codec.id << ")"; |
| 127 | s << B_TRANSLATE(" (ID: ") << codec.id << ")"; |
124 | 128 | } |
125 | 129 | } |
126 | 130 | } |
… |
… |
FileNodeInfoView::FileNodeInfoView(
|
131 | 135 | us_to_timecode(duration, &hours, &minutes, &seconds, &frames); |
132 | 136 | char buffer[64]; |
133 | 137 | sprintf(buffer, "%02d:%02d:%02d:%02d", hours, minutes, seconds, frames); |
134 | | s << "\n- Duration: " << buffer; |
| 138 | s << B_TRANSLATE("\n- Duration: ") << buffer; |
135 | 139 | |
136 | 140 | // add quality |
137 | 141 | float quality; |
138 | 142 | if (track->GetQuality(&quality) == B_OK) |
139 | 143 | { |
140 | | s << "\n- Quality: " << quality; |
| 144 | s << B_TRANSLATE("\n- Quality: ") << quality; |
141 | 145 | } |
142 | 146 | addField(label, s); |
143 | 147 | } |
… |
… |
FileNodeInfoView::FileNodeInfoView(
|
153 | 157 | { |
154 | 158 | // set title |
155 | 159 | title = ref->name(); |
156 | | title += " (no file)"; |
| 160 | title += B_TRANSLATE(" (no file)"); |
157 | 161 | } |
158 | 162 | setTitle(title); |
159 | 163 | } |
-
diff --git a/src/apps/cortex/InfoView/InfoView.cpp b/src/apps/cortex/InfoView/InfoView.cpp
index b1d9c77..60deccb 100644
a
|
b
|
|
36 | 36 | |
37 | 37 | #include "array_delete.h" |
38 | 38 | |
| 39 | // Locale Kit |
| 40 | #include <Catalog.h> |
39 | 41 | // Interface Kit |
40 | 42 | #include <Bitmap.h> |
41 | 43 | #include <Region.h> |
… |
… |
|
48 | 50 | // Support Kit |
49 | 51 | #include <List.h> |
50 | 52 | |
| 53 | #undef B_TRANSLATION_CONTEXT |
| 54 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 55 | |
51 | 56 | __USE_CORTEX_NAMESPACE |
52 | 57 | |
53 | 58 | #include <Debug.h> |
… |
… |
void InfoView::AttachedToWindow() {
|
176 | 181 | |
177 | 182 | // adjust the windows title |
178 | 183 | BString title = m_title; |
179 | | title << " info"; |
| 184 | title << B_TRANSLATE(" info"); |
180 | 185 | Window()->SetTitle(title.String()); |
181 | 186 | |
182 | 187 | // calculate the area occupied by title, subtitle and icon |
-
diff --git a/src/apps/cortex/InfoView/Jamfile b/src/apps/cortex/InfoView/Jamfile
index f42989b..a8619a5 100644
a
|
b
|
StaticLibrary cortex_info_view.a :
|
18 | 18 | InfoWindow.cpp |
19 | 19 | InfoWindowManager.cpp |
20 | 20 | LiveNodeInfoView.cpp |
| 21 | : be $(HAIKU_LOCALE_LIBS) |
21 | 22 | ; |
-
diff --git a/src/apps/cortex/InfoView/LiveNodeInfoView.cpp b/src/apps/cortex/InfoView/LiveNodeInfoView.cpp
index 354eadd..240d35e 100644
a
|
b
|
|
41 | 41 | #include "MediaIcon.h" |
42 | 42 | #include "MediaString.h" |
43 | 43 | |
| 44 | // Locale Kit |
| 45 | #include <Catalog.h> |
| 46 | |
44 | 47 | // Media Kit |
45 | 48 | #include <MediaNode.h> |
46 | 49 | |
47 | 50 | // Interface Kit |
48 | 51 | #include <Window.h> |
49 | 52 | |
| 53 | #undef B_TRANSLATION_CONTEXT |
| 54 | #define B_TRANSLATION_CONTEXT "CortexInfoView" |
| 55 | |
50 | 56 | __USE_CORTEX_NAMESPACE |
51 | 57 | |
52 | 58 | #include <Debug.h> |
… |
… |
__USE_CORTEX_NAMESPACE
|
59 | 65 | |
60 | 66 | LiveNodeInfoView::LiveNodeInfoView( |
61 | 67 | const NodeRef *ref) |
62 | | : InfoView(ref->name(), "Live Media Node", |
| 68 | : InfoView(ref->name(), B_TRANSLATE("Live media node"), |
63 | 69 | new MediaIcon(ref->nodeInfo(), B_LARGE_ICON)), |
64 | 70 | m_nodeID(ref->id()) |
65 | 71 | { |
66 | 72 | D_METHOD(("LiveNodeInfoView::LiveNodeInfoView()\n")); |
67 | 73 | |
68 | 74 | // adjust view properties |
69 | | setSideBarWidth(be_plain_font->StringWidth(" Run Mode ") + 2 * InfoView::M_H_MARGIN); |
| 75 | setSideBarWidth(be_plain_font->StringWidth(B_TRANSLATE("Run mode")) + 2 * InfoView::M_H_MARGIN); |
70 | 76 | |
71 | 77 | // add "Node ID" field |
72 | 78 | BString s; |
73 | 79 | s << ref->id(); |
74 | | addField("Node ID", s); |
| 80 | addField(B_TRANSLATE("Node ID"), s); |
75 | 81 | |
76 | 82 | // add "Port" field |
77 | 83 | s = ""; |
… |
… |
LiveNodeInfoView::LiveNodeInfoView(
|
81 | 87 | { |
82 | 88 | s << " (" << portInfo.name << ")"; |
83 | 89 | } |
84 | | addField("Port", s); |
| 90 | addField(B_TRANSLATE("Port"), s); |
85 | 91 | |
86 | 92 | // add separator field |
87 | 93 | addField("", ""); |
88 | 94 | |
89 | 95 | // add "Kinds" field |
90 | | addField("Kinds", MediaString::getStringFor(static_cast<node_kind>(ref->kind()))); |
| 96 | addField(B_TRANSLATE("Kinds"), MediaString::getStringFor(static_cast<node_kind>(ref->kind()))); |
91 | 97 | |
92 | 98 | // add "Run Mode" field |
93 | 99 | BMediaNode::run_mode runMode = static_cast<BMediaNode::run_mode>(ref->runMode()); |
… |
… |
LiveNodeInfoView::LiveNodeInfoView(
|
99 | 105 | runMode = group->runMode(); |
100 | 106 | } |
101 | 107 | } |
102 | | addField("Run Mode", MediaString::getStringFor(runMode)); |
| 108 | addField(B_TRANSLATE("Run mode"), MediaString::getStringFor(runMode)); |
103 | 109 | |
104 | 110 | // add "Latency" field |
105 | 111 | bigtime_t latency; |
… |
… |
LiveNodeInfoView::LiveNodeInfoView(
|
114 | 120 | { |
115 | 121 | s = "?"; |
116 | 122 | } |
117 | | addField("Latency", s); |
| 123 | addField(B_TRANSLATE("Latency"), s); |
118 | 124 | } |
119 | 125 | } |
120 | 126 | |
-
diff --git a/src/apps/cortex/MediaRoutingView/Jamfile b/src/apps/cortex/MediaRoutingView/Jamfile
index c18a1c7..e1f6133 100644
a
|
b
|
StaticLibrary cortex_media_routing_view.a :
|
22 | 22 | MediaNodePanel.cpp |
23 | 23 | MediaRoutingView.cpp |
24 | 24 | MediaWire.cpp |
| 25 | : $(HAIKU_LOCALE_LIBS) |
25 | 26 | ; |
-
diff --git a/src/apps/cortex/MediaRoutingView/MediaJack.cpp b/src/apps/cortex/MediaRoutingView/MediaJack.cpp
index dda28d7..c6403a3 100644
a
|
b
|
|
51 | 51 | #include <Bitmap.h> |
52 | 52 | #include <MenuItem.h> |
53 | 53 | #include <PopUpMenu.h> |
| 54 | // Locale Kit |
| 55 | #include <Catalog.h> |
| 56 | |
| 57 | #undef B_TRANSLATION_CONTEXT |
| 58 | #define B_TRANSLATION_CONTEXT "CortexMediaRoutingView" |
54 | 59 | |
55 | 60 | __USE_CORTEX_NAMESPACE |
56 | 61 | |
… |
… |
MediaJack::MediaJack(
|
88 | 93 | D_METHOD(("MediaJack::MediaJack()\n")); |
89 | 94 | makeSelectable(false); |
90 | 95 | if (m_label == "") |
91 | | m_label = "Input"; |
| 96 | m_label = B_TRANSLATE("Input"); |
92 | 97 | _updateAbbreviation(); |
93 | 98 | } |
94 | 99 | |
… |
… |
MediaJack::MediaJack(
|
108 | 113 | D_METHOD(("MediaJack::MediaJack()\n")); |
109 | 114 | makeSelectable(false); |
110 | 115 | if (m_label == "") |
111 | | m_label = "Output"; |
| 116 | m_label = B_TRANSLATE("Output"); |
112 | 117 | _updateAbbreviation(); |
113 | 118 | } |
114 | 119 | |
… |
… |
void MediaJack::showContextMenu(
|
749 | 754 | BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); |
750 | 755 | message->AddData("input", B_RAW_TYPE, |
751 | 756 | reinterpret_cast<const void *>(&input), sizeof(input)); |
752 | | menu->AddItem(item = new BMenuItem("Get info", message)); |
| 757 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Get info"), message)); |
753 | 758 | } |
754 | 759 | else if (isOutput()) |
755 | 760 | { |
… |
… |
void MediaJack::showContextMenu(
|
758 | 763 | BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); |
759 | 764 | message->AddData("output", B_RAW_TYPE, |
760 | 765 | reinterpret_cast<const void *>(&output), sizeof(output)); |
761 | | menu->AddItem(item = new BMenuItem("Get info", message)); |
| 766 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Get info"), message)); |
762 | 767 | } |
763 | 768 | |
764 | 769 | menu->SetTargetForItems(view()); |
-
diff --git a/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp b/src/apps/cortex/MediaRoutingView/MediaNodePanel.cpp
index 92d6864..cab0999 100644
a
|
b
|
|
62 | 62 | // Media Kit |
63 | 63 | #include <MediaDefs.h> |
64 | 64 | #include <MediaRoster.h> |
| 65 | // Locale Kit |
| 66 | #include <Catalog.h> |
| 67 | |
| 68 | #undef B_TRANSLATION_CONTEXT |
| 69 | #define B_TRANSLATION_CONTEXT "CortexMediaNodePanel" |
65 | 70 | |
66 | 71 | using namespace std; |
67 | 72 | |
… |
… |
void MediaNodePanel::showContextMenu(
|
564 | 569 | |
565 | 570 | // add the "Tweak Parameters" item |
566 | 571 | message = new BMessage(MediaRoutingView::M_NODE_TWEAK_PARAMETERS); |
567 | | menu->AddItem(item = new BMenuItem("Tweak parameters", message, 'P')); |
| 572 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Tweak parameters"), message, 'P')); |
568 | 573 | if (!(ref->kind() & B_CONTROLLABLE)) |
569 | 574 | { |
570 | 575 | item->SetEnabled(false); |
… |
… |
void MediaNodePanel::showContextMenu(
|
572 | 577 | |
573 | 578 | message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); |
574 | 579 | message->AddInt32("nodeID", ref->id()); |
575 | | menu->AddItem(new BMenuItem("Get info", message, 'I')); |
| 580 | menu->AddItem(new BMenuItem(B_TRANSLATE("Get info"), message, 'I')); |
576 | 581 | menu->AddSeparatorItem(); |
577 | 582 | |
578 | | menu->AddItem(item = new BMenuItem("Release", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T')); |
| 583 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Release"), new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T')); |
579 | 584 | if (!ref->isInternal()) |
580 | 585 | { |
581 | 586 | item->SetEnabled(false); |
… |
… |
void MediaNodePanel::showContextMenu(
|
585 | 590 | // add the "Cycle" item |
586 | 591 | message = new BMessage(MediaRoutingView::M_NODE_CHANGE_CYCLING); |
587 | 592 | message->AddBool("cycle", !ref->isCycling()); |
588 | | menu->AddItem(item = new BMenuItem("Cycle", message)); |
| 593 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Cycle"), message)); |
589 | 594 | item->SetMarked(ref->isCycling()); |
590 | 595 | if (ref->flags() & NodeRef::NO_SEEK) |
591 | 596 | { |
… |
… |
void MediaNodePanel::showContextMenu(
|
593 | 598 | } |
594 | 599 | |
595 | 600 | // add the "Run Mode" sub menu |
596 | | BMenu *subMenu = new BMenu("Run mode"); |
| 601 | BMenu *subMenu = new BMenu(B_TRANSLATE("Run mode")); |
597 | 602 | subMenu->SetFont(be_plain_font); |
598 | 603 | for (uint32 runMode = 1; runMode <= BMediaNode::B_RECORDING; runMode++) |
599 | 604 | { |
… |
… |
void MediaNodePanel::showContextMenu(
|
615 | 620 | subMenu->AddSeparatorItem(); |
616 | 621 | message = new BMessage(MediaRoutingView::M_NODE_CHANGE_RUN_MODE); |
617 | 622 | message->AddInt32("run_mode", 0); |
618 | | subMenu->AddItem(item = new BMenuItem("(same as group)", message)); |
| 623 | subMenu->AddItem(item = new BMenuItem(B_TRANSLATE("(same as group)"), message)); |
619 | 624 | if (ref->group() == 0) |
620 | 625 | { |
621 | 626 | item->SetEnabled(false); |
… |
… |
void MediaNodePanel::showContextMenu(
|
628 | 633 | subMenu->SetTargetForItems(view()); |
629 | 634 | |
630 | 635 | // [c.lenz 24dec99] hide rarely used commands in a 'Advanced' submenu |
631 | | subMenu = new BMenu("Advanced"); |
| 636 | subMenu = new BMenu(B_TRANSLATE("Advanced")); |
632 | 637 | subMenu->SetFont(be_plain_font); |
633 | 638 | // [e.moon 5dec99] ad-hoc timesource support |
634 | 639 | if(ref->kind() & B_TIME_SOURCE) { |
635 | 640 | message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE); |
636 | 641 | message->AddInt32("nodeID", ref->id()); |
637 | 642 | subMenu->AddItem(new BMenuItem( |
638 | | "Start time source", |
| 643 | B_TRANSLATE("Start time source"), |
639 | 644 | message)); |
640 | 645 | message = new BMessage(MediaRoutingView::M_NODE_START_TIME_SOURCE); |
641 | 646 | message->AddInt32("nodeID", ref->id()); |
642 | 647 | subMenu->AddItem(new BMenuItem( |
643 | | "Stop time source", |
| 648 | B_TRANSLATE("Stop time source"), |
644 | 649 | message)); |
645 | 650 | } |
646 | 651 | // [c.lenz 24dec99] support for BControllable::StartControlPanel() |
… |
… |
void MediaNodePanel::showContextMenu(
|
648 | 653 | if (subMenu->CountItems() > 0) |
649 | 654 | subMenu->AddSeparatorItem(); |
650 | 655 | message = new BMessage(MediaRoutingView::M_NODE_START_CONTROL_PANEL); |
651 | | subMenu->AddItem(new BMenuItem("Start Control Panel", message, |
| 656 | subMenu->AddItem(new BMenuItem(B_TRANSLATE("Start control panel"), message, |
652 | 657 | 'P', B_COMMAND_KEY | B_SHIFT_KEY)); |
653 | 658 | } |
654 | 659 | // [em 1feb00] group tweaks |
… |
… |
void MediaNodePanel::showContextMenu(
|
662 | 667 | subMenu->AddSeparatorItem(); |
663 | 668 | subMenu->AddItem( |
664 | 669 | new BMenuItem( |
665 | | isLocked ? "Unlock group" : "Lock group", message)); |
| 670 | isLocked ? B_TRANSLATE("Unlock group") : B_TRANSLATE("Lock group"), message)); |
666 | 671 | } |
667 | 672 | |
668 | 673 | if (subMenu->CountItems() > 0) |
-
diff --git a/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp b/src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
index b2290a0..e70c325 100644
a
|
b
|
|
71 | 71 | // Translation Kit |
72 | 72 | #include <BitmapStream.h> |
73 | 73 | #include <TranslatorRoster.h> |
| 74 | // Locale Kit |
| 75 | #include <Catalog.h> |
| 76 | |
| 77 | #undef B_TRANSLATION_CONTEXT |
| 78 | #define B_TRANSLATION_CONTEXT "CortexMediaRoutingView" |
74 | 79 | |
75 | 80 | __USE_CORTEX_NAMESPACE |
76 | 81 | |
… |
… |
MediaRoutingView::MessageDropped(BPoint point, BMessage *message)
|
268 | 273 | m_lastDropPoint = Align(ConvertFromScreen(dropPoint - dropOffset)); |
269 | 274 | } else { |
270 | 275 | BString s; |
271 | | s << "Could not instantiate '" << info.name << "'"; |
| 276 | s << B_TRANSLATE("Could not instantiate") << " '" << info.name << "'"; |
272 | 277 | showErrorMessage(s, error); |
273 | 278 | } |
274 | 279 | } |
… |
… |
void MediaRoutingView::showContextMenu(
|
942 | 947 | BMenuItem *item; |
943 | 948 | BMessage *message = new BMessage(M_LAYOUT_CHANGED); |
944 | 949 | message->AddInt32("layout", M_ICON_VIEW); |
945 | | menu->AddItem(item = new BMenuItem("Icon view", message)); |
| 950 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Icon view"), message)); |
946 | 951 | if (m_layout == M_ICON_VIEW) |
947 | 952 | { |
948 | 953 | item->SetMarked(true); |
949 | 954 | } |
950 | 955 | message = new BMessage(M_LAYOUT_CHANGED); |
951 | 956 | message->AddInt32("layout", M_MINI_ICON_VIEW); |
952 | | menu->AddItem(item = new BMenuItem("Mini icon view", message)); |
| 957 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Mini icon view"), message)); |
953 | 958 | if (m_layout == M_MINI_ICON_VIEW) |
954 | 959 | { |
955 | 960 | item->SetMarked(true); |
… |
… |
void MediaRoutingView::showContextMenu(
|
957 | 962 | menu->AddSeparatorItem(); |
958 | 963 | |
959 | 964 | // add 'CleanUp' command |
960 | | menu->AddItem(new BMenuItem("Clean up", new BMessage(M_CLEANUP_REQUESTED), 'K')); |
| 965 | menu->AddItem(new BMenuItem(B_TRANSLATE("Clean up"), new BMessage(M_CLEANUP_REQUESTED), 'K')); |
961 | 966 | |
962 | 967 | // add 'Select All' command |
963 | | menu->AddItem(new BMenuItem("Select all", new BMessage(M_SELECT_ALL), 'A')); |
| 968 | menu->AddItem(new BMenuItem(B_TRANSLATE("Select all"), new BMessage(M_SELECT_ALL), 'A')); |
964 | 969 | |
965 | 970 | menu->SetTargetForItems(this); |
966 | 971 | ConvertToScreen(&point); |
… |
… |
void MediaRoutingView::showErrorMessage(
|
986 | 991 | BMessenger messenger(0, Window()); |
987 | 992 | if (!messenger.IsValid() |
988 | 993 | || (messenger.SendMessage(&message) != B_OK)) { |
989 | | BAlert *alert = new BAlert("Error", text.String(), "OK", 0, 0, |
| 994 | BAlert *alert = new BAlert("Error", text.String(), B_TRANSLATE("OK"), 0, 0, |
990 | 995 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
991 | 996 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
992 | 997 | alert->Go(); |
… |
… |
void MediaRoutingView::_initLayout()
|
1465 | 1470 | font_height fh; |
1466 | 1471 | be_plain_font->GetHeight(&fh); |
1467 | 1472 | labelWidth = 4 * MediaNodePanel::M_LABEL_H_MARGIN |
1468 | | + be_plain_font->StringWidth(" Be Audio Mixer "); |
| 1473 | + be_plain_font->StringWidth(B_TRANSLATE("Be Audio Mixer")); |
1469 | 1474 | bodyWidth = 2 * MediaNodePanel::M_BODY_H_MARGIN + B_LARGE_ICON |
1470 | 1475 | + 2 * MediaJack::M_DEFAULT_WIDTH; |
1471 | 1476 | labelHeight = 2 * MediaNodePanel::M_LABEL_V_MARGIN |
… |
… |
void MediaRoutingView::_initLayout()
|
1488 | 1493 | font_height fh; |
1489 | 1494 | be_plain_font->GetHeight(&fh); |
1490 | 1495 | labelWidth = 4 * MediaNodePanel::M_LABEL_H_MARGIN |
1491 | | + be_plain_font->StringWidth(" Be Audio Mixer "); |
| 1496 | + be_plain_font->StringWidth(B_TRANSLATE("Be Audio Mixer")); |
1492 | 1497 | bodyWidth = 2 * MediaNodePanel::M_BODY_H_MARGIN + B_MINI_ICON; |
1493 | 1498 | labelHeight = 3 * MediaNodePanel::M_LABEL_V_MARGIN |
1494 | 1499 | + fh.ascent + fh.descent + fh.leading |
… |
… |
void MediaRoutingView::_initContent()
|
1532 | 1537 | NodeRef* videoIn = manager->videoInputNode(); |
1533 | 1538 | if (videoIn) |
1534 | 1539 | { |
1535 | | group = manager->createGroup("Video input"); |
| 1540 | group = manager->createGroup(B_TRANSLATE("Video input")); |
1536 | 1541 | group->setRunMode(BMediaNode::B_RECORDING); |
1537 | 1542 | group->addNode(videoIn); |
1538 | 1543 | } |
1539 | 1544 | NodeRef* audioIn = manager->audioInputNode(); |
1540 | 1545 | if (audioIn) |
1541 | 1546 | { |
1542 | | group = manager->createGroup("Audio input"); |
| 1547 | group = manager->createGroup(B_TRANSLATE("Audio input")); |
1543 | 1548 | group->setRunMode(BMediaNode::B_RECORDING); |
1544 | 1549 | group->addNode(audioIn); |
1545 | 1550 | } |
1546 | 1551 | NodeRef* videoOut = manager->videoOutputNode(); |
1547 | 1552 | if (videoOut) |
1548 | 1553 | { |
1549 | | group = manager->createGroup("Video output"); |
| 1554 | group = manager->createGroup(B_TRANSLATE("Video output")); |
1550 | 1555 | group->addNode(videoOut); |
1551 | 1556 | } |
1552 | 1557 | } |
… |
… |
void MediaRoutingView::_deleteSelection()
|
1673 | 1678 | if (error) |
1674 | 1679 | { |
1675 | 1680 | BString s; |
1676 | | s << "Could not release '" << panel->ref->name() << "'"; |
| 1681 | s << B_TRANSLATE("Could not release") << " '" << panel->ref->name() << "'"; |
1677 | 1682 | showErrorMessage(s, error); |
1678 | 1683 | } |
1679 | 1684 | } |
… |
… |
void MediaRoutingView::_deleteSelection()
|
1689 | 1694 | status_t error = manager->disconnect(wire->connection); |
1690 | 1695 | if (error) |
1691 | 1696 | { |
1692 | | showErrorMessage("Could not disconnect", error); |
| 1697 | showErrorMessage(B_TRANSLATE("Could not disconnect"), error); |
1693 | 1698 | } |
1694 | 1699 | } |
1695 | 1700 | } |
… |
… |
void MediaRoutingView::_checkDroppedFile(
|
1753 | 1758 | BEntry entry(ref); |
1754 | 1759 | entry.GetName(fileName); |
1755 | 1760 | BString s; |
1756 | | s << "Could not load '" << fileName << "'"; |
| 1761 | s << B_TRANSLATE("Could not load") << " '" << fileName << "'"; |
1757 | 1762 | showErrorMessage(s, error); |
1758 | 1763 | } |
1759 | 1764 | } |
-
diff --git a/src/apps/cortex/MediaRoutingView/MediaWire.cpp b/src/apps/cortex/MediaRoutingView/MediaWire.cpp
index 8f40f36..92b00ad 100644
a
|
b
|
|
51 | 51 | #include <PopUpMenu.h> |
52 | 52 | // Media Kit |
53 | 53 | #include <MediaDefs.h> |
| 54 | // Locale Kit |
| 55 | #include <Catalog.h> |
| 56 | |
| 57 | #undef B_TRANSLATION_CONTEXT |
| 58 | #define B_TRANSLATION_CONTEXT "CortexMediaRoutingView" |
54 | 59 | |
55 | 60 | __USE_CORTEX_NAMESPACE |
56 | 61 | |
… |
… |
void MediaWire::showContextMenu(
|
322 | 327 | BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED); |
323 | 328 | message->AddData("connection", B_RAW_TYPE, |
324 | 329 | reinterpret_cast<const void *>(&output), sizeof(output)); |
325 | | menu->AddItem(item = new BMenuItem("Get info", message, 'I')); |
| 330 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Get info"), message, 'I')); |
326 | 331 | |
327 | 332 | // add the "Disconnect" item |
328 | | menu->AddItem(item = new BMenuItem("Disconnect", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T')); |
| 333 | menu->AddItem(item = new BMenuItem(B_TRANSLATE("Disconnect"), new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T')); |
329 | 334 | if (connection.flags() & Connection::LOCKED) |
330 | 335 | { |
331 | 336 | item->SetEnabled(false); |
-
diff --git a/src/apps/cortex/NodeManager/Jamfile b/src/apps/cortex/NodeManager/Jamfile
index 591976d..6a135aa 100644
a
|
b
|
StaticLibrary cortex_node_manager.a :
|
15 | 15 | NodeGroup.cpp |
16 | 16 | NodeRef.cpp |
17 | 17 | NodeSyncThread.cpp |
| 18 | : $(HAIKU_LOCALE_LIBS) |
18 | 19 | ; |
-
diff --git a/src/apps/cortex/NodeManager/NodeManager.cpp b/src/apps/cortex/NodeManager/NodeManager.cpp
index 7c87dba..cbc3dce 100644
a
|
b
|
|
46 | 46 | #include <functional> |
47 | 47 | #include <list> |
48 | 48 | #include <set> |
| 49 | // Locale Kit |
| 50 | #include <Catalog.h> |
| 51 | |
| 52 | #undef B_TRANSLATION_CONTEXT |
| 53 | #define B_TRANSLATION_CONTEXT "CortexNodeManager" |
49 | 54 | |
50 | 55 | #include "set_tools.h" |
51 | 56 | #include "functional_tools.h" |
… |
… |
NodeManager::~NodeManager() {
|
406 | 411 | // |
407 | 412 | } |
408 | 413 | |
409 | | const char* const NodeManager::s_defaultGroupPrefix = "No Name"; |
410 | | const char* const NodeManager::s_timeSourceGroup = "Time Sources"; |
411 | | const char* const NodeManager::s_audioInputGroup = "System Audio Input"; |
412 | | const char* const NodeManager::s_videoInputGroup = "System Video Input"; |
413 | | const char* const NodeManager::s_audioMixerGroup = "System Audio Mixer"; |
414 | | const char* const NodeManager::s_videoOutputGroup = "System Video Output"; |
| 414 | const char* const NodeManager::s_defaultGroupPrefix = B_TRANSLATE("No name"); |
| 415 | const char* const NodeManager::s_timeSourceGroup = B_TRANSLATE("Time sources"); |
| 416 | const char* const NodeManager::s_audioInputGroup = B_TRANSLATE("System audio input"); |
| 417 | const char* const NodeManager::s_videoInputGroup = B_TRANSLATE("System video input"); |
| 418 | const char* const NodeManager::s_audioMixerGroup = B_TRANSLATE("System audio mixer"); |
| 419 | const char* const NodeManager::s_videoOutputGroup = B_TRANSLATE("System video output"); |
415 | 420 | |
416 | 421 | NodeManager::NodeManager( |
417 | 422 | bool useAddOnHost) : |
-
diff --git a/src/apps/cortex/ParameterView/Jamfile b/src/apps/cortex/ParameterView/Jamfile
index 6f9b98c..98743c1 100644
a
|
b
|
StaticLibrary cortex_parameter_view.a :
|
12 | 12 | ParameterWindowManager.cpp |
13 | 13 | ParameterWindow.cpp |
14 | 14 | ParameterContainerView.cpp |
| 15 | : $(HAIKU_LOCALE_LIBS) |
15 | 16 | ; |
-
diff --git a/src/apps/cortex/ParameterView/ParameterWindow.cpp b/src/apps/cortex/ParameterView/ParameterWindow.cpp
index 8a8b963..14644d8 100644
a
|
b
|
|
54 | 54 | #include <Path.h> |
55 | 55 | // Support Kit |
56 | 56 | #include <String.h> |
| 57 | // Locale Kit |
| 58 | #include <Catalog.h> |
| 59 | |
| 60 | #undef B_TRANSLATION_CONTEXT |
| 61 | #define B_TRANSLATION_CONTEXT "CortexParameterWindow" |
57 | 62 | |
58 | 63 | __USE_CORTEX_NAMESPACE |
59 | 64 | |
… |
… |
ParameterWindow::ParameterWindow(
|
83 | 88 | |
84 | 89 | // add the nodes name to the title |
85 | 90 | { |
86 | | char* title = new char[strlen(nodeInfo.name) + strlen(" parameters") + 1]; |
87 | | sprintf(title, "%s parameters", nodeInfo.name); |
| 91 | char* title = new char[strlen(nodeInfo.name) + strlen(B_TRANSLATE(" parameters")) + 1]; |
| 92 | sprintf(title, B_TRANSLATE("%s parameters"), nodeInfo.name); |
88 | 93 | SetTitle(title); |
89 | 94 | delete [] title; |
90 | 95 | } |
91 | 96 | // add the menu bar |
92 | 97 | BMenuBar *menuBar = new BMenuBar(Bounds(), "ParameterWindow MenuBar"); |
93 | 98 | |
94 | | BMenu *menu = new BMenu("Window"); |
95 | | menu->AddItem(new BMenuItem("Start control panel", |
| 99 | BMenu *menu = new BMenu(B_TRANSLATE("Window")); |
| 100 | menu->AddItem(new BMenuItem(B_TRANSLATE("Start control panel"), |
96 | 101 | new BMessage(M_START_CONTROL_PANEL), |
97 | 102 | 'P', B_COMMAND_KEY | B_SHIFT_KEY)); |
98 | 103 | menu->AddSeparatorItem(); |
99 | | menu->AddItem(new BMenuItem("Close", |
| 104 | menu->AddItem(new BMenuItem(B_TRANSLATE("Close"), |
100 | 105 | new BMessage(B_QUIT_REQUESTED), |
101 | 106 | 'W', B_COMMAND_KEY)); |
102 | 107 | menuBar->AddItem(menu); |
103 | 108 | |
104 | 109 | // future Media Theme selection capabilities go here |
105 | | menu = new BMenu("Themes"); |
| 110 | menu = new BMenu(B_TRANSLATE("Themes")); |
106 | 111 | BMessage *message = new BMessage(M_THEME_SELECTED); |
107 | 112 | BMediaTheme *theme = BMediaTheme::PreferredTheme(); |
108 | 113 | message->AddInt32("themeID", theme->ID()); |
… |
… |
void ParameterWindow::MessageReceived(
|
158 | 163 | D_MESSAGE((" -> M_START_CONTROL_PANEL\n")); |
159 | 164 | status_t error = _startControlPanel(); |
160 | 165 | if (error) { |
161 | | BString s = "Could not start control panel"; |
| 166 | BString s = B_TRANSLATE("Could not start control panel"); |
162 | 167 | s << " (" << strerror(error) << ")"; |
163 | | BAlert *alert = new BAlert("", s.String(), "OK", 0, 0, |
| 168 | BAlert *alert = new BAlert("", s.String(), B_TRANSLATE("OK"), 0, 0, |
164 | 169 | B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
165 | 170 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
166 | 171 | alert->Go(0); |
-
diff --git a/src/apps/cortex/RouteApp/Jamfile b/src/apps/cortex/RouteApp/Jamfile
index b66ab30..0175220 100644
a
|
b
|
Application Cortex :
|
41 | 41 | cortex_support.a |
42 | 42 | be media tracker translation |
43 | 43 | libexpat.a |
44 | | $(TARGET_LIBSTDC++) |
| 44 | $(TARGET_LIBSTDC++) $(HAIKU_LOCALE_LIBS) |
45 | 45 | : ../Resource.rdef |
46 | 46 | ; |
| 47 | |
| 48 | DoCatalogs Cortex : |
| 49 | application/x-vnd.Cortex.Route |
| 50 | : |
| 51 | RouteAppNodeManager.cpp |
| 52 | RouteWindow.cpp |
| 53 | ; |
-
diff --git a/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp b/src/apps/cortex/RouteApp/RouteAppNodeManager.cpp
index 0199bb9..d29d282 100644
a
|
b
|
|
62 | 62 | |
63 | 63 | #include "set_tools.h" |
64 | 64 | |
| 65 | // Locale Kit |
| 66 | #include <Catalog.h> |
| 67 | |
| 68 | #undef B_TRANSLATION_CONTEXT |
| 69 | #define B_TRANSLATION_CONTEXT "CortexRouteApp" |
| 70 | |
65 | 71 | using namespace std; |
66 | 72 | |
67 | 73 | __USE_CORTEX_NAMESPACE |
… |
… |
void RouteAppNodeManager::nodeCreated(
|
170 | 176 | |
171 | 177 | // prepare the log message |
172 | 178 | BMessage logMsg(M_LOG); |
173 | | BString title = "Node '"; |
174 | | title << ref->name() << "' created"; |
| 179 | BString title = B_TRANSLATE("Node '"); |
| 180 | title << ref->name() << B_TRANSLATE("' created"); |
175 | 181 | logMsg.AddString("title", title); |
176 | 182 | |
177 | 183 | // create a default group for the node |
… |
… |
void RouteAppNodeManager::nodeDeleted(
|
210 | 216 | |
211 | 217 | // prepare the log message |
212 | 218 | BMessage logMsg(M_LOG); |
213 | | BString title = "Node '"; |
214 | | title << ref->name() << "' released"; |
| 219 | BString title = B_TRANSLATE("Node '"); |
| 220 | title << ref->name() << B_TRANSLATE("' released"); |
215 | 221 | logMsg.AddString("title", title); |
216 | 222 | |
217 | 223 | if(ref->kind() & B_TIME_SOURCE) { |
… |
… |
void RouteAppNodeManager::connectionMade(
|
234 | 240 | |
235 | 241 | // prepare the log message |
236 | 242 | BMessage logMsg(M_LOG); |
237 | | BString title = "Connection "; |
| 243 | BString title = B_TRANSLATE("Connection "); |
238 | 244 | if (strcmp(connection->outputName(), connection->inputName()) == 0) { |
239 | 245 | title << "'" << connection->outputName() << "' "; |
240 | 246 | } |
241 | | title << "made"; |
| 247 | title << B_TRANSLATE("made"); |
242 | 248 | logMsg.AddString("title", title); |
243 | 249 | |
244 | 250 | if(!(connection->flags() & Connection::INTERNAL)) |
… |
… |
void RouteAppNodeManager::connectionMade(
|
265 | 271 | } |
266 | 272 | |
267 | 273 | // add node names to log messages |
268 | | BString line = "Between:"; |
| 274 | BString line = B_TRANSLATE("Between:"); |
269 | 275 | logMsg.AddString("line", line); |
270 | 276 | line = " "; |
271 | | line << producer->name() << " and "; |
| 277 | line << producer->name() << B_TRANSLATE(" and "); |
272 | 278 | line << consumer->name(); |
273 | 279 | logMsg.AddString("line", line); |
274 | 280 | |
275 | 281 | // add format to log message |
276 | | line = "Negotiated format:"; |
| 282 | line = B_TRANSLATE("Negotiated format:"); |
277 | 283 | logMsg.AddString("line", line); |
278 | 284 | line = " "; |
279 | 285 | line << MediaString::getStringFor(connection->format(), false); |
280 | 286 | logMsg.AddString("line", line); |
281 | 287 | |
282 | 288 | NodeGroup *group = 0; |
283 | | BString groupName = "Untitled group "; |
| 289 | BString groupName = B_TRANSLATE("Untitled group "); |
284 | 290 | if(_canGroup(producer) && _canGroup(consumer)) |
285 | 291 | { |
286 | 292 | if (producer->group() && consumer->group() && |
… |
… |
void RouteAppNodeManager::connectionBroken(
|
335 | 341 | |
336 | 342 | // prepare the log message |
337 | 343 | BMessage logMsg(M_LOG); |
338 | | BString title = "Connection "; |
| 344 | BString title = B_TRANSLATE("Connection "); |
339 | 345 | if (strcmp(connection->outputName(), connection->inputName()) == 0) { |
340 | 346 | title << "'" << connection->outputName() << "' "; |
341 | 347 | } |
342 | | title << "broken"; |
| 348 | title << B_TRANSLATE("broken"); |
343 | 349 | logMsg.AddString("title", title); |
344 | 350 | |
345 | 351 | if(!(connection->flags() & Connection::INTERNAL)) |
… |
… |
void RouteAppNodeManager::connectionBroken(
|
371 | 377 | } |
372 | 378 | |
373 | 379 | // add node names to log messages |
374 | | BString line = "Between:"; |
| 380 | BString line = B_TRANSLATE("Between:"); |
375 | 381 | logMsg.AddString("line", line); |
376 | 382 | line = " "; |
377 | | line << producer->name() << " and "; |
| 383 | line << producer->name() << B_TRANSLATE(" and "); |
378 | 384 | line << consumer->name(); |
379 | 385 | logMsg.AddString("line", line); |
380 | 386 | |
… |
… |
void RouteAppNodeManager::connectionFailed(
|
402 | 408 | |
403 | 409 | // prepare the log message |
404 | 410 | BMessage logMsg(M_LOG); |
405 | | BString title = "Connection failed"; |
| 411 | BString title = B_TRANSLATE("Connection failed"); |
406 | 412 | logMsg.AddString("title", title); |
407 | 413 | logMsg.AddInt32("error", error); |
408 | 414 | |
… |
… |
void RouteAppNodeManager::connectionFailed(
|
417 | 423 | } |
418 | 424 | |
419 | 425 | // add node names to log messages |
420 | | BString line = "Between:"; |
| 426 | BString line = B_TRANSLATE("Between:"); |
421 | 427 | logMsg.AddString("line", line); |
422 | 428 | line = " "; |
423 | 429 | line << producer->name() << " and " << consumer->name(); |
424 | 430 | logMsg.AddString("line", line); |
425 | 431 | |
426 | 432 | // add format to log message |
427 | | line = "Tried format:"; |
| 433 | line = B_TRANSLATE("Tried format:"); |
428 | 434 | logMsg.AddString("line", line); |
429 | 435 | line = " "; |
430 | 436 | line << MediaString::getStringFor(format, true); |
-
diff --git a/src/apps/cortex/RouteApp/RouteWindow.cpp b/src/apps/cortex/RouteApp/RouteWindow.cpp
index ae5fd26..bcd93bd 100644
a
|
b
|
|
64 | 64 | #define D_HOOK(x) //PRINT (x) |
65 | 65 | #define D_INTERNAL(x) //PRINT (x) |
66 | 66 | |
| 67 | // Locale Kit |
| 68 | #include <Catalog.h> |
| 69 | |
| 70 | #undef B_TRANSLATION_CONTEXT |
| 71 | #define B_TRANSLATION_CONTEXT "CortexRouteApp" |
| 72 | |
67 | 73 | __USE_CORTEX_NAMESPACE |
68 | 74 | |
69 | 75 | |
70 | | const char* const RouteWindow::s_windowName = "Cortex"; |
| 76 | const char* const RouteWindow::s_windowName = B_TRANSLATE("Cortex"); |
71 | 77 | |
72 | 78 | const BRect RouteWindow::s_initFrame(100,100,700,550); |
73 | 79 | |
74 | 80 | const char* const g_aboutText = |
75 | | "Cortex/Route 2.1.2\n\n" |
| 81 | B_TRANSLATE("Cortex/Route 2.1.2\n\n" |
76 | 82 | "Copyright 1999-2000 Eric Moon\n" |
77 | 83 | "All rights reserved.\n\n" |
78 | 84 | "The Cortex Team:\n\n" |
… |
… |
const char* const g_aboutText =
|
80 | 86 | "Eric Moon: UI, back-end\n\n" |
81 | 87 | "Thanks to:\nJohn Ashmun\nJon Watte\nDoug Wright\n<your name here>\n\n" |
82 | 88 | "Certain icons used herein are the property of\n" |
83 | | "Be, Inc. and are used by permission."; |
| 89 | "Be, Inc. and are used by permission."); |
84 | 90 | |
85 | 91 | |
86 | 92 | RouteWindow::~RouteWindow() |
… |
… |
RouteWindow::RouteWindow(RouteAppNodeManager* manager)
|
103 | 109 | |
104 | 110 | // initialize the menu bar: add all menus that target this window |
105 | 111 | BMenuBar* pMenuBar = new BMenuBar(b, "menuBar"); |
106 | | BMenu* pFileMenu = new BMenu("File"); |
107 | | BMenuItem* item = new BMenuItem("Open" B_UTF8_ELLIPSIS, |
| 112 | BMenu* pFileMenu = new BMenu(B_TRANSLATE("File")); |
| 113 | BMenuItem* item = new BMenuItem(B_TRANSLATE("Open" B_UTF8_ELLIPSIS), |
108 | 114 | new BMessage(RouteApp::M_SHOW_OPEN_PANEL), 'O'); |
109 | 115 | item->SetTarget(be_app); |
110 | 116 | pFileMenu->AddItem(item); |
111 | 117 | pFileMenu->AddItem(new BSeparatorItem()); |
112 | | item = new BMenuItem("Save nodes" B_UTF8_ELLIPSIS, |
| 118 | item = new BMenuItem(B_TRANSLATE("Save nodes" B_UTF8_ELLIPSIS), |
113 | 119 | new BMessage(RouteApp::M_SHOW_SAVE_PANEL), 'S'); |
114 | 120 | item->SetTarget(be_app); |
115 | 121 | pFileMenu->AddItem(item); |
116 | 122 | pFileMenu->AddItem(new BSeparatorItem()); |
117 | | pFileMenu->AddItem(new BMenuItem("About Cortex/Route" B_UTF8_ELLIPSIS, |
| 123 | pFileMenu->AddItem(new BMenuItem(B_TRANSLATE("About Cortex/Route" B_UTF8_ELLIPSIS), |
118 | 124 | new BMessage(B_ABOUT_REQUESTED))); |
119 | 125 | pFileMenu->AddItem(new BSeparatorItem()); |
120 | | pFileMenu->AddItem(new BMenuItem("Quit", new BMessage(B_QUIT_REQUESTED))); |
| 126 | pFileMenu->AddItem(new BMenuItem(B_TRANSLATE("Quit"), new BMessage(B_QUIT_REQUESTED))); |
121 | 127 | pMenuBar->AddItem(pFileMenu); |
122 | 128 | AddChild(pMenuBar); |
123 | 129 | |
… |
… |
RouteWindow::RouteWindow(RouteAppNodeManager* manager)
|
166 | 172 | SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight); |
167 | 173 | |
168 | 174 | // construct the Window menu |
169 | | BMenu* windowMenu = new BMenu("Window"); |
| 175 | BMenu* windowMenu = new BMenu(B_TRANSLATE("Window")); |
170 | 176 | m_transportWindowItem = new BMenuItem( |
171 | | "Show transport", |
| 177 | B_TRANSLATE("Show transport"), |
172 | 178 | new BMessage(M_TOGGLE_TRANSPORT_WINDOW)); |
173 | 179 | windowMenu->AddItem(m_transportWindowItem); |
174 | 180 | |
175 | 181 | m_dormantNodeWindowItem = new BMenuItem( |
176 | | "Show add-ons", |
| 182 | B_TRANSLATE("Show add-ons"), |
177 | 183 | new BMessage(M_TOGGLE_DORMANT_NODE_WINDOW)); |
178 | 184 | windowMenu->AddItem(m_dormantNodeWindowItem); |
179 | 185 | |
180 | 186 | windowMenu->AddItem(new BSeparatorItem()); |
181 | 187 | |
182 | 188 | m_pullPalettesItem = new BMenuItem( |
183 | | "Pull palettes", |
| 189 | B_TRANSLATE("Pull palettes"), |
184 | 190 | new BMessage(M_TOGGLE_PULLING_PALETTES)); |
185 | 191 | windowMenu->AddItem(m_pullPalettesItem); |
186 | 192 | |
… |
… |
RouteWindow::MessageReceived(BMessage* pMsg)
|
373 | 379 | switch (pMsg->what) { |
374 | 380 | case B_ABOUT_REQUESTED: |
375 | 381 | { |
376 | | BAlert* alert = new BAlert("About", g_aboutText, "OK"); |
| 382 | BAlert* alert = new BAlert("About", g_aboutText, B_TRANSLATE("OK")); |
377 | 383 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
378 | 384 | alert->Go(); |
379 | 385 | break; |
-
diff --git a/src/apps/cortex/TipManager/Jamfile b/src/apps/cortex/TipManager/Jamfile
index 2c73b63..a29041b 100644
a
|
b
|
StaticLibrary cortex_tip_manager.a :
|
12 | 12 | TipManagerImpl.cpp |
13 | 13 | TipWindow.cpp |
14 | 14 | TipView.cpp |
| 15 | : $(HAIKU_LOCALE_LIBS) |
| 16 | ; |
| 17 | |
| 18 | DoCatalogs Cortex : |
| 19 | application/x-vnd.Cortex.Route |
| 20 | : |
| 21 | TipWindow.cpp |
15 | 22 | ; |
-
diff --git a/src/apps/cortex/TipManager/TipWindow.cpp b/src/apps/cortex/TipManager/TipWindow.cpp
index 1cda91b..639db42 100644
a
|
b
|
|
35 | 35 | #include "TipView.h" |
36 | 36 | |
37 | 37 | #include <Debug.h> |
| 38 | // Locale Kit |
| 39 | #include <Catalog.h> |
| 40 | |
| 41 | #undef B_TRANSLATION_CONTEXT |
| 42 | #define B_TRANSLATION_CONTEXT "CortexTipManager" |
38 | 43 | |
39 | 44 | __USE_CORTEX_NAMESPACE |
40 | 45 | |
… |
… |
void TipWindow::_createTipView() {
|
145 | 150 | if(m_text.Length()) |
146 | 151 | m_tipView->setText(m_text.String()); |
147 | 152 | else |
148 | | m_tipView->setText("(no info)"); |
| 153 | m_tipView->setText(B_TRANSLATE("(no info)")); |
149 | 154 | } |
150 | 155 | |
151 | 156 | void TipWindow::_destroyTipView() { |
-
diff --git a/src/apps/cortex/TransportView/Jamfile b/src/apps/cortex/TransportView/Jamfile
index 9b9d7fb..dfc94b5 100644
a
|
b
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
14 | 14 | StaticLibrary cortex_transport_view.a : |
15 | 15 | TransportView.cpp |
16 | 16 | TransportWindow.cpp |
| 17 | : $(HAIKU_LOCALE_LIBS) |
| 18 | ; |
| 19 | |
| 20 | DoCatalogs Cortex : |
| 21 | application/x-vnd.Cortex.Route |
| 22 | : |
| 23 | TransportView.cpp |
17 | 24 | ; |
-
diff --git a/src/apps/cortex/TransportView/TransportView.cpp b/src/apps/cortex/TransportView/TransportView.cpp
index 9dc1ef5..abf19a1 100644
a
|
b
|
|
56 | 56 | |
57 | 57 | #include <algorithm> |
58 | 58 | #include <functional> |
| 59 | // Locale Kit |
| 60 | #include <Catalog.h> |
| 61 | |
| 62 | #undef B_TRANSLATION_CONTEXT |
| 63 | #define B_TRANSLATION_CONTEXT "CortexTransportView" |
59 | 64 | |
60 | 65 | using namespace std; |
61 | 66 | |
… |
… |
public: // BView
|
136 | 141 | // background +++++ |
137 | 142 | |
138 | 143 | // name |
139 | | BString name = g ? g->name() : "(no group)"; |
| 144 | BString name = g ? g->name() : B_TRANSLATE("(no group)"); |
140 | 145 | // +++++ constrain width |
141 | 146 | SetFont(&m_boldFont); |
142 | 147 | DrawString(name.String(), m_namePosition); |
… |
… |
public: // BView
|
149 | 154 | nodeCount << g->countNodes(); |
150 | 155 | else |
151 | 156 | nodeCount << '0'; |
152 | | nodeCount << ((nodeCount == "1") ? " node." : " nodes."); |
| 157 | nodeCount << ((nodeCount == "1") ? B_TRANSLATE(" node.") : B_TRANSLATE(" nodes.")); |
153 | 158 | // +++++ constrain width |
154 | 159 | DrawString(nodeCount.String(), m_nodeCountPosition); |
155 | 160 | |
156 | 161 | // status |
157 | | BString status = "No errors."; |
| 162 | BString status = B_TRANSLATE("No errors."); |
158 | 163 | // +++++ constrain width |
159 | 164 | DrawString(status.String(), m_statusPosition); |
160 | 165 | } |
… |
… |
const int _run_modes = 5;
|
569 | 574 | //}; |
570 | 575 | //const int _time_sources = 2; |
571 | 576 | |
572 | | const char* _region_start_label = "From:"; |
573 | | const char* _region_end_label = "To:"; |
| 577 | const char* _region_start_label = B_TRANSLATE("From:"); |
| 578 | const char* _region_end_label = B_TRANSLATE("To:"); |
574 | 579 | |
575 | 580 | void TransportView::_constructControls() { |
576 | 581 | |
… |
… |
void TransportView::_constructControls() {
|
595 | 600 | m_runModeView = new BMenuField( |
596 | 601 | BRect(), |
597 | 602 | "runModeView", |
598 | | "Run mode:", |
| 603 | B_TRANSLATE("Run mode:"), |
599 | 604 | new BPopUpMenu("runModeMenu")); |
600 | 605 | _populateRunModeMenu( |
601 | 606 | m_runModeView->Menu()); |
… |
… |
void TransportView::_constructControls() {
|
604 | 609 | m_timeSourceView = new BMenuField( |
605 | 610 | BRect(), |
606 | 611 | "timeSourceView", |
607 | | "Time source:", |
| 612 | B_TRANSLATE("Time source:"), |
608 | 613 | new BPopUpMenu("timeSourceMenu")); |
609 | 614 | _populateTimeSourceMenu( |
610 | 615 | m_timeSourceView->Menu()); |
611 | 616 | AddChild(m_timeSourceView); |
612 | 617 | |
613 | 618 | |
614 | | m_fromLabel = new BStringView(BRect(), 0, "Roll from"); |
| 619 | m_fromLabel = new BStringView(BRect(), 0, B_TRANSLATE("Roll from")); |
615 | 620 | AddChild(m_fromLabel); |
616 | 621 | |
617 | 622 | |
… |
… |
void TransportView::_constructControls() {
|
673 | 678 | m_startButton = new BButton( |
674 | 679 | BRect(), |
675 | 680 | "startButton", |
676 | | "Start", |
| 681 | B_TRANSLATE("Start"), |
677 | 682 | m); |
678 | 683 | _addGroupTarget(m_startButton); |
679 | 684 | AddChild(m_startButton); |
… |
… |
void TransportView::_constructControls() {
|
682 | 687 | m_stopButton = new BButton( |
683 | 688 | BRect(), |
684 | 689 | "stopButton", |
685 | | "Stop", |
| 690 | B_TRANSLATE("Stop"), |
686 | 691 | m); |
687 | 692 | _addGroupTarget(m_stopButton); |
688 | 693 | AddChild(m_stopButton); |
… |
… |
void TransportView::_constructControls() {
|
691 | 696 | m_prerollButton = new BButton( |
692 | 697 | BRect(), |
693 | 698 | "prerollButton", |
694 | | "Preroll", |
| 699 | B_TRANSLATE("Preroll"), |
695 | 700 | m); |
696 | 701 | _addGroupTarget(m_prerollButton); |
697 | 702 | AddChild(m_prerollButton); |
… |
… |
void TransportView::_populateTimeSourceMenu(
|
737 | 742 | &dacTimeSource, |
738 | 743 | sizeof(media_node)); |
739 | 744 | i = new BMenuItem( |
740 | | "DAC time source", |
| 745 | B_TRANSLATE("DAC time source"), |
741 | 746 | m); |
742 | 747 | menu->AddItem(i); |
743 | 748 | _addGroupTarget(i); |
… |
… |
void TransportView::_populateTimeSourceMenu(
|
752 | 757 | &systemTimeSource, |
753 | 758 | sizeof(media_node)); |
754 | 759 | i = new BMenuItem( |
755 | | "System clock", |
| 760 | B_TRANSLATE("System clock"), |
756 | 761 | m); |
757 | 762 | menu->AddItem(i); |
758 | 763 | _addGroupTarget(i); |
… |
… |
void TransportView::_updateTransportButtons() {
|
980 | 985 | (runMode == BMediaNode::B_OFFLINE || |
981 | 986 | !m_group->canCycle())) { |
982 | 987 | |
983 | | m_startButton->SetLabel("Roll"); |
| 988 | m_startButton->SetLabel(B_TRANSLATE("Roll")); |
984 | 989 | m_startButton->Message()->what = NodeGroup::M_ROLL; |
985 | 990 | |
986 | 991 | } else { |
987 | | m_startButton->SetLabel("Start"); |
| 992 | m_startButton->SetLabel(B_TRANSLATE("Start")); |
988 | 993 | m_startButton->Message()->what = NodeGroup::M_START; |
989 | 994 | } |
990 | 995 | } |
… |
… |
void TransportView::_updateTimeSource() {
|
1005 | 1010 | BMenu* menu = m_timeSourceView->Menu(); |
1006 | 1011 | ASSERT(menu); |
1007 | 1012 | if(tsNode == media_node::null) { |
1008 | | menu->Superitem()->SetLabel("(none)"); |
| 1013 | menu->Superitem()->SetLabel(B_TRANSLATE("(none)")); |
1009 | 1014 | return; |
1010 | 1015 | } |
1011 | 1016 | |
-
diff --git a/src/apps/cortex/addons/AudioAdapter/AudioAdapterParams.cpp b/src/apps/cortex/addons/AudioAdapter/AudioAdapterParams.cpp
index bdb2d21..21845fa 100644
a
|
b
|
|
33 | 33 | |
34 | 34 | #include "AudioAdapterParams.h" |
35 | 35 | |
| 36 | #include <Catalog.h> |
36 | 37 | #include <Debug.h> |
37 | 38 | #include <ParameterWeb.h> |
38 | 39 | |
| 40 | #undef B_TRANSLATION_CONTEXT |
| 41 | #define B_TRANSLATION_CONTEXT "CortexAudioAdapter" |
| 42 | |
39 | 43 | status_t |
40 | 44 | _AudioAdapterParams::store(int32 parameterID, const void* data, size_t size) |
41 | 45 | { |
… |
… |
status_t _AudioAdapterParams::retrieve(
|
110 | 114 | void _AudioAdapterParams::populateGroup( |
111 | 115 | BParameterGroup* group) { |
112 | 116 | |
113 | | BParameterGroup* inputGroup = group->MakeGroup("Input Format"); |
| 117 | BParameterGroup* inputGroup = group->MakeGroup(B_TRANSLATE("Input Format")); |
114 | 118 | |
115 | 119 | BNullParameter* groupName; |
116 | 120 | BDiscreteParameter* param; |
117 | 121 | |
118 | 122 | groupName = inputGroup->MakeNullParameter( |
119 | | 0, B_MEDIA_NO_TYPE, "Input Format", B_GENERIC); |
| 123 | 0, B_MEDIA_NO_TYPE, B_TRANSLATE("Input Format"), B_GENERIC); |
120 | 124 | |
121 | 125 | param = inputGroup->MakeDiscreteParameter( |
122 | 126 | P_INPUT_FORMAT, |
123 | 127 | B_MEDIA_NO_TYPE, |
124 | | "Sample format:", |
| 128 | B_TRANSLATE("Sample format:"), |
125 | 129 | B_GENERIC); |
126 | 130 | param->AddItem( |
127 | 131 | 0, |
… |
… |
void _AudioAdapterParams::populateGroup(
|
142 | 146 | param = inputGroup->MakeDiscreteParameter( |
143 | 147 | P_INPUT_CHANNEL_COUNT, |
144 | 148 | B_MEDIA_NO_TYPE, |
145 | | "Channels:", |
| 149 | B_TRANSLATE("Channels:"), |
146 | 150 | B_GENERIC); |
147 | 151 | param->AddItem( |
148 | 152 | 0, |
… |
… |
void _AudioAdapterParams::populateGroup(
|
160 | 164 | 8, |
161 | 165 | "8"); |
162 | 166 | |
163 | | BParameterGroup* outputGroup = group->MakeGroup("Output Format"); |
| 167 | BParameterGroup* outputGroup = group->MakeGroup(B_TRANSLATE("Output format")); |
164 | 168 | |
165 | 169 | groupName = outputGroup->MakeNullParameter( |
166 | | 0, B_MEDIA_NO_TYPE, "Output Format", B_GENERIC); |
| 170 | 0, B_MEDIA_NO_TYPE, B_TRANSLATE("Output format"), B_GENERIC); |
167 | 171 | |
168 | 172 | param = outputGroup->MakeDiscreteParameter( |
169 | 173 | P_OUTPUT_FORMAT, |
170 | 174 | B_MEDIA_NO_TYPE, |
171 | | "Sample format:", |
| 175 | B_TRANSLATE("Sample format:"), |
172 | 176 | B_GENERIC); |
173 | 177 | param->AddItem( |
174 | 178 | 0, |
… |
… |
void _AudioAdapterParams::populateGroup(
|
189 | 193 | param = outputGroup->MakeDiscreteParameter( |
190 | 194 | P_OUTPUT_CHANNEL_COUNT, |
191 | 195 | B_MEDIA_NO_TYPE, |
192 | | "Channels:", |
| 196 | B_TRANSLATE("Channels:"), |
193 | 197 | B_GENERIC); |
194 | 198 | param->AddItem( |
195 | 199 | 0, |
-
diff --git a/src/apps/cortex/addons/AudioAdapter/Jamfile b/src/apps/cortex/addons/AudioAdapter/Jamfile
index dff82f0..cee5147 100644
a
|
b
|
Addon cortex_audioadapter.media_addon :
|
21 | 21 | RawBuffer.cpp |
22 | 22 | SoundUtils.cpp |
23 | 23 | |
24 | | : be media $(TARGET_LIBSUPC++) |
| 24 | : be media $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) |
25 | 25 | ; |
-
diff --git a/src/apps/cortex/addons/Flanger/FlangerAddOn.cpp b/src/apps/cortex/addons/Flanger/FlangerAddOn.cpp
index 884a07d..338c8b2 100644
a
|
b
|
|
34 | 34 | |
35 | 35 | #include "FlangerNode.h" |
36 | 36 | #include "FlangerAddOn.h" |
| 37 | #include <Catalog.h> |
37 | 38 | #include <Entry.h> |
38 | 39 | #include <Debug.h> |
39 | 40 | #include <cstring> |
40 | 41 | #include <cstdlib> |
41 | 42 | |
| 43 | #undef B_TRANSLATION_CONTEXT |
| 44 | #define B_TRANSLATION_CONTEXT "CortexAddOnsFlanger" |
| 45 | |
42 | 46 | // instantiation function |
43 | 47 | extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image); |
44 | 48 | extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image) { |
… |
… |
status_t FlangerAddOn::GetFlavorAt(
|
76 | 80 | |
77 | 81 | flavor_info* pInfo = new flavor_info; |
78 | 82 | pInfo->internal_id = n; |
79 | | pInfo->name = (char *)"Flanger"; |
| 83 | pInfo->name = (char *)B_TRANSLATE("Flanger"); |
80 | 84 | pInfo->info = (char *) |
81 | | "An add-on version of FlangerNode.\n" |
82 | | "by Eric Moon (16 June, 1999)"; |
| 85 | B_TRANSLATE("An add-on version of FlangerNode.\n" |
| 86 | "by Eric Moon (16 June, 1999)"); |
83 | 87 | pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE; |
84 | 88 | pInfo->flavor_flags = 0; |
85 | 89 | pInfo->possible_count = 0; |
-
diff --git a/src/apps/cortex/addons/Flanger/FlangerNode.cpp b/src/apps/cortex/addons/Flanger/FlangerNode.cpp
index 157ee1a..9829335 100644
a
|
b
|
|
40 | 40 | #include <Buffer.h> |
41 | 41 | #include <BufferGroup.h> |
42 | 42 | #include <ByteOrder.h> |
| 43 | #include <Catalog.h> |
43 | 44 | #include <Debug.h> |
44 | 45 | #include <ParameterWeb.h> |
45 | 46 | #include <TimeSource.h> |
… |
… |
|
49 | 50 | #include <cstring> |
50 | 51 | #include <cmath> |
51 | 52 | |
| 53 | #undef B_TRANSLATION_CONTEXT |
| 54 | #define B_TRANSLATION_CONTEXT "CortexAddOnsFlanger" |
| 55 | |
52 | 56 | // -------------------------------------------------------- // |
53 | 57 | // local helpers |
54 | 58 | // -------------------------------------------------------- // |
… |
… |
void FlangerNode::NodeRegistered() {
|
245 | 249 | m_input.node = Node(); |
246 | 250 | m_input.source = media_source::null; |
247 | 251 | m_input.format = m_format; |
248 | | strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH); |
| 252 | strncpy(m_input.name, B_TRANSLATE("Audio input"), B_MEDIA_NAME_LENGTH); |
249 | 253 | |
250 | 254 | // init output |
251 | 255 | m_output.source.port = ControlPort(); |
… |
… |
void FlangerNode::NodeRegistered() {
|
253 | 257 | m_output.node = Node(); |
254 | 258 | m_output.destination = media_destination::null; |
255 | 259 | m_output.format = m_format; |
256 | | strncpy(m_output.name, "Mix Output", B_MEDIA_NAME_LENGTH); |
| 260 | strncpy(m_output.name, B_TRANSLATE("Mix output"), B_MEDIA_NAME_LENGTH); |
257 | 261 | |
258 | 262 | // init parameters |
259 | 263 | initParameterValues(); |
… |
… |
void FlangerNode::initParameterValues() {
|
1251 | 1255 | // create and register a parameter web |
1252 | 1256 | void FlangerNode::initParameterWeb() { |
1253 | 1257 | BParameterWeb* pWeb = new BParameterWeb(); |
1254 | | BParameterGroup* pTopGroup = pWeb->MakeGroup("FlangerNode Parameters"); |
| 1258 | BParameterGroup* pTopGroup = pWeb->MakeGroup(B_TRANSLATE("FlangerNode parameters")); |
1255 | 1259 | |
1256 | 1260 | BNullParameter* label; |
1257 | 1261 | BContinuousParameter* value; |
1258 | 1262 | BParameterGroup* g; |
1259 | 1263 | |
1260 | 1264 | // mix ratio |
1261 | | g = pTopGroup->MakeGroup("Mix ratio"); |
| 1265 | g = pTopGroup->MakeGroup(B_TRANSLATE("Mix ratio")); |
1262 | 1266 | label = g->MakeNullParameter( |
1263 | 1267 | P_MIX_RATIO_LABEL, |
1264 | 1268 | B_MEDIA_NO_TYPE, |
1265 | | "Mix ratio", |
| 1269 | B_TRANSLATE("Mix ratio"), |
1266 | 1270 | B_GENERIC); |
1267 | 1271 | |
1268 | 1272 | value = g->MakeContinuousParameter( |
… |
… |
void FlangerNode::initParameterWeb() {
|
1274 | 1278 | value->AddInput(label); |
1275 | 1279 | |
1276 | 1280 | // sweep rate |
1277 | | g = pTopGroup->MakeGroup("Sweep rate"); |
| 1281 | g = pTopGroup->MakeGroup(B_TRANSLATE("Sweep rate")); |
1278 | 1282 | label = g->MakeNullParameter( |
1279 | 1283 | P_SWEEP_RATE_LABEL, |
1280 | 1284 | B_MEDIA_NO_TYPE, |
1281 | | "Sweep rate", |
| 1285 | B_TRANSLATE("Sweep rate"), |
1282 | 1286 | B_GENERIC); |
1283 | 1287 | |
1284 | 1288 | value = g->MakeContinuousParameter( |
… |
… |
void FlangerNode::initParameterWeb() {
|
1290 | 1294 | value->AddInput(label); |
1291 | 1295 | |
1292 | 1296 | // sweep range: minimum delay |
1293 | | g = pTopGroup->MakeGroup("Delay"); |
| 1297 | g = pTopGroup->MakeGroup(B_TRANSLATE("Delay")); |
1294 | 1298 | label = g->MakeNullParameter( |
1295 | 1299 | P_DELAY_LABEL, |
1296 | 1300 | B_MEDIA_NO_TYPE, |
1297 | | "Delay", |
| 1301 | B_TRANSLATE("Delay"), |
1298 | 1302 | B_GENERIC); |
1299 | 1303 | |
1300 | 1304 | value = g->MakeContinuousParameter( |
… |
… |
void FlangerNode::initParameterWeb() {
|
1306 | 1310 | value->AddInput(label); |
1307 | 1311 | |
1308 | 1312 | // sweep range: maximum |
1309 | | g = pTopGroup->MakeGroup("Depth"); |
| 1313 | g = pTopGroup->MakeGroup(B_TRANSLATE("Depth")); |
1310 | 1314 | label = g->MakeNullParameter( |
1311 | 1315 | P_DEPTH_LABEL, |
1312 | 1316 | B_MEDIA_NO_TYPE, |
1313 | | "Depth", |
| 1317 | B_TRANSLATE("Depth"), |
1314 | 1318 | B_GENERIC); |
1315 | 1319 | |
1316 | 1320 | value = g->MakeContinuousParameter( |
… |
… |
void FlangerNode::initParameterWeb() {
|
1322 | 1326 | value->AddInput(label); |
1323 | 1327 | |
1324 | 1328 | // feedback |
1325 | | g = pTopGroup->MakeGroup("Feedback"); |
| 1329 | g = pTopGroup->MakeGroup(B_TRANSLATE("Feedback")); |
1326 | 1330 | label = g->MakeNullParameter( |
1327 | 1331 | P_FEEDBACK_LABEL, |
1328 | 1332 | B_MEDIA_NO_TYPE, |
1329 | | "Feedback", |
| 1333 | B_TRANSLATE("Feedback"), |
1330 | 1334 | B_GENERIC); |
1331 | 1335 | |
1332 | 1336 | value = g->MakeContinuousParameter( |
-
diff --git a/src/apps/cortex/addons/Flanger/Jamfile b/src/apps/cortex/addons/Flanger/Jamfile
index e1e3896..abe5f34 100644
a
|
b
|
Addon cortex_flanger.media_addon :
|
10 | 10 | MediaNodeControlApp.cpp |
11 | 11 | RawBuffer.cpp |
12 | 12 | SoundUtils.cpp |
13 | | : be media $(TARGET_LIBSUPC++) |
| 13 | : be media $(TARGET_LIBSUPC++) $(HAIKU_LOCALE_LIBS) |
14 | 14 | : Resource.rsrc |
15 | 15 | ; |
-
diff --git a/src/apps/cortex/addons/LoggingConsumer/Jamfile b/src/apps/cortex/addons/LoggingConsumer/Jamfile
index 1fa2834..e6cfed7 100644
a
|
b
|
Application cortex_logging_consumer.media_addon :
|
11 | 11 | NodeHarnessWin.cpp |
12 | 12 | LogWriter.cpp |
13 | 13 | LoggingConsumer.cpp |
14 | | : be media |
| 14 | : be media $(HAIKU_LOCALE_LIBS) |
15 | 15 | ; |
-
diff --git a/src/apps/cortex/addons/LoggingConsumer/LoggingConsumer.cpp b/src/apps/cortex/addons/LoggingConsumer/LoggingConsumer.cpp
index 5d67863..a860f30 100644
a
|
b
|
|
43 | 43 | #include <string.h> |
44 | 44 | |
45 | 45 | // e.moon [11jun99] |
| 46 | #include <Catalog.h> |
46 | 47 | #include <Debug.h> |
47 | 48 | |
| 49 | #undef B_TRANSLATION_CONTEXT |
| 50 | #define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumer" |
| 51 | |
48 | 52 | // id's of the node's BParameters |
49 | 53 | const int32 INPUT_NULL_PARAM = 1; |
50 | 54 | const int32 LATENCY_PARAM = 2; |
… |
… |
static BParameterWeb* build_parameter_web()
|
59 | 63 | { |
60 | 64 | BParameterWeb* web = new BParameterWeb; |
61 | 65 | |
62 | | BParameterGroup* mainGroup = web->MakeGroup("LoggingConsumer Parameters"); |
63 | | BParameterGroup* group = mainGroup->MakeGroup("Latency control"); |
64 | | BParameter* nullParam = group->MakeNullParameter(INPUT_NULL_PARAM, B_MEDIA_NO_TYPE, "Latency", B_GENERIC); |
| 66 | BParameterGroup* mainGroup = web->MakeGroup(B_TRANSLATE("LoggingConsumer Parameters")); |
| 67 | BParameterGroup* group = mainGroup->MakeGroup(B_TRANSLATE("Latency control")); |
| 68 | BParameter* nullParam = group->MakeNullParameter(INPUT_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Latency"), B_GENERIC); |
65 | 69 | BParameter* latencyParam = group->MakeContinuousParameter(LATENCY_PARAM, B_MEDIA_NO_TYPE, "", |
66 | 70 | B_GAIN, "ms", 5, 100, 5); |
67 | 71 | nullParam->AddOutput(latencyParam); |
68 | 72 | latencyParam->AddInput(nullParam); |
69 | 73 | |
70 | | group = mainGroup->MakeGroup("CPU percentage"); |
71 | | nullParam = group->MakeNullParameter(CPU_NULL_PARAM, B_MEDIA_NO_TYPE, "CPU spin percentage", B_GENERIC); |
| 74 | group = mainGroup->MakeGroup(B_TRANSLATE("CPU percentage")); |
| 75 | nullParam = group->MakeNullParameter(CPU_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("CPU spin percentage"), B_GENERIC); |
72 | 76 | BContinuousParameter* cpuParam = group->MakeContinuousParameter(CPU_SPIN_PARAM, B_MEDIA_NO_TYPE, "", |
73 | | B_GAIN, "percent", 5, 80, 5); |
| 77 | B_GAIN, B_TRANSLATE("percent"), 5, 80, 5); |
74 | 78 | nullParam->AddOutput(cpuParam); |
75 | 79 | cpuParam->AddInput(nullParam); |
76 | 80 | |
77 | | group = mainGroup->MakeGroup("Priority"); |
78 | | nullParam = group->MakeNullParameter(PRIO_NULL_PARAM, B_MEDIA_NO_TYPE, "Thread priority", B_GENERIC); |
| 81 | group = mainGroup->MakeGroup(B_TRANSLATE("Priority")); |
| 82 | nullParam = group->MakeNullParameter(PRIO_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Thread priority"), B_GENERIC); |
79 | 83 | BDiscreteParameter* prioParam = group->MakeDiscreteParameter(PRIORITY_PARAM, B_MEDIA_NO_TYPE, "", B_GENERIC); |
80 | 84 | prioParam->AddItem(5, "B_LOW_PRIORITY"); |
81 | 85 | prioParam->AddItem(10, "B_NORMAL_PRIORITY"); |
… |
… |
LoggingConsumer::NodeRegistered()
|
521 | 525 | mInput.destination.port = ControlPort(); |
522 | 526 | mInput.destination.id = 0; |
523 | 527 | mInput.node = Node(); |
524 | | strcpy(mInput.name, "Logged input"); |
| 528 | strcpy(mInput.name, B_TRANSLATE("Logged input")); |
525 | 529 | } |
526 | 530 | |
527 | 531 | void |
-
diff --git a/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp b/src/apps/cortex/addons/LoggingConsumer/LoggingConsumerAddOn.cpp
index 38d5a8a..cce480e 100644
a
|
b
|
|
37 | 37 | #include "LoggingConsumerAddOn.h" |
38 | 38 | #include <Entry.h> |
39 | 39 | #include <Debug.h> |
| 40 | #include <Catalog.h> |
40 | 41 | #include <cstring> |
41 | 42 | #include <cstdlib> |
42 | 43 | |
43 | 44 | // logfile path |
44 | 45 | const char* const g_pLogPath = "/tmp/node_log"; |
45 | 46 | |
| 47 | #undef B_TRANSLATION_CONTEXT |
| 48 | #define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumer" |
46 | 49 | |
47 | 50 | // instantiation function |
48 | 51 | extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image) { |
… |
… |
status_t LoggingConsumerAddOn::GetFlavorAt(
|
80 | 83 | |
81 | 84 | flavor_info* pInfo = new flavor_info; |
82 | 85 | pInfo->internal_id = n; |
83 | | pInfo->name = "LoggingConsumer"; |
| 86 | pInfo->name = B_TRANSLATE("LoggingConsumer"); |
84 | 87 | pInfo->info = |
85 | | "An add-on version of the LoggingConsumer node.\n" |
| 88 | B_TRANSLATE("An add-on version of the LoggingConsumer node.\n" |
86 | 89 | "See the Be Developer Newsletter III.18: 5 May, 1999\n" |
87 | | "adapted by Eric Moon (4 June, 1999)"; |
| 90 | "adapted by Eric Moon (4 June, 1999)"); |
88 | 91 | pInfo->kinds = B_BUFFER_CONSUMER | B_CONTROLLABLE; |
89 | 92 | pInfo->flavor_flags = 0; |
90 | 93 | pInfo->possible_count = 0; |
-
diff --git a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessApp.cpp b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessApp.cpp
index 09a53d0..29c6d63 100644
a
|
b
|
|
35 | 35 | #include "NodeHarnessApp.h" |
36 | 36 | #include "NodeHarnessWin.h" |
37 | 37 | |
| 38 | #include <Catalog.h> |
| 39 | |
| 40 | #undef B_TRANSLATION_CONTEXT |
| 41 | #define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumers" |
| 42 | |
38 | 43 | NodeHarnessApp::NodeHarnessApp(const char *signature) |
39 | 44 | : BApplication(signature) |
40 | 45 | { |
… |
… |
NodeHarnessApp::NodeHarnessApp(const char *signature)
|
43 | 48 | void |
44 | 49 | NodeHarnessApp::ReadyToRun() |
45 | 50 | { |
46 | | BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), "NodeLogger"); |
| 51 | BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), B_TRANSLATE("NodeLogger")); |
47 | 52 | win->Show(); |
48 | 53 | } |
-
diff --git a/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp b/src/apps/cortex/addons/LoggingConsumer/NodeHarnessWin.cpp
index df486b6..f633bce 100644
a
|
b
|
|
44 | 44 | #include <media/MediaTheme.h> |
45 | 45 | #include <stdio.h> |
46 | 46 | |
| 47 | #include <Catalog.h> |
| 48 | |
| 49 | #undef B_TRANSLATION_CONTEXT |
| 50 | #define B_TRANSLATION_CONTEXT "CortexAddOnsLoggingConsumer" |
| 51 | |
47 | 52 | const int32 BUTTON_CONNECT = 'Cnct'; |
48 | 53 | const int32 BUTTON_START = 'Strt'; |
49 | 54 | const int32 BUTTON_STOP = 'Stop'; |
… |
… |
NodeHarnessWin::NodeHarnessWin(BRect frame, const char *title)
|
69 | 74 | { |
70 | 75 | // build the UI |
71 | 76 | BRect r(10, 10, 100, 40); |
72 | | mConnectButton = new BButton(r, "Connect", "Connect", new BMessage(BUTTON_CONNECT)); |
| 77 | mConnectButton = new BButton(r, "Connect", B_TRANSLATE("Connect"), new BMessage(BUTTON_CONNECT)); |
73 | 78 | mConnectButton->SetEnabled(true); |
74 | 79 | AddChild(mConnectButton); |
75 | 80 | r.OffsetBy(0, 40); |
76 | | mStartButton = new BButton(r, "Start", "Start", new BMessage(BUTTON_START)); |
| 81 | mStartButton = new BButton(r, "Start", B_TRANSLATE("Start"), new BMessage(BUTTON_START)); |
77 | 82 | mStartButton->SetEnabled(false); |
78 | 83 | AddChild(mStartButton); |
79 | 84 | r.OffsetBy(0, 40); |
80 | | mStopButton = new BButton(r, "Stop", "Stop", new BMessage(BUTTON_STOP)); |
| 85 | mStopButton = new BButton(r, "Stop", B_TRANSLATE("Stop"), new BMessage(BUTTON_STOP)); |
81 | 86 | mStopButton->SetEnabled(false); |
82 | 87 | AddChild(mStopButton); |
83 | 88 | } |
… |
… |
NodeHarnessWin::MessageReceived(BMessage *msg)
|
159 | 164 | BParameterWeb* web; |
160 | 165 | r->GetParameterWebFor(mConnection.consumer, &web); |
161 | 166 | BView* view = BMediaTheme::ViewFor(web); |
162 | | BWindow* win = new BWindow(BRect(250, 200, 300, 300), "Controls", |
| 167 | BWindow* win = new BWindow(BRect(250, 200, 300, 300), B_TRANSLATE("Controls"), |
163 | 168 | B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS); |
164 | 169 | win->AddChild(view); |
165 | 170 | win->ResizeTo(view->Bounds().Width(), view->Bounds().Height()); |
-
diff --git a/src/apps/cortex/addons/NullFilter/NullFilterAddOn.cpp b/src/apps/cortex/addons/NullFilter/NullFilterAddOn.cpp
index e1e8c32..f45304c 100644
a
|
b
|
|
38 | 38 | |
39 | 39 | #include <Entry.h> |
40 | 40 | #include <Debug.h> |
| 41 | #include <Catalog.h> |
41 | 42 | #include <cstring> |
42 | 43 | #include <cstdlib> |
43 | 44 | |
| 45 | #undef B_TRANSLATION_CONTEXT |
| 46 | #define B_TRANSLATION_CONTEXT "CortexAddOnsNullFilter" |
| 47 | |
44 | 48 | // -------------------------------------------------------- // |
45 | 49 | // _NullFilterNode |
46 | 50 | // -------------------------------------------------------- // |
… |
… |
status_t NullFilterAddOn::GetFlavorAt(
|
119 | 123 | |
120 | 124 | flavor_info* pInfo = new flavor_info; |
121 | 125 | pInfo->internal_id = n; |
122 | | pInfo->name = "NullFilter"; |
| 126 | pInfo->name = B_TRANSLATE("NullFilter"); |
123 | 127 | pInfo->info = |
124 | | "NullFilter (empty test filter).\n" |
125 | | "by Eric Moon (8 September 1999)"; |
| 128 | B_TRANSLATE("NullFilter (empty test filter).\n" |
| 129 | "by Eric Moon (8 September 1999)"); |
126 | 130 | pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE; |
127 | 131 | pInfo->flavor_flags = 0; |
128 | 132 | pInfo->possible_count = 0; |
… |
… |
status_t NullFilterAddOn::GetConfigurationFor(
|
163 | 167 | } |
164 | 168 | |
165 | 169 | |
166 | | // END -- NullFilterAddOn.cpp -- |
167 | | No newline at end of file |
| 170 | // END -- NullFilterAddOn.cpp -- |
-
diff --git a/src/apps/cortex/addons/ToneProducer/NodeHarnessApp.cpp b/src/apps/cortex/addons/ToneProducer/NodeHarnessApp.cpp
index 21af8f8..c9a9cbf 100644
a
|
b
|
|
33 | 33 | #include "NodeHarnessApp.h" |
34 | 34 | #include "NodeHarnessWin.h" |
35 | 35 | |
| 36 | #include <Catalog.h> |
| 37 | |
| 38 | #undef B_TRANSLATION_CONTEXT |
| 39 | #define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer" |
| 40 | |
36 | 41 | NodeHarnessApp::NodeHarnessApp(const char *signature) |
37 | 42 | : BApplication(signature) |
38 | 43 | { |
… |
… |
NodeHarnessApp::NodeHarnessApp(const char *signature)
|
41 | 46 | void |
42 | 47 | NodeHarnessApp::ReadyToRun() |
43 | 48 | { |
44 | | BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), "ToneProducer"); |
| 49 | BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), B_TRANSLATE("ToneProducer")); |
45 | 50 | win->Show(); |
46 | 51 | } |
-
diff --git a/src/apps/cortex/addons/ToneProducer/NodeHarnessWin.cpp b/src/apps/cortex/addons/ToneProducer/NodeHarnessWin.cpp
index f27fc58..7d827a2 100644
a
|
b
|
|
41 | 41 | #include <media/MediaTheme.h> |
42 | 42 | #include <stdio.h> |
43 | 43 | |
| 44 | #include <Catalog.h> |
| 45 | |
| 46 | #undef B_TRANSLATION_CONTEXT |
| 47 | #define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer" |
| 48 | |
44 | 49 | const int32 BUTTON_CONNECT = 'Cnct'; |
45 | 50 | const int32 BUTTON_START = 'Strt'; |
46 | 51 | const int32 BUTTON_STOP = 'Stop'; |
… |
… |
NodeHarnessWin::NodeHarnessWin(BRect frame, const char *title)
|
66 | 71 | { |
67 | 72 | // build the UI |
68 | 73 | BRect r(10, 10, 100, 40); |
69 | | mConnectButton = new BButton(r, "Connect", "Connect", new BMessage(BUTTON_CONNECT)); |
| 74 | mConnectButton = new BButton(r, "Connect", B_TRANSLATE("Connect"), new BMessage(BUTTON_CONNECT)); |
70 | 75 | mConnectButton->SetEnabled(true); |
71 | 76 | AddChild(mConnectButton); |
72 | 77 | r.OffsetBy(0, 40); |
73 | | mStartButton = new BButton(r, "Start", "Start", new BMessage(BUTTON_START)); |
| 78 | mStartButton = new BButton(r, "Start", B_TRANSLATE("Start"), new BMessage(BUTTON_START)); |
74 | 79 | mStartButton->SetEnabled(false); |
75 | 80 | AddChild(mStartButton); |
76 | 81 | r.OffsetBy(0, 40); |
77 | | mStopButton = new BButton(r, "Stop", "Stop", new BMessage(BUTTON_STOP)); |
| 82 | mStopButton = new BButton(r, "Stop", B_TRANSLATE("Stop"), new BMessage(BUTTON_STOP)); |
78 | 83 | mStopButton->SetEnabled(false); |
79 | 84 | AddChild(mStopButton); |
80 | 85 | |
-
diff --git a/src/apps/cortex/addons/ToneProducer/ToneProducer.cpp b/src/apps/cortex/addons/ToneProducer/ToneProducer.cpp
index 4f8445a..6e7545c 100644
a
|
b
|
|
49 | 49 | #include <math.h> |
50 | 50 | |
51 | 51 | #include <Messenger.h> |
| 52 | #include <Catalog.h> |
| 53 | |
| 54 | #undef B_TRANSLATION_CONTEXT |
| 55 | #define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer" |
52 | 56 | |
53 | 57 | #include <Debug.h> |
54 | 58 | #if DEBUG |
… |
… |
ToneProducer::ToneProducer(BMediaAddOn* pAddOn)
|
118 | 122 | mOutput.source.port = ControlPort(); |
119 | 123 | mOutput.source.id = 0; |
120 | 124 | mOutput.node = Node(); |
121 | | ::strcpy(mOutput.name, "ToneProducer Output"); |
| 125 | ::strcpy(mOutput.name, B_TRANSLATE("ToneProducer output")); |
122 | 126 | } |
123 | 127 | |
124 | 128 | ToneProducer::~ToneProducer() |
… |
… |
static BParameterWeb* make_parameter_web()
|
1063 | 1067 | FPRINTF(stderr, "make_parameter_web() called\n"); |
1064 | 1068 | |
1065 | 1069 | BParameterWeb* web = new BParameterWeb; |
1066 | | BParameterGroup* mainGroup = web->MakeGroup("Tone Generator Parameters"); |
| 1070 | BParameterGroup* mainGroup = web->MakeGroup(B_TRANSLATE("Tone generator parameters")); |
1067 | 1071 | |
1068 | | BParameterGroup* group = mainGroup->MakeGroup("Frequency"); |
1069 | | BParameter* nullParam = group->MakeNullParameter(FREQUENCY_NULL_PARAM, B_MEDIA_NO_TYPE, "Frequency", B_GENERIC); |
| 1072 | BParameterGroup* group = mainGroup->MakeGroup(B_TRANSLATE("Frequency")); |
| 1073 | BParameter* nullParam = group->MakeNullParameter(FREQUENCY_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Frequency"), B_GENERIC); |
1070 | 1074 | BContinuousParameter* param = group->MakeContinuousParameter(FREQUENCY_PARAM, B_MEDIA_NO_TYPE, "", B_GAIN, "Hz", 0, 2500, 0.1); |
1071 | 1075 | nullParam->AddOutput(param); |
1072 | 1076 | param->AddInput(nullParam); |
1073 | 1077 | |
1074 | | group = mainGroup->MakeGroup("Amplitude"); |
1075 | | nullParam = group->MakeNullParameter(GAIN_NULL_PARAM, B_MEDIA_NO_TYPE, "Amplitude", B_GENERIC); |
| 1078 | group = mainGroup->MakeGroup(B_TRANSLATE("Amplitude")); |
| 1079 | nullParam = group->MakeNullParameter(GAIN_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Amplitude"), B_GENERIC); |
1076 | 1080 | param = group->MakeContinuousParameter(GAIN_PARAM, B_MEDIA_NO_TYPE, "", B_GAIN, "", 0, 1, 0.01); |
1077 | 1081 | nullParam->AddOutput(param); |
1078 | 1082 | param->AddInput(nullParam); |
1079 | 1083 | |
1080 | | group = mainGroup->MakeGroup("Waveform"); |
1081 | | nullParam = group->MakeNullParameter(WAVEFORM_NULL_PARAM, B_MEDIA_NO_TYPE, "Waveform", B_GENERIC); |
| 1084 | group = mainGroup->MakeGroup(B_TRANSLATE("Waveform")); |
| 1085 | nullParam = group->MakeNullParameter(WAVEFORM_NULL_PARAM, B_MEDIA_NO_TYPE, B_TRANSLATE("Waveform"), B_GENERIC); |
1082 | 1086 | BDiscreteParameter* waveParam = group->MakeDiscreteParameter(WAVEFORM_PARAM, B_MEDIA_NO_TYPE, "", B_GENERIC); |
1083 | | waveParam->AddItem(SINE_WAVE, "Sine wave"); |
1084 | | waveParam->AddItem(TRIANGLE_WAVE, "Triangle"); |
1085 | | waveParam->AddItem(SAWTOOTH_WAVE, "Sawtooth"); |
| 1087 | waveParam->AddItem(SINE_WAVE, B_TRANSLATE("Sine wave")); |
| 1088 | waveParam->AddItem(TRIANGLE_WAVE, B_TRANSLATE"Triangle")); |
| 1089 | waveParam->AddItem(SAWTOOTH_WAVE, B_TRANSLATE("Sawtooth")); |
1086 | 1090 | nullParam->AddOutput(waveParam); |
1087 | 1091 | waveParam->AddInput(nullParam); |
1088 | 1092 | |
-
diff --git a/src/apps/cortex/addons/ToneProducer/ToneProducerAddOn.cpp b/src/apps/cortex/addons/ToneProducer/ToneProducerAddOn.cpp
index 4a6bd34..599d3cc 100644
a
|
b
|
|
38 | 38 | #include <cstring> |
39 | 39 | #include <cstdlib> |
40 | 40 | |
| 41 | #include <Catalog.h> |
| 42 | |
| 43 | #undef B_TRANSLATION_CONTEXT |
| 44 | #define B_TRANSLATION_CONTEXT "CortexAddOnsToneProducer" |
| 45 | |
41 | 46 | // instantiation function |
42 | 47 | extern "C" _EXPORT BMediaAddOn* make_media_addon(image_id image) { |
43 | 48 | return new ToneProducerAddOn(image); |
… |
… |
status_t ToneProducerAddOn::GetFlavorAt(
|
72 | 77 | |
73 | 78 | flavor_info* pInfo = new flavor_info; |
74 | 79 | pInfo->internal_id = n; |
75 | | pInfo->name = "ToneProducer"; |
| 80 | pInfo->name = B_TRANSLATE("ToneProducer"); |
76 | 81 | pInfo->info = |
77 | | "An add-on version of the ToneProducer node.\n" |
| 82 | B_TRANSLATE("An add-on version of the ToneProducer node.\n" |
78 | 83 | "See the Be Developer Newsletter: 2 June, 1999\n" |
79 | | "adapted by Eric Moon (4 June, 1999)"; |
| 84 | "adapted by Eric Moon (4 June, 1999)"); |
80 | 85 | pInfo->kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE; |
81 | 86 | pInfo->flavor_flags = 0; |
82 | 87 | pInfo->possible_count = 0; |
-
diff --git a/src/apps/cortex/addons/common/AudioFilterNode.cpp b/src/apps/cortex/addons/common/AudioFilterNode.cpp
index 79e413f..56d36db 100644
a
|
b
|
|
42 | 42 | #include <Buffer.h> |
43 | 43 | #include <BufferGroup.h> |
44 | 44 | #include <ByteOrder.h> |
| 45 | #include <Catalog.h> |
45 | 46 | #include <ParameterWeb.h> |
46 | 47 | #include <String.h> |
47 | 48 | #include <TimeSource.h> |
… |
… |
|
52 | 53 | #include <cstring> |
53 | 54 | //#include <cmath> |
54 | 55 | |
| 56 | #undef B_TRANSLATION_CONTEXT |
| 57 | #define B_TRANSLATION_CONTEXT "CortexAddOnsCommon" |
| 58 | |
55 | 59 | // -------------------------------------------------------- // |
56 | 60 | // constants |
57 | 61 | // -------------------------------------------------------- // |
… |
… |
void AudioFilterNode::NodeRegistered() {
|
398 | 402 | err = getRequiredInputFormat(m_input.format); |
399 | 403 | ASSERT(err == B_OK); |
400 | 404 | |
401 | | strncpy(m_input.name, "Audio Input", B_MEDIA_NAME_LENGTH); |
| 405 | strncpy(m_input.name, B_TRANSLATE("Audio input"), B_MEDIA_NAME_LENGTH); |
402 | 406 | |
403 | 407 | // init output |
404 | 408 | m_output.source.port = ControlPort(); |
… |
… |
void AudioFilterNode::NodeRegistered() {
|
410 | 414 | err = getRequiredOutputFormat(m_output.format); |
411 | 415 | ASSERT(err == B_OK); |
412 | 416 | |
413 | | strncpy(m_output.name, "Audio Output", B_MEDIA_NAME_LENGTH); |
| 417 | strncpy(m_output.name, B_TRANSLATE("Audio output"), B_MEDIA_NAME_LENGTH); |
414 | 418 | |
415 | 419 | // init parameters |
416 | 420 | initParameterWeb(); |
… |
… |
void AudioFilterNode::initParameterWeb() {
|
1324 | 1328 | |
1325 | 1329 | BParameterWeb* web = new BParameterWeb(); |
1326 | 1330 | BString groupName = Name(); |
1327 | | groupName << " Parameters"; |
| 1331 | groupName << B_TRANSLATE(" parameters"); |
1328 | 1332 | BParameterGroup* group = web->MakeGroup(groupName.String()); |
1329 | 1333 | m_parameterSet->populateGroup(group); |
1330 | 1334 | |
-
diff --git a/src/apps/cortex/addons/common/MediaNodeControlApp.cpp b/src/apps/cortex/addons/common/MediaNodeControlApp.cpp
index d0326eb..1f8b79c 100644
a
|
b
|
|
40 | 40 | #include <ParameterWeb.h> |
41 | 41 | #include <String.h> |
42 | 42 | #include <Alert.h> |
| 43 | #include <Catalog.h> |
43 | 44 | |
44 | 45 | #include <cstdlib> |
45 | 46 | #include <cstring> |
46 | 47 | #include <cstdio> |
47 | 48 | |
| 49 | #undef B_TRANSLATION_CONTEXT |
| 50 | #define B_TRANSLATION_CONTEXT "CortexAddOnsCommon" |
| 51 | |
48 | 52 | // -------------------------------------------------------- // |
49 | 53 | // ctor/dtor |
50 | 54 | // -------------------------------------------------------- // |
… |
… |
MediaNodeControlApp::MediaNodeControlApp(
|
82 | 86 | if(err < B_OK) { |
83 | 87 | char buffer[512]; |
84 | 88 | sprintf(buffer, |
85 | | "MediaNodeControlApp: couldn't find node (%ld):\n%s\n", |
| 89 | B_TRANSLATE("MediaNodeControlApp: couldn't find node (%ld):\n%s\n"), |
86 | 90 | nodeID, strerror(err)); |
87 | | BAlert* alert = new BAlert("error", buffer, "OK"); |
| 91 | BAlert* alert = new BAlert("error", buffer, B_TRANSLATE("OK")); |
88 | 92 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
89 | 93 | alert->Go(); |
90 | 94 | return; |
… |
… |
MediaNodeControlApp::MediaNodeControlApp(
|
96 | 100 | if(err < B_OK) { |
97 | 101 | char buffer[512]; |
98 | 102 | sprintf(buffer, |
99 | | "MediaNodeControlApp: couldn't get node info (%ld):\n%s\n", |
| 103 | B_TRANSLATE("MediaNodeControlApp: couldn't get node info (%ld):\n%s\n"), |
100 | 104 | nodeID, strerror(err)); |
101 | | BAlert* alert = new BAlert("error", buffer, "OK"); |
| 105 | BAlert* alert = new BAlert("error", buffer, B_TRANSLATE("OK")); |
102 | 106 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
103 | 107 | alert->Go(); |
104 | 108 | return; |
105 | 109 | } |
106 | 110 | |
107 | 111 | BString windowTitle; |
108 | | windowTitle << nInfo.name << '(' << nodeID << ") controls"; |
| 112 | windowTitle << nInfo.name << '(' << nodeID << ") " << B_TRANSLATE("controls"); |
109 | 113 | |
110 | 114 | // get parameter web |
111 | 115 | BParameterWeb* pWeb; |
… |
… |
MediaNodeControlApp::MediaNodeControlApp(
|
113 | 117 | if(err < B_OK) { |
114 | 118 | char buffer[512]; |
115 | 119 | sprintf(buffer, |
116 | | "MediaNodeControlApp: no parameters for node (%ld):\n%s\n", |
| 120 | B_TRANSLATE("MediaNodeControlApp: no parameters for node (%ld):\n%s\n"), |
117 | 121 | nodeID, strerror(err)); |
118 | | BAlert* alert = new BAlert("error", buffer, "OK"); |
| 122 | BAlert* alert = new BAlert("error", buffer, B_TRANSLATE("OK")); |
119 | 123 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |
120 | 124 | alert->Go(); |
121 | 125 | return; |
-
diff --git a/src/apps/cortex/support/Jamfile b/src/apps/cortex/support/Jamfile
index 7ae4a86..4fe4321 100644
a
|
b
|
StaticLibrary cortex_support.a :
|
17 | 17 | observe.cpp |
18 | 18 | SoundUtils.cpp |
19 | 19 | TextControlFloater.cpp |
| 20 | : $(HAIKU_LOCALE_LIBS) |
| 21 | ; |
| 22 | |
| 23 | DoCatalogs Cortex : |
| 24 | application/x-vnd.Cortex.Route |
| 25 | : |
| 26 | MediaString.cpp |
20 | 27 | ; |
-
diff --git a/src/apps/cortex/support/MediaString.cpp b/src/apps/cortex/support/MediaString.cpp
index e156380..ab2bf3c 100644
a
|
b
|
|
37 | 37 | #include <MediaFormats.h> |
38 | 38 | // Support Kit |
39 | 39 | #include <String.h> |
| 40 | // Locale Kit |
| 41 | #include <Catalog.h> |
| 42 | |
| 43 | #undef B_TRANSLATION_CONTEXT |
| 44 | #define B_TRANSLATION_CONTEXT "CortexMediaString" |
40 | 45 | |
41 | 46 | __USE_CORTEX_NAMESPACE |
42 | 47 | |
… |
… |
BString MediaString::getStringFor(
|
57 | 62 | |
58 | 63 | if (kinds & B_BUFFER_PRODUCER) { |
59 | 64 | if (first) { |
60 | | list = "Buffer producer"; |
| 65 | list = B_TRANSLATE("Buffer producer"); |
61 | 66 | first = false; |
62 | 67 | } |
63 | 68 | } |
64 | 69 | if (kinds & B_BUFFER_CONSUMER) { |
65 | 70 | if (first) { |
66 | | list = "Buffer consumer"; |
| 71 | list = B_TRANSLATE("Buffer consumer"); |
67 | 72 | first = false; |
68 | 73 | } |
69 | 74 | else { |
70 | 75 | if (last != "") |
71 | 76 | list << ", " << last; |
72 | | last = "Buffer consumer"; |
| 77 | last = B_TRANSLATE("Buffer consumer"); |
73 | 78 | } |
74 | 79 | } |
75 | 80 | if (kinds & B_TIME_SOURCE) { |
76 | 81 | if (first) { |
77 | | list = "Time source"; |
| 82 | list = B_TRANSLATE("Time source"); |
78 | 83 | first = false; |
79 | 84 | } |
80 | 85 | else { |
81 | 86 | if (last != "") |
82 | 87 | list << ", " << last; |
83 | | last = "Time source"; |
| 88 | last = B_TRANSLATE("Time source"); |
84 | 89 | } |
85 | 90 | } |
86 | 91 | if (kinds & B_CONTROLLABLE) { |
87 | 92 | if (first) { |
88 | | list = "Controllable"; |
| 93 | list = B_TRANSLATE("Controllable"); |
89 | 94 | first = false; |
90 | 95 | } |
91 | 96 | else { |
92 | 97 | if (last != "") |
93 | 98 | list << ", " << last; |
94 | | last = "Controllable"; |
| 99 | last = B_TRANSLATE("Controllable"); |
95 | 100 | } |
96 | 101 | } |
97 | 102 | if (kinds & B_FILE_INTERFACE) { |
98 | 103 | if (first) { |
99 | | list = "File interface"; |
| 104 | list = B_TRANSLATE("File interface"); |
100 | 105 | first = false; |
101 | 106 | } |
102 | 107 | else { |
103 | 108 | if (last != "") |
104 | 109 | list << ", " << last; |
105 | | last = "File interface"; |
| 110 | last = B_TRANSLATE("File interface"); |
106 | 111 | } |
107 | 112 | } |
108 | 113 | if (kinds & B_ENTITY_INTERFACE) { |
109 | 114 | if (first) { |
110 | | list = "Entity interface"; |
| 115 | list = B_TRANSLATE("Entity interface"); |
111 | 116 | first = false; |
112 | 117 | } |
113 | 118 | else { |
114 | 119 | if (last != "") |
115 | 120 | list << ", " << last; |
116 | | last = "Entity interface"; |
| 121 | last = B_TRANSLATE("Entity interface"); |
117 | 122 | } |
118 | 123 | } |
119 | 124 | if (kinds & B_PHYSICAL_INPUT) { |
120 | 125 | if (first) { |
121 | | list = "Physical input"; |
| 126 | list = B_TRANSLATE("Physical input"); |
122 | 127 | first = false; |
123 | 128 | } |
124 | 129 | else { |
125 | 130 | if (last != "") |
126 | 131 | list << ", " << last; |
127 | | last = "Physical input"; |
| 132 | last = B_TRANSLATE("Physical input"); |
128 | 133 | } |
129 | 134 | } |
130 | 135 | if (kinds & B_PHYSICAL_OUTPUT) { |
131 | 136 | if (first) { |
132 | | list = "Physical output"; |
| 137 | list = B_TRANSLATE("Physical output"); |
133 | 138 | first = false; |
134 | 139 | } |
135 | 140 | else { |
136 | 141 | if (last != "") |
137 | 142 | list << ", " << last; |
138 | | last = "Physical output"; |
| 143 | last = B_TRANSLATE("Physical output"); |
139 | 144 | } |
140 | 145 | } |
141 | 146 | if (kinds & B_SYSTEM_MIXER) { |
142 | 147 | if (first) { |
143 | | list = "System mixer"; |
| 148 | list = B_TRANSLATE("System mixer"); |
144 | 149 | first = false; |
145 | 150 | } |
146 | 151 | else { |
147 | 152 | if (last != "") |
148 | 153 | list << ", " << last; |
149 | | last = "System mixer"; |
| 154 | last = B_TRANSLATE("System mixer"); |
150 | 155 | } |
151 | 156 | } |
152 | 157 | |
… |
… |
BString MediaString::getStringFor(
|
162 | 167 | D_METHOD(("MediaString::getStringFor(run_mode)\n")); |
163 | 168 | |
164 | 169 | switch (runMode) { |
165 | | case BMediaNode::B_OFFLINE: return "Offline"; |
166 | | case BMediaNode::B_RECORDING: return "Recording"; |
167 | | case BMediaNode::B_DECREASE_PRECISION: return "Decrease precision"; |
168 | | case BMediaNode::B_INCREASE_LATENCY: return "Increase latency"; |
169 | | case BMediaNode::B_DROP_DATA: return "Drop data"; |
170 | | default: return "(unknown run mode)"; |
| 170 | case BMediaNode::B_OFFLINE: return B_TRANSLATE("Offline"); |
| 171 | case BMediaNode::B_RECORDING: return B_TRANSLATE("Recording"); |
| 172 | case BMediaNode::B_DECREASE_PRECISION: return B_TRANSLATE("Decrease precision"); |
| 173 | case BMediaNode::B_INCREASE_LATENCY: return B_TRANSLATE("Increase latency"); |
| 174 | case BMediaNode::B_DROP_DATA: return B_TRANSLATE("Drop data"); |
| 175 | default: return B_TRANSLATE("(unknown run mode)"); |
171 | 176 | } |
172 | 177 | } |
173 | 178 | |
… |
… |
BString MediaString::getStringFor(
|
181 | 186 | D_METHOD(("MediaString::getStringFor(media_type)\n")); |
182 | 187 | |
183 | 188 | switch (type) { |
184 | | case B_MEDIA_NO_TYPE: return "Typeless media"; |
185 | | case B_MEDIA_UNKNOWN_TYPE: return "Unknown media type"; |
186 | | case B_MEDIA_RAW_AUDIO: return "Raw audio"; |
187 | | case B_MEDIA_RAW_VIDEO: return "Raw video"; |
188 | | case B_MEDIA_VBL: return "Raw data from VBL area"; |
189 | | case B_MEDIA_TIMECODE: return "Timecode"; |
190 | | case B_MEDIA_MIDI: return "MIDI"; |
191 | | case B_MEDIA_TEXT: return "Text"; |
192 | | case B_MEDIA_HTML: return "HTML"; |
193 | | case B_MEDIA_MULTISTREAM: return "Multistream media"; |
194 | | case B_MEDIA_PARAMETERS: return "Parameters"; |
195 | | case B_MEDIA_ENCODED_AUDIO: return "Encoded audio"; |
196 | | case B_MEDIA_ENCODED_VIDEO: return "Encoded video"; |
| 189 | case B_MEDIA_NO_TYPE: return B_TRANSLATE("Typeless media"); |
| 190 | case B_MEDIA_UNKNOWN_TYPE: return B_TRANSLATE("Unknown media type"); |
| 191 | case B_MEDIA_RAW_AUDIO: return B_TRANSLATE("Raw audio"); |
| 192 | case B_MEDIA_RAW_VIDEO: return B_TRANSLATE("Raw video"); |
| 193 | case B_MEDIA_VBL: return B_TRANSLATE("Raw data from VBL area"); |
| 194 | case B_MEDIA_TIMECODE: return B_TRANSLATE("Timecode"); |
| 195 | case B_MEDIA_MIDI: return B_TRANSLATE("MIDI"); |
| 196 | case B_MEDIA_TEXT: return B_TRANSLATE("Text"); |
| 197 | case B_MEDIA_HTML: return B_TRANSLATE("HTML"); |
| 198 | case B_MEDIA_MULTISTREAM: return B_TRANSLATE("Multistream media"); |
| 199 | case B_MEDIA_PARAMETERS: return B_TRANSLATE("Parameters"); |
| 200 | case B_MEDIA_ENCODED_AUDIO: return B_TRANSLATE("Encoded audio"); |
| 201 | case B_MEDIA_ENCODED_VIDEO: return B_TRANSLATE("Encoded video"); |
197 | 202 | default: { |
198 | 203 | if (type >= B_MEDIA_FIRST_USER_TYPE) |
199 | | return "User-defined media type"; |
| 204 | return B_TRANSLATE("User-defined media type"); |
200 | 205 | if (type >= B_MEDIA_PRIVATE) |
201 | | return "Private Be media type"; |
| 206 | return B_TRANSLATE("Private Be media type"); |
202 | 207 | } |
203 | 208 | } |
204 | | return "Unknown Media Type"; |
| 209 | return B_TRANSLATE("Unknown media type"); |
205 | 210 | } |
206 | 211 | |
207 | 212 | BString MediaString::getStringFor( |
… |
… |
BString MediaString::getStringFor(
|
210 | 215 | D_METHOD(("MediaString::getStringFor(media_format_family)\n")); |
211 | 216 | |
212 | 217 | switch (family) { |
213 | | case B_ANY_FORMAT_FAMILY: return "Any format family"; |
214 | | case B_BEOS_FORMAT_FAMILY: return "BeOS format family"; |
215 | | case B_QUICKTIME_FORMAT_FAMILY: return "QuickTime format family"; |
216 | | case B_AVI_FORMAT_FAMILY: return "AVI format family"; |
217 | | case B_ASF_FORMAT_FAMILY: return "ASF format family"; |
218 | | case B_MPEG_FORMAT_FAMILY: return "MPEG format family"; |
219 | | case B_WAV_FORMAT_FAMILY: return "WAV format family"; |
220 | | case B_AIFF_FORMAT_FAMILY: return "AIFF format family"; |
221 | | default: return "Miscellaneous format family"; |
| 218 | case B_ANY_FORMAT_FAMILY: return B_TRANSLATE("Any format family"); |
| 219 | case B_BEOS_FORMAT_FAMILY: return B_TRANSLATE("BeOS format family"); |
| 220 | case B_QUICKTIME_FORMAT_FAMILY: return B_TRANSLATE("QuickTime format family"); |
| 221 | case B_AVI_FORMAT_FAMILY: return B_TRANSLATE("AVI format family"); |
| 222 | case B_ASF_FORMAT_FAMILY: return B_TRANSLATE("ASF format family"); |
| 223 | case B_MPEG_FORMAT_FAMILY: return B_TRANSLATE("MPEG format family"); |
| 224 | case B_WAV_FORMAT_FAMILY: return B_TRANSLATE("WAV format family"); |
| 225 | case B_AIFF_FORMAT_FAMILY: return B_TRANSLATE("AIFF format family"); |
| 226 | default: return B_TRANSLATE("Miscellaneous format family"); |
222 | 227 | } |
223 | 228 | } |
224 | 229 | |
… |
… |
BString MediaString::getStringFor(
|
488 | 493 | BString s; |
489 | 494 | if ((source.port != media_source::null.port) |
490 | 495 | && (source.id != media_source::null.id)) { |
491 | | s << "Port " << source.port << ", ID " << source.id; |
| 496 | s << B_TRANSLATE("Port ") << source.port << B_TRANSLATE(", ID ") << source.id; |
492 | 497 | } |
493 | 498 | else { |
494 | | s = "(none)"; |
| 499 | s = B_TRANSLATE("(none)"); |
495 | 500 | } |
496 | 501 | return s; |
497 | 502 | } |
… |
… |
BString MediaString::getStringFor(
|
504 | 509 | BString s; |
505 | 510 | if ((destination.port != media_destination::null.port) |
506 | 511 | && (destination.id != media_destination::null.id)) { |
507 | | s << "Port " << destination.port << ", ID " << destination.id; |
| 512 | s << B_TRANSLATE("Port ") << destination.port << B_TRANSLATE(", ID ") << destination.id; |
508 | 513 | } |
509 | 514 | else { |
510 | | s = "(none)"; |
| 515 | s = B_TRANSLATE("(none)"); |
511 | 516 | } |
512 | 517 | return s; |
513 | 518 | } |
… |
… |
BString MediaString::forAudioFormat(
|
528 | 533 | |
529 | 534 | switch (format) { |
530 | 535 | case media_raw_audio_format::B_AUDIO_UCHAR: { |
531 | | return "8 bit integer"; |
| 536 | return B_TRANSLATE("8 bit integer"); |
532 | 537 | } |
533 | 538 | case media_raw_audio_format::B_AUDIO_SHORT: { |
534 | | return "16 bit integer"; |
| 539 | return B_TRANSLATE("16 bit integer"); |
535 | 540 | } |
536 | 541 | case media_raw_audio_format::B_AUDIO_FLOAT: { |
537 | | return "32 bit float"; |
| 542 | return B_TRANSLATE("32 bit float"); |
538 | 543 | } |
539 | 544 | case media_raw_audio_format::B_AUDIO_INT: { |
540 | 545 | BString s = ""; |
541 | 546 | if (validBits != media_multi_audio_format::wildcard.valid_bits) |
542 | | s << validBits << " bit "; |
| 547 | s << validBits << B_TRANSLATE(" bit "); |
543 | 548 | else |
544 | | s << "32 bit "; |
545 | | s << "integer"; |
| 549 | s << B_TRANSLATE("32 bit "); |
| 550 | s << B_TRANSLATE("integer"); |
546 | 551 | return s; |
547 | 552 | } |
548 | 553 | default: { |
549 | | return "(unknown format)"; |
| 554 | return B_TRANSLATE("(unknown format)"); |
550 | 555 | } |
551 | 556 | } |
552 | 557 | } |
… |
… |
BString MediaString::forAudioChannelCount(
|
576 | 581 | |
577 | 582 | switch (channelCount) { |
578 | 583 | case 1: { |
579 | | return "Mono"; |
| 584 | return B_TRANSLATE("Mono"); |
580 | 585 | } |
581 | 586 | case 2: { |
582 | | return "Stereo"; |
| 587 | return B_TRANSLATE("Stereo"); |
583 | 588 | } |
584 | 589 | default: { |
585 | 590 | BString s = ""; |
586 | | s << channelCount << " Channels"; |
| 591 | s << channelCount << B_TRANSLATE(" channels"); |
587 | 592 | return s; |
588 | 593 | } |
589 | 594 | } |
… |
… |
BString MediaString::forAudioByteOrder(
|
600 | 605 | |
601 | 606 | switch (byteOrder) { |
602 | 607 | case B_MEDIA_BIG_ENDIAN: { |
603 | | return "Big endian"; |
| 608 | return B_TRANSLATE("Big endian"); |
604 | 609 | } |
605 | 610 | case B_MEDIA_LITTLE_ENDIAN: { |
606 | | return "Little endian"; |
| 611 | return B_TRANSLATE("Little endian"); |
607 | 612 | } |
608 | 613 | default: { |
609 | | return "(unknown byte order)"; |
| 614 | return B_TRANSLATE("(unknown byte order)"); |
610 | 615 | } |
611 | 616 | } |
612 | 617 | } |
… |
… |
BString MediaString::forAudioBufferSize(
|
621 | 626 | } |
622 | 627 | |
623 | 628 | BString s = ""; |
624 | | s << bufferSize << " bytes per buffer"; |
| 629 | s << bufferSize << B_TRANSLATE(" bytes per buffer"); |
625 | 630 | return s; |
626 | 631 | } |
627 | 632 | |
… |
… |
BString MediaString::forAudioChannelMask(
|
634 | 639 | |
635 | 640 | if (channelMask & B_CHANNEL_LEFT) { |
636 | 641 | if (first) { |
637 | | list = "Left"; |
| 642 | list = B_TRANSLATE("Left"); |
638 | 643 | first = false; |
639 | 644 | } |
640 | 645 | } |
641 | 646 | if (channelMask & B_CHANNEL_RIGHT) { |
642 | 647 | if (first) { |
643 | | list = "Right"; |
| 648 | list = B_TRANSLATE("Right"); |
644 | 649 | first = false; |
645 | 650 | } |
646 | 651 | else { |
647 | 652 | if (last != "") |
648 | 653 | list << ", " << last; |
649 | | last = "Right"; |
| 654 | last = B_TRANSLATE("Right"); |
650 | 655 | } |
651 | 656 | } |
652 | 657 | if (channelMask & B_CHANNEL_CENTER) { |
653 | 658 | if (first) { |
654 | | list = "Center"; |
| 659 | list = B_TRANSLATE("Center"); |
655 | 660 | first = false; |
656 | 661 | } |
657 | 662 | else { |
658 | 663 | if (last != "") |
659 | 664 | list << ", " << last; |
660 | | last = "Center"; |
| 665 | last = B_TRANSLATE("Center"); |
661 | 666 | } |
662 | 667 | } |
663 | 668 | if (channelMask & B_CHANNEL_SUB) { |
664 | 669 | if (first) { |
665 | | list = "Sub"; |
| 670 | list = B_TRANSLATE("Sub"); |
666 | 671 | first = false; |
667 | 672 | } |
668 | 673 | else { |
669 | 674 | if (last != "") |
670 | 675 | list << ", " << last; |
671 | | last = "Sub"; |
| 676 | last = B_TRANSLATE("Sub"); |
672 | 677 | } |
673 | 678 | } |
674 | 679 | if (channelMask & B_CHANNEL_REARLEFT) { |
675 | 680 | if (first) { |
676 | | list = "Rear-left"; |
| 681 | list = B_TRANSLATE("Rear-left"); |
677 | 682 | first = false; |
678 | 683 | } |
679 | 684 | else { |
680 | 685 | if (last != "") |
681 | 686 | list << ", " << last; |
682 | | last = "Rear-left"; |
| 687 | last = B_TRANSLATE("Rear-left"); |
683 | 688 | } |
684 | 689 | } |
685 | 690 | if (channelMask & B_CHANNEL_REARRIGHT) { |
686 | 691 | if (first) { |
687 | | list = "Rear-right"; |
| 692 | list = B_TRANSLATE("Rear-right"); |
688 | 693 | first = false; |
689 | 694 | } |
690 | 695 | else { |
691 | 696 | if (last != "") |
692 | 697 | list << ", " << last; |
693 | | last = "Rear-right"; |
| 698 | last = B_TRANSLATE("Rear-right"); |
694 | 699 | } |
695 | 700 | } |
696 | 701 | if (channelMask & B_CHANNEL_FRONT_LEFT_CENTER) { |
697 | 702 | if (first) { |
698 | | list = "Front-left-center"; |
| 703 | list = B_TRANSLATE("Front-left-center"); |
699 | 704 | first = false; |
700 | 705 | } |
701 | 706 | else { |
702 | 707 | if (last != "") |
703 | 708 | list << ", " << last; |
704 | | last = "Front-left-center"; |
| 709 | last = B_TRANSLATE("Front-left-center"); |
705 | 710 | } |
706 | 711 | } |
707 | 712 | if (channelMask & B_CHANNEL_FRONT_RIGHT_CENTER) { |
708 | 713 | if (first) { |
709 | | list = "Front-right-center"; |
| 714 | list = B_TRANSLATE("Front-right-center"); |
710 | 715 | first = false; |
711 | 716 | } |
712 | 717 | else { |
713 | 718 | if (last != "") |
714 | 719 | list << ", " << last; |
715 | | last = "Front-right-center"; |
| 720 | last = B_TRANSLATE("Front-right-center"); |
716 | 721 | } |
717 | 722 | } |
718 | 723 | if (channelMask & B_CHANNEL_BACK_CENTER) { |
719 | 724 | if (first) { |
720 | | list = "Back-center"; |
| 725 | list = B_TRANSLATE("Back-center"); |
721 | 726 | first = false; |
722 | 727 | } |
723 | 728 | else { |
724 | 729 | if (last != "") |
725 | 730 | list << ", " << last; |
726 | | last = "Back-center"; |
| 731 | last = B_TRANSLATE("Back-center"); |
727 | 732 | } |
728 | 733 | } |
729 | 734 | if (channelMask & B_CHANNEL_SIDE_LEFT) { |
730 | 735 | if (first) { |
731 | | list = "Side-left"; |
| 736 | list = B_TRANSLATE("Side-left"); |
732 | 737 | first = false; |
733 | 738 | } |
734 | 739 | else { |
735 | 740 | if (last != "") |
736 | 741 | list << ", " << last; |
737 | | last = "Side-left"; |
| 742 | last = B_TRANSLATE("Side-left"); |
738 | 743 | } |
739 | 744 | } |
740 | 745 | if (channelMask & B_CHANNEL_SIDE_RIGHT) { |
741 | 746 | if (first) { |
742 | | list = "Side-right"; |
| 747 | list = B_TRANSLATE("Side-right"); |
743 | 748 | first = false; |
744 | 749 | } |
745 | 750 | else { |
746 | 751 | if (last != "") |
747 | 752 | list << ", " << last; |
748 | | last = "Side-right"; |
| 753 | last = B_TRANSLATE("Side-right"); |
749 | 754 | } |
750 | 755 | } |
751 | 756 | if (channelMask & B_CHANNEL_TOP_CENTER) { |
752 | 757 | if (first) { |
753 | | list = "Top-center"; |
| 758 | list = B_TRANSLATE("Top-center"); |
754 | 759 | first = false; |
755 | 760 | } |
756 | 761 | else { |
757 | 762 | if (last != "") |
758 | 763 | list << ", " << last; |
759 | | last = "Top-center"; |
| 764 | last = B_TRANSLATE("Top-center"); |
760 | 765 | } |
761 | 766 | } |
762 | 767 | if (channelMask & B_CHANNEL_TOP_FRONT_LEFT) { |
763 | 768 | if (first) { |
764 | | list = "Top-Front-left"; |
| 769 | list = B_TRANSLATE("Top-Front-left"); |
765 | 770 | first = false; |
766 | 771 | } |
767 | 772 | else { |
768 | 773 | if (last != "") |
769 | 774 | list << ", " << last; |
770 | | last = "Top-Front-left"; |
| 775 | last = B_TRANSLATE("Top-Front-left"); |
771 | 776 | } |
772 | 777 | } |
773 | 778 | if (channelMask & B_CHANNEL_TOP_FRONT_CENTER) { |
774 | 779 | if (first) { |
775 | | list = "Top-Front-center"; |
| 780 | list = B_TRANSLATE("Top-Front-center"); |
776 | 781 | first = false; |
777 | 782 | } |
778 | 783 | else { |
779 | 784 | if (last != "") |
780 | 785 | list << ", " << last; |
781 | | last = "Top-Front-center"; |
| 786 | last = B_TRANSLATE("Top-Front-center"); |
782 | 787 | } |
783 | 788 | } |
784 | 789 | if (channelMask & B_CHANNEL_TOP_FRONT_RIGHT) { |
785 | 790 | if (first) { |
786 | | list = "Top-Front-right"; |
| 791 | list = B_TRANSLATE("Top-Front-right"); |
787 | 792 | first = false; |
788 | 793 | } |
789 | 794 | else { |
790 | 795 | if (last != "") |
791 | 796 | list << ", " << last; |
792 | | last = "Top-Front-right"; |
| 797 | last = B_TRANSLATE("Top-Front-right"); |
793 | 798 | } |
794 | 799 | } |
795 | 800 | if (channelMask & B_CHANNEL_TOP_BACK_LEFT) { |
796 | 801 | if (first) { |
797 | | list = "Top-Back-left"; |
| 802 | list = B_TRANSLATE("Top-Back-left"); |
798 | 803 | first = false; |
799 | 804 | } |
800 | 805 | else { |
801 | 806 | if (last != "") |
802 | 807 | list << ", " << last; |
803 | | last = "Top-Back-left"; |
| 808 | last = B_TRANSLATE("Top-Back-left"); |
804 | 809 | } |
805 | 810 | } |
806 | 811 | if (channelMask & B_CHANNEL_TOP_BACK_CENTER) { |
807 | 812 | if (first) { |
808 | | list = "Top-Back-center"; |
| 813 | list = B_TRANSLATE("Top-Back-center"); |
809 | 814 | first = false; |
810 | 815 | } |
811 | 816 | else { |
812 | 817 | if (last != "") |
813 | 818 | list << ", " << last; |
814 | | last = "Top-Back-center"; |
| 819 | last = B_TRANSLATE("Top-Back-center"); |
815 | 820 | } |
816 | 821 | } |
817 | 822 | if (channelMask & B_CHANNEL_TOP_BACK_RIGHT) { |
818 | 823 | if (first) { |
819 | | list = "Top-Back-right"; |
| 824 | list = B_TRANSLATE("Top-Back-right"); |
820 | 825 | first = false; |
821 | 826 | } |
822 | 827 | else { |
823 | 828 | if (last != "") |
824 | 829 | list << ", " << last; |
825 | | last = "Top-Back-right"; |
| 830 | last = B_TRANSLATE("Top-Back-right"); |
826 | 831 | } |
827 | 832 | } |
828 | 833 | if (last != "") { |
829 | 834 | list << " & " << last; |
830 | 835 | } |
831 | 836 | if (list == "") { |
832 | | list = "(none)"; |
| 837 | list = B_TRANSLATE("(none)"); |
833 | 838 | } |
834 | 839 | |
835 | 840 | return list; |
… |
… |
BString MediaString::forAudioMatrixMask(
|
840 | 845 | D_METHOD(("MediaString::forAudioMatrixMask()\n")); |
841 | 846 | |
842 | 847 | switch (matrixMask) { |
843 | | case 0: return "(none)"; |
844 | | case B_MATRIX_PROLOGIC_LR: return "ProLogic LR"; |
845 | | case B_MATRIX_AMBISONIC_WXYZ: return "Ambisonic WXYZ"; |
846 | | default: return "(unknown matrix mask)"; |
| 848 | case 0: return B_TRANSLATE("(none)"); |
| 849 | case B_MATRIX_PROLOGIC_LR: return B_TRANSLATE("ProLogic LR"); |
| 850 | case B_MATRIX_AMBISONIC_WXYZ: return B_TRANSLATE("Ambisonic WXYZ"); |
| 851 | default: return B_TRANSLATE("(unknown matrix mask)"); |
847 | 852 | } |
848 | 853 | } |
849 | 854 | |
… |
… |
BString MediaString::forAudioFrameSize(
|
876 | 881 | } |
877 | 882 | |
878 | 883 | BString s = ""; |
879 | | s << frameSize << " bytes per frame"; |
| 884 | s << frameSize << B_TRANSLATE(" bytes per frame"); |
880 | 885 | return s; |
881 | 886 | } |
882 | 887 | |
… |
… |
BString MediaString::forVideoFormat(
|
907 | 912 | case B_RGB15_BIG: return "15 bit RGB"; |
908 | 913 | case B_RGBA15: |
909 | 914 | case B_RGBA15_BIG: return "15 bit RGBA"; |
910 | | case B_CMAP8: return "8 bit color-index"; |
911 | | case B_GRAY8: return "8 bit grayscale-index"; |
912 | | case B_GRAY1: return "Monochrome"; |
| 915 | case B_CMAP8: return B_TRANSLATE("8 bit color-index"); |
| 916 | case B_GRAY8: return B_TRANSLATE("8 bit grayscale-index"); |
| 917 | case B_GRAY1: return B_TRANSLATE("Monochrome"); |
913 | 918 | case B_YUV422: return "YUV422"; |
914 | 919 | case B_YUV411: return "YUV411"; |
915 | 920 | case B_YUV420: return "YUV420"; |
… |
… |
BString MediaString::forVideoFormat(
|
940 | 945 | case B_CMYA32: return "32 bit CMYA"; |
941 | 946 | case B_CMYK32: return "32 bit CMYK"; |
942 | 947 | default: { |
943 | | return "(unknown video format)"; |
| 948 | return B_TRANSLATE("(unknown video format)"); |
944 | 949 | } |
945 | 950 | } |
946 | 951 | } |
… |
… |
BString MediaString::forVideoFieldRate(
|
973 | 978 | |
974 | 979 | BString s = ""; |
975 | 980 | if (interlace == 1) { |
976 | | s << "Non-interlaced "; |
| 981 | s << B_TRANSLATE("Non-interlaced "); |
977 | 982 | } |
978 | 983 | else { |
979 | | s << "Interlaced "; |
| 984 | s << B_TRANSLATE("Interlaced "); |
980 | 985 | } |
981 | 986 | s << fieldRate << " Hz"; |
982 | 987 | if ((fieldRate > 49.9) && (fieldRate < 50.1)) { |
… |
… |
BString MediaString::forVideoOrientation(
|
1001 | 1006 | |
1002 | 1007 | switch (orientation) { |
1003 | 1008 | case B_VIDEO_TOP_LEFT_RIGHT: { |
1004 | | return "Top to bottom, left to right"; |
| 1009 | return B_TRANSLATE("Top to bottom, left to right"); |
1005 | 1010 | } |
1006 | 1011 | case B_VIDEO_BOTTOM_LEFT_RIGHT: { |
1007 | | return "Bottom to top, left to right"; |
| 1012 | return B_TRANSLATE("Bottom to top, left to right"); |
1008 | 1013 | } |
1009 | 1014 | default: { |
1010 | | return "(unkown video orientation)"; |
| 1015 | return B_TRANSLATE("(unkown video orientation)"); |
1011 | 1016 | } |
1012 | 1017 | } |
1013 | 1018 | } |
… |
… |
BString MediaString::forVideoActiveLines(
|
1040 | 1045 | return "*"; |
1041 | 1046 | } |
1042 | 1047 | |
1043 | | BString s = "Video data between"; |
1044 | | s << " line " << firstActive; |
1045 | | s << " and " << lastActive; |
| 1048 | BString s = B_TRANSLATE("Video data between"); |
| 1049 | s << B_TRANSLATE(" line ") << firstActive; |
| 1050 | s << B_TRANSLATE(" and ") << lastActive; |
1046 | 1051 | return s; |
1047 | 1052 | } |
1048 | 1053 | |
… |
… |
BString MediaString::forVideoBytesPerRow(
|
1056 | 1061 | } |
1057 | 1062 | |
1058 | 1063 | BString s = ""; |
1059 | | s << bytesPerRow << " bytes per row"; |
| 1064 | s << bytesPerRow << B_TRANSLATE(" bytes per row"); |
1060 | 1065 | return s; |
1061 | 1066 | } |
1062 | 1067 | |
… |
… |
BString MediaString::forVideoOffset(
|
1068 | 1073 | |
1069 | 1074 | BString s = ""; |
1070 | 1075 | if (pixelOffset != media_video_display_info::wildcard.pixel_offset) { |
1071 | | s << pixelOffset << " pixels"; |
| 1076 | s << pixelOffset << B_TRANSLATE(" pixels"); |
1072 | 1077 | } |
1073 | 1078 | if (lineOffset != media_video_display_info::wildcard.line_offset) { |
1074 | 1079 | if (s != "") { |
1075 | 1080 | s << ", "; |
1076 | 1081 | } |
1077 | | s << pixelOffset << " lines"; |
| 1082 | s << pixelOffset << B_TRANSLATE(" lines"); |
1078 | 1083 | } |
1079 | 1084 | if (s == "") { |
1080 | 1085 | s = "*"; |
… |
… |
BString MediaString::forVideoBitRate(
|
1095 | 1100 | |
1096 | 1101 | BString s = ""; |
1097 | 1102 | if (avgBitRate != media_encoded_video_format::wildcard.avg_bit_rate) { |
1098 | | s << avgBitRate / 1000.0f << " kb/s (avg)"; |
| 1103 | s << avgBitRate / 1000.0f << B_TRANSLATE(" kb/s (avg)"); |
1099 | 1104 | } |
1100 | 1105 | if (maxBitRate != media_encoded_video_format::wildcard.max_bit_rate) { |
1101 | 1106 | if (s != "") { |
1102 | 1107 | s << ", "; |
1103 | 1108 | } |
1104 | | s << maxBitRate / 1000.0f << " kb/s (max)"; |
| 1109 | s << maxBitRate / 1000.0f << B_TRANSLATE(" kb/s (max)"); |
1105 | 1110 | } |
1106 | 1111 | if (s == "") { |
1107 | 1112 | s = "*"; |
… |
… |
BString MediaString::forVideoFrameSize(
|
1119 | 1124 | } |
1120 | 1125 | |
1121 | 1126 | BString s = ""; |
1122 | | s << frameSize << " bytes per frame"; |
| 1127 | s << frameSize << B_TRANSLATE(" bytes per frame"); |
1123 | 1128 | return s; |
1124 | 1129 | } |
1125 | 1130 | |
… |
… |
BString MediaString::forVideoHistory(
|
1131 | 1136 | |
1132 | 1137 | BString s = ""; |
1133 | 1138 | if (forwardHistory != media_encoded_video_format::wildcard.forward_history) { |
1134 | | s << static_cast<int32>(forwardHistory) << " frames forward"; |
| 1139 | s << static_cast<int32>(forwardHistory) << B_TRANSLATE(" frames forward"); |
1135 | 1140 | } |
1136 | 1141 | if (backwardHistory != media_encoded_video_format::wildcard.backward_history) { |
1137 | 1142 | if (s != "") { |
1138 | 1143 | s << ", "; |
1139 | 1144 | } |
1140 | | s << static_cast<int32>(backwardHistory) << " frames backward"; |
| 1145 | s << static_cast<int32>(backwardHistory) << B_TRANSLATE(" frames backward"); |
1141 | 1146 | } |
1142 | 1147 | if (s == "") { |
1143 | 1148 | s = "*"; |
… |
… |
BString MediaString::forMultistreamFormat(
|
1160 | 1165 | } |
1161 | 1166 | |
1162 | 1167 | switch (format) { |
1163 | | case media_multistream_format::B_VID: return "BeOS video"; |
| 1168 | case media_multistream_format::B_VID: return B_TRANSLATE("BeOS video"); |
1164 | 1169 | case media_multistream_format::B_AVI: return "AVI"; |
1165 | 1170 | case media_multistream_format::B_MPEG1: return "MPEG1"; |
1166 | 1171 | case media_multistream_format::B_MPEG2: return "MPEG2"; |
1167 | 1172 | case media_multistream_format::B_QUICKTIME: return "QuickTime"; |
1168 | | default: return "(unknown multistream format)"; |
| 1173 | default: return B_TRANSLATE("(unknown multistream format)"); |
1169 | 1174 | } |
1170 | 1175 | } |
1171 | 1176 | |
… |
… |
BString MediaString::forMultistreamBitRate(
|
1177 | 1182 | |
1178 | 1183 | BString s = ""; |
1179 | 1184 | if (avgBitRate != media_multistream_format::wildcard.avg_bit_rate) { |
1180 | | s << avgBitRate / 1000.0f << " kb/s (avg)"; |
| 1185 | s << avgBitRate / 1000.0f << B_TRANSLATE(" kb/s (avg)"); |
1181 | 1186 | } |
1182 | 1187 | if (maxBitRate != media_multistream_format::wildcard.max_bit_rate) { |
1183 | 1188 | if (s != "") { |
1184 | 1189 | s << ", "; |
1185 | 1190 | } |
1186 | | s << maxBitRate / 1000.0f << " kb/s (max)"; |
| 1191 | s << maxBitRate / 1000.0f << B_TRANSLATE(" kb/s (max)"); |
1187 | 1192 | } |
1188 | 1193 | if (s == "") { |
1189 | 1194 | s = "*"; |
… |
… |
BString MediaString::forMultistreamChunkSize(
|
1199 | 1204 | |
1200 | 1205 | BString s = ""; |
1201 | 1206 | if (avgChunkSize != media_multistream_format::wildcard.avg_chunk_size) { |
1202 | | s << avgChunkSize << " bytes (avg)"; |
| 1207 | s << avgChunkSize << B_TRANSLATE(" bytes (avg)"); |
1203 | 1208 | } |
1204 | 1209 | if (maxChunkSize != media_multistream_format::wildcard.max_chunk_size) { |
1205 | 1210 | if (s != "") { |
1206 | 1211 | s << ", "; |
1207 | 1212 | } |
1208 | | s << maxChunkSize << " bytes (max)"; |
| 1213 | s << maxChunkSize << B_TRANSLATE(" bytes (max)"); |
1209 | 1214 | } |
1210 | 1215 | if (s == "") { |
1211 | 1216 | s = "*"; |
… |
… |
BString MediaString::forMultistreamFlags(
|
1223 | 1228 | |
1224 | 1229 | if (flags & media_multistream_format::B_HEADER_HAS_FLAGS) { |
1225 | 1230 | if (first) { |
1226 | | list = "Header has flags"; |
| 1231 | list = B_TRANSLATE("Header has flags"); |
1227 | 1232 | first = false; |
1228 | 1233 | } |
1229 | 1234 | } |
1230 | 1235 | if (flags & media_multistream_format::B_CLEAN_BUFFERS) { |
1231 | 1236 | if (first) { |
1232 | | list = "Clean buffers"; |
| 1237 | list = B_TRANSLATE("Clean buffers"); |
1233 | 1238 | first = false; |
1234 | 1239 | } |
1235 | 1240 | else { |
1236 | 1241 | if (last != "") |
1237 | 1242 | list << ", " << last; |
1238 | | last = "Clean buffers"; |
| 1243 | last = B_TRANSLATE("Clean buffers"); |
1239 | 1244 | } |
1240 | 1245 | } |
1241 | 1246 | if (flags & media_multistream_format::B_HOMOGENOUS_BUFFERS) { |
1242 | 1247 | if (first) { |
1243 | | list = "Homogenous buffers"; |
| 1248 | list = B_TRANSLATE("Homogenous buffers"); |
1244 | 1249 | first = false; |
1245 | 1250 | } |
1246 | 1251 | else { |
1247 | 1252 | if (last != "") |
1248 | 1253 | list << ", " << last; |
1249 | | last = "Homogenous buffers"; |
| 1254 | last = B_TRANSLATE("Homogenous buffers"); |
1250 | 1255 | } |
1251 | 1256 | } |
1252 | 1257 | |
… |
… |
BString MediaString::forMultistreamFlags(
|
1254 | 1259 | list << " & " << last; |
1255 | 1260 | |
1256 | 1261 | if (list == "") |
1257 | | list = "(none)"; |
| 1262 | list = B_TRANSLATE("(none)"); |
1258 | 1263 | |
1259 | 1264 | return list; |
1260 | 1265 | } |