// Copyright 2014 The Gogs Authors. All rights reserved. // Copyright 2017 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package structs import ( "encoding/json" "errors" "strings" "time" ) var ( // ErrInvalidReceiveHook FIXME ErrInvalidReceiveHook = errors.New("Invalid JSON payload received over webhook") ) // Hook a hook is a web hook when one repository changed type Hook struct { ID int64 `json:"id"` Type string `json:"type"` URL string `json:"-"` Config map[string]string `json:"config"` Events []string `json:"events"` Active bool `json:"active"` // swagger:strfmt date-time Updated time.Time `json:"updated_at"` // swagger:strfmt date-time Created time.Time `json:"created_at"` } // HookList represents a list of API hook. type HookList []*Hook // CreateHookOptionConfig has all config options in it // required are "content_type" and "url" Required type CreateHookOptionConfig map[string]string // CreateHookOption options when create a hook type CreateHookOption struct { // required: true // enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram,feishu Type string `json:"type" binding:"Required"` // required: true Config CreateHookOptionConfig `json:"config" binding:"Required"` Events []string `json:"events"` BranchFilter string `json:"branch_filter" binding:"GlobPattern"` // default: false Active bool `json:"active"` } // EditHookOption options when modify one hook type EditHookOption struct { Config map[string]string `json:"config"` Events []string `json:"events"` BranchFilter string `json:"branch_filter" binding:"GlobPattern"` Active *bool `json:"active"` } // Payloader payload is some part of one hook type Payloader interface { SetSecret(string) JSONPayload() ([]byte, error) } // PayloadUser represents the author or committer of a commit type PayloadUser struct { // Full name of the commit author Name string `json:"name"` // swagger:strfmt email Email string `json:"email"` UserName string `json:"username"` } // FIXME: consider using same format as API when commits API are added. // applies to PayloadCommit and PayloadCommitVerification // PayloadCommit represents a commit type PayloadCommit struct { // sha1 hash of the commit ID string `json:"id"` Message string `json:"message"` URL string `json:"url"` Author *PayloadUser `json:"author"` Committer *PayloadUser `json:"committer"` Verification *PayloadCommitVerification `json:"verification"` // swagger:strfmt date-time Timestamp time.Time `json:"timestamp"` Added []string `json:"added"` Removed []string `json:"removed"` Modified []string `json:"modified"` } // PayloadCommitVerification represents the GPG verification of a commit type PayloadCommitVerification struct { Verified bool `json:"verified"` Reason string `json:"reason"` Signature string `json:"signature"` Signer *PayloadUser `json:"signer"` Payload string `json:"payload"` } var ( _ Payloader = &CreatePayload{} _ Payloader = &DeletePayload{} _ Payloader = &ForkPayload{} _ Payloader = &PushPayload{} _ Payloader = &IssuePayload{} _ Payloader = &IssueCommentPayload{} _ Payloader = &PullRequestPayload{} _ Payloader = &RepositoryPayload{} _ Payloader = &ReleasePayload{} ) // _________ __ // \_ ___ \_______ ____ _____ _/ |_ ____ // / \ \/\_ __ \_/ __ \\__ \\ __\/ __ \ // \ \____| | \/\ ___/ / __ \| | \ ___/ // \______ /|__| \___ >____ /__| \___ > // \/ \/ \/ \/ // CreatePayload FIXME type CreatePayload struct { Secret string `json:"secret"` Sha string `json:"sha"` Ref string `json:"ref"` RefType string `json:"ref_type"` Repo *Repository `json:"repository"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the CreatePayload func (p *CreatePayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload return payload information func (p *CreatePayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // ParseCreateHook parses create event hook content. func ParseCreateHook(raw []byte) (*CreatePayload, error) { hook := new(CreatePayload) if err := json.Unmarshal(raw, hook); err != nil { return nil, err } // it is possible the JSON was parsed, however, // was not from Gogs (maybe was from Bitbucket) // So we'll check to be sure certain key fields // were populated switch { case hook.Repo == nil: return nil, ErrInvalidReceiveHook case len(hook.Ref) == 0: return nil, ErrInvalidReceiveHook } return hook, nil } // ________ .__ __ // \______ \ ____ | | _____/ |_ ____ // | | \_/ __ \| | _/ __ \ __\/ __ \ // | ` \ ___/| |_\ ___/| | \ ___/ // /_______ /\___ >____/\___ >__| \___ > // \/ \/ \/ \/ // PusherType define the type to push type PusherType string // describe all the PusherTypes const ( PusherTypeUser PusherType = "user" ) // DeletePayload represents delete payload type DeletePayload struct { Secret string `json:"secret"` Ref string `json:"ref"` RefType string `json:"ref_type"` PusherType PusherType `json:"pusher_type"` Repo *Repository `json:"repository"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the DeletePayload func (p *DeletePayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload implements Payload func (p *DeletePayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // ___________ __ // \_ _____/__________| | __ // | __)/ _ \_ __ \ |/ / // | \( <_> ) | \/ < // \___ / \____/|__| |__|_ \ // \/ \/ // ForkPayload represents fork payload type ForkPayload struct { Secret string `json:"secret"` Forkee *Repository `json:"forkee"` Repo *Repository `json:"repository"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the ForkPayload func (p *ForkPayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload implements Payload func (p *ForkPayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // HookIssueCommentAction defines hook issue comment action type HookIssueCommentAction string // all issue comment actions const ( HookIssueCommentCreated HookIssueCommentAction = "created" HookIssueCommentEdited HookIssueCommentAction = "edited" HookIssueCommentDeleted HookIssueCommentAction = "deleted" ) // IssueCommentPayload represents a payload information of issue comment event. type IssueCommentPayload struct { Secret string `json:"secret"` Action HookIssueCommentAction `json:"action"` Issue *Issue `json:"issue"` Comment *Comment `json:"comment"` Changes *ChangesPayload `json:"changes,omitempty"` Repository *Repository `json:"repository"` Sender *User `json:"sender"` IsPull bool `json:"is_pull"` } // SetSecret modifies the secret of the IssueCommentPayload func (p *IssueCommentPayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload implements Payload func (p *IssueCommentPayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // __________ .__ // \______ \ ____ | | ____ _____ ______ ____ // | _// __ \| | _/ __ \\__ \ / ___// __ \ // | | \ ___/| |_\ ___/ / __ \_\___ \\ ___/ // |____|_ /\___ >____/\___ >____ /____ >\___ > // \/ \/ \/ \/ \/ \/ // HookReleaseAction defines hook release action type type HookReleaseAction string // all release actions const ( HookReleasePublished HookReleaseAction = "published" HookReleaseUpdated HookReleaseAction = "updated" HookReleaseDeleted HookReleaseAction = "deleted" ) // ReleasePayload represents a payload information of release event. type ReleasePayload struct { Secret string `json:"secret"` Action HookReleaseAction `json:"action"` Release *Release `json:"release"` Repository *Repository `json:"repository"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the ReleasePayload func (p *ReleasePayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload implements Payload func (p *ReleasePayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // __________ .__ // \______ \__ __ _____| |__ // | ___/ | \/ ___/ | \ // | | | | /\___ \| Y \ // |____| |____//____ >___| / // \/ \/ // PushPayload represents a payload information of push event. type PushPayload struct { Secret string `json:"secret"` Ref string `json:"ref"` Before string `json:"before"` After string `json:"after"` CompareURL string `json:"compare_url"` Commits []*PayloadCommit `json:"commits"` HeadCommit *PayloadCommit `json:"head_commit"` Repo *Repository `json:"repository"` Pusher *User `json:"pusher"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the PushPayload func (p *PushPayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload FIXME func (p *PushPayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // ParsePushHook parses push event hook content. func ParsePushHook(raw []byte) (*PushPayload, error) { hook := new(PushPayload) if err := json.Unmarshal(raw, hook); err != nil { return nil, err } switch { case hook.Repo == nil: return nil, ErrInvalidReceiveHook case len(hook.Ref) == 0: return nil, ErrInvalidReceiveHook } return hook, nil } // Branch returns branch name from a payload func (p *PushPayload) Branch() string { return strings.ReplaceAll(p.Ref, "refs/heads/", "") } // .___ // | | ______ ________ __ ____ // | |/ ___// ___/ | \_/ __ \ // | |\___ \ \___ \| | /\ ___/ // |___/____ >____ >____/ \___ > // \/ \/ \/ // HookIssueAction FIXME type HookIssueAction string const ( // HookIssueOpened opened HookIssueOpened HookIssueAction = "opened" // HookIssueClosed closed HookIssueClosed HookIssueAction = "closed" // HookIssueReOpened reopened HookIssueReOpened HookIssueAction = "reopened" // HookIssueEdited edited HookIssueEdited HookIssueAction = "edited" // HookIssueAssigned assigned HookIssueAssigned HookIssueAction = "assigned" // HookIssueUnassigned unassigned HookIssueUnassigned HookIssueAction = "unassigned" // HookIssueLabelUpdated label_updated HookIssueLabelUpdated HookIssueAction = "label_updated" // HookIssueLabelCleared label_cleared HookIssueLabelCleared HookIssueAction = "label_cleared" // HookIssueSynchronized synchronized HookIssueSynchronized HookIssueAction = "synchronized" // HookIssueMilestoned is an issue action for when a milestone is set on an issue. HookIssueMilestoned HookIssueAction = "milestoned" // HookIssueDemilestoned is an issue action for when a milestone is cleared on an issue. HookIssueDemilestoned HookIssueAction = "demilestoned" // HookIssueReviewed is an issue action for when a pull request is reviewed HookIssueReviewed HookIssueAction = "reviewed" ) // IssuePayload represents the payload information that is sent along with an issue event. type IssuePayload struct { Secret string `json:"secret"` Action HookIssueAction `json:"action"` Index int64 `json:"number"` Changes *ChangesPayload `json:"changes,omitempty"` Issue *Issue `json:"issue"` Repository *Repository `json:"repository"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the IssuePayload. func (p *IssuePayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload encodes the IssuePayload to JSON, with an indentation of two spaces. func (p *IssuePayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // ChangesFromPayload FIXME type ChangesFromPayload struct { From string `json:"from"` } // ChangesPayload represents the payload information of issue change type ChangesPayload struct { Title *ChangesFromPayload `json:"title,omitempty"` Body *ChangesFromPayload `json:"body,omitempty"` Ref *ChangesFromPayload `json:"ref,omitempty"` } // __________ .__ .__ __________ __ // \______ \__ __| | | | \______ \ ____ ________ __ ____ _______/ |_ // | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\ // | | | | / |_| |__ | | \ ___< <_| | | /\ ___/ \___ \ | | // |____| |____/|____/____/ |____|_ /\___ >__ |____/ \___ >____ > |__| // \/ \/ |__| \/ \/ // PullRequestPayload represents a payload information of pull request event. type PullRequestPayload struct { Secret string `json:"secret"` Action HookIssueAction `json:"action"` Index int64 `json:"number"` Changes *ChangesPayload `json:"changes,omitempty"` PullRequest *PullRequest `json:"pull_request"` Repository *Repository `json:"repository"` Sender *User `json:"sender"` Review *ReviewPayload `json:"review"` } // SetSecret modifies the secret of the PullRequestPayload. func (p *PullRequestPayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload FIXME func (p *PullRequestPayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } // ReviewPayload FIXME type ReviewPayload struct { Type string `json:"type"` Content string `json:"content"` } //__________ .__ __ //\______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__. // | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | | // | | \ ___/| |_> > <_> )___ \| || | ( <_> ) | \/\___ | // |____|_ /\___ > __/ \____/____ >__||__| \____/|__| / ____| // \/ \/|__| \/ \/ // HookRepoAction an action that happens to a repo type HookRepoAction string const ( // HookRepoCreated created HookRepoCreated HookRepoAction = "created" // HookRepoDeleted deleted HookRepoDeleted HookRepoAction = "deleted" ) // RepositoryPayload payload for repository webhooks type RepositoryPayload struct { Secret string `json:"secret"` Action HookRepoAction `json:"action"` Repository *Repository `json:"repository"` Organization *User `json:"organization"` Sender *User `json:"sender"` } // SetSecret modifies the secret of the RepositoryPayload func (p *RepositoryPayload) SetSecret(secret string) { p.Secret = secret } // JSONPayload JSON representation of the payload func (p *RepositoryPayload) JSONPayload() ([]byte, error) { return json.MarshalIndent(p, "", " ") } ort/46013/stable26'>backport/46013/stable26 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/l10n/en_NZ/files_external.po
blob: 11f28d242a86fd4fb473796e27300cad5d6d54a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: translations@owncloud.org\n"
"POT-Creation-Date: 2014-07-17 01:54-0400\n"
"PO-Revision-Date: 2014-07-17 05:54+0000\n"
"Last-Translator: I Robot\n"
"Language-Team: English (New Zealand) (http://www.transifex.com/projects/p/owncloud/language/en_NZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_NZ\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: ajax/dropbox.php:27
msgid ""
"Fetching request tokens failed. Verify that your Dropbox app key and secret "
"are correct."
msgstr ""

