google-spreadsheet-translation-sync 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +2 -2
- package/src/handlers/properties.js +1 -1
- package/test/test.js +1 -1
package/README.md
CHANGED
|
@@ -86,6 +86,7 @@ If `namespaces` or `fileBaseName` is used, this is the separating character. For
|
|
|
86
86
|
Type: `Enum`
|
|
87
87
|
Possible Values:
|
|
88
88
|
* `locale_json` (translations are stored in simple key/value json files)
|
|
89
|
+
* `json_structure` (translations are stored in a json tree, where the keys are split by the . character)
|
|
89
90
|
* `gettext` (utilizes [node gettext-parser](https://github.com/smhg/gettext-parser) for the work with po and mo files)
|
|
90
91
|
* `properties` (utilizes [propertie-reader](https://github.com/steveukx/properties) for java property files)
|
|
91
92
|
* `yml` (utilizes [js-yaml](https://github.com/nodeca/js-yaml) for symfony yaml translation files)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "google-spreadsheet-translation-sync",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "A plugin to read and write i18n translationsfrom and to google spreadsheets ",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"google-spreadsheet": "^3.0.11",
|
|
50
50
|
"js-yaml": "^4.1.0",
|
|
51
51
|
"mkdirp": "^0.5.5",
|
|
52
|
-
"properties-reader": "
|
|
52
|
+
"properties-reader": "^2.2.0",
|
|
53
53
|
"shelljs": "^0.7.8",
|
|
54
54
|
"tmp": "^0.1.0"
|
|
55
55
|
}
|
|
@@ -46,7 +46,7 @@ module.exports.updateTranslations = function (translationData, translationRootFo
|
|
|
46
46
|
fs.writeFileSync(file, '');
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const props = PropertiesReader(file, {
|
|
49
|
+
const props = PropertiesReader(file, 'utf-8', { writer: { saveSections: false } });
|
|
50
50
|
const potentiallyUpdatedTranslations = translationData[locale][namespace];
|
|
51
51
|
|
|
52
52
|
Object.keys(potentiallyUpdatedTranslations).forEach(function (key) {
|
package/test/test.js
CHANGED
|
@@ -158,7 +158,7 @@ const tests = [
|
|
|
158
158
|
file: propertiesFile,
|
|
159
159
|
namespace: namespace,
|
|
160
160
|
locale: key,
|
|
161
|
-
reader: PropertiesReader(propertiesFile, {
|
|
161
|
+
reader: PropertiesReader(propertiesFile, 'utf-8', { writer: { saveSections: false } })
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
csvData.forEach(function (lines, i) {
|