Commit 1ed0ab11 authored by Xavier Guimard's avatar Xavier Guimard

Remove doc translation system (#1445)

parent d2acdd3e
...@@ -62,7 +62,6 @@ MANAGERRELATIVESTATICDIR=/static ...@@ -62,7 +62,6 @@ MANAGERRELATIVESTATICDIR=/static
MANAGERTEMPLATESDIR=$(MANAGERSITEDIR)/templates MANAGERTEMPLATESDIR=$(MANAGERSITEDIR)/templates
DOCDIR=$(DOCUMENTROOT) DOCDIR=$(DOCUMENTROOT)
DEFDOCDIR=$(DOCUMENTROOT)/doc DEFDOCDIR=$(DOCUMENTROOT)/doc
FRDOCDIR=$(DOCUMENTROOT)/fr-doc
TESTDIR=$(DOCUMENTROOT)/test TESTDIR=$(DOCUMENTROOT)/test
EXAMPLESDIR=$(LMPREFIX)/examples EXAMPLESDIR=$(LMPREFIX)/examples
TOOLSDIR=$(LMPREFIX)/tools TOOLSDIR=$(LMPREFIX)/tools
...@@ -275,10 +274,6 @@ all: configure common handler manager portal ...@@ -275,10 +274,6 @@ all: configure common handler manager portal
@echo " - install_doc_site ($(DEFDOCDIR))" @echo " - install_doc_site ($(DEFDOCDIR))"
@echo " - install_examples_site ($(EXAMPLESDIR))" @echo " - install_examples_site ($(EXAMPLESDIR))"
@echo @echo
@echo "Other languages documentation (fr only for now)"
@echo " - fr-doc (needs OmegaT)"
@echo " - install_fr_doc_site"
@echo
# Configure targets # Configure targets
# ----------------- # -----------------
...@@ -400,7 +395,6 @@ prepare_test_server: ...@@ -400,7 +395,6 @@ prepare_test_server:
MANAGERSTATICDIR=`pwd`/$(SRCMANAGERDIR)/site/htdocs/static \ MANAGERSTATICDIR=`pwd`/$(SRCMANAGERDIR)/site/htdocs/static \
TESTDIR=`pwd`/e2e-tests/conf/site \ TESTDIR=`pwd`/e2e-tests/conf/site \
DEFDOCDIR=`pwd`/doc \ DEFDOCDIR=`pwd`/doc \
FRDOCDIR=`pwd`/po-doc/fr \
SBINDIR=`pwd`/e2e-tests/conf/sbin \ SBINDIR=`pwd`/e2e-tests/conf/sbin \
INITDIR=`pwd`/e2e-tests/conf/init \ INITDIR=`pwd`/e2e-tests/conf/init \
ETCDEFAULTDIR=`pwd`/e2e-tests/conf/def ETCDEFAULTDIR=`pwd`/e2e-tests/conf/def
...@@ -726,7 +720,7 @@ install_webserver_conf: ...@@ -726,7 +720,7 @@ install_webserver_conf:
s#__FASTCGISOCKDIR__#$(FASTCGISOCKDIR)#g; \ s#__FASTCGISOCKDIR__#$(FASTCGISOCKDIR)#g; \
s#__VHOSTLISTEN__#$(VHOSTLISTEN)#g; \ s#__VHOSTLISTEN__#$(VHOSTLISTEN)#g; \
s#__DEFDOCDIR__#$(DEFDOCDIR)/#g; \ s#__DEFDOCDIR__#$(DEFDOCDIR)/#g; \
s#__FRDOCDIR__#$(FRDOCDIR)/#g;' $(RCONFDIR)/*apache*.conf $(RCONFDIR)/*nginx*.conf ' $(RCONFDIR)/*apache*.conf $(RCONFDIR)/*nginx*.conf
install_manager_site: install_conf_dir install_manager_site: install_conf_dir
# Manager install # Manager install
...@@ -970,7 +964,7 @@ ubuntu-install-for-nginx: ...@@ -970,7 +964,7 @@ ubuntu-install-for-nginx:
distclean: clean distclean: clean
clean: common_clean handler_clean portal_clean manager_clean omegat-clean stop_web_server clean: common_clean handler_clean portal_clean manager_clean stop_web_server
@rm -f $$(find */ -name '*bak' -delete) @rm -f $$(find */ -name '*bak' -delete)
@rm -rf doc/devel @rm -rf doc/devel
@rm -vf *gz *zip @rm -vf *gz *zip
...@@ -1122,74 +1116,6 @@ tidy-js: clean ...@@ -1122,74 +1116,6 @@ tidy-js: clean
-print \ -print \
-exec js_beautify -o -s=2 {} \; -exec js_beautify -o -s=2 {} \;
# Translation targets
# -------------------
language_code = perl -e ' \
print { \
fr=> "FR-FR", \
}->{$(1)}'
test_omegat_%_dir:
@if [ ! -d omegat.files/$* ]; then \
echo "omegat.files/$* does not exist"; \
exit 1; \
fi
omegat-configuration-file:
-@mkdir -p po-doc/$(LANGCODE)/pages
@perl -pe 'BEGIN{$$p=`pwd`;chomp $$p;}s/__LANG__/$(OMEGATCODE)/;s/__PWD__/$$p/o;' omegat.files/_base.project >omegat.files/$(LANGCODE)/omegat.project
@mkdir -p omegat.files/$(LANGCODE)/{tm glossary dictionary}
translation: omegat-configuration-file
@omegat omegat.files/$(LANGCODE) --no-team --quiet
translated-doc: omegat-configuration-file
@omegat omegat.files/$(LANGCODE) --mode=console-translate --quiet 2>/dev/null
# 2. Public targets
%-translation: test_omegat_%_dir omegat-%-clean
@$(MAKE) translation LANGCODE=$* OMEGATCODE=`$(call language_code,$*)`
%-doc: test_omegat_%_dir omegat-%-clean
@mkdir -p po-doc/$*
@$(MAKE) translated-doc LANGCODE=$* OMEGATCODE=`$(call language_code,$*)`
omegat-clean:
@rm -rf omegat.files/*/omegat.project omegat.files/*/omegat/project_save*.bak omegat.files/*/omegat/last_entry.properties
omegat-%-clean:
@rm -rf po-doc/$*
install_%_doc_site:
@rm -rf $(RDOCDIR)/$*-doc || true
# Install doc directories
@install -v -d -m 755 $(RDOCDIR)/$*-doc
@cd po-doc/$* && find * -type d |(cd $(RDOCDIR)/$*-doc; xargs install -v -d -m 755) && cd -
# Install HTML files
@cd po-doc/$* && for f in `find * -type f -name '*.html'`; do \
echo "Installing $$f"; \
../../scripts/transform-templates \
usedebianlibs $(USEDEBIANLIBS) \
useexternallibs $(USEEXTERNALLIBS) \
jsminified $(JSCOMPRESS) \
cssminified $(CSSCOMPRESS) <$$f \
> $(RDOCDIR)/$*-doc/$$f; \
done && cd -
# Install other files
@cd po-doc/$* && for f in `find * -type f ! -name '*.html'`; do \
install -v -m 644 $$f $(RDOCDIR)/$*-doc/$$f; \
done && cd -
# Install symlinks (no symlinks)
@#cd po-doc/$* && tar cf - `find * -type l` | tar xvf - -C $(RDOCDIR)/$*-doc && cd -
# Remove js
@cd $(RDOCDIR)/$*-doc && if test "$(USEEXTERNALLIBS)" = "yes"; then \
rm -rvf $(DOCEXTERNALLIBS); \
elif test "$(USEDEBIANLIBS)" = "yes"; then \
rm -rvf $(DOCLIBSTOREMOVEFORDEBIAN); \
fi && cd -
html_spelling: html_spelling:
@for i in $$(find doc/ -type f -name '*.html'); do \ @for i in $$(find doc/ -type f -name '*.html'); do \
text=$$(html2text $$i|spellintian --picky); \ text=$$(html2text $$i|spellintian --picky); \
......
...@@ -29,12 +29,6 @@ Before release ...@@ -29,12 +29,6 @@ Before release
$ make documentation $ make documentation
- Translate documentation
$ make fr-doc
With recent versions of OmegaT, launch "make fr-translation" and choose
"generate project files"
- Update changelog: - Update changelog:
$ ./scripts/generate-changelog.pl $ ./scripts/generate-changelog.pl
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$" # RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# REST URLs # REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib|javascript|favicon).*" RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT] RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 2) FastCGI engine # 2) FastCGI engine
...@@ -87,15 +87,6 @@ ...@@ -87,15 +87,6 @@
DirectoryIndex index.html start.html DirectoryIndex index.html start.html
</Directory> </Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ __FRDOCDIR__
<Directory __FRDOCDIR__>
Require all granted
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only # Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000 #Header set Strict-Transport-Security 15768000
</VirtualHost> </VirtualHost>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$" # RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# REST URLs # REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib|javascript|favicon).*" RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT] RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 2) FastCGI engine # 2) FastCGI engine
...@@ -106,21 +106,6 @@ ...@@ -106,21 +106,6 @@
DirectoryIndex index.html start.html DirectoryIndex index.html start.html
</Directory> </Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ __FRDOCDIR__
<Directory __FRDOCDIR__>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only # Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000 #Header set Strict-Transport-Security 15768000
</VirtualHost> </VirtualHost>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$" # RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# REST URLs # REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib|javascript|favicon).*" RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT] RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 2) FastCGI engine # 2) FastCGI engine
...@@ -90,16 +90,6 @@ ...@@ -90,16 +90,6 @@
DirectoryIndex index.html start.html DirectoryIndex index.html start.html
</Directory> </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
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only # Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000 #Header set Strict-Transport-Security 15768000
</VirtualHost> </VirtualHost>
...@@ -5,7 +5,7 @@ server { ...@@ -5,7 +5,7 @@ server {
# Use "lm_app" format to get username in nginx.log (see nginx-lmlog.conf) # Use "lm_app" format to get username in nginx.log (see nginx-lmlog.conf)
#access_log /var/log/nginx/portal.log lm_app; #access_log /var/log/nginx/portal.log lm_app;
if ($uri !~ ^/(.*\.psgi|static|doc|fr-doc|lib|javascript|favicon)) { if ($uri !~ ^/(.*\.psgi|static|doc|lib|javascript|favicon)) {
rewrite ^/(.*)$ /manager.psgi/$1 break; rewrite ^/(.*)$ /manager.psgi/$1 break;
} }
...@@ -44,10 +44,6 @@ server { ...@@ -44,10 +44,6 @@ server {
location /lib/ { location /lib/ {
alias __DEFDOCDIR__pages/documentation/current/lib/; alias __DEFDOCDIR__pages/documentation/current/lib/;
} }
location /fr-doc/ {
alias __FRDOCDIR__;
index index.html start.html;
}
location /static/ { location /static/ {
alias __MANAGERSTATICDIR__; alias __MANAGERSTATICDIR__;
} }
......
...@@ -92,24 +92,6 @@ Description: Lemonldap::NG Web-SSO system documentation ...@@ -92,24 +92,6 @@ Description: Lemonldap::NG Web-SSO system documentation
. .
This package contains html documentation. This package contains html documentation.
Package: lemonldap-ng-fr-doc
Architecture: all
Section: doc
Depends: ${misc:Depends},
lemonldap-ng-doc (= ${binary:Version})
Description: French documentation of Lemonldap::NG Web-SSO system
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application webservers. It can be used in conjunction with
OpenID-Connect, CAS and SAML systems as identity or service provider. It can
also be used as proxy between those federation systems.
.
It manages both authentication and authorization and provides headers for
accounting. So you can have a full AAA protection. Authorization are built by
associating a regular expression and a rule. Regular expression is applied on
the requested URL and the rule calculates if the user is authorized.
.
This package contains French html documentation.
Package: lemonldap-ng-handler Package: lemonldap-ng-handler
Architecture: all Architecture: all
Depends: ${misc:Depends}, Depends: ${misc:Depends},
......
Document: lemonldap-ng-fr-doc
Title: Lemonldap::NG French documentation
Author: Xavier Guimard
Abstract: Those HTML documents contains all Lemonldap::NG documentation
imported from https://lemonldap-ng.org translated in French
Section: Web Development
Format: HTML
Index: /usr/share/doc/lemonldap-ng-fr-doc/index.html
Files: /usr/share/doc/lemonldap-ng-fr-doc/*.html
debian/tmp/usr/share/doc/lemonldap-ng-fr-doc/fr-doc/*
...@@ -47,23 +47,12 @@ override_dh_auto_install: ...@@ -47,23 +47,12 @@ override_dh_auto_install:
APACHEUSER=www-data \ APACHEUSER=www-data \
APACHEGROUP=www-data \ APACHEGROUP=www-data \
DEFDOCDIR=/usr/share/doc/lemonldap-ng-doc \ DEFDOCDIR=/usr/share/doc/lemonldap-ng-doc \
FRDOCDIR=/usr/share/doc/lemonldap-ng-fr-doc \
UWSGIYAMLDIR=/etc/uwsgi/apps-available \ UWSGIYAMLDIR=/etc/uwsgi/apps-available \
PROD=yes PROD=yes
$(MAKE) install_fr_doc_site \
DESTDIR=$(CURDIR)/debian/tmp \
DOCDIR=/usr/share/doc/lemonldap-ng-fr-doc \
PROD=yes
for i in handler portal manager test; do \ for i in handler portal manager test; do \
mv $(TMP)/etc/lemonldap-ng/$$i-apache2.X.conf $(TMP)/etc/lemonldap-ng/$$i-apache2.conf; \ mv $(TMP)/etc/lemonldap-ng/$$i-apache2.X.conf $(TMP)/etc/lemonldap-ng/$$i-apache2.conf; \
done done
override_dh_link:
rm -rf debian/lemonldap-ng-fr-doc/usr/share/doc/lemonldap-ng-fr-doc/pages/documentation/current/documentation \
debian/lemonldap-ng-fr-doc/usr/share/doc/lemonldap-ng-fr-doc/pages/documentation/current/icons \
debian/lemonldap-ng-fr-doc/usr/share/doc/lemonldap-ng-fr-doc/pages/documentation/current/lib
dh_link
override_dh_compress: override_dh_compress:
dh_compress -X favicon.ico dh_compress -X favicon.ico
......
...@@ -40,9 +40,6 @@ my $manager = builder { ...@@ -40,9 +40,6 @@ my $manager = builder {
enable "Plack::Middleware::Static", enable "Plack::Middleware::Static",
path => '^/lib/', path => '^/lib/',
root => 'doc/pages/documentation/current/'; root => 'doc/pages/documentation/current/';
enable "Plack::Middleware::Static",
path => '^/fr-doc/',
root => 'po-doc/';
Lemonldap::NG::Manager->run( {} ); Lemonldap::NG::Manager->run( {} );
}; };
......
...@@ -39,9 +39,6 @@ my $manager = builder { ...@@ -39,9 +39,6 @@ my $manager = builder {
enable "Plack::Middleware::Static", enable "Plack::Middleware::Static",
path => '^/lib/', path => '^/lib/',
root => '__DEFDOCDIR__pages/documentation/current/'; root => '__DEFDOCDIR__pages/documentation/current/';
enable "Plack::Middleware::Static",
path => '^/fr-doc/',
root => '__FRDOCDIR__../';
Lemonldap::NG::Manager->run( {} ); Lemonldap::NG::Manager->run( {} );
}; };
......
{ {
"/doc/":"/fr-doc/", "/doc/":"/doc/",
"_auth":"Authentification", "_auth":"Authentification",
"_authChoice":"Choix d'authentification", "_authChoice":"Choix d'authentification",
"_idp":"Identifiant d'entité de l'IDP", "_idp":"Identifiant d'entité de l'IDP",
......
<?xml version="1.0" encoding="UTF-8" ?>
<omegat>
<project version="1.0">
<source_dir>__PWD__/doc/</source_dir>
<target_dir>__PWD__/po-doc/fr/</target_dir>
<tm_dir>__DEFAULT__</tm_dir>
<glossary_dir>__DEFAULT__</glossary_dir>
<dictionary_dir>__DEFAULT__</dictionary_dir>
<source_lang>EN-US</source_lang>
<target_lang>__LANG__</target_lang>
<sentence_seg>true</sentence_seg>
</project>
</omegat>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
fr
\ No newline at end of file
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Documentation hors-ligne de LemonLDAP::NG</title>
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css"/>
</head>
<body>
<div class="container text-center">
<h1>Documentation hors-ligne de LemonLDAP::NG</h1>
<hr />
<a href="pages/documentation/current/start.html" class="btn btn-lg btn-primary">Documentation</a>
</div>
</body>
</html>