Skip to content

Commit

Permalink
Trimmed set of translations built by default.
Browse files Browse the repository at this point in the history
Only translations touched the last 12 months or where >= 2% of the strings
are translated according to Weblate get build rules in docs/src/Submakefile, and
only languages with >50% get Debian packages with the translations.  The new
guidelines are documented in docs/README.adoc.

The set of translations built and published on https://linuxcnc.org/docs/devel/html/
are now Arabic, German, Spanish, French, Norwegian Bokmål, Russian, Swedish, Turkish
and Simplified Chinese.  Hungarian and Vietnamese are no longer built.  Reduced the
list in index.html to the built ones.

Debian packages for French, Spanish and Simplified Chinese are no longer created.
  • Loading branch information
petterreinholdtsen committed Sep 21, 2023
1 parent 196fd2d commit e7a19a8
Show file tree
Hide file tree
Showing 16 changed files with 185 additions and 157 deletions.
50 changes: 0 additions & 50 deletions debian/control.docs.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,53 +27,3 @@ Description: motion controller for CNC machines and robots (English documentatio
applications (milling, cutting, routing, etc.).
.
This package contains the documentation in English.

Package: linuxcnc-doc-fr
Provides: linuxcnc-doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Breaks: linuxcnc-uspace (<= 2.9.0~pre0+git20220402.2500863908-4)
Replaces: linuxcnc-uspace (<= 2.9.0~pre0+git20220402.2500863908-4)
Recommends: xdg-utils
Suggests: pdf-viewer
Description: motion controller for CNC machines and robots (French documentation)
LinuxCNC is the next-generation Enhanced Machine Controller which
provides motion control for CNC machine tools and robotic
applications (milling, cutting, routing, etc.).
.
This package contains the documentation in French.

Package: linuxcnc-doc-es
Provides: linuxcnc-doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Breaks: linuxcnc-uspace (<= 2.9.0~pre0+git20220402.2500863908-4)
Replaces: linuxcnc-uspace (<= 2.9.0~pre0+git20220402.2500863908-4)
Recommends: xdg-utils
Suggests: pdf-viewer
Description: controlador de movimiento para máquinas CNC y robots (Español).
LinuxCNC es EMC (controlador de máquina mejorado) que proporciona
control de movimiento para máquinas herramientas CNC (fresado,
torneado, ruteado, etc.) y aplicaciones de robótica.
.
Este paquete contiene la documentación en español.

Package: linuxcnc-doc-zh-cn
Provides: linuxcnc-doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Recommends: xdg-utils
Suggests: pdf-viewer
Conflicts: linuxcnc-doc-cn
Replaces: linuxcnc-doc-cn
Description: motion controller for CNC machines and robots (Chinese
documentation)
LinuxCNC is the next-generation Enhanced Machine Controller which
provides motion control for CNC machine tools and robotic
applications (milling, cutting, routing, etc.).
.
This package contains the documentation in Chinese.

8 changes: 0 additions & 8 deletions debian/linuxcnc-doc-es.doc-base

This file was deleted.

9 changes: 0 additions & 9 deletions debian/linuxcnc-doc-es.docs

This file was deleted.

1 change: 0 additions & 1 deletion debian/linuxcnc-doc-es.install

This file was deleted.

4 changes: 0 additions & 4 deletions debian/linuxcnc-doc-es.lintian-overrides

This file was deleted.

9 changes: 0 additions & 9 deletions debian/linuxcnc-doc-fr.doc-base

This file was deleted.

6 changes: 0 additions & 6 deletions debian/linuxcnc-doc-fr.docs

This file was deleted.

1 change: 0 additions & 1 deletion debian/linuxcnc-doc-fr.install

This file was deleted.

4 changes: 0 additions & 4 deletions debian/linuxcnc-doc-fr.lintian-overrides

This file was deleted.

6 changes: 0 additions & 6 deletions debian/linuxcnc-doc-zh-cn.docs

This file was deleted.

1 change: 0 additions & 1 deletion debian/linuxcnc-doc-zh-cn.install

This file was deleted.

4 changes: 0 additions & 4 deletions debian/linuxcnc-doc-zh-cn.lintian-overrides

This file was deleted.

15 changes: 5 additions & 10 deletions debian/rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,12 @@ override_dh_installdocs-indep:
dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-en
mv debian/linuxcnc-doc-en/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-en/usr/share/doc/linuxcnc

dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-es
mv debian/linuxcnc-doc-es/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-es/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_es.html
mv debian/linuxcnc-doc-es/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-es/usr/share/doc/linuxcnc
# Remove files for translations created where we do not want Debian packages.
for l in ar es fr ru zh_CN; do \
$(RM) debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \
done
$(RM) debian/tmp/usr/share/doc/linuxcnc/*_es.adoc

dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-fr
mv debian/linuxcnc-doc-fr/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-fr/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_fr.html
mv debian/linuxcnc-doc-fr/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-fr/usr/share/doc/linuxcnc

dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-zh-cn
mv debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_zh_CN.html
mv debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-zh-cn/usr/share/doc/linuxcnc


override_dh_compress:
Expand Down
13 changes: 12 additions & 1 deletion docs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,18 @@ the translation level raise to a sensible level (for example not 0%),
build rules need to be added to use the generated translations to
build HTML and PDF editions of the translation.

Add the new language code to the proper place in docs/po4a.cfg.
At the moment, build rules are created for languages with more than 2
percent translated
link:https://hosted.weblate.org/projects/linuxcnc/linuxcnc-docs/[according
to Weblate] or which have been updated the last 12 months according to
the PO-Revision-Date field in docs/po/*.po. Documentaion packages for
Debian are build for languages with more than 50 percent translation.
This ensure translators and proof readers can see the result of their
effort on https://linuxcnc.org/docs/devel/html/, while we limit the
time spent building translations to those that are actively worked on
or at least have a very the bare minimum translated.

Add the new language code to the [po4a_langs] section of docs/po4a.cfg.
Update build rules for the new language in `docs/src/Submakefile`.

Edit debian/control.in to add the new linuxcnc-doc-$NEWLANG package.
Expand Down
Loading

0 comments on commit e7a19a8

Please sign in to comment.