Sha256: f310407ed549e0b162e820d020b759ea59d1dce4b3a16f677b30ce6b551c9db8
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
# encoding: UTF-8 module Rosette module DataStores # Contains several constants indicating the translation status of a set # of phrases. Generally attached to commit logs. module PhraseStatus # The commit has not even been seen yet, i.e. this is the first time # Rosette has ever encountered it. NOT_SEEN = 'NOT_SEEN' # The repository that contains this commit has been fetched in preparation # for processing it. FETCHED = 'FETCHED' # Indicates the phrases have been extracted from the commit. EXTRACTED = 'EXTRACTED' # The extracted phrases have been submitted for translation. PUSHED = 'PUSHED' # The commit has been completely processed. FINALIZED = 'FINALIZED' # Indicates that the commit no longer exists, i.e. the associated branch # was deleted or was force-pushed over. MISSING = 'MISSING' # Indicates one or all of the commits have not been processed. NOT_FOUND = 'NOT_FOUND' def self.all @all ||= [ NOT_SEEN, FETCHED, EXTRACTED, PUSHED, FINALIZED, MISSING, NOT_FOUND ] end def self.statuses @statuses ||= [ NOT_SEEN, FETCHED, EXTRACTED, PUSHED, FINALIZED ] end def self.incomplete @incomplete ||= [ NOT_SEEN, FETCHED, EXTRACTED, PUSHED, NOT_FOUND ] end def self.index(status) (@status_index ||= {}).fetch(status) do statuses.index(status) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rosette-core-1.0.1 | lib/rosette/data_stores/phrase_status.rb |