From f5d94166a03c019385eaab8dfff21148800fba47 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 3 Oct 2022 21:26:03 +0000 Subject: [PATCH] tvplanit: Disable day offset parameters when not needed by element in VpEdElem git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8511 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/languages/vpsr.de.po | 35 +++++++++------- components/tvplanit/languages/vpsr.en.po | 35 ++++++++++------ components/tvplanit/languages/vpsr.fi.po | 35 ++++++++++------ components/tvplanit/languages/vpsr.fr.po | 44 ++++++++++++--------- components/tvplanit/languages/vpsr.nl.po | 33 ++++++++++------ components/tvplanit/languages/vpsr.pl.po | 35 ++++++++++------ components/tvplanit/languages/vpsr.pot | 33 ++++++++++------ components/tvplanit/languages/vpsr.ru.po | 35 ++++++++++------ components/tvplanit/source/include/vpsr.inc | 8 ++-- components/tvplanit/source/vpedelem.lfm | 6 +-- components/tvplanit/source/vpedelem.pas | 17 +++++--- components/tvplanit/source/vpedfmt.pas | 4 +- 12 files changed, 195 insertions(+), 125 deletions(-) diff --git a/components/tvplanit/languages/vpsr.de.po b/components/tvplanit/languages/vpsr.de.po index 64d67d390..2be03f1bc 100644 --- a/components/tvplanit/languages/vpsr.de.po +++ b/components/tvplanit/languages/vpsr.de.po @@ -176,16 +176,15 @@ msgstr "Abbrechen" msgid "Cannot edit this overlayed event." msgstr "Dieses überlagerte Ereignis kann nicht bearbeitet werden." -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "Beschriftung" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "Beschriftung" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "Beschriftung:" + #: vpsr.rscategory msgid "Category" msgstr "Kategorie" @@ -335,10 +334,26 @@ msgstr "Beliebiges Datum..." msgid "Daily" msgstr "Täglich" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "Datumsänderung" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "Einheit für Datumsänderung" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "Fehler: Tag wird benötigt." +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "Datumsversatz" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "Einheit für Datumsversatz" + #: vpsr.rsdays msgid "Days" msgstr "Tage" @@ -747,7 +762,7 @@ msgstr "Monatsansicht" #: vpsr.rsnameisrequired msgid "Error: Name cannot be empty." -msgstr "Fehler: Name muss angegeben sein." +msgstr "Fehler: Name muss angegeben werden." #: vpsr.rsnamelbl msgid "Name:" @@ -1344,14 +1359,6 @@ msgstr "Text" msgid "Thursday" msgstr "Donnerstag" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "Zeitintervall:" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "Einheit:" - #: vpsr.rstitle msgid "Title" msgstr "Titel" diff --git a/components/tvplanit/languages/vpsr.en.po b/components/tvplanit/languages/vpsr.en.po index 1df603a30..f8c979b79 100644 --- a/components/tvplanit/languages/vpsr.en.po +++ b/components/tvplanit/languages/vpsr.en.po @@ -9,6 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 3.1.1\n" #: vpsr.rs1day @@ -176,16 +177,15 @@ msgstr "Cancel" msgid "Cannot edit this overlayed event." msgstr "Cannot edit this overlayed event." -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "Caption" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "Caption" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "Caption:" + #: vpsr.rscategory msgid "Category" msgstr "Category" @@ -334,10 +334,26 @@ msgstr "Custom date..." msgid "Daily" msgstr "Daily" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "Day increment:" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "Day increment units" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "Error: Day is required." +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "Day offset" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "Day offset units" + #: vpsr.rsdays msgid "Days" msgstr "Days" @@ -744,6 +760,7 @@ msgid "Error: Name cannot be empty." msgstr "Error: Name cannot be empty." #: vpsr.rsnamelbl +#| msgid "Name:" msgid "Name:" msgstr "Name:" @@ -1326,14 +1343,6 @@ msgstr "Text" msgid "Thursday" msgstr "Thursday" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "Time increment:" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "Time increment units:" - #: vpsr.rstitle msgid "Title" msgstr "Title" diff --git a/components/tvplanit/languages/vpsr.fi.po b/components/tvplanit/languages/vpsr.fi.po index 7b66619bc..86cfbd1fe 100644 --- a/components/tvplanit/languages/vpsr.fi.po +++ b/components/tvplanit/languages/vpsr.fi.po @@ -166,16 +166,15 @@ msgstr "" msgid "Cannot edit this overlayed event." msgstr "" -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "" + #: vpsr.rscategory msgid "Category" msgstr "" @@ -325,10 +324,26 @@ msgstr "" msgid "Daily" msgstr "Päivittäin" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "" +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "" + #: vpsr.rsdays msgid "Days" msgstr "" @@ -741,6 +756,8 @@ msgid "Error: Name cannot be empty." msgstr "" #: vpsr.rsnamelbl +#, fuzzy +#| msgid "Name:" msgid "Name:" msgstr "Nimi:" @@ -1333,14 +1350,6 @@ msgstr "" msgid "Thursday" msgstr "Torstai" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "" - #: vpsr.rstitle msgid "Title" msgstr "" diff --git a/components/tvplanit/languages/vpsr.fr.po b/components/tvplanit/languages/vpsr.fr.po index d5d5a7d0d..a8994a57f 100644 --- a/components/tvplanit/languages/vpsr.fr.po +++ b/components/tvplanit/languages/vpsr.fr.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2022-09-12 19:03+0200\n" +"PO-Revision-Date: 2022-10-03 23:23+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr_FR\n" @@ -112,7 +112,7 @@ msgstr "L'heure de la fin ne peut pas être avant l'heure du début" #: vpsr.rsbaditemtype msgid "Invalid item type " -msgstr "Type d'élément non valide" +msgstr "Type d'élément non valide " #: vpsr.rsbadmeasurement msgid "Invalid measurement" @@ -182,16 +182,15 @@ msgstr "Annuler" msgid "Cannot edit this overlayed event." msgstr "" -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "" + #: vpsr.rscategory msgid "Category" msgstr "Catégorie" @@ -341,10 +340,26 @@ msgstr "" msgid "Daily" msgstr "Quotidien" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "Erreur: Il faut choisir un jour" +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "" + #: vpsr.rsdays msgid "Days" msgstr "Jours" @@ -1348,14 +1363,6 @@ msgstr "" msgid "Thursday" msgstr "Jeudi" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "" - #: vpsr.rstitle msgid "Title" msgstr "Titre" @@ -1396,7 +1403,7 @@ msgid "Tuesday" msgstr "Mardi" #: vpsr.rsunabletoopen -#, object-pascal-format, fuzzy, badformat +#, fuzzy, object-pascal-format #| msgid "Error: Unable to open " msgid "Error: Unable to open %s" msgstr "Erreur: Incapable d'ouvrir" @@ -1706,7 +1713,7 @@ msgid "Invalid XML Character found" msgstr "Caractère XML non valide trouvé" #: vpsr.sinvalidxmlversion -#, object-pascal-format, fuzzy, badformat +#, fuzzy, object-pascal-format msgid "XMLPartner does not support XML specification greater than %s" msgstr "XMLPartner ne supporte pas la spécification XML supérieure à" @@ -1815,11 +1822,10 @@ msgid "End of input while looking for delimiter: " msgstr "Fin de l'entrée tout en recherchant delimiter:" #: vpsr.sunknownaxis -#, object-pascal-format, fuzzy, badformat +#, fuzzy, object-pascal-format msgid "Unknown axis specifier: %s" msgstr "Spécificateur d'axe inconnu" #: vpsr.sxmldecnotatbeg msgid "The XML declaration must appear before the first element" msgstr "La déclaration XML doit apparaître avant le premier élément" - diff --git a/components/tvplanit/languages/vpsr.nl.po b/components/tvplanit/languages/vpsr.nl.po index e34c88b87..954406858 100644 --- a/components/tvplanit/languages/vpsr.nl.po +++ b/components/tvplanit/languages/vpsr.nl.po @@ -176,16 +176,15 @@ msgstr "Afbreken" msgid "Cannot edit this overlayed event." msgstr "" -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "" + #: vpsr.rscategory msgid "Category" msgstr "Categorie" @@ -335,10 +334,26 @@ msgstr "" msgid "Daily" msgstr "Dagelijks" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "Fout: Dag is verplicht" +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "" + #: vpsr.rsdays msgid "Days" msgstr "Dagen" @@ -1344,14 +1359,6 @@ msgstr "" msgid "Thursday" msgstr "Donderdag" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "" - #: vpsr.rstitle msgid "Title" msgstr "Titel" diff --git a/components/tvplanit/languages/vpsr.pl.po b/components/tvplanit/languages/vpsr.pl.po index f03915402..7ffed478f 100644 --- a/components/tvplanit/languages/vpsr.pl.po +++ b/components/tvplanit/languages/vpsr.pl.po @@ -176,16 +176,15 @@ msgstr "Anuluj" msgid "Cannot edit this overlayed event." msgstr "Nie można edytować nakładającego się wydarzenia." -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "Etykieta" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "Etykieta" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "" + #: vpsr.rscategory msgid "Category" msgstr "Kategoria" @@ -335,10 +334,26 @@ msgstr "" msgid "Daily" msgstr "Dzienny" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "Błąd: Wprowadź dzień." +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "" + #: vpsr.rsdays msgid "Days" msgstr "Dni" @@ -750,6 +765,8 @@ msgid "Error: Name cannot be empty." msgstr "Błąd: Nazwa nie może być pusta." #: vpsr.rsnamelbl +#, fuzzy +#| msgid "Name:" msgid "Name:" msgstr "Imię:" @@ -1343,14 +1360,6 @@ msgstr "Tekst" msgid "Thursday" msgstr "Czwartek" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "Zmiana czasu:" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "Interwał:" - #: vpsr.rstitle msgid "Title" msgstr "Tytuł" diff --git a/components/tvplanit/languages/vpsr.pot b/components/tvplanit/languages/vpsr.pot index 2df835fff..dca307526 100644 --- a/components/tvplanit/languages/vpsr.pot +++ b/components/tvplanit/languages/vpsr.pot @@ -166,16 +166,15 @@ msgstr "" msgid "Cannot edit this overlayed event." msgstr "" -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "" + #: vpsr.rscategory msgid "Category" msgstr "" @@ -324,10 +323,26 @@ msgstr "" msgid "Daily" msgstr "" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "" +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "" + #: vpsr.rsdays msgid "Days" msgstr "" @@ -1316,14 +1331,6 @@ msgstr "" msgid "Thursday" msgstr "" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "" - #: vpsr.rstitle msgid "Title" msgstr "" diff --git a/components/tvplanit/languages/vpsr.ru.po b/components/tvplanit/languages/vpsr.ru.po index 34753c016..0a0f64b0b 100644 --- a/components/tvplanit/languages/vpsr.ru.po +++ b/components/tvplanit/languages/vpsr.ru.po @@ -176,16 +176,15 @@ msgstr "Отмена" msgid "Cannot edit this overlayed event." msgstr "" -#: vpsr.rscaption -msgctxt "vpsr.rscaption" -msgid "Caption" -msgstr "Заголовок" - #: vpsr.rscaptionelement msgctxt "vpsr.rscaptionelement" msgid "Caption" msgstr "Заголовок" +#: vpsr.rscaptionlbl +msgid "Caption:" +msgstr "" + #: vpsr.rscategory msgid "Category" msgstr "Категория" @@ -335,10 +334,26 @@ msgstr "" msgid "Daily" msgstr "Ежедневное" +#: vpsr.rsdayinclbl +msgid "Day increment:" +msgstr "" + +#: vpsr.rsdayincunits +msgid "Day increment units" +msgstr "" + #: vpsr.rsdayisrequired msgid "Error: Day is required." msgstr "Ошибка: Необходимо указать день" +#: vpsr.rsdayoffsetcaption +msgid "Day offset" +msgstr "" + +#: vpsr.rsdayoffsetunits +msgid "Day offset units" +msgstr "" + #: vpsr.rsdays msgid "Days" msgstr "Дни" @@ -750,6 +765,8 @@ msgid "Error: Name cannot be empty." msgstr "Ошибка: Имя не может быть пустым." #: vpsr.rsnamelbl +#, fuzzy +#| msgid "Name:" msgid "Name:" msgstr "Имя:" @@ -1342,14 +1359,6 @@ msgstr "" msgid "Thursday" msgstr "Четверг" -#: vpsr.rstimeinclbl -msgid "Time increment:" -msgstr "" - -#: vpsr.rstimeincunits -msgid "Time increment units:" -msgstr "" - #: vpsr.rstitle msgid "Title" msgstr "Заголовок" diff --git a/components/tvplanit/source/include/vpsr.inc b/components/tvplanit/source/include/vpsr.inc index dff2ead9e..2f047cdc5 100644 --- a/components/tvplanit/source/include/vpsr.inc +++ b/components/tvplanit/source/include/vpsr.inc @@ -388,8 +388,10 @@ resourcestring { Print Format Item Editor } RSEditFormatCaption = 'Edit format'; RSNameLbl = 'Name:'; - RSTimeIncLbl = 'Time increment:'; - RSTimeIncUnits = 'Time increment units:'; + RSDayIncLbl = 'Day increment:'; + RSDayIncUnits = 'Day increment units'; + RSDayOffsetCaption = 'Day offset'; + RSDayOffsetUnits = 'Day offset units'; { Format element editor } RSEditElementCaption = 'Edit element'; @@ -413,7 +415,7 @@ resourcestring RSWidth = 'Width'; RSHeight = 'Height'; RSVisible = 'Visible'; - RSCaption = 'Caption'; + RSCaptionLbl = 'Caption:'; RSTextCaption = 'Text'; RSShapeBtn = 'Shape...'; RSFontBtn = 'Font...'; diff --git a/components/tvplanit/source/vpedelem.lfm b/components/tvplanit/source/vpedelem.lfm index 846964c3a..b5868691a 100644 --- a/components/tvplanit/source/vpedelem.lfm +++ b/components/tvplanit/source/vpedelem.lfm @@ -463,7 +463,7 @@ object frmEditElement: TfrmEditElement TabOrder = 0 end end - object Panel2: TPanel + object DayOffsetPanel: TPanel Left = 12 Height = 51 Top = 152 @@ -478,7 +478,7 @@ object frmEditElement: TfrmEditElement ClientWidth = 451 TabOrder = 2 object gbDayOffset: TGroupBox - AnchorSideTop.Control = Panel2 + AnchorSideTop.Control = DayOffsetPanel AnchorSideBottom.Control = rgDayOffsetUnit AnchorSideBottom.Side = asrBottom Left = 0 @@ -528,7 +528,7 @@ object frmEditElement: TfrmEditElement object rgDayOffsetUnit: TRadioGroup AnchorSideLeft.Control = gbDayOffset AnchorSideLeft.Side = asrBottom - AnchorSideRight.Control = Panel2 + AnchorSideRight.Control = DayOffsetPanel AnchorSideRight.Side = asrBottom Left = 108 Height = 51 diff --git a/components/tvplanit/source/vpedelem.pas b/components/tvplanit/source/vpedelem.pas index e8330dfcb..a245de8dd 100644 --- a/components/tvplanit/source/vpedelem.pas +++ b/components/tvplanit/source/vpedelem.pas @@ -56,7 +56,7 @@ type gbDayOffset: TGroupBox; lblName: TLabel; Panel1: TPanel; - Panel2: TPanel; + DayOffsetPanel: TPanel; ButtonPanel: TPanel; ItemTypePanel: TPanel; HeightWidthPanel: TPanel; @@ -282,8 +282,8 @@ begin rgItemType.Items[6] := RSTasksElement; rgItemType.Items[7] := RSContactsElement; - gbDayOffset.Caption := RSTimeIncLbl; - rgDayOffsetUnit.Caption := RSTimeIncUnits; + gbDayOffset.Caption := RSDayOffsetCaption; + rgDayOffsetUnit.Caption := RSDayOffsetUnits; rgDayOffsetUnit.Items[0] := RSDays; rgDayOffsetUnit.Items[1] := RSWeeks; rgDayOffsetUnit.Items[2] := RSMonths; @@ -301,7 +301,7 @@ begin lblHeight.Caption := RSHeight; chkVisible.Caption := RSVisible; - gbCaption.Caption := RSCaption; + gbCaption.Caption := RSCaptionLbl; lblCaptionText.Caption := RSTextCaption; btnCaptionFont.Caption := RSFontBtn; btnShape.Caption := RSShapeBtn; @@ -354,15 +354,20 @@ begin end; procedure TfrmEditElement.SetItemType(Index : Integer); +var + itemType: TVpItemType; begin rgItemType.ItemIndex := Index; + itemType := TVpItemType(Index); - btnShape.Enabled := TVpItemType(Index) = itShape; + btnShape.Enabled := itemType = itShape; - gbCaption.Enabled := TVpItemType(Index) = itCaption; + gbCaption.Enabled := itemType = itCaption; edCaptionText.Enabled := gbCaption.Enabled; lblCaptionText.Enabled := gbCaption.Enabled; btnCaptionFont.Enabled := gbCaption.Enabled; + + DayOffsetPanel.Enabled := itemType in [itDayView, itWeekView, itMonthView, itCalendar]; end; procedure TfrmEditElement.SetMaxSpin(Spin : Integer); diff --git a/components/tvplanit/source/vpedfmt.pas b/components/tvplanit/source/vpedfmt.pas index 4e1e8f01f..c2bf5d83c 100644 --- a/components/tvplanit/source/vpedfmt.pas +++ b/components/tvplanit/source/vpedfmt.pas @@ -144,8 +144,8 @@ begin Caption := RSEditFormatCaption; LblName.Caption := RSNameLbl; LblDescription.Caption := RSDescriptionLbl; - LblIncrement.Caption := RsTimeIncLbl; - rgDayIncrement.Caption := RsTimeIncUnits; + LblIncrement.Caption := RSDayIncLbl; + rgDayIncrement.Caption := RsDayIncUnits; rgDayIncrement.Items[0] := RSDays; rgDayIncrement.Items[1] := RSWeeks; rgDayIncrement.Items[2] := RSMonths;