Browse Source

MG: makeskel now ignores missing translation file

Mattias Gaertner 22 years ago
parent
commit
1f77027b5a
1 changed files with 11 additions and 3 deletions
  1. 11 3
      utils/fpdoc/makeskel.pp

+ 11 - 3
utils/fpdoc/makeskel.pp

@@ -210,12 +210,17 @@ end;
 var
 var
   i: Integer;
   i: Integer;
   Module: TPasModule;
   Module: TPasModule;
+  MOFilename: string;
 begin
 begin
 {$IFDEF Unix}
 {$IFDEF Unix}
-  gettext.TranslateResourceStrings('/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo');
+  MOFilename:='/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo';
 {$ELSE}
 {$ELSE}
-  gettext.TranslateResourceStrings('intl/makeskel.%s.mo');
+  MOFilename:='intl/makeskel.%s.mo';
 {$ENDIF}
 {$ENDIF}
+  if FileExists(MOFilename) then
+    gettext.TranslateResourceStrings(MOFilename)
+  else
+    writeln('NOTE: unable to find tranlation file ',MOFilename);
 
 
   WriteLn(STitle);
   WriteLn(STitle);
   WriteLn(SCopyright);
   WriteLn(SCopyright);
@@ -275,7 +280,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2003-05-07 16:31:32  sg
+  Revision 1.4  2003-09-02 13:26:47  mattias
+  MG: makeskel now ignores missing translation file
+
+  Revision 1.3  2003/05/07 16:31:32  sg
   * Fixed a severe memory corruption problem on termination
   * Fixed a severe memory corruption problem on termination
 
 
   Revision 1.2  2003/03/28 13:01:36  michael
   Revision 1.2  2003/03/28 13:01:36  michael