#: ajax/dropbox.php:40
msgid ""
"Fetching access tokens failed. Verify that your Dropbox app key and secret "
"are correct."
msgstr ""

#: ajax/dropbox.php:48 js/dropbox.js:102
msgid "Please provide a valid Dropbox app key and secret."
msgstr ""

#: ajax/google.php:27
#, php-format
msgid "Step 1 failed. Exception: %s"
msgstr ""

#: ajax/google.php:38
#, php-format
msgid "Step 2 failed. Exception: %s"
msgstr ""

#: appinfo/app.php:35 js/app.js:32 templates/settings.php:9
msgid "External storage"
msgstr ""

#: appinfo/app.php:44
msgid "Local"
msgstr ""

#: appinfo/app.php:47
msgid "Location"
msgstr ""

#: appinfo/app.php:50
msgid "Amazon S3"
msgstr ""

#: appinfo/app.php:53
msgid "Key"
msgstr ""

#: appinfo/app.php:54
msgid "Secret"
msgstr ""

#: appinfo/app.php:55 appinfo/app.php:64
msgid "Bucket"
msgstr ""

#: appinfo/app.php:59
msgid "Amazon S3 and compliant"
msgstr ""

#: appinfo/app.php:62
msgid "Access Key"
msgstr ""

#: appinfo/app.php:63
msgid "Secret Key"
msgstr ""

