Changeset 731:ecb0716ced56 in hatta-dev
Legend:
- Unmodified
- Added
- Removed
-
hatta.py
r724 r731 411 411 file_path = self._file_path(title) 412 412 if os.path.islink(file_path): 413 raise werkzeug.exceptions.Forbidden( u"Can't edit symbolic links")413 raise werkzeug.exceptions.Forbidden(_(u"Can't edit symbolic links")) 414 414 mercurial.util.rename(file_name, file_path) 415 415 changectx = self._changectx() … … 482 482 file_path = self._file_path(title) 483 483 if os.path.islink(file_path): 484 raise werkzeug.exceptions.Forbidden( u"Can't edit symbolic links")484 raise werkzeug.exceptions.Forbidden(_(u"Can't edit symbolic links")) 485 485 try: 486 486 os.unlink(file_path) … … 495 495 file_path = self._file_path(title) 496 496 if os.path.islink(file_path): 497 raise werkzeug.exceptions.Forbidden( u"Can't read symbolic links")497 raise werkzeug.exceptions.Forbidden(_(u"Can't read symbolic links")) 498 498 try: 499 499 return open(file_path, "rb") … … 1912 1912 rev = -1 1913 1913 except werkzeug.exceptions.Forbidden: 1914 yield werkzeug.html.p(werkzeug.html(_(u"Can't edit a symbolic link."))) 1914 yield werkzeug.html.p( 1915 werkzeug.html(_(u"Can't edit symbolic links"))) 1915 1916 return 1916 1917 if preview: … … 2573 2574 ] 2574 2575 if self.read_only: 2575 raise werkzeug.exceptions.Forbidden(_( "This site is read-only."))2576 raise werkzeug.exceptions.Forbidden(_(u"This site is read-only.")) 2576 2577 if title in restricted_pages: 2577 raise werkzeug.exceptions.Forbidden(_( """Can't edit this page.2578 raise werkzeug.exceptions.Forbidden(_(u"""Can't edit this page. 2578 2579 It can only be edited by the site admin directly on the disk.""")) 2579 2580 if title in self.index.page_links(self.locked_page): 2580 raise werkzeug.exceptions.Forbidden(_( "This page is locked."))2581 raise werkzeug.exceptions.Forbidden(_(u"This page is locked.")) 2581 2582 2582 2583 def save(self, request, title): … … 2609 2610 for link, label in page.extract_links(text): 2610 2611 if title == link: 2611 raise werkzeug.exceptions.Forbidden() 2612 raise werkzeug.exceptions.Forbidden( 2613 _(u"This page is locked.")) 2612 2614 if u'href="' in comment or u'http:' in comment: 2613 2615 raise werkzeug.exceptions.Forbidden() … … 3175 3177 3176 3178 if not self.config.get_bool('hgweb', False): 3177 raise werkzeug.exceptions.Forbidden('Repository access disabled.') 3179 raise werkzeug.exceptions.Forbidden( 3180 _(u'Repository access disabled.')) 3178 3181 app = mercurial.hgweb.request.wsgiapplication( 3179 3182 lambda: mercurial.hgweb.hgweb(self.storage.repo, self.site_name)) … … 3191 3194 3192 3195 if not request.remote_addr.startswith('127.'): 3193 raise werkzeug.exceptions.Forbidden() 3196 raise werkzeug.exceptions.Forbidden( 3197 _(u'This URL can only be called locally.')) 3194 3198 def agony(): 3195 3199 yield u'Oh dear!'
Note: See TracChangeset
for help on using the changeset viewer.
