[kupfer] google_translate: fix loading languages list after google page update



commit 7afac2be1b86b8816820d49f7ec8e147c7779281
Author: Karol BÄ?dkowski <karol bedkowski gmail com>
Date:   Mon Sep 6 19:27:25 2010 +0200

    google_translate: fix loading languages list after google page update
    
    Update RE after change Google Translate page.

 kupfer/plugin/google_translate.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/google_translate.py b/kupfer/plugin/google_translate.py
index 9e170f0..98dbf2e 100644
--- a/kupfer/plugin/google_translate.py
+++ b/kupfer/plugin/google_translate.py
@@ -6,7 +6,7 @@ Translate TextLeaf by Google Translate.
 __kupfer_name__ = _("Google Translate")
 __kupfer_actions__ = ("Translate", "TranslateUrl", 'OpenTranslatePage')
 __description__ = _("Translate text with Google Translate")
-__version__ = "2010-07-02"
+__version__ = "2010-09-06"
 __author__ = "Karol BÄ?dkowski <karol bedkowski gmail com>"
 
 import httplib
@@ -91,7 +91,7 @@ def _translate(text, lang):
 
 
 _RE_GET_LANG_SELECT = re.compile(
-		r'\<select[\w\d\s="\']*name=tl[\w\d\s="\']*\>(.*)\<\/select\>',
+		r'\<select[\w\d\s="\'-]*name=tl[\w\d\s="\']*\>(.*)\<\/select\>',
 		re.UNICODE|re.MULTILINE|re.IGNORECASE)
 _RE_GET_LANG = re.compile(r"""\<option[ \w]+ value="([\w\-]+)"\> # code 'zh-TW'
                               ([^<]+?)             # match localized lang name



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]