#: appinfo/app.php:65
msgid "Hostname (optional)"
msgstr ""

#: appinfo/app.php:66
msgid "Port (optional)"
msgstr ""

#: appinfo/app.php:67
msgid "Region (optional)"
msgstr ""

#: appinfo/app.php:68
msgid "Enable SSL"
msgstr ""

#: appinfo/app.php:69
msgid "Enable Path Style"
msgstr ""

#: appinfo/app.php:77
msgid "App key"
msgstr ""

#: appinfo/app.php:78
msgid "App secret"
msgstr ""

#: appinfo/app.php:88 appinfo/app.php:129 appinfo/app.php:140
#: appinfo/app.php:173
msgid "Host"
msgstr ""

#: appinfo/app.php:89 appinfo/app.php:130 appinfo/app.php:152
#: appinfo/app.php:163 appinfo/app.php:174
msgid "Username"
msgstr ""

#: appinfo/app.php:90 appinfo/app.php:131 appinfo/app.php:153
#: appinfo/app.php:164 appinfo/app.php:175
msgid "Password"
msgstr ""

#: appinfo/app.php:91 appinfo/app.php:133 appinfo/app.php:143
#: appinfo/app.php:154 appinfo/app.php:176
msgid "Root"
msgstr ""

#: appinfo/app.php:92
msgid "Secure ftps://"
msgstr ""

