lib/gettext/tools/rmsgmerge.rb
# From GNU gettext source.
# 
# Merge the reference with the definition: take the #. and
#	#: comments from the reference, take the # comments from
# the definition, take the msgstr from the definition.  Add
# this merged entry to the output message list.      
From GNU gettext source.
Merge the reference with the definition: take the #. and
: comments from the reference, take the # comments from
the definition, take the msgstr from the definition.  Add
this merged entry to the output message list.
From GNU gettext source . Merge the reference with the definition : take the # . and : comments from the reference take the # comments from the definition take the msgstr from the definition . Add this merged entry to the output message list .
def format_comment(normal_comment, dot_comment, semi_comment, is_fuzzy)
        str = ''
        str << normal_comment.join("\n").gsub(/^#(\s*)/){|sss|
          if $1 == ""
            "# "
          else
            sss
          end
        }
        if normal_comment.size > 0
          str << "\n"
        end
        str << dot_comment.join("\n").gsub(/^#.(\s*)/){|sss|
          if $1 == ""
            "#. "
          else
            sss
          end
        }
        if dot_comment.size > 0
          str << "\n"
        end
        str << semi_comment.join("\n").gsub(/^#:\s*/, "#: ")
        if semi_comment.size > 0
          str << "\n"
        end
        if is_fuzzy
          str << "#, fuzzy\n"
        end
        str
      end
def format_comment ( normal_comment , dot_comment , semi_comment , is_fuzzy ) str = '' str << normal_comment . join ( "\n" ) . gsub ( / ^#( \s *) / ) { | sss | if $1 == "" "# " else sss end } if normal_comment . size > 0 str << "\n" end str << dot_comment . join ( "\n" ) . gsub ( / ^#.( \s *) / ) { | sss | if $1 == "" "#. " else sss end } if dot_comment . size > 0 str << "\n" end str << semi_comment . join ( "\n" ) . gsub ( / ^#: \s * / , "#: " ) if semi_comment . size > 0 str << "\n" end if is_fuzzy str << "#, fuzzy\n" end str end
From GNU gettext source.
From GNU gettext source .
normal_comment
<not_specific>
dot_comment
<not_specific>
semi_comment
<not_specific>
is_fuzzy
<not_specific>