We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 04afaf4 + b629827 commit 4a26e6eCopy full SHA for 4a26e6e
index.js
@@ -44,7 +44,7 @@ class Glossary {
44
return `https://crowdin.com/project/${this.project}/settings#glossary`
45
}
46
47
- async publish () {
+ async upload () {
48
const url = `https://api.crowdin.com/api/project/${this.project}/upload-glossary?key=${this.crowdinKey}`
49
50
const glossaryFile = tmp.fileSync().name
package.json
@@ -1,7 +1,7 @@
1
{
2
"name": "crowdin-glossary",
3
"version": "0.0.0-development",
4
- "description": "Create and upload glossaries using the Crowdin API",
+ "description": "Create and upload translation glossaries using the Crowdin API",
5
"repository": "https://github.com/crowdin-modules/crowdin-glossary",
6
"main": "index.js",
7
"license": "MIT",
readme.md
@@ -1,6 +1,6 @@
# crowdin-glossary
-Create and upload glossaries using the Crowdin API
+Create and upload translation glossaries using the Crowdin API

@@ -30,7 +30,7 @@ glossary.add('IME', 'Input Method Editor. A program that...')
30
glossary.add('IPC', 'Inter-Process Communication. Electron uses IPC to send...')
31
glossary.add('MAS', 'Acronym for Apple Mac App Store.')
32
33
-glossary.publish()
+glossary.upload()
34
```
35
36
## API
test.js
@@ -94,7 +94,7 @@ describe('glossary.csv', () => {
94
})
95
96
97
-describe('glossary.publish()', () => {
+describe('glossary.upload()', () => {
98
test('POSTs to the Crowdin API', async () => {
99
const glossary = Glossary({project: 'foo', crowdinKey: 'xyz'})
100
const mock = nock('https://api.crowdin.com')
@@ -105,7 +105,7 @@ describe('glossary.publish()', () => {
105
glossary.add('a', 'apples')
106
glossary.add('b', 'bananas')
107
glossary.add('c', 'cornichons')
108
- await glossary.publish()
+ await glossary.upload()
109
expect(mock.isDone()).toBe(true)
110
111
@@ -123,7 +123,7 @@ describe('glossary.publish()', () => {
123
.query({key: 'xyz'})
124
.reply(500, 'something is wrong')
125
126
127
128
expect(logs.length).toBe(2)
129
expect(logs[0]).toBe('Problem uploading glossary')
0 commit comments