Changeset 27944 for titan/titan/global.h


Ignore:
Timestamp:
03/26/14 03:20:47 (9 years ago)
Author:
obi
Message:

fix translate date > day name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r27943 r27944  
    20792079        else
    20802080                ret = strftime(buf, count, "%d-%m-%Y %H:%M", t);
    2081 
    2082         buf = string_replace("Mon", "Mon", buf, 1);
    2083         buf = string_replace("Tue", "Die", buf, 1);
    2084         buf = string_replace("Wed", "Mit", buf, 1);
    2085         buf = string_replace("Thu", "Don", buf, 1);
    2086         buf = string_replace("Fri", "Fre", buf, 1);
    2087         buf = string_replace("Sat", "Sam", buf, 1);
    2088         buf = string_replace("Sun", "Son", buf, 1);
    20892081
    20902082        return ret;
     
    66616653}
    66626654
     6655//flag 0: Mon > Montag
     6656//flag 1: Mon > Mon
     6657char* translate_time(char* input, int flag)
     6658{
     6659        char* tmpstr = NULL;
     6660        if(input == NULL) return tmpstr;
     6661        tmpstr = ostrcat(tmpstr, input, 1, 1); 
     6662
     6663        if(flag == 0)
     6664        {
     6665                tmpstr = string_replace_all("Wed", _("Wednesday"), tmpstr, 1);
     6666
     6667                tmpstr = string_replace_all("Mon", _("Monday"), tmpstr, 1);
     6668                tmpstr = string_replace_all("Tue", _("Tuesday"), tmpstr, 1);
     6669                tmpstr = string_replace_all("(Wed)", _("Wednesday"), tmpstr, 1);
     6670                tmpstr = string_replace_all("Thu", _("Thursday"), tmpstr, 1);
     6671                tmpstr = string_replace_all("Fri", _("Friday"), tmpstr, 1);
     6672                tmpstr = string_replace_all("Sat", _("Saturday"), tmpstr, 1);
     6673                tmpstr = string_replace_all("Sun", _("Sunday"), tmpstr, 1);
     6674        }
     6675        else
     6676        {       
     6677                tmpstr = string_replace("Mon", _("Mon"), tmpstr, 1);
     6678                tmpstr = string_replace("Tue", _("Tue"), tmpstr, 1);
     6679                tmpstr = string_replace("Wed", _("Wed"), tmpstr, 1);
     6680                tmpstr = string_replace("Thu", _("Thu"), tmpstr, 1);
     6681                tmpstr = string_replace("Fri", _("Fri"), tmpstr, 1);
     6682                tmpstr = string_replace("Sat", _("Sat"), tmpstr, 1);
     6683                tmpstr = string_replace("Sun", _("Sun"), tmpstr, 1);
     6684        }
     6685
     6686        return tmpstr;
     6687}
     6688
    66636689#endif
Note: See TracChangeset for help on using the changeset viewer.