Skip to content

Commit 4a26e6e

Browse files
authored
Merge pull request #4 from crowdin-modules/fix--call-it-upload-everywhere,-not-publish
call it upload everywhere, not publish
2 parents 04afaf4 + b629827 commit 4a26e6e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Glossary {
4444
return `https://crowdin.com/project/${this.project}/settings#glossary`
4545
}
4646

47-
async publish () {
47+
async upload () {
4848
const url = `https://api.crowdin.com/api/project/${this.project}/upload-glossary?key=${this.crowdinKey}`
4949

5050
const glossaryFile = tmp.fileSync().name

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "crowdin-glossary",
33
"version": "0.0.0-development",
4-
"description": "Create and upload glossaries using the Crowdin API",
4+
"description": "Create and upload translation glossaries using the Crowdin API",
55
"repository": "https://github.com/crowdin-modules/crowdin-glossary",
66
"main": "index.js",
77
"license": "MIT",

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# crowdin-glossary
22

3-
Create and upload glossaries using the Crowdin API
3+
Create and upload translation glossaries using the Crowdin API
44

55
![glossary screenshot](https://user-images.githubusercontent.com/2289/36569408-8a4ad454-17e2-11e8-8a5b-9c394db0eafd.png)
66

@@ -30,7 +30,7 @@ glossary.add('IME', 'Input Method Editor. A program that...')
3030
glossary.add('IPC', 'Inter-Process Communication. Electron uses IPC to send...')
3131
glossary.add('MAS', 'Acronym for Apple Mac App Store.')
3232

33-
glossary.publish()
33+
glossary.upload()
3434
```
3535

3636
## API

test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('glossary.csv', () => {
9494
})
9595
})
9696

97-
describe('glossary.publish()', () => {
97+
describe('glossary.upload()', () => {
9898
test('POSTs to the Crowdin API', async () => {
9999
const glossary = Glossary({project: 'foo', crowdinKey: 'xyz'})
100100
const mock = nock('https://api.crowdin.com')
@@ -105,7 +105,7 @@ describe('glossary.publish()', () => {
105105
glossary.add('a', 'apples')
106106
glossary.add('b', 'bananas')
107107
glossary.add('c', 'cornichons')
108-
await glossary.publish()
108+
await glossary.upload()
109109
expect(mock.isDone()).toBe(true)
110110
})
111111

@@ -123,7 +123,7 @@ describe('glossary.publish()', () => {
123123
.query({key: 'xyz'})
124124
.reply(500, 'something is wrong')
125125

126-
await glossary.publish()
126+
await glossary.upload()
127127

128128
expect(logs.length).toBe(2)
129129
expect(logs[0]).toBe('Problem uploading glossary')

0 commit comments

Comments
 (0)