Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mastodon
GitHub Repository: mastodon/joinmastodon
Path: blob/main/locales/locale_format.js
1006 views
1
/**
2
* Formatter file for extracting messages. Replaces default formatter. see https://formatjs.io/docs/tooling/cli#--format-path
3
*
4
* Message files will be in this format:
5
* {
6
* [key]: string
7
* }
8
*/
9
const format = (msgs) => {
10
const results = {}
11
for (const key in msgs) {
12
results[key] = msgs[key].defaultMessage
13
}
14
return results
15
}
16
module.exports = { format }
17
18