[conduit] Marked multiple strings for translation
- From: John Stowers <jstowers src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit] Marked multiple strings for translation
- Date: Sun, 12 Jul 2009 10:46:58 +0000 (UTC)
commit b916b68bbfc6f57333be63331964aa0306018b54
Author: David Planella <david planella gmail com>
Date: Sun Jun 21 18:18:16 2009 +0200
Marked multiple strings for translation
Fixes Bugzilla #568442
conduit/Knowledge.py | 20 +++++----
conduit/Main.py | 25 ++++++------
conduit/Module.py | 4 +-
conduit/dataproviders/DataProvider.py | 26 +++++++------
conduit/dataproviders/Image.py | 6 ++-
conduit/dataproviders/__init__.py | 20 +++++----
conduit/gtkui/Canvas.py | 6 +-
conduit/gtkui/UI.py | 25 ++++++------
conduit/modules/BackpackModule/BackpackModule.py | 10 ++--
conduit/modules/BansheeModule/BansheeModule.py | 4 +-
conduit/modules/BoxDotNetModule/BoxDotNetModule.py | 6 +-
conduit/modules/ConverterModule.py | 4 +-
conduit/modules/DesktopWallpaperModule.py | 6 ++-
conduit/modules/EvolutionModule/EvolutionModule.py | 2 +-
conduit/modules/FacebookModule/FacebookModule.py | 8 ++--
conduit/modules/FeedModule/FeedModule.py | 20 +++++-----
conduit/modules/FlickrModule/FlickrModule.py | 4 +-
conduit/modules/FspotModule/FspotModule.py | 14 +++---
conduit/modules/GConfModule/GConfModule.py | 12 +++---
conduit/modules/GoogleBookmarksModule.py | 12 +++--
conduit/modules/NautilusBookmarksModule.py | 10 +++--
conduit/modules/RhythmboxModule/RhythmboxModule.py | 4 +-
conduit/modules/SynceModule.py | 14 +++---
conduit/modules/TomboyModule.py | 6 ++-
conduit/modules/ZotoModule/ZotoModule.py | 10 ++--
conduit/modules/iPodModule/iPodModule.py | 42 ++++++++++----------
po/POTFILES.in | 13 ++++++-
27 files changed, 183 insertions(+), 150 deletions(-)
---
diff --git a/conduit/Knowledge.py b/conduit/Knowledge.py
index d503fce..e558022 100644
--- a/conduit/Knowledge.py
+++ b/conduit/Knowledge.py
@@ -1,27 +1,29 @@
+def N_(message): return message
+
HINT_BLANK_CANVAS = -100
HINT_ADD_DATAPROVIDER = -101
HINT_RIGHT_CLICK_CONFIGURE = -102
HINT_TEXT = {
- HINT_BLANK_CANVAS:( "What Do You Want to Synchronize?",
- "Drag and Drop a Data Provider on the Canvas",
+ HINT_BLANK_CANVAS:( N_("What Do You Want to Synchronize?"),
+ N_("Drag and Drop a Data Provider on the Canvas"),
True),
- HINT_ADD_DATAPROVIDER:( "Synchronization Group Created",
- "Add Another Data Provider to the Group to Synchronize it",
+ HINT_ADD_DATAPROVIDER:( N_("Synchronization Group Created"),
+ N_("Add Another Data Provider to the Group to Synchronize it"),
False),
- HINT_RIGHT_CLICK_CONFIGURE:( "You Are Now Ready to Synchronize",
- "Right Click on Group for Options",
+ HINT_RIGHT_CLICK_CONFIGURE:( N_("You Are Now Ready to Synchronize"),
+ N_("Right Click on Group for Options"),
False)
}
PRECONFIGIRED_CONDUITS = {
#source,sinc #comment
#twoway
- ("FolderTwoWay","FolderTwoWay"):( "Synchronize Two Folders",
+ ("FolderTwoWay","FolderTwoWay"):( N_("Synchronize Two Folders"),
True ),
- ("FolderTwoWay","BoxDotNetTwoWay"):( "Backup Folder to Box.net",
+ ("FolderTwoWay","BoxDotNetTwoWay"):( N_("Backup Folder to Box.net"),
False ),
- ("FSpotDbusTwoWay","FlickrTwoWay"):( "Synchronize Tagged F-Spot Photos to Flickr",
+ ("FSpotDbusTwoWay","FlickrTwoWay"):( N_("Synchronize Tagged F-Spot Photos to Flickr"),
False )
}
diff --git a/conduit/Main.py b/conduit/Main.py
index a6c346b..39c1d81 100644
--- a/conduit/Main.py
+++ b/conduit/Main.py
@@ -4,6 +4,7 @@ import sys
import dbus, dbus.service, dbus.mainloop.glib
import gobject
import logging
+from gettext import gettext as _
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
dbus.mainloop.glib.threads_init()
@@ -55,51 +56,51 @@ class Application(dbus.service.Object):
parser = optparse.OptionParser(
prog="conduit",
version="%%prog %s" % conduit.VERSION,
- description="Conduit is a synchronization application.")
+ description=_("Conduit is a synchronization application."))
parser.add_option(
"-c", "--console",
dest="build_gui", action="store_false", default=True,
- help="Launch without GUI. [default: %default]")
+ help=_("Launch without GUI. [default: %default]"))
parser.add_option(
"-f", "--config-file",
metavar="FILE", default=self.settingsFile,
- help="Save dataprovider configuration to FILE. [default: %default]")
+ help=_("Save dataprovider configuration to FILE. [default: %default]"))
parser.add_option(
"-i", "--iconify",
action="store_true", default=False,
- help="Iconify on startup. [default: %default]")
+ help=_("Iconify on startup. [default: %default]"))
parser.add_option(
"-u", "--ui",
metavar="NAME", default="gtk",
- help="Run with the specified UI. [default: %default]")
+ help=_("Run with the specified UI. [default: %default]"))
parser.add_option(
"-w", "--with-modules",
metavar="mod1,mod2",
- help="Only load modules in the named files. [default: load all modules]")
+ help=_("Only load modules in the named files. [default: load all modules]"))
parser.add_option(
"-x", "--without-modules",
metavar="mod1,mod2",
- help="Do not load modules in the named files. [default: load all modules]")
+ help=_("Do not load modules in the named files. [default: load all modules]"))
parser.add_option(
"-e", "--settings",
metavar="key=val,key=val",
- help="Explicitly set internal Conduit settings (keys) to the given values for this session. [default: do not set]")
+ help=_("Explicitly set internal Conduit settings (keys) to the given values for this session. [default: do not set]"))
parser.add_option(
"-U", "--enable-unsupported",
action="store_true", default=False,
- help="Enable loading of unfinished or unsupported dataproviders. [default: %default]")
+ help=_("Enable loading of unfinished or unsupported dataproviders. [default: %default]"))
parser.add_option(
"-d", "--debug",
action="store_true", default=False,
- help="Generate more debugging information. [default: %default]")
+ help=_("Generate more debugging information. [default: %default]"))
parser.add_option(
"-q", "--quiet",
action="store_true", default=False,
- help="Generate less debugging information. [default: %default]")
+ help=_("Generate less debugging information. [default: %default]"))
parser.add_option(
"-s", "--silent",
action="store_true", default=False,
- help="Generate no debugging information. [default: %default]")
+ help=_("Generate no debugging information. [default: %default]"))
options, args = parser.parse_args()
whitelist = None
diff --git a/conduit/Module.py b/conduit/Module.py
index a5fd7a1..ba632f6 100644
--- a/conduit/Module.py
+++ b/conduit/Module.py
@@ -17,6 +17,8 @@ import conduit.ModuleWrapper as ModuleWrapper
import conduit.Knowledge as Knowledge
import conduit.Vfs as Vfs
+from gettext import gettext as _
+
class ModuleManager(gobject.GObject):
"""
Generic dynamic module loader for conduit. Given a path
@@ -289,7 +291,7 @@ class ModuleManager(gobject.GObject):
for (source,sink),(comment,twoway) in Knowledge.PRECONFIGIRED_CONDUITS.items():
if source in names and sink in names:
#return key,key,desc,two-way
- found.append( (names[source],names[sink],comment,twoway) )
+ found.append( (names[source],names[sink],_(comment),twoway) )
return found
diff --git a/conduit/dataproviders/DataProvider.py b/conduit/dataproviders/DataProvider.py
index 6b2614e..838d42d 100644
--- a/conduit/dataproviders/DataProvider.py
+++ b/conduit/dataproviders/DataProvider.py
@@ -17,18 +17,20 @@ import conduit.utils as Utils
import conduit.Settings as Settings
import conduit.XMLSerialization as XMLSerialization
-STATUS_NONE = _("Ready")
-STATUS_CHANGE_DETECTED = _("New data to sync")
-STATUS_REFRESH = _("Refreshing...")
-STATUS_DONE_REFRESH_OK = _("Refreshed OK")
-STATUS_DONE_REFRESH_ERROR = _("Error Refreshing")
-STATUS_SYNC = _("Synchronizing...")
-STATUS_DONE_SYNC_OK = _("Synchronized OK")
-STATUS_DONE_SYNC_ERROR = _("Error Synchronizing")
-STATUS_DONE_SYNC_SKIPPED = _("Synchronization Skipped")
-STATUS_DONE_SYNC_CANCELLED = _("Synchronization Cancelled")
-STATUS_DONE_SYNC_CONFLICT = _("Synchronization Conflict")
-STATUS_DONE_SYNC_NOT_CONFIGURED = _("Not Configured")
+def N_(message): return message
+
+STATUS_NONE = N_("Ready")
+STATUS_CHANGE_DETECTED = N_("New data to sync")
+STATUS_REFRESH = N_("Refreshing...")
+STATUS_DONE_REFRESH_OK = N_("Refreshed OK")
+STATUS_DONE_REFRESH_ERROR = N_("Error Refreshing")
+STATUS_SYNC = N_("Synchronizing...")
+STATUS_DONE_SYNC_OK = N_("Synchronized OK")
+STATUS_DONE_SYNC_ERROR = N_("Error Synchronizing")
+STATUS_DONE_SYNC_SKIPPED = N_("Synchronization Skipped")
+STATUS_DONE_SYNC_CANCELLED = N_("Synchronization Cancelled")
+STATUS_DONE_SYNC_CONFLICT = N_("Synchronization Conflict")
+STATUS_DONE_SYNC_NOT_CONFIGURED = N_("Not Configured")
class DataProviderBase(gobject.GObject):
"""
diff --git a/conduit/dataproviders/Image.py b/conduit/dataproviders/Image.py
index c9bcb56..a25e632 100644
--- a/conduit/dataproviders/Image.py
+++ b/conduit/dataproviders/Image.py
@@ -7,6 +7,8 @@ import conduit.datatypes.File as File
import conduit.dataproviders.DataProvider as DataProvider
from conduit.datatypes import Rid
+from gettext import gettext as _
+
class UploadInfo:
"""
Upload information container, this way we can add info
@@ -29,8 +31,8 @@ class ImageSink(DataProvider.DataSink):
_in_type_ = "file/photo"
_out_type_ = "file/photo"
- IMAGE_SIZES = ["640x480", "800x600", "1024x768"]
- NO_RESIZE = "None"
+ IMAGE_SIZES = [_("640x480"), _("800x600"), _("1024x768")]
+ NO_RESIZE = _("None")
def __init__(self, *args):
DataProvider.DataSink.__init__(self)
diff --git a/conduit/dataproviders/__init__.py b/conduit/dataproviders/__init__.py
index ca55c62..37c3ed2 100644
--- a/conduit/dataproviders/__init__.py
+++ b/conduit/dataproviders/__init__.py
@@ -1,12 +1,14 @@
import DataProviderCategory
+def N_(message): return message
+
#Default Categories for the DataProviders
-CATEGORY_FILES = DataProviderCategory.DataProviderCategory("Files and Folders", "computer")
-CATEGORY_NOTES = DataProviderCategory.DataProviderCategory("Notes", "tomboy")
-CATEGORY_PHOTOS = DataProviderCategory.DataProviderCategory("Photos", "image-x-generic")
-CATEGORY_OFFICE = DataProviderCategory.DataProviderCategory("Office", "applications-office")
-CATEGORY_SETTINGS = DataProviderCategory.DataProviderCategory("Settings", "applications-system")
-CATEGORY_MISC = DataProviderCategory.DataProviderCategory("Miscellaneous", "applications-accessories")
-CATEGORY_MEDIA = DataProviderCategory.DataProviderCategory("Media", "applications-multimedia")
-CATEGORY_BOOKMARKS = DataProviderCategory.DataProviderCategory("Bookmarks", "user-bookmarks")
-CATEGORY_TEST = DataProviderCategory.DataProviderCategory("Test")
+CATEGORY_FILES = DataProviderCategory.DataProviderCategory(N_("Files and Folders"), "computer")
+CATEGORY_NOTES = DataProviderCategory.DataProviderCategory(N_("Notes"), "tomboy")
+CATEGORY_PHOTOS = DataProviderCategory.DataProviderCategory(N_("Photos"), "image-x-generic")
+CATEGORY_OFFICE = DataProviderCategory.DataProviderCategory(N_("Office"), "applications-office")
+CATEGORY_SETTINGS = DataProviderCategory.DataProviderCategory(N_("Settings"), "applications-system")
+CATEGORY_MISC = DataProviderCategory.DataProviderCategory(N_("Miscellaneous"), "applications-accessories")
+CATEGORY_MEDIA = DataProviderCategory.DataProviderCategory(N_("Media"), "applications-multimedia")
+CATEGORY_BOOKMARKS = DataProviderCategory.DataProviderCategory(N_("Bookmarks"), "user-bookmarks")
+CATEGORY_TEST = DataProviderCategory.DataProviderCategory(N_("Test"))
diff --git a/conduit/gtkui/Canvas.py b/conduit/gtkui/Canvas.py
index 8df723f..8aafa96 100644
--- a/conduit/gtkui/Canvas.py
+++ b/conduit/gtkui/Canvas.py
@@ -214,13 +214,13 @@ class Canvas(goocanvas.Canvas, _StyleMixin):
def _make_hint(self, hint, timeout=4):
if Knowledge.HINT_TEXT[hint][2]:
- buttons = [("Show me",hint)]
+ buttons = [(_("Show me"), hint)]
else:
buttons = []
h = self.msg.new_from_text_and_icon(
gtk.STOCK_INFO,
- Knowledge.HINT_TEXT[hint][0],
- Knowledge.HINT_TEXT[hint][1],
+ _(Knowledge.HINT_TEXT[hint][0]),
+ _(Knowledge.HINT_TEXT[hint][1]),
buttons=buttons,
timeout=timeout)
h.connect("response", self._do_hint)
diff --git a/conduit/gtkui/UI.py b/conduit/gtkui/UI.py
index 5de004d..05fc2d7 100644
--- a/conduit/gtkui/UI.py
+++ b/conduit/gtkui/UI.py
@@ -25,14 +25,15 @@ import conduit.gtkui.Tree as Tree
import conduit.gtkui.ConflictResolver as ConflictResolver
import conduit.gtkui.Database as Database
+def N_(message): return message
DEFAULT_CONDUIT_BROWSER = "gtkmozembed"
DEVELOPER_WEB_LINKS = (
#name, #url
-("Introduction", "http://www.conduit-project.org/wiki/Development"),
-("Writing a Data Provider", "http://www.conduit-project.org/wiki/WritingADataProvider"),
-("API Documentation", "http://doc.conduit-project.org/conduit/"),
-("Test Results", "http://tests.conduit-project.org/")
+(N_("Introduction"), "http://www.conduit-project.org/wiki/Development"),
+(N_("Writing a Data Provider"), "http://www.conduit-project.org/wiki/WritingADataProvider"),
+(N_("API Documentation"), "http://doc.conduit-project.org/conduit/"),
+(N_("Test Results"), "http://tests.conduit-project.org/")
)
#set up the gettext system and locales
@@ -125,15 +126,15 @@ class MainWindow:
self.mainWindow.set_position(gtk.WIN_POS_CENTER)
title = "Conduit"
if conduit.IS_DEVELOPMENT_VERSION:
- title = title + " - %s (Development Version)" % conduit.VERSION
+ title = title + _(" - %s (Development Version)") % conduit.VERSION
if not conduit.IS_INSTALLED:
- title = title + " - Running Uninstalled"
+ title = title + _(" - Running Uninstalled")
self.mainWindow.set_title(title)
#Configure canvas
self.canvasSW = self.widgets.get_widget("canvasScrolledWindow")
self.hpane = self.widgets.get_widget("hpaned1")
-
+
#start up the canvas
msg = MsgArea.MsgAreaController()
self.widgets.get_widget("mainVbox").pack_start(msg, False, False)
@@ -161,7 +162,7 @@ class MainWindow:
#add the preconfigured Conduit menu
if conduit.GLOBALS.settings.get("gui_show_hints"):
self.preconfiguredConduitsMenu = _PreconfiguredConduitMenu()
- item = gtk.ImageMenuItem("Examples")
+ item = gtk.ImageMenuItem(_("Examples"))
item.set_image(
gtk.image_new_from_stock(gtk.STOCK_OPEN,gtk.ICON_SIZE_MENU))
item.set_submenu(self.preconfiguredConduitsMenu)
@@ -173,7 +174,7 @@ class MainWindow:
#to the help menu
if conduit.IS_DEVELOPMENT_VERSION:
helpMenu = self.widgets.get_widget("help_menu")
- developersMenuItem = gtk.ImageMenuItem("Developers")
+ developersMenuItem = gtk.ImageMenuItem(_("Developers"))
developersMenuItem.set_image(
gtk.image_new_from_icon_name(
"applications-development",
@@ -182,12 +183,12 @@ class MainWindow:
developersMenuItem.set_submenu(developersMenu)
helpMenu.prepend(developersMenuItem)
for name,url in DEVELOPER_WEB_LINKS:
- item = gtk.ImageMenuItem(name)
+ item = gtk.ImageMenuItem(_(name))
item.set_image(
gtk.image_new_from_icon_name(
"applications-internet",
gtk.ICON_SIZE_MENU))
- item.connect("activate",self.on_developer_menu_item_clicked,name,url)
+ item.connect("activate",self.on_developer_menu_item_clicked,_(name),url)
developersMenu.append(item)
#final GUI setup
@@ -415,7 +416,7 @@ class MainWindow:
gtk.ICON_SIZE_MENU))
if currentValue == policyValue:
widget.set_active(True)
-
+
#The dataprovider factories can provide a configuration widget which is
#packed into the notebook
for i in conduit.GLOBALS.moduleManager.dataproviderFactories:#get_modules_by_type("dataprovider-factory"):
diff --git a/conduit/modules/BackpackModule/BackpackModule.py b/conduit/modules/BackpackModule/BackpackModule.py
index 04a9ca3..a4eaedd 100644
--- a/conduit/modules/BackpackModule/BackpackModule.py
+++ b/conduit/modules/BackpackModule/BackpackModule.py
@@ -102,15 +102,15 @@ class BackpackNoteSink(DataProvider.DataSink, BackpackBase):
log.debug("Found existing note: %s (uid:%s timestamp:%s)" % (title, uid, timestamp))
def config_setup(self, config):
- config.add_section("Account details")
- config.add_item("Login", "text",
+ config.add_section(_("Account details"))
+ config.add_item(_("Login"), "text",
config_name = "username"
)
- config.add_item("API key", "text",
+ config.add_item(_("API key"), "text",
config_name = "apikey"
)
- config.add_section("Saved notes")
- config.add_item("Save notes in page", "text",
+ config.add_section(_("Saved notes"))
+ config.add_item(_("Save notes in page"), "text",
config_name = "storeInPage"
)
diff --git a/conduit/modules/BansheeModule/BansheeModule.py b/conduit/modules/BansheeModule/BansheeModule.py
index ac5fce0..27f7697 100644
--- a/conduit/modules/BansheeModule/BansheeModule.py
+++ b/conduit/modules/BansheeModule/BansheeModule.py
@@ -184,8 +184,8 @@ class BansheeSource(DataProvider.DataSource):
VIDEO_PLAYLIST: self.video_playlists}[playlist_type].append(playlist_id)
def config_setup(self, config):
- config.add_section("Playlists")
- self._playlist_config = config.add_item("Playlists", "list",
+ config.add_section(_("Playlists"))
+ self._playlist_config = config.add_item(_("Playlists"), "list",
initial_value_callback = self._get_config_playlists,
save_callback = self._set_config_playlists
)
diff --git a/conduit/modules/BoxDotNetModule/BoxDotNetModule.py b/conduit/modules/BoxDotNetModule/BoxDotNetModule.py
index 61b6dc2..29c2e91 100644
--- a/conduit/modules/BoxDotNetModule/BoxDotNetModule.py
+++ b/conduit/modules/BoxDotNetModule/BoxDotNetModule.py
@@ -287,12 +287,12 @@ class BoxDotNetTwoWay(DataProvider.TwoWay):
_login_finished,
self._login)
- config.add_section("Folder")
- folders_config = config.add_item("Folder name", "combotext",
+ config.add_section(_("Folder"))
+ folders_config = config.add_item(_("Folder name"), "combotext",
config_name = "foldername",
choices = [],
)
- config.add_item("Load folders", "button",
+ config.add_item(_("Load folders"), "button",
initial_value = _load_button_clicked
)
diff --git a/conduit/modules/ConverterModule.py b/conduit/modules/ConverterModule.py
index bded406..5b95278 100644
--- a/conduit/modules/ConverterModule.py
+++ b/conduit/modules/ConverterModule.py
@@ -13,6 +13,8 @@ import conduit.datatypes.Note as Note
import conduit.datatypes.Setting as Setting
import conduit.datatypes.Bookmark as Bookmark
+from gettext import gettext as _
+
MODULES = {
"EmailConverter" : { "type": "converter" },
"NoteConverter" : { "type": "converter" },
@@ -84,7 +86,7 @@ class NoteConverter(TypeConverter.Converter):
def text_to_note(self, text, **kwargs):
n = Note.Note(
- title="Note-"+Utils.random_string(),
+ title=_("Note-")+Utils.random_string(),
contents=text
)
return n
diff --git a/conduit/modules/DesktopWallpaperModule.py b/conduit/modules/DesktopWallpaperModule.py
index e6ee346..972533d 100644
--- a/conduit/modules/DesktopWallpaperModule.py
+++ b/conduit/modules/DesktopWallpaperModule.py
@@ -7,14 +7,16 @@ import conduit.utils as Utils
import conduit.dataproviders.File as FileDataProvider
import conduit.dataproviders.DataProvider as DataProvider
+from gettext import gettext as _
+
MODULES = {
"DesktopWallpaperDataProvider" : { "type": "dataprovider" }
}
class DesktopWallpaperDataProvider(FileDataProvider.FolderTwoWay):
- _name_ = "Wallpaper"
- _description_ = "Changes your Desktop Wallpaper"
+ _name_ = _("Wallpaper")
+ _description_ = _("Changes your Desktop Wallpaper")
_category_ = conduit.dataproviders.CATEGORY_MISC
_module_type_ = "sink"
_in_type_ = "file"
diff --git a/conduit/modules/EvolutionModule/EvolutionModule.py b/conduit/modules/EvolutionModule/EvolutionModule.py
index a717d08..fdc37a9 100644
--- a/conduit/modules/EvolutionModule/EvolutionModule.py
+++ b/conduit/modules/EvolutionModule/EvolutionModule.py
@@ -104,7 +104,7 @@ class EvoBase(DataProvider.TwoWay):
self.uids = None
def config_setup(self, config, name):
- config.add_section("Select %s" % name)
+ config.add_section(_("Select %s") % name)
#If we cant find the currently selected item in the availiable list,
#selects the first we can find.
for name, uri in self.allSourceURIs:
diff --git a/conduit/modules/FacebookModule/FacebookModule.py b/conduit/modules/FacebookModule/FacebookModule.py
index e4cecd7..f5c2680 100644
--- a/conduit/modules/FacebookModule/FacebookModule.py
+++ b/conduit/modules/FacebookModule/FacebookModule.py
@@ -142,18 +142,18 @@ class FacebookSink(Image.ImageSink):
conduit.GLOBALS.syncManager.run_blocking_dataprovider_function_calls(
self, _login_finished, self._login)
- status_label = config.add_item('Status', 'label',
+ status_label = config.add_item(_('Status'), 'label',
initial_value = "Logged in" if self.fapi.uid else "Not logged in",
use_markup = True,
)
- album_section = config.add_section("Album")
- albums_config = config.add_item("Album name", "combotext",
+ album_section = config.add_section(_("Album"))
+ albums_config = config.add_item(_("Album name"), "combotext",
config_name = "albumname",
choices = [],
)
- load_albums_config = config.add_item("Load albums", "button",
+ load_albums_config = config.add_item(_("Load albums"), "button",
initial_value = _load_albums
)
diff --git a/conduit/modules/FeedModule/FeedModule.py b/conduit/modules/FeedModule/FeedModule.py
index 55bed20..d8042e3 100644
--- a/conduit/modules/FeedModule/FeedModule.py
+++ b/conduit/modules/FeedModule/FeedModule.py
@@ -111,29 +111,29 @@ class RSSSource(DataProvider.DataSource):
def config_setup(self, config):
#FIXME: Add Randomize
- config.add_section("Feed details")
- config.add_item("Feed address", "text",
+ config.add_section(_("Feed details"))
+ config.add_item(_("Feed address"), "text",
config_name = 'feedUrl',
)
- config.add_section("Enclosure settings")
- limit_config = config.add_item("Limit downloaded enclosures", "check",
+ config.add_section(_("Enclosure settings"))
+ limit_config = config.add_item(_("Limit downloaded enclosures"), "check",
config_name = 'limit'
)
limit_config.connect("value-changed",
lambda item, changed, value: limit_spin_config.set_enabled(value)
)
- limit_spin_config = config.add_item("Limit to", "spin",
+ limit_spin_config = config.add_item(_("Limit to"), "spin",
config_name = 'limitNum',
enabled = self.limit,
)
- random_config = config.add_item("Randomize enclosures", "check",
+ random_config = config.add_item(_("Randomize enclosures"), "check",
config_name = 'randomize'
)
- config.add_section("Download types")
- config.add_item("Download audio files", "check", config_name = "downloadAudio")
- config.add_item("Download video files", "check", config_name = "downloadVideo")
- config.add_item("Download photo files", "check", config_name = "downloadPhotos")
+ config.add_section(_("Download types"))
+ config.add_item(_("Download audio files"), "check", config_name = "downloadAudio")
+ config.add_item(_("Download video files"), "check", config_name = "downloadVideo")
+ config.add_item(_("Download photo files"), "check", config_name = "downloadPhotos")
def refresh(self):
DataProvider.DataSource.refresh(self)
diff --git a/conduit/modules/FlickrModule/FlickrModule.py b/conduit/modules/FlickrModule/FlickrModule.py
index a106370..d932140 100644
--- a/conduit/modules/FlickrModule/FlickrModule.py
+++ b/conduit/modules/FlickrModule/FlickrModule.py
@@ -305,7 +305,7 @@ class FlickrTwoWay(Image.ImageTwoWay):
self, _login_finished, self._login)
account_section = config.add_section(_('Account details'))
- username_config = config.add_item('Username', 'text',
+ username_config = config.add_item(_('Username'), 'text',
config_name = 'username',
)
username_config.connect('value-changed',
@@ -325,7 +325,7 @@ class FlickrTwoWay(Image.ImageTwoWay):
choices = [],
)
config.add_item(_("Resize photos"), "combo",
- choices = [("None", _("Do not resize")), "640x480", "800x600", "1024x768"],
+ choices = [("None", _("Do not resize")), _("640x480"), _("800x600"), _("1024x768")],
config_name = "imageSize"
)
config.add_item(_('Photos are public'), 'check',
diff --git a/conduit/modules/FspotModule/FspotModule.py b/conduit/modules/FspotModule/FspotModule.py
index 44ae9ec..e58ee4f 100644
--- a/conduit/modules/FspotModule/FspotModule.py
+++ b/conduit/modules/FspotModule/FspotModule.py
@@ -240,13 +240,13 @@ class FSpotDbusTwoWay(Image.ImageTwoWay):
else:
status_label.value = STOPPED_MESSAGE
- status_label = config.add_item("Status", "label")
- start_fspot_config = config.add_item("Start F-Spot", "button",
+ status_label = config.add_item(_("Status"), "label")
+ start_fspot_config = config.add_item(_("Start F-Spot"), "button",
initial_value = start_fspot
)
- config.add_section("Tags")
- tags_config = config.add_item("Tags", "list",
+ config.add_section(_("Tags"))
+ tags_config = config.add_item(_("Tags"), "list",
config_name = 'tags',
choices = self.enabledTags,
)
@@ -259,11 +259,11 @@ class FSpotDbusTwoWay(Image.ImageTwoWay):
tags_config.set_choices(self._get_all_tags())
tag_name_config.set_value('')
- add_tags_section = config.add_section("Add tags")
- tag_name_config = config.add_item("Tag name", "text",
+ add_tags_section = config.add_section(_("Add tags"))
+ tag_name_config = config.add_item(_("Tag name"), "text",
initial_value = ""
)
- config.add_item("Add tag", "button",
+ config.add_item(_("Add tag"), "button",
initial_value = add_tag_cb
)
dbus.SessionBus().watch_name_owner(self.SERVICE_PATH, watch)
diff --git a/conduit/modules/GConfModule/GConfModule.py b/conduit/modules/GConfModule/GConfModule.py
index 40393cb..8273941 100644
--- a/conduit/modules/GConfModule/GConfModule.py
+++ b/conduit/modules/GConfModule/GConfModule.py
@@ -28,11 +28,11 @@ class GConfTwoWay(DataProvider.TwoWay, AutoSync.AutoSync):
_configurable_ = True
WHITELIST = (
- ("Metacity", "/apps/metacity/*"),
- ("Nautilus", "/apps/nautilus/*"),
- ("Preferred Applications", "/desktop/gnome/applications/*"),
- ("Desktop Interface", "/desktop/gnome/interface/*"),
- ("Gnome Terminal", "/apps/gnome-terminal/*")
+ (_("Metacity"), "/apps/metacity/*"),
+ (_("Nautilus"), "/apps/nautilus/*"),
+ (_("Preferred Applications"), "/desktop/gnome/applications/*"),
+ (_("Desktop Interface"), "/desktop/gnome/interface/*"),
+ (_("Gnome Terminal"), "/apps/gnome-terminal/*")
)
def __init__(self, *args):
@@ -135,7 +135,7 @@ class GConfTwoWay(DataProvider.TwoWay, AutoSync.AutoSync):
def config_setup(self, config):
config.add_section(_("Applications to Synchronize"))
- items_config = config.add_item("Items", "list",
+ items_config = config.add_item(_("Items"), "list",
config_name = "sections",
choices = [(path, name) for name, path in self.WHITELIST]
)
diff --git a/conduit/modules/GoogleBookmarksModule.py b/conduit/modules/GoogleBookmarksModule.py
index f7fbab4..6b89cd1 100644
--- a/conduit/modules/GoogleBookmarksModule.py
+++ b/conduit/modules/GoogleBookmarksModule.py
@@ -8,14 +8,16 @@ import conduit
import conduit.dataproviders.DataProvider as DataProvider
import conduit.datatypes.Bookmark as Bookmark
+from gettext import gettext as _
+
MODULES = {
"GoogleBookmarksDataProviderSource" : { "type": "dataprovider" }
}
class GoogleBookmarksDataProviderSource(DataProvider.DataSource):
- _name_ = "Google Bookmarks"
- _description_ = "Sync your Google Bookmarks"
+ _name_ = _("Google Bookmarks")
+ _description_ = _("Sync your Google Bookmarks")
_category_ = conduit.dataproviders.CATEGORY_BOOKMARKS
_module_type_ = "source"
_out_type_ = "bookmark"
@@ -61,11 +63,11 @@ class GoogleBookmarksDataProviderSource(DataProvider.DataSource):
return self.username
def config_setup(self, config):
- config.add_section("Login Details")
- config.add_item("Username", "text",
+ config.add_section(_("Login Details"))
+ config.add_item(_("Username"), "text",
config_name = "username",
)
- config.add_item("Password", "text",
+ config.add_item(_("Password"), "text",
config_name = "password",
password = True
)
diff --git a/conduit/modules/NautilusBookmarksModule.py b/conduit/modules/NautilusBookmarksModule.py
index 261f4b4..d36ba46 100644
--- a/conduit/modules/NautilusBookmarksModule.py
+++ b/conduit/modules/NautilusBookmarksModule.py
@@ -8,14 +8,16 @@ import conduit.dataproviders.DataProvider as DataProvider
import conduit.utils as Utils
import conduit.datatypes.Bookmark as Bookmark
+from gettext import gettext as _
+
MODULES = {
"NautilusBookmarksDataProviderTwoWay" : { "type": "dataprovider" }
}
class NautilusBookmarksDataProviderTwoWay(DataProvider.TwoWay):
- _name_ = "Nautilus Bookmarks"
- _description_ = "Sync your Nautilus Bookmarks"
+ _name_ = _("Nautilus Bookmarks")
+ _description_ = _("Sync your Nautilus Bookmarks")
_category_ = conduit.dataproviders.CATEGORY_BOOKMARKS
_module_type_ = "twoway"
_in_type_ = "bookmark"
@@ -140,10 +142,10 @@ class NautilusBookmarksDataProviderTwoWay(DataProvider.TwoWay):
return False
def config_setup(self, config):
- config.add_item("Sync bookmarks to local places/files", "check",
+ config.add_item(_("Sync bookmarks to local places/files"), "check",
config_name = "syncLocal"
)
- config.add_item("Sync bookmarks to remote places/files", "check",
+ config.add_item(_("Sync bookmarks to remote places/files"), "check",
config_name = "syncRemote"
)
diff --git a/conduit/modules/RhythmboxModule/RhythmboxModule.py b/conduit/modules/RhythmboxModule/RhythmboxModule.py
index c86c8f3..c7ec3da 100644
--- a/conduit/modules/RhythmboxModule/RhythmboxModule.py
+++ b/conduit/modules/RhythmboxModule/RhythmboxModule.py
@@ -113,8 +113,8 @@ class RhythmboxSource(DataProvider.DataSource):
def config_setup(self, config):
self.allPlaylists = [(name, name) for name, songs in self._parse_playlists(RhythmboxSource.PLAYLIST_PATH)]
- config.add_section("Playlists")
- config.add_item("Playlists", "list",
+ config.add_section(_("Playlists"))
+ config.add_item(_("Playlists"), "list",
config_name = "playlists",
choices = self.allPlaylists
)
diff --git a/conduit/modules/SynceModule.py b/conduit/modules/SynceModule.py
index 3b0e749..1cf2f9c 100644
--- a/conduit/modules/SynceModule.py
+++ b/conduit/modules/SynceModule.py
@@ -136,7 +136,7 @@ class SynceFactory(HalFactory.HalFactory):
vbox.pack_start(treeview,True,True)
btn = gtk.Button(None,gtk.STOCK_ADD)
- btn.set_label("Create Partnership")
+ btn.set_label(_("Create Partnership"))
btn.connect("clicked", self._on_create_partnership_clicked, mod)
vbox.pack_start(btn, False, False)
@@ -308,8 +308,8 @@ class SynceTwoWay(DataProvider.TwoWay):
return "synce-%d" % self._type_id_
class SynceContactsTwoWay(SynceTwoWay):
- _name_ = "Contacts"
- _description_ = "Windows Mobile Contacts"
+ _name_ = _("Contacts")
+ _description_ = _("Windows Mobile Contacts")
_module_type_ = "twoway"
_in_type_ = "contact"
_out_type_ = "contact"
@@ -446,8 +446,8 @@ class SynceContactsTwoWay(SynceTwoWay):
return doc.toxml()
class SynceCalendarTwoWay(SynceTwoWay):
- _name_ = "Calendar"
- _description_ = "Windows Mobile Calendar"
+ _name_ = _("Calendar")
+ _description_ = _("Windows Mobile Calendar")
_module_type_ = "twoway"
_in_type_ = "note"
_out_type_ = "note"
@@ -456,8 +456,8 @@ class SynceCalendarTwoWay(SynceTwoWay):
_configurable_ = False
class SynceTasksTwoWay(SynceTwoWay):
- _name_ = "Tasks"
- _description_ = "Windows Mobile Tasks"
+ _name_ = _("Tasks")
+ _description_ = _("Windows Mobile Tasks")
_module_type_ = "twoway"
_in_type_ = "note"
_out_type_ = "note"
diff --git a/conduit/modules/TomboyModule.py b/conduit/modules/TomboyModule.py
index 478518c..19f1dd2 100644
--- a/conduit/modules/TomboyModule.py
+++ b/conduit/modules/TomboyModule.py
@@ -13,6 +13,8 @@ import conduit.datatypes.Note as Note
import conduit.datatypes.File as File
import conduit.utils as Utils
+from gettext import gettext as _
+
MODULES = {
"TomboyNoteTwoWay" : { "type": "dataprovider" },
"TomboyNoteConverter" : { "type": "converter" }
@@ -98,8 +100,8 @@ class TomboyNoteTwoWay(DataProvider.TwoWay, AutoSync.AutoSync):
"""
LUID is the tomboy uid string
"""
- _name_ = "Tomboy Notes"
- _description_ = "Synchronize your Tomboy notes"
+ _name_ = _("Tomboy Notes")
+ _description_ = _("Synchronize your Tomboy notes")
_category_ = conduit.dataproviders.CATEGORY_NOTES
_module_type_ = "twoway"
_in_type_ = "note/tomboy"
diff --git a/conduit/modules/ZotoModule/ZotoModule.py b/conduit/modules/ZotoModule/ZotoModule.py
index 64801d6..ba515fe 100644
--- a/conduit/modules/ZotoModule/ZotoModule.py
+++ b/conduit/modules/ZotoModule/ZotoModule.py
@@ -240,16 +240,16 @@ class ZotoSink(Image.ImageTwoWay):
return Rid(uid=fotoId)
def config_setup(self, config):
- config.add_section('Account details')
- config.add_item('Username', 'text',
+ config.add_section(_('Account details'))
+ config.add_item(_('Username'), 'text',
config_name = 'username',
)
- config.add_item('Password', 'text',
+ config.add_item(_('Password'), 'text',
config_name = 'password',
password = True
)
- config.add_section('Saved photo settings')
- config.add_item('Album', 'text',
+ config.add_section(_('Saved photo settings'))
+ config.add_item(_('Album'), 'text',
config_name = 'albumName',
)
diff --git a/conduit/modules/iPodModule/iPodModule.py b/conduit/modules/iPodModule/iPodModule.py
index 2c66f39..6b72885 100644
--- a/conduit/modules/iPodModule/iPodModule.py
+++ b/conduit/modules/iPodModule/iPodModule.py
@@ -176,8 +176,8 @@ class IPodNoteTwoWay(IPodBase):
LUID is the note title
"""
- _name_ = "Notes"
- _description_ = "Synchronize your iPod notes"
+ _name_ = _("Notes")
+ _description_ = _("Synchronize your iPod notes")
_module_type_ = "twoway"
_in_type_ = "note"
_out_type_ = "note"
@@ -292,8 +292,8 @@ class IPodNoteTwoWay(IPodBase):
class IPodContactsTwoWay(IPodBase):
- _name_ = "Contacts"
- _description_ = "Synchronize your iPod contacts"
+ _name_ = _("Contacts")
+ _description_ = _("Synchronize your iPod contacts")
_module_type_ = "twoway"
_in_type_ = "contact"
_out_type_ = "contact"
@@ -328,8 +328,8 @@ class IPodContactsTwoWay(IPodBase):
class IPodCalendarTwoWay(IPodBase):
- _name_ = "Calendar"
- _description_ = "Synchronize your iPod calendar"
+ _name_ = _("Calendar")
+ _description_ = _("Synchronize your iPod calendar")
_module_type_ = "twoway"
_in_type_ = "event"
_out_type_ = "event"
@@ -364,8 +364,8 @@ class IPodCalendarTwoWay(IPodBase):
class IPodPhotoSink(IPodBase):
- _name_ = "Photos"
- _description_ = "Synchronize your iPod photos"
+ _name_ = _("Photos")
+ _description_ = _("Synchronize your iPod photos")
_module_type_ = "sink"
_in_type_ = "file/photo"
_out_type_ = "file/photo"
@@ -458,11 +458,11 @@ class IPodPhotoSink(IPodBase):
self._delete_album(album_config.get_value())
album_config.choices = self._get_photo_albums()
- album_config = config.add_item('Album', 'combotext',
+ album_config = config.add_item(_('Album'), 'combotext',
config_name = 'albumName',
choices = self._get_photo_albums(),
)
- config.add_item("Delete", "button",
+ config.add_item(_("Delete"), "button",
initial_value = _delete_click
)
@@ -808,12 +808,12 @@ class IPodMediaTwoWay(IPodBase):
encodings = [(enc_name, enc_opts.get('description', None) or enc_name)
for enc_name, enc_opts in self.encodings.iteritems()]
- config.add_section("Conversion options")
- config.add_item("Encoding", "combo",
+ config.add_section(_("Conversion options"))
+ config.add_item(_("Encoding"), "combo",
config_name = "encoding",
choices = encodings
)
- config.add_item("Keep converted files", "check",
+ config.add_item(_("Keep converted files"), "check",
config_name = "keep_converted"
)
@@ -843,8 +843,8 @@ IPOD_AUDIO_ENCODINGS = {
class IPodMusicTwoWay(IPodMediaTwoWay):
- _name_ = "iPod Music"
- _description_ = "Synchronize your iPod music"
+ _name_ = _("iPod Music")
+ _description_ = _("Synchronize your iPod music")
_module_type_ = "twoway"
_in_type_ = "file/audio"
_out_type_ = "file/audio"
@@ -879,8 +879,8 @@ IPOD_VIDEO_ENCODINGS = {
class IPodVideoTwoWay(IPodMediaTwoWay):
- _name_ = "iPod Video"
- _description_ = "Synchronize your iPod videos"
+ _name_ = _("iPod Video")
+ _description_ = _("Synchronize your iPod videos")
_module_type_ = "twoway"
_in_type_ = "file/video"
_out_type_ = "file/video"
@@ -904,11 +904,11 @@ class IPodVideoTwoWay(IPodMediaTwoWay):
def config_setup(self, config):
IPodMediaTwoWay.config_setup(self, config)
- video_kinds = [('movie', 'Movie'),
- ('musicvideo', 'Music Video'),
- ('tvshow', 'TV Show')]
+ video_kinds = [('movie', _('Movie')),
+ ('musicvideo', _('Music Video')),
+ ('tvshow', _('TV Show'))]
config.add_section()
- config.add_item("Video kind", "combo",
+ config.add_item(_("Video kind"), "combo",
config_name = "video_kind",
choices = video_kinds)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 55a54a4..0daee72 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,19 +1,26 @@
[encoding: UTF-8]
data/conduit.desktop.in.in
data/conduit.glade
+conduit/Knowledge.py
+conduit/Main.py
+#conduit/Module.py
+conduit/dataproviders/DataProvider.py
+conduit/dataproviders/Image.py
+conduit/dataproviders/__init__.py
conduit/gtkui/Canvas.py
conduit/gtkui/ConflictResolver.py
conduit/gtkui/UI.py
conduit/gtkui/Tree.py
conduit/gtkui/ConfigItems.py
conduit/gtkui/WindowConfigurator.py
-conduit/dataproviders/DataProvider.py
conduit/hildonui/Canvas.py
conduit/hildonui/UI.py
conduit/modules/BackpackModule/BackpackModule.py
conduit/modules/BackpackModule/backpack/backpack.py
conduit/modules/BansheeModule/BansheeModule.py
conduit/modules/BoxDotNetModule/BoxDotNetModule.py
+conduit/modules/ConverterModule.py
+conduit/modules/DesktopWallpaperModule.py
conduit/modules/EvolutionModule/EvolutionModule.py
conduit/modules/FacebookModule/FacebookModule.py
conduit/modules/FeedModule/FeedModule.py
@@ -23,13 +30,17 @@ conduit/modules/Firefox3Module/Firefox3Module.py
conduit/modules/FlickrModule/FlickrModule.py
conduit/modules/FspotModule/FspotModule.py
conduit/modules/GConfModule/GConfModule.py
+conduit/modules/GoogleBookmarksModule.py
conduit/modules/GoogleModule/GoogleModule.py
conduit/modules/GoogleModule/calendar-config.glade
conduit/modules/iPodModule/iPodModule.py
conduit/modules/N800Module/N800Module.py
+conduit/modules/NautilusBookmarksModule.py
conduit/modules/NetworkModule/Server.py
conduit/modules/RhythmboxModule/RhythmboxModule.py
conduit/modules/ShutterflyModule/ShutterflyModule.py
conduit/modules/ShutterflyModule/shutterfly/shutterfly.py
conduit/modules/SmugMugModule/SmugMugModule.py
+conduit/modules/SynceModule.py
+conduit/modules/TestModule.py
conduit/modules/ZotoModule/ZotoModule.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]