mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better translation on nav bar
Translate navbar to brief chinese word from feedback
This commit is contained in:
parent
5a60972f66
commit
9683d93dc8
@ -262,8 +262,8 @@ class AppleDaily(BasicNewsRecipe):
|
|||||||
not self.has_single_feed,
|
not self.has_single_feed,
|
||||||
a.orig_url, __appname__, prefix=prefix,
|
a.orig_url, __appname__, prefix=prefix,
|
||||||
center=self.center_navbar)
|
center=self.center_navbar)
|
||||||
elem = BeautifulSoup(templ.render(
|
translatedTempl =re.sub('<hr>.*<br><br>','<hr>從<a href="'+a.orig_url+'">蘋果日報</a>下載至'+__appname__+'<br><br>',templ.render(doctype='xhtml').decode('utf-8'),flags=re.S)
|
||||||
doctype='xhtml').decode('utf-8')).find('div')
|
elem = BeautifulSoup(translatedTempl).find('div')
|
||||||
body.insert(len(body.contents), elem)
|
body.insert(len(body.contents), elem)
|
||||||
with open(last, 'wb') as fi:
|
with open(last, 'wb') as fi:
|
||||||
fi.write(unicode(soup).encode('utf-8'))
|
fi.write(unicode(soup).encode('utf-8'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user