Opened 11 years ago

Closed 5 years 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 11 years ago.

Download all attachments as: .zip

Change History (11)

by fgdrf, 11 years ago

Attachment: Makefile.patch added

comment:1 by fgdrf, 11 years ago

Cc: live-demo@… added

comment:2 by hamish, 11 years ago

Cc: live-demo@… removed

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

comment:3 by hamish, 11 years ago

Milestone: OSGeoLive7.0OSGeoLive8.0

comment:4 by hamish, 10 years ago

Milestone: OSGeoLive8.0OSGeoLive8.5

comment:5 by kalxas, 10 years ago

Milestone: OSGeoLive8.5OSGeoLive9.0

comment:6 by kalxas, 9 years ago

Milestone: OSGeoLive9.0OSGeoLive9.5

Ticket retargeted after milestone closed

comment:7 by kalxas, 9 years ago

Milestone: OSGeoLive9.5OSGeoLive10.0

Ticket retargeted after milestone closed

comment:8 by kalxas, 8 years ago

Milestone: OSGeoLive10.0OSGeoLive10.5

Ticket retargeted after milestone closed

comment:9 by kalxas, 8 years ago

Milestone: OSGeoLive10.5OSGeoLive11.0

Ticket retargeted after milestone closed

comment:10 by kalxas, 5 years ago

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