#: appinfo/app.php:100
msgid "Client ID"
msgstr ""

#: appinfo/app.php:101
msgid "Client secret"
msgstr ""

#: appinfo/app.php:108
msgid "OpenStack Object Storage"
msgstr ""

#: appinfo/app.php:111
msgid "Username (required)"
msgstr ""

#: appinfo/app.php:112
msgid "Bucket (required)"
msgstr ""

#: appinfo/app.php:113
msgid "Region (optional for OpenStack Object Storage)"
msgstr ""

#: appinfo/app.php:114
msgid "API Key (required for Rackspace Cloud Files)"
msgstr ""

#: appinfo/app.php:115
msgid "Tenantname (required for OpenStack Object Storage)"
msgstr ""

#: appinfo/app.php:116
msgid "Password (required for OpenStack Object Storage)"
msgstr ""

#: appinfo/app.php:117
msgid "Service Name (required for OpenStack Object Storage)"
msgstr ""

#: appinfo/app.php:118
msgid "URL of identity endpoint (required for OpenStack Object Storage)"
msgstr ""

#: appinfo/app.php:119
msgid "Timeout of HTTP requests in seconds (optional)"
msgstr ""

#: appinfo/app.php:132 appinfo/app.php:142
msgid "Share"
msgstr ""

#: appinfo/app.php:137
msgid "SMB / CIFS using OC login"
msgstr ""

