diff options
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 2 | ||||
| -rw-r--r-- | lib/sisu/v5/dal_expand_insertions.rb | 28 | ||||
| -rw-r--r-- | lib/sisu/v5/html.rb | 4 | ||||
| -rw-r--r-- | lib/sisu/v5/html_minitoc.rb | 4 | ||||
| -rw-r--r-- | lib/sisu/v5/html_segments.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v5/manifest.rb | 22 | ||||
| -rw-r--r-- | lib/sisu/v5/sysenv.rb | 367 | 
7 files changed, 159 insertions, 270 deletions
| diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 044dd614..2066428b 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.10.orig.tar.xz    sisu_5.0.10.orig.tar.xz    sisu_5.0.10-1.dsc +* output structure by, multilingual, monolingual filenames tweak +  %% 5.0.9.orig.tar.xz (2013-08-01:30/4)  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.9  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.9-1 diff --git a/lib/sisu/v5/dal_expand_insertions.rb b/lib/sisu/v5/dal_expand_insertions.rb index d0595482..d85910aa 100644 --- a/lib/sisu/v5/dal_expand_insertions.rb +++ b/lib/sisu/v5/dal_expand_insertions.rb @@ -111,7 +111,7 @@ module SiSU_DAL_Insertions      def by_language(linked_doc,lng,src=nil)        @linked_doc,@lng,@src=linked_doc,lng,src        @base_path="#{@md.file.output_path.base.url}/#{@lng}" -      def fnh(ft) +      def fnh          {            fn: @linked_doc,            ft: ft, @@ -121,15 +121,15 @@ module SiSU_DAL_Insertions          "#{@base_path}/#{pth}/#{fn}"        end        def manifest -        fn=@md.file.base_filename.manifest(fnh(Sfx[:html])) +        fn=@md.file.base_filename.manifest(fnh)          path_and_file(fn,'manifest')        end        def html_toc -        fn=@md.file.base_filename.html_segtoc(fnh(Sfx[:html])) +        fn=@md.file.base_filename.html_segtoc(fnh)          "#{@base_path}/html/#{@linked_doc}/#{fn}"        end        def html_doc -        fn=@md.file.base_filename.html_scroll(fnh(Sfx[:html])) +        fn=@md.file.base_filename.html_scroll(fnh)          path_and_file(fn,'html')        end        def html_concordance @@ -137,39 +137,39 @@ module SiSU_DAL_Insertions          "#{@base_path}/html/#{@linked_doc}/#{fn}"        end        def epub -        fn=@md.file.base_filename.epub(fnh(Sfx[:epub])) +        fn=@md.file.base_filename.epub(fnh)          path_and_file(fn,'epub')        end        def pdf_landscape -        fn=@md.file.base_filename.pdf_l_a4(fnh(Sfx[:pdf])) +        fn=@md.file.base_filename.pdf_l_a4(fnh)          path_and_file(fn,'pdf')        end        def pdf_portrait -        fn=@md.file.base_filename.pdf_p_a4(fnh(Sfx[:pdf])) +        fn=@md.file.base_filename.pdf_p_a4(fnh)          path_and_file(fn,'pdf')        end        def odt -        fn=@md.file.base_filename.odt(fnh(Sfx[:odt])) +        fn=@md.file.base_filename.odt(fnh)          path_and_file(fn,'odt')        end        def xhtml -        fn=@md.file.base_filename.xhtml(fnh(Sfx[:xhtml])) +        fn=@md.file.base_filename.xhtml(fnh)          path_and_file(fn,'xhtml')        end        def xml_sax -        fn=@md.file.base_filename.xml_sax(fnh(Sfx[:xml_sax])) +        fn=@md.file.base_filename.xml_sax(fnh)          path_and_file(fn,'xml_sax')        end        def xml_dom -        fn=@md.file.base_filename.xml_dom(fnh(Sfx[:xml_dom])) +        fn=@md.file.base_filename.xml_dom(fnh)          path_and_file(fn,'xml_dom')        end        def txt -        fn=@md.file.base_filename.txt(fnh(Sfx[:txt])) +        fn=@md.file.base_filename.txt(fnh)          path_and_file(fn,'txt')        end        def digest -        fn=@md.file.base_filename.hash_digest(fnh(Sfx[:txt])) +        fn=@md.file.base_filename.hash_digest(fnh)          path_and_file(fn,'digest')        end        def source @@ -186,7 +186,6 @@ module SiSU_DAL_Insertions        def fnh          {            fn: @linked_doc, -          lng: ".#{@lng}"          }        end        def path_and_file(fn,pth) @@ -258,7 +257,6 @@ module SiSU_DAL_Insertions        def fnh          {            fn: @linked_doc, -          lng: ".#{@lng}"          }        end        def path_and_file(fn) diff --git a/lib/sisu/v5/html.rb b/lib/sisu/v5/html.rb index f7e2b813..753d34b8 100644 --- a/lib/sisu/v5/html.rb +++ b/lib/sisu/v5/html.rb @@ -420,7 +420,6 @@ WOK          if dob.ln ==4            fnh={              fn: dob.name, -            lng: @md.lang_code_insert            }            f=@md.file.base_filename.html_seg(fnh)            seg_link=%{  <a href="#{f}" target="_top"> @@ -431,7 +430,6 @@ WOK            fn,hd=/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/.match(dob.obj)[1,2]            fnh={              fn: fn, -            lng: @md.lang_code_insert            }            f=@md.file.base_filename.html_seg(fnh)            seg_link=%{<a href="#{f}" target="_top">#{fn} #{hd}</a> } @@ -470,7 +468,6 @@ WOK          and ocn !~/#/            fnh={              fn: @@seg_url, -            lng: @md.lang_code_insert            }            f=@md.file.base_filename.html_seg(fnh)            p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) @@ -496,7 +493,6 @@ WOK          and ocn !~/#/            fnh={              fn: @@seg_url, -            lng: @md.lang_code_insert            }            f=@md.file.base_filename.html_seg(fnh)            p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn) diff --git a/lib/sisu/v5/html_minitoc.rb b/lib/sisu/v5/html_minitoc.rb index fcbffc73..c59537d9 100644 --- a/lib/sisu/v5/html_minitoc.rb +++ b/lib/sisu/v5/html_minitoc.rb @@ -155,7 +155,6 @@            if txt.ln ==4              fnh={                fn: txt.name, -              lng: @md.lang_code_insert              }              f=@md.file.base_filename.html_seg(fnh)              seg_link=%{  <a href="#{f}" target="_top"> @@ -166,7 +165,6 @@              fn,hd=/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/.match(dob.obj)[1,2]              fnh={                fn: fn, -              lng: @md.lang_code_insert              }              f=@md.file.base_filename.html_seg(fnh)              seg_link=%{<a href="#{f}" target="_top">#{fn} #{hd}</a> } @@ -186,7 +184,6 @@          end          fnh={            fn: @@seg_url, -          lng: @md.lang_code_insert          }          f=@md.file.base_filename.html_seg(fnh)          lnk_n_txt=%{  <a href="#{f}##{txt.ocn}"> @@ -206,7 +203,6 @@          end          fnh={            fn: @@seg_url, -          lng: @md.lang_code_insert          }          f=@md.file.base_filename.html_seg(fnh)          lnk_n_txt=%{  <a href="#{f}##{txt.ocn}"> diff --git a/lib/sisu/v5/html_segments.rb b/lib/sisu/v5/html_segments.rb index ec604327..9e555ad0 100644 --- a/lib/sisu/v5/html_segments.rb +++ b/lib/sisu/v5/html_segments.rb @@ -275,7 +275,6 @@ module SiSU_HTML_Seg                  SiSU_HTML_Seg::Seg.new(@md).tail                  fnh={                    fn: @@seg_name_html[tracking-1], -                  lng: @md.lang_code_insert                  }                  fn=@md.file.base_filename.html_seg(fnh)                  segfilename="#{@file.output_path.html_seg.dir}/#{fn}" @@ -305,7 +304,6 @@ module SiSU_HTML_Seg                 if @@seg_name_html[tracking] =='metadata' # this is for metadata                   fnh={                     fn: @@seg_name_html[tracking], -                   lng: @md.lang_code_insert                   }                   fn=@md.file.base_filename.html_seg(fnh)                   segfilename="#{@file.output_path.html_seg.dir}/#{fn}" diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb index 10cca358..4a234d61 100644 --- a/lib/sisu/v5/manifest.rb +++ b/lib/sisu/v5/manifest.rb @@ -176,27 +176,29 @@ module SiSU_Manifest          mp,mn,mt,mr=nil,nil,nil,nil          ln=SiSU_i18n::Languages.new.language.list          Px[:lng_lst].each do |lc| +          lngc=SiSU_Env::FilenameLanguageCodeInsert.new(@md.opt,lc).language_code_insert +          fnh={ +             fn: @md.fnb, +             lng: lngc, +          } +          mn=@f.base_filename.manifest(fnh)            if @o_str.dump_or_redirect? #does not work for --redirect or --dump              mp="#{@f.output_path.base.dir}" -            mn="#{@md.fnb}.html"              mt="#{mp}/#{mn}"              mr="../../#{lc}/manifest/#{mn}"              mu="#{url}/#{mn}"            elsif @f.output_dir_structure.by_language_code?              mp="#{@f.output_path.base.dir}/#{lc}/manifest" -            mn="#{@md.fnb}.html"              mt="#{mp}/#{mn}"              mr="../../#{lc}/manifest/#{mn}"              mu="#{url}/#{lc}/manifest/#{mn}"            elsif @f.output_dir_structure.by_filetype?              mp="#{@f.output_path.base.dir}/manifest" -            mn="#{@md.fnb}.#{lc}.html"              mt="#{mp}/#{mn}"              mr=mn              mu="#{url}/manifest/#{mn}"            else              mp="#{@f.output_path.base.dir}/#{@md.fnb}" -            mn="sisu_manifest.#{lc}.html"              mt="#{mp}/#{mn}"              mr=mn              mu="#{url}/#{mn}" @@ -211,18 +213,16 @@ module SiSU_Manifest          @m=@m.uniq        end        def languages(id,file) -        flv=published_manifests?          @manifest[:html] << %{<tr><th class="left"><div id="horizontal_links"><ul id="horizontal">\n} -        flv.each do |l| +        published_manifests?.each do |l|            SiSU_Translate::Source.new(@md,@language,l[:n]).language_list            @manifest[:txt] << "#{l[:mu]} #{l[:l]}\n"            @manifest[:html] << %{<li class="norm"><a href="#{l[:rel]}">#{l[:l]}</a>   </li>}          end          @manifest[:html] << %{</ul></div></th></tr>\n}        end -      def published_languages(id,file) -        flv=published_manifests? -        flv.each do |l| +      def published_languages(id) +        published_manifests?.each do |l|            @manifest[:txt] << "#{l[:mu]} #{l[:l]}\n"            @manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:mu]}">#{l[:l]}</a></p></th><td><p class="norm">#{l[:l]}</p><p class="tiny">#{@brace_url.xml_open}<a href="#{l[:mu]}">#{l[:mu]}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right"> </p></td></tr>\n}          end @@ -445,8 +445,8 @@ module SiSU_Manifest        end        def language_versions          if FileTest.file?(@f.place_file.manifest.dir)==true -          id,file='Markup (SiSU source)',@md.fns -          published_languages(id,file) +          id='Markup (SiSU source)' +          published_languages(id)          end        end        def qrc_image diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 5ea84832..5993a333 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -447,11 +447,9 @@ module SiSU_Env          if (@rc['language_default'].is_a?(String)) \          && (@rc['language_default'] =~/#{Px[:lng_lst_rgx]}/)            @rc['language_default'] -        else -          'en' +        else 'en'          end -      else -        'en' +      else 'en'        end      end      def mono_multi_lingual? @@ -463,8 +461,7 @@ module SiSU_Env          elsif  (@rc['lingual'].is_a?(String)) \          && (@rc['lingual'] =~/multi(?:lingual)?/)            :multi -        else -          :multi +        else :multi          end        else :multi        end @@ -4662,12 +4659,8 @@ WOK      def base_filename        def i18n(f)          f=default_hash.merge(f) -        (@md.opt.act[:i18n][:set]==:mono \ -        || ((mono_multi_lingual? ==:mono)) \ -        && (@md.opt.lng == default_language?)) \ -        || f[:lng]==nil \ -        ? f[:fn] + f[:ft] -        : f[:fn] + f[:lng] + f[:ft] +        f[:lng] ||=@md.lang_code_insert +        f[:fn] + f[:lng] + f[:ft]        end        def default_hash          { @@ -4689,44 +4682,41 @@ WOK            }          end        end +      def lang_code?(lng) +        (output_dir_structure.by_language_code?) \ +        ? '' +        : (lng ||=@md.lang_code_insert) +      end        def txt(fh=nil)          fh=default_hash_build(fh,Sfx[:txt]) -        fnh=if output_dir_structure.by_language_code? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], +            fn: 'plain',              ft: fh[:ft], +            lng: fh[:lng],             } -         elsif output_dir_structure.by_filetype? +         else            {              fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } -        else -          { -            fn: 'plain', -            ft: fh[:ft], -            lng: fh[:lng], -          }          end          i18n(fnh)        end        def html_scroll(fh=nil)          fh=default_hash_build(fh,Sfx[:html]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], +            fn: 'scroll',              ft: fh[:ft],              lng: fh[:lng],            }          else            { -            fn: 'scroll', +            fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } @@ -4735,18 +4725,12 @@ WOK        end        def html_seg_index(fh=nil)          fh=default_hash_build(fh,Sfx[:html]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: 'index', -            ft: fh[:ft], -          } -        else -          { -            fn: 'index', -            ft: fh[:ft], -            lng: fh[:lng], -          } -        end +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: 'index', +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end        def html_segtoc(fh=nil) @@ -4756,130 +4740,97 @@ WOK              fn: fh[:fn] + '.toc',              ft: fh[:ft],            } -        elsif output_dir_structure.by_language_code? -          { -            fn: 'toc', -            ft: fh[:ft], -          }          else            {              fn: 'toc',              ft: fh[:ft], -            lng: fh[:lng], +            lng: lang_code?(fh[:lng]),            }          end          i18n(fnh)        end        def html_seg(fh)          fh=default_hash_build(fh,Sfx[:html]) -        fnh=if output_dir_structure.by_language_code? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], -            ft: fh[:ft] -          } -        elsif output_dir_structure.by_filetype? -          { -            fn: fh[:fn], +            fn: 'scroll',              ft: fh[:ft], -            lng: fh[:lng] +            lng: fh[:lng],            }          else            { -            fn: 'scroll', +            fn: fh[:fn],              ft: fh[:ft], -            lng: fh[:lng] +            lng: fh[:lng],            }          end          i18n(fnh)        end -      def html_book_index -        ft=Sfx[:html] -        fnh=if output_dir_structure.by_language_code? -          { -            fn: 'book_index', -            ft: ft, -          } -        else -          { -            fn: 'book_index', -            ft: ft, -            lng: @md.lang_code_insert -          } -        end +      def html_book_index(fh=nil) +        fh=default_hash_build(fh,Sfx[:html]) +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: 'book_index', +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end -      def html_concordance -        ft=Sfx[:html] +      def html_concordance(fh=nil) +        fh=default_hash_build(fh,Sfx[:html]) +        fh[:lng]=lang_code?(fh[:lng])          fnh=if output_dir_structure.dump_or_redirect?            @md.fnb + '.concordance' + ft -        elsif output_dir_structure.by_language_code? -          { -            fn: 'concordance', -            ft: ft, -          }          else            {              fn: 'concordance', -            ft: ft, -            lng: @md.lang_code_insert +            ft: fh[:ft], +            lng: fh[:lng],            }          end          i18n(fnh)        end        def xhtml(fh=nil)          fh=default_hash_build(fh,Sfx[:xhtml]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], +            fn: 'scroll',              ft: fh[:ft], -            lng: fh[:lng] +            lng: fh[:lng],            }          else            { -            fn: 'scroll', +            fn: fh[:fn],              ft: fh[:ft], -            lng: fh[:lng] +            lng: fh[:lng],            }          end          i18n(fnh)        end        def epub(fh=nil)          fh=default_hash_build(fh,Sfx[:epub]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        else -          { -            fn: fh[:fn], -            ft: fh[:ft], -            lng: fh[:lng], -          } -        end +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: fh[:fn], +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end        def odt(fh=nil)          fh=default_hash_build(fh,Sfx[:odt]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], +            fn: 'opendocument',              ft: fh[:ft],              lng: fh[:lng],            }          else            { -            fn: 'opendocument', +            fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } @@ -4888,20 +4839,16 @@ WOK        end        def xml_sax(fh=nil)          fh=default_hash_build(fh,Sfx[:xml_sax]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], +            fn: 'scroll',              ft: fh[:ft],              lng: fh[:lng],            }          else            { -            fn: 'scroll', +            fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } @@ -4910,20 +4857,16 @@ WOK        end        def xml_dom(fh=nil)          fh=default_hash_build(fh,Sfx[:xml_dom]) -        fnh=if output_dir_structure.by_language_code? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? -          { -            fn: fh[:fn], +            fn: 'scroll',              ft: fh[:ft],              lng: fh[:lng],            }          else            { -            fn: 'scroll', +            fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } @@ -4932,25 +4875,20 @@ WOK        end        def pdf_p(fh=nil)          fh=default_hash_build(fh,Sfx[:pdf]) -        if output_dir_structure.by_language_code? -          fh[:fn] + '.portrait.' +        fh[:lng]=lang_code?(fh[:lng]) +        if output_dir_structure.by_filename? +          'portrait' + fh[:lng] + '.'          else -          (@md.opt.lingual==:mono \ -          && (@md.opt.lng == default_language?)) \ -          ? ('portrait' + '.') -          : ('portrait' + fh[:lng] + '.') +          fh[:fn] + '.portrait' + fh[:lng] + '.'          end        end        def pdf_l(fh=nil)          fh=default_hash_build(fh,Sfx[:pdf]) -        if output_dir_structure.by_language_code? -          fh[:fn] + '.landscape.' +        fh[:lng]=lang_code?(fh[:lng]) +        if output_dir_structure.by_filename? +          'landscape' + fh[:lng] + '.'          else -          (@md.opt.lingual==:mono \ -          && (@md.opt.lng == default_language?)) \ -          ? ('landscape' + '.') -          : ('landscape' + fh[:lng] + '.') -          #'landscape' + @md.lang_code_insert + '.' +          fh[:fn] + '.landscape' + fh[:lng] + '.'          end        end        def pdf_p_a4(fh=nil) @@ -4985,70 +4923,47 @@ WOK        end        def manpage(fh=nil)          fh=default_hash_build(fh,Sfx[:manpage]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        else -          { -            fn: fh[:fn], -            ft: fh[:ft], -            lng: fh[:lng], -          } -        end +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: fh[:fn], +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end        def info(fh=nil)          fh=default_hash_build(fh,Sfx[:info]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        else -          { -            fn: fh[:fn], -            ft: fh[:ft], -            lng: fh[:lng], -          } -        end +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: fh[:fn], +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end        def texinfo(fh=nil)          fh=default_hash_build(fh,Sfx[:texinfo]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        else -          { -            fn: fh[:fn], -            ft: fh[:ft], -            lng: fh[:lng], -          } -        end +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: fh[:fn], +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end        def sqlite_discrete(fh=nil)          fh=default_hash_build(fh,Sfx[:sql]) -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        else -          { -            fn: fh[:fn], -            ft: fh[:ft], -            lng: fh[:lng], -          } -        end +        fh[:lng]=lang_code?(fh[:lng]) +        fnh={ +          fn: fh[:fn], +          ft: fh[:ft], +          lng: fh[:lng], +        }          i18n(fnh)        end        def hash_digest(fh=nil)          fh=default_hash_build(fh,Sfx[:txt]) +        fh[:lng]=lang_code?(fh[:lng])          fnh=if output_dir_structure.by_language_code?            {              fn: fh[:fn] + '.hash_digest', @@ -5071,6 +4986,7 @@ WOK        end        def sitemap(fh=nil)          fh=default_hash_build(fh,Sfx[:xml]) +        fh[:lng]=lang_code?(fh[:lng])          fnh=if output_dir_structure.by_language_code?            {              fn: fh[:fn] + '.sitemap', @@ -5091,68 +5007,54 @@ WOK          end          i18n(fnh)        end -      def qrcode_title -        fn=@md.fnb -        ft='.title.png' -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fn, -            ft: ft, -          } -        elsif output_dir_structure.by_filetype? +      def qrcode_title(fh=nil) +        fh=default_hash_build(fh,'.title.png') +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fn, -            ft: ft, -            lng: @md.lang_code_insert +            fn: 'sisu_manifest', +            ft: fh[:ft], +            lng: fh[:lng],            }          else            { -            fn: 'sisu_manifest', -            ft: ft, -            lng: @md.lang_code_insert +            fn: fh[:fn], +            ft: fh[:ft], +            lng: fh[:lng],            }          end          i18n(fnh)        end -      def qrcode_md -        fn=@md.fnb -        ft='.md.png' -        fnh=if output_dir_structure.by_language_code? -          { -            fn: fn, -            ft: ft, -          } -        elsif output_dir_structure.by_filetype? +      def qrcode_md #check name below +        fh=default_hash_build(fh,'.md.png') +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fn, -            ft: ft, -            lng: @md.lang_code_insert +            fn: 'sisu_manifest', +            ft: fh[:ft], +            lng: fh[:lng],            }          else            { -            fn: 'sisu_manifest', -            ft: ft, -            lng: @md.lang_code_insert +            fn: fh[:fn], +            ft: fh[:ft], +            lng: fh[:lng],            }          end          i18n(fnh)        end        def manifest_txt(fh=nil)          fh=default_hash_build(fh,Sfx[:txt]) -        fnh=if output_dir_structure.by_language_code? +        fh[:lng]=lang_code?(fh[:lng]) +        fnh=if output_dir_structure.by_filename?            { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? -          { -            fn: fh[:fn], +            fn: 'sisu_manifest',              ft: fh[:ft],              lng: fh[:lng],            }          else            { -            fn: 'sisu_manifest', +            fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } @@ -5161,25 +5063,22 @@ WOK        end        def manifest(fh=nil)          fh=default_hash_build(fh,Sfx[:html]) +        fh[:lng]=lang_code?(fh[:lng])          fnh=if output_dir_structure.dump_or_redirect?            {              fn: fh[:fn] + '.manifest',              ft: fh[:ft], +            lng: fh[:lng],            } -        elsif output_dir_structure.by_language_code? -          { -            fn: fh[:fn], -            ft: fh[:ft], -          } -        elsif output_dir_structure.by_filetype? +        elsif output_dir_structure.by_filename?            { -            fn: fh[:fn], +            fn: 'sisu_manifest',              ft: fh[:ft],              lng: fh[:lng],            }          else            { -            fn: 'sisu_manifest', +            fn: fh[:fn],              ft: fh[:ft],              lng: fh[:lng],            } @@ -6029,7 +5928,7 @@ WOK        or ((@opt.dir_structure_by ==:filetype \        || @opt.dir_structure_by ==:filename) \        and (@opt.lingual ==:mono \ -      && @opt.lng == @opt.act[:default_language][:code])) +      && @lng == @opt.act[:default_language][:code]))          ''        elsif (@opt.dir_structure_by ==:filetype \        || @opt.dir_structure_by ==:filename) \ | 
