diff --git a/foxbin2prg.cfg b/foxbin2prg.cfg index 38cbbf8..aa1c3ff 100644 --- a/foxbin2prg.cfg +++ b/foxbin2prg.cfg @@ -1,10 +1,13 @@ **************************************************************************************************** -* FOXBIN2PRG v1.19.37 +* FOXBIN2PRG v1.19.38 * CONFIGURATION FILE / ARCHIVO DE CONFIGURACIÓN **************************************************************************************************** **************************************************************************************************** -* OPTION DOCUMENTATION SECTION / SECCIÓN DE DOCUMENTACIÓN DE OPCIONES +* SECTION DOCUMENTATION OF OPTIONS / SECCIÓN DE DOCUMENTACIÓN DE OPCIONES +* +* EN: Note: This values have precedence over internal parameters and parameters used on scripts +* ES: Nota: Estos valores tienen precedencia sobre los parámetros internos y los parámetros usados en los scripts * * DETAIL OF SUPPORTED VALUES / DETALLE DE VALORES SOPORTADOS * If no values given, these are the DEFAULTS / Si no se proporcionan valores, estos son los PREDETERMINADOS @@ -20,6 +23,7 @@ * OptimizeByFilestamp: 0 && Optimize file regeneration depending on file timestamp / Optimizar la regeneración de archivos dependiendo del timestamp de archivo * AllowMultiConfig: 1 && 1=Allow CFG files per directory. if no CFG found, then use Main CFG. 0=Only use Main CFG * DropNullCharsFromCode: 1 && 1=Drop NULL chars from source code / 0=Leave Nulls in code, if any +* Language: (auto) && Language of shown messages and LOGs. EN=English, FR=French, ES=Español, DE=German, Not defined = AUTOMATIC [DEFAULT] *-- CONVERTION OPTIONS / OPCIONES DE CONVERSIÓN * XXX_Conversion_Support: N && 0=No support, 1=Generate TXT only (Diff), 2=Generate TXT and BIN (Merge) @@ -41,9 +45,6 @@ * RedirectClassPerFileToMain: 0 && 0=Don't redirect to file.tx2, 1=Redirect to file.tx2 when selecting file.class.tx2 / 0=No redireccionar a archivo.tx2, 1=Redireccionar a archivo.tx2 cuando se seleccione archivo.clase.tx2 * ClassPerFileCheck: 0 && 0=Don't check file.class.tx2 inclusion, 1=Check file.class.tx2 inclusion / 0=No verificar la inclusión de archivo.clase.tx2, 1=Verificar la inclusión de archivo.clase.tx2 * -* EN: Note: This values have precedence over internal parameters and parameters used on scripts -* ES: Nota: Estos valores tienen precedencia sobre los parámetros internos y los parámetros usados en los scripts -* * END DOCUMENTATION SECTION / FIN DE LA SECCIÓN DE DOCUMENTACIÓN **************************************************************************************************** diff --git a/foxbin2prg.prg b/foxbin2prg.prg index 2a7c363..581dff5 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -550,7 +550,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM *-- n_FB2PRG_Version = 1.19 *-- - c_Language = 'ES' + c_Language = '' && EN, FR, ES, DE c_loc_processing_file = '' c_loc_process_progress = '' c_FB2PRG_EXE_Version = 0 @@ -1411,6 +1411,13 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM .writeLog( JUSTFNAME(lcConfigFile) + ' > DropNullCharsFromCode: ' + TRANSFORM(lcValue) ) ENDIF + CASE LEFT( laConfig(I), 9 ) == LOWER('Language:') + lcValue = ALLTRIM( SUBSTR( laConfig(I), 10 ) ) + IF .T. + .ChangeLanguage(lcValue) + .writeLog( JUSTFNAME(lcConfigFile) + ' > Language: ' + TRANSFORM(lcValue) + ' (' + .c_Language + ')' ) + ENDIF + CASE LEFT( laConfig(I), 23 ) == LOWER('PJX_Conversion_Support:') lcValue = ALLTRIM( SUBSTR( laConfig(I), 24 ) ) IF INLIST( lcValue, '0', '1', '2' ) THEN @@ -1529,6 +1536,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM .writeLog( '> l_OptimizeByFilestamp: ' + TRANSFORM(.l_OptimizeByFilestamp) ) .writeLog( '> l_DropNullCharsFromCode: ' + TRANSFORM(.l_DropNullCharsFromCode) ) .writeLog( '> l_ClearDBFLastUpdate: ' + TRANSFORM(.l_ClearDBFLastUpdate) ) + .writeLog( '> c_Language: ' + TRANSFORM(.c_Language) ) lo_CFG = NULL RELEASE lo_CFG @@ -2173,7 +2181,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM ENDPROC - PROCEDURE ejecutar_WriteErrorLog + HIDDEN PROCEDURE ejecutar_WriteErrorLog LPARAMETERS toEx, tcErrorInfo LOCAL loLang as CL_LANG OF 'FOXBIN2PRG.PRG' @@ -11139,7 +11147,7 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base LOCAL toFoxBin2Prg AS c_foxbin2prg OF 'FOXBIN2PRG.PRG' #ENDIF - LOCAL llFileExists + LOCAL llFileExists, lnBytes LOCAL loLang as CL_LANG OF 'FOXBIN2PRG.PRG' loLang = _SCREEN.o_FoxBin2Prg_Lang @@ -11155,7 +11163,10 @@ DEFINE CLASS c_conversor_bin_a_prg AS c_conversor_base toFoxBin2Prg.ChangeFileAttribute( tcOutputFile, '-R' ) ENDIF - IF STRTOFILE( tcCodigo, tcOutputFile ) = 0 + lnBytes = STRTOFILE( tcCodigo, tcOutputFile ) + THIS.writeLog( 'Generated file size: ' + TRANSFORM(lnBytes/1024) + ' KiB' ) + + IF lnBytes = 0 *ERROR 'No se puede generar el archivo [' + .c_OutputFile + '] porque es ReadOnly' ERROR (TEXTMERGE(loLang.C_CANT_GENERATE_FILE_BECAUSE_IT_IS_READONLY_LOC)) ENDIF @@ -21445,23 +21456,23 @@ DEFINE CLASS CL_LANG AS Custom *------------------------------------------------------------------------------------------------------------------------------------------- C_ASTERISK_EXT_NOT_ALLOWED_LOC = "* and ? extensions are not allowed because it's dangerous (binaries can be overwritten with xx2 empty files)" C_BACKLINK_CANT_UPDATE_BL_LOC = "Could not update backlink" - C_BACKLINK_OF_TABLE_LOC = "of table" - C_BACKUP_OF_LOC = "Doing Backup of: " - C_CANT_GENERATE_FILE_BECAUSE_IT_IS_READONLY_LOC = "Cannot generate file [<>] because it is ReadOnly" + C_BACKLINK_OF_TABLE_LOC = "of table" + C_BACKUP_OF_LOC = "Doing Backup of: " + C_CANT_GENERATE_FILE_BECAUSE_IT_IS_READONLY_LOC = "Cannot generate file [<>] because it is ReadOnly" C_CONFIGFILE_LOC = "Using configuration file:" C_CONVERSION_CANCELLED_BY_USER_LOC = "Conversion Cancelled by the user" C_CONVERTER_UNLOAD_LOC = "Converter unload" C_CONVERTING_FILE_LOC = "Converting file" - C_DATA_ERROR_CANT_PARSE_UNPAIRING_DOUBLE_QUOTES_LOC = "Data Error: Can't parse because of unpaired double-quotes on line <>" + C_DATA_ERROR_CANT_PARSE_UNPAIRING_DOUBLE_QUOTES_LOC = "Data Error: Can't parse because of unpaired double-quotes on line <>" C_DUPLICATED_FILE_LOC = "Duplicated file" C_ENDDEFINE_MARKER_NOT_FOUND_LOC = "Cannot find end marker [ENDDEFINE] of line <> for ID [<>]" C_END_MARKER_NOT_FOUND_LOC = "Cannot find end marker [<>] that closes start marker [<>] on line <>" C_END_OF_PROCESS_LOC = "End of Process" - C_EXTENSION_RECONFIGURATION_LOC = "Extension Reconfiguration:" - C_EXTERNAL_CLASS_COUNT_DOES_NOT_MATCH_FOUND_CLASSES_LOC = "External class count (<>) does not match found classes (<>) for file [<>]" + C_EXTENSION_RECONFIGURATION_LOC = "Extension Reconfiguration:" + C_EXTERNAL_CLASS_COUNT_DOES_NOT_MATCH_FOUND_CLASSES_LOC = "External class count (<>) does not match found classes (<>) for file [<>]" C_EXTERNAL_CLASS_NAME_DOES_NOT_FOUND_LOC = "External class [<>] is not found in file [<>]" - C_FIELD_NOT_FOUND_ON_FILE_STRUCTURE_LOC = "Field [<>] not found in structure of file <>" - C_FILE_DOESNT_EXIST_LOC = "File does not exist:" + C_FIELD_NOT_FOUND_ON_FILE_STRUCTURE_LOC = "Field [<>] not found in structure of file <>" + C_FILE_DOESNT_EXIST_LOC = "File does not exist:" C_FILE_NAME_IS_NOT_SUPPORTED_LOC = "File [<<.c_InputFile>>] is not supported" C_FILE_NOT_FOUND_LOC = "File not found" C_FOXBIN2PRG_ERROR_CAPTION_LOC = "FOXBIN2PRG: ERROR!!" @@ -21471,23 +21482,24 @@ DEFINE CLASS CL_LANG AS Custom + " FOXBIN2PRG 'c:\development\classes\*.vcx' '0' '0' '0' '1' '1'" + CR_LF + CR_LF ; + "Example of generating TXT from all VCX is 'c:\development\classes', without showing error window and without LOG file: " + CR_LF ; + " FOXBIN2PRG 'c:\development\classes\*.vc2' '0' '0' '0' '1' '0'" - C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG is only for Visual FoxPro 9.0!" + C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG is only for Visual FoxPro 9.0!" C_FOXBIN2PRG_WARN_CAPTION_LOC = "FOXBIN2PRG: WARNING!" + C_GENERATED_FILE_SIZE_LOC = "Generated file size" C_LANGUAGE_LOC = "EN" C_MENU_NOT_IN_VFP9_FORMAT_LOC = "Menu [<>] is NOT in VFP 9 Format! - Please convert to VFP 9 with MODIFY MENU '<>'" C_NAMES_CAPITALIZATION_PROGRAM_FOUND_LOC = "* Names capitalization program [<>] found" C_NAMES_CAPITALIZATION_PROGRAM_NOT_FOUND_LOC = "* Names capitalization program [<>] not found" C_OBJECT_NAME_WITHOUT_OBJECT_OREG_LOC = "Object [<>] does not contain oReg object (level <>)" C_ONLY_SETNAME_AND_GETNAME_RECOGNIZED_LOC = "Operation not recognized. Only SETNAME and GETNAME allowed." - C_OUTPUT_FILE_IS_NOT_OVERWRITEN_LOC = "Optimization: Output file [<>] was not overwritten because it is the same as was generated." + C_OUTPUT_FILE_IS_NOT_OVERWRITEN_LOC = "Optimization: Output file [<>] was not overwritten because it is the same as was generated." C_OUTPUTFILE_NEWER_THAN_INPUTFILE_LOC = "Optimization: Output file [<>] was not regenerated because it is newer than the inputfile." C_PRESS_ESC_TO_CANCEL = "Press Esc to Cancel" C_PROCEDURE_NOT_CLOSED_ON_LINE_LOC = "Procedure not closed. Last line of code must be ENDPROC. [<>, Recno:<>]" C_PROCESSING_LOC = "Processing file" C_PROCESS_PROGRESS_LOC = "Process Progress:" C_PROPERTY_NAME_NOT_RECOGNIZED_LOC = "Property [<>] is not recognized." - C_REPORT_NOT_IN_VFP9_FORMAT_LOC = "Report [<>] is NOT in VFP 9 Format! - Please convert to VFP 9 with MODIFY REPORT '<>'" - C_REQUESTING_CAPITALIZATION_OF_FILE_LOC = "- Requesting capitalization of file [<>]" + C_REPORT_NOT_IN_VFP9_FORMAT_LOC = "Report [<>] is NOT in VFP 9 Format! - Please convert to VFP 9 with MODIFY REPORT '<>'" + C_REQUESTING_CAPITALIZATION_OF_FILE_LOC = "- Requesting capitalization of file [<>]" C_SCANNING_FILE_AND_DIR_INFO_LOC = "Scanning file and directory information for" C_SOURCEFILE_LOC = "Source file: " C_STRUCTURE_NESTING_ERROR_ENDPROC_EXPECTED_LOC = "Nesting structure error. ENDPROC expected but found ENDDEFINE on class <> (<>), line <> of file <>" @@ -21560,7 +21572,7 @@ DEFINE CLASS CL_LANG AS Custom *-- Ya se cargó .n_LanguageSelectedMethod = 2 && 2=Loaded from foxbin2prg.h - CASE tcLanguage == '33' && French (Francés) + CASE INLIST(tcLanguage, '33', 'FR') && French (Francés) *------------------------------------------------------------------------------------------------------------------------------------------- *-- NOTE: MUST USE DOUBLE QUOTES, OR SYNTAX ERRORS HAPPEN WHEN COMPILING. STRANGE :( *------------------------------------------------------------------------------------------------------------------------------------------- @@ -21594,6 +21606,7 @@ DEFINE CLASS CL_LANG AS Custom + " FOXBIN2PRG 'c:\development\classes\*.vc2' '0' '0' '0' '1' '0'" .C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG est seulement pour Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "FOXBIN2PRG: AVERTISSEMENT!" + .C_GENERATED_FILE_SIZE_LOC = "Taille du fichier généré" .C_LANGUAGE_LOC = "FR" .C_MENU_NOT_IN_VFP9_FORMAT_LOC = "Menu [<>] ne est pas dans VFP 9 Format! - Se il vous plaît se convertir à VFP 9 avec MODIFY MENU '<>'" .C_NAMES_CAPITALIZATION_PROGRAM_FOUND_LOC = "* Programme des noms de capitalisation [<>] trouvé" @@ -21617,7 +21630,7 @@ DEFINE CLASS CL_LANG AS Custom .C_WARN_TABLE_ALIAS_ON_INDEX_EXPRESSION_LOC = "AVERTISSEMENT!!" + CR_LF+ "ASSUREZ VOUS NE UTILISEZ PAS UN ALIAS DE TABLE SUR LES EXPRESSIONS INDEX CLÉS!! (exemple: index on <>.campo tag keyname)" .C_WITH_ERRORS_LOC = "avec des erreurs" - CASE tcLanguage == '34' && Spanish (Español) + CASE INLIST(tcLanguage, '34', 'ES') && Spanish (Español) *------------------------------------------------------------------------------------------------------------------------------------------- *-- NOTA: SE DEBEN USAR COMILLAS DOBLES, O ERRORES DE SINTAXIS OCURREN AL COMPILAR. EXTRAÑO :( *------------------------------------------------------------------------------------------------------------------------------------------- @@ -21651,6 +21664,7 @@ DEFINE CLASS CL_LANG AS Custom + " FOXBIN2PRG 'c:\desa\clases\*.vc2' '0' '0' '0' '1' '0'" .C_FOXBIN2PRG_JUST_VFP_9_LOC = "¡FOXBIN2PRG es solo para Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "FOXBIN2PRG: ¡ATENCIÓN!" + .C_GENERATED_FILE_SIZE_LOC = "Tamaño del archivo generado" .C_MENU_NOT_IN_VFP9_FORMAT_LOC = "El Menú [<>] NO está en formato VFP 9! - Por favor convertirlo a VFP 9 con MODIFY MENU '<>'" .C_LANGUAGE_LOC = "ES" .C_NAMES_CAPITALIZATION_PROGRAM_FOUND_LOC = "* Se ha encontrado el programa de capitalización de nombres [<>]" @@ -21674,7 +21688,7 @@ DEFINE CLASS CL_LANG AS Custom .C_WARN_TABLE_ALIAS_ON_INDEX_EXPRESSION_LOC = "¡¡ATENCIÓN!!" + CR_LF+ "ASEGÚRESE DE QUE NO ESTÁ USANDO UN ALIAS DE TABLA EN LAS EXPRESIONES DE LOS ÍNDICES!! (ej: index on <>.campo tag nombreclave)" .C_WITH_ERRORS_LOC = "con errores" - CASE tcLanguage == '49' && German (Alemán) + CASE INLIST(tcLanguage, '49', 'DE') && German (Alemán) *------------------------------------------------------------------------------------------------------------------------------------------- *-- NOTE: ES MÜSSEN ANFÜHRUNGSZEICHEN BENUTZT WERDEN, ODER SYNTAX ERRORS PASSIEREN BEIM COMPILE. SELTSAM :( *------------------------------------------------------------------------------------------------------------------------------------------- @@ -21708,6 +21722,7 @@ DEFINE CLASS CL_LANG AS Custom + " FOXBIN2PRG 'c:\development\classes\*.vc2' '0' '0' '0' '1' '0'" .C_FOXBIN2PRG_JUST_VFP_9_LOC = "FOXBIN2PRG ist nur für Visual FoxPro 9.0!" .C_FOXBIN2PRG_WARN_CAPTION_LOC = "FOXBIN2PRG: WARNUNG!" + .C_GENERATED_FILE_SIZE_LOC = "Generierte Dateigröße" .C_LANGUAGE_LOC = "DE" .C_MENU_NOT_IN_VFP9_FORMAT_LOC = "Menu [<>] ist NICHT in VFP 9 Format! - Bitte zuerst nach VFP 9 konvertieren mit MODIFY MENU '<>'" .C_NAMES_CAPITALIZATION_PROGRAM_FOUND_LOC = "* Programm für Großschreibungssetzung [<>] gefunden"