callite: Add Italian and Polish translations of hard-coded calendar texts (translation by John Greetham)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5361 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-11-17 21:29:09 +00:00
parent 979b1b0fb1
commit 86107c9c25
3 changed files with 48 additions and 31 deletions

View File

@ -12,16 +12,16 @@ object Form1: TForm1
LCLVersion = '1.7'
object PSettings: TPanel
Left = 0
Height = 408
Height = 432
Top = 0
Width = 753
Align = alTop
ClientHeight = 408
ClientHeight = 432
ClientWidth = 753
TabOrder = 0
object cgOptions: TCheckGroup
Left = 24
Height = 352
Height = 384
Top = 40
Width = 160
AutoFill = True
@ -34,7 +34,7 @@ object Form1: TForm1
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 332
ClientHeight = 364
ClientWidth = 156
Items.Strings = (
'coBoldDayNames'
@ -117,8 +117,8 @@ object Form1: TForm1
end
object rgLanguage: TRadioGroup
Left = 200
Height = 144
Top = 248
Height = 184
Top = 240
Width = 160
AutoFill = True
Caption = 'Language to use'
@ -130,7 +130,7 @@ object Form1: TForm1
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 124
ClientHeight = 164
ClientWidth = 156
ItemIndex = 0
Items.Strings = (
@ -139,13 +139,15 @@ object Form1: TForm1
'German'
'Hebrew'
'Spanish'
'Italian'
'Polish'
)
OnClick = rgLanguageClick
TabOrder = 4
end
object rgStartingDOW: TRadioGroup
Left = 200
Height = 192
Height = 184
Top = 40
Width = 160
AutoFill = True
@ -158,7 +160,7 @@ object Form1: TForm1
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 172
ClientHeight = 164
ClientWidth = 156
Items.Strings = (
'Sunday'

View File

@ -193,13 +193,7 @@ end;
procedure TForm1.rgLanguageClick(Sender: TObject);
begin
case rgLanguage.ItemIndex of
0: demoCal.Languages := lgEnglish;
1: demoCal.Languages := lgFrench;
2: demoCal.Languages := lgGerman;
3: demoCal.Languages := lgHebrew;
4: demoCal.Languages := lgSpanish;
end;
demoCal.Languages := TLanguage(rgLanguage.ItemIndex);
copyCal.Languages := demoCal.Languages;
end;

View File

@ -6,6 +6,7 @@
Originator : H Page-Clark, 2013/2016
Contributions : Ariel Rodriguez, 2013
Werner Pamler, 2013/2016
John Greetham, 2016
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
@ -82,6 +83,14 @@ const
SpanishMonths = 'Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre';
SpanishTexts = 'Hoy es,dd/mm/yyyy,Dias de fiestas,No hay dias feriados establecidos para';
ItalianDays = 'dom,lun,mar,mer,gio,ven,sab';
ItalianMonths = 'gennaio,febbraio,marzo,aprile,maggio,giugno,luglio,agosto,settembre,ottobre,novembre,dicembre';
ItalianTexts = 'Oggi è,dd/mmm/yyyy,Vacanze durante,Non ci sono vacanze fissati per';
PolishDays = 'nie,pon,wto,Śro,czw,pią,sob';
PolishMonths = 'Styczeń,Luty,Marzec,Kwiecień,Maj,Czerwiec,Lipiec,Sierpień,Wrzesień,Październik,Listopad,Grudzień';
PolishTexts = 'Dziś jest,dd/mmm/yyyy,urlop w czasie,Brak święta określone dla';
type
TCalendarLite = class;
@ -126,7 +135,7 @@ type
TCalSelMode = (smFirstSingle, smNextSingle, smFirstRange, smNextRange,
smFirstWeek, smNextWeek, smNextWeekRange);
TLanguage = (lgEnglish, lgFrench, lgGerman, lgHebrew, lgSpanish);
TLanguage = (lgEnglish, lgFrench, lgGerman, lgHebrew, lgSpanish, lgItalian, lgPolish);
{ TCalDateList }
@ -1791,6 +1800,18 @@ begin
DisplayTexts := SpanishTexts;
BiDiMode:= bdLeftToRight;
end;
lgItalian: begin
DayNames := ItalianDays;
MonthNames := ItalianMonths;
DisplayTexts := ItalianTexts;
BiDiMode:= bdLeftToRight;
end;
lgPolish: begin
DayNames := PolishDays;
MonthNames := PolishMonths;
DisplayTexts := PolishTexts;
BiDiMode:= bdLeftToRight;
end;
end;
Invalidate;