Method: GetText::RMsgMerge::Merger#change_reference_comment

Defined in:
lib/gettext/rmsgmerge.rb

#change_reference_comment(msgid, podata) ⇒ Object



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/gettext/rmsgmerge.rb', line 274

def change_reference_comment(msgid, podata)
  normal_comment = []
  dot_comment = []
  semi_comment = []
  is_fuzzy = false
  
  podata.comment(msgid).split(CRLF_RE).each do |l|
    if DOT_COMMENT_RE =~ l 
      dot_comment << l
    elsif SEMICOLON_COMMENT_RE =~ l
      semi_comment << l
    elsif FUZZY_RE =~ l
      is_fuzzy = true
    else
      normal_comment << l
    end
  end
  
  str = format_comment(normal_comment, dot_comment, semi_comment, is_fuzzy)
  podata.set_comment(msgid, str)        
end