summaryrefslogtreecommitdiffstats
path: root/lib/sisu/v5/manifest.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-08-08 04:10:33 +0000
committerRalph Amissah <ralph@amissah.com>2013-08-08 04:10:33 +0000
commitbab4ecc57278acd7a0b3fdd370f0a6d73241f01c (patch)
tree2bae443d1b394b8426c404bd57fde790b50caa88 /lib/sisu/v5/manifest.rb
parentv4 v5: version & changelog (diff)
downloadsisu-bab4ecc57278acd7a0b3fdd370f0a6d73241f01c.zip
sisu-bab4ecc57278acd7a0b3fdd370f0a6d73241f01c.tar.xz
v5: output structure by, multilingual, monolingual filenames tweak
Diffstat (limited to 'lib/sisu/v5/manifest.rb')
-rw-r--r--lib/sisu/v5/manifest.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb
index 10cca35..4a234d6 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>&nbsp;&nbsp;&nbsp;</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">&nbsp;</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