LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1748|回复: 4

Gsopcast(gtk)中文版打包

[复制链接]
发表于 2006-9-14 12:46:06 | 显示全部楼层 |阅读模式
  1. # Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
  2. pkgname=sopcast
  3. pkgver=0.9.7
  4. pkgrel=1
  5. pkgdesc="Sopcast is the Streaming Direct Broadcast System based on P2P"
  6. url="http://www.sopcast.org"
  7. depends=(libstdc++5)
  8. source=(http://download.sopcast.org/download/sp-sc.tgz)
  9. md5sums=('abf159c117a13111f22030674e2fa018')
  10. build()  {
  11.   mkdir -p $startdir/pkg/usr/bin
  12.   mv sp-sc/sp-sc $startdir/pkg/usr/bin
  13. }
复制代码
先装sopcast,然后装gsopcast
PKGBUILD
  1. #Maintainer: artofegg <zhanglin22000@gmail.com>
  2. pkgname=gsopcast
  3. pkgver=0.2.8
  4. pkgrel=1
  5. pkgdesc="sopcast gtk front"
  6. url="http://lianwei3.googlepages.com/home2/"
  7. license="GPL"
  8. depends=('sopcast')
  9. makedepends=()
  10. conflicts=()
  11. replaces=()
  12. backup=()
  13. install=
  14. source=( http://freeegg.512j.com/gsopcast-0.2.8.tar.bz2 \
  15. gsopcast-0.2.8-Chinese.patch \
  16. gtk-sopcast.desktop
  17. )
  18. md5sums=('15bb3d6fa72dd3cae2ee28dca6bc665b' 'a303ef8ab330289376e73ec0dec764a7')
  19. build() {
  20.         cd $startdir/src/$pkgname-$pkgver
  21.         patch -p1 < ../../gsopcast-0.2.8-Chinese.patch
  22.         cd $startdir/src/$pkgname-$pkgver/src
  23.         make || return 1
  24.         install -D gsopcast $startdir/pkg/usr/bin/gsopcast
  25.         mkdir -p $startdir/pkg/opt/kde/share/applnk/Multimedia/
  26.         cp -f $startdir/gtk-sopcast.desktop $startdir/pkg/opt/kde/share/applnk/Multimedia/
  27. }
复制代码
gsopcast-0.2.8-Chinese.patch  中文补丁
  1. --- gsopcast-0.2.8/src/callbacks.cc        2006-08-19 11:33:29.000000000 +0800
  2. +++ gsopcast-0.2.8/src/callbacks.cc.new        2006-08-27 17:02:05.000000000 +0800
  3. @@ -83,7 +83,7 @@
  4.    if (ptimer_record != 0)
  5.      g_source_remove (ptimer_record);
  6.    ////set record label to default
  7. -  gtk_label_set_text (GTK_LABEL (label_record), "Record");
  8. +  gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
  9.    gtk_entry_set_text (GTK_ENTRY (entry_status), "");
  10.    ////set record color to default
  11.    GdkColor color;
  12. @@ -282,14 +282,14 @@
  13. on_button_expand_clicked (GtkWidget * widget)
  14. {
  15.    gboolean flag = TRUE;
  16. -  if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "Expand") == 0)
  17. +  if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "全部展开") == 0)
  18.      {
  19. -      gtk_button_set_label (GTK_BUTTON (widget), "Collap");
  20. +      gtk_button_set_label (GTK_BUTTON (widget), "全部折叠");
  21.        flag = TRUE;
  22.      }
  23. -  else if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "Collap") == 0)
  24. +  else if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "全部折叠") == 0)
  25.      {
  26. -      gtk_button_set_label (GTK_BUTTON (widget), "Expand");
  27. +      gtk_button_set_label (GTK_BUTTON (widget), "全部展开");
  28.        flag = FALSE;
  29.      }
  30. @@ -370,7 +370,7 @@
  31.    if (ptimer_record != 0)
  32.      g_source_remove (ptimer_record);
  33.    ////set record label to default
  34. -  gtk_label_set_text (GTK_LABEL (label_record), "Record");
  35. +  gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
  36.    gtk_entry_set_text (GTK_ENTRY (entry_status), "");
  37.    ////set record color to default
  38.    GdkColor color;
  39. @@ -439,14 +439,14 @@
  40. void
  41. on_button_record_clicked (GtkWidget * widget, gpointer data)
  42. {
  43. -  if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "Record") == 0)
  44. +  if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "开始录制") == 0)
  45.      {
  46.        ptimer_record = g_timeout_add (1000, launch_record, NULL);
  47. -      gtk_label_set_text (GTK_LABEL (label_record), "|Quit|");
  48. +      gtk_label_set_text (GTK_LABEL (label_record), "停止录制");
  49.      }
  50. -  else if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "|Quit|") ==
  51. +  else if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "停止录制") ==
  52.            0)
  53.      {
  54.        ///close record_fp
  55. @@ -464,7 +464,7 @@
  56.        if (ptimer_record != 0)
  57.         g_source_remove (ptimer_record);
  58. -      gtk_label_set_text (GTK_LABEL (label_record), "Record");
  59. +      gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
  60.        ////set record color to default
  61.        GdkColor color;
  62.        gdk_color_parse ("black", &color);
  63. --- gsopcast-0.2.8/src/iorecord.cc        2006-08-19 12:38:18.000000000 +0800
  64. +++ gsopcast-0.2.8/src/iorecord.cc.new        2006-08-27 16:59:24.000000000 +0800
  65. @@ -56,7 +56,7 @@
  66.        fprintf (stderr, "err while parseing head\n");
  67.        ///close socket
  68.        close (socket_fd);
  69. -      gtk_label_set_text (GTK_LABEL (label_record), "Record");
  70. +      gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
  71.        return FALSE;
  72.      }
  73. @@ -96,7 +96,7 @@
  74.        if (record_fp == NULL)
  75.         {
  76.           perror ("record path is invalid");
  77. -          gtk_label_set_text (GTK_LABEL (label_record), "Record");
  78. +          gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
  79.           close (socket_fd);
  80.           return FALSE;
  81.         }
  82. @@ -112,7 +112,7 @@
  83.               fclose (record_fp);
  84.               record_fp = NULL;
  85.             }
  86. -          gtk_label_set_text (GTK_LABEL (label_record), "Record");
  87. +          gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
  88.           close (socket_fd);
  89.           return FALSE;
  90.         }
  91. --- gsopcast-0.2.8/src/iostatistics.cc        2006-08-19 11:33:29.000000000 +0800
  92. +++ gsopcast-0.2.8/src/iostatistics.cc.new        2006-08-27 17:04:42.000000000 +0800
  93. @@ -45,7 +45,7 @@
  94.      {
  95.        ///show state
  96.        char status[64];
  97. -      sprintf (status, "Connecting %s",
  98. +      sprintf (status, "正在连接 %s",
  99.                elapsed_seconds % 4 ? ((elapsed_seconds % 4) %
  100.                                       3 ? (((elapsed_seconds % 4) % 3) %
  101.                                            2 ? "." : "..") : "...") : " ");
  102. --- gsopcast-0.2.8/src/loadsave.cc        2006-08-19 11:33:29.000000000 +0800
  103. +++ gsopcast-0.2.8/src/loadsave.cc.new        2006-08-27 17:11:14.000000000 +0800
  104. @@ -43,7 +43,7 @@
  105.    strcat (record_dir, "/SOPCAST/");
  106.    int width = 350, height = 450;
  107.    gtk_entry_set_text (GTK_ENTRY (entry_player),
  108. -                      "mplayer -ontop -geometry 100%:100%");
  109. +                      "kaffeine");
  110.    gtk_entry_set_text (GTK_ENTRY (entry_url), channels_url);
  111.    gtk_entry_set_text (GTK_ENTRY (entry_url_header), channels_url_header);
  112.    gtk_entry_set_text (GTK_ENTRY (entry_record_dir), record_dir);
  113. --- gsopcast-0.2.8/src/main.cc        2006-08-19 17:28:57.000000000 +0800
  114. +++ gsopcast-0.2.8/src/main.cc.new        2006-08-27 17:22:02.000000000 +0800
  115. @@ -133,7 +133,7 @@
  116.    //Name
  117.    renderer = gtk_cell_renderer_text_new ();
  118. -  column = gtk_tree_view_column_new_with_attributes ("name",
  119. +  column = gtk_tree_view_column_new_with_attributes ("名称",
  120.                                                      renderer,
  121.                                                      "text", NAME_COLUMN,
  122.                                                      NULL);
  123. @@ -145,7 +145,7 @@
  124.    //user
  125.    renderer = gtk_cell_renderer_text_new ();
  126. -  column = gtk_tree_view_column_new_with_attributes ("user",
  127. +  column = gtk_tree_view_column_new_with_attributes ("用户",
  128.                                                      renderer,
  129.                                                      "text", USER_COLUMN,
  130.                                                      NULL);
  131. @@ -155,7 +155,7 @@
  132.    //visit
  133.    renderer = gtk_cell_renderer_text_new ();
  134. -  column = gtk_tree_view_column_new_with_attributes ("visit",
  135. +  column = gtk_tree_view_column_new_with_attributes ("访问",
  136.                                                      renderer,
  137.                                                      "text", VISIT_COLUMN,
  138.                                                      NULL);
  139. @@ -165,7 +165,7 @@
  140.    //Kbps
  141.    renderer = gtk_cell_renderer_text_new ();
  142. -  column = gtk_tree_view_column_new_with_attributes ("kbps",
  143. +  column = gtk_tree_view_column_new_with_attributes ("速率(kb/s)",
  144.                                                      renderer,
  145.                                                      "text", KBPS_COLUMN,
  146.                                                      NULL);
  147. @@ -175,7 +175,7 @@
  148.    //qs
  149.    renderer = gtk_cell_renderer_text_new ();
  150. -  column = gtk_tree_view_column_new_with_attributes ("qs",
  151. +  column = gtk_tree_view_column_new_with_attributes ("服务质量",
  152.                                                      renderer,
  153.                                                      "text", QS_COLUMN, NULL);
  154.    gtk_tree_view_column_set_resizable (column, TRUE);
  155. @@ -184,7 +184,7 @@
  156.    //qc
  157.    renderer = gtk_cell_renderer_text_new ();
  158. -  column = gtk_tree_view_column_new_with_attributes ("qc",
  159. +  column = gtk_tree_view_column_new_with_attributes ("网络质量",
  160.                                                      renderer,
  161.                                                      "text", QC_COLUMN, NULL);
  162.    gtk_tree_view_column_set_resizable (column, TRUE);
  163. @@ -193,7 +193,7 @@
  164.    //start from
  165.    renderer = gtk_cell_renderer_text_new ();
  166. -  column = gtk_tree_view_column_new_with_attributes ("start__from",
  167. +  column = gtk_tree_view_column_new_with_attributes ("开始于",
  168.                                                      renderer,
  169.                                                      "text", START_COLUMN,
  170.                                                      NULL);
  171. @@ -203,7 +203,7 @@
  172.    //stream type
  173.    renderer = gtk_cell_renderer_text_new ();
  174. -  column = gtk_tree_view_column_new_with_attributes ("type",
  175. +  column = gtk_tree_view_column_new_with_attributes ("类型",
  176.                                                      renderer,
  177.                                                      "text", STREAM_COLUMN,
  178.                                                      NULL);
  179. @@ -213,7 +213,7 @@
  180.    //Status
  181.    renderer = gtk_cell_renderer_text_new ();
  182. -  column = gtk_tree_view_column_new_with_attributes ("status",
  183. +  column = gtk_tree_view_column_new_with_attributes ("状态",
  184.                                                      renderer,
  185.                                                      "text", STATUS_COLUMN,
  186.                                                      NULL);
  187. @@ -223,7 +223,7 @@
  188.    //URL
  189.    renderer = gtk_cell_renderer_text_new ();
  190. -  column = gtk_tree_view_column_new_with_attributes ("sop__address",
  191. +  column = gtk_tree_view_column_new_with_attributes ("sop地址",
  192.                                                      renderer,
  193.                                                      "text", URL_COLUMN,
  194.                                                      NULL);
  195. @@ -278,7 +278,7 @@
  196.    hbox = gtk_hbox_new (FALSE, 0);
  197.    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
  198. -  button_channel = gtk_toggle_button_new_with_label ("Channel");
  199. +  button_channel = gtk_toggle_button_new_with_label ("更新频道");
  200.    gtk_box_pack_start (GTK_BOX (hbox), button_channel, FALSE, FALSE, 0);
  201.    gtk_button_set_relief (GTK_BUTTON (button_channel), GTK_RELIEF_NONE);
  202.    gtk_button_set_focus_on_click (GTK_BUTTON (button_channel), FALSE);
  203. @@ -290,14 +290,14 @@
  204.    g_signal_connect (G_OBJECT (entry_search), "activate",
  205.                     G_CALLBACK (on_entry_search_activated), NULL);
  206. -  button = gtk_button_new_with_label ("Search");
  207. +  button = gtk_button_new_with_label ("搜索");
  208.    gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
  209.    gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
  210.    gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
  211.    g_signal_connect (G_OBJECT (button), "clicked",
  212.                     G_CALLBACK (on_button_search_clicked), NULL);
  213. -  button_expand = gtk_button_new_with_label ("Expand");
  214. +  button_expand = gtk_button_new_with_label ("全部展开");
  215.    gtk_box_pack_start (GTK_BOX (hbox), button_expand, FALSE, FALSE, 0);
  216.    gtk_button_set_relief (GTK_BUTTON (button_expand), GTK_RELIEF_NONE);
  217.    gtk_button_set_focus_on_click (GTK_BUTTON (button_expand), FALSE);
  218. @@ -342,7 +342,7 @@
  219.    g_signal_connect (G_OBJECT (combo->entry), "changed",
  220.                     G_CALLBACK (on_combo_changed), NULL);*/
  221. -  button = gtk_button_new_with_label ("Launch");
  222. +  button = gtk_button_new_with_label ("载入");
  223.    gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
  224.    gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
  225.    gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
  226. @@ -356,7 +356,7 @@
  227.    button_player = gtk_button_new ();
  228. -  label_player = gtk_label_new ("Player");
  229. +  label_player = gtk_label_new ("重启播放器");
  230.    gtk_container_add (GTK_CONTAINER (button_player), label_player);
  231.    gtk_box_pack_start (GTK_BOX (hbox), button_player, FALSE, FALSE, 0);
  232.    gtk_button_set_relief (GTK_BUTTON (button_player), GTK_RELIEF_NONE);
  233. @@ -365,7 +365,7 @@
  234.                     G_CALLBACK (on_button_player_clicked), NULL);
  235. -  button_stop = gtk_button_new_with_label ("Stop");
  236. +  button_stop = gtk_button_new_with_label ("断开");
  237.    gtk_box_pack_start (GTK_BOX (hbox), button_stop, FALSE, FALSE, 0);
  238.    gtk_button_set_relief (GTK_BUTTON (button_stop), GTK_RELIEF_NONE);
  239.    gtk_button_set_focus_on_click (GTK_BUTTON (button_stop), FALSE);
  240. @@ -373,7 +373,7 @@
  241.                     G_CALLBACK (on_button_stop_clicked), NULL);
  242. -  button_exit = gtk_button_new_with_label ("Exit");
  243. +  button_exit = gtk_button_new_with_label ("退出");
  244.    gtk_box_pack_start (GTK_BOX (hbox), button_exit, FALSE, FALSE, 0);
  245.    gtk_button_set_relief (GTK_BUTTON (button_exit), GTK_RELIEF_NONE);
  246.    gtk_button_set_focus_on_click (GTK_BUTTON (button_exit), FALSE);
  247. @@ -400,7 +400,7 @@
  248.    GTK_WIDGET_UNSET_FLAGS (hscale_sound, GTK_CAN_FOCUS);
  249.    button_record = gtk_button_new ();
  250. -  label_record = gtk_label_new ("Record");
  251. +  label_record = gtk_label_new ("开始录制");
  252.    gtk_container_add (GTK_CONTAINER (button_record), label_record);
  253.    gtk_box_pack_start (GTK_BOX (hbox), button_record, FALSE, FALSE, 0);
  254.    gtk_button_set_relief (GTK_BUTTON (button_record), GTK_RELIEF_NONE);
  255. @@ -425,13 +425,13 @@
  256.    vbox = gtk_vbox_new (FALSE, 0);
  257.    gtk_container_add (GTK_CONTAINER (notebook1), vbox);
  258. ////
  259. -  label = gtk_label_new ("Configuration");
  260. +  label = gtk_label_new ("配置页面");
  261.    gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
  262. ////
  263.    hbox = gtk_hbox_new (FALSE, 0);
  264.    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
  265. -  label = gtk_label_new (" Player: ");
  266. +  label = gtk_label_new (" 播放器:");
  267.    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
  268.    entry_player = gtk_entry_new ();
  269. @@ -440,7 +440,7 @@
  270.    hbox = gtk_hbox_new (FALSE, 0);
  271.    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
  272. -  label = gtk_label_new (" Channels url: ");
  273. +  label = gtk_label_new (" 频道文件地址:");
  274.    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
  275.    entry_url = gtk_entry_new ();
  276. @@ -450,7 +450,7 @@
  277.    hbox = gtk_hbox_new (FALSE, 0);
  278.    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
  279. -  label = gtk_label_new (" Channels url header: ");
  280. +  label = gtk_label_new (" 频道地址头格式:");
  281.    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
  282.    entry_url_header = gtk_entry_new ();
  283. @@ -459,7 +459,7 @@
  284.    hbox = gtk_hbox_new (FALSE, 0);
  285.    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
  286. -  label = gtk_label_new (" Record directory: ");
  287. +  label = gtk_label_new (" 录制文件存放目录:");
  288.    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
  289.    entry_record_dir = gtk_entry_new ();
  290. @@ -468,13 +468,13 @@
  291.    hbox = gtk_hbox_new (FALSE, 0);
  292.    gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
  293. -  button_save = gtk_button_new_with_label (" Save ");
  294. +  button_save = gtk_button_new_with_label (" 应用 ");
  295.    gtk_box_pack_start (GTK_BOX (hbox), button_save, TRUE, FALSE, 0);
  296.    g_signal_connect (G_OBJECT (button_save), "clicked",
  297.                     G_CALLBACK (on_button_save_clicked), NULL);
  298. ///
  299. -  label = gtk_label_new ("config");
  300. +  label = gtk_label_new ("配置");
  301.    gtk_widget_set_sensitive (label, FALSE);
  302.    gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1),
  303.                               gtk_notebook_get_nth_page (GTK_NOTEBOOK
  304. @@ -483,11 +483,11 @@
  305.    label =
  306.      gtk_label_new
  307. -    ("version 0.2.8\n\ngsopcast: a gtk front-end to p2p TV sopcast\n(c)2005-2006 Wei Lian. All rights reserved.\nhttp://lianwei3.googlepages.com/home2\nBuilt on the work of pinkme005 and zlbruce");
  308. +    ("版本 0.2.8\n\ngsopcast是 P2P 网络电视软件 sopcast 的一个 gtk 图形前端\n(c)2005-2006 Wei Lian. All rights reserved.\nhttp://lianwei3.googlepages.com/home2\n基于 pinkme005 和 zlbruce 所做的工作\n\n中文化:Subbo(Subbo@126.com)");
  309.    gtk_container_add (GTK_CONTAINER (notebook1), label);
  310.    gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
  311. -  label = gtk_label_new ("about");
  312. +  label = gtk_label_new ("关于");
  313.    gtk_widget_set_sensitive (label, FALSE);
  314.    gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1),
  315.                               gtk_notebook_get_nth_page (GTK_NOTEBOOK
复制代码

还有一个开始菜单的图标文件
gtk-sopcast.desktop

中文补丁是红旗的,pkgbuild是假定为kde桌面,gnome的兄弟稍微改一下
cp -f $startdir/gtk-sopcast.desktop $startdir/pkg/opt/kde/share/applnk/Multimedia/

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2006-9-14 15:47:49 | 显示全部楼层
多谢,已经放到aur了,呵呵
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-14 18:29:44 | 显示全部楼层
里面有一个gsopcast了,但似乎不是中文版
回复 支持 反对

使用道具 举报

发表于 2006-9-14 18:41:18 | 显示全部楼层
那个就是我以前放的,今天看到你的帖子就更新了一下,现在是中文版的了,呵呵
你还玩星际的啊,呵呵,现在玩星际的不多了哦
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-14 19:05:26 | 显示全部楼层
以前玩,一直就这么下来了;)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表