Merge messages from the given descriptor map into the current registry.
(other MessageDescriptorMap)
| 245 | |
| 246 | // Merge messages from the given descriptor map into the current registry. |
| 247 | func (m MessageDescriptorMap) Merge(other MessageDescriptorMap) { |
| 248 | for id, other := range other { |
| 249 | if m[id] == nil { |
| 250 | m[id] = other |
| 251 | } else { |
| 252 | if other.Translations[defaultLanguage] != m[id].Translations[defaultLanguage] { |
| 253 | m[id].updated = true |
| 254 | } |
| 255 | for language, translation := range other.Translations { |
| 256 | if language == defaultLanguage { |
| 257 | continue // This one is set from the Define. |
| 258 | } |
| 259 | m[id].Translations[language] = translation |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | // Updated returns updated message descriptors. |
| 266 | func (m MessageDescriptorMap) Updated() (updated []string) { |
no outgoing calls