summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2019-04-04 13:45:31 +0200
committerGitHub2019-04-04 13:45:31 +0200
commit0d3e065e342d344727b2a92d1ba5da59b5f058cb (patch)
tree406c36d5b199d6494f2e811e6c9f48984a8610ea
parent279235fbbbd723eef1167c1ed3ee4fcb8c558fea (diff)
parente738efe217fc06572f37f8a4e732f3083b6cb1cd (diff)
Merge pull request #35 from ccoenen/enhancement/translation-churn
specifying the locale jsons to be in the exact style of poeditor
-rw-r--r--.editorconfig6
-rw-r--r--app.js1
2 files changed, 7 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
index 75e2a698..1629e28f 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -17,3 +17,9 @@ trim_trailing_whitespace = false
[{.travis.yml,npm-shrinkwrap.json,package.json}]
indent_style = space
indent_size = 2
+
+[locales/*.json]
+# this is the exact style poeditor.com exports, so this should prevent churn.
+insert_final_newline = false
+indent_style = space
+indent_size = 4
diff --git a/app.js b/app.js
index cb7cc6fe..3de99e6c 100644
--- a/app.js
+++ b/app.js
@@ -115,6 +115,7 @@ if (config.csp.enable) {
i18n.configure({
locales: ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr'],
cookie: 'locale',
+ indent: ' ', // this is the style poeditor.com exports it, this creates less churn
directory: path.join(__dirname, '/locales'),
updateFiles: config.updateI18nFiles
})