Opened 6 years ago

Closed 4 months ago

#1200 closed enhancement (wontfix)

Move from static to dynamic Link generation for missing rst files

Reported by: fgdrf Owned by: live-demo@…
Priority: normal Milestone: OSGeoLive11.0
Component: OSGeoLive Keywords: build sphinx
Cc:

Description

Situation:

  • Makefile down below doc folder creates symlinks for missing rst files in translation sub-folders
  • it scans the root directory and folders in the 2nd order (en/*/*)

Problem:

  • (possible) changes in the folder structure requires to change Makefile
  • new rst files (e.g. metrics.rst) in the first order down below the language are not considered and causes into http 404 Errors if the document is linked from somewhere

Solution:

the Make target link_to_en_docs should be more flexible and should analyse the current tree of sub-dirs.

START_DIR     = $(shell pwd)
ORIGIN_FILES  = $(shell find ./en -name "*.rst" -print)

[..]

link_to_en_docs:
        # For quickstart, standards and overview docs which have not been
        # translated, link to english doc
        for LANG in $(TRANSLATIONS) ; do \
          for DOC in $(ORIGIN_FILES) ; do \
            TRANSLATED_DOC=`echo $$DOC | sed -e"s/en/$$LANG/"` ; \
            TARGET_EN=`echo $$DOC | sed -e"s#^#../../#"` ; \
            if [ ! -f $$TRANSLATED_DOC ] ; then \
              rm -f $$TRANSLATED_DOC ; \
              ln -s $$TARGET_EN $$TRANSLATED_DOC ; \
            fi ; \
          done ; \
        done

Attachments (1)

Makefile.patch (2.4 KB) - added by fgdrf 6 years ago.

Download all attachments as: .zip

Change history (11)

Changed 6 years ago by fgdrf

Attachment: Makefile.patch added

comment:1 Changed 6 years ago by fgdrf

Cc: live-demo@… added

comment:2 Changed 6 years ago by hamish

Cc: live-demo@… removed

(cc to the mailing list is only needed if the ticket's "owner" has changed)

comment:3 Changed 6 years ago by hamish

Milestone: OSGeoLive7.0OSGeoLive8.0

comment:4 Changed 5 years ago by hamish

Milestone: OSGeoLive8.0OSGeoLive8.5

comment:5 Changed 5 years ago by kalxas

Milestone: OSGeoLive8.5OSGeoLive9.0

comment:6 Changed 4 years ago by kalxas

Milestone: OSGeoLive9.0OSGeoLive9.5

Ticket retargeted after milestone closed

comment:7 Changed 3 years ago by kalxas

Milestone: OSGeoLive9.5OSGeoLive10.0

Ticket retargeted after milestone closed

comment:8 Changed 3 years ago by kalxas

Milestone: OSGeoLive10.0OSGeoLive10.5

Ticket retargeted after milestone closed

comment:9 Changed 2 years ago by kalxas

Milestone: OSGeoLive10.5OSGeoLive11.0

Ticket retargeted after milestone closed

comment:10 Changed 4 months ago by kalxas

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.