printer4lazarus: added resourcestrings for cups setup dlg

git-svn-id: trunk@49341 -
This commit is contained in:
mattias 2015-06-16 09:16:18 +00:00
parent da6e82de8f
commit fc378e05ef
7 changed files with 206 additions and 59 deletions

2
.gitattributes vendored
View File

@ -3255,9 +3255,11 @@ components/printers/images/printersdlgs.txt svneol=native#text/plain
components/printers/images/tpagesetupdialog.png -text svneol=unset#image/png components/printers/images/tpagesetupdialog.png -text svneol=unset#image/png
components/printers/images/tprintdialog.png -text svneol=unset#image/png components/printers/images/tprintdialog.png -text svneol=unset#image/png
components/printers/images/tprintersetupdialog.png -text svneol=unset#image/png components/printers/images/tprintersetupdialog.png -text svneol=unset#image/png
components/printers/languages/printer4lazstrconst.po svneol=native#text/plain
components/printers/osprinters.pas svneol=native#text/pascal components/printers/osprinters.pas svneol=native#text/pascal
components/printers/printer4lazarus.lpk svneol=native#text/pascal components/printers/printer4lazarus.lpk svneol=native#text/pascal
components/printers/printer4lazarus.pas svneol=native#text/pascal components/printers/printer4lazarus.pas svneol=native#text/pascal
components/printers/printer4lazstrconst.pas svneol=native#text/plain
components/printers/printersdlgs.pp svneol=native#text/pascal components/printers/printersdlgs.pp svneol=native#text/pascal
components/printers/printersdlgs.res -text components/printers/printersdlgs.res -text
components/printers/qt/qtprinters.inc svneol=native#text/pascal components/printers/qt/qtprinters.inc svneol=native#text/pascal

View File

@ -0,0 +1,75 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: printer4lazstrconst.p4lrsadvanced
msgid "Advanced"
msgstr ""
#: printer4lazstrconst.p4lrsbanners
msgid "Banners"
msgstr ""
#: printer4lazstrconst.p4lrscancel
msgid "Cancel"
msgstr ""
#: printer4lazstrconst.p4lrsend
msgid "End"
msgstr ""
#: printer4lazstrconst.p4lrsgeneral
msgid "General"
msgstr ""
#: printer4lazstrconst.p4lrslandscape
msgid "Landscape"
msgstr ""
#: printer4lazstrconst.p4lrsmargins
msgid "Margins"
msgstr ""
#: printer4lazstrconst.p4lrsok
msgid "Ok"
msgstr ""
#: printer4lazstrconst.p4lrsorientation
msgid "Orientation"
msgstr ""
#: printer4lazstrconst.p4lrspagespersheet
msgid "Pages per sheet"
msgstr ""
#: printer4lazstrconst.p4lrspapersize
msgid "Paper size"
msgstr ""
#: printer4lazstrconst.p4lrspapersource
msgid "Paper source"
msgstr ""
#: printer4lazstrconst.p4lrspapertype
msgid "Paper type"
msgstr ""
#: printer4lazstrconst.p4lrsportrait
msgid "Portrait"
msgstr ""
#: printer4lazstrconst.p4lrsresolution
msgid "Resolution"
msgstr ""
#: printer4lazstrconst.p4lrsreverselandscape
msgid "Reverse landscape"
msgstr ""
#: printer4lazstrconst.p4lrsreverseportrait
msgid "Reverse portrait"
msgstr ""
#: printer4lazstrconst.p4lrsstart
msgid "Start"
msgstr ""

View File

