summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjack <jack@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-12 13:18:11 +0800
committerjack <jack@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-12 13:18:11 +0800
commit3eb88868c5ccdc95ce8002dff5e8cd227368303e (patch)
treeab9d9cdf598d8214f3036619e6bb9789f675fe05
parentb5602d4430beae269440e26e4fadb58f90952e5f (diff)
downloadpttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.tar
pttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.tar.gz
pttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.tar.bz2
pttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.tar.lz
pttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.tar.xz
pttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.tar.zst
pttbbs-3eb88868c5ccdc95ce8002dff5e8cd227368303e.zip
Replaced friend.c with i18n version
git-svn-id: http://opensvn.csie.org/pttbbs/branches/Jaky.i18n@1953 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/friend.c69
1 files changed, 28 insertions, 41 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index eea78bdc..5b6500e2 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -24,27 +24,15 @@ static unsigned int friend_max[8] = {
/* Ptt 各種特別名單的補述 */
-static char *friend_desc[8] = {
- "友誼描述:",
- "惡形惡狀:",
- "",
- "",
- "描述一下:",
- "投票者描述:",
- "惡形惡狀:",
- "看板好友描述"
-};
-
-/* Ptt 各種特別名單的中文敘述 */
-static char *friend_list[8] = {
- "好友名單",
- "壞人名單",
- "上線通知",
- "新文章通知",
- "其它特別名單",
- "私人投票名單",
- "看板禁聲名單",
- "看板好友名單"
+static int friend_desc[8] = {
+ 1033,
+ 1034,
+ MAX_STRING - 1, /* NULL string*/
+ MAX_STRING - 1,
+ 1035,
+ 1036,
+ 1037,
+ 1038
};
void
@@ -90,9 +78,9 @@ friend_add(char *uident, int type, char* des)
if (type != FRIEND_ALOHA && type != FRIEND_POST){
if(!des)
- getdata(2, 0, friend_desc[type], buf, sizeof(buf), DOECHO);
+ getdata(2, 0, SHM->i18nstr[cuser.language][friend_desc[type]], buf, sizeof(buf), DOECHO);
else
- getdata_str(2, 0, friend_desc[type], buf, sizeof(buf), DOECHO, des);
+ getdata_str(2, 0, SHM->i18nstr[cuser.language][friend_desc[type]], buf, sizeof(buf), DOECHO, des);
}
if ((fp = fopen(fpath, "a"))) {
@@ -127,7 +115,7 @@ friend_special(void)
clrtoeol();
outs(genbuf);
}
- getdata(22, 0, "請選擇第幾號特別名單 (0~9)[0]?", genbuf, 3, LCECHO);
+ getdata(22, 0, SHM->i18nstr[cuser.language][1047], genbuf, 3, LCECHO);
if (genbuf[0] >= '0' && genbuf[0] <= '9') {
special_list[5] = genbuf[0];
special_des[5] = genbuf[0];
@@ -148,21 +136,21 @@ friend_append(int type, int count)
do {
move(2, 0);
clrtobot();
- outs("要引入哪一個名單?\n");
+ outs(SHM->i18nstr[cuser.language][1048]);
for (j = i = 0; i <= 4; i++)
if (i != type) {
++j;
- prints(" (%d) %-s\n", j, friend_list[(int)i]);
+ prints(" (%d) %-s\n", j, SHM->i18nstr[cuser.language][1039 + (int)i]);
}
if (HAVE_PERM(PERM_SYSOP) || currmode & MODE_BOARD)
for (; i < 8; ++i)
if (i != type) {
++j;
- prints(" (%d) %s 板的 %s\n", j, currboard,
- friend_list[(int)i]);
+ prints(SHM->i18nstr[cuser.language][1049], j, currboard,
+ SHM->i18nstr[cuser.language][1039 + (int)i]);
}
- outs(" (S) 選擇其他看板的特別名單");
- getdata(11, 0, "請選擇 或 直接[Enter] 放棄:", buf, 3, LCECHO);
+ outs(SHM->i18nstr[cuser.language][1050]);
+ getdata(11, 0, SHM->i18nstr[cuser.language][1051], buf, 3, LCECHO);
if (!buf[0])
return;
if (buf[0] == 's')
@@ -236,7 +224,7 @@ friend_editdesc(char *uident, int type)
fputs(genbuf, nfp);
else if (!strncmp(genbuf, uident, length)) {
char buf[50] = "";
- getdata(2, 0, "修改描述:", buf, 40, DOECHO);
+ getdata(2, 0, SHM->i18nstr[cuser.language][1052], buf, 40, DOECHO);
fprintf(nfp, "%-13s%s\n", uident, buf);
}
}
@@ -338,9 +326,9 @@ friend_edit(int type)
}
dirty = 0;
while (1) {
- stand_title(friend_list[type]);
+ stand_title(SHM->i18nstr[cuser.language][1039 + type]);
move(0, 40);
- prints("(名單上限:%d個人)", friend_max[type]);
+ prints(SHM->i18nstr[cuser.language][1053], friend_max[type]);
count = 0;
CreateNameList();
@@ -362,9 +350,8 @@ friend_edit(int type)
fclose(fp);
}
getdata(1, 0, (count ?
- "(A)增加(D)刪除(E)修改(P)引入(L)詳細列出"
- "(K)刪除整個名單(W)丟水球(Q)結束?[Q]" :
- "(A)增加 (P)引入其他名單 (Q)結束?[Q]"),
+ SHM->i18nstr[cuser.language][1054] :
+ SHM->i18nstr[cuser.language][1055]),
uident, 3, LCECHO);
if (*uident == 'a') {
move(1, 0);
@@ -392,16 +379,16 @@ friend_edit(int type)
} else if (*uident == 'l' && count)
more(fpath, YEA);
else if (*uident == 'k' && count) {
- getdata(2, 0, "整份名單將會被刪除,您確定嗎 (a/N)?", uident, 3,
+ getdata(2, 0, SHM->i18nstr[cuser.language][1056], uident, 3,
LCECHO);
if (*uident == 'a')
unlink(fpath);
dirty = 1;
} else if (*uident == 'w' && count) {
char wall[60];
- if (!getdata(0, 0, "群體水球:", wall, sizeof(wall), DOECHO))
+ if (!getdata(0, 0, SHM->i18nstr[cuser.language][1057], wall, sizeof(wall), DOECHO))
continue;
- if (getdata(0, 0, "確定丟出群體水球? [Y]", line, 4, LCECHO) &&
+ if (getdata(0, 0, SHM->i18nstr[cuser.language][1058], line, 4, LCECHO) &&
*line == 'n')
continue;
friend_water(wall, type);
@@ -410,7 +397,7 @@ friend_edit(int type)
}
if (dirty) {
move(2, 0);
- outs("更新資料中..請稍候.....");
+ outs(SHM->i18nstr[cuser.language][1059]);
refresh();
if (type == FRIEND_ALOHA || type == FRIEND_POST) {
snprintf(genbuf, sizeof(genbuf), "%s.old", fpath);
@@ -440,7 +427,7 @@ friend_edit(int type)
fgets(genbuf, 30, fp);
fclose(fp);
}
- getdata_buf(2, 0, " 請為此特別名單取一個簡短名稱:", genbuf, 30,
+ getdata_buf(2, 0, SHM->i18nstr[cuser.language][1060], genbuf, 30,
DOECHO);
if ((fp = fopen(line, "w"))) {
fprintf(fp, "%s", genbuf);