diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-16 00:28:36 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-16 00:28:36 +0800 |
commit | 631ca282e39c770bf6b078161afa1ee4b7839441 (patch) | |
tree | 5a2455deca33f0cf21d534b0702a459c5839313f | |
parent | d88826a923908e4dc93f483fc3ab48c9419885b8 (diff) |
totem, po: update translation strings
-rw-r--r-- | po/zh_CN.po | 59 | ||||
-rw-r--r-- | totem/plugin/sopcast-config.ui | 2 | ||||
-rw-r--r-- | totem/plugin/sopcast.py | 64 | ||||
-rw-r--r-- | totem/plugin/sopcast.ui | 44 |
4 files changed, 80 insertions, 89 deletions
diff --git a/po/zh_CN.po b/po/zh_CN.po index 69e1672..1ce477b 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: totem-sopcast 0.0.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-09-15 23:44+0800\n" +"POT-Creation-Date: 2009-09-16 00:10+0800\n" "PO-Revision-Date: 2009-09-15 23:45+0800\n" "Last-Translator: Luo Jinghua <sunmoon1997@gmail.com>\n" "Language-Team: Luo Jinghua <sunmoon1997@gmail.com>\n" @@ -15,54 +15,54 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../totem/plugin/sopcast.py:215 ../totem/plugin/sopcast.py:691 +#: ../totem/plugin/sopcast.py:216 ../totem/plugin/sopcast.py:697 msgid "Sopcast" msgstr "Sopcast" -#: ../totem/plugin/sopcast.py:377 +#: ../totem/plugin/sopcast.py:380 msgid "Downloading channel list..." msgstr "加载频道列表中..." -#: ../totem/plugin/sopcast.py:467 ../totem/plugin/sopcast.py:600 +#: ../totem/plugin/sopcast.py:470 ../totem/plugin/sopcast.py:603 msgid "Name" msgstr "名称" -#: ../totem/plugin/sopcast.py:471 +#: ../totem/plugin/sopcast.py:474 msgid "Number" msgstr "数量" -#: ../totem/plugin/sopcast.py:604 +#: ../totem/plugin/sopcast.py:607 msgid "Location" msgstr "位置" -#: ../totem/plugin/sopcast.py:691 +#: ../totem/plugin/sopcast.py:697 #, python-format msgid "" "Totem cannot play this type of media (%s) because you do not have the " "appropriate plugins to handle it." msgstr "Totem 无法播放此介质类型(%s),原因是您没有可处理该类型的适当插件。" -#: ../totem/plugin/sopcast.py:692 +#: ../totem/plugin/sopcast.py:698 msgid "" "Please install the necessary plugins and restart Totem to be able to play " "this media." msgstr "请按装必需的插件,然后重新启动 Totem,这样才能播放此介质。" -#: ../totem/plugin/sopcast.py:694 +#: ../totem/plugin/sopcast.py:700 msgid "More information about media plugins" msgstr "更多的关于媒体插件的信息" #: ../totem/plugin/sopcast.ui.h:1 -msgid "Add a new station to the list" -msgstr "新增一个电视" +msgid "Add a channel to personal channel list" +msgstr "添加一个节目到个人频道列表中" #: ../totem/plugin/sopcast.ui.h:2 -msgid "Add a station to station list" -msgstr "添加一个电视节目到列表中" +msgid "Add a new channel to the personal list" +msgstr "新增一个节目到个人频道列表" #: ../totem/plugin/sopcast.ui.h:3 -msgid "Add the station to list" -msgstr "添加到电视列表(_A)" +msgid "Add selected channel to personal list" +msgstr "添加此节目到个人列表" #: ../totem/plugin/sopcast.ui.h:4 msgid "Channels(Personal)" @@ -85,24 +85,24 @@ msgid "Name:" msgstr "名称:" #: ../totem/plugin/sopcast.ui.h:9 -msgid "Remove the station from list" -msgstr "删除电视(_R)" +msgid "Remove selected channel from personal list" +msgstr "从个人列表中删除此节目" #: ../totem/plugin/sopcast.ui.h:10 -msgid "_Add the station" -msgstr "添加到电视列表(_A)" +msgid "_Add the channel" +msgstr "添加到个人列表(_A)" #: ../totem/plugin/sopcast.ui.h:11 msgid "_Copy Location" msgstr "复制位置(_C)" #: ../totem/plugin/sopcast.ui.h:12 -msgid "_New station" -msgstr "新增电视(_N)" +msgid "_New channel" +msgstr "新增节目(_N)" #: ../totem/plugin/sopcast.ui.h:13 -msgid "_Remove the station" -msgstr "删除电视(_R)" +msgid "_Remove the channel" +msgstr "删除节目(_R)" #: ../totem/plugin/sopcast-config.ui.h:1 msgid "<b>Sopcast</b>" @@ -113,8 +113,8 @@ msgid "Be compatible with old totem" msgstr "尝试兼容旧的 Totem 播放器" #: ../totem/plugin/sopcast-config.ui.h:3 -msgid "Configure PPStream" -msgstr "PPStream 设置" +msgid "Configure Sopcast" +msgstr "Sopcast 设置" #: ../totem/plugin/sopcast-config.ui.h:4 msgid "" @@ -136,12 +136,3 @@ msgstr "一个可以浏览 Sopcast 频道的插件" #: ../totem/plugin/sopcast.totem-plugin.in.h:2 msgid "Sopcast browser" msgstr "Sopcast 浏览器" - -#~ msgid "Stations(Custom)" -#~ msgstr "电视(自定的)" - -#~ msgid "_Add to Station list" -#~ msgstr "添加到电视列表中(_A)" - -#~ msgid "_Remove from Station list" -#~ msgstr "从电视列表中删除(_R)" diff --git a/totem/plugin/sopcast-config.ui b/totem/plugin/sopcast-config.ui index dc72d9d..2476c0c 100644 --- a/totem/plugin/sopcast-config.ui +++ b/totem/plugin/sopcast-config.ui @@ -4,7 +4,7 @@ <!-- interface-naming-policy project-wide --> <object class="GtkDialog" id="sc_config_dialog"> <property name="border_width">5</property> - <property name="title" translatable="yes">Configure PPStream</property> + <property name="title" translatable="yes">Configure Sopcast</property> <property name="type_hint">normal</property> <property name="has_separator">False</property> <child internal-child="vbox"> diff --git a/totem/plugin/sopcast.py b/totem/plugin/sopcast.py index 9d13a75..9e7dfe8 100644 --- a/totem/plugin/sopcast.py +++ b/totem/plugin/sopcast.py @@ -255,7 +255,7 @@ class Sopcast (totem.Plugin): time.sleep (0.001) return True - def on_add_to_station_list (self, treeview): + def on_add_to_channel_list (self, treeview): treeview_name = self.current_treeview_name treeview = self.treeview[treeview_name] selection = treeview.get_selection () @@ -269,7 +269,7 @@ class Sopcast (totem.Plugin): #print title, mrl self.add_to_playlist (title, mrl) - def on_remove_from_station_list (self, treeview): + def on_remove_from_channel_list (self, treeview): treeview_name = self.current_treeview_name assert treeview_name == 'playlist' @@ -299,27 +299,27 @@ class Sopcast (totem.Plugin): selection = "PRIMARY") clip.set_text (mrl) - def on_add_station (self, action): + def on_add_channel (self, action): treeview_name = self.current_treeview_name - dialog = self.builder.get_object ('sopcast_add_station_dialog') + dialog = self.builder.get_object ('sopcast_add_channel_dialog') dialog.run () - def on_add_station_dialog_delete (self, dialog, event): + def on_add_channel_dialog_delete (self, dialog, event): dialog.hide () return True - def on_add_station_dialog_close (self, dialog): + def on_add_channel_dialog_close (self, dialog): dialog.hide () - def on_add_station_dialog_response (self, dialog, response_id): + def on_add_channel_dialog_response (self, dialog, response_id): dialog.hide () if response_id == gtk.RESPONSE_DELETE_EVENT: return elif response_id == 1: return - name = self.builder.get_object ('sopcast_add_station_name_entry').get_text ().strip () - location = self.builder.get_object ('sopcast_add_station_location_entry').get_text ().strip () + name = self.builder.get_object ('sopcast_add_channel_name_entry').get_text ().strip () + location = self.builder.get_object ('sopcast_add_channel_location_entry').get_text ().strip () if not name or not location: return self.add_to_playlist (name, location) @@ -327,19 +327,19 @@ class Sopcast (totem.Plugin): def setup_popup_menu (self): self.ui_manager = self.builder.get_object ('sopcast-ui-manager') action_group = self.ui_manager.get_action_groups () [0] - action = action_group.get_action ("add-to-station-list") - action.connect ('activate', self.on_add_to_station_list) - action = action_group.get_action ("remove-from-station-list") - action.connect ('activate', self.on_remove_from_station_list) + action = action_group.get_action ("add-to-channel-list") + action.connect ('activate', self.on_add_to_channel_list) + action = action_group.get_action ("remove-from-channel-list") + action.connect ('activate', self.on_remove_from_channel_list) action = action_group.get_action ("copy-location") action.connect ('activate', self.on_copy_location) - action = action_group.get_action ("add-station") - action.connect ('activate', self.on_add_station) + action = action_group.get_action ("add-channel") + action.connect ('activate', self.on_add_channel) - dialog = self.builder.get_object ('sopcast_add_station_dialog') - dialog.connect ("response", self.on_add_station_dialog_response) - dialog.connect ("close", self.on_add_station_dialog_close) - dialog.connect ("delete-event", self.on_add_station_dialog_delete) + dialog = self.builder.get_object ('sopcast_add_channel_dialog') + dialog.connect ("response", self.on_add_channel_dialog_response) + dialog.connect ("close", self.on_add_channel_dialog_close) + dialog.connect ("delete-event", self.on_add_channel_dialog_delete) def on_channels_row_activated (self, treeview, path, view_column, data=None): model, rows = treeview.get_selection ().get_selected_rows () @@ -506,10 +506,10 @@ class Sopcast (totem.Plugin): for item in parser.items ('playlist'): key = item[0] if key[0:4] == 'file': - index = str(key[4:]) + index = int(key[4:]) key = 'file' elif key[0:5] == 'title': - index = str(key[5:]) + index = int(key[5:]) key = 'title' else: continue @@ -520,6 +520,7 @@ class Sopcast (totem.Plugin): keys = result.keys () keys.sort () + print keys playlist = [] for i in range (len (keys)): title = result[keys[i]]['title'] @@ -531,18 +532,17 @@ class Sopcast (totem.Plugin): def save_playlist (self, playlist): if not playlist: return False - parser = ConfigParser.RawConfigParser () - parser.add_section ('playlist') - parser.set ('playlist', 'NumberOfEntries', str (len (playlist))) - for i in range (len (playlist)): - parser.set ('playlist', 'File' + str (i + 1), playlist[i][1]) - parser.set ('playlist', 'Title' + str (i + 1), playlist[i][0]) fp = None try: fp = file (sc_playlist, 'wb') except: return False - parser.write (fp) + fp.write ('[playlist]\n') + fp.write ('NumberOfEntries=%d\n' % (len (playlist))) + for i in range (len (playlist)): + fp.write ('File%d=%s\n' % (i + 1, playlist[i][1])) + fp.write ('Title%d=%s\n' % (i + 1, playlist[i][0])) + fp.write ('\n') fp.close () return True @@ -658,13 +658,13 @@ class Sopcast (totem.Plugin): action = action_group.get_action ("copy-location") action.set_sensitive (count == 1) - action = action_group.get_action ("add-to-station-list") + action = action_group.get_action ("add-to-channel-list") action.set_sensitive (treeview_name == 'channels') - action = action_group.get_action ("remove-from-station-list") + action = action_group.get_action ("remove-from-channel-list") action.set_sensitive (treeview_name == 'playlist') - action = action_group.get_action ("add-station") + action = action_group.get_action ("add-channel") action.set_sensitive (treeview_name == 'playlist') menu = self.ui_manager.get_widget ("/sopcast-popup") @@ -684,7 +684,7 @@ class Sopcast (totem.Plugin): def on_playlist_key_pressed (self, wiget, event, user_data = None): if event.type == gtk.gdk.KEY_PRESS and \ gtk.gdk.keyval_name (event.keyval) == 'Delete': - self.on_remove_from_station_list (self.treeview['playlist']) + self.on_remove_from_channel_list (self.treeview['playlist']) return True return False diff --git a/totem/plugin/sopcast.ui b/totem/plugin/sopcast.ui index 0c9f547..d7294cb 100644 --- a/totem/plugin/sopcast.ui +++ b/totem/plugin/sopcast.ui @@ -152,9 +152,9 @@ </packing> </child> </object> - <object class="GtkDialog" id="sopcast_add_station_dialog"> + <object class="GtkDialog" id="sopcast_add_channel_dialog"> <property name="border_width">5</property> - <property name="title" translatable="yes">Add a station to station list</property> + <property name="title" translatable="yes">Add a channel to personal channel list</property> <property name="type_hint">normal</property> <property name="has_separator">False</property> <child internal-child="vbox"> @@ -168,7 +168,7 @@ <property name="n_rows">2</property> <property name="n_columns">2</property> <child> - <object class="GtkEntry" id="sopcast_add_station_name_entry"> + <object class="GtkEntry" id="sopcast_add_channel_name_entry"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> @@ -179,7 +179,7 @@ </packing> </child> <child> - <object class="GtkEntry" id="sopcast_add_station_location_entry"> + <object class="GtkEntry" id="sopcast_add_channel_location_entry"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="invisible_char">●</property> @@ -192,13 +192,13 @@ </packing> </child> <child> - <object class="GtkLabel" id="sopcast_add_station_name_label"> + <object class="GtkLabel" id="sopcast_add_channel_name_label"> <property name="visible">True</property> <property name="label" translatable="yes">Name:</property> </object> </child> <child> - <object class="GtkLabel" id="sopcast_add_station_location_label"> + <object class="GtkLabel" id="sopcast_add_channel_location_label"> <property name="visible">True</property> <property name="label" translatable="yes">Location:</property> </object> @@ -217,7 +217,7 @@ <property name="visible">True</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="sopcast_add_station_ok_button"> + <object class="GtkButton" id="sopcast_add_channel_ok_button"> <property name="label">gtk-ok</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -231,7 +231,7 @@ </packing> </child> <child> - <object class="GtkButton" id="sopcast_add_station_cancel_button"> + <object class="GtkButton" id="sopcast_add_channel_cancel_button"> <property name="label">gtk-cancel</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -254,31 +254,31 @@ </object> </child> <action-widgets> - <action-widget response="0">sopcast_add_station_ok_button</action-widget> - <action-widget response="1">sopcast_add_station_cancel_button</action-widget> + <action-widget response="0">sopcast_add_channel_ok_button</action-widget> + <action-widget response="1">sopcast_add_channel_cancel_button</action-widget> </action-widgets> </object> <object class="GtkUIManager" id="sopcast-ui-manager"> <child> <object class="GtkActionGroup" id="sopcast-action-group"> <child> - <object class="GtkAction" id="add-to-station-list"> - <property name="label" translatable="yes">_Add the station</property> - <property name="tooltip" translatable="yes">Add the station to list</property> + <object class="GtkAction" id="add-to-channel-list"> + <property name="label" translatable="yes">_Add the channel</property> + <property name="tooltip" translatable="yes">Add selected channel to personal list</property> <property name="stock-id">gtk-add</property> </object> </child> <child> - <object class="GtkAction" id="remove-from-station-list"> - <property name="label" translatable="yes">_Remove the station</property> - <property name="tooltip" translatable="yes">Remove the station from list</property> + <object class="GtkAction" id="remove-from-channel-list"> + <property name="label" translatable="yes">_Remove the channel</property> + <property name="tooltip" translatable="yes">Remove selected channel from personal list</property> <property name="stock-id">gtk-remove</property> </object> </child> <child> - <object class="GtkAction" id="add-station"> - <property name="label" translatable="yes">_New station</property> - <property name="tooltip" translatable="yes">Add a new station to the list</property> + <object class="GtkAction" id="add-channel"> + <property name="label" translatable="yes">_New channel</property> + <property name="tooltip" translatable="yes">Add a new channel to the personal list</property> <property name="stock-id">gtk-add</property> </object> </child> @@ -293,9 +293,9 @@ </child> <ui> <popup name="sopcast-popup"> - <menuitem name="add-to-station-list" action="add-to-station-list"/> - <menuitem name="remove-from-station-list" action="remove-from-station-list"/> - <menuitem name="add-station" action="add-station"/> + <menuitem name="add-to-channel-list" action="add-to-channel-list"/> + <menuitem name="remove-from-channel-list" action="remove-from-channel-list"/> + <menuitem name="add-channel" action="add-channel"/> <menuitem name="copy-location" action="copy-location"/> </popup> </ui> |