From a11485b8aa86780677c7a5ac415551e559e5961c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 23 May 2011 21:23:30 -0400 Subject: v3: param, html, epub, xml, simplify file-naming with language code * language code occurs in fixed location within file-name (could previously do so in 1 of 3 configured locations) --- lib/sisu/v3/concordance.rb | 12 ++++++------ lib/sisu/v3/epub.rb | 10 +++++----- lib/sisu/v3/epub_concordance.rb | 10 +++++----- lib/sisu/v3/epub_format.rb | 22 +++++++++++----------- lib/sisu/v3/epub_segments.rb | 4 ++-- lib/sisu/v3/html.rb | 10 +++++----- lib/sisu/v3/html_format.rb | 22 +++++++++++----------- lib/sisu/v3/html_minitoc.rb | 10 +++++----- lib/sisu/v3/html_segments.rb | 2 +- lib/sisu/v3/param.rb | 9 ++++++--- lib/sisu/v3/xml_format.rb | 22 +++++++++++----------- 11 files changed, 68 insertions(+), 65 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb index 72031419..91b63778 100644 --- a/lib/sisu/v3/concordance.rb +++ b/lib/sisu/v3/concordance.rb @@ -212,17 +212,17 @@ WOK end protected def location_scroll(wordlocation,show) - %{#{wordlocation}; } + %{#{wordlocation}; } end def location_seg(wordlocation,show) ##fix - @word_location_seg=wordlocation.gsub(/(.+?)\#(\d+)/,"#{@md.fnl[:pre]}\\1#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}#\\2") unless wordlocation.nil? + @word_location_seg=wordlocation.gsub(/(.+?)\#(\d+)/,"\\1#{@md.lang_code_insert}#{Sfx[:html]}#\\2") unless wordlocation.nil? case wordlocation when @rxp_t1 - %{[H]#{show}, } + %{[H]#{show}, } when @rxp_t2 - %{[H]#{show}, } + %{[H]#{show}, } when @rxp_t3 - %{[H]#{show}, } + %{[H]#{show}, } else %{#{show}, } end end @@ -337,7 +337,7 @@ WOK end credits=@vz.credits_sisu @file_concordance << %{\n} # footer - SiSU_Screen::Ansi.new(@opt.cmd,@md.fns,"#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").flow if @md.opt.cmd =~/[MV]/ + SiSU_Screen::Ansi.new(@md.opt.cmd,@md.fns,"#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}").flow if @md.opt.cmd =~/[MV]/ end end end diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb index 422c1e68..7293c601 100644 --- a/lib/sisu/v3/epub.rb +++ b/lib/sisu/v3/epub.rb @@ -310,7 +310,7 @@ module SiSU_EPUB title=if dob.obj !~/Document Information/; linkname else link='metadata' - %{#{linkname}} + %{#{linkname}} end toc={} txt_obj={ txt: title } @@ -395,13 +395,13 @@ module SiSU_EPUB linkname,ocn=dob.obj.strip,dob.ocn p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) if ocn if dob.ln==4 - seg_link=%{ + seg_link=%{ #{dob.obj} } @@seg_url=dob.name elsif dob.obj =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/ seg_link=dob.obj.gsub(/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/, - %{} + + %{} + %{\\1 \\2 }) end p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) if ocn @@ -423,7 +423,7 @@ module SiSU_EPUB if ocn \ and ocn !~/#/ p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) - lnk_n_txt=%{ + lnk_n_txt=%{ #{linkname} } txt_obj={ txt: lnk_n_txt } @@ -444,7 +444,7 @@ module SiSU_EPUB if ocn \ and ocn !~/#/ p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) - lnk_n_txt=%{ + lnk_n_txt=%{ #{linkname} } txt_obj={ txt: lnk_n_txt } diff --git a/lib/sisu/v3/epub_concordance.rb b/lib/sisu/v3/epub_concordance.rb index 205f4f22..687155d2 100644 --- a/lib/sisu/v3/epub_concordance.rb +++ b/lib/sisu/v3/epub_concordance.rb @@ -185,18 +185,18 @@ WOK protected def location_scroll(wordlocation,show) @wordlocation=wordlocation - %{#{@wordlocation}; } + %{#{@wordlocation}; } end def location_seg(wordlocation,show) @wordlocation,@show=wordlocation,show - @word_location_seg=wordlocation.gsub(/(.+?)\#(\d+)/,"#{@md.fnl[:pre]}\\1#{@md.fnl[:mid]}#{Sfx[:epub_xhtml]}#{@md.fnl[:post]}#o\\2") unless wordlocation.nil? + @word_location_seg=wordlocation.gsub(/(.+?)\#(\d+)/,"\\1#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}#o\\2") unless wordlocation.nil? case @wordlocation when @rxp_t1 - %{[H]#{@show}, } + %{[H]#{@show}, } when @rxp_t2 - %{[H]#{@show}, } + %{[H]#{@show}, } when @rxp_t3 - %{[H]#{@show}, } + %{[H]#{@show}, } else %{#{@show}, } end end diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index 5af5c0b4..e75ad112 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1196,13 +1196,13 @@ WOK } end def seg_head_navigation_band - firstseg=%{ + firstseg=%{ #{@vz.epub_png_nav_nxt} } if @md.firstseg =~/\S+/ %{

#{firstseg}

} end def seg_head_navigation_band_bottom - firstseg=%{ + firstseg=%{ #{@vz.epub_png_nav_nxt} } if @md.firstseg =~/\S+/ %{

#{firstseg}

} @@ -1335,17 +1335,17 @@ WOK def dot_control_pre_next %{
- + #{@vz.png_nav_dot_pre} - + #{@vz.png_nav_dot_toc} - + #{@vz.png_nav_dot_nxt} #{@vz.table_close}} @@ -1353,12 +1353,12 @@ WOK def dot_control_pre %{ @@ -1370,15 +1370,15 @@ WOK end def toc_nav(f_pre=false,f_nxt=false,use=1) pre=nxt='' - toc=%{ + toc=%{ #{@vz.epub_png_nav_toc} } - pre=%{ + pre=%{ #{@vz.epub_png_nav_pre} } if f_pre==true - nxt=%{ + nxt=%{ #{@vz.epub_png_nav_nxt} } if f_nxt==true @@ -1861,7 +1861,7 @@ WOK fn='doc' if fn.to_s.empty? #you may wish to reconsider, sends to 'doc' where no segment info %{

- #{@endnote_part_a}#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{Sfx[:epub_xhtml]}#{@md.fnl[:post]}#{@endnote_part_b} + #{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}#{@endnote_part_b}

} end diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb index a21a64a7..ed8c8d39 100644 --- a/lib/sisu/v3/epub_segments.rb +++ b/lib/sisu/v3/epub_segments.rb @@ -231,7 +231,7 @@ WOK and dob.ln==4 if tracking != 0 Seg.new(@md).tail - segfilename="#{dir_epub_cont}/#{@md.fnl[:pre]}#{@@seg_name_xhtml[tracking-1]}#{@md.fnl[:mid]}#{Sfx[:epub_xhtml]}#{@md.fnl[:post]}" + segfilename="#{dir_epub_cont}/#{@@seg_name_xhtml[tracking-1]}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}" output_epub_cont_seg=File.new(segfilename,'w') if @@seg_name_xhtml[tracking-1] if dob.is=='heading' \ or @@seg_name_xhtml[tracking-1] !~/endnotes|book_index|metadata/ @@ -252,7 +252,7 @@ WOK heading_art(dob) head(dob) if @@seg_name_xhtml[tracking]=='sisu_manifest' # this is for manifest, includes navigation bug - segfilename="#{dir_epub_cont}/#{@md.fnl[:pre]}#{@@seg_name_xhtml[tracking]}#{@md.fnl[:mid]}#{Sfx[:epub_xhtml]}#{@md.fnl[:post]}" + segfilename="#{dir_epub_cont}/#{@@seg_name_xhtml[tracking]}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}" output_epub_cont_seg=File.new(segfilename,'w') Seg_output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'sisu_manifest').output Seg.new.reinitialise #BUG navigation bug with items following metadata, and occurring before manifest, this becomes a bug ... work area for book index, FIX diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 8d10b7da..b569653f 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -322,7 +322,7 @@ WOK title=if dob.obj !~/Metadata/; linkname else link='metadata' - %{#{linkname}} + %{#{linkname}} end toc={} txt_obj={ txt: title } @@ -409,13 +409,13 @@ WOK linkname,ocn=dob.obj.strip,dob.ocn p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn if dob.ln ==4 - seg_link=%{ + seg_link=%{ #{dob.obj} } @@seg_url=dob.name elsif dob.obj =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/ seg_link=dob.obj.gsub(/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/, - %{\\1 \\2 }) end p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) if ocn @@ -451,7 +451,7 @@ WOK if ocn \ and ocn !~/#/ p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) - lnk_n_txt=%{ + lnk_n_txt=%{ #{linkname} } txt_obj={ txt: lnk_n_txt } @@ -472,7 +472,7 @@ WOK if ocn \ and ocn !~/#/ p_num=SiSU_HTML_Format::Paragraph_number.new(@md,ocn) - lnk_n_txt=%{ + lnk_n_txt=%{ #{linkname} } txt_obj={ txt: lnk_n_txt } diff --git a/lib/sisu/v3/html_format.rb b/lib/sisu/v3/html_format.rb index a4a05293..e89b5c43 100644 --- a/lib/sisu/v3/html_format.rb +++ b/lib/sisu/v3/html_format.rb @@ -299,7 +299,7 @@ WOK

} end def seg_head_navigation_band(type='') - firstseg=%{ + firstseg=%{ #{@vz.png_nav_nxt} } if @md.firstseg =~/\S+/ %{

- + #{@vz.png_nav_dot_pre} - + #{@vz.png_nav_dot_toc}
@@ -318,7 +318,7 @@ WOK if type=~/pdf/ @tocband_segtoc=make_scroll_seg_pdf end - firstseg=%{ + firstseg=%{ #{@vz.png_nav_nxt} } if @md.firstseg =~/\S+/ %{
@@ -646,9 +646,9 @@ WOK def title_banner(title,subtitle,creator) end def dot_control_pre_next - pre="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker-1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" - up="#{@md.fnl[:pre]}#{@toc}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" - nxt="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" + pre="#{@seg_name_html[@seg_name_html_tracker-1]}#{@md.lang_code_insert}#{Sfx[:html]}" + up="#{@toc}#{@md.lang_code_insert}#{Sfx[:html]}" + nxt="#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}" if nxt=~/sisu_manifest\.html/ @file=SiSU_Env::SiSU_file.new(@md) if @md if @file.output_dir_structure.by_language_code? \ @@ -674,8 +674,8 @@ WOK #{@vz.table_close}} end def dot_control_pre - pre="#{@md.fnl[:pre]}#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" - up="#{@md.fnl[:pre]}#{@toc}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" + pre="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}" + up="#{@toc}#{@md.lang_code_insert}#{Sfx[:html]}" nxt="#{@md.fn[:toc]}" %{
} pre=%{} if f_pre==true nxt=%{} if f_nxt==true @@ -1281,7 +1281,7 @@ WOK fn='doc' if fn.to_s.empty? #you may wish to reconsider, sends to 'doc' where no segment info %{

- #{@endnote_part_a}#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}#{@endnote_part_b} + #{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b}

} end diff --git a/lib/sisu/v3/html_minitoc.rb b/lib/sisu/v3/html_minitoc.rb index 7390ee7c..3a4f8fc5 100644 --- a/lib/sisu/v3/html_minitoc.rb +++ b/lib/sisu/v3/html_minitoc.rb @@ -115,7 +115,7 @@ title=unless txt.obj =~/Document Information/; txt.obj else link='metadata' - %{#{txt.obj}} + %{#{txt.obj}} end toc={} txt_obj={ txt: title } @@ -148,13 +148,13 @@ txt=@data unless txt =~/~metadata/ if txt.ln ==4 - seg_link=%{ + seg_link=%{ #{txt.obj} } @@seg_url=txt.name elsif txt.obj =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/ seg_link=txt.obj.gsub(/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/, - %{\\1 \\2 }) end txt_obj={ txt: seg_link } @@ -170,7 +170,7 @@ txt.obj.gsub!(@pat_strip_heading_name,'\1') end toc={} - lnk_n_txt=%{ + lnk_n_txt=%{ #{txt.obj} } txt_obj={ txt: lnk_n_txt } @@ -185,7 +185,7 @@ txt.obj.gsub!(@pat_strip_heading_name,'\1') end toc={} - lnk_n_txt=%{ + lnk_n_txt=%{ #{txt.obj} } txt_obj={ txt: lnk_n_txt } diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb index fb9b01cb..ccd48407 100644 --- a/lib/sisu/v3/html_segments.rb +++ b/lib/sisu/v3/html_segments.rb @@ -237,7 +237,7 @@ module SiSU_HTML_seg mkdir_p(@file.output_path.html_seg.dir) if File.writable?("#{@file.output_path.base.dir}/.") end Seg.new(@md).tail - segfilename="#{@file.output_path.html_seg.dir}/#{@md.fnl[:pre]}#{@@seg_name_html[tracking-1]}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" + segfilename="#{@file.output_path.html_seg.dir}/#{@@seg_name_html[tracking-1]}#{@md.lang_code_insert}#{Sfx[:html]}" output_seg_file=File.new(segfilename,'w') if @@seg_name_html[tracking-1] minitoc=(@env.html_minitoc?) \ ? @minitoc \ diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 5d93523e..5d35bf3d 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -905,9 +905,9 @@ module SiSU_Param @doc={ lv: [] } @doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','','' @@publisher='SiSU scribe' - attr_accessor :make,:env,:path,:file,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:en,:notes,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy + attr_accessor :make,:env,:path,:file,:fn,:fns,:fnb,:fnn,:fnt,:fnl,:flv,:fnz,:fnstex,:ocn,:sfx_src,:pdf,:file_type,:dir_out,:dir_tex,:dir_lout,:txt_path,:site_skin,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,:translator,:illustrator,:prepared_by,:digitized_by,:subject,:description,:publisher,:current_publisher,:contributor,:date,:date_created,:date_issued,:date_available,:date_valid,:date_modified,:date_translated,:date_added_to_site,:date_scheme,:date_created_scheme,:date_issued_scheme,:date_available_scheme,:date_valid_scheme,:date_modified_scheme,:type,:format,:identifier,:source,:language,:language_original,:relation,:coverage,:rights,:keywords,:comments,:abstract,:cls_loc,:cls_dewey,:cls_pg,:cls_isbn,:papersize,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_skin,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,:promo,:ad_home,:stmp,:stmpd,:sc_filename,:sc_number,:sc_date,:sc_time,:sc_info,:yamladdr,:locale,:wc_lines,:wc_words,:wc_bytes,:file_encoding,:filesize,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:dgst_skin,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy def initialize(fns_array,opt) - @env=@path,@file=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@en=@notes=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=nil + @env=@path,@file=@fn=@fns=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@site_skin=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@num_top=@toc_lev_limit=@flag_tables=@vocabulary=@doc_skin=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@dgst_skin=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=nil @data,@path,@fns,@opt=fns_array,opt.pth,opt.fns,opt #@data used as data @flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=false,false,false,false,false,false,false @seg_autoname_safe=true @@ -918,6 +918,9 @@ module SiSU_Param @flv,@lang,@seg_names,@tags,@tag_array,@tag_a,@ec[:image],@ec[:audio],@ec[:multimedia]=Array.new(9){[]} @authors,@topic_register_array,@papersize_array=[],[],[] @lvs=[nil,0,0,0,0,0,0] + @lang_code_insert=(@opt.dir_structure_by =~/language/) \ + ? '' \ + : ".#{@opt.lng}" @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/ @rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/ @rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg @@ -1318,7 +1321,7 @@ module SiSU_Param @language[:code]=fn_set_lang[:c] @language[:name]=fn_set_lang[:n] end - @fnl=@env.i18n.lang_filename(fn_set_lang[:n]) + @fnl=@env.i18n.lang_filename(fn_set_lang[:c]) #fix # @flv.each do |l| # lang=SiSU_Env::Standardise_language.new.file_to_language(l) diff --git a/lib/sisu/v3/xml_format.rb b/lib/sisu/v3/xml_format.rb index a3539f60..58b3f880 100644 --- a/lib/sisu/v3/xml_format.rb +++ b/lib/sisu/v3/xml_format.rb @@ -537,7 +537,7 @@ WOK if type=~/pdf/ @tocband_segtoc=make_scroll_seg_pdf end - firstseg=%{ + firstseg=%{ #{@vz.png_nav_nxt} } if @md.firstseg =~/\S+/ %{
@@ -697,17 +697,17 @@ WOK def toc_nav(f_pre=false,f_nxt=false,use=1) pre=nxt='' toc=%{ - + #{@vz.png_nav_toc} - + #{@vz.png_nav_pre} - + #{@vz.png_nav_nxt}
@@ -556,7 +556,7 @@ WOK if type=~/pdf/ @tocband_segtoc=make_scroll_seg_pdf end - firstseg=%{ + firstseg=%{ #{@vz.png_nav_nxt} } if @md.firstseg =~/\S+/ %{
@@ -891,17 +891,17 @@ WOK def dot_control_pre_next %{
- + #{@vz.png_nav_dot_pre} - + #{@vz.png_nav_dot_toc} - + #{@vz.png_nav_dot_nxt} #{@vz.table_close}} @@ -909,12 +909,12 @@ WOK def dot_control_pre %{ @@ -927,17 +927,17 @@ WOK def toc_nav(f_pre=false,f_nxt=false,use=1) pre=nxt='' toc=%{} pre=%{} if f_pre==true nxt=%{} if f_nxt==true @@ -1479,7 +1479,7 @@ WOK fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info # Sfx[:html] or Sfx[:xhtml] ? %{

- #{@endnote_part_a}#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}#{@endnote_part_b} + #{@endnote_part_a}#{fn}#{@md.lang_code_insert}#{Sfx[:html]}#{@endnote_part_b}

} end -- cgit v1.2.3
- + #{@vz.png_nav_dot_pre} - + #{@vz.png_nav_dot_toc} - + #{@vz.png_nav_toc} - + #{@vz.png_nav_pre} - + #{@vz.png_nav_nxt}