lib/gettext/po_entry.rb in gettext-3.0.5 vs lib/gettext/po_entry.rb in gettext-3.0.6
- old
+ new
@@ -201,9 +201,16 @@
# Fuzzy entry has "fuzzy" flag.
def fuzzy?
@flags.include?("fuzzy")
end
+ # @return true if the entry is translated entry, false otherwise.
+ def translated?
+ return false if fuzzy?
+ return false if @msgstr.nil? or @msgstr.empty?
+ true
+ end
+
def [](number)
param = @param_type[number]
raise ParseError, 'no more string parameters expected' unless param
send param
end