Publish FR doc in Manager (#648)

This commit is contained in:
Clément Oudot 2014-04-18 10:17:08 +00:00
parent c7192f105e
commit be37b1bef6
10 changed files with 71 additions and 23 deletions

View File

@ -38,8 +38,11 @@ MANAGERSKINSDIR=$(MANAGERDIR)/skins
RMANAGERSKINSDIR=$(DESTDIR)/$(MANAGERSKINSDIR)
SESSIONSEXPLORERDIR=$(MANAGERDIR)
RSESSIONSEXPLORERDIR=$(DESTDIR)/$(SESSIONSEXPLORERDIR)
DOCDIR=$(DOCUMENTROOT)/doc
DOCDIR=$(DOCUMENTROOT)
RDOCDIR=$(DESTDIR)/$(DOCDIR)
DEFDOCDIR=$(DOCUMENTROOT)/doc
RDEFDOCDIR=$(DESTDIR)/$(DEFDOCDIR)
FRDOCDIR=$(DOCUMENTROOT)/fr-doc
TESTDIR=$(DOCUMENTROOT)/test
RTESTDIR=$(DESTDIR)/$(TESTDIR)
EXAMPLESDIR=$(LMPREFIX)/examples
@ -141,7 +144,7 @@ all: configure common handler manager portal
@echo " - install_manager_site ($(MANAGERDIR))"
@echo " - install_handler_site ($(HANDLERDIR))"
@echo " * Documentation install :"
@echo " - install_doc_site ($(DOCDIR))"
@echo " - install_doc_site ($(DEFDOCDIR))"
@echo " - install_examples_site ($(EXAMPLESDIR))"
@echo
@echo "Other languages documentation (fr only for now)"
@ -280,7 +283,8 @@ install_site: install_manager_site install_portal_site install_handler_site inst
s#__MANAGERDIR__#$(MANAGERDIR)/#g; \
s#__TESTDIR__#$(TESTDIR)/#g; \
s#__VHOSTLISTEN__#$(VHOSTLISTEN)#g; \
s#__DOCDIR__#$(DOCDIR)/#g;' $(RCONFDIR)/*apache*.conf
s#__DEFDOCDIR__#$(DEFDOCDIR)/#g; \
s#__FRDOCDIR__#$(FRDOCDIR)/#g;' $(RCONFDIR)/*apache*.conf
@$(PERL) -i -pe 's/__DNSDOMAIN__/$(DNSDOMAIN)/g' $(RCONFDIR)/for_etc_hosts
# Fix a lost of rights on the main directory
@chmod 755 $(RBINDIR) $(RDOCUMENTROOT) $(REXAMPLESDIR) $(RHANDLERDIR) $(RPORTALSKINSDIR) $(RMANAGERSKINSDIR) $(RTOOLSDIR) $(RCONFDIR) $(RDATADIR)
@ -325,7 +329,7 @@ install_manager_site: install_conf_dir
install -v -d $(RMANAGERSKINSDIR)/$$skin; \
done
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/index.pl ${RMANAGERDIR}
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/notfound.html ${RMANAGERDIR}
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/*.html ${RMANAGERDIR}
@cp -pR --remove-destination ${SRCMANAGERDIR}/example/skins/* $(RMANAGERSKINSDIR)
@if [ "$(MANAGERDIR)/skins/" != "$(MANAGERSKINSDIR)/" ]; then \
for skin in $$(ls lemonldap-ng-manager/example/skins/); do \
@ -412,9 +416,9 @@ install_examples_site:
install_doc_site:
# Offline documentation install
@rm -rf $(RDOCDIR)
@install -v -d $(RDOCDIR)
@cp -dR --remove-destination doc/* $(RDOCDIR)
@rm -rf $(RDEFDOCDIR)
@install -v -d $(RDEFDOCDIR)
@cp -dR --remove-destination doc/* $(RDEFDOCDIR)
install_conf_dir: install_sessions_dir install_notif_dir install_captcha_dir
# Configuration files install
@ -746,7 +750,7 @@ omegat-clean:
rm -rf omegat.files/*/omegat.project po-doc/*/* omegat.files/*/omegat/project_save*.bak
install_%_doc_site: %-doc test_omegat_%_dir
@rm -rf $(RDOCDIR)/$* || true
@install -v -d $(RDOCDIR)/$*
@cp -dR --remove-destination po-doc/$*/* $(RDOCDIR)/$*
@rm -rf $(RDOCDIR)/$*-doc || true
@install -v -d $(RDOCDIR)/$*-doc
@cp -dR --remove-destination po-doc/$*/* $(RDOCDIR)/$*-doc

View File

@ -18,15 +18,24 @@
</Directory>
# On-line documentation
Alias /doc/ __DOCDIR__
Alias /lib/ __DOCDIR__lib/
<Directory __DOCDIR__>
Alias /doc/ __DEFDOCDIR__
Alias /lib/ __DEFDOCDIR__lib/
<Directory __DEFDOCDIR__>
Order allow,deny
Allow from all
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
</Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ __FRDOCDIR__
<Directory __FRDOCDIR__>
Order deny,allow
Allow from all
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
</Directory>
# Perl script
# Note: to avoid manager stay in memory, we don't use ModPerl::Registry
# by default. Change this to increase manager performances

View File

@ -17,14 +17,22 @@
</Directory>
# On-line documentation
Alias /doc/ __DOCDIR__
Alias /lib/ __DOCDIR__lib/
<Directory __DOCDIR__>
Alias /doc/ __DEFDOCDIR__
Alias /lib/ __DEFDOCDIR__lib/
<Directory __DEFDOCDIR__>
Require all granted
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
</Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ __FRDOCDIR__
<Directory __FRDOCDIR__>
Require all granted
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
</Directory>
# Perl script
# Note: to avoid manager stay in memory, we don't use ModPerl::Registry
# by default. Change this to increase manager performances

View File

@ -18,15 +18,24 @@
</Directory>
# On-line documentation
Alias /doc/ __DOCDIR__
Alias /lib/ __DOCDIR__lib/
<Directory __DOCDIR__>
Alias /doc/ __DEFDOCDIR__
Alias /lib/ __DEFDOCDIR__lib/
<Directory __DEFDOCDIR__>
Order allow,deny
Allow from all
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
</Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ __FRDOCDIR__
<Directory __FRDOCDIR__>
Order deny,allow
Allow from all
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
</Directory>
# Perl script
# Note: to avoid manager stay in memory, we don't use ModPerl::Registry
# by default. Change this to increase manager performances

3
debian/rules vendored
View File

@ -42,7 +42,8 @@ override_dh_auto_install:
DATADIR=$(LMVARDIR) \
APACHEUSER=www-data \
APACHEGROUP=www-data \
DOCDIR=/usr/share/doc/lemonldap-ng-doc
DEFDOCDIR=/usr/share/doc/lemonldap-ng-doc \
FRDOCDIR=/usr/share/doc/lemonldap-ng-fr-doc
$(MAKE) fr-doc
test -n "$$LOCALBUILD" || ./scripts/minifierjs $$(find debian/tmp/ -name '*.js')
test -n "$$LOCALBUILD" || ./scripts/minifiercss $$(find debian/tmp/ -name '*.css')

View File

@ -3,6 +3,7 @@ example/index.pl
example/mrtg/lmng-mrtg
example/mrtg/mrtg.cfg.example
example/notfound.html
example/notfoundfr.html
example/notifications.pl
example/scripts/lemonldap-ng-cli
example/scripts/lmConfigEditor

View File

@ -44,6 +44,7 @@ $template->param( TREE_JQUERYCSS => $manager->{managerTreeJqueryCss} );
$template->param( CSS => $manager->{managerCss} );
$template->param( CSS_THEME => $manager->{managerCssTheme} );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift $manager->{lang} );
print $manager->header('text/html; charset=utf-8');
print $template->output;

