mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 21:38:00 +02:00
TCalendar: nicer errormessage if a date is smaller than MinDateTime or larger than MaxDateTime.
This commit is contained in:
parent
44aa22799c
commit
6167bca327
@ -282,6 +282,12 @@ end;
|
||||
|
||||
procedure TCustomCalendar.CheckRange(ADate, AMinDate, AMaxDate: TDateTime);
|
||||
begin
|
||||
//otherwise you get a message like "Invalid Date: 31-12-9999. Must be between 1-1-0001 and 31-12-9999"
|
||||
if (ADate < Trunc(SysUtils.MinDateTime)) then
|
||||
raise EInvalidDate.CreateFmt(rsDateTooSmall, [DateToStr(SysUtils.MinDateTime)]);
|
||||
if (ADate > Trunc(SysUtils.MaxDateTime)) then
|
||||
raise EInvalidDate.CreateFmt(rsDateTooLarge, [DateToStr(SysUtils.MaxDateTime)]);
|
||||
|
||||
if (ADate < AMinDate) or (ADate > AMaxDate) then
|
||||
raise EInvalidDate.CreateFmt(rsInvalidDateRangeHint, [DateToStr(ADate),
|
||||
DateToStr(AMinDate), DateToStr(AMaxDate)]);
|
||||
|
@ -221,6 +221,16 @@ msgstr ""
|
||||
msgid "Custom ..."
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
@ -217,6 +217,16 @@ msgstr "Schedarii di cursore"
|
||||
msgid "Custom ..."
|
||||
msgstr "Persunalizatu…"
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Predefinitu"
|
||||
|
@ -220,6 +220,16 @@ msgstr "Ukazatel"
|
||||
msgid "Custom ..."
|
||||
msgstr "Vlastní..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Výchozí"
|
||||
|
@ -219,6 +219,16 @@ msgstr "Zeiger"
|
||||
msgid "Custom ..."
|
||||
msgstr "Eigene ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Voreingestellt"
|
||||
|
@ -218,6 +218,16 @@ msgstr "Cursor"
|
||||
msgid "Custom ..."
|
||||
msgstr "Personalizado ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Predeterminado"
|
||||
|
@ -216,6 +216,16 @@ msgstr "Kursori"
|
||||
msgid "Custom ..."
|
||||
msgstr "Mukautetut ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Oletus"
|
||||
|
@ -218,6 +218,16 @@ msgstr "Curseur"
|
||||
msgid "Custom ..."
|
||||
msgstr "Personnalisé..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Par défaut"
|
||||
|
@ -220,6 +220,16 @@ msgstr "סמן"
|
||||
msgid "Custom ..."
|
||||
msgstr "מותאם אישית ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "ברירת מחדל"
|
||||
|
@ -218,6 +218,16 @@ msgstr "Kurzor"
|
||||
msgid "Custom ..."
|
||||
msgstr "Egyéni ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Alapértelmezett"
|
||||
|
@ -222,6 +222,16 @@ msgstr ""
|
||||
msgid "Custom ..."
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
@ -220,6 +220,16 @@ msgstr "cursore"
|
||||
msgid "Custom ..."
|
||||
msgstr "Personalizzato ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Standard"
|
||||
|
@ -218,6 +218,16 @@ msgstr "カーソルファイル"
|
||||
msgid "Custom ..."
|
||||
msgstr "カスタム色"
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "デフォルト色"
|
||||
|
@ -220,6 +220,16 @@ msgstr "Žymeklis"
|
||||
msgid "Custom ..."
|
||||
msgstr "Naudotojo…"
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Numatytasis"
|
||||
|
@ -223,6 +223,16 @@ msgstr "Cursor"
|
||||
msgid "Custom ..."
|
||||
msgstr "Aangepast ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Standaard"
|
||||
|
@ -220,6 +220,16 @@ msgstr ""
|
||||
msgid "Custom ..."
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
@ -219,6 +219,16 @@ msgstr "Kursor"
|
||||
msgid "Custom ..."
|
||||
msgstr "Inny..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Domyślny"
|
||||
|
@ -207,6 +207,16 @@ msgstr ""
|
||||
msgid "Custom ..."
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
@ -216,6 +216,16 @@ msgstr "Cursor"
|
||||
msgid "Custom ..."
|
||||
msgstr "Personalizado ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Padrão"
|
||||
|
@ -218,6 +218,16 @@ msgstr "Cursor"
|
||||
msgid "Custom ..."
|
||||
msgstr "Personalizado ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Padrão"
|
||||
|
@ -214,6 +214,16 @@ msgstr "Файлы курсоров"
|
||||
msgid "Custom ..."
|
||||
msgstr "Пользовательский ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "По умолчанию"
|
||||
|
@ -216,6 +216,16 @@ msgstr "Kurzorové súbory"
|
||||
msgid "Custom ..."
|
||||
msgstr "Vlastná ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Predvolené"
|
||||
|
@ -218,6 +218,16 @@ msgstr "İmleç"
|
||||
msgid "Custom ..."
|
||||
msgstr "Özel ..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "Varsayılan"
|
||||
|
@ -221,6 +221,16 @@ msgstr "Курсор"
|
||||
msgid "Custom ..."
|
||||
msgstr "Власний..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "За замовчуванням"
|
||||
|
@ -219,6 +219,16 @@ msgstr "光标"
|
||||
msgid "Custom ..."
|
||||
msgstr "自定义..."
|
||||
|
||||
#: lclstrconsts.rsdatetoolarge
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be past %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdatetoosmall
|
||||
#, object-pascal-format
|
||||
msgid "Date cannot be before %s"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.rsdefaultcolorcaption
|
||||
msgid "Default"
|
||||
msgstr "默认"
|
||||
|
@ -238,6 +238,8 @@ resourceString
|
||||
rsScrollBarOutOfRange = 'ScrollBar property out of range';
|
||||
rsInvalidDate = 'Invalid Date : %s';
|
||||
rsInvalidDateRangeHint = 'Invalid Date: %s. Must be between %s and %s';
|
||||
rsDateTooLarge = 'Date cannot be past %s';
|
||||
rsDateTooSmall = 'Date cannot be before %s';
|
||||
rsErrorOccurredInAtAddressFrame = 'Error occurred in %s at %sAddress %s%s'
|
||||
+' Frame %s';
|
||||
rsException = 'Exception';
|
||||
|
Loading…
Reference in New Issue
Block a user