mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-29 20:20:30 +00:00
change_root_inv
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@102 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
d9a64ffe8c
commit
91b8c8a897
2 changed files with 25 additions and 9 deletions
|
|
@ -66,16 +66,16 @@ msgstr ""
|
|||
#: linkcheck/Logging.py:306
|
||||
#, c-format
|
||||
msgid "%.3f seconds"
|
||||
msgstr ""
|
||||
msgstr "%.3f secondes"
|
||||
|
||||
#: linkcheck/Logging.py:108 linkcheck/Logging.py:111
|
||||
#, c-format
|
||||
msgid "%.3f seconds\n"
|
||||
msgstr ""
|
||||
msgstr "%.3f secondes\n"
|
||||
|
||||
#: linkcheck/Logging.py:100 linkcheck/Logging.py:280
|
||||
msgid ", line "
|
||||
msgstr ""
|
||||
msgstr ", ligne "
|
||||
|
||||
#: linkcheck/Logging.py:414
|
||||
#, c-format
|
||||
|
|
@ -142,12 +142,12 @@ msgstr ""
|
|||
|
||||
#: linkcheck/UrlData.py:50 linkcheck/UrlData.py:68
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
msgstr "Erreur"
|
||||
|
||||
#: linkchecker:125
|
||||
#, c-format
|
||||
msgid "Error: %s\n"
|
||||
msgstr ""
|
||||
msgstr "Erreur: %s\n"
|
||||
|
||||
#: linkchecker:126
|
||||
msgid "Execute 'linkchecker -h' for help\n"
|
||||
|
|
@ -191,7 +191,7 @@ msgstr ""
|
|||
#: linkcheck/Logging.py:113 linkcheck/Logging.py:205 linkcheck/Logging.py:310
|
||||
#: linkcheck/Logging.py:314
|
||||
msgid "Info"
|
||||
msgstr ""
|
||||
msgstr "Info"
|
||||
|
||||
#: linkcheck/JavascriptUrlData.py:25
|
||||
msgid "Javascript url ignored"
|
||||
|
|
@ -243,7 +243,7 @@ msgstr ""
|
|||
#: linkcheck/Logging.py:124 linkcheck/Logging.py:214 linkcheck/Logging.py:218
|
||||
#: linkcheck/Logging.py:328
|
||||
msgid "Result"
|
||||
msgstr ""
|
||||
msgstr "Résultat"
|
||||
|
||||
#: linkcheck/Logging.py:88 linkcheck/Logging.py:165
|
||||
#, c-format
|
||||
|
|
@ -257,7 +257,7 @@ msgstr ""
|
|||
|
||||
#: linkcheck/Logging.py:93 linkcheck/Logging.py:278
|
||||
msgid "URL"
|
||||
msgstr ""
|
||||
msgstr "URL"
|
||||
|
||||
#: linkcheck/UrlData.py:125
|
||||
msgid "URL is null or empty"
|
||||
|
|
|
|||
18
setup.py
18
setup.py
|
|
@ -22,6 +22,21 @@ from distutils.extension import Extension
|
|||
from Template import Template
|
||||
import sys,os,string
|
||||
|
||||
def change_root_inv(root, pathname):
|
||||
"""the (partially) inverse function of change_root"""
|
||||
if (not root) or \
|
||||
(len(root)<len(pathname)) or \
|
||||
(path[:len(root)]!=root):
|
||||
return pathname
|
||||
|
||||
path = pathname[len(root):]
|
||||
if os.name == 'posix':
|
||||
if path[0]!='/': path = '/'+path
|
||||
elif os.name == 'nt':
|
||||
if path[0]!='\\': path = '\\'+path
|
||||
path = os.path.splitdrive(root)[0] + path
|
||||
return path
|
||||
|
||||
class LCDistribution(Distribution):
|
||||
default_include_dirs = ['/usr/include/openssl',
|
||||
'/usr/local/include/openssl']
|
||||
|
|
@ -64,7 +79,8 @@ class LCDistribution(Distribution):
|
|||
if os.name=='nt':
|
||||
t = Template("linkchecker.bat.tmpl")
|
||||
f = open("linkchecker.bat","w")
|
||||
f.write(t.fill_in({"install_scripts": inst.install_scripts}))
|
||||
f.write(t.fill_in({"install_scripts": \
|
||||
change_root_inv(inst.root, inst.install_scripts)}))
|
||||
f.close()
|
||||
self.scripts.append('linkchecker.bat')
|
||||
elif os.name=='posix':
|
||||
|
|
|
|||
Loading…
Reference in a new issue