diff --git a/AUTHORS b/AUTHORS index 6a9d2fd6c608b7b0984933af383868d458608008..26e4e78f59305d4894f7058c0be00f8438108a9d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,7 +14,12 @@ Alexandre Bourget <alexandre dot bourget at savoirfairelinux dot com> Guillaume Carmel-Archambault <guillaume.carmel-archambault at savoirfairelinux dot com> - Presence - Contacts - +Yun Liu <yun.liu at savoirfairelinux dot com> + - Change sip library to pjsip + - Support multiple accounts registration + - Add chinese translation + - Many portions of test and debugging + Polytechnic School of Montreal: - Jean-Francois Blanchard-Dionne <jean-francois.blanchard-dionne at polymtl dot ca> - Ala Eddine Limame <ala-eddine.limame at polymtl dot ca> diff --git a/ChangeLog b/ChangeLog index 10c8dc805a663badd5c4a866b891621791c6a543..e688e585483d8923112cc834e57d5a9fef3cad9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-30 Yun Liu + * Change sip library to pjsip + * Support multiple accounts registration + * Update translations (Add chinese translation) + * Many portions of code and debugging + 2008-03-18 Emmanuel Milou * GTK client diff --git a/po/Makefile.am b/po/Makefile.am index 87968cefc1faf67f11f817715a2f952121383676..c5e67123b756d1464b2a3e9097770cc757d6b805 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -5,12 +5,14 @@ DOMAIN=sflphone POFILES=\ fr.po \ es.po \ - de.po + de.po \ + zh_CN.po MOFILES=\ fr.mo \ es.mo \ - de.mo + de.mo \ + zh_CN.mo MSGFMT=msgfmt diff --git a/po/README b/po/README new file mode 100644 index 0000000000000000000000000000000000000000..e66f706d81dc9d70ee1c7b421c501b3e1b9715a8 --- /dev/null +++ b/po/README @@ -0,0 +1,17 @@ +If we need to update sflphone.pot file, do the following steps: + +>cd sflphone-gtk/src +>xgettext -k_ -o sflphone.pot *.c + +>msgmerge zh_CN.po sflphone.pot +>msgmerge fr.po sflphone.pot +>msgmerge es.po sflphone.pot +>msgmerge de.po sflphone.pot + +Modify all the new po files, and then + +>msgfmt -o zh_CN.mo zh_CN.po +>msgfmt -o fr.mo fr.po +>msgfmt -o es.mo es.po +>msgfmt -o de.mo de.po + diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 0000000000000000000000000000000000000000..48e22d35743e6a10bb4d235f6c35b403dca5d930 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,579 @@ +# Chinese translation of SFLphone. +# Copyright (C) 2008 The Free Software Foundation, Inc. +# This file is distributed under the GNU General Public License Version 3. +# +# Yun Liu <yun.liu@savoirfairelinux.com>, 2008. +# + +msgid "" +msgstr "" +"Project-Id-Version: SFLphone 0.9.2\n" +"Report-Msgid-Bugs-To: Yun Liu <yun.liu@savoirfairelinux.com >\n" +"PO-Revision-Date: 2008-10-28 14:15\n" +"Last-Translator: Yun Liu <yun.liu@savoirfairelinux.com>\n" +"Language-Team: SavoirFaireLinux Inc <sflphoneteam@savoirfairelinux.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n>1;\n" + +#: accountlist.c:158 +msgid "Registered" +msgstr "已注册" + +#: accountlist.c:161 +msgid "Not Registered" +msgstr "未注册" + +#: accountlist.c:164 +msgid "Trying..." +msgstr "æ£åœ¨è¿žæŽ¥..." + +#: accountlist.c:167 sflnotify.c:171 sflnotify.c:210 +msgid "Error" +msgstr "注册失败" + +#: accountlist.c:170 +msgid "Bad authentification" +msgstr "认è¯é”™è¯¯" + +#: accountlist.c:173 +msgid "Network unreachable" +msgstr "网络连接失败" + +#: accountlist.c:175 +msgid "Host unreachable" +msgstr "æœåŠ¡å™¨è¿žæŽ¥å¤±è´¥" + +#: accountlist.c:178 +msgid "Invalid" +msgstr "æ— æ•ˆ" + +#: accountwindow.c:143 +msgid "Account settings" +msgstr "å¸æˆ·è®¾ç½®" + +#: accountwindow.c:155 +msgid "Account parameters" +msgstr "å¸æˆ·ç›¸å…³å‚æ•°" + +#: accountwindow.c:177 +msgid "_Enabled" +msgstr "å¯ç”¨(E)" + +#: accountwindow.c:183 assistant.c:210 assistant.c:264 +msgid "_Alias" +msgstr "别å(A)" + +#: accountwindow.c:191 +msgid "_Protocol" +msgstr "åè®®(P)" + +#: accountwindow.c:209 +msgid "Unknown" +msgstr "未知" + +#: accountwindow.c:219 assistant.c:218 assistant.c:272 +msgid "_Host name" +msgstr "主机å(H)" + +#: accountwindow.c:227 assistant.c:226 assistant.c:280 +msgid "_User name" +msgstr "用户å(U)" + +#: accountwindow.c:238 assistant.c:236 assistant.c:290 +msgid "_Password" +msgstr "密ç (P)" + +#: accountwindow.c:249 +msgid "_Voicemail box #" +msgstr "è¯éŸ³ä¿¡ç®±(V)" + +#: accountwindow.c:260 assistant.c:313 +msgid "Network Address Translation" +msgstr "网络地å€è§£æž" + +#: accountwindow.c:271 assistant.c:322 +msgid "E_nable STUN" +msgstr "使用STUN(n)" + +#: accountwindow.c:275 +msgid "Enable it if you are behind a firewall, then restart SFLphone" +msgstr "当使用防ç«å¢™æ—¶ï¼Œéœ€è®¾å®šSTUN. 设置完毕åŽï¼Œè¯·é‡æ–°å¯åŠ¨SFLphone" + +#: accountwindow.c:279 +msgid "_STUN Server" +msgstr "STUNæœåŠ¡å™¨(S)" + +#: accountwindow.c:286 +msgid "Format: name.server:port" +msgstr "æ ¼å¼ï¼šname.server:port" + +#: actions.c:57 sflnotify.c:103 +#, c-format +msgid "%d voice mails" +msgstr "%d 个è¯éŸ³ä¿¡æ¯" + +#: actions.c:59 +#, c-format +msgid "%d voice mail" +msgstr "%d 个è¯éŸ³ä¿¡æ¯" + +#: actions.c:80 +#, c-format +msgid "%s account- %s" +msgstr "%s å¸æˆ·- %s" + +#: actions.c:214 +msgid "" +"Unable to connect to the SFLphone server.\n" +"Make sure the daemon is running." +msgstr "" +"连接SFLphoneæœåŠ¡å™¨å¤±è´¥.\n" +"请检查daemon是å¦è¿˜åœ¨è¿è¡Œ." + +#: actions.c:741 +#, c-format +msgid "" +"<b>Error: No audio codecs found.\n" +"\n" +"</b> SFL audio codecs have to be placed in <i>%s</i> or in the <b>.sflphone</" +"b> directory in your home( <i>%s</i> )" +msgstr "" +"<b>é”™è¯¯ï¼šæ— æ³•æ‰¾åˆ°codecsç¼–ç 文件.\n" +"\n" +"</b> SFL声音codecs文件应ä½äºŽ<i>%s</i> 或 ä½äºŽä¸»ç›®å½•( <i>%s</i> )çš„<b>.sflphone</b>目录下" + +#: assistant.c:138 +msgid "SFLphone account configuration wizard" +msgstr "SFLphone å¸æˆ·è®¾ç½®å‘导" + +#: assistant.c:165 +msgid "SFLphone 0.8" +msgstr "SFLphone 0.8" + +#: assistant.c:165 +msgid "Welcome to SFLphone!" +msgstr "欢迎使用SFLphone!" + +#: assistant.c:167 +msgid "This installation wizard will help you configure an account." +msgstr "安装å‘导将帮助您é…ç½®å¸æˆ·" + +#: assistant.c:182 +msgid "VoIP Protocols" +msgstr "VoIPåè®®" + +#: assistant.c:182 +msgid "Select an account type:" +msgstr "选择å¸æˆ·ç±»åž‹:" + +#: assistant.c:202 +msgid "SIP account configuration" +msgstr "SIPå¸æˆ·é…ç½®" + +#: assistant.c:202 assistant.c:256 +msgid "Please fill the following information:" +msgstr "请填写以下信æ¯:" + +#: assistant.c:256 +msgid "IAX2 account configuration" +msgstr "IAX2å¸æˆ·é…ç½®" + +#: assistant.c:313 +msgid "You should probably enable this if you are behind a firewall." +msgstr "å¦‚æžœä½ çš„ç½‘ç»œä½¿ç”¨é˜²ç«å¢™ï¼Œä½ 很有å¯èƒ½éœ€è¦è®¾å®šæ¤é¡¹." + +#: assistant.c:329 +msgid "_STUN server" +msgstr "STUNæœåŠ¡å™¨(S)" + +#: assistant.c:346 +msgid "Account Registration" +msgstr "å¸æˆ·æ³¨å†Œ" + +#: assistant.c:346 +msgid "Congratulations!" +msgstr "æå–œï¼" + +#: assistant.c:348 +msgid "" +"This assistant is now finished.\n" +"\n" +" You can at any time check your registration state or modify your accounts " +"parameters in the Options/Accounts window." +msgstr "" +"é…置完æˆ.\n" +"\n" +"ä½ å¯ä»¥éšæ—¶åœ¨ 选项/å¸æˆ· 窗å£ä¸æŸ¥çœ‹æ³¨å†ŒçŠ¶æ€æˆ–者修改å¸æˆ·å‚æ•°" + +#: audioconf.c:150 +#, c-format +msgid "audio device index for output = %d\n" +msgstr "音频设备索引输出 ï¼ %d\n" + +#: audioconf.c:558 +msgid "Name" +msgstr "å称" + +#: audioconf.c:563 +msgid "Frequency" +msgstr "频率" + +#: audioconf.c:568 +msgid "Bitrate" +msgstr "比率" + +#: audioconf.c:573 +msgid "Bandwidth" +msgstr "带宽" + +#: audioconf.c:633 +msgid "Pulseaudio" +msgstr "Pulseaudio" + +#: audioconf.c:636 +msgid "ALSA" +msgstr "ALSA" + +#: audioconf.c:662 +msgid "ALSA plugin" +msgstr "ALSAæ’件" + +#: audioconf.c:684 +msgid "Output" +msgstr "输出" + +#: audioconf.c:706 +msgid "Input" +msgstr "输入" + +#: audioconf.c:739 +msgid "_Enable ringtones" +msgstr "å¯ç”¨é“ƒå£°(E)" + +#: audioconf.c:744 +msgid "Choose a ringtone" +msgstr "选择铃声" + +#: audioconf.c:749 +msgid "Audio Files" +msgstr "音频文件" + +#: audioconf.c:774 +msgid "Sound Manager" +msgstr "音频管ç†å™¨" + +#: audioconf.c:781 +msgid "ALSA configuration" +msgstr "ALSA é…ç½®" + +#: audioconf.c:791 +msgid "Codecs" +msgstr "Codecsç¼–ç " + +#: audioconf.c:799 +msgid "Ringtones" +msgstr "铃声" + +#: calltree.c:208 +#, c-format +msgid "\"Voicemail\" <%s>" +msgstr "\"è¯éŸ³é‚®ä»¶\" <%s>" + +#: calltree.c:405 calltree.c:407 +msgid "Place a call" +msgstr "拨å·" + +#: calltree.c:414 calltree.c:416 +msgid "Pick up" +msgstr "接电è¯" + +#: calltree.c:424 calltree.c:426 +msgid "Hang up" +msgstr "放电è¯" + +#: calltree.c:434 calltree.c:436 +msgid "Off Hold" +msgstr "æ¢å¤é€šè¯" + +#: calltree.c:445 calltree.c:447 +msgid "On Hold" +msgstr "待机" + +#: calltree.c:458 calltree.c:460 +msgid "Transfer" +msgstr "转接" + +#: calltree.c:470 calltree.c:472 +msgid "History" +msgstr "历å²" + +#: calltree.c:480 calltree.c:484 +msgid "Voicemail" +msgstr "è¯éŸ³ä¿¡ç®±" + +#: configwindow.c:371 +msgid "Protocol" +msgstr "åè®®" + +#: configwindow.c:378 +msgid "Status" +msgstr "状æ€" + +#: configwindow.c:470 +msgid "Desktop Notification" +msgstr "æ¡Œé¢æ示" + +#: configwindow.c:478 +msgid "_Enable" +msgstr "å¯ç”¨(E)" + +#: configwindow.c:483 +msgid "_Notify voice mails" +msgstr "通知è¯éŸ³é‚®ä»¶(N)" + +#: configwindow.c:489 +msgid "System Tray Icon" +msgstr "ç³»ç»Ÿæ‰˜ç›˜å›¾æ ‡" + +#: configwindow.c:497 +msgid "_Popup main window on incoming call" +msgstr "æ¥ç”µæ—¶å¼¹å‡ºä¸»çª—å£(P)" + +#: configwindow.c:502 +msgid "Ne_ver popup main window" +msgstr "从ä¸å¼¹å‡ºä¸»çª—å£(v)" + +#: configwindow.c:506 +msgid "_Start hidden" +msgstr "å¯åŠ¨æ—¶éšè—(S)" + +#: configwindow.c:512 +msgid "Calls History" +msgstr "拨å·åŽ†å²" + +#: configwindow.c:520 +msgid "_Maximum number of calls" +msgstr "最大拨å·æ•°(M)" + +#: configwindow.c:536 +msgid "PulseAudio sound server" +msgstr "PulseAudioæœåŠ¡å™¨" + +#: configwindow.c:544 +msgid "_Control running applications volume" +msgstr "控制æ£åœ¨è¿è¡Œçš„应用程åºçš„音é‡(C)" + +#: configwindow.c:557 +msgid "SIP Port" +msgstr "SIP端å£å·" + +#: configwindow.c:566 +msgid "Apply" +msgstr "应用" + +#: configwindow.c:570 +msgid "Port:" +msgstr "端å£:" + +#: configwindow.c:600 +msgid "Preferences" +msgstr "属性" + +#: configwindow.c:620 +msgid "General Settings" +msgstr "常用é…ç½®" + +#: configwindow.c:625 +msgid "Audio Settings" +msgstr "音频é…ç½®" + +#: configwindow.c:649 +msgid "Accounts" +msgstr "å¸æˆ·" + +#: configwindow.c:661 +msgid "Accounts previously setup" +msgstr "以å‰å¸æˆ·è®¾ç½®" + +#: errors.c:28 +msgid "" +"<b>ALSA notification</b>\n" +"\n" +"Error while opening playback device" +msgstr "" +"<b>ALSAæ示</b>\n" +"\n" +"打开回放设备时出错" + +#: errors.c:31 +msgid "" +"<b>ALSA notification</b>\n" +"\n" +"Error while opening capture device" +msgstr "" +"<b>ALSAæ示</b>\n" +"\n" +"打开采集设备时出错" + +#: historyfilter.c:45 historyfilter.c:63 historyfilter.c:78 +msgid "Search" +msgstr "查找" + +#: mainwindow.c:69 +msgid "" +"<b>There is one call in progress.</b>\n" +"Do you still want to quit?" +msgstr "" +"<b>有一个电è¯æ£åœ¨å¤„ç†</b>\n" +"确定è¦é€€å‡ºï¼Ÿ" + +#: mainwindow.c:73 +msgid "" +"<b>There are calls in progress.</b>\n" +"Do you still want to quit?" +msgstr "" +"<b>有电è¯æ£åœ¨å¤„ç†ä¸</b>\n" +"确定è¦é€€å‡ºï¼Ÿ" + +#: menus.c:129 +msgid "SFLphone is a VoIP client compatible with SIP and IAX2 protocols." +msgstr "SFLphone是一个VoIP客户端,它兼容SIPå’ŒIAX2åè®®." + +#: menus.c:132 +msgid "About SFLphone" +msgstr "关于SFLphone" + +#: menus.c:155 +msgid "_Help" +msgstr "帮助(H)" + +#: menus.c:272 +msgid "_New call" +msgstr "新电è¯(N)" + +#: menus.c:284 menus.c:768 +msgid "_Pick up" +msgstr "拨出(P)" + +#: menus.c:294 menus.c:780 +msgid "_Hang up" +msgstr "放下(H)" + +#: menus.c:304 menus.c:792 +msgid "On _Hold" +msgstr "" + +#: menus.c:320 +msgid "_Account Assistant" +msgstr "å¸æˆ·å‘导(A)" + +#: menus.c:350 +msgid "_Call" +msgstr "电è¯" + +#: menus.c:496 +msgid "History empty" +msgstr "æ— åŽ†å²è®°å½•" + +#: menus.c:537 +msgid "_Clear history" +msgstr "清空历å²è®°å½•(C)" + +#: menus.c:549 +msgid "_Accounts" +msgstr "å¸æˆ·(A)" + +#: menus.c:564 +msgid "_Edit" +msgstr "编辑(E)" + +#: menus.c:624 +msgid "_Dialpad" +msgstr "拨å·é¢æ¿" + +#: menus.c:636 +msgid "_Volume controls" +msgstr "音é‡æŽ§åˆ¶(V)" + +#: menus.c:645 +msgid "_Search history" +msgstr "查找历å²(S)" + +#: menus.c:653 +msgid "_View" +msgstr "查看(V)" + +#: menus.c:875 +msgid "_Call back" +msgstr "回å«(C)" + +#: sflnotify.c:34 sflnotify.c:100 +#, c-format +msgid "%s account: %s" +msgstr "%s å¸æˆ·: %s" + +#: sflnotify.c:37 +#, c-format +msgid "<i>From:</i> %s" +msgstr "<i>拨入方:</i> %s" + +#: sflnotify.c:52 +msgid "Accept" +msgstr "接å—" + +#: sflnotify.c:53 +msgid "Refuse" +msgstr "æ‹’ç»" + +#: sflnotify.c:54 sflnotify.c:117 sflnotify.c:154 +msgid "Ignore" +msgstr "忽略" + +#: sflnotify.c:136 +#, c-format +msgid "Calling with %s account <i>%s</i>" +msgstr "使用%så¸æˆ·<i>%s</i>呼å«" + +#: sflnotify.c:140 +msgid "Current account" +msgstr "当å‰å¸æˆ·" + +#: sflnotify.c:169 +msgid "You haven't setup any accounts" +msgstr "ä½ æ²¡æœ‰è®¾ç½®ä»»ä½•å¸æˆ·" + +#: sflnotify.c:185 sflnotify.c:224 +msgid "Setup Accounts" +msgstr "设定å¸æˆ·" + +#: sflnotify.c:208 +msgid "You have no registered accounts" +msgstr "未å‘现已注册å¸æˆ·" + +#: sliders.c:161 +msgid "Speakers volume" +msgstr "扬声器音é‡" + +#: sliders.c:163 +msgid "Mic volume" +msgstr "è¯ç’音é‡" + +#: statusicon.c:91 +msgid "_Show main window" +msgstr "显示主窗å£(S)" + +#: statusicon.c:124 +#, c-format +msgid "SFLphone - %i accounts registered" +msgstr "SFLphone - %i 个å¸æˆ·å·²æ³¨å†Œ" + +#: timestamp.c:45 +msgid "<small>Missed call</small>" +msgstr "<small>未接电è¯</small>" + +#: timestamp.c:63 +#, c-format +msgid "<small>Duration:</small> %s" +msgstr "<small>时长:</small> %s" diff --git a/sflphone-gtk/src/calltree.c b/sflphone-gtk/src/calltree.c index cdb7c992786a47c0c8b31e57b3e113529d2fee16..fd0806894e0ae071364ad91fda7a811e1a1ee9d7 100644 --- a/sflphone-gtk/src/calltree.c +++ b/sflphone-gtk/src/calltree.c @@ -527,7 +527,7 @@ create_call_tree (calltab_t* tab) sw = gtk_scrolled_window_new( NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); - g_signal_connect (G_OBJECT ( sw ), "key-press-event",G_CALLBACK (on_key_released), NULL); + g_signal_connect (G_OBJECT ( sw ), "key-release-event",G_CALLBACK (on_key_released), NULL); tab->store = gtk_list_store_new (3, GDK_TYPE_PIXBUF,// Icon diff --git a/sflphone-gtk/src/dialpad.c b/sflphone-gtk/src/dialpad.c index 7c757aa1840eeb7f17cb876859ce06af4912f4bf..df2ab424fc86538a4be005eafdc4b20bdf0c89d0 100644 --- a/sflphone-gtk/src/dialpad.c +++ b/sflphone-gtk/src/dialpad.c @@ -26,6 +26,7 @@ static void dialpad_pressed (GtkWidget * widget UNUSED, gpointer data) { + gtk_widget_grab_focus(GTK_TREE_VIEW(current_calls->view)); sflphone_keypad(0, (gchar*) data); } diff --git a/sflphone-gtk/src/menus.c b/sflphone-gtk/src/menus.c index 586bd79e115f1b92bcc879ae840a77cf22f95e8d..bf9fbe93d0e6941edffa4ec8c9f19d14502502df 100644 --- a/sflphone-gtk/src/menus.c +++ b/sflphone-gtk/src/menus.c @@ -114,7 +114,8 @@ help_about ( void * foo UNUSED) "Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>", "Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>", "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>", - "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>" + "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", + "Yun Liu <yun.liu@savoirfairelinux.com>" "Jean-Philippe Barrette-LaPierre", "Laurielle Lea", NULL}; diff --git a/src/main.cpp b/src/main.cpp index 22a6c5b93ed04e523a0b994daefc9470e764ed05..88c44d927aa2dbe78225a4c321e3ce0b2e777788 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,6 +23,8 @@ #include <cstring> #include <iostream> #include <string> +#include <dirent.h> +#include <sys/stat.h> //#include "config.h" #include "global.h" @@ -52,15 +54,27 @@ main (int argc, char **argv) { } else { FILE *fp; char homepid[128]; + char sfldir[128]; unsigned int iPid = getpid(); char cPid[64], cOldPid[64]; sprintf(cPid,"%d", iPid); sprintf(homepid, "%s/.%s/%s", HOMEDIR, PROGDIR, PIDFILE); + sprintf(sfldir, "%s/.%s", HOMEDIR, PROGDIR); if( (fp = fopen(homepid,"r")) == NULL ){ - //PID file doesn't exists, create and write pid in it + // Check if $HOME/.sflphone directory exists or not. + DIR *dir; + if ( (dir = opendir (sfldir)) == NULL) { + //Create it + if ( mkdir(sfldir, 0755) != 0){ + fprintf(stderr, "Creating directory %s failed. Exited.\n", sfldir ); + exit(-1); + } + } + + // PID file doesn't exists, create and write pid in it if( (fp = fopen(homepid,"w")) == NULL ){ fprintf(stderr, _("Creating PID file %s failed. Exited.\n"), homepid); exit(-1); @@ -69,7 +83,7 @@ main (int argc, char **argv) { fclose( fp ); } } else { - // PID file exists. Check the former process still alive or not. If alive, kill it and start a new one. + // PID file exists. Check the former process still alive or not. If alive, give user a hint. fgets( cOldPid, 64, fp ); fclose(fp); if (kill(atoi(cOldPid), 0) == SUCCESS) {