#: appinfo/app.php:141
msgid "Username as share"
msgstr ""

#: appinfo/app.php:151 appinfo/app.php:162
msgid "URL"
msgstr ""

#: appinfo/app.php:155 appinfo/app.php:166
msgid "Secure https://"
msgstr ""

#: appinfo/app.php:165
msgid "Remote subfolder"
msgstr ""

#: js/dropbox.js:7 js/dropbox.js:29 js/google.js:8 js/google.js:40
msgid "Access granted"
msgstr ""

#: js/dropbox.js:33 js/dropbox.js:97 js/dropbox.js:103
msgid "Error configuring Dropbox storage"
msgstr ""

#: js/dropbox.js:68 js/google.js:89
msgid "Grant access"
msgstr ""

#: js/google.js:45 js/google.js:122
msgid "Error configuring Google Drive storage"
msgstr ""

#: js/mountsfilelist.js:34
msgid "Personal"
msgstr ""

#: js/mountsfilelist.js:36
msgid "System"
msgstr ""

#: js/settings.js:325 js/settings.js:332
msgid "Saved"
msgstr ""

#: lib/config.php:712
msgid "<b>Note:</b> "
msgstr ""

#: lib/config.php:722
msgid " and "
msgstr ""

#: lib/config.php:744
#, php-format
msgid ""
"<b>Note:</b> The cURL support in PHP is not enabled or installed. Mounting "
"of %s is not possible. Please ask your system administrator to install it."
msgstr ""

#: lib/config.php:746
#, php-format
msgid ""
"<b>Note:</b> The FTP support in PHP is not enabled or installed. Mounting of"
" %s is not possible. Please ask your system administrator to install it."
msgstr ""

#: lib/config.php:748
#, php-format
msgid ""
"<b>Note:</b> \"%s\" is not installed. Mounting of %s is not possible. Please"
" ask your system administrator to install it."
msgstr ""

#: templates/list.php:7
msgid "You don't have any external storages"
msgstr ""

#: templates/list.php:16
msgid "Name"
msgstr ""

#: templates/list.php:20
msgid "Storage type"
msgstr ""

#: templates/list.php:23
msgid "Scope"
msgstr ""

#: templates/settings.php:2
msgid "External Storage"
msgstr ""

#: templates/settings.php:8 templates/settings.php:27
msgid "Folder name"
msgstr ""

#: templates/settings.php:10
msgid "Configuration"
msgstr ""

#: templates/settings.php:11
msgid "Available for"
msgstr ""

#: templates/settings.php:33
msgid "Add storage"
msgstr ""

#: templates/settings.php:93
msgid "No user or group"
msgstr ""

#: templates/settings.php:96
msgid "All Users"
msgstr ""

#: templates/settings.php:98
msgid "Groups"
msgstr ""

#: templates/settings.php:106
msgid "Users"
msgstr ""

#: templates/settings.php:119 templates/settings.php:120
#: templates/settings.php:159 templates/settings.php:160
msgid "Delete"
msgstr ""

#: templates/settings.php:133
msgid "Enable User External Storage"
msgstr ""

#: templates/settings.php:136
msgid "Allow users to mount the following external storage"
msgstr ""

#: templates/settings.php:151
msgid "SSL root certificates"
msgstr ""

#: templates/settings.php:169
msgid "Import Root Certificate"
msgstr ""