瀏覽代碼

+ Translate now called correctly...

michael 21 年之前
父節點
當前提交
111ff2e6b2
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. 9 5
      utils/fpdoc/makeskel.pp

+ 9 - 5
utils/fpdoc/makeskel.pp

@@ -214,13 +214,16 @@ var
   Module: TPasModule;
   Module: TPasModule;
   MOFilename: string;
   MOFilename: string;
 begin
 begin
+  InitOptions;
+  ParseCommandLine;
+
 {$IFDEF Unix}
 {$IFDEF Unix}
   MOFilename:='/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo';
   MOFilename:='/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo';
 {$ELSE}
 {$ELSE}
   MOFilename:='intl/makeskel.%s.mo';
   MOFilename:='intl/makeskel.%s.mo';
 {$ENDIF}
 {$ENDIF}
   if FileExists(MOFilename) then
   if FileExists(MOFilename) then
-    gettext.TranslateResourceStrings(MOFilename)
+    gettext.TranslateResourceStrings(Format(MOFilename,[doclang]))
   else
   else
     writeln('NOTE: unable to find tranlation file ',MOFilename);
     writeln('NOTE: unable to find tranlation file ',MOFilename);
 
 
@@ -228,8 +231,6 @@ begin
   WriteLn(SCopyright);
   WriteLn(SCopyright);
   WriteLn;
   WriteLn;
 
 
-  InitOptions;
-  ParseCommandLine;
 
 
   if CmdLineAction = actionHelp then
   if CmdLineAction = actionHelp then
     WriteLn(SCmdLineHelp)
     WriteLn(SCmdLineHelp)
@@ -291,7 +292,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2004-05-01 20:13:40  marco
+  Revision 1.7  2004-08-24 14:48:25  michael
+  + Translate now called correctly...
+
+  Revision 1.6  2004/05/01 20:13:40  marco
    * got fed up with exceptions on file not found.  Fileresolver now raises a
    * got fed up with exceptions on file not found.  Fileresolver now raises a
   	EFileNotFound error, and makeskel catches and exists gracefully
   	EFileNotFound error, and makeskel catches and exists gracefully
 
 
@@ -309,4 +313,4 @@ end.
 
 
   Revision 1.1  2003/03/17 23:03:20  michael
   Revision 1.1  2003/03/17 23:03:20  michael
   + Initial import in CVS
   + Initial import in CVS
-}
+}