src/po_parser.ry in gettext-3.0.0 vs src/po_parser.ry in gettext-3.0.1

- old
+ new

@@ -173,43 +173,43 @@ str.strip! @q = [] until str.empty? do case str when /\A\s+/ - str = $' + str = $' when /\Amsgctxt/ - @q.push [:MSGCTXT, $&] - str = $' + @q.push [:MSGCTXT, $&] + str = $' when /\Amsgid_plural/ - @q.push [:MSGID_PLURAL, $&] - str = $' + @q.push [:MSGID_PLURAL, $&] + str = $' when /\Amsgid/ - @q.push [:MSGID, $&] - str = $' + @q.push [:MSGID, $&] + str = $' when /\Amsgstr/ - @q.push [:MSGSTR, $&] - str = $' + @q.push [:MSGSTR, $&] + str = $' when /\A\[(\d+)\]/ - @q.push [:PLURAL_NUM, $1] - str = $' + @q.push [:PLURAL_NUM, $1] + str = $' when /\A\#~(.*)/ if report_warning? $stderr.print _("Warning: obsolete msgid exists.\n") $stderr.print " #{$&}\n" end - @q.push [:COMMENT, $&] - str = $' + @q.push [:COMMENT, $&] + str = $' when /\A\#(.*)/ - @q.push [:COMMENT, $&] - str = $' + @q.push [:COMMENT, $&] + str = $' when /\A\"(.*)\"/ - @q.push [:STRING, unescape_string($1)] - str = $' + @q.push [:STRING, unescape_string($1)] + str = $' else - #c = str[0,1] - #@q.push [:STRING, c] - str = str[1..-1] + #c = str[0,1] + #@q.push [:STRING, c] + str = str[1..-1] end end @q.push [false, "$end"] if $DEBUG @q.each do |a,b| @@ -280,18 +280,18 @@ @translator_comments << "" elsif /\A(#.)\s*(.*)\z/ =~ comment mark = $1 content = $2 case mark - when POEntry::TRANSLATOR_COMMENT_MARK + when POFormat::TRANSLATOR_COMMENT_MARK @translator_comments << content - when POEntry::EXTRACTED_COMMENT_MARK + when POFormat::EXTRACTED_COMMENT_MARK @extracted_comments << content - when POEntry::REFERENCE_COMMENT_MARK + when POFormat::REFERENCE_COMMENT_MARK @references.concat(parse_references_line(content)) - when POEntry::FLAG_MARK + when POFormat::FLAG_MARK @flag << content - when POEntry::PREVIOUS_COMMENT_MARK + when POFormat::PREVIOUS_COMMENT_MARK @previous << content else @comments << comment end end