View File

@ -0,0 +1,10 @@
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Page non trouvée</title>
</head>
<body style="background:#FFF;text-align:center;">
<h1>Page non trouvée</h1>
<h2>Merci d'installer le paquet contenant la documentation française</h2>
</body>
</html>

View File

@ -1669,7 +1669,11 @@ function loadHelp(ch) {
}
// Display new help only if not the last help
if (ch != lasthelp) {
url = '/doc' + helpCh[ch];
if (lang == "fr") {
url = '/fr-doc' + helpCh[ch];
} else {
url = '/doc' + helpCh[ch];
}
var html = '<iframe src="' + url + '" frameborder="0" />';
$('#help_content').html(html);
lasthelp = ch;

View File

@ -38,13 +38,14 @@
var text4securedCookie0='<lang en="Non secured cookie" fr="Cookie non sécurisé"/>';
var text4securedCookie1='<lang en="Secured cookie (HTTPS)" fr="Cookie sécurisé (HTTPS)"/>';
var text4securedCookie2='<lang en="Double cookie (HTTP and HTTPS)" fr="Double cookie (HTTP et HTTPS)"/>';
var text4securedCookie3='<lang en="Double cookie for single session" fr="Double cookie pour une seule session"/>';
var text4securedCookie3='<lang en="Double cookie for single session" fr="Double cookie pour une seule session"/>';
var text4newGeneratedFile='<lang en="Password (optional)" fr="Mot de passe (optionnel)" />';
var text4edit='<lang en="Edit" fr="Éditer" />';
var text4protect='<lang en="Protect" fr="Protéger" />';
var text4newCategory='<lang en="Category identifier" fr="Identifiant de la catégorie" />';
var text4newApplication='<lang en="Application identifier" fr="Identifiant de l\'application" />';
var text4newCondition='<lang en="New Condition" fr="Nouvelle Condition" />';
var text4newCondition='<lang en="New Condition" fr="Nouvelle Condition" />';
var lang='<TMPL_VAR NAME="LANG">';
//]]></script>
<script src="<TMPL_VAR NAME="DIR">/js/manager.js" type="text/JavaScript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />