IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8232 for trunk/psLib/src/astro


Ignore:
Timestamp:
Aug 8, 2006, 1:32:23 PM (20 years ago)
Author:
jhoblitt
Message:

bug #790 - remove psErrorText.h and inline all error codes. all newly inlined error codes are wrapped with the _() macro from future gettextification

Location:
trunk/psLib/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src

    • Property svn:ignore
      •  

        old new  
        1010libpslib.la.temp
        1111config.h.in
        12 psErrorText.h
        1312*.bb
        1413*.bbg
  • trunk/psLib/src/astro/psCoord.c

    r7914 r8232  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.121 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2006-07-15 02:57:12 $
     12*  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2006-08-08 23:32:22 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2626#include "psLogMsg.h"
    2727#include "psTrace.h"
    28 #include "psErrorText.h"
     28
    2929#include "psMatrix.h"
    3030#include "psMinimizePolyFit.h"
     
    435435    default:
    436436        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    437                 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,
     437                _("The projection type, %d, is unknown."),
    438438                projection->type);
    439439        psFree(out);
     
    537537    default:
    538538        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    539                 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,
     539                _("The projection type, %d, is unknown."),
    540540                projection->type);
    541541        psFree(out);
  • trunk/psLib/src/astro/psEarthOrientation.c

    r7766 r8232  
    88 *  @author Robert Daniel DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-06-30 02:20:06 $
     10 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-08-08 23:32:22 $
    1212 *
    1313 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    2424#include "psMetadataConfig.h"
    2525#include "psError.h"
    26 #include "psErrorText.h"
     26
    2727#include "psMemory.h"
    2828#include "psCoord.h"
     
    103103                                            "psLib.eoc.precession.table.format");
    104104    if(! success || tableFormat == NULL) {
    105         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     105        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    106106                "psLib.eoc.precession.table.format");
    107107        return false;
     
    112112    if(! success || xTableName == NULL) {
    113113        psFree(tableFormat);
    114         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     114        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    115115                "psLib.eoc.precession.x.file");
    116116        return false;
     
    122122        psFree(tableFormat);
    123123        psFree(xTableName);
    124         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     124        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    125125                "psLib.eoc.precession.y.file");
    126126        return false;
     
    133133        psFree(xTableName);
    134134        psFree(yTableName);
    135         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     135        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    136136                "psLib.eoc.precession.s.file");
    137137        return false;
     
    145145        psFree(yTableName);
    146146        psFree(sTableName);
    147         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     147        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    148148                "psLib.eoc.precession.iers.file");
    149149        return false;
     
    158158        psFree(sTableName);
    159159        psFree(iersTableName);
    160         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     160        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    161161                "psLib.eoc.precession.finals.file");
    162162        return false;
     
    172172        psFree(iersTableName);
    173173        psFree(finalsTableName);
    174         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     174        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    175175                "psLib.eoc.precession.iers.table.format");
    176176        return false;
     
    187187        psFree(finalsTableName);
    188188        psFree(iersTableFormat);
    189         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     189        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    190190                "psLib.eoc.precession.iers.table.format");
    191191        return false;
     
    214214    psVector* xCoeff = psMetadataLookupPtr(&success, eocMetadata, "psLib.eoc.precession.poly.x");
    215215    if(! success || xCoeff == NULL || xCoeff->type.type != PS_TYPE_F64) {
    216         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     216        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    217217                "psLib.eoc.precession.poly.x");
    218218        return false;
     
    221221    if(! success || yCoeff == NULL || yCoeff->type.type != PS_TYPE_F64) {
    222222        psFree(xCoeff);
    223         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     223        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    224224                "psLib.eoc.precession.poly.y");
    225225        return false;
     
    229229        psFree(xCoeff);
    230230        psFree(yCoeff);
    231         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     231        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    232232                "psLib.eoc.precession.poly.s");
    233233        return false;
  • trunk/psLib/src/astro/psSphereOps.c

    r7914 r8232  
    88 *  @author Dave Robbins, MHPCC
    99 *
    10  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-07-15 02:57:12 $
     10 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-08-08 23:32:22 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525#include "psError.h"
    2626#include "psLogMsg.h"
    27 #include "psErrorText.h"
     27
    2828
    2929
     
    225225    // Check the specified MJD is greater than 1900
    226226    if ( MJD < MJD_1900 ) {
    227         psError(PS_ERR_BAD_PARAMETER_TYPE,true,PS_ERRORTEXT_psCoord_INVALID_MJD);
     227        psError(PS_ERR_BAD_PARAMETER_TYPE,true,_("Specified time is less than 1900."));
    228228        return NULL;
    229229    }
     
    252252    // Check the specified MJD is greater than 1900
    253253    if ( MJD < MJD_1900 ) {
    254         psError(PS_ERR_BAD_PARAMETER_TYPE,true,PS_ERRORTEXT_psCoord_INVALID_MJD);
     254        psError(PS_ERR_BAD_PARAMETER_TYPE,true,_("Specified time is less than 1900."));
    255255        return NULL;
    256256    }
     
    361361        else {
    362362            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    363                     PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,
     363                    _("Specified units, 0x%x, is not supported."),
    364364                    unit);
    365365            psFree(tmp);
     
    370370    } else {
    371371        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    372                 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,
     372                _("Specified offset mode, 0x%x, is not supported."),
    373373                mode);
    374374        psFree(tmp);
     
    432432        } else {
    433433            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    434                     PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,
     434                    _("Specified units, 0x%x, is not supported."),
    435435                    unit);
    436436            return NULL;
     
    451451    } else {
    452452        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    453                 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,
     453                _("Specified offset mode, 0x%x, is not supported."),
    454454                mode);
    455455        return NULL;
  • trunk/psLib/src/astro/psTime.c

    r7961 r8232  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.92 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-07-25 01:16:04 $
     12 *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-08-08 23:32:22 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3333#include "psLookupTable.h"
    3434#include "psAssert.h"
    35 #include "psErrorText.h"
     35
    3636
    3737#include "config.h"
     
    205205        // Check if table not a metadata item
    206206        if(tableMetadataItem == NULL) {
    207             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     207            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    208208                    tableName);
    209209            *status = PS_LOOKUP_ERROR;
     
    282282    if(metadataItem == NULL) {
    283283        p_psMemAllocatePersistent(initialPersistence);
    284         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     284        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    285285                "psLib.time.tables.n");
    286286        return false;
     
    292292    if(metadataItem == NULL) {
    293293        p_psMemAllocatePersistent(initialPersistence);
    294         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     294        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    295295                "psLib.time.tables.from");
    296296        return false;
     
    299299    if(tablesFrom->n != numTables) {
    300300        p_psMemAllocatePersistent(initialPersistence);
    301         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_BAD_VECTOR, tablesFrom->n, numTables);
     301        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %d, Expected %d."), tablesFrom->n, numTables);
    302302        psFree(tablesFrom);
    303303        return false;
     
    308308    if(metadataItem == NULL) {
    309309        p_psMemAllocatePersistent(initialPersistence);
    310         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     310        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    311311                "psLib.time.tables.to");
    312312        psFree(tablesFrom);
     
    316316    if(tablesTo->n != numTables) {
    317317        p_psMemAllocatePersistent(initialPersistence);
    318         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_BAD_VECTOR, tablesTo->n, numTables);
     318        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %d, Expected %d."), tablesTo->n, numTables);
    319319        psFree(tablesFrom);
    320320        psFree(tablesTo);
     
    326326    if(metadataItem == NULL) {
    327327        p_psMemAllocatePersistent(initialPersistence);
    328         psError(PS_ERR_BAD_PARAMETER_VALUE,true,PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     328        psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Failed find '%s' in time metadata."),
    329329                "psLib.time.tables.index");
    330330        psFree(tablesFrom);
     
    335335    if(tablesIndex->n != numTables) {
    336336        p_psMemAllocatePersistent(initialPersistence);
    337         psError(PS_ERR_BAD_PARAMETER_VALUE,true,PS_ERRORTEXT_psTime_BAD_VECTOR,tablesIndex->n,numTables);
     337        psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Incorrect vector size. Size: %d, Expected %d."),tablesIndex->n,numTables);
    338338        psFree(tablesFrom);
    339339        psFree(tablesTo);
     
    346346    if(metadataItem == NULL) {
    347347        p_psMemAllocatePersistent(initialPersistence);
    348         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     348        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    349349                "psLib.time.tables.dir");
    350350        psFree(tablesFrom);
     
    359359    if(metadataItem == NULL) {
    360360        p_psMemAllocatePersistent(initialPersistence);
    361         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     361        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    362362                "psLib.time.tables.files");
    363363
     
    374374    if(metadataItem == NULL) {
    375375        p_psMemAllocatePersistent(initialPersistence);
    376         psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     376        psError(PS_ERR_BAD_PARAMETER_VALUE,true, _("Failed find '%s' in time metadata."),
    377377                "psLib.time.tables.format");
    378378        psFree(tablesFrom);
     
    404404        tableFormat = getToken(&formatPtr,",",&status);
    405405        if(tableFormat == NULL) {
    406             psError(PS_ERR_BAD_PARAMETER_VALUE,no_problem,PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     406            psError(PS_ERR_BAD_PARAMETER_VALUE,no_problem,_("Failed find '%s' in time metadata."),
    407407                    "psLib.time.tables.format");
    408408            no_problem = false;
     
    415415        } else {
    416416            psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem,
    417                     PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, i+1, numTables);
     417                    _("Incorrect number of table files entered. Found: %d. Expected: %d."), i+1, numTables);
    418418            no_problem = false;
    419419        }
     
    429429            } else if(foundTable==false && j==numTables-1) {
    430430                psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem,
    431                         PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, j, numTables);
     431                        _("Incorrect number of table files entered. Found: %d. Expected: %d."), j, numTables);
    432432                no_problem = false;
    433433            }
     
    444444
    445445    if(numTables != i) {
    446         psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, i, numTables);
     446        psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, _("Incorrect number of table files entered. Found: %d. Expected: %d."), i, numTables);
    447447    }
    448448
     
    480480            type!=PS_TIME_TT) {
    481481        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    482                 PS_ERRORTEXT_psTime_TYPE_UNKNOWN,
     482                _("Specified type, %d, is not supported."),
    483483                type);
    484484        return NULL;
     
    521521    if (gettimeofday(&now, 0) == -1) {
    522522        psError(PS_ERR_OS_CALL_FAILED, true,
    523                 PS_ERRORTEXT_psTime_GET_TOD_FAILED);
     523                _("Failed to determine the current time from gettimeofday function."));
    524524        return NULL;
    525525    }
     
    728728            // Convert from TAI to unknown time type
    729729        } else {
    730             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);
     730            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
    731731            return NULL;
    732732        }
     
    753753            // Convert from TT to unknown time type
    754754        } else {
    755             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);
     755            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
    756756            return NULL;
    757757        }
     
    772772            // Convert UTC to unknown time type
    773773        } else {
    774             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);
     774            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
    775775            return NULL;
    776776        }
    777777        // Convert unknown time type
    778778    } else {
    779         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, time->type);
     779        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), time->type);
    780780        return NULL;
    781781    }
     
    810810    // Verify input time is not in UT1 seconds
    811811    if(time->type == PS_TIME_UT1) {
    812         psError(PS_ERR_BAD_PARAMETER_VALUE,true,PS_ERRORTEXT_psTime_TYPE_INCORRECT,time->type);
     812        psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),time->type);
    813813        return NAN;
    814814    }
     
    897897
    898898        // Date too early for tables. Get default time delta value from metadata, and issue warning.
    899         psLogMsg(__func__,PS_LOG_WARN,PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES,mjd,"UT1-UTC");
     899        psLogMsg(__func__,PS_LOG_WARN,_("Specified psTime predates (%g) all tables of %s information."),mjd,"UT1-UTC");
    900900
    901901        // Lookup value from time metadata loaded from pslib.config
    902902        tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.before.dut");
    903903        if(tableMetadataItem == NULL) {
    904             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     904            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    905905                    "psLib.time.before.dut");
    906906            return NAN;
     
    917917        */
    918918        // Generate warning of postdate information
    919         psLogMsg(__func__,PS_LOG_WARN,PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "UT1-UTC");
     919        psLogMsg(__func__,PS_LOG_WARN,_("Specified psTime postdates (%g) all tables of %s information."), mjd, "UT1-UTC");
    920920
    921921        // Lookup values to calculate prediction
    922922        tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.dut");
    923923        if(tableMetadataItem == NULL) {
    924             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     924            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    925925                    "psLib.time.predict.dut");
    926926            return NAN;
     
    935935
    936936    } else if(status != PS_LOOKUP_SUCCESS) {
    937         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);
     937        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation."));
    938938        return NAN;
    939939    }
     
    10591059
    10601060    if(time->type != PS_TIME_TAI) {
    1061         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_INCORRECT, time->type);
     1061        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is incorrect."), time->type);
    10621062        return NULL;
    10631063    }
     
    10751075        // Date too earlier for tables. Get default polar coodinate values from metadata, and issue warning.
    10761076        #if 0
    1077         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES, mjd, "polar motion");
     1077        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified psTime predates (%g) all tables of %s information."), mjd, "polar motion");
    10781078        return NULL;
    10791079        #else
    10801080
    1081         psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES, mjd, "polar motion");
     1081        psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, _("Specified psTime predates (%g) all tables of %s information."), mjd, "polar motion");
    10821082        #endif
    10831083
     
    10851085        if(tableMetadataItem == NULL) {
    10861086            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    1087                     PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.before.xp");
     1087                    _("Failed find '%s' in time metadata."), "psLib.time.before.xp");
    10881088            return NULL;
    10891089        }
     
    10921092        tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.before.yp");
    10931093        if(tableMetadataItem == NULL) {
    1094             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.before.yp");
     1094            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.before.yp");
    10951095            return NULL;
    10961096        }
     
    11101110        #if 0
    11111111        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    1112                 PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "polar motion");
     1112                _("Specified psTime postdates (%g) all tables of %s information."), mjd, "polar motion");
    11131113        return NULL;
    11141114        #else
    11151115
    11161116        psLogMsg(PS_FILE_LINE, PS_LOG_ERROR,
    1117                  PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "polar motion");
     1117                 _("Specified psTime postdates (%g) all tables of %s information."), mjd, "polar motion");
    11181118        #endif
    11191119
     
    11211121        tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.mjd");
    11221122        if(tableMetadataItem == NULL) {
    1123             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,
     1123            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."),
    11241124                    "psLib.time.predict.mjd");
    11251125            return NULL;
     
    11301130        tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.xp");
    11311131        if(tableMetadataItem == NULL) {
    1132             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.predict.xp");
     1132            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.predict.xp");
    11331133            return NULL;
    11341134        }
     
    11391139        tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.yp");
    11401140        if(tableMetadataItem == NULL) {
    1141             psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.predict.yp");
     1141            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.predict.yp");
    11421142            return NULL;
    11431143        }
     
    11631163
    11641164    } else if(xStatus!=PS_LOOKUP_SUCCESS || yStatus!=PS_LOOKUP_SUCCESS) {
    1165         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);
     1165        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation."));
    11661166        return NULL;
    11671167    }
     
    11931193    // Check if psTime tables are loaded/loadable
    11941194    if(!p_psTimeInit(p_psGetConfigFileName())) {
    1195         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_FILE_NOT_FOUND,
     1195        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed to open file %s."),
    11961196                p_psGetConfigFileName());
    11971197        return NAN;
     
    12011201    tableMetadataItem = psMetadataLookup(timeMetadata, "taiTable");
    12021202    if(tableMetadataItem == NULL) {
    1203         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "taiTable");
     1203        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "taiTable");
    12041204        return NAN;
    12051205    }
     
    12281228    // Check for successful interpolation
    12291229    if(results == NULL) {
    1230         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);
     1230        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation."));
    12311231        return NAN;
    12321232    }
     
    12731273    // Verify time is UTC type
    12741274    if(utc->type != PS_TIME_UTC) {
    1275         psError(PS_ERR_BAD_PARAMETER_VALUE,true,PS_ERRORTEXT_psTime_TYPE_INCORRECT,utc->type);
     1275        psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),utc->type);
    12761276        return false;
    12771277    }
     
    13711371    // Converts psTime to YYYY-MM-DDThh:mm:ss.sss in string form
    13721372    if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y-%m-%dT%H:%M:%S", tmTime)) {
    1373         psError(PS_ERR_OS_CALL_FAILED, true, PS_ERRORTEXT_psTime_CONVERT_TIME_TO_STRING_FAILED);
     1373        psError(PS_ERR_OS_CALL_FAILED, true, _("Failed to convert a time via strftime function."));
    13741374        return NULL;
    13751375    }
     
    13851385    // Create string with milliseconds
    13861386    if (snprintf(timeString, MAX_TIME_STRING_LENGTH, "%s.%1dZ", tempString, ds) < 0) {
    1387         psError(PS_ERR_OS_CALL_FAILED, true, PS_ERRORTEXT_psTime_APPEND_MSEC_FAILED);
     1387        psError(PS_ERR_OS_CALL_FAILED, true, _("Failed to append millisecond to time string with snprintf function."));
    13881388        return NULL;
    13891389    }
     
    15011501    if (sscanf(input, "%d-%d-%dT%d:%d:%d.%d", &tmTime.tm_year, &tmTime.tm_mon, &tmTime.tm_mday,
    15021502               &tmTime.tm_hour, &tmTime.tm_min, &tmTime.tm_sec,&millisecond) < 7) {
    1503         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_ISOTIME_MALFORMED, input);
     1503        psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified ISO Time string, '%s', is malformed.  Must be in 'YYYY-MM-DDThh:mm:ss.sss' format."), input);
    15041504        return NULL;
    15051505    }
     
    17601760    // Verify both times of the same type
    17611761    if(time1->type != time2->type) {
    1762         psError(PS_ERR_BAD_PARAMETER_VALUE,true,PS_ERRORTEXT_psTime_TYPE_INCORRECT,time1->type);
     1762        psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),time1->type);
    17631763        return NAN;
    17641764    }
Note: See TracChangeset for help on using the changeset viewer.