Ticket #7169: diskusage-localization.patch
File diskusage-localization.patch, 5.3 KB (added by , 14 years ago) |
---|
-
src/apps/diskusage/MainWindow.cpp
10 10 #include "MainWindow.h" 11 11 12 12 #include <Application.h> 13 #include <Catalog.h> 13 14 #include <Node.h> 14 15 #include <Roster.h> 15 16 #include <Screen.h> … … 19 20 #include "Common.h" 20 21 #include "ControlsView.h" 21 22 23 #undef B_TRANSLATE_CONTEXT 24 #define B_TRANSLATE_CONTEXT "MainWindow" 22 25 23 26 MainWindow::MainWindow(BRect pieRect) 24 27 : 25 BWindow(pieRect, "DiskUsage", B_TITLED_WINDOW,28 BWindow(pieRect, B_TRANSLATE("DiskUsage"), B_TITLED_WINDOW, 26 29 B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE 27 30 | B_AUTO_UPDATE_SIZE_LIMITS) 28 31 { -
src/apps/diskusage/Jamfile
15 15 Snapshot.cpp 16 16 StatusView.cpp 17 17 VolumeView.cpp 18 : be $( TARGET_LIBSTDC++)18 : be $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++) 19 19 : DiskUsage.rdef 20 20 ; 21 21 22 DoCatalogs DiskUsage : 23 x-vnd.Haiku-DiskUsage 24 : 25 MainWindow.cpp 26 Common.cpp 27 ; 28 -
src/apps/diskusage/Common.cpp
17 17 #include <stdlib.h> 18 18 19 19 #include <Application.h> 20 #include <Catalog.h> 20 21 #include <FindDirectory.h> 21 22 #include <Roster.h> 22 23 #include <Path.h> 23 24 24 25 26 #undef B_TRANSLATE_CONTEXT 27 #define B_TRANSLATE_CONTEXT "Common" 28 25 29 const char* kAppSignature = "application/x-vnd.Haiku-DiskUsage"; 26 30 const char* kHelpFileName = "userguide/en/applications/diskusage.html"; 27 31 const char* kPieRectAttrName = "mainrect"; … … 76 80 77 81 size_t ignore; 78 82 kVolMenuLabel = LoadString("STR_VM_LABEL"); 83 if (strncmp(kVolMenuLabel, "Volume:", sizeof("Volume:")) == 0) 84 kVolMenuLabel = (char *)B_TRANSLATE("Volume:"); 85 79 86 kOneFile = LoadString("STR_1_FILE"); 87 if (strncmp(kOneFile, "%d file", sizeof("%d file")) == 0) 88 kOneFile = (char *)B_TRANSLATE("%d file"); 89 80 90 kManyFiles = LoadString("STR_N_FILES"); 91 if (strncmp(kManyFiles, "%d files", sizeof("%d files")) == 0) 92 kManyFiles = (char *)B_TRANSLATE("%d files"); 93 81 94 kStrScan = LoadString("STR_SCAN"); 95 if (strncmp(kStrScan, "Scan", sizeof("Scan")) == 0) 96 kStrScan = (char *)B_TRANSLATE("Scan"); 97 82 98 kStrRescan = LoadString("STR_RESCAN"); 99 if (strncmp(kStrRescan, "Rescan", sizeof("Rescan")) == 0) 100 kStrRescan = (char *)B_TRANSLATE("Rescan"); 101 83 102 kStrScanningX = LoadString("STR_SCN_X"); 103 if (strncmp(kStrScanningX, "Scanning ", sizeof("Scanning ")) == 0) { 104 BString sScan(B_TRANSLATE("Scanning")); 105 sScan << " "; 106 kStrScanningX = (char *)sScan.String(); 107 } 108 84 109 kStrUnavail = LoadString("STR_UNAVAIL"); 110 if (strncmp(kStrUnavail, "file unavailable", sizeof("file unavailable")) 111 == 0) 112 kStrUnavail = (char *)B_TRANSLATE("file unavailable"); 113 85 114 kVolMenuDefault = LoadString("STR_VM_DFLT"); 115 if (strncmp(kVolMenuDefault, "(Select)", sizeof("(Select)")) == 0) 116 kVolMenuDefault = (char *)B_TRANSLATE("(Select)"); 117 86 118 kVolPrompt = LoadString("STR_VPROMPT"); 119 if (strncmp(kVolPrompt, "Select a volume to scan", 120 sizeof("Select a volume to scan")) == 0) 121 kVolPrompt = (char *)B_TRANSLATE("Select a volume to scan"); 122 87 123 kMenuGetInfo = LoadString("STR_M_INFO"); 124 if (strncmp(kMenuGetInfo, "Get Info", sizeof("Get Info")) == 0) 125 kMenuGetInfo = (char *)B_TRANSLATE("Get Info"); 126 88 127 kMenuOpen = LoadString("STR_M_OPEN"); 128 if (strncmp(kMenuOpen, "Open", sizeof("Open")) == 0) 129 kMenuOpen = (char *)B_TRANSLATE("Open"); 130 89 131 kMenuOpenWith = LoadString("STR_M_OPENW"); 132 if (strncmp(kMenuOpenWith, "Open With", sizeof("Open With")) == 0) 133 kMenuOpenWith = (char *)B_TRANSLATE("Open With"); 134 90 135 kMenuNoApps = LoadString("STR_M_NAPPS"); 136 if (strncmp(kMenuNoApps, "no supporting apps", 137 sizeof("no supporting apps")) == 0) 138 kMenuNoApps = (char *)B_TRANSLATE("no supporting apps"); 139 91 140 kInfoSize = LoadString("STR_SIZE"); 141 if (strncmp(kInfoSize, "Size", sizeof("Size")) == 0) 142 kInfoSize = (char *)B_TRANSLATE("Size"); 143 92 144 kInfoInFiles = LoadString("STR_INFILES"); 145 if (strncmp(kInfoInFiles, " in %d files", sizeof(" in %d files")) == 0) 146 kInfoInFiles = (char *)B_TRANSLATE(" in %d files"); 147 93 148 kInfoCreated = LoadString("STR_MADE"); 149 if (strncmp(kInfoCreated, "Created", sizeof("Created")) == 0) 150 kInfoCreated = (char *)B_TRANSLATE("Created"); 151 94 152 kInfoModified = LoadString("STR_MOD"); 153 if (strncmp(kInfoModified, "Modified", sizeof("Modified")) == 0) 154 kInfoModified = (char *)B_TRANSLATE("Modified"); 155 95 156 kInfoTimeFmt = LoadString("STR_TIMEFMT"); 157 if (strncmp(kInfoTimeFmt, "%a, %d %b %Y, %r", 158 sizeof("%a, %d %b %Y, %r")) == 0) 159 kInfoTimeFmt = (char *)B_TRANSLATE("%a, %d %b %Y, %r"); 160 96 161 kInfoKind = LoadString("STR_KIND"); 162 if (strncmp(kInfoKind, "Kind", sizeof("Kind")) == 0) 163 kInfoKind = (char *)B_TRANSLATE("Kind"); 164 97 165 kInfoPath = LoadString("STR_PATH"); 166 if (strncmp(kInfoPath, "Path", sizeof("Path")) == 0) 167 kInfoPath = (char *)B_TRANSLATE("Path"); 168 98 169 kOutdatedStr = LoadString("STR_OUTDATED"); 170 if (strncmp(kOutdatedStr, "Outdated view", sizeof("Outdated view")) == 0) 171 kOutdatedStr = (char *)B_TRANSLATE("Outdated view"); 99 172 100 173 kWindowColor = ui_color(B_PANEL_BACKGROUND_COLOR); 101 174 kOutlineColor = LoadColor("RGB_PIE_OL");