some more work needed for i18n, seems, for captions of controls. maybe Maxim can help?

this is for string consts in form.

--
Regards,
Alexey

Index: components/printers/printer4lazstrconst.pas
===================================================================
--- components/printers/printer4lazstrconst.pas	(revision 58637)
+++ components/printers/printer4lazstrconst.pas	(working copy)
@@ -37,6 +37,15 @@
   p4lrsNoDefaultPrinter = 'No default printer found.';
   p4lrsShortUnitsMm = '(mm)';
   p4lrsShortUnitsInches = '(inches)';
+  p4lrsButtonMoreArrow = 'More >>';
+  p4lrsButtonLessArrow = '<< Less';
+  p4lrsJobStateReady = 'Ready';
+  p4lrsJobStatePrinting = 'Printing';
+  p4lrsJobStateStopped = 'Stopped';
+  p4lrsJobStateAccepting = '(Accepting jobs)';
+  p4lrsJobStateRejecting = '(Rejecting jobs)';
+  p4lrsPageOdd = 'Odd';
+  p4lrsPageEven = 'Even';
 
 implementation
 
Index: components/printers/unix/udlgselectprinter.pp
===================================================================
--- components/printers/unix/udlgselectprinter.pp	(revision 58637)
+++ components/printers/unix/udlgselectprinter.pp	(working copy)
@@ -42,6 +42,7 @@
   LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Buttons, ExtCtrls,
   Spin, ComCtrls, LCLType, LCLPlatformDef, InterfaceBase, Printers,
   // Printers
+  Printer4LazStrConst,
   OsPrinters, CUPSDyn;
 
 type
@@ -214,10 +215,10 @@
 
     BtnPrint.Enabled:=True;
     Case Printer.PrinterState of
-      psReady     : St:='Ready';
-      psPrinting  : St:='Printing';
+      psReady     : St:=p4lrsJobStateReady;
+      psPrinting  : St:=p4lrsJobStatePrinting;
       psStopped   : begin
-                      St:='Stopped';
+                      St:=p4lrsJobStateStopped;
                       StP:=StP+'_stopped';
                       BtnPrint.Enabled:=False;
                     end;
@@ -224,10 +225,10 @@
     end;
 
     if Printer.CanPrint then
-      St:=St+' (Accepting jobs)'
+      St:=St+' '+p4lrsJobStateAccepting
     else
     begin
-      St:=St+' (Rejetting jobs)';
+      St:=St+' '+p4lrsJobStateRejecting;
       BtnPrint.Enabled:=False;
     end;
 
@@ -335,9 +336,9 @@
   if edPageSet.ItemIndex>0 then
   begin
     if edPageSet.ItemIndex=1 then
-      St:='Odd'
+      St:=p4lrsPageOdd
     else
-      St:='Even';
+      St:=p4lrsPageEven;
     THackCUPSPrinter(Printer).cupsAddOption('page-set',St);
   end;
   if cbCollate.Checked then
@@ -448,9 +449,9 @@
   Constraints.MaxHeight:=Height;
 
   if not FBig then
-    btnReduc.Caption:='More >>'
+    btnReduc.Caption:=p4lrsButtonMoreArrow
   else
-    btnReduc.Caption:='<< Less';
+    btnReduc.Caption:=p4lrsButtonLessArrow;
 end;
 
 procedure TdlgSelectPrinter.btnPrintCLICK(Sender: TObject);
-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to