Ticket #7233: lpe-localization.patch
File lpe-localization.patch, 3.2 KB (added by , 13 years ago) |
---|
-
lpe/lpe.rdef
1 /* 2 * lpe.rdef 3 */ 4 5 resource app_signature "application/x-vnd.Haiku-lpe"; 6 7 resource app_version { 8 major = 1, 9 middle = 0, 10 minor = 0, 11 variety = 0, 12 internal = 0, 13 short_info = "1.0.0", 14 long_info = "Haiku lpe." 15 }; -
lpe/lpe.cpp
39 39 #include <stdlib.h> 40 40 #include <stdarg.h> 41 41 42 #include <Catalog.h> 42 43 #include <Message.h> 43 44 #include <Roster.h> 44 45 #include <String.h> 45 46 47 #undef B_TRANSLATE_CONTEXT 48 #define B_TRANSLATE_CONTEXT "lpe" 49 46 50 const long msg_CommandLineOpen = 'Cmdl'; 47 51 48 52 static std::vector<int> threads; … … 53 57 54 58 void Usage() 55 59 { 56 puts( "usage: lpe [file:linenr | +linenr file | file] ...");60 puts(B_TRANSLATE("usage: lpe [file:linenr | +linenr file | file] ...")); 57 61 exit(1); 58 62 } /* Usage */ 59 63 … … 82 86 83 87 entry_ref pe; 84 88 if (be_roster->FindApp("application/x-vnd.beunited.pe", &pe)) 85 DoError( "Could not find Pe!");89 DoError(B_TRANSLATE("Could not find Pe!")); 86 90 87 91 status_t err; 88 92 if (!be_roster->IsRunning(&pe)) 89 93 { 90 94 team_id team; 91 95 err = be_roster->Launch(&pe, &msg, &team); 92 if (err) DoError( "Error launching Pe (%s)", strerror(err));96 if (err) DoError(B_TRANSLATE("Error launching Pe (%s)"), strerror(err)); 93 97 // now wait for the requested edit-window to come up (filter out standard 94 98 // windows): 95 99 bool foundThread = false; … … 121 125 { 122 126 thread_id tid; 123 127 err = reply.FindInt32("thread", (long *)&tid); 124 if (err) DoError( "Error getting thread id (%s)", strerror(err));128 if (err) DoError(B_TRANSLATE("Error getting thread id (%s)"), strerror(err)); 125 129 126 130 threads.push_back(tid); 127 131 } 128 132 else 129 DoError( "No Thread ID in reply");133 DoError(B_TRANSLATE("No Thread ID in reply")); 130 134 } 131 135 132 136 } /* OpenInPe */ … … 168 172 } 169 173 170 174 err = e.SetTo(path.String(), true); 171 if (err) DoError( "Error trying to access file %s, (%s)", path.String(), strerror(err));175 if (err) DoError(B_TRANSLATE("Error trying to access file %s, (%s)"), path.String(), strerror(err)); 172 176 // if (! e.Exists()) DoError("File %s does not exist", path.String()); 173 if (e.Exists() && ! e.IsFile()) DoError( "%s is not a regular file", path.String());177 if (e.Exists() && ! e.IsFile()) DoError(B_TRANSLATE("%s is not a regular file"), path.String()); 174 178 175 179 entry_ref ref; 176 180 err = e.GetRef(&ref); 177 if (err) DoError( "Error trying to access file %s, (%s)", path.String(), strerror(err));181 if (err) DoError(B_TRANSLATE("Error trying to access file %s, (%s)"), path.String(), strerror(err)); 178 182 OpenInPe(ref, lineNr); 179 183 lineNr = -1; 180 184 } -
lpe/Jamfile
1 1 2 2 SubDir TOP lpe ; 3 3 4 AddResources lpe : lpe.rdef ; 5 4 6 # <pe-src> 5 7 Application lpe 6 8 : lpe.cpp 7 : be $(STDC++LIB) 9 : be $(STDC++LIB) $(HAIKU_LOCALE_LIBS) 8 10 ; 11 12 DoCatalogs lpe : 13 x-vnd.Haiku-lpe 14 : 15 lpe.cpp 16 ; 17 9 18 # </pe-src>