@ -30,7 +30,7 @@
<License Value="LGPL <License Value="LGPL
"/> "/>
<Version Minor="5"/> <Version Minor="5"/>
<Files Count="38"> <Files Count="39">
<Item1> <Item1>
<Filename Value="printersdlgs.pp"/> <Filename Value="printersdlgs.pp"/>
<HasRegisterProc Value="True"/> <HasRegisterProc Value="True"/>
@ -196,7 +196,15 @@
<AddToUsesPkgSection Value="False"/> <AddToUsesPkgSection Value="False"/>
<UnitName Value="cocoaprintcanvas"/> <UnitName Value="cocoaprintcanvas"/>
</Item38> </Item38>
<Item39>
<Filename Value="printer4lazstrconst.pas"/>
<UnitName Value="printer4lazstrconst"/>
</Item39>
</Files> </Files>
<i18n>
<EnableI18N Value="True"/>
<OutDir Value="languages"/>
</i18n>
<RequiredPkgs Count="1"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="cairocanvas_pkg"/> <PackageName Value="cairocanvas_pkg"/>

View File

@ -7,7 +7,7 @@ unit Printer4Lazarus;
interface interface
uses uses
PrintersDlgs, OSPrinters, LazarusPackageIntf; PrintersDlgs, OSPrinters, Printer4LazStrConst, LazarusPackageIntf;
implementation implementation

View File

@ -0,0 +1,40 @@
{
*****************************************************************************
This file is part of the Lazarus Component Library (LCL)
See the file COPYING.modifiedLGPL.txt, included in this distribution,
for details about the license.
*****************************************************************************
Abstract: Resourcestrings.
}
unit Printer4LazStrConst;
{$mode objfpc}{$H+}
interface
resourcestring
p4lrsCancel = 'Cancel';
p4lrsOk = 'Ok';
p4lrsGeneral = 'General';
p4lrsPaperSize = 'Paper size';
p4lrsPaperType = 'Paper type';
p4lrsPaperSource = 'Paper source';
p4lrsResolution = 'Resolution';
p4lrsOrientation = 'Orientation';
p4lrsPortrait = 'Portrait';
p4lrsLandscape = 'Landscape';
p4lrsReverseLandscape = 'Reverse landscape';
p4lrsReversePortrait = 'Reverse portrait';
p4lrsBanners = 'Banners';
p4lrsStart = 'Start';
p4lrsEnd = 'End';
p4lrsPagesPerSheet = 'Pages per sheet';
p4lrsMargins = 'Margins';
p4lrsAdvanced = 'Advanced';
implementation
end.

View File

