diff --git a/applications/json_packager/deploywin/json_packager.iss b/applications/json_packager/deploywin/json_packager.iss index d14333ce1..5b446cd39 100644 --- a/applications/json_packager/deploywin/json_packager.iss +++ b/applications/json_packager/deploywin/json_packager.iss @@ -1,6 +1,6 @@ [Setup] AppName=External OPM JSON package Editor -AppVersion=0.1.14.0 +AppVersion=0.1.15.0 DefaultDirName={pf}\OPMUtilities DefaultGroupName=OPM UninstallDisplayIcon={app}\jsoneditor.exe diff --git a/applications/json_packager/deploywin/locale/jsoneditor.en.po b/applications/json_packager/deploywin/locale/jsoneditor.en.po index 44f325a64..cb0b69456 100644 --- a/applications/json_packager/deploywin/locale/jsoneditor.en.po +++ b/applications/json_packager/deploywin/locale/jsoneditor.en.po @@ -68,8 +68,6 @@ msgstr "" "as a JSON update file\n" #: tfrmmain.editdownloadzipurl.hint -#, fuzzy -msgctxt "tfrmmain.editdownloadzipurl.hint" msgid "" "Download URL:\n" "Include the FULL url needed to download the package Zip file\n" @@ -108,8 +106,6 @@ msgid "Save As" msgstr "Save As" #: tfrmmain.lbldownloadzipurl.caption -#, fuzzy -msgctxt "tfrmmain.lbldownloadzipurl.caption" msgid "Download URL:" msgstr "Download URL:" @@ -191,13 +187,6 @@ msgid "Attempting to Open URL" msgstr "Attempting to Open URL" #: tfrmmain.stringpackagefiles.hint -#, fuzzy -#| msgid "" -#| "Package Files:\n" -#| "[Add]: to make a new entry\n" -#| "[Remove]: Remove last entry\n" -#| "lpk filename: i.e. mycontrol.lpk\n" -#| "Version: The FULL version (i.e. not 1.0 but 1.0.0.0)\n" msgid "" "Package Files:\n" "[Add]: to make a new entry\n" @@ -220,25 +209,21 @@ 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" #: umain.rsdownloadzipurld -#, fuzzy msgctxt "umain.rsdownloadzipurld" msgid "- Download URL does not contain the zipfile name" msgstr "- Download URL does not contain the zipfile name" #: umain.rsdownloadzipurli -#, fuzzy msgctxt "umain.rsdownloadzipurli" msgid "- Download URL is too short or missing" msgstr "- Download URL is too short or missing" #: umain.rsdownloadzipurli2 -#, fuzzy msgctxt "umain.rsdownloadzipurli2" msgid "- Download URL is incomplete" msgstr "- Download URL is incomplete" #: umain.rsdownloadzipurls -#, fuzzy msgctxt "umain.rsdownloadzipurls" msgid "- Download URL should start with \"http\"" msgstr "- Download URL should start with \"http\"" @@ -331,6 +316,10 @@ msgstr "(You can toggle these hints on/off in the Help menu)" msgid "Update" msgstr "Update" +#: umain.rsupdatejsonsf +msgid "Update file \"%s\" failed to load correctly." +msgstr "Update file \"%s\" failed to load correctly." + #: umain.rsupdatezipnam msgid "- Update zip name is too short or missing" msgstr "- Update zip name is too short or missing" diff --git a/applications/json_packager/deploywin/locale/jsoneditor.es.po b/applications/json_packager/deploywin/locale/jsoneditor.es.po index 6c62a55a1..d256abe85 100644 --- a/applications/json_packager/deploywin/locale/jsoneditor.es.po +++ b/applications/json_packager/deploywin/locale/jsoneditor.es.po @@ -323,6 +323,10 @@ msgstr "(Puedes cambiar estos consejos en el menú Ayuda)" msgid "Update" msgstr "Actualización" +#: umain.rsupdatejsonsf +msgid "Update file \"%s\" failed to load correctly." +msgstr "Error al cargar \"%s\" correctamente el archivo de actualización" + #: umain.rsupdatezipnam msgid "- Update zip name is too short or missing" msgstr "- El nombre del zip es muy corto o está vacío" diff --git a/applications/json_packager/jsonpackage.lps b/applications/json_packager/jsonpackage.lps index f00e5c88a..3e6c2d0f6 100644 --- a/applications/json_packager/jsonpackage.lps +++ b/applications/json_packager/jsonpackage.lps @@ -10,7 +10,7 @@ - + @@ -20,12 +20,12 @@ - - - + + + - - + + @@ -33,7 +33,7 @@ - + @@ -129,123 +129,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/applications/json_packager/locale/jsoneditor.en.po b/applications/json_packager/locale/jsoneditor.en.po index 44f325a64..cb0b69456 100644 --- a/applications/json_packager/locale/jsoneditor.en.po +++ b/applications/json_packager/locale/jsoneditor.en.po @@ -68,8 +68,6 @@ msgstr "" "as a JSON update file\n" #: tfrmmain.editdownloadzipurl.hint -#, fuzzy -msgctxt "tfrmmain.editdownloadzipurl.hint" msgid "" "Download URL:\n" "Include the FULL url needed to download the package Zip file\n" @@ -108,8 +106,6 @@ msgid "Save As" msgstr "Save As" #: tfrmmain.lbldownloadzipurl.caption -#, fuzzy -msgctxt "tfrmmain.lbldownloadzipurl.caption" msgid "Download URL:" msgstr "Download URL:" @@ -191,13 +187,6 @@ msgid "Attempting to Open URL" msgstr "Attempting to Open URL" #: tfrmmain.stringpackagefiles.hint -#, fuzzy -#| msgid "" -#| "Package Files:\n" -#| "[Add]: to make a new entry\n" -#| "[Remove]: Remove last entry\n" -#| "lpk filename: i.e. mycontrol.lpk\n" -#| "Version: The FULL version (i.e. not 1.0 but 1.0.0.0)\n" msgid "" "Package Files:\n" "[Add]: to make a new entry\n" @@ -220,25 +209,21 @@ 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" #: umain.rsdownloadzipurld -#, fuzzy msgctxt "umain.rsdownloadzipurld" msgid "- Download URL does not contain the zipfile name" msgstr "- Download URL does not contain the zipfile name" #: umain.rsdownloadzipurli -#, fuzzy msgctxt "umain.rsdownloadzipurli" msgid "- Download URL is too short or missing" msgstr "- Download URL is too short or missing" #: umain.rsdownloadzipurli2 -#, fuzzy msgctxt "umain.rsdownloadzipurli2" msgid "- Download URL is incomplete" msgstr "- Download URL is incomplete" #: umain.rsdownloadzipurls -#, fuzzy msgctxt "umain.rsdownloadzipurls" msgid "- Download URL should start with \"http\"" msgstr "- Download URL should start with \"http\"" @@ -331,6 +316,10 @@ msgstr "(You can toggle these hints on/off in the Help menu)" msgid "Update" msgstr "Update" +#: umain.rsupdatejsonsf +msgid "Update file \"%s\" failed to load correctly." +msgstr "Update file \"%s\" failed to load correctly." + #: umain.rsupdatezipnam msgid "- Update zip name is too short or missing" msgstr "- Update zip name is too short or missing" diff --git a/applications/json_packager/locale/jsoneditor.es.po b/applications/json_packager/locale/jsoneditor.es.po index 6c62a55a1..d256abe85 100644 --- a/applications/json_packager/locale/jsoneditor.es.po +++ b/applications/json_packager/locale/jsoneditor.es.po @@ -323,6 +323,10 @@ msgstr "(Puedes cambiar estos consejos en el menú Ayuda)" msgid "Update" msgstr "Actualización" +#: umain.rsupdatejsonsf +msgid "Update file \"%s\" failed to load correctly." +msgstr "Error al cargar \"%s\" correctamente el archivo de actualización" + #: umain.rsupdatezipnam msgid "- Update zip name is too short or missing" msgstr "- El nombre del zip es muy corto o está vacío" diff --git a/applications/json_packager/locale/jsoneditor.po b/applications/json_packager/locale/jsoneditor.po index 93eb1100f..782fa9a60 100644 --- a/applications/json_packager/locale/jsoneditor.po +++ b/applications/json_packager/locale/jsoneditor.po @@ -116,7 +116,7 @@ msgstr "" #: tfrmmain.mnu_helpdisablewarnings.caption msgid "Disable warnings" -msgstr "Desactivar Advertencias" +msgstr "" #: tfrmmain.mnu_helpshowhints.caption msgid "Show Popup Hints" @@ -282,6 +282,10 @@ msgstr "" msgid "Update" msgstr "" +#: umain.rsupdatejsonsf +msgid "Update file \"%s\" failed to load correctly." +msgstr "" + #: umain.rsupdatezipnam msgid "- Update zip name is too short or missing" msgstr "" diff --git a/applications/json_packager/umain.pas b/applications/json_packager/umain.pas index d873589a5..5a9e420e2 100644 --- a/applications/json_packager/umain.pas +++ b/applications/json_packager/umain.pas @@ -37,6 +37,9 @@ unit umain; Added Const C_DEBUGMESSAGES=TRUE/FALSE 0.1.14.0: Various changes (GetMem) BugFix: FormCloseQuery + 0.1.15.0: BugFix: File/Save didn't add the '.json' suffix in Linux + Addition: After Loading, run validation tests + 0.1.16.0: ?? } {$mode objfpc}{$H+} @@ -218,6 +221,7 @@ resourcestring rsYouMayNeedTo = '(You may need to restart the app to see the change)'; 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.'; { TUpdatePackageData } @@ -492,13 +496,24 @@ begin editName.Text := JSONPackage.UpdatePackageData.Name; editDownloadZipURL.Text := JSONPackage.UpdatePackageData.DownloadZipURL; cbForceUpdate.Checked := JSONPackage.UpdatePackageData.ForceUpdate; - stringPackageFiles.RowCount := JSONPackage.UpdatePackageFiles.Count + 1; for i := 0 to JSONPackage.UpdatePackageFiles.Count - 1 do begin stringPackageFiles.Cells[0, i + 1] := JSONPackage.UpdatePackageFiles.Items[i].Name; stringPackageFiles.Cells[1, i + 1] := JSONPackage.UpdatePackageFiles.Items[i].Version; end; + if ValidationFailed then + begin + if (slErrorList.Count > 1) then + ShowMessage(Format(rsUpdateJsonSF, [ExtractFileName(sJSONFilePath)]) + LineEnding + + LineEnding + rsOneOfTheReqn + LineEnding + slErrorList.Text + + LineEnding + rsFixThenTryAg) + else + ShowMessage(Format(rsUpdateJsonSF,[ExtractFileName(sJSONFilePath)]) + LineEnding + + LineEnding + rsOneOfTheReq1 + LineEnding + slErrorList.Text + + LineEnding + rsFixThenTryAg); + Exit; + end; end else ShowMessageFmt('There was a problem loading "%s" - is it corrupted or in the wrong format?', @@ -725,7 +740,7 @@ begin if bForceSaveAs or (sJSONFilePath = '') then begin FileSaveAs1.Dialog.InitialDir := sUpdateDirectory; - FileSaveAs1.Dialog.FileName := 'update_' + ExtractFilenameOnly(editName.Text); + FileSaveAs1.Dialog.FileName := 'update_' + ExtractFilenameOnly(editName.Text) + '.json'; if FileSaveAs1.Dialog.Execute then sJSONFilePath := FileSaveAs1.Dialog.FileName else