View Issue Details

IDProjectCategoryView StatusLast Update
0016330LazarusPatchpublic2010-04-25 02:39
ReporterMarcelo B Paula Assigned ToMaxim Ganetsky  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0016330: FPCUnit improved IDE internationalization
DescriptionThe attached files implements i18n support for FPCUnit IDE register package.
Diff file with source changes.
Zip file contains full path to .po files, including the portuguese translation.
TagsNo tags attached.
Fixed in Revision24900
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2010-04-25 01:05

 

fpcunitide.diff (4,644 bytes)   
Index: components/fpcunit/ide/fpcunitide.lpk
===================================================================
--- components/fpcunit/ide/fpcunitide.lpk	(revis�o 24886)
+++ components/fpcunit/ide/fpcunitide.lpk	(c�pia de trabalho)
@@ -1,18 +1,15 @@
 <?xml version="1.0"?>
 <CONFIG>
-  <Package Version="2">
+  <Package Version="3">
     <PathDelim Value="\"/>
     <Name Value="fpcunitide"/>
     <Author Value="Vincent Snijders"/>
     <CompilerOptions>
-      <Version Value="5"/>
+      <Version Value="8"/>
       <PathDelim Value="\"/>
       <SearchPaths>
         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
       </SearchPaths>
-      <CodeGeneration>
-        <Generate Value="Faster"/>
-      </CodeGeneration>
       <Other>
         <CompilerPath Value="$(CompPath)"/>
         <CreateMakefileOnBuild Value="True"/>
@@ -30,6 +27,10 @@
         <Type Value="Include"/>
       </Item2>
     </Files>
+    <i18n>
+      <EnableI18N Value="True"/>
+      <OutDir Value="languages"/>
+    </i18n>
     <Type Value="DesignTime"/>
     <RequiredPkgs Count="2">
       <Item1>
Index: components/fpcunit/ide/fpcunitlazideintf.pas
===================================================================
--- components/fpcunit/ide/fpcunitlazideintf.pas	(revis�o 24886)
+++ components/fpcunit/ide/fpcunitlazideintf.pas	(c�pia de trabalho)
@@ -89,6 +89,22 @@
 
 implementation
 
+resourcestring
+  sFPCUnApplication = 'FPCUnit Application';
+  sFPCUnTestApp = 'FPCUnit Test Application';
+  sFPCUnTestAppDesc = 'FPCUnit Test Application%sAn application to run '
+    +'fpcunit test cases.%sThe program file is automatically maintained by '
+    +'Lazarus.';
+  sFPCUnTestCase = 'FPCUnit Test Case';
+  sFPCUnTestCaseDesc = 'FPCUnit Test Case%sA unit containing a FPCUnit Test '
+    +'Case.';
+  sWriteYourOwnTest = 'Write your own test';
+  sFPCUnConsole = 'FPCUnit Console Application';
+  sFPCUnConsoleTestApp = 'FPCUnit Console Test Application';
+  sFPCUnConsoleTestDesc = 'FPCUnit Console Test Application%sAn application '
+    +'to run fpcunit test cases in console mode.%sThe program file is '
+    +'automatically maintained by Lazarus.';
+
 procedure Register;
 begin
   FileDescriptorFPCUnitTestCase:=TFileDescPascalUnitFPCUnitTestCase.Create;
@@ -104,12 +120,12 @@
 constructor TFPCUnitApplicationDescriptor.Create;
 begin
   inherited Create;
-  Name:='FPCUnit Application';
+  Name:=sFPCUnApplication;
 end;
 
 function TFPCUnitApplicationDescriptor.GetLocalizedName: string;
 begin
-  Result:='FPCUnit Test Application';
+  Result:=sFPCUnTestApp;
 end;
 
 function TFPCUnitApplicationDescriptor.GetLocalizedDescription: string;
@@ -117,10 +133,7 @@
   le: string;
 begin
   le := System.LineEnding;
