diff options
author | Ralph Amissah <ralph@amissah.com> | 2015-01-15 22:32:08 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2015-01-19 23:46:16 -0500 |
commit | adf811ce6c6513e4db1fb2ddf67019607a1012ff (patch) | |
tree | b17082e73edf1f1a5b526d2eeaa08d1ea79ef3a5 | |
parent | d: po4a, provide po4a.cfg file (diff) |
d: po4a_shelf, shelf current po4a, change tack
-rw-r--r-- | data/doc/sisu/CHANGELOG_v6 | 2 | ||||
-rw-r--r-- | lib/sisu/develop/hub_actions.rb | 8 | ||||
-rw-r--r-- | lib/sisu/develop/hub_options.rb | 15 | ||||
-rw-r--r-- | lib/sisu/develop/src_po4a_shelf.rb (renamed from lib/sisu/develop/po4a.rb) | 12 | ||||
-rw-r--r-- | lib/sisu/develop/src_po4a_shelf_set.rb (renamed from lib/sisu/develop/po4a_set.rb) | 2 |
5 files changed, 19 insertions, 20 deletions
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 22b0ad9c..06773a97 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -91,6 +91,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.4.0.orig.tar.xz * po4a, reinstate possibility to initialize po4a management of translated marked up documents, i.e. to place translated versions of a sisu document under po4a management (provide po4a.cfg file) + NOTE: shelf, abandon, change tack (for now at least) + explore a different way * utils_composite, composite documents (.ssm) extract the list of insert files diff --git a/lib/sisu/develop/hub_actions.rb b/lib/sisu/develop/hub_actions.rb index 68f0aef9..44834cba 100644 --- a/lib/sisu/develop/hub_actions.rb +++ b/lib/sisu/develop/hub_actions.rb @@ -707,18 +707,18 @@ module SiSU_Hub_Actions end end end - if @opt.act[:po4a][:set]==:on #% --po4a, -P + if @opt.act[:po4a_shelf][:set]==:on #% --po4a-shelf if @opt.f_pths.length > 0 - require_relative 'po4a' + require_relative 'src_po4a_shelf' begin SiSU_Hub_Loops::OptionLoopFiles.new(@opt). loop_files_on_given_option do - SiSU_Po4a::Source.new(@opt).read # po4a.rb + SiSU_Po4a::Source.new(@opt).read # src_po4a_shelf.rb end ensure end else - msg='po4a request requires sisu markup files' + msg='src_po4a_shelf request requires sisu markup files' if (@opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:cyan). diff --git a/lib/sisu/develop/hub_options.rb b/lib/sisu/develop/hub_options.rb index 1ea96af8..c3f31a88 100644 --- a/lib/sisu/develop/hub_options.rb +++ b/lib/sisu/develop/hub_options.rb @@ -614,7 +614,7 @@ module SiSU_Commandline if ch =~/N/ then select_arr << '--digests' ch=ch.gsub(/[N]/,'') end - if ch =~/P/ then select_arr << '--po4a' + if ch =~/P/ then select_arr << '--po4a-shelf' ch=ch.gsub(/[P]/,'') end if ch =~/d/ then select_arr << '--sqlite' @@ -1301,8 +1301,11 @@ module SiSU_Commandline =~/"--harvest"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } - act[:po4a]=if (select_arr.inspect \ - =~/"--po4a"|"--pot?"/) + act[:po4a_shelf]=(select_arr.inspect \ + =~/"--po4a-shelf"|"--pot?-shelf"/) \ + ? { bool: true, set: :on } + : { bool: false, set: :na } + if act[:po4a_shelf][:set]==:on act[:po4a_lang_trans]=if select_arr.inspect \ =~/"--trans-([a-z]{2}):((?:(?:[a-z]{2}\b),?)+)/ lng_src,lng_trn=$1,$2.split(',') @@ -1321,18 +1324,12 @@ module SiSU_Commandline else { bool: false, set: :na } end - { bool: true, set: :on } else act[:po4a_lang_trans]= \ { bool: false, set: :na } act[:po4a_lang_init]= \ { bool: false, set: :na } - { bool: false, set: :na } end - #act[:po4a]=(select_arr.inspect \ - #=~/"--po4a"|"--pot?"/) \ - #? { bool: true, set: :on } - #: { bool: false, set: :na } act[:git]=(select_arr.inspect \ =~/"--git"/) \ ? { bool: true, set: :on } diff --git a/lib/sisu/develop/po4a.rb b/lib/sisu/develop/src_po4a_shelf.rb index 285132a5..dee6818f 100644 --- a/lib/sisu/develop/po4a.rb +++ b/lib/sisu/develop/src_po4a_shelf.rb @@ -51,7 +51,7 @@ ** Git <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary> - <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/po4a.rb;hb=HEAD> + <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_shelf.rb;hb=HEAD> =end module SiSU_Po4a @@ -60,7 +60,7 @@ module SiSU_Po4a include SiSU_Env require_relative 'ao_composite' # ao_composite.rb require_relative 'shared_metadata' # shared_metadata.rb - require_relative 'po4a_set' # po4a_set.rb + require_relative 'src_po4a_shelf_set' # src_po4a_shelf_set.rb include SiSU_Param require_relative 'object_munge' # object_munge.rb require_relative 'utils_composite' # utils_composite.rb @@ -1102,7 +1102,7 @@ GSUB ? @opt.act[:po4a_lang_trans][:trn] : [] end - def translation_languages_available + def translation_languages_selected_that_are_available translation_languages_selected & sisu_languages_available end def source_language_selected_str @@ -1110,8 +1110,8 @@ GSUB ? @opt.act[:po4a_lang_trans][:src] : 'en' end - def translation_languages_available_str - translation_languages_available.join(' ') + def translation_languages_selected_that_are_available_str + translation_languages_selected_that_are_available.join(' ') end def translation_languages_selected_str @opt.act[:po4a_lang_trans][:trn].join(' ') @@ -1122,7 +1122,7 @@ GSUB doc_import_list=composite_and_imported_filenames_array(@opt.fno) po4a_cfg_arr=[] po4a_cfg_arr \ - << "[po4a_langs] #{language.translation_languages_available_str}" + << "[po4a_langs] #{language.translation_languages_selected_that_are_available_str}" po4a_cfg_arr \ << "[po4a_paths] #{dir.pot}/$master.pot $lang:#{dir.po}/$lang/$master.po" doc_import_list.each do |file_src| diff --git a/lib/sisu/develop/po4a_set.rb b/lib/sisu/develop/src_po4a_shelf_set.rb index d56175fe..a281060d 100644 --- a/lib/sisu/develop/po4a_set.rb +++ b/lib/sisu/develop/src_po4a_shelf_set.rb @@ -51,7 +51,7 @@ ** Git <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary> - <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/po4a_set.rb;hb=HEAD> + <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/develop/src_po4a_shelf_set.rb;hb=HEAD> =end module SiSU_Po4aUtils |