aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-08-08 18:52:30 -0400
committerRalph Amissah <ralph@amissah.com>2013-08-08 18:52:30 -0400
commit953257d4db9a5aee97a666c64cad2cbde9b95942 (patch)
treee9413029983f7ae457bc0f9355adae4771cd1a3b /lib/sisu/v4
parentdebian/changelog (4.1.10-1) (diff)
parentv4 v5: dal_expand_insertions, refinement for monolingual output (diff)
Merge tag 'sisu_4.1.11' into debian/sid
SiSU 4.1.11
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/dal_expand_insertions.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/sisu/v4/dal_expand_insertions.rb b/lib/sisu/v4/dal_expand_insertions.rb
index bfa9f7da..52deed0a 100644
--- a/lib/sisu/v4/dal_expand_insertions.rb
+++ b/lib/sisu/v4/dal_expand_insertions.rb
@@ -110,11 +110,10 @@ module SiSU_DAL_Insertions
end
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}"
+ @base_path="#{@md.file.output_path.base.url}/#{lng}"
def fnh
{
fn: @linked_doc,
- ft: ft,
}
end
def path_and_file(fn,pth)
@@ -182,10 +181,12 @@ module SiSU_DAL_Insertions
end
def by_filetype(linked_doc,lng,src=nil)
@linked_doc,@lng,@src=linked_doc,lng,src
+ @lc=SiSU_Env::FilenameLanguageCodeInsert.new(@md.opt,lng).language_code_insert
@base_path="#{@md.file.output_path.base.url}"
def fnh
{
fn: @linked_doc,
+ lng: @lc,
}
end
def path_and_file(fn,pth)
@@ -253,14 +254,18 @@ module SiSU_DAL_Insertions
end
def by_filename(linked_doc,lng,src=nil)
@linked_doc,@lng,@src=linked_doc,lng,src
+ @lc=SiSU_Env::FilenameLanguageCodeInsert.new(@md.opt,lng).language_code_insert
@base_path="#{@md.file.output_path.base.url}/#{@linked_doc}"
def fnh
{
fn: @linked_doc,
+ lng: @lc,
}
end
- def path_and_file(fn)
- "#{@base_path}/#{fn}"
+ def path_and_file(fn,pth=nil)
+ (pth.nil?) \
+ ? "#{@base_path}/#{fn}"
+ : "#{@base_path}/#{pth}/#{fn}"
end
def manifest
fn=@md.file.base_filename.manifest(fnh)
@@ -279,7 +284,8 @@ module SiSU_DAL_Insertions
path_and_file(fn)
end
def epub
- "#{@base_path}/epub/#{@linked_doc}.#{@lng}.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)