-  Result:='FPCUnit Test Application'+le+le
-          +'An application to run fpcunit test cases.'+le
-          +'The program file is '
-          +'automatically maintained by Lazarus.';
+  Result:=Format(sFPCUnTestAppDesc,[le+le,le]);
 end;
 
 function TFPCUnitApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult;
@@ -233,13 +246,12 @@
 
 function TFileDescPascalUnitFPCUnitTestCase.GetLocalizedName: string;
 begin
-  Result:='FPCUnit Test Case';
+  Result:=sFPCUnTestCase;
 end;
 
 function TFileDescPascalUnitFPCUnitTestCase.GetLocalizedDescription: string;
 begin
-  Result:='FPCUnit Test Case'#13
-         +'A unit containing a FPCUnit Test Case.';
+  Result:=Format(sFPCUnTestCaseDesc,[#13]);
 end;
 
 function TFileDescPascalUnitFPCUnitTestCase.GetInterfaceSource(const Filename,
@@ -288,7 +300,7 @@
                    +'end;'+le;
   Result:='procedure '+TestCaseName+'.TestHookUp;'+le
     +'begin'+le
-    +'  Fail(''Write your own test'');'+le
+    +'  Fail('+sWriteYourOwnTest+');'+le
     +'end;'+le
     +le
     +setupMethod
@@ -306,12 +318,12 @@
 constructor TFPCUnitConsoleApplicationDescriptor.Create;
 begin
   inherited Create;
-  Name:='FPCUnit Console Application';
+  Name:=sFPCUnConsole;
 end;
 
 function TFPCUnitConsoleApplicationDescriptor.GetLocalizedName: string;
 begin
-  Result:='FPCUnit Console Test Application';
+  Result:=sFPCUnConsoleTestApp;
 end;
 
 function TFPCUnitConsoleApplicationDescriptor.GetLocalizedDescription: string;
@@ -319,10 +331,7 @@
   le: string;
 begin
   le := System.LineEnding;
-  Result:='FPCUnit Console Test Application'+le+le
-          +'An application to run fpcunit test cases in console mode.'+le
-          +'The program file is '
-          +'automatically maintained by Lazarus.';
+  Result:=Format(sFPCUnConsoleTestDesc,[le+le,le]);
 end;
 
 function TFPCUnitConsoleApplicationDescriptor.InitProject(
fpcunitide.diff (4,644 bytes)   

2010-04-25 01:05

 

fpcunit_ide_reg.zip (1,613 bytes)

Maxim Ganetsky

2010-04-25 02:28

developer   ~0036985

Applied with some changes: removed two unnecessary and potentially dangerous localizations in class constructors.

Marcelo B Paula

2010-04-25 02:39

reporter   ~0036986

OK. Thanks.

Issue History

Date Modified Username Field Change
2010-04-25 01:05 Marcelo B Paula New Issue
2010-04-25 01:05 Marcelo B Paula File Added: fpcunitide.diff
2010-04-25 01:05 Marcelo B Paula Widgetset => Win32/Win64
2010-04-25 01:05 Marcelo B Paula File Added: fpcunit_ide_reg.zip
2010-04-25 01:25 Maxim Ganetsky Status new => assigned
2010-04-25 01:25 Maxim Ganetsky Assigned To => Maxim Ganetsky
2010-04-25 02:28 Maxim Ganetsky Fixed in Revision => 24900
2010-04-25 02:28 Maxim Ganetsky LazTarget => -
2010-04-25 02:28 Maxim Ganetsky Status assigned => resolved
2010-04-25 02:28 Maxim Ganetsky Fixed in Version => 0.9.29 (SVN)
2010-04-25 02:28 Maxim Ganetsky Resolution open => fixed
2010-04-25 02:28 Maxim Ganetsky Note Added: 0036985
2010-04-25 02:39 Marcelo B Paula Status resolved => closed
2010-04-25 02:39 Marcelo B Paula Note Added: 0036986