summary refs log tree commit diff stats
path: root/po/ca.po
AgeCommit message (Expand)Author
2016-10-08Update translationsPatrick Griffis
2016-02-19Update translationsPatrick Griffis
2014-05-28Update translationsTingPing
2014-01-11Update TranslationsEustachy Kapusta
2013-09-11Update TranslationsTingPing
2013-03-29Update translationsBerke Viktor
2012-11-11Update translationsBerke Viktor
2012-11-10Update translationsBerke Viktor
2012-11-10Update translationsBerke Viktor
2012-11-04Update translationsBerke Viktor
2012-11-04Update translationsBerke Viktor
2012-11-03Update translationsBerke Viktor
2012-11-03Update translationsBerke Viktor
2012-11-03Update translationsBerke Viktor
2012-10-31Update translationsBerke Viktor
2012-10-30Update translation filesBerke Viktor
2012-10-30Update translationsBerke Viktor
2012-10-28Update translationsBerke Viktor
2012-10-25Update translationsBerke Viktor
2012-10-22Update translationsBerke Viktor
2012-10-22Update translationsBerke Viktor
2012-10-20Update translationsBerke Viktor
2012-10-20Finally, update translation files from TransifexBerke Viktor
2012-10-19Regenerate L10n once moar (last time I hope)Berke Viktor
2012-10-19Remove L10n test string from translations tooBerke Viktor
2012-10-19Replace email addressBerke Viktor
2012-10-19Update test strings in repoBerke Viktor
2012-10-19Add Transifex config and update translations from the online resourceBerke Viktor
2012-10-19Update translationsBerke Viktor
2012-10-19Update translationsBerke Viktor
2012-10-19Update translationsBerke Viktor
2012-10-15Huge commit is huge - update translationsBerke Viktor
2011-02-24add xchat r1489berkeviktor@aol.com
mmit/plugins/mpcinfo/functions.c?h=fe-web&id=d03d6e606b40157d910ddf99ab018156abeb8ef0'>d03d6e60 ^
8062bce8 ^
















d03d6e60 ^
d03d6e60 ^
8062bce8 ^
d03d6e60 ^




3f855f07 ^
d03d6e60 ^




















3f855f07 ^
d03d6e60 ^








e681eafa ^
d03d6e60 ^


8062bce8 ^












d03d6e60 ^



































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156












                                                                        
                                                                             

   

                 
                                       
 


                                          
         


                                             
                 

         



                            
 

                                








                                              
















                                                   
                 
         
 




                                                                       
                                             




















                                                                                                 
                                       








                                             
                                                              


                   












                                                                   



































                                                                                            
/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#include <glib.h>

char *split(char *text, char separator)
{
	int pos = -1;
	size_t i;
	for (i = 0; i < strlen(text); i++)
	{
		if (text[i] == separator) {
			pos = i;
			i = strlen(text) + 1;
		}
	}

	if (pos == -1)
	{
		return text;
	}

	text[pos] = 0;
	return &(text[pos + 1]);
}

int endsWith(char *text, char *suffix){
    char *tmp=strstr(text,suffix);
    if (tmp==NULL) return 0;
    if (strlen(tmp)==strlen(suffix)) return 1;
    return 0;
}

int inStr(char *s1, size_t sl1, char *s2)
{
	size_t i;
	for (i = 0; i < sl1 - strlen(s2); i++)
	{
		size_t j;
		for (j = 0; j < strlen(s2); j++)
		{
			if (s1[i + j] != s2[j])
			{
				j = strlen(s2) + 2;
			}
		}

		if (j == strlen(s2))
		{
			return i;
		}
	}

	return -1;
}

static char *subString(char *text, int first, int length, int spcKill){
//if (DEBUG==1) putlog("creating substring");
	char *ret = g_new (char, length + 1);
	int i;
	ret[length]=0;
	for (i=0;i<length;i++){
		ret[i]=text[i+first];
		//if (ret[i]==0) ret[i]='0';
	}
	if (spcKill==1){
	   for (i=length-1;i>=0;i--){
           if (ret[i]==32) ret[i]=0;
           else i=-1;
       }
    }
    //if (DEBUG==1) putlog("substring created");
	return ret;
}

static char *substring(char *text, int first, int length){return subString(text,first,length,0);}


char *readLine(FILE *f){
     //if (DEBUG==1) putlog("reading line from file");
     char *buffer = g_new (char, 1024);
     int pos=0;
     int cc=0;
     while((cc!=EOF)&&(pos<1024)&&(cc!=10)){
          cc=fgetc(f);
          if ((cc!=10)&&(cc!=13)){
             if (cc==EOF) buffer[pos]=0;
             else buffer[pos]=(char)cc;pos++;
          }
     }
     if (buffer[pos]==EOF) hexchat_printf(ph,"EOF: %i\n",pos);
     return buffer;
}

char *toUpper(char *text)
{
	char *ret = (char*) calloc(strlen(text) + 1, sizeof(char));

	size_t i;
	for (i = 0; i < strlen(text); i++)
	{
		ret[i] = toupper(text[i]);
	}

	ret[strlen(text)] = 0;

	return ret;
}

static char *str3cat(char *s1, char *s2, char *s3){
       //if (DEBUG==1) putlog("cating 3 strings");
       char *ret=(char*)calloc(strlen(s1)+strlen(s2)+strlen(s3)+1,sizeof(char));
       strcpy(ret,s1);strcat(ret,s2);strcat(ret,s3);
       ret[strlen(s1)+strlen(s2)+strlen(s3)]=0;
       //if (DEBUG==1) putlog("strings cated");
       return ret;
}

char *replace(char *text, char *from, char *to){
     //if (DEBUG==1) putlog("replacing");
     char *ret=(char*)calloc( strlen(text)+(strlen(to)-strlen(from)),sizeof(char));
     char *left;
     char *right;
     int pos=inStr(text,strlen(text),from);
     if (pos!=-1){
           left=substring(text,0,pos);
           right=substring(text,pos+strlen(from),strlen(text)-(pos+strlen(from)));          
           ret=str3cat(left,to,right);
           return replace(ret,from,to);
     }
     //if (DEBUG==1) putlog("replaced");
     return text;
}

char *intReplaceF(char *text, char *from, int to, char *form){
     //if (DEBUG==1) putlog("replaceF");
     char *buffer=(char*) calloc(16,sizeof(char));
     sprintf(buffer,form,to);
     //if (DEBUG==1) putlog("replaceF done");
     return replace(text,from,buffer);
}

char *intReplace(char *text, char *from, int to){return intReplaceF(text,from,to,"%i");}