@ -1,7 +1,7 @@
object dlgpropertiesprinter: Tdlgpropertiesprinter object dlgpropertiesprinter: Tdlgpropertiesprinter
Left = 379 Left = 363
Height = 464 Height = 464
Top = 53 Top = 180
Width = 457 Width = 457
ActiveControl = Notebook1 ActiveControl = Notebook1
Caption = 'dlgpropertiesprinter' Caption = 'dlgpropertiesprinter'
@ -11,7 +11,7 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = dlgpropertiesprinterSHOW OnShow = dlgpropertiesprinterSHOW
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.31' LCLVersion = '1.5'
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 41 Height = 41
@ -61,67 +61,67 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
TabOrder = 1 TabOrder = 1
object pgGeneral: TTabSheet object pgGeneral: TTabSheet
Caption = 'General' Caption = 'General'
ClientHeight = 397 ClientHeight = 394
ClientWidth = 449 ClientWidth = 453
object labPaperSize: TLabel object labPaperSize: TLabel
Left = 15 Left = 15
Height = 14 Height = 15
Top = 19 Top = 19
Width = 50 Width = 56
Caption = 'Paper size' Caption = 'Paper size'
ParentColor = False ParentColor = False
end end
object labPaperType: TLabel object labPaperType: TLabel
Left = 15 Left = 15
Height = 14 Height = 15
Top = 55 Top = 55
Width = 54 Width = 60
Caption = 'Paper type' Caption = 'Paper type'
ParentColor = False ParentColor = False
end end
object labPaperSrc: TLabel object labPaperSrc: TLabel
Left = 15 Left = 15
Height = 14 Height = 15
Top = 92 Top = 92
Width = 64 Width = 72
Caption = 'Paper source' Caption = 'Paper source'
ParentColor = False ParentColor = False
end end
object labResolution: TLabel object labResolution: TLabel
Left = 15 Left = 15
Height = 14 Height = 15
Top = 125 Top = 125
Width = 51 Width = 59
Caption = 'Resolution' Caption = 'Resolution'
ParentColor = False ParentColor = False
end end
object cbPaperSize: TComboBox object cbPaperSize: TComboBox
Left = 130 Left = 130
Height = 21 Height = 29
Top = 9 Top = 9
Width = 310 Width = 310
DropDownCount = 10 DropDownCount = 10
ItemHeight = 13 ItemHeight = 0
OnKeyPress = cbPaperSizeKEYPRESS OnKeyPress = cbPaperSizeKEYPRESS
Style = csDropDownList Style = csDropDownList
TabOrder = 0 TabOrder = 0
end end
object cbPaperType: TComboBox object cbPaperType: TComboBox
Left = 130 Left = 130
Height = 21 Height = 29
Top = 45 Top = 45
Width = 310 Width = 310
ItemHeight = 13 ItemHeight = 0
OnKeyPress = cbPaperSizeKEYPRESS OnKeyPress = cbPaperSizeKEYPRESS
Style = csDropDownList Style = csDropDownList
TabOrder = 1 TabOrder = 1
end end
object cbPaperSrc: TComboBox object cbPaperSrc: TComboBox
Left = 130 Left = 130
Height = 21 Height = 29
Top = 81 Top = 81
Width = 310 Width = 310
ItemHeight = 13 ItemHeight = 0
OnKeyPress = cbPaperSizeKEYPRESS OnKeyPress = cbPaperSizeKEYPRESS
Style = csDropDownList Style = csDropDownList
TabOrder = 3 TabOrder = 3
@ -132,7 +132,7 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
Top = 162 Top = 162
Width = 233 Width = 233
Caption = ' Orientation ' Caption = ' Orientation '
ClientHeight = 101 ClientHeight = 102
ClientWidth = 229 ClientWidth = 229
TabOrder = 5 TabOrder = 5
object imgOrientation: TImage object imgOrientation: TImage
@ -143,9 +143,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbPortrait: TRadioButton object rbPortrait: TRadioButton
Left = 7 Left = 7
Height = 17 Height = 24
Top = 5 Top = 5
Width = 54 Width = 69
Caption = 'Portrait' Caption = 'Portrait'
Checked = True Checked = True
DragCursor = crDefault DragCursor = crDefault
@ -155,9 +155,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbLandscape: TRadioButton object rbLandscape: TRadioButton
Left = 7 Left = 7
Height = 17 Height = 24
Top = 29 Top = 29
Width = 69 Width = 83
Caption = 'Landscape' Caption = 'Landscape'
DragCursor = crDefault DragCursor = crDefault
OnClick = rbPortraitCLICK OnClick = rbPortraitCLICK
@ -165,9 +165,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbrev_Landscape: TRadioButton object rbrev_Landscape: TRadioButton
Left = 7 Left = 7
Height = 17 Height = 24
Top = 53 Top = 53
Width = 109 Width = 128
Caption = 'Reverse landscape' Caption = 'Reverse landscape'
DragCursor = crDefault DragCursor = crDefault
OnClick = rbPortraitCLICK OnClick = rbPortraitCLICK
@ -175,9 +175,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbrev_portrait: TRadioButton object rbrev_portrait: TRadioButton
Left = 7 Left = 7
Height = 17 Height = 24
Top = 77 Top = 77
Width = 97 Width = 117
Caption = 'Reverse portrait' Caption = 'Reverse portrait'
DragCursor = crDefault DragCursor = crDefault
OnClick = rbPortraitCLICK OnClick = rbPortraitCLICK
@ -190,41 +190,41 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
Top = 290 Top = 290
Width = 427 Width = 427
Caption = ' Banners ' Caption = ' Banners '
ClientHeight = 78 ClientHeight = 79
ClientWidth = 423 ClientWidth = 423
TabOrder = 2 TabOrder = 2
object labBanStart: TLabel object labBanStart: TLabel
Left = 6 Left = 6
Height = 14 Height = 15
Top = 9 Top = 9
Width = 25 Width = 27
Caption = 'Start' Caption = 'Start'
ParentColor = False ParentColor = False
end end
object labBanEnd: TLabel object labBanEnd: TLabel
Left = 6 Left = 6
Height = 14 Height = 15
Top = 49 Top = 49
Width = 19 Width = 21
Caption = 'End' Caption = 'End'
ParentColor = False ParentColor = False
end end
object cbBanStart: TComboBox object cbBanStart: TComboBox
Left = 94 Left = 94
Height = 21 Height = 29
Top = 1 Top = 1
Width = 317 Width = 317
ItemHeight = 13 ItemHeight = 0
OnKeyPress = cbPaperSizeKEYPRESS OnKeyPress = cbPaperSizeKEYPRESS
Style = csDropDownList Style = csDropDownList
TabOrder = 0 TabOrder = 0
end end
object cbBanEnd: TComboBox object cbBanEnd: TComboBox
Left = 94 Left = 94
Height = 21 Height = 29
Top = 41 Top = 41
Width = 317 Width = 317
ItemHeight = 13 ItemHeight = 0
OnKeyPress = cbPaperSizeKEYPRESS OnKeyPress = cbPaperSizeKEYPRESS
Style = csDropDownList Style = csDropDownList
TabOrder = 1 TabOrder = 1
@ -236,7 +236,7 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
Top = 163 Top = 163
Width = 185 Width = 185
Caption = ' Pages per sheet ' Caption = ' Pages per sheet '
ClientHeight = 100 ClientHeight = 101
ClientWidth = 181 ClientWidth = 181
TabOrder = 4 TabOrder = 4
object imgPageSheet: TImage object imgPageSheet: TImage
@ -247,9 +247,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbSheet1: TRadioButton object rbSheet1: TRadioButton
Left = 6 Left = 6
Height = 17 Height = 24
Top = 5 Top = 5
Width = 24 Width = 33
Caption = '1' Caption = '1'
Checked = True Checked = True
DragCursor = crDefault DragCursor = crDefault
@ -259,9 +259,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbSheet2: TRadioButton object rbSheet2: TRadioButton
Left = 6 Left = 6
Height = 17 Height = 24
Top = 29 Top = 29
Width = 24 Width = 33
Caption = '2' Caption = '2'
DragCursor = crDefault DragCursor = crDefault
OnClick = rbPortraitCLICK OnClick = rbPortraitCLICK
@ -269,9 +269,9 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object rbSheet4: TRadioButton object rbSheet4: TRadioButton
Left = 6 Left = 6
Height = 17 Height = 24
Top = 53 Top = 53
Width = 24 Width = 33
Caption = '4' Caption = '4'
DragCursor = crDefault DragCursor = crDefault
OnClick = rbPortraitCLICK OnClick = rbPortraitCLICK
@ -280,10 +280,10 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object cbResolution: TComboBox object cbResolution: TComboBox
Left = 130 Left = 130
Height = 21 Height = 29
Top = 117 Top = 117
Width = 310 Width = 310
ItemHeight = 13 ItemHeight = 0
OnKeyPress = cbPaperSizeKEYPRESS OnKeyPress = cbPaperSizeKEYPRESS
Style = csDropDownList Style = csDropDownList
TabOrder = 6 TabOrder = 6
@ -294,13 +294,15 @@ object dlgpropertiesprinter: Tdlgpropertiesprinter
end end
object pgAdvanced: TTabSheet object pgAdvanced: TTabSheet
Caption = 'Advanced' Caption = 'Advanced'
ClientHeight = 397 ClientHeight = 394
ClientWidth = 449 ClientWidth = 453
object sb: TScrollBox object sb: TScrollBox
Left = 0 Left = 0
Height = 397 Height = 397
Top = 0 Top = 0
Width = 449 Width = 449
HorzScrollBar.Page = 1
VertScrollBar.Page = 1
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
end end

