diff options
Diffstat (limited to 'lib/sisu/develop/hub_options.rb')
-rw-r--r-- | lib/sisu/develop/hub_options.rb | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/lib/sisu/develop/hub_options.rb b/lib/sisu/develop/hub_options.rb index e7df01db..1ea96af8 100644 --- a/lib/sisu/develop/hub_options.rb +++ b/lib/sisu/develop/hub_options.rb @@ -1301,10 +1301,38 @@ module SiSU_Commandline =~/"--harvest"/) \ ? { bool: true, set: :on } : { bool: false, set: :na } - act[:po4a]=(select_arr.inspect \ - =~/"--po4a"|"--pot?"/) \ - ? { bool: true, set: :on } - : { bool: false, set: :na } + act[:po4a]=if (select_arr.inspect \ + =~/"--po4a"|"--pot?"/) + act[:po4a_lang_trans]=if select_arr.inspect \ + =~/"--trans-([a-z]{2}):((?:(?:[a-z]{2}\b),?)+)/ + lng_src,lng_trn=$1,$2.split(',') + { bool: true, set: :on, src: lng_src, trn: lng_trn } + elsif select_arr.inspect \ + =~/"--trans"/ + { bool: true, set: :on } + { bool: true, set: :on, src: 'en', trn: [] } + else + { bool: false, set: :na } + end + act[:po4a_lang_init]=if select_arr.inspect \ + =~/"--init-([a-z]{2}):((?:(?:[a-z]{2}\b),?)+)/ + lng_src,lng_trn=$1,$2.split(',') + { bool: true, set: :on, src: lng_src, trn: lng_trn } + 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 } |