From 54dba4fc0987abb2cfec6018be6f8463f88e74fd Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Wed, 3 Jun 2009 18:39:24 +0000 Subject: [PATCH] Fix of issue 3007. svn: r12621 --- src/DbManager.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/DbManager.py b/src/DbManager.py index 637ed9d21..282f2f24b 100644 --- a/src/DbManager.py +++ b/src/DbManager.py @@ -1064,15 +1064,17 @@ def find_revisions(name): def find_locker_name(dirpath): """ - Opens the lock file if it exists, reads the contexts and returns - the contents, which should be like "Locked by USERNAME". + Opens the lock file if it exists, reads the contexts which is "USERNAME" + and returns the contents, with correct string before "USERNAME", + so the message can be printed with correct locale. If a file is encountered with errors, we return 'Unknown' This data is displayed in the time column of the manager """ try: fname = os.path.join(dirpath, "lock") ifile = open(fname) - last = ifile.read().strip() + username = ifile.read().strip() + last = _("Locked by %s") % username ifile.close() except (OSError, IOError): last = _("Unknown")