diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/develop/po4a.rb | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/lib/sisu/develop/po4a.rb b/lib/sisu/develop/po4a.rb index a302e02e..1ce46d1b 100644 --- a/lib/sisu/develop/po4a.rb +++ b/lib/sisu/develop/po4a.rb @@ -562,7 +562,10 @@ GSUB end desc="#{d}#{s_mark}#{instruct}" orig="#{s_mark}#{dob_src.obj}" - trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}" + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" util=pot_structure(desc,orig,trans) wrapped=util.line_wrap @pot[:body] << wrapped << br # main text, contents, body KEEP @@ -603,7 +606,10 @@ GSUB desc="#{d}#{s_mark}#{instruct}" end orig="#{s_mark}#{dob_src.obj}" - trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}" + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" util=pot_structure(desc,orig,trans) elsif dob_src.hang =~/[0-9]/ \ and dob_src.indent != dob_src.hang @@ -621,7 +627,10 @@ GSUB end desc="#{d}#{s_mark}#{instruct}" orig="#{s_mark}#{dob_src.obj}" - trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}" + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" util=pot_structure(desc,orig,trans) else s_mark=desc=orig=trans='' @@ -636,7 +645,10 @@ GSUB end desc="#{d}#{s_mark}#{instruct}" orig="#{s_mark}#{dob_src.obj}" - trans=(dob_trn=='') ? '' : "#{s_mark}#{dob_trn.obj}" + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" else mark='' d=dob_src.is.to_s @@ -647,7 +659,10 @@ GSUB end desc="#{d}#{s_mark}#{instruct}" orig=dob_src.obj - trans=(dob_trn=='') ? '' : dob_trn.obj + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" end util=pot_structure(desc,orig,trans) end @@ -674,7 +689,10 @@ GSUB end desc="#{d}#{s_mark}#{instruct}" orig=dob_src.obj - trans=(dob_trn=='') ? '' : dob_trn.obj + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" util=pot_structure(desc,orig,trans) unwrapped=util.no_line_wrap_block @pot[:body] << unwrapped << br @@ -690,7 +708,10 @@ GSUB end desc="#{d}#{s_mark}#{instruct}" orig=dob_src.obj - trans=(dob_trn=='') ? '' : dob_trn.obj + trans=((dob_trn=='') \ + || (dob_src.obj == dob_trn.obj)) \ + ? '' + : "#{s_mark}#{dob_trn.obj}" util=pot_structure(desc,orig,trans) unwrapped=util.no_line_wrap_block @pot[:body] << unwrapped << br |