diff --git a/applications/json_packager/jsonpackage.lpi b/applications/json_packager/jsonpackage.lpi index d300e66a8..c671fe790 100644 --- a/applications/json_packager/jsonpackage.lpi +++ b/applications/json_packager/jsonpackage.lpi @@ -28,7 +28,8 @@ - + + diff --git a/applications/json_packager/jsonpackage.lps b/applications/json_packager/jsonpackage.lps index d47066624..e55ff50ab 100644 --- a/applications/json_packager/jsonpackage.lps +++ b/applications/json_packager/jsonpackage.lps @@ -10,7 +10,7 @@ - + @@ -20,21 +20,20 @@ - - + + + - - - - + + - + - - - + + + @@ -42,7 +41,7 @@ - + @@ -50,7 +49,7 @@ - + @@ -356,7 +355,7 @@ - + @@ -364,133 +363,136 @@ - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/applications/json_packager/jsonpackage.res b/applications/json_packager/jsonpackage.res index 2abeaecc3..754adc445 100644 Binary files a/applications/json_packager/jsonpackage.res and b/applications/json_packager/jsonpackage.res differ diff --git a/applications/json_packager/locale/jsoneditor.en.mo b/applications/json_packager/locale/jsoneditor.en.mo index a69444cf7..44cd33bd2 100644 Binary files a/applications/json_packager/locale/jsoneditor.en.mo and b/applications/json_packager/locale/jsoneditor.en.mo differ diff --git a/applications/json_packager/locale/jsoneditor.en.po b/applications/json_packager/locale/jsoneditor.en.po index d6a95635e..016085cfe 100644 --- a/applications/json_packager/locale/jsoneditor.en.po +++ b/applications/json_packager/locale/jsoneditor.en.po @@ -13,16 +13,18 @@ msgstr "" #: tfrmmain.chk_disableinopm.caption msgid "Disable in OPM" -msgstr "" +msgstr "Disable in OPM" + +#: tfrmmain.chk_disableinopm.hint +msgid "Warning! This will disable installing or updating your package in OPM" +msgstr "Warning! This will disable installing or updating your package in OPM" #: tfrmmain.cmd_addpackagefile.caption -#, fuzzy msgctxt "tfrmmain.cmd_addpackagefile.caption" msgid "Add" msgstr "Add" #: tfrmmain.cmd_addpackagefile.hint -#, fuzzy msgctxt "tfrmmain.cmd_addpackagefile.hint" msgid "" "Add Package File:\n" @@ -38,13 +40,11 @@ msgid "&Close" msgstr "&Close" #: tfrmmain.cmd_removelastpackagefile.caption -#, fuzzy msgctxt "tfrmmain.cmd_removelastpackagefile.caption" msgid "Remove" msgstr "Remove" #: tfrmmain.cmd_removelastpackagefile.hint -#, fuzzy msgctxt "tfrmmain.cmd_removelastpackagefile.hint" msgid "" "Remove Package File:\n" @@ -66,7 +66,6 @@ msgstr "" "as a JSON update file\n" #: tfrmmain.edt_downloadzipurl.hint -#, fuzzy msgctxt "tfrmmain.edt_downloadzipurl.hint" msgid "" "Download URL:\n" @@ -76,7 +75,6 @@ msgstr "" "Include the FULL url needed to download the package Zip file\n" #: tfrmmain.edt_updatezipname.hint -#, fuzzy msgctxt "tfrmmain.edt_updatezipname.hint" msgid "" "Update Zip Name:\n" @@ -108,19 +106,16 @@ msgid "Save As" msgstr "Save As" #: tfrmmain.lbl_downloadzipurl.caption -#, fuzzy msgctxt "tfrmmain.lbl_downloadzipurl.caption" msgid "Download URL:" msgstr "Download URL:" #: tfrmmain.lbl_packagefiles.caption -#, fuzzy msgctxt "tfrmmain.lbl_packagefiles.caption" msgid "Package Files:" msgstr "Package Files:" #: tfrmmain.lbl_updatezipname.caption -#, fuzzy msgctxt "tfrmmain.lbl_updatezipname.caption" msgid "Update Zip Name:" msgstr "Update Zip Name:" @@ -131,7 +126,7 @@ msgstr "Load..." #: tfrmmain.mnu_fileexit.caption msgid "E&xit" -msgstr "" +msgstr "E&xit" #: tfrmmain.mnu_filenew.caption msgid "New" @@ -192,13 +187,23 @@ msgid "Check URL" msgstr "Check URL" #: tfrmmain.spd_checkurl.hint -msgid "Attempting to Open URL" -msgstr "Attempting to Open URL" +#, fuzzy +#| msgid "" +#| "Check URL:\n" +#| "Attempts to open the URL in your browser\n" +msgid "Attempts to open the URL in your browser" +msgstr "" +"Check URL:\n" +"Attempts to open the URL in your browser\n" #: umain.rsabout msgid "About" msgstr "About" +#: umain.rscheckthisify +msgid "Check this if you don't want to incrememt the package version" +msgstr "Check this if you don't want to incrememt the package version" + #: umain.rscompiledwith2 msgid "Compiled with FPC V:%s and Lazarus V:%d.%d%s for the %s - %s platform%s%s" msgstr "Compiled with FPC V:%s and Lazarus V:%d.%d%s for the %s - %s platform%s%s" @@ -223,10 +228,18 @@ msgstr "- Download URL should start with \"http\"" msgid "JSON may be unsaved. Are you sure you want to quit?" msgstr "JSON may be unsaved. Are you sure you want to quit?" +#: umain.rsfilename +msgid "Filename: " +msgstr "Filename: " + #: umain.rsfixthentryag msgid "Fix, then try again." msgstr "Fix, then try again." +#: umain.rsformatisnnnn +msgid "Package version:%sFormat is: n.n.n.n" +msgstr "Package version:%sFormat is: n.n.n.n" + #: umain.rshelpandinfor msgid "Help and Information" msgstr "Help and Information" @@ -235,22 +248,33 @@ msgstr "Help and Information" msgid "http://www.updatesite.com/myupdate/mypackagename.zip" msgstr "http://www.updatesite.com/myupdate/mypackagename.zip" +#: umain.rsinternalvers +msgid "Internal Version: " +msgstr "Internal Version: " + +#: umain.rsinternalvers2 +msgid "Internal version number should not be Zero%s" +msgstr "Internal version number should not be Zero%s" + #: umain.rslanguagechan msgid "Language changed to \"%s\"." msgstr "Language changed to \"%s\"." #: umain.rsmypackagelpk -#, fuzzy #| msgid "mypackagename.zip" msgctxt "umain.rsmypackagelpk" msgid "mypackagename.lpk" -msgstr "mypackagename.zip" +msgstr "mypackagename.lpk" #: umain.rsmypackagenam msgctxt "umain.rsmypackagenam" msgid "mypackagename.zip" msgstr "mypackagename.zip" +#: umain.rsnotifyupdate +msgid "Notify Update" +msgstr "Notify Update" + #: umain.rsoneofthereq1 msgid "One of the required fields is missing or wrong." msgstr "One of the required fields is missing or wrong." @@ -259,10 +283,18 @@ msgstr "One of the required fields is missing or wrong." msgid "One or more of the required fields are missing or wrong." msgstr "One or more of the required fields are missing or wrong." +#: umain.rsopeningyourb +msgid "Opening your browser..." +msgstr "Opening your browser..." + #: umain.rsoverwrite msgid "Overwrite" msgstr "Overwrite" +#: umain.rspackagedinfo +msgid "Package #%d Information" +msgstr "Package #%d Information" + #: umain.rssavedok msgid "Saved OK" msgstr "Saved OK" @@ -291,15 +323,26 @@ msgstr "The .lpk entry #%d is missing the .lpk extension" msgid "The .lpk entry #%d is is absent" msgstr "The .lpk entry #%d is is absent" +#: umain.rsthepackagefi +msgid "The package filename (No path e.g. package.lpk)" +msgstr "The package filename (No path e.g. package.lpk)" + #: umain.rsthereareoneo msgid "- There are one or more .lpk entries with the same name.%s- Every .lpk entry must have a unique name." msgstr "- There are one or more .lpk entries with the same name.%s- Every .lpk entry must have a unique name." +#: umain.rstherewasapro +msgid "There was a problem loading \"%s\" - is it corrupted or in the wrong format?" +msgstr "There was a problem loading \"%s\" - is it corrupted or in the wrong format?" + #: umain.rsthisoptionsh -#, fuzzy #| msgid "This option should only be used for crucial updates or bug-fixed packages. Are you OK with that?" msgid "This option should only be used for crucial updates or bug-fixed packages." -msgstr "This option should only be used for crucial updates or bug-fixed packages. Are you OK with that?" +msgstr "This option should only be used for crucial updates or bug-fixed packages." + +#: umain.rsthiswilldisa +msgid "This will disable your package in OnlinePackageManager!%sAre you SURE you want to do this?" +msgstr "This will disable your package in OnlinePackageManager!%sAre you SURE you want to do this?" #: umain.rsturnhintsoff msgid "(You can toggle these hints on/off in the Help menu)" @@ -321,6 +364,18 @@ msgstr "- Update zip name is too short or missing" msgid "- Update zip name missing extension \".zip\"" msgstr "- Update zip name missing extension \".zip\"" +#: umain.rsuseincombina +msgid "Use in combination with %s" +msgstr "Use in combination with %s" + +#: umain.rsversion +msgid "Version: " +msgstr "Version: " + +#: umain.rsversionforpa +msgid "Version for package %d is zero" +msgstr "Version for package %d is zero" + #: umain.rswouldyoulike msgid "Would you like to copy %s to the %s folder?" msgstr "Would you like to copy %s to the %s folder?" diff --git a/applications/json_packager/locale/jsoneditor.es.po b/applications/json_packager/locale/jsoneditor.es.po index 4a2646030..4221fc0fc 100644 --- a/applications/json_packager/locale/jsoneditor.es.po +++ b/applications/json_packager/locale/jsoneditor.es.po @@ -16,6 +16,10 @@ msgstr "" msgid "Disable in OPM" msgstr "" +#: tfrmmain.chk_disableinopm.hint +msgid "Warning! This will disable installing or updating your package in OPM" +msgstr "" + #: tfrmmain.cmd_addpackagefile.caption #, fuzzy msgctxt "tfrmmain.cmd_addpackagefile.caption" @@ -193,13 +197,21 @@ msgid "Check URL" msgstr "Verificar URL" #: tfrmmain.spd_checkurl.hint -msgid "Attempting to Open URL" +#, fuzzy +#| msgid "" +#| "Check URL:\n" +#| "Attempts to open the URL in your browser\n" +msgid "Attempts to open the URL in your browser" msgstr "Intentando Abrir URL" #: umain.rsabout msgid "About" msgstr "Acerca de" +#: umain.rscheckthisify +msgid "Check this if you don't want to incrememt the package version" +msgstr "" + #: umain.rscompiledwith2 msgid "Compiled with FPC V:%s and Lazarus V:%d.%d%s for the %s - %s platform%s%s" msgstr "Compilado con FPC V:%s y Lazarus V:%d.%d%s para la plataforma %s - %s%s%s" @@ -224,10 +236,18 @@ msgstr "- URL de descarga debe empezar con \"http\"" msgid "JSON may be unsaved. Are you sure you want to quit?" msgstr "JSON puede estar sin guardar. ¿Está seguro que desea salir?" +#: umain.rsfilename +msgid "Filename: " +msgstr "" + #: umain.rsfixthentryag msgid "Fix, then try again." msgstr "Arréglalo, luego intenta de nuevo." +#: umain.rsformatisnnnn +msgid "Package version:%sFormat is: n.n.n.n" +msgstr "" + #: umain.rshelpandinfor msgid "Help and Information" msgstr "Ayuda e Información" @@ -236,6 +256,14 @@ msgstr "Ayuda e Información" msgid "http://www.updatesite.com/myupdate/mypackagename.zip" msgstr "http://www.sitioactualizacion.com/miactualizacion/nombredemipaquete.zip" +#: umain.rsinternalvers +msgid "Internal Version: " +msgstr "" + +#: umain.rsinternalvers2 +msgid "Internal version number should not be Zero%s" +msgstr "" + #: umain.rslanguagechan msgid "Language changed to \"%s\"." msgstr "Idioma cambiado a \"%s\"." @@ -252,6 +280,10 @@ msgctxt "umain.rsmypackagenam" msgid "mypackagename.zip" msgstr "nombredemipaquete.zip" +#: umain.rsnotifyupdate +msgid "Notify Update" +msgstr "" + #: umain.rsoneofthereq1 msgid "One of the required fields is missing or wrong." msgstr "Uno de los campos requeridos esta vacío o mal." @@ -260,10 +292,18 @@ msgstr "Uno de los campos requeridos esta vacío o mal." msgid "One or more of the required fields are missing or wrong." msgstr "Uno o mas de los capos requeridos esta vacío o mal." +#: umain.rsopeningyourb +msgid "Opening your browser..." +msgstr "" + #: umain.rsoverwrite msgid "Overwrite" msgstr "Sobreescribir" +#: umain.rspackagedinfo +msgid "Package #%d Information" +msgstr "" + #: umain.rssavedok msgid "Saved OK" msgstr "Guardado OK" @@ -292,16 +332,28 @@ msgstr "La entrada .lpk #%d no tiene la extensión .lpk" msgid "The .lpk entry #%d is is absent" msgstr "La entrada .lpk #%d está vacía" +#: umain.rsthepackagefi +msgid "The package filename (No path e.g. package.lpk)" +msgstr "" + #: umain.rsthereareoneo msgid "- There are one or more .lpk entries with the same name.%s- Every .lpk entry must have a unique name." msgstr "- Hay una o más entradas .lpk con el mismo nombre.%s- Cada entrada .lpk debe tener un nombre único." +#: umain.rstherewasapro +msgid "There was a problem loading \"%s\" - is it corrupted or in the wrong format?" +msgstr "" + #: umain.rsthisoptionsh #, fuzzy #| msgid "This option should only be used for crucial updates or bug-fixed packages. Are you OK with that?" msgid "This option should only be used for crucial updates or bug-fixed packages." msgstr "Esta opción debe ser usada solamente para actualizaciones cruciales o paquetes con arreglos de bugs. ¿Estás de acuerdo con esto?" +#: umain.rsthiswilldisa +msgid "This will disable your package in OnlinePackageManager!%sAre you SURE you want to do this?" +msgstr "" + #: umain.rsturnhintsoff msgid "(You can toggle these hints on/off in the Help menu)" msgstr "(Puedes cambiar estos consejos en el menú Ayuda)" @@ -322,6 +374,18 @@ msgstr "- El nombre del zip es muy corto o está vacío" msgid "- Update zip name missing extension \".zip\"" msgstr "- El nombre del zip no tiene la extensión \".zip\"" +#: umain.rsuseincombina +msgid "Use in combination with %s" +msgstr "" + +#: umain.rsversion +msgid "Version: " +msgstr "" + +#: umain.rsversionforpa +msgid "Version for package %d is zero" +msgstr "" + #: umain.rswouldyoulike msgid "Would you like to copy %s to the %s folder?" msgstr "¿Quieres copiar %s a la carpeta %s?" diff --git a/applications/json_packager/locale/jsoneditor.po b/applications/json_packager/locale/jsoneditor.po index 610086f0c..cd673bad8 100644 --- a/applications/json_packager/locale/jsoneditor.po +++ b/applications/json_packager/locale/jsoneditor.po @@ -16,6 +16,10 @@ msgstr "" msgid "Disable in OPM" msgstr "" +#: tfrmmain.chk_disableinopm.hint +msgid "Warning! This will disable installing or updating your package in OPM" +msgstr "" + #: tfrmmain.cmd_addpackagefile.caption msgctxt "tfrmmain.cmd_addpackagefile.caption" msgid "Add" @@ -169,13 +173,17 @@ msgid "Check URL" msgstr "" #: tfrmmain.spd_checkurl.hint -msgid "Attempting to Open URL" +msgid "Attempts to open the URL in your browser" msgstr "" #: umain.rsabout msgid "About" msgstr "" +#: umain.rscheckthisify +msgid "Check this if you don't want to incrememt the package version" +msgstr "" + #: umain.rscompiledwith2 msgid "Compiled with FPC V:%s and Lazarus V:%d.%d%s for the %s - %s platform%s%s" msgstr "" @@ -200,10 +208,18 @@ msgstr "" msgid "JSON may be unsaved. Are you sure you want to quit?" msgstr "" +#: umain.rsfilename +msgid "Filename: " +msgstr "" + #: umain.rsfixthentryag msgid "Fix, then try again." msgstr "" +#: umain.rsformatisnnnn +msgid "Package version:%sFormat is: n.n.n.n" +msgstr "" + #: umain.rshelpandinfor msgid "Help and Information" msgstr "" @@ -212,6 +228,14 @@ msgstr "" msgid "http://www.updatesite.com/myupdate/mypackagename.zip" msgstr "" +#: umain.rsinternalvers +msgid "Internal Version: " +msgstr "" + +#: umain.rsinternalvers2 +msgid "Internal version number should not be Zero%s" +msgstr "" + #: umain.rslanguagechan msgid "Language changed to \"%s\"." msgstr "" @@ -226,6 +250,10 @@ msgctxt "umain.rsmypackagenam" msgid "mypackagename.zip" msgstr "" +#: umain.rsnotifyupdate +msgid "Notify Update" +msgstr "" + #: umain.rsoneofthereq1 msgid "One of the required fields is missing or wrong." msgstr "" @@ -234,10 +262,18 @@ msgstr "" msgid "One or more of the required fields are missing or wrong." msgstr "" +#: umain.rsopeningyourb +msgid "Opening your browser..." +msgstr "" + #: umain.rsoverwrite msgid "Overwrite" msgstr "" +#: umain.rspackagedinfo +msgid "Package #%d Information" +msgstr "" + #: umain.rssavedok msgid "Saved OK" msgstr "" @@ -266,14 +302,26 @@ msgstr "" msgid "The .lpk entry #%d is is absent" msgstr "" +#: umain.rsthepackagefi +msgid "The package filename (No path e.g. package.lpk)" +msgstr "" + #: umain.rsthereareoneo msgid "- There are one or more .lpk entries with the same name.%s- Every .lpk entry must have a unique name." msgstr "" +#: umain.rstherewasapro +msgid "There was a problem loading \"%s\" - is it corrupted or in the wrong format?" +msgstr "" + #: umain.rsthisoptionsh msgid "This option should only be used for crucial updates or bug-fixed packages." msgstr "" +#: umain.rsthiswilldisa +msgid "This will disable your package in OnlinePackageManager!%sAre you SURE you want to do this?" +msgstr "" + #: umain.rsturnhintsoff msgid "(You can toggle these hints on/off in the Help menu)" msgstr "" @@ -294,6 +342,18 @@ msgstr "" msgid "- Update zip name missing extension \".zip\"" msgstr "" +#: umain.rsuseincombina +msgid "Use in combination with %s" +msgstr "" + +#: umain.rsversion +msgid "Version: " +msgstr "" + +#: umain.rsversionforpa +msgid "Version for package %d is zero" +msgstr "" + #: umain.rswouldyoulike msgid "Would you like to copy %s to the %s folder?" msgstr "" diff --git a/applications/json_packager/umain.lfm b/applications/json_packager/umain.lfm index 149ee6b23..1e33c501f 100644 --- a/applications/json_packager/umain.lfm +++ b/applications/json_packager/umain.lfm @@ -1,7 +1,7 @@ object frmMain: TfrmMain - Left = 588 + Left = 852 Height = 398 - Top = 157 + Top = 171 Width = 618 Anchors = [] BorderIcons = [biSystemMenu] @@ -179,7 +179,7 @@ object frmMain: TfrmMain AnchorSideRight.Control = chk_DisableInOPM Left = 438 Height = 19 - Hint = 'Attempting to Open URL' + Hint = 'Attempts to open the URL in your browser' Top = 88 Width = 61 Anchors = [akTop, akRight] @@ -191,6 +191,7 @@ object frmMain: TfrmMain object chk_DisableInOPM: TCheckBox Left = 507 Height = 19 + Hint = 'Warning! This will disable installing or updating your package in OPM' Top = 88 Width = 101 Anchors = [akTop, akRight] @@ -200,7 +201,7 @@ object frmMain: TfrmMain OnMouseUp = chk_DisableInOPMMouseUp TabOrder = 6 end - object sbPackageFiles: TScrollBox + object sb_PackageFiles: TScrollBox Left = 8 Height = 166 Top = 160 diff --git a/applications/json_packager/umain.lrj b/applications/json_packager/umain.lrj index be50885eb..278984feb 100644 --- a/applications/json_packager/umain.lrj +++ b/applications/json_packager/umain.lrj @@ -13,8 +13,9 @@ {"hash":2857157,"name":"tfrmmain.cmd_save.caption","sourcebytes":[38,83,97,118,101],"value":"&Save"}, {"hash":244237216,"name":"tfrmmain.sb_editname.hint","sourcebytes":[85,112,100,97,116,101,32,90,105,112,32,78,97,109,101,58,13,10,67,108,105,99,107,32,116,104,105,115,32,116,111,32,98,114,111,119,115,101,32,121,111,117,114,32,115,121,115,116,101,109,32,116,111,32,102,105,110,100,13,10,32,97,110,32,101,120,105,115,116,105,110,103,32,85,112,100,97,116,101,32,90,105,112],"value":"Update Zip Name:\r\nClick this to browse your system to find\r\n an existing Update Zip"}, {"hash":12558,"name":"tfrmmain.sb_editname.caption","sourcebytes":[46,46,46],"value":"..."}, -{"hash":60451052,"name":"tfrmmain.spd_checkurl.hint","sourcebytes":[65,116,116,101,109,112,116,105,110,103,32,116,111,32,79,112,101,110,32,85,82,76],"value":"Attempting to Open URL"}, +{"hash":55770242,"name":"tfrmmain.spd_checkurl.hint","sourcebytes":[65,116,116,101,109,112,116,115,32,116,111,32,111,112,101,110,32,116,104,101,32,85,82,76,32,105,110,32,121,111,117,114,32,98,114,111,119,115,101,114],"value":"Attempts to open the URL in your browser"}, {"hash":194843532,"name":"tfrmmain.spd_checkurl.caption","sourcebytes":[67,104,101,99,107,32,85,82,76],"value":"Check URL"}, +{"hash":155690877,"name":"tfrmmain.chk_disableinopm.hint","sourcebytes":[87,97,114,110,105,110,103,33,32,84,104,105,115,32,119,105,108,108,32,100,105,115,97,98,108,101,32,105,110,115,116,97,108,108,105,110,103,32,111,114,32,117,112,100,97,116,105,110,103,32,121,111,117,114,32,112,97,99,107,97,103,101,32,105,110,32,79,80,77],"value":"Warning! This will disable installing or updating your package in OPM"}, {"hash":108520077,"name":"tfrmmain.chk_disableinopm.caption","sourcebytes":[68,105,115,97,98,108,101,32,105,110,32,79,80,77],"value":"Disable in OPM"}, {"hash":315429,"name":"tfrmmain.filemenu.caption","sourcebytes":[70,105,108,101],"value":"File"}, {"hash":21703,"name":"tfrmmain.mnu_filenew.caption","sourcebytes":[78,101,119],"value":"New"}, diff --git a/applications/json_packager/umain.pas b/applications/json_packager/umain.pas index d2f08064a..4e499b435 100644 --- a/applications/json_packager/umain.pas +++ b/applications/json_packager/umain.pas @@ -61,8 +61,8 @@ unit umain; 0.2.0.0: Refactored GUI(minesadorada) 0.2.1.0: Added scrollbox to contain package info (GetMem) 0.2.2.0: Hints and Validation updated (minesadorada) - 0.2.3.0: ToDo - - sort out resourcestrings + 0.2.3.0: ResourceStrings Updated (minesadorada) + 0.2.4.0: ?? } {$mode objfpc}{$H+} @@ -163,7 +163,7 @@ type popup_hint: TPopupNotifier; SaveAsItem: TMenuItem; sb_editName: TSpeedButton; - sbPackageFiles: TScrollBox; + sb_PackageFiles: TScrollBox; spd_CheckURL: TSpeedButton; procedure chk_DisableInOPMMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); @@ -278,6 +278,23 @@ resourcestring rsThereAreOneO = '- There are one or more .lpk entries with the same name.%s' + '- Every .lpk entry must have a unique name.'; rsUpdateJsonSF = 'Update file "%s" failed to load correctly.'; + rsNotifyUpdate = 'Notify Update'; + rsUseInCombina = 'Use in combination with %s'; + rsPackageDInfo = 'Package #%d Information'; + rsThePackageFi = 'The package filename (No path e.g. package.lpk)'; + rsVersion = 'Version: '; + rsFormatIsNNNN = 'Package version:%sFormat is: n.n.n.n'; + rsCheckThisIfY = 'Check this if you don''t want to incrememt the package ' + +'version'; + rsInternalVers = 'Internal Version: '; + rsFilename = 'Filename: '; + rsThisWillDisa = 'This will disable your package in OnlinePackageManager!%' + +'sAre you SURE you want to do this?'; + rsThereWasAPro = 'There was a problem loading "%s" - is it corrupted or in ' + +'the wrong format?'; + rsVersionForPa = 'Version for package %d is zero'; + rsInternalVers2 = 'Internal version number should not be Zero%s'; + rsOpeningYourB = 'Opening your browser...'; { TUpdatePackageData } @@ -335,7 +352,7 @@ begin begin if (Controls[iCount].InheritsFrom(TControl) = False) then continue; -{ +{ // (Kept for reference) // Iterate through the children of TScrollBox if (Controls[iCount] is TGroupBox) then // Iterate through the children of GroupBox @@ -355,12 +372,12 @@ begin TEdit(Controls[iCount]).OnClick := @CtrlHidePopup; TEdit(Controls[iCount]).OnEditingDone := @CtrlMakeDirty; end; - if (Controls[iCount] is TStringGrid) then + if (Controls[iCount] is TCheckBox) then begin - TStringGrid(Controls[iCount]).OnMouseEnter := @CtrlShowPopup; - TStringGrid(Controls[iCount]).OnMouseLeave := @CtrlHidePopup; - TStringGrid(Controls[iCount]).OnClick := @CtrlHidePopup; - TStringGrid(Controls[iCount]).OnEditingDone := @CtrlMakeDirty; + TCheckBox(Controls[iCount]).OnMouseEnter := @CtrlShowPopup; + TCheckBox(Controls[iCount]).OnMouseLeave := @CtrlHidePopup; + TCheckBox(Controls[iCount]).OnClick := @CtrlHidePopup; + TCheckBox(Controls[iCount]).OnEditingDone := @CtrlMakeDirty; end; if (Controls[iCount] is TLabel) then begin @@ -391,33 +408,25 @@ procedure TfrmMain.DestroyControlArrays; var i: integer; begin - // This could be done with one loop - for i := 0 to High(ArraySpinEditInternalVersion) do - FreeAndNil(ArraySpinEditInternalVersion[i]); - for i := 0 to High(ArrayLblPackageInternalVersion) do - FreeAndNil(ArrayLblPackageInternalVersion[i]); - for i := 0 to High(ArrayChkBoxForceNotify) do - FreeAndNil(ArrayChkBoxForceNotify[i]); - for i := 0 to High(ArraySpinEditV4) do - FreeAndNil(ArraySpinEditV4[i]); - for i := 0 to High(ArraySpinEditV3) do - FreeAndNil(ArraySpinEditV3[i]); - for i := 0 to High(ArraySpinEditV2) do - FreeAndNil(ArraySpinEditV2[i]); - for i := 0 to High(ArraySpinEditV1) do - FreeAndNil(ArraySpinEditV1[i]); - for i := 0 to High(ArrayLblPackageVersion) do - FreeAndNil(ArrayLblPackageVersion[i]); - for i := 0 to High(ArrayEdtPackageFileName) do - FreeAndNil(ArrayEdtPackageFileName[i]); - for i := 0 to High(ArrayLblPackageFileName) do - FreeAndNil(ArrayLblPackageFileName[i]); + // Callked on Form_Destroy for i := 0 to High(ArrayGrpBox) do + Begin + FreeAndNil(ArraySpinEditInternalVersion[i]); + FreeAndNil(ArrayLblPackageInternalVersion[i]); + FreeAndNil(ArrayChkBoxForceNotify[i]); + FreeAndNil(ArraySpinEditV4[i]); + FreeAndNil(ArraySpinEditV3[i]); + FreeAndNil(ArraySpinEditV2[i]); + FreeAndNil(ArraySpinEditV1[i]); + FreeAndNil(ArrayLblPackageVersion[i]); + FreeAndNil(ArrayEdtPackageFileName[i]); + FreeAndNil(ArrayLblPackageFileName[i]); FreeAndNil(ArrayGrpBox[i]); + end; end; procedure TfrmMain.AddNewControlArray; -{ +{For reference: ArrayGrpBox:Array of TGroupBox; // Line 1 ArrayLblPackageFileName:Array of TLabel; @@ -450,7 +459,7 @@ begin with ArrayGrpBox[iNumLpkFilesVisible] do begin - Caption := Format('Package #%d Information', [Succ(iNumLpkFilesVisible)]); + Caption := Format(rsPackageDInfo, [Succ(iNumLpkFilesVisible)]); if (iNumLpkFilesVisible > 0) then SetBounds(8, ArrayGrpBox[Pred(iNumLpkFilesVisible)].Top + ArrayGrpBox[Pred(iNumLpkFilesVisible)].Height + 10, frmMain.Width - 16, 100) @@ -463,14 +472,14 @@ begin ArrayLblPackageFileName[iNumLpkFilesVisible] := TLabel.Create(nil); with ArrayLblPackageFileName[iNumLpkFilesVisible] do begin - Caption := 'Filename: '; + Caption := rsFilename; SetBounds(8, 10, 50, 23); Visible := True; Tag := Pred(iNumLpkFilesVisible); OnMouseEnter := @CtrlShowPopup; OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; - Hint := 'Just the package filename e.g. package.lpk'; + Hint := Format('%s%s%s',[rsFilename,LineEnding,rsThePackageFi]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // EditBox - Package name @@ -485,21 +494,21 @@ begin OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; OnEditingDone := @CtrlMakeDirty; - Hint := 'Just the package filename e.g. package.lpk'; + Hint := Format('%s%s%s',[rsFilename,LineEnding,rsThePackageFi]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // Label - Package Version ArrayLblPackageVersion[iNumLpkFilesVisible] := TLabel.Create(nil); with ArrayLblPackageVersion[iNumLpkFilesVisible] do begin - Caption := 'Version: '; + Caption := rsVersion; SetBounds(330, 10, 50, 23); Visible := True; Tag := Pred(iNumLpkFilesVisible); OnMouseEnter := @CtrlShowPopup; OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; - Hint := 'Format is: n.n.n.n'; + Hint := Format(rsFormatIsNNNN,[LineEnding]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // SpinEdit V1 @@ -514,7 +523,7 @@ begin OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; OnChange := @CtrlMakeDirty; - Hint := 'Format is: n.n.n.n'; + Hint := Format(rsFormatIsNNNN,[LineEnding]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // SpinEdit V2 @@ -525,12 +534,11 @@ begin SetBounds(430, 8, 40, 20); Visible := True; Tag := Pred(iNumLpkFilesVisible); - Hint := 'Format is: n.n.n.n'; OnMouseEnter := @CtrlShowPopup; OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; OnChange := @CtrlMakeDirty; - Hint := 'Format is: n.n.n.n'; + Hint := Format(rsFormatIsNNNN,[LineEnding]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // SpinEdit V3 @@ -541,12 +549,11 @@ begin SetBounds(480, 8, 40, 20); Visible := True; Tag := Pred(iNumLpkFilesVisible); - Hint := 'Format is: n.n.n.n'; OnMouseEnter := @CtrlShowPopup; OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; OnChange := @CtrlMakeDirty; - Hint := 'Format is: n.n.n.n'; + Hint := Format(rsFormatIsNNNN,[LineEnding]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // SpinEdit V4 @@ -557,12 +564,11 @@ begin SetBounds(530, 8, 40, 20); Visible := True; Tag := Pred(iNumLpkFilesVisible); - Hint := 'Format is: n.n.n.n'; OnMouseEnter := @CtrlShowPopup; OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; OnChange := @CtrlMakeDirty; - Hint := 'Format is: n.n.n.n'; + Hint := Format(rsFormatIsNNNN,[LineEnding]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // ChkBox Notify @@ -570,7 +576,7 @@ begin with ArrayChkBoxForceNotify[iNumLpkFilesVisible] do begin Checked := False; - Caption := 'Notify Update'; + Caption := rsNotifyUpdate; SetBounds(8, 50, 40, 20); Visible := True; Tag := Pred(iNumLpkFilesVisible); @@ -579,21 +585,21 @@ begin OnClick := @CtrlHidePopup; OnMouseUp := @ProcessNotify; OnEditingDone := @CtrlMakeDirty; - Hint := 'Check this if you don''t want to incrememt the package version'; + Hint := Format('%s:%s%s',[rsNotifyUpdate,LineEnding,rsCheckThisIfY]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // Label Internal version ArrayLblPackageInternalVersion[iNumLpkFilesVisible] := TLabel.Create(nil); with ArrayLblPackageInternalVersion[iNumLpkFilesVisible] do begin - Caption := 'Internal Version: '; + Caption := rsInternalVers; SetBounds(160, 50, 40, 23); Visible := True; Tag := Pred(iNumLpkFilesVisible); OnMouseEnter := @CtrlShowPopup; OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; - Hint := 'Use in combination with Notify Update'; + Hint := Format('%s%s%s%s', [rsInternalVers,LineEnding,rsUseInCombina,rsNotifyUpdate]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // SpinEdit Internal Version @@ -608,11 +614,11 @@ begin OnMouseLeave := @CtrlHidePopup; OnClick := @CtrlHidePopup; OnChange := @CtrlMakeDirty; - Hint := 'Use in combination with Notify Update'; + Hint := Format('%s%s%s%s', [rsInternalVers,LineEnding,rsUseInCombina,rsNotifyUpdate]); Parent := ArrayGrpBox[iNumLpkFilesVisible]; end; // This sets the subcontrols up correctly - Parent := sbPackageFiles; + Parent := sb_PackageFiles; end; end; @@ -637,7 +643,8 @@ begin FreeAndNil(ArrayEdtPackageFileName[iLast]); FreeAndNil(ArrayLblPackageFileName[iLast]); FreeAndNil(ArrayGrpBox[iLast]); - // Tidy up control arrays + + // Tidy up control array lengths SetLength(ArrayChkBoxForceNotify, iLast); SetLength(ArrayLblPackageInternalVersion, iLast); SetLength(ArraySpinEditInternalVersion, iLast); @@ -653,17 +660,18 @@ end; procedure TfrmMain.AddPackageFileToList; begin - AddNewControlArray; // make another one + AddNewControlArray; // Contruct another one - // Makes it visible + // Makes it visible and aligns it ArrayGrpBox[High(ArrayGrpBox)].Visible := True; ArrayGrpBox[High(ArrayGrpBox)].Align := alTop; - Inc(iNumLpkFilesVisible); + Inc(iNumLpkFilesVisible);// Note: = Succ(High(Array)) CtrlSetUpPopupHandlers; Refresh; end; procedure TfrmMain.ResetPackageFileControlsToOne; +// Used in File/New var iCount: integer; begin @@ -710,6 +718,7 @@ end; procedure TfrmMain.ProcessNotify(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: integer); begin + // Special hint if not bShowPopupHints then exit; popup_hint.Text := rsThisOptionSh; @@ -726,9 +735,9 @@ end; procedure TfrmMain.chk_DisableInOPMMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin +// Warn user about DisableInOPM If chk_DisableInOPM.Checked=TRUE then - If MessageDlg('This will disable your package in OnlinePackageManager!' + LineEnding + - 'Are you SURE you want to do this?', + if MessageDlg(Format(rsThisWillDisa, [LineEnding]), mtWarning,[MBYES,MBNO],0,MBNO) = mrNo then chk_DisableInOPM.Checked:=FALSE; end; @@ -748,7 +757,7 @@ begin end else begin - CFG.WriteBool('Options', 'Virgin', False); + CFG.WriteBool('Options', 'Virgin', False); // Suppresses PopUp hints on next run CFG.WriteBool('Options', 'DiableWarnings', bDisableWarnings); CFG.UpdateFile; end; @@ -756,6 +765,7 @@ end; function TfrmMain.CreateUniqueINI(var aCount: integer): boolean; // Recursively loop until correct INI found, or new one created + // Based on Executable's path location begin Result := False; INIFilePath := GetAppConfigFile(False) + IntToStr(aCount); @@ -897,7 +907,7 @@ begin end; end else - ShowMessageFmt('There was a problem loading "%s" - is it corrupted or in the wrong format?', + ShowMessageFmt(rsThereWasAPro, [ExtractFilename(FileOpen1.Dialog.FileName)]); finally JSONPackage.Free; @@ -1095,7 +1105,7 @@ begin (ArraySpinEditV3[iCount].Value = 0) and (ArraySpinEditV4[iCount].Value = 0) then begin - slErrorList.Add(Format('Version for package %d is zero', [Succ(iCount)])); + slErrorList.Add(Format(rsVersionForPa, [Succ(iCount)])); ArraySpinEditV1[iCount].Color := clYellow; ArraySpinEditV2[iCount].Color := clYellow; ArraySpinEditV3[iCount].Color := clYellow; @@ -1107,7 +1117,7 @@ begin If ArraySpinEditInternalVersion[iCount].Value = 0 then begin ArraySpinEditInternalVersion[iCount].Color := clYellow; - slErrorList.Add(Format('Internal version number should not be Zero%s', [LineEnding])); + slErrorList.Add(Format(rsInternalVers2, [LineEnding])); Result := True; end; // Check for duplicate .lpk entries @@ -1212,12 +1222,16 @@ procedure TfrmMain.spd_CheckURLClick(Sender: TObject); // Show a popup notification because it takes time to open a browser window var bTemp: boolean; + sOldHint:String; begin if OpenURL(edt_DownloadZipURL.Text) then begin bTemp := bShowPopupHints; + sOldHint:=spd_CheckURL.Hint; + spd_CheckURL.Hint:=rsOpeningYourB; bShowPopupHints := True; CtrlShowPopup(spd_CheckURL); + spd_CheckURL.Hint:=sOldHint; bShowPopupHints := bTemp; end; end;