You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,23 +26,28 @@ Add a `.gitporc` with the followings:
26
26
This package provide a CLI powered by [Inquirer](https://github.com/sboudrias/Inquirer.js)
27
27
28
28
```
29
-
? What would you like to do
29
+
? What would you like to do: (Use arrow keys)
30
30
❯ View Project Details
31
31
Update Code (POEditor → GitHub)
32
32
Update POEditor (GitHub → POEditor)
33
33
Remove default Translations
34
+
Manage contributors
34
35
```
36
+
35
37
You'll be able to trigger webhooks from POEditor to run associated actions.
36
38
37
39
**Remove default Translations** is a utility to which you need to pass a JSON file path and that will remove values that are the same as the keys.
38
40
eg:
41
+
39
42
```json
40
43
{
41
44
"hello world": "hello world",
42
45
"this key will not be cleaned": "because the value is different"
43
46
}
44
47
```
48
+
45
49
will be turned into
50
+
46
51
```json
47
52
{
48
53
"hello world": "",
@@ -52,20 +57,25 @@ will be turned into
52
57
53
58
As we use gettext based i18n solution and english fallback in our transaltion files, this help remove english fallbacks from our output files when we need to reprocess them.
Run the `import_translations` webhook on the given project (see: [POEdtor Webhook Documentation](https://poeditor.com/help/how_to_use_the_github_webhook))
Run the `sync_terms_and_translations` webhook on the given project (see: [POEdtor Webhook Documentation](https://poeditor.com/help/how_to_use_the_github_webhook))
Run the `export_terms_and_translations` webhook on the given project and languages (see: [POEdtor Webhook Documentation](https://poeditor.com/help/how_to_use_the_github_webhook))
158
+
159
+
:warning: To complete this action, one call per language will be made.
160
+
161
+
#### API
162
+
163
+
##### listProjectLanguages(projectId)
121
164
122
-
| Type | Param | Description |
123
-
| ---- | ----- | ----------- |
124
-
|*Number*|`projectId`| The POEditor project id |
165
+
| Type | Param | Description|
166
+
| --------| -----------|----------------------- |
167
+
|_Number_|`projectId`| The POEditor project id |
125
168
126
169
List languages for a given project (see: [POEdtor API Documentation](https://poeditor.com/docs/api#languages_list))
127
170
128
171
Example of value returned on `Promise.resolve`
129
172
130
-
```js
131
-
[ { name:'English',
132
-
code:'en',
133
-
translations:2067,
134
-
percentage:100,
135
-
updated:'2017-11-16T09:14:45+0000' },
136
-
{ name:'French',
137
-
code:'fr',
138
-
translations:1456,
139
-
percentage:70.44,
140
-
updated:'2017-11-16T11:33:54+0000' } ]
173
+
```json
174
+
[
175
+
{
176
+
"name": "English",
177
+
"code": "en",
178
+
"translations": 2067,
179
+
"percentage": 100,
180
+
"updated": "2017-11-16T09:14:45+0000"
181
+
},
182
+
{
183
+
"name": "French",
184
+
"code": "fr",
185
+
"translations": 1456,
186
+
"percentage": 70.44,
187
+
"updated": "2017-11-16T11:33:54+0000"
188
+
}
189
+
]
141
190
```
142
191
143
192
#### listProjects()
@@ -146,54 +195,127 @@ List projects you can access (see: [POEdtor API Documentation](https://poeditor.
146
195
147
196
Example of value returned on `Promise.resolve`
148
197
149
-
```js
150
-
[ { id:1111,
151
-
name:'VizEat.com',
152
-
public:0,
153
-
open:0,
154
-
created:'2014-06-06T12:00:00+0000' } ]
198
+
```json
199
+
[
200
+
{
201
+
"id": 1111,
202
+
"name": "Project Name",
203
+
"public": 0,
204
+
"open": 0,
205
+
"created": "2014-06-06T12:00:00+0000"
206
+
}
207
+
]
155
208
```
156
209
157
-
#### synchronizeTerms(projectId)
210
+
#### viewProject(projectId)
158
211
159
-
| Type | Param | Description |
160
-
| ---- | ----- | ----------- |
161
-
|*Number*|`projectId`| The POEditor project id |
212
+
| Type | Param | Description|
213
+
| --------| -----------|----------------------- |
214
+
|_Number_|`projectId`| The POEditor project id |
162
215
163
-
Run the `sync_terms_and_translations` webhook on the given project (see: [POEdtor Webhook Documentation](https://poeditor.com/help/how_to_use_the_github_webhook))
216
+
Get the details of a given project (see: [POEdtor API Documentation](https://poeditor.com/docs/api#projects_view))
164
217
165
-
#### updateTranslations(projectId, languages)
218
+
Example of value returned on `Promise.resolve`
166
219
167
-
| Type | Param | Description |
168
-
| ---- | ----- | ----------- |
169
-
|*Number*|`projectId`| The POEditor project id |
170
-
|*Array*|`languages`| List of language code |
220
+
```json
221
+
[
222
+
{
223
+
"id": 1111,
224
+
"name": "Project Name",
225
+
"public": 0,
226
+
"open": 0,
227
+
"created": "2014-06-06T12:00:00+0000"
228
+
}
229
+
]
230
+
```
171
231
172
-
Run the `export_terms_and_translations` webhook on the given project and languages (see: [POEdtor Webhook Documentation](https://poeditor.com/help/how_to_use_the_github_webhook))
232
+
#### listContributors()
173
233
174
-
:warning: To complete this action, one call per language will be made.
0 commit comments