diff -ur bbc-orig/contentview.py bbc/contentview.py --- bbc-orig/contentview.py 2009-02-15 01:31:26.000000000 +0100 +++ bbc/contentview.py 2009-02-15 00:28:12.000000000 +0100 @@ -601,7 +601,7 @@ return os.path.join(self.cache_dir, fn) def parse_async(self, cache_fn): - self.emit('progress-message', 'Parsing available content list ...') + self.emit('progress-message', _("Parsing available content list ...")) thread.start_new_thread(self._parsing_thread, (cache_fn, )) def _parsing_thread(self, cache_fn): @@ -666,7 +666,7 @@ pdata[1] = bytes_read instream.read_async(10240, _read_async_cb, io_priority=glib.PRIORITY_LOW-1) self.emit('progress-message', - 'Downloading available content list ... ' + '(' + + _("Downloading available content list ... ") + '(' + self._format_size_for_display(bytes_read) + ')') except IOError, e: gst.warning('Error downloading ' + self.AVAILABLE_CONTENT_URI) @@ -674,7 +674,7 @@ try: cache_file.delete() finally: - self.emit('loading-error', 'Error downloading available content list') + self.emit('loading-error', _("Error downloading available content list")) # _query_done_cb start: gst.log('Query done') @@ -683,7 +683,7 @@ except Exception, e: # bail out if we can't query, not much point trying to download gst.warning('Could not query %s: %s' % (self.AVAILABLE_CONTENT_URI, e.message)) - self.emit('loading-error', 'Could not connect to server') + self.emit('loading-error', _("Could not connect to server")) return gst.log('Got info, querying etag') @@ -717,7 +717,7 @@ # FIXME: use gio.File.copy_async() once it's wrapped remote_file.read().read_async(10240, _read_async_cb, io_priority=glib.PRIORITY_LOW-1) gst.info('copying ' + self.AVAILABLE_CONTENT_URI + ' -> ' + cache_fn) - self.emit('progress-message', 'Downloading available content list ...') + self.emit('progress-message', _("Downloading available content list ...")) return # load_async start: @@ -754,7 +754,7 @@ # CHECKME: what happens if http is not available as protocol? remote_file = gio.File(self.AVAILABLE_CONTENT_URI) gst.log('Contacting server ' + self.AVAILABLE_CONTENT_URI) - self.emit('progress-message', 'Connecting to server ...') + self.emit('progress-message', _("Connecting to server ...")) remote_file.query_info_async(_query_done_cb, '*') def parseBrands(self, graph): @@ -796,7 +796,7 @@ self.set_property('has-tooltip', True) self.connect('query-tooltip', self.onQueryTooltip) - self.set_message('Loading ...') + self.set_message(_("Loading ...")) self.pool = ContentPool() self.pool.connect('codec-cache-loaded', self._on_codec_cache_loaded) @@ -900,7 +900,7 @@ if markup: tip.set_markup(markup) else: - tip.set_text('No details available') # FIXME: translate + tip.set_text(_("No details available")) return True def onRowActivated(self, view, path, col): diff -ur bbc-orig/genres.py bbc/genres.py --- bbc-orig/genres.py 2009-02-15 01:31:26.000000000 +0100 +++ bbc/genres.py 2009-02-15 00:35:17.000000000 +0100 @@ -32,128 +32,128 @@ import gst shortref_to_label_map = { - "childrens": "Children's", - "childrens/activities": "Activities", - "childrens/drama": "Drama", - "childrens/entertainmentandcomedy": "Entertainment & Comedy", - "childrens/factual": "Factual", - "childrens/music": "Music", - "childrens/news": "News", - "childrens/sport": "Sport", - "drama": "Drama", - "drama/actionandadventure": "Action & Adventure", - "drama/biographical": "Biographical", - "drama/classicandperiod": "Classic & Period", - "drama/crime": "Crime", - "drama/historical": "Historical", - "drama/horrorandsupernatural": "Horror & Supernatural", - "drama/legalandcourtroom": "Legal & Courtroom", - "drama/medical": "Medical", - "drama/musical": "Musical", - "drama/political": "Political", - "drama/psychological": "Psychological", - "drama/relationshipsandromance": "Relationships & Romance", - "drama/scifiandfantasy": "SciFi & Fantasy", - "drama/soaps": "Soaps", - "drama/spiritual": "Spiritual", - "drama/thriller": "Thriller", - "drama/waranddisaster": "War & Disaster", - "drama/western": "Western", - "entertainmentandcomedy": "Entertainment & Comedy", - "entertainmentandcomedy/impressionists": "Impressionists", - "entertainmentandcomedy/satire": "Satire", - "entertainmentandcomedy/sitcoms": "Sitcoms", - "entertainmentandcomedy/sketch": "Sketch", - "entertainmentandcomedy/spoof": "Spoof", - "entertainmentandcomedy/standup": "Standup", - "entertainmentandcomedy/varietyshows": "Variety Shows", - "factual": "Factual", - "factual/antiques": "Antiques", - "factual/artscultureandthemedia": "Arts, Culture & the Media", - "factual/beautyandstyle": "Beauty & Style", - "factual/carsandmotors": "Cars & Motors", - "factual/cinema": "Cinema", - "factual/consumer": "Consumer", - "factual/crimeandjustice": "Crime & Justice", - "factual/disability": "Disability", - "factual/familiesandrelationships": "Families & Relationships", - "factual/foodanddrink": "Food & Drink", - "factual/healthandwellbeing": "Health & Wellbeing", - "factual/history": "History", - "factual/homesandgardens": "Homes & Gardens", - "factual/lifestories": "Life Stories", - "factual/money": "Money", - "factual/petsandanimals": "Pets & Animals", - "factual/politics": "Politics", - "factual/sciencenatureandenvironment": "Science, Nature & Environment", - "factual/travel": "Travel", - "learning": "Learning", - "learning/1119": "Age 11-19", - "learning/511": "Age 5-11", - "learning/adults": "Adults", - "learning/preschool": "Pre-School", - "music": "Music", - "music/classicpopandrock": "Classic Pop & Rock", - "music/classical": "Classical", - "music/country": "Country", - "music/danceandelectronica": "Dance & Electronica", - "music/desi": "Desi", - "music/easylisteningsoundtracksandmusicals": "Easy Listening, Soundtracks & Musicals", - "music/folk": "Folk", - "music/hiphoprnbanddancehall": "Hip Hop, RnB & Dancehall", - "music/jazzandblues": "Jazz & Blues", - "music/popandchart": "Pop & Chart", - "music/rockandindie": "Rock & Indie", - "music/soulandreggae": "Soul & Reggae", - "music/world": "World", - "news": "News", - "religionandethics": "Religion & Ethics", - "sport": "Sport", - "sport/archery": "Archery", - "sport/athletics": "Athletics", - "sport/badminton": "Badminton", - "sport/baseball": "Baseball", - "sport/basketball": "Basketball", - "sport/bowls": "Bowls", - "sport/boxing": "Boxing", - "sport/canoeing": "Canoeing", - "sport/cricket": "Cricket", - "sport/cycling": "Cycling", - "sport/darts": "Darts", - "sport/disabilitysport": "Disability Sport", - "sport/diving": "Diving", - "sport/equestrian": "Equestrian", - "sport/fencing": "Fencing", - "sport/football": "Football", - "sport/gaelicgames": "Gaelic Games", - "sport/golf": "Golf", - "sport/gymnastics": "Gymnastics", - "sport/handball": "Handball", - "sport/hockey": "Hockey", - "sport/horseracing": "Horse Racing", - "sport/judo": "Judo", - "sport/modernpentathlon": "Modern Pentathlon", - "sport/motorsport": "Motorsport", - "sport/olympics": "Olympics", - "sport/rowing": "Rowing", - "sport/rugbyleague": "Rugby League", - "sport/rugbyunion": "Rugby Union", - "sport/sailing": "Sailing", - "sport/shinty": "Shinty", - "sport/shooting": "Shooting", - "sport/snooker": "Snooker", - "sport/softball": "Softball", - "sport/swimming": "Swimming", - "sport/tabletennis": "Table Tennis", - "sport/taekwondo": "Taekwondo", - "sport/tennis": "Tennis", - "sport/triathlon": "Triathlon", - "sport/volleyball": "Volleyball", - "sport/waterpolo": "Water Polo", - "sport/weightlifting": "Weightlifting", - "sport/wintersports": "Winter Sports", - "sport/wrestling": "Wrestling", - "weather": "Weather" + "childrens": _("Children's"), + "childrens/activities": _("Activities"), + "childrens/drama": _("Drama"), + "childrens/entertainmentandcomedy": _("Entertainment & Comedy"), + "childrens/factual": _("Factual"), + "childrens/music": _("Music"), + "childrens/news": _("News"), + "childrens/sport": _("Sport"), + "drama": _("Drama"), + "drama/actionandadventure": _("Action & Adventure"), + "drama/biographical": _("Biographical"), + "drama/classicandperiod": _("Classic & Period"), + "drama/crime": _("Crime"), + "drama/historical": _("Historical"), + "drama/horrorandsupernatural": _("Horror & Supernatural"), + "drama/legalandcourtroom": _("Legal & Courtroom"), + "drama/medical": _("Medical"), + "drama/musical": _("Musical"), + "drama/political": _("Political"), + "drama/psychological": _("Psychological"), + "drama/relationshipsandromance": _("Relationships & Romance"), + "drama/scifiandfantasy": _("SciFi & Fantasy"), + "drama/soaps": _("Soaps"), + "drama/spiritual": _("Spiritual"), + "drama/thriller": _("Thriller"), + "drama/waranddisaster": _("War & Disaster"), + "drama/western": _("Western"), + "entertainmentandcomedy": _("Entertainment & Comedy"), + "entertainmentandcomedy/impressionists": _("Impressionists"), + "entertainmentandcomedy/satire": _("Satire"), + "entertainmentandcomedy/sitcoms": _("Sitcoms"), + "entertainmentandcomedy/sketch": _("Sketch"), + "entertainmentandcomedy/spoof": _("Spoof"), + "entertainmentandcomedy/standup": _("Standup"), + "entertainmentandcomedy/varietyshows": _("Variety Shows"), + "factual": _("Factual"), + "factual/antiques": _("Antiques"), + "factual/artscultureandthemedia": _("Arts, Culture & the Media"), + "factual/beautyandstyle": _("Beauty & Style"), + "factual/carsandmotors": _("Cars & Motors"), + "factual/cinema": _("Cinema"), + "factual/consumer": _("Consumer"), + "factual/crimeandjustice": _("Crime & Justice"), + "factual/disability": _("Disability"), + "factual/familiesandrelationships": _("Families & Relationships"), + "factual/foodanddrink": _("Food & Drink"), + "factual/healthandwellbeing": _("Health & Wellbeing"), + "factual/history": _("History"), + "factual/homesandgardens": _("Homes & Gardens"), + "factual/lifestories": _("Life Stories"), + "factual/money": _("Money"), + "factual/petsandanimals": _("Pets & Animals"), + "factual/politics": _("Politics"), + "factual/sciencenatureandenvironment": _("Science, Nature & Environment"), + "factual/travel": _("Travel"), + "learning": _("Learning"), + "learning/1119": _("Age 11-19"), + "learning/511": _("Age 5-11"), + "learning/adults": _("Adults"), + "learning/preschool": _("Pre-School"), + "music": _("Music"), + "music/classicpopandrock": _("Classic Pop & Rock"), + "music/classical": _("Classical"), + "music/country": _("Country"), + "music/danceandelectronica": _("Dance & Electronica"), + "music/desi": _("Desi"), + "music/easylisteningsoundtracksandmusicals": _("Easy Listening, Soundtracks & Musicals"), + "music/folk": _("Folk"), + "music/hiphoprnbanddancehall": _("Hip Hop, RnB & Dancehall"), + "music/jazzandblues": _("Jazz & Blues"), + "music/popandchart": _("Pop & Chart"), + "music/rockandindie": _("Rock & Indie"), + "music/soulandreggae": _("Soul & Reggae"), + "music/world": _("World"), + "news": _("News"), + "religionandethics": _("Religion & Ethics"), + "sport": _("Sport"), + "sport/archery": _("Archery"), + "sport/athletics": _("Athletics"), + "sport/badminton": _("Badminton"), + "sport/baseball": _("Baseball"), + "sport/basketball": _("Basketball"), + "sport/bowls": _("Bowls"), + "sport/boxing": _("Boxing"), + "sport/canoeing": _("Canoeing"), + "sport/cricket": _("Cricket"), + "sport/cycling": _("Cycling"), + "sport/darts": _("Darts"), + "sport/disabilitysport": _("Disability Sport"), + "sport/diving": _("Diving"), + "sport/equestrian": _("Equestrian"), + "sport/fencing": _("Fencing"), + "sport/football": _("Football"), + "sport/gaelicgames": _("Gaelic Games"), + "sport/golf": _("Golf"), + "sport/gymnastics": _("Gymnastics"), + "sport/handball": _("Handball"), + "sport/hockey": _("Hockey"), + "sport/horseracing": _("Horse Racing"), + "sport/judo": _("Judo"), + "sport/modernpentathlon": _("Modern Pentathlon"), + "sport/motorsport": _("Motorsport"), + "sport/olympics": _("Olympics"), + "sport/rowing": _("Rowing"), + "sport/rugbyleague": _("Rugby League"), + "sport/rugbyunion": _("Rugby Union"), + "sport/sailing": _("Sailing"), + "sport/shinty": _("Shinty"), + "sport/shooting": _("Shooting"), + "sport/snooker": _("Snooker"), + "sport/softball": _("Softball"), + "sport/swimming": _("Swimming"), + "sport/tabletennis": _("Table Tennis"), + "sport/taekwondo": _("Taekwondo"), + "sport/tennis": _("Tennis"), + "sport/triathlon": _("Triathlon"), + "sport/volleyball": _("Volleyball"), + "sport/waterpolo": _("Water Polo"), + "sport/weightlifting": _("Weightlifting"), + "sport/wintersports": _("Winter Sports"), + "sport/wrestling": _("Wrestling"), + "weather": _("Weather") } # lowest = at the top @@ -221,7 +221,7 @@ if short_ref in shortref_to_label_map: self.label = shortref_to_label_map[short_ref] else: - self.label = 'Unknown: ' + short_ref + self.label = _("Unknown: ") + short_ref if short_ref in shortref_to_sortrank_map: self.sort_rank = shortref_to_sortrank_map[short_ref]