import {merge} from 'lodash'
import rawMessages from 'all:locale:@sanity/base/locale-messages'

const mergedMessages = rawMessages.reduce((prev, curr) => {
  return merge(prev, curr)
}, {})


function fetchLocalizedMessages(locale) {
  return Promise.resolve(mergedMessages[locale] || {})
}

function fetchAllMessages() {
  return Promise.resolve(mergedMessages)
}


module.exports = {
  fetchLocalizedMessages,
  fetchAllMessages
}

@@ -281,9 +281,9 @@
 %5D %7C%7C
-%C2%A0
+ 
 %7B%7D)%0A

Remove irregular whitespace