diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-05-12 19:26:08 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-05-12 19:26:08 -0400 |
commit | 35825d2292a741459e4ddeabd208dd0b172457c2 (patch) | |
tree | 9be916c844cbba27710486e8f9f0f7c8949ee901 | |
parent | v3: hub, fixes, still a construction zone (diff) |
v3: po4a, runs, needs checking
-rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 2 | ||||
-rw-r--r-- | lib/sisu/v3/po4a.rb | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 2023bf50..fa594e2e 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -23,6 +23,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.8.orig.tar.xz * v3: hub, fixes, still a construction zone +* v3: po4a, runs, needs checking + * v3: misc fixes * options, omissions and typo fix * particulars, fix, check diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb index aeff7acb..e3c297a3 100644 --- a/lib/sisu/v3/po4a.rb +++ b/lib/sisu/v3/po4a.rb @@ -77,7 +77,7 @@ module SiSU_Po4a r=r.gsub(/\|en\|/,'|') @lang_regx=%r{(?:#{r})} if opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \ - and opt.f_pth[:lng]!=opt.lng_base + and opt.f_pth[:lng]!=@opt.lng_base @@opt_src_=false @@opt_trn=opt @@md_trn=SiSU_Param::Parameters.new(opt).get @@ -114,7 +114,7 @@ module SiSU_Po4a SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{path}/#{md.fnb}/#{md.fn[:plain]}").flow if @opt.cmd =~/[MV]/ end if @opt.fns =~/\S+?~#{@lang_regx}\.ss[mti]/ \ - or @opt.f_pth[:lng] !=opt.lng_base + or @opt.f_pth[:lng] !=@opt.lng_base opt_lang_trn_fn=fn @dal_array_lang_translation=SiSU_DAL::Source.new(@opt,opt_lang_trn_fn).get # dal file drawn here opt_lang_src_fn=if fn =~/\S+?~\S{2}(?:_\S{2})?\.ss[mti]/ @@ -124,7 +124,7 @@ module SiSU_Po4a transdir,srcdir=Dir.pwd,Dir.pwd if Dir.pwd.to_s =~/\/#{@lang_regx}$/ transdir=Dir.pwd - srcdir=transdir.gsub(/\/#{@lang_regx}$/,"/#{opt.lng_base}") + srcdir=transdir.gsub(/\/#{@lang_regx}$/,"/#{@opt.lng_base}") if FileTest.directory?(srcdir) Dir.chdir(srcdir) end @@ -929,7 +929,7 @@ GSUB @file=SiSU_Env::FileOp.new(md,fn) end def po4a #%pot output - file_pot=(@md.opt.f_pth[:lng] ==opt.lng_base) \ + file_pot=(@md.opt.f_pth[:lng] ==@md.opt.lng_base) \ ? @file.write_file.pot : @file.write_file.po @sisu=[] @@ -960,7 +960,7 @@ GSUB require_relative 'git' # git.rb git=SiSU_Git::Source.new(@md.opt) git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git.dir) - if @md.opt.f_pth[:lng] ==opt.lng_base + if @md.opt.f_pth[:lng] ==@md.opt.lng_base FileUtils::cp(@file.place_file.pot.dir, @file.output_path.pot_git.dir) else # naive, work on --> FileUtils::cp(@file.place_file.po.dir, @file.output_path.po_git.dir) #unless FileTest.file?(@file.place_file.po_git.dir) |