aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v4/dal_expand_insertions.rb16
-rw-r--r--lib/sisu/v5/dal_expand_insertions.rb16
2 files changed, 22 insertions, 10 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)
diff --git a/lib/sisu/v5/dal_expand_insertions.rb b/lib/sisu/v5/dal_expand_insertions.rb
index d85910aa..ca234624 100644
--- a/lib/sisu/v5/dal_expand_insertions.rb
+++ b/lib/sisu/v5/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)