ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/user_strings.cpp
Revision: 1.1
Committed: 1999-10-03T14:16:25Z (24 years, 7 months ago) by cebix
Branch: MAIN
Branch point for: cebix
Log Message:
Initial revision

File Contents

# Content
1 /*
2 * user_strings.cpp - Localizable strings
3 *
4 * Basilisk II (C) 1997-1999 Christian Bauer
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 /*
22 * NOTES:
23 *
24 * This should only be used for user-interface related messages that must be
25 * translated or transcibed for localized versions of Basilisk.
26 * It should NOT be used for:
27 * - file names
28 * - names of threads, areas, ports, semaphores, drivers, views and other "invisible" names
29 * - debugging messages
30 * - error messages that only go to the shell ("FATAL"/"WARNING", those are really debugging messages)
31 */
32
33 #include "sysdeps.h"
34 #include "user_strings.h"
35
36 #ifdef __BEOS__
37 #define UTF8_ELLIPSIS "\xE2\x80\xA6"
38 #else
39 #define UTF8_ELLIPSIS "..."
40 #endif
41
42
43 struct str_def {
44 int num;
45 char *str;
46 };
47
48
49 // Localized strings
50 #if 0
51 static const str_def loc_strings[] = {
52 {STR_READING_ROM_FILE, "ROM-Datei wird gelesen...\n"},
53 {-1, NULL} // End marker
54 };
55 #else
56 static const str_def loc_strings[] = {
57 {-1, NULL} // End marker
58 };
59 #endif
60
61
62 // Default strings
63 static const str_def default_strings[] = {
64 {STR_ABOUT_TEXT1, "Basilisk II V%d.%d"},
65 {STR_ABOUT_TEXT2, "by Christian Bauer et al."},
66 {STR_READING_ROM_FILE, "Reading ROM file...\n"},
67 {STR_SHELL_ERROR_PREFIX, "ERROR: %s\n"},
68 {STR_GUI_ERROR_PREFIX, "Basilisk II error:\n%s"},
69 {STR_ERROR_ALERT_TITLE, "Basilisk II Error"},
70 {STR_SHELL_WARNING_PREFIX, "WARNING: %s\n"},
71 {STR_GUI_WARNING_PREFIX, "Basilisk II warning:\n%s"},
72 {STR_WARNING_ALERT_TITLE, "Basilisk II Warning"},
73 {STR_NOTICE_ALERT_TITLE, "Basilisk II Notice"},
74 {STR_ABOUT_TITLE, "About Basilisk II"},
75 {STR_OK_BUTTON, "OK"},
76 {STR_START_BUTTON, "Start"},
77 {STR_QUIT_BUTTON, "Quit"},
78 {STR_CANCEL_BUTTON, "Cancel"},
79
80 {STR_NO_MEM_ERR, "Not enough free memory."},
81 {STR_NOT_ENOUGH_MEMORY_ERR, "Your computer does not have enough memory to run Basilisk II."},
82 {STR_NO_RAM_AREA_ERR, "Not enough memory to create RAM area."},
83 {STR_NO_ROM_AREA_ERR, "Not enough memory to create ROM area."},
84 {STR_NO_ROM_FILE_ERR, "Cannot open ROM file."},
85 {STR_ROM_FILE_READ_ERR, "Cannot read ROM file."},
86 {STR_ROM_SIZE_ERR, "Invalid ROM file size. Basilisk II requires a 512K or 1MB MacII ROM."},
87 {STR_UNSUPPORTED_ROM_TYPE_ERR, "Unsupported ROM type."},
88 {STR_OPEN_WINDOW_ERR, "Cannot open Mac window."},
89 {STR_OPEN_SCREEN_ERR, "Cannot open Mac screen."},
90 {STR_SCSI_BUFFER_ERR, "Cannot allocate SCSI buffer (requested %d bytes). Giving up."},
91 {STR_SCSI_SG_FULL_ERR, "SCSI scatter/gather table full. Giving up."},
92
93 {STR_SMALL_RAM_WARN, "Selected less than 1MB Mac RAM, using 1MB."},
94 {STR_CREATE_VOLUME_WARN, "Cannot create hardfile (%s)."},
95
96 {STR_PREFS_TITLE, "Basilisk II Settings"},
97 {STR_PREFS_MENU, "Settings"},
98 {STR_PREFS_ITEM_ABOUT, "About Basilisk II" UTF8_ELLIPSIS},
99 {STR_PREFS_ITEM_START, "Start Basilisk II"},
100 {STR_PREFS_ITEM_ZAP_PRAM, "Zap PRAM File"},
101 {STR_PREFS_ITEM_QUIT, "Quit Basilisk II"},
102 {STR_PREFS_MENU_FILE_GTK, "/_File"},
103 {STR_PREFS_ITEM_START_GTK, "/File/_Start Basilisk II"},
104 {STR_PREFS_ITEM_ZAP_PRAM_GTK, "/File/_Zap PRAM File"},
105 {STR_PREFS_ITEM_SEPL_GTK, "/File/sepl"},
106 {STR_PREFS_ITEM_QUIT_GTK, "/File/_Quit Basilisk II"},
107 {STR_HELP_MENU_GTK, "/_Help"},
108 {STR_HELP_ITEM_ABOUT_GTK, "/Help/_About Basilisk II"},
109
110 {STR_VOLUMES_PANE_TITLE, "Volumes"},
111 {STR_VOLUMES_CTRL, "Mac Volumes"},
112 {STR_ADD_VOLUME_BUTTON, "Add" UTF8_ELLIPSIS},
113 {STR_CREATE_VOLUME_BUTTON, "Create" UTF8_ELLIPSIS},
114 {STR_EDIT_VOLUME_BUTTON, "Edit" UTF8_ELLIPSIS},
115 {STR_REMOVE_VOLUME_BUTTON, "Remove"},
116 {STR_ADD_VOLUME_PANEL_BUTTON, "Add"},
117 {STR_CREATE_VOLUME_PANEL_BUTTON, "Create"},
118 {STR_CDROM_DRIVE_CTRL, "CD-ROM Drive"},
119 {STR_BOOTDRIVER_CTRL, "Boot From"},
120 {STR_BOOT_ANY_LAB, "Any"},
121 {STR_BOOT_CDROM_LAB, "CD-ROM"},
122 {STR_NOCDROM_CTRL, "Disable CD-ROM Driver"},
123 {STR_DEVICE_CTRL, "Device"},
124 {STR_UNIT_CTRL, "Unit"},
125 {STR_ADD_VOLUME_TITLE, "Add Volume"},
126 {STR_CREATE_VOLUME_TITLE, "Create Hardfile"},
127 {STR_EDIT_VOLUME_TITLE, "Edit Volume"},
128 {STR_HARDFILE_SIZE_CTRL, "Size (MB)"},
129 {STR_VOL_READONLY_CTRL, "Read-Only"},
130 {STR_VOL_TYPE_CTRL, "Type"},
131 {STR_VOL_FILE_LAB, "File"},
132 {STR_VOL_DEVICE_LAB, "Device"},
133 {STR_VOL_OPENFLAGS_CTRL, "Open Flags"},
134 {STR_VOL_STARTBLOCK_CTRL, "Start Block"},
135 {STR_VOL_SIZE_CTRL, "Size (Blocks)"},
136 {STR_VOL_BLOCKSIZE_CTRL, "Block Size"},
137 {STR_VOL_FILE_CTRL, "File"},
138
139 {STR_SCSI_PANE_TITLE, "SCSI"},
140 {STR_SCSI_ID_0, "ID 0"},
141 {STR_SCSI_ID_1, "ID 1"},
142 {STR_SCSI_ID_2, "ID 2"},
143 {STR_SCSI_ID_3, "ID 3"},
144 {STR_SCSI_ID_4, "ID 4"},
145 {STR_SCSI_ID_5, "ID 5"},
146 {STR_SCSI_ID_6, "ID 6"},
147
148 {STR_GRAPHICS_SOUND_PANE_TITLE, "Graphics/Sound"},
149 {STR_GRAPHICS_CTRL, "Graphics"},
150 {STR_VIDEO_TYPE_CTRL, "Video Type"},
151 {STR_WINDOW_LAB, "Window"},
152 {STR_FULLSCREEN_LAB, "Fullscreen"},
153 {STR_PIP_LAB, "PIP"},
154 {STR_FRAMESKIP_CTRL, "Window Refresh Rate"},
155 {STR_REF_5HZ_LAB, "5 Hz"},
156 {STR_REF_7_5HZ_LAB, "7.5 Hz"},
157 {STR_REF_10HZ_LAB, "10 Hz"},
158 {STR_REF_15HZ_LAB, "15 Hz"},
159 {STR_REF_30HZ_LAB, "30 Hz"},
160 {STR_REF_60HZ_LAB, "60 Hz"},
161 {STR_DISPLAY_X_CTRL, "Width"},
162 {STR_DISPLAY_Y_CTRL, "Height"},
163 {STR_COLOR_DEPTH_CTRL, "Color Depth"},
164 {STR_1_BIT_LAB, "B/W (1 Bit)"},
165 {STR_2_BIT_LAB, "4 (2 Bit)"},
166 {STR_4_BIT_LAB, "16 (4 Bit)"},
167 {STR_8_BIT_LAB, "256 (8 Bit)"},
168 {STR_15_BIT_LAB, "Thousands (15 Bit)"},
169 {STR_24_BIT_LAB, "Millions (24 Bit)"},
170 {STR_SCREEN_MODE_CTRL, "Screen Mode"},
171 {STR_8_BIT_640x480_LAB, "640x480, 8 Bit"},
172 {STR_8_BIT_800x600_LAB, "800x600, 8 Bit"},
173 {STR_8_BIT_1024x768_LAB, "1024x768, 8 Bit"},
174 {STR_8_BIT_1152x900_LAB, "1152x900, 8 Bit"},
175 {STR_8_BIT_1280x1024_LAB, "1280x1024, 8 Bit"},
176 {STR_8_BIT_1600x1200_LAB, "1600x1200, 8 Bit"},
177 {STR_15_BIT_640x480_LAB, "640x480, 15 Bit"},
178 {STR_15_BIT_800x600_LAB, "800x600, 15 Bit"},
179 {STR_15_BIT_1024x768_LAB, "1024x768, 15 Bit"},
180 {STR_15_BIT_1152x900_LAB, "1152x900, 15 Bit"},
181 {STR_15_BIT_1280x1024_LAB, "1280x1024, 15 Bit"},
182 {STR_15_BIT_1600x1200_LAB, "1600x1200, 15 Bit"},
183 {STR_24_BIT_640x480_LAB, "640x480, 24 Bit"},
184 {STR_24_BIT_800x600_LAB, "800x600, 24 Bit"},
185 {STR_24_BIT_1024x768_LAB, "1024x768, 24 Bit"},
186 {STR_24_BIT_1152x900_LAB, "1152x900, 24 Bit"},
187 {STR_24_BIT_1280x1024_LAB, "1280x1024, 24 Bit"},
188 {STR_24_BIT_1600x1200_LAB, "1600x1200, 24 Bit"},
189 {STR_SOUND_CTRL, "Sound"},
190 {STR_AHI_MODE_CTRL, "AHI Mode"},
191 {STR_NOSOUND_CTRL, "Disable Sound Output"},
192
193 {STR_SERIAL_NETWORK_PANE_TITLE, "Serial/Network"},
194 {STR_SERIALA_CTRL, "Modem Port"},
195 {STR_SERIALB_CTRL, "Printer Port"},
196 {STR_ISPAR_CTRL, "Parallel Device"},
197 {STR_ETHER_ENABLE_CTRL, "Enable Ethernet"},
198 {STR_ETHERNET_IF_CTRL, "Ethernet Interface"},
199
200 {STR_MEMORY_MISC_PANE_TITLE, "Memory/Misc"},
201 {STR_RAMSIZE_SLIDER, "MacOS RAM Size:"},
202 {STR_RAMSIZE_FMT, "%ld MB"},
203 {STR_MODELID_CTRL, "Mac Model ID"},
204 {STR_MODELID_5_LAB, "Mac IIci (MacOS 7.x)"},
205 {STR_MODELID_14_LAB, "Quadra 900 (MacOS 8.x)"},
206 {STR_ROM_FILE_CTRL, "ROM File"},
207 {STR_KEYCODES_CTRL, "Use Raw Keycodes"},
208 {STR_KEYCODE_FILE_CTRL, "Keycode Translation File"},
209
210 {STR_WINDOW_TITLE, "Basilisk II"},
211 {STR_WINDOW_TITLE_FROZEN, "Basilisk II *** FROZEN ***"},
212 {STR_WINDOW_MENU, "Basilisk II"},
213 {STR_WINDOW_ITEM_ABOUT, "About Basilisk II" UTF8_ELLIPSIS},
214 {STR_WINDOW_ITEM_REFRESH, "Refresh Rate"},
215 {STR_WINDOW_ITEM_MOUNT, "Mount"},
216 {STR_SUSPEND_WINDOW_TITLE, "Basilisk II suspended. Press space to reactivate."},
217
218 {STR_NO_SHEEP_DRIVER_ERR, "Cannot open /dev/sheep: %s (%08x). Basilisk II is not properly installed."},
219 {STR_SHEEP_UP_ERR, "Cannot allocate Low Memory Globals: %s (%08x)."},
220 {STR_NO_KERNEL_DATA_ERR, "Cannot create Kernel Data area: %s (%08x)."},
221 {STR_VOLUME_IS_MOUNTED_WARN, "The volume '%s' is mounted under BeOS. Basilisk II will try to unmount it."},
222 {STR_CANNOT_UNMOUNT_WARN, "The volume '%s' could not be unmounted. Basilisk II will not use it."},
223 {STR_NO_NET_ADDON_WARN, "The SheepShaver net server add-on cannot be found. Ethernet will not be available."},
224 {STR_NET_CONFIG_MODIFY_WARN, "To enable Ethernet networking for Basilisk II, your network configuration has to be modified and the network restarted. Do you want this to be done now (selecting \"Cancel\" will disable Ethernet under Basilisk II)?."},
225 {STR_NET_ADDON_INIT_FAILED, "SheepShaver net server add-on found\nbut there seems to be no network hardware.\nPlease check your network preferences."},
226 {STR_NET_ADDON_CLONE_FAILED, "Cloning of the network transfer area failed."},
227
228 {STR_NO_XSERVER_ERR, "Cannot connect to X server '%s'."},
229 {STR_NO_XVISUAL_ERR, "Cannot obtain appropriate X visual."},
230 {STR_UNSUPP_DEPTH_ERR, "Unsupported color depth of screen."},
231 {STR_NO_SHEEP_NET_DRIVER_WARN, "Cannot open %s (%s). Ethernet will not be available."},
232 {STR_SHEEP_NET_ATTACH_WARN, "Cannot attach to Ethernet card (%s). Ethernet will not be available."},
233 {STR_SCSI_DEVICE_OPEN_WARN, "Cannot open %s (%s). SCSI Manager access to this device will be disabled."},
234 {STR_SCSI_DEVICE_NOT_SCSI_WARN, "%s doesn't seem to comply to the Generic SCSI API. SCSI Manager access to this device will be disabled."},
235 {STR_NO_AUDIO_DEV_WARN, "Cannot open %s (%s). Audio output will be disabled."},
236 {STR_AUDIO_FORMAT_WARN, "Audio hardware doesn't support signed 16 bit format. Audio output will be disabled."},
237 {STR_KEYCODE_FILE_WARN, "Cannot open keycode translation file %s (%s)."},
238 {STR_KEYCODE_VENDOR_WARN, "Cannot find vendor '%s' in keycode translation file %s."},
239
240 {STR_NO_PREPARE_EMUL_ERR, "PrepareEmul is not installed. Run PrepareEmul and then try again to start Basilisk II."},
241 {STR_NO_GADTOOLS_LIB_ERR, "Cannot open gadtools.library V39."},
242 {STR_NO_ASL_LIB_ERR, "Cannot open asl.library V36."},
243 {STR_NO_TIMER_DEV_ERR, "Cannot open timer.device."},
244 {STR_NO_P96_MODE_ERR, "The selected screen mode is not a Picasso96 mode."},
245 {STR_WRONG_SCREEN_DEPTH_ERR, "Basilisk II only supports 8, 16 or 24 bit screens."},
246 {STR_WRONG_SCREEN_FORMAT_ERR, "Basilisk II only supports big-endian chunky ARGB screen modes."},
247 {STR_NOT_ETHERNET_WARN, "The selected network device is not an Ethernet device. Networking will be disabled."},
248 {STR_NO_MULTICAST_WARN, "Your Ethernet card does not support multicast and is not usable with AppleTalk. Please report this to the manufacturer of the card."},
249 {STR_NO_GTLAYOUT_LIB_WARN, "Cannot open gtlayout.library V39. The preferences editor GUI will not be available."},
250 {STR_NO_AHI_WARN, "Cannot open ahi.device V2. Audio output will be disabled."},
251 {STR_NO_AHI_CTRL_WARN, "Cannot open AHI control structure. Audio output will be disabled."},
252
253 {-1, NULL} // End marker
254 };
255
256
257 /*
258 * Fetch pointer to string, given the string number
259 */
260
261 char *GetString(int num)
262 {
263 // First search for localized string
264 int i = 0;
265 while (loc_strings[i].num >= 0) {
266 if (loc_strings[i].num == num)
267 return loc_strings[i].str;
268 i++;
269 }
270
271 // Not found, then get default string
272 i = 0;
273 while (default_strings[i].num >= 0) {
274 if (default_strings[i].num == num)
275 return default_strings[i].str;
276 i++;
277 }
278 return NULL;
279 }