@vocab/phrase 2.0.1 → 2.0.2

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.
@@ -131,10 +131,10 @@ async function pullAllTranslations(branch) {
131
131
  const phraseResult = await callPhrase(`translations?branch=${branch}&per_page=100`);
132
132
  const translations = {};
133
133
  for (const r of phraseResult) {
134
- if (!translations[r.locale.code]) {
135
- translations[r.locale.code] = {};
134
+ if (!translations[r.locale.name]) {
135
+ translations[r.locale.name] = {};
136
136
  }
137
- translations[r.locale.code][r.key.name] = {
137
+ translations[r.locale.name][r.key.name] = {
138
138
  message: r.content
139
139
  };
140
140
  }
@@ -131,10 +131,10 @@ async function pullAllTranslations(branch) {
131
131
  const phraseResult = await callPhrase(`translations?branch=${branch}&per_page=100`);
132
132
  const translations = {};
133
133
  for (const r of phraseResult) {
134
- if (!translations[r.locale.code]) {
135
- translations[r.locale.code] = {};
134
+ if (!translations[r.locale.name]) {
135
+ translations[r.locale.name] = {};
136
136
  }
137
- translations[r.locale.code][r.key.name] = {
137
+ translations[r.locale.name][r.key.name] = {
138
138
  message: r.content
139
139
  };
140
140
  }
@@ -121,10 +121,10 @@ async function pullAllTranslations(branch) {
121
121
  const phraseResult = await callPhrase(`translations?branch=${branch}&per_page=100`);
122
122
  const translations = {};
123
123
  for (const r of phraseResult) {
124
- if (!translations[r.locale.code]) {
125
- translations[r.locale.code] = {};
124
+ if (!translations[r.locale.name]) {
125
+ translations[r.locale.name] = {};
126
126
  }
127
- translations[r.locale.code][r.key.name] = {
127
+ translations[r.locale.name][r.key.name] = {
128
128
  message: r.content
129
129
  };
130
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocab/phrase",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seek-oss/vocab.git",
@@ -17,7 +17,7 @@
17
17
  "csv-stringify": "^6.2.3",
18
18
  "debug": "^4.3.1",
19
19
  "picocolors": "^1.0.0",
20
- "@vocab/core": "^1.6.2"
20
+ "@vocab/core": "^1.6.3"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/debug": "^4.1.5",