View File

@ -30,7 +30,7 @@ interface
uses uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls, Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
StdCtrls, Buttons, Printers, CupsLCL, OsPrinters in '../osprinters.pas', LCLProc, StdCtrls, Buttons, Printers, CupsLCL, OsPrinters in '../osprinters.pas', LCLProc,
CupsDyn; CupsDyn, Printer4LazStrConst;
type type
@ -70,10 +70,10 @@ type
rbPortrait: TRADIOBUTTON; rbPortrait: TRADIOBUTTON;
sb: TScrollBox; sb: TScrollBox;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure rbPortraitCLICK(Sender: TObject); procedure rbPortraitClick(Sender: TObject);
procedure cbPaperSizeKEYPRESS(Sender: TObject; var Key: Char); procedure cbPaperSizeKeypress(Sender: TObject; var Key: Char);
procedure dlgpropertiesprinterCREATE(Sender: TObject); procedure dlgpropertiesprinterCreate(Sender: TObject);
procedure dlgpropertiesprinterSHOW(Sender: TObject); procedure dlgpropertiesprinterShow(Sender: TObject);
private private
{ private declarations } { private declarations }
procedure RefreshInfos; procedure RefreshInfos;
@ -98,13 +98,13 @@ implementation
Type Type
THackCUPSPrinter=Class(TCUPSPrinter); THackCUPSPrinter=Class(TCUPSPrinter);
procedure Tdlgpropertiesprinter.dlgpropertiesprinterSHOW(Sender: TObject); procedure Tdlgpropertiesprinter.dlgpropertiesprinterShow(Sender: TObject);
begin begin
if Sender=nil then ; if Sender=nil then ;
RefreshInfos; RefreshInfos;
end; end;
procedure Tdlgpropertiesprinter.cbPaperSizeKEYPRESS(Sender: TObject; procedure Tdlgpropertiesprinter.cbPaperSizeKeypress(Sender: TObject;
var Key: Char); var Key: Char);
begin begin
if Sender=nil then ; if Sender=nil then ;
@ -338,14 +338,34 @@ begin
end; end;
//Initialization //Initialization
procedure Tdlgpropertiesprinter.dlgpropertiesprinterCREATE(Sender: TObject); procedure Tdlgpropertiesprinter.dlgpropertiesprinterCreate(Sender: TObject);
begin begin
if Sender=nil then ; if Sender=nil then ;
Notebook1.PageIndex:=0; Notebook1.PageIndex:=0;
btnCancel1.Caption := p4lrsCancel;
btnOk.Caption := p4lrsOk;
pgGeneral.Caption := p4lrsGeneral;
labPaperSize.Caption := p4lrsPaperSize;
labPaperType.Caption := p4lrsPaperType;
labPaperSrc.Caption := p4lrsPaperSource;
labResolution.Caption := p4lrsResolution;
gbOrientation.Caption := ' '+p4lrsOrientation+' ';
rbPortrait.Caption := p4lrsPortrait;
rbLandscape.Caption := p4lrsLandscape;
rbrev_Landscape.Caption := p4lrsReverseLandscape;
rbrev_portrait.Caption := p4lrsReversePortrait;
gbBanners.Caption := ' '+p4lrsBanners+' ';
labBanStart.Caption := p4lrsStart;
labBanEnd.Caption := p4lrsEnd;
gbPagesSheet.Caption := ' '+p4lrsPagesPerSheet+' ';
pgMargins.Caption := p4lrsMargins;
pgAdvanced.Caption := p4lrsAdvanced;
SetupOptions; SetupOptions;
end; end;
procedure Tdlgpropertiesprinter.rbPortraitCLICK(Sender: TObject); procedure Tdlgpropertiesprinter.rbPortraitClick(Sender: TObject);
begin begin
if Sender=nil then ; if Sender=nil then ;
RefreshInfos; RefreshInfos;