Compare commits

..

432 Commits

Author SHA1 Message Date
Unknwon
b3757e424f Prepare release 2017-02-27 18:38:16 -05:00
Unknwon
2381fe72cb base/tool: downgrade error to warning 2017-02-26 20:44:53 -05:00
Unknwon
e28bc7023f modes/org: code format for PR #4194 2017-02-26 15:29:16 -05:00
dlob
aff8fb28bd models/org: use XORM chain operations instead of raw SQL (#4194)
This also solved MSSQL pagination query syntax problem reported in #4176.
2017-02-26 15:19:34 -05:00
Unknwon
6a543c8066 Update README 2017-02-25 21:21:12 -05:00
Unknwon
4d90527a6e repo: does not allow fork to original owner (#4182)
But can still fork to organizations.
2017-02-25 03:52:54 -05:00
Unknwon
c64b842df9 templates: able to inject content to head and footer (#1286) 2017-02-24 18:26:41 -05:00
Unknwon
27c4252548 dashboard: fix commits CSS 2017-02-24 14:55:07 -05:00
Unknwon
10b93efc4a repo: able to add organization member as repository collaborator 2017-02-24 13:56:02 -05:00
Unknwon
0696d430c9 protect_branch: only list teams have write access
List teams without write access to the repository cause confusion
to make users think members of team could push to the branch.
2017-02-24 13:19:42 -05:00
Unknwon
68b231bd89 template: use DisplayName of users when possible (#4187) 2017-02-24 12:43:49 -05:00
Unknwon
6ec859f2b0 webhook: send secret with SHA256 HMAC hex digest (#3692) 2017-02-24 12:23:19 -05:00
Unknwon
452551fa23 webhook: highlight delivery response on click
This decreases page load time for webhook edit page.
2017-02-24 12:22:22 -05:00
Kyle Filz
ec05c64ead docker: update Dockerfile for Raspberry Pi (#4185) 2017-02-24 00:37:21 -05:00
Unknwon
cd15a17970 models/repo: delete protect branch options when delete repository 2017-02-23 18:42:03 -05:00
Unknwon
6072e9a52c repo: add protect branch whitelist (#4177)
Add options to add users and teams to whitelist of a protected
branch. This is only available for organizational repositories.
2017-02-23 18:25:12 -05:00
Unknwon
b78e03934d models/access: hasAccess only need userID not user object 2017-02-23 16:15:25 -05:00
Cyril Rohr
3c0d162961 packager: update files (#4181)
* Fix packaging

* Fix macaron vendor sha

Revision 8be5635c28f40a85ce8e8f65c6118b4ee4e548e9 does not exist

* Add build dependency for centos
2017-02-23 15:33:58 -05:00
Unknwon
48cf9edcf5 templates/repo/diff: fix tag-code doesn't display in split view 2017-02-23 13:24:59 -05:00
Unknwon
0c8c1ee96f pull: fix split view on pull request page (#3695) 2017-02-23 13:12:28 -05:00
Unknwon
7d80c5a722 mirror: does not allow create releases 2017-02-23 13:09:26 -05:00
Unknwon
5ec21d56ef editor: fix cannot redirect to correct pull request URL
Was only possible to correctly redirect to pull request page within
same repository. And didn't take care of case when upstream has
disabled pull request.

Also add a new method 'PullRequestURL' to unify the code.
2017-02-23 13:05:29 -05:00
Unknwon
266c8f5a85 release: fix unable to edit release of a fork repository 2017-02-23 11:35:33 -05:00
Unknwon
162504e90c repo/setting: fix admin cannot delete organizational repository 2017-02-22 23:16:23 -05:00
Unknwon
5ea0592f61 webhook: fix organizational webhook last delivery status cannot be updated 2017-02-22 22:55:28 -05:00
Unknwon
054e97d614 csrf: able to set custom cookie name
Add new config option '[session] CSRF_COOKIE_NAME'.
2017-02-22 21:46:43 -05:00
Unknwon
28983c94ff comment: only show title of commit message from a commit ref (#3206) 2017-02-22 08:25:26 -05:00
Unknwon
0cfa489cf0 models/git_diff: add bound check 2017-02-22 06:59:45 -05:00
Anders H
e0af5c280d locale: update TRANSLATORS (#4170) 2017-02-22 06:17:08 -05:00
Unknwon
d21dc0da78 migrate: fix unexpected removal of repository when wiki is detected 2017-02-21 22:00:45 -05:00
Unknwon
60aca9ea18 webhook: also only enable certain types (#3356)
Add new config option '[webhook] TYPES’.
2017-02-21 20:21:25 -05:00
Argentumbolo
6a8ad0b357 locale: changes relates to Ukrainian language (#4168)
- Add Ukrainian translation into templates/home.tmpl
    - Fix Ukrainian language name in conf/app.ini
          because on Ukrainian 'language' is female.
    - Add me as translator into conf/locale/TRANSLATORS
2017-02-21 17:57:27 -05:00
Unknwon
bd970b8b27 webhook: only trigger specific webhook for test delivery (#3030) 2017-02-21 15:44:35 -05:00
Unknwon
0f3155660e webhook: minor improvements on Discord 2017-02-21 13:58:00 -05:00
Unknwon
437df04d8c Prepare release 2017-02-21 12:17:39 -05:00
Unknwon
8216360da8 webhook: support color for Discord 2017-02-21 11:36:19 -05:00
Unknwon
c5b85f2733 models/repo: fix repository files weren't cleaned up (#4167) 2017-02-21 11:12:46 -05:00
Orion
ba88bb5f5f locale: update translators (#4166) 2017-02-21 09:11:44 -05:00
Unknwon
5895d43574 editor: redirect to new pull request page after create new branch 2017-02-20 22:29:15 -05:00
Unknwon
e78f252713 webhook: blank page for organization Discord type 2017-02-20 22:13:34 -05:00
Oscar Quisbert
6a78580429 locale: update TRANSLATORS (#4161) 2017-02-20 21:12:29 -05:00
Unknwon
6002d72603 router: fix 404 when repository name contains dot
E.g. atomi.github.io
2017-02-20 18:05:34 -05:00
Unknwon
934734a85a diff: able to highlight line with hashtag URL 2017-02-20 16:16:32 -05:00
Óscar García Amor
491934784f locale: add new translator (#4158) 2017-02-20 13:47:38 -05:00
Alexey Agafonov
fe69a7b116 Update home.tmpl (#4159)
Russian lang. Small fix.
2017-02-20 13:46:56 -05:00
Unknwon
0bef74d499 vendor: update github.com/go-macaron/toolbox (#2857)
Support HEAD requests of '/healthcheck' for service monitoring.
2017-02-20 13:39:46 -05:00
Unknwon
2322de653c models/webhook: fix bad query 2017-02-20 01:04:02 -05:00
Unknwon
95b94b2166 bindata: generate data for PR #4155 2017-02-19 20:12:21 -05:00
Tyler
dd4d623612 Update 'disable_register_mail' verbiage (#4155) 2017-02-19 19:55:19 -05:00
Unknwon
41a2632ae7 webhook: minor text change on Discord 2017-02-19 16:07:28 -05:00
Unknwon
f3a228ed61 vendor: update gopkg.in/macaron.v1 2017-02-19 15:51:10 -05:00
Unknwon
c4fdc26fa5 migration: drop 0.6.x support 2017-02-19 14:42:06 -05:00
Unknwon
7de71333c6 repo: several minor improvements
1. Fix sample content didn't show up when hook doesn't exist.
2. Fix CSS 'word-break' to use 'break-word' not 'break-all'.
3. Fix single quote in 'locale_en-US.ini' file.
2017-02-19 13:18:16 -05:00
Unknwon
cd9b29ff3f api: add list user and organization's repositories (#3984) 2017-02-18 23:37:16 -05:00
Unknwon
50a7c3c20d repo: able to fork own repository (#1791) 2017-02-18 23:04:11 -05:00
huqiangit
c3f52ab52d this fix #3958 (#4153)
Deal with '/' in Wiki page title.
2017-02-18 22:51:21 -05:00
Unknwon
40fbe7fa8e models/repo: handle deletion on Windows (#4152) 2017-02-18 22:47:32 -05:00
Unknwon
ef922ff757 css: cleanup unused files 2017-02-18 21:06:43 -05:00
yaourt
1841316f18 Provide an updated Dockerfile where Gogs is build with Go 1.8 (#4151)
In order to have an up to date Docker image based on alpine 3.5
  and having Gogs built with Go 1.8

Refs: [ #4145 ]
2017-02-18 20:43:27 -05:00
Unknwon
0a2f87f941 cron: add repository archive cleanup (#4061) 2017-02-18 19:35:59 -05:00
Unknwon
c69900325d commits: able to specify pageSize dynamically (#3965)
Usage: <url>?page={page}&pageSize={pageSize}

Also avoid/removed getting total commits count for pagination,
users are only allowed navigation by 'newer' and 'older'.
2017-02-18 18:37:47 -05:00
Unknwon
685737b816 locale: add Ukrainian support 2017-02-18 15:00:11 -05:00
Unknwon
5d766bc4d6 docker: improve README [CI SKIP] 2017-02-18 13:53:58 -05:00
Unknwon
1083c0cd9a admin/config: display repository related settings (#3816) 2017-02-18 13:29:43 -05:00
Unknwon
7b8f086f72 repo/settings: add description and link to personal SSH keys (#3936) 2017-02-18 12:56:06 -05:00
Unknwon
21d538a738 install: able to enable builtin SSH server (#3773) 2017-02-18 12:47:35 -05:00
Unknwon
36f448f47f footer: update Twitter handle [CI SKIP] 2017-02-18 11:55:59 -05:00
Unknwon
dbd9f05c06 vendor: update github.com/go-xorm/* 2017-02-18 11:22:44 -05:00
app
77757f6d39 I've got Translation Credits message from 无闻 (joe2010xtmf) (#4144) 2017-02-18 11:06:06 -05:00
Ganesha
018614cdf0 Update TRANSLATORS (#4146) 2017-02-18 11:05:44 -05:00
Jonas De Kegel
5d9680b00d Update TRANSLATORS (#4147) 2017-02-18 11:05:23 -05:00
Unknwon
c8982f4165 settings: fix organization panel CSS 2017-02-18 02:22:59 -05:00
wp-src
71f0dd858b Update TRANSLATORS (#4143) 2017-02-18 02:07:46 -05:00
火文狼
956bdb18c9 Update TRANSLATORS (#4142) 2017-02-18 01:33:20 -05:00
Unknwon
a07b1f630a webhook: add native Discord support 2017-02-18 00:54:56 -05:00
Unknwon
266586e866 repo: assignee can be anyone who has read access (#3739) 2017-02-17 22:17:27 -05:00
Unknwon
b481927d5e Improve error handling 2017-02-17 18:23:35 -05:00
Unknwon
7bd6052efe vendor: update gopkg.in/clog.v1 2017-02-17 18:05:41 -05:00
Unknwon
07801cbf09 repo/release: add pagination (#2164) 2017-02-17 17:41:55 -05:00
Pierre Prinetti
81e74858d8 Update TRANSLATORS (#4140) 2017-02-17 16:19:11 -05:00
Olexander Yermakov
f4e714d54a Update TRANSLATORS (#4139) 2017-02-17 15:41:23 -05:00
Alexandre Espinosa Menor
edccbc0481 Added myself (#4138) 2017-02-17 15:14:45 -05:00
Unknwon
7e09d210ba Initial version of protected branches (#776)
- Able to restrict force push and deletion
- Able to restrict direct push
2017-02-17 15:10:50 -05:00
Riste Risafov
dab768212a Update TRANSLATORS (#4137) 2017-02-17 14:07:43 -05:00
javydreamercsw
c033cfc684 Update TRANSLATORS (#4136) 2017-02-17 14:07:28 -05:00
sergystepanov
89593a82c1 Update TRANSLATORS (#4135) 2017-02-17 13:54:06 -05:00
Unknwon
ba93504804 setting: check mailService.From only if it has value (#4134) 2017-02-17 12:28:23 -05:00
Unknwon
57cb23ac81 Security: fix XSS attack on alert 2017-02-17 08:16:27 -05:00
Unknwon
5155f026b4 Security: fix XSS attack on milestone
Reported by Miguel Ángel Jimeno.
2017-02-17 08:06:48 -05:00
Unknwon
d521e716dd refactoring: SSH and HTTP push procees is now unified
We used to handle SSH and HTTP push separately which produces
duplicated code, but now with post-receive hook, the process
is unified to one single place and much cleaner.
Thus, UpdateTask struct is removed.

Narrow down the range of Git HTTP routes to reduce condufsing
HTTP Basic Authentication window popup on browser.

By detecting <old-commit, new-commit, ref-name> inside post-receive
hook, Git HTTP doesn't need to read the whole content body anymore,
which completely solve the RAM problem reported in #636.
2017-02-16 16:33:49 -05:00
Unknwon
3b49a99b60 wiki: fix crash with blob name contains tab (#3916) 2017-02-16 11:47:54 -05:00
Unknwon
f129e0ecb5 repo/editor: fix breadcrumb path cuts parent dirs (#3859) 2017-02-16 08:34:49 -05:00
Unknwon
88143f1934 models/repo: UpdateLocalCopy should always aceept valid branch name 2017-02-16 06:28:37 -05:00
Unknwon
3137665e6e Simplify description 2017-02-15 22:29:31 -05:00
Unknwon
f35bd34002 models/repo: use reset --hard to align with remote branch (#4123)
If user has force pushed to a branch, git pull will fail.
2017-02-15 21:00:46 -05:00
Unknwon
b9560ec9cb vendor: update git-module (#4128) 2017-02-15 18:34:02 -05:00
Unknwon
189924cabf repo/branch: force delete merged branch (#4128) 2017-02-15 18:24:32 -05:00
Unknwon
c2277796e4 wiki: remove redundant string replace (#3754) 2017-02-15 18:18:33 -05:00
Unknwon
f97b250509 Security: prevent XSS attach on wiki page
Reported by Miguel Ángel Jimeno.
2017-02-15 18:05:02 -05:00
Mourad Boufarguine
59981b8818 Enable syntax highlighting for CMakeLists.txt files #2199 (#4130) 2017-02-15 12:38:54 -05:00
Unknwon
40bce6310c Improve error handling 2017-02-15 12:35:24 -05:00
Unknwon
a4f9e5031f migration.v15: don't generate hook file if wiki not exist (#1623) 2017-02-15 05:45:15 -05:00
Unknwon
4da325a45c user/profile: paging doesn't respect private repository count (#4082) 2017-02-15 05:39:36 -05:00
Unknwon
fd5881fb64 migration: minor code fix (#1623) 2017-02-15 05:28:05 -05:00
Unknwon
0f6e464126 migration: should regenerate wiki hook files (#1623) 2017-02-15 05:25:51 -05:00
Unknwon
6132a82287 admin: sync wiki's hook files as well 2017-02-15 05:15:39 -05:00
Unknwon
32a868d431 wiki: handle '#' in edit page (#3767) 2017-02-15 05:10:00 -05:00
Unknwon
94f91543b6 Fix compilation error 2017-02-15 04:09:07 -05:00
Unknwon
3d52ef6e39 Solve conflicts (#3837) 2017-02-15 04:01:59 -05:00
Thibault Meyer
a45205b988 Commits fetch concurrency (#3837) 2017-02-15 03:59:53 -05:00
Unknwon
ec9c14c09d vendor: update dependency 2017-02-14 18:47:09 -05:00
Kim "BKC" Carlbäcker
b6fc35f637 Implement list/check/delete Repo Collaborator (#3689) 2017-02-14 18:45:08 -05:00
Unknwon
e24d62e583 modules/ssh: SSH_KEYGEN_PATH not used for exec ssh-keygen (#4124) 2017-02-14 18:08:26 -05:00
Unknwon
0386b5ae54 cmd/hook: check existence before call custom hook 2017-02-14 18:06:54 -05:00
Unknwon
a0253cab62 vendor: update git-module 2017-02-14 17:21:55 -05:00
Unknwon
0f32aeec70 migration: adjust rule to prevent migrate wrong hook file 2017-02-14 16:50:16 -05:00
Unknwon
78145cd166 migration: handle edge case 2017-02-14 16:40:49 -05:00
Unknwon
904f0ebec3 migration: add trace log 2017-02-14 16:30:49 -05:00
Unknwon
039dc33367 git: delegate all server-side Git hooks (#1623) 2017-02-14 16:22:16 -05:00
Christian Höppner
859009259a Typo in LocalCopyPath (#4122)
This won't fix any bugs, but a typo is a typo.
2017-02-14 07:39:55 -05:00
Unknwon
4c5255f5ad cookie: enhance cookie security (#3525) 2017-02-14 03:52:20 -05:00
Unknwon
279e475b89 webhook: match email with real user in database for test delivery (#3652) 2017-02-14 03:32:13 -05:00
Unknwon
f4aedda13a org/team: make 'new' as reserved for team name (#3789) 2017-02-14 03:16:02 -05:00
Unknwon
1381f0f28e vendor: check in missing dependency 2017-02-13 20:58:53 -05:00
Unknwon
f967e9d021 vendor: add new dependency (#3772) 2017-02-13 20:52:35 -05:00
dlob
5179063e71 Added mssql support. (#3772) 2017-02-13 20:50:00 -05:00
Unknwon
ad4bbf5173 Update new logo
[CI SKIP]
2017-02-13 19:11:31 -05:00
Egon Elbre
35f30a306b Icon redesign. (#4121) 2017-02-13 18:20:30 -05:00
Unknwon
c37d3f6486 vendor: remove unnecessary sublime files 2017-02-13 14:09:08 -05:00
Unknwon
bd786b8ef0 auth: remove MD5 for secure cookie secret (#4117)
Update vendor accordingly
2017-02-13 14:05:49 -05:00
Unknwon
d02e7d9e6a install: no need to check SMTPFrom is not set (#4118) 2017-02-13 04:20:03 -05:00
Unknwon
1c87b082c1 api/issue: minor code refactor (#3688) 2017-02-12 19:46:38 -05:00
Kim "BKC" Carlbäcker
99d86c7175 Implement more issue-endpoints (#3688) 2017-02-12 19:42:28 -05:00
Aaron Wood
68ead67a63 Use very strong ciphers (#4116)
* Use very strong ciphers

* Remove TLS_RSA_WITH_AES_256_GCM_SHA384 to be compatible with Go 1.5
2017-02-12 19:12:07 -05:00
Unknwon
2d38b75400 diff: fix can't show compare page for fork repository (#4110) 2017-02-12 18:43:26 -05:00
Unknwon
f59a607361 install: allow sender's username to be non-email (#3717) 2017-02-12 18:35:25 -05:00
Unknwon
d21767dc9f routers/repo: allow shorter SHA to download archive (#3834)
SHA length from 7-40 is now supported.
2017-02-12 18:28:42 -05:00
Unknwon
ab78d4e2b7 base/tool: reduce unnecessary report 2017-02-12 16:13:30 -05:00
Unknwon
127005d733 webhook: remove bad characters of Slack-type webhook for Discord (#4088) 2017-02-11 16:31:58 -05:00
Unknwon
0ae666f3e6 auth: few security improvements 2017-02-11 07:12:06 -05:00
Unknwon
23f2efa8c1 Update locales 2017-02-11 03:59:25 -05:00
Unknwon
5791e1398c install: validate SMTP From
Invalid SMTP From will cause fatal error in post-install and exit
the program.
2017-02-11 03:29:30 -05:00
Unknwon
9b72661767 config: show Git version in admin panel 2017-02-11 03:04:45 -05:00
Unknwon
0958fe5a4e Improve Open Graph Meta tags (#3664) 2017-02-11 00:03:10 -05:00
Simeon Radivoev
4a1dc29e23 Added Open Graph Meta tags to head template (#3664) 2017-02-10 23:37:23 -05:00
Unknwon
2ca668e79e Add more details on error report
[CI SKIP]
2017-02-10 17:11:46 -05:00
Unknwon
ee59016585 wiki: clean up broken data if migration failed (#3792) 2017-02-10 17:07:21 -05:00
Unknwon
7ac09681a2 markdown: fix mailto: doesn't recognize as valid link (#3790) 2017-02-10 17:03:27 -05:00
Unknwon
1863f38286 models/repo: fix SQLite3 database-lock when fail to delete repository (#4048) 2017-02-10 16:56:58 -05:00
Unknwon
6b6f54b79b Some file refactoring 2017-02-10 16:51:09 -05:00
Unknwon
b67ec01d41 Able to disable non-admin to create new organization (#1556)
Add new config option '[admin] DISABLE_REGULAR_ORG_CREATION', by
default it's 'false'.
2017-02-10 16:41:51 -05:00
Unknwon
2c154ccbe7 Minor improve on error handling 2017-02-10 16:05:11 -05:00
Unknwon
3f95824e65 api/repo/milestone: fix change status didn't take effect 2017-02-10 15:54:02 -05:00
spacetourist
29722af1ae Configurable SSH cipher suite (#4109)
* Configurable SSH cipher suite

* Maintain ordering
2017-02-10 14:04:43 -05:00
Unknwon
563fc7c6d7 dump: check existence before include data subdirs (#4100) 2017-02-10 11:58:04 -05:00
Unknwon
9b8fa69c15 models/ssh_key: fix SSH_KEYGEN_PATH not working (#3770) 2017-02-10 02:26:55 -05:00
Unknwon
f5dc436441 Minor improve on error handling 2017-02-10 00:11:51 -05:00
Unknwon
d9d329bec8 modules/setting: add Slack logger
Conn and email loggers are removed for now unless people requested
for them, then try to add back in gopkg.in/clog.v1
2017-02-09 23:53:57 -05:00
Unknwon
76879e977b docker: fix script 2017-02-09 20:48:02 -05:00
Unknwon
9c3c9a8eb9 Update CI settings 2017-02-09 20:11:34 -05:00
Unknwon
2fd69f13d9 vendor: check in vendors
Bye bye glide...
2017-02-09 19:48:13 -05:00
Unknwon
eb66060cd7 log: start using gopkg.in/clog.v1 2017-02-09 19:29:59 -05:00
Unknwon
8a19f8a63c Update locales
This patch also fixes #4073
2017-02-09 16:04:35 -05:00
Unknwon
f7c11a27d0 models/repo: clean up repository local copy after rename (#3641) 2017-02-09 15:56:39 -05:00
Unknwon
418dab9b96 models/pull: load attributes when fetch list of pull requests (#4089)
Code only fetched issues corresponding to the pull requests, and left
out necessary base/head repository objects, which is required later
to generate API format.
2017-02-09 15:45:35 -05:00
Unknwon
09ad42b918 dump: include data-subdirs (#4100) 2017-02-09 15:33:57 -05:00
Unknwon
074c92b0a3 routers/repo/branch: fix can't delete branch with slashes after merge (#4089) 2017-02-09 15:25:48 -05:00
Unknwon
e893e1fc63 models: set XORM log level to WARNING in production 2017-02-09 15:09:37 -05:00
Unknwon
6622b7b49a models: remove TiDB embedded driver support
Users should all start tidb-server process and connect to it as if
it is a MySQL server with MySQL drivers.
2017-02-09 09:31:38 -05:00
Unknwon
afab38b0d7 routers/repo/pull: fix 404 on PR compare (#4074)
Due to recent code refactor, ctx.PullRequest is not initialized for
route repo.CompareAndPullRequest, which leads the UI thinks the
compare is not happening inside the same repository.

The current fix is to allow compare URL to include redundant head
user name so everything works fine again, but code logic isn't
as clean as before.

Made comments about possible future fix.
2017-02-08 18:43:46 -05:00
Unknwon
ede58ade4c models/org_team: fix compile error 2017-02-08 18:18:55 -05:00
Unknwon
a2dd9ec2e1 models/org_team: panic when team num_repos is negative (#3671) 2017-02-08 18:13:46 -05:00
Unknwon
591c333dcd liberjs: pointing licenses to GitHub instead of local 2017-02-07 18:50:16 -05:00
Jorge Maldonado Ventura
6971143dc5 Make Gogs compatible with LibreJS (#4092) 2017-02-07 18:47:08 -05:00
Unknwon
5d6ea4a81b IPythonNotebook: fix a bit more CSS 2017-02-07 17:27:33 -05:00
Unknwon
2374a3ef64 IPythonNotebook: fix Markdown cell CSS 2017-02-07 17:18:18 -05:00
Unknwon
0d9e435bfe IPythonNotebook: CSS adjustment for PR #4070 2017-02-07 17:11:46 -05:00
Herbert
9af0dd23dd Ipython notebook support (#4070)
* added marked and notebookjs javascript libraries

* added ipython notebook render support using javascript libraries

* recompiled gogs.css to include ipynb-related css

* removed superflous javascript library files
2017-02-07 16:18:11 -05:00
Unknwon
39eb6df769 Fix wrong commit SHA in .gopmfile (#4093) 2017-02-07 11:23:16 -05:00
Unknwon
c0f25d24b2 Update locales 2017-02-05 22:42:01 -05:00
Crayon
4f778da35e Change copyright date to 2017 (#4079)
The copyright date in the footer was still set to 2016.
2017-02-02 20:09:24 -05:00
Unknwon
f0f8205b8b models/ssh_key: little key methods receiver rename 2017-02-01 21:34:14 -05:00
Unknwon
2bb1de1805 cmd/serve: minor code improve for PR #4078 2017-02-01 21:28:43 -05:00
Pablo Saavedra
0081c6911d Check deploy keys when Gogs is run with Service.RequireSignInView=true (#4078)
* Check deploy keys when Gogs is run with require_sign_in_view

Check if the deploy key can access to a repository. A deploy key
doesn't represent an gogs user, so in a site with Service.RequireSignInView
activated we should give read access only in the repositories where
this deploy key is in use. In other case, a deploy service or system
using an active deploy key can get read access to all the repositories
in a Gogs service.

* Refactoring: Comments starts in a new line

* Minor change in a comment

* Code cleaning. Replace spaces with tabs
2017-02-01 21:08:59 -05:00
Unknwon
2527037973 routers/repo: minor code fix for PR #3758 2017-02-01 07:24:20 -05:00
Andrey Nering
1d951cfc49 Fix 500 when repo has invalid .editorconfig (#3758)
Creating a notice instead

Fixes #3643
2017-02-01 07:21:03 -05:00
Unknwon
32a0255ce3 bindata: generate for PR #3646 2017-01-31 21:01:13 -05:00
Rémy Boulanouar
be3a13a0d6 Allow use to set an external tracker url and to redirect user when clicking in Issues same behavior as Wiki. (#3646) 2017-01-31 20:53:48 -05:00
Unknwon
d293aa9ced Do a fast-fail testing on repository URL before mirroring
To ensure the URL is accessible under good condition to prevent
long blocking on URL resolution without syncing anything.
2017-01-31 18:40:38 -05:00
Unknwon
0cfcaca351 conf: minor comments fix 2017-01-31 18:08:34 -05:00
Unknwon
412ba5b2a9 Prepare for release 2017-01-31 07:36:59 -05:00
Unknwon
c17f93e6c0 Makefile: remove -buildmode=pie 2017-01-30 15:28:42 -05:00
Unknwon
a5afa37203 Makefile: fix string concatenation 2017-01-30 15:24:31 -05:00
Unknwon
6bfbed0616 Use commit time instead of author time for push commits (#4037) 2017-01-30 13:38:16 -05:00
Unknwon
185c90df12 Skip deletion for temporary data when not exist on Windows (#4069) 2017-01-30 13:30:04 -05:00
Unknwon
7463d9c51d Fix can not save release draft as draft again (#3669)
But release was not saved as draft in the first time, is not
possible to be draft afterwards because the Git tag was created.
2017-01-30 13:21:24 -05:00
Renato P. de Aquino
ec5a967937 Issue #3814 (#3903) 2017-01-30 08:35:12 -05:00
Unknwon
4bc98f7aa2 Move models/mail.go to modules/mail.go
To use interface to replace *models.User in avoiding cycle import.
2017-01-30 07:20:48 -05:00
Unknwon
207960b459 Fix create user can use user email which is used (#4016) 2017-01-29 18:29:53 -05:00
Unknwon
7b3b46c675 Fix showing total number of PRs when user does not have any repositories (#4007) 2017-01-28 20:17:01 -05:00
Unknwon
5e01ecbc05 Able to set custom Access-Control-Allow-Origin header (#3987)
Added new config option '[http] ACCESS_CONTROL_ALLOW_ORIGIN'.
2017-01-28 19:59:17 -05:00
Dennis Chen
c98aa0e895 api: display repository forks (#3252)
Lists the forks of a repository at the /:user/:repo/forks endpoint.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
2017-01-28 17:59:21 -05:00
Aaron Wood
263203ec28 Produce a position independent executable (#4011)
* Produce a position independent executable

* Add OS detection to the main Makefile so we don't apply -pie on OS X
2017-01-28 17:16:34 -05:00
Denis Denisov
84f28fc5d6 Safe compare password (timing attack) (#4064) 2017-01-28 13:28:52 -05:00
Unknwon
9144ea2b1d Fix inappropriate CSS rule for Markdown on wiki page (#3766) 2017-01-28 09:47:16 -05:00
Unknwon
0d73dcaf0f Fix cross-repository reference link error (#4025) 2017-01-28 09:40:32 -05:00
Unknwon
a6a3afd130 Update locales 2017-01-28 05:54:05 -05:00
Unknwon
7aa53635fe Add 'Organizations' page to user settings (#3587)
User is now able to view full list of organizations belongs to.
2017-01-27 22:36:45 -05:00
Rémy Boulanouar
2ee0c61e62 Setting orgs (#3587)
* Implement organizations listing in setting and allow user to create new organization.

* Implement organizations listing in setting and allow user to create new organization.

* Add space remove by mistake

* Remove unused part of the template

* Update display and behavior according to @Unknown remarks
2017-01-27 22:02:27 -05:00
Unknwon
3d23c13160 Add AppVeyor badge to README 2017-01-27 19:42:41 -05:00
Unknwon
e2afd886fd Update appveyor.yml 2017-01-27 19:33:40 -05:00
Unknwon
aa682b3b7e Add appveyor.yml 2017-01-27 19:25:00 -05:00
Unknwon
e43479d948 Fix changed branch is not reflected when creating PR (#3604) 2017-01-27 18:56:32 -05:00
Unknwon
a2f2f7717a Fix template error when rendering non-README markdown (#4063) 2017-01-27 16:52:19 -05:00
cybe
740192564b Verify repository is not bare before retrieving blob. (#3996) 2017-01-27 07:09:25 -05:00
Unknwon
8bcc0e392e Update XORM required version and 'go fmt' 2017-01-26 17:49:29 -05:00
Unknwon
ae319da5fd Disable local path migration by default (#4033)
Site admin now has to enable manually by config option
[repository] ENABLE_LOCAL_PATH_MIGRATION = true.
Site admin always grants this permission, but regulars users have
to be allowed by site admins in admin user panel.
2017-01-26 17:43:37 -05:00
Unknwon
6d6848af5c Fix log depth of AvatarLink 2017-01-26 17:22:25 -05:00
Unknwon
0d60b58434 templates/repo: rename 'Code' to 'Files' 2017-01-25 18:15:37 -05:00
Unknwon
ad57f18894 modules/sync: minor field refactor 2017-01-25 18:10:27 -05:00
Óscar García Amor
80cd8f6a29 Fix #3714 (#4060) 2017-01-25 17:48:31 -05:00
Unknwon
8cb903fbbb Fix unexpected rendering of README when it is not in Markdown
This patch also handles case when a file name looks like README
but is not a text file (e.g. image, PDF).
2017-01-25 07:10:52 -05:00
Unknwon
d1c327d508 repo/home.tmpl: only ellipsis on repository name
File name could contain non-ASCII characters.
See details on https://discuss.gogs.io/t/topic/758.
2017-01-24 21:15:44 -05:00
Óscar García Amor
eaf57229d3 Fix notification email issues (#4055) 2017-01-24 08:18:14 -05:00
atzoum
4e967bc765 Dockerfile for aarch64 (odroid c2 & pine64) (#4018) 2017-01-23 18:31:24 -05:00
Aaron Wood
64788ffff6 Remove call to set GOMAXPROCS (#4010)
* Remove call to set GOMAXPROCS

* Remove runtime import
2017-01-23 18:30:40 -05:00
Joakim Fremstad
3143e35d83 Reword README.md (#4047) 2017-01-23 18:30:29 -05:00
Unknwon
8d5a693382 locale: remove unused locale string 2017-01-23 14:33:25 -05:00
Sandro Santilli
1e185787a9 Enable federated avatars by default (#3997) 2017-01-22 06:03:38 -05:00
Unknwon
1b2ecde1c9 Update locales 2017-01-21 20:12:19 -05:00
Unknwon
e8c3e9bcf8 Improve code for fix of #4006 2017-01-03 11:02:14 +08:00
Unknwon
cdfcef04a1 Fix incorrect logic check for fork repo action 2017-01-03 10:39:05 +08:00
Unknwon
8aa35577b3 Fix vulnerability reported in #4006 2017-01-03 10:36:27 +08:00
Unknwon
c4086d43db Update locales 2017-01-01 13:33:24 +08:00
Unknwon
8059175a5c Fix dashboard issues/pull request counting 2016-12-27 22:01:18 +08:00
Unknwon
f8fd084bd2 Fix dashboard issue/pull request scoping 2016-12-27 20:32:27 +08:00
Unknwon
d528704503 Minor code fix for PR #3560 2016-12-27 20:26:35 +08:00
Unknwon
98076ee72d Upgrade Sematic UI to 2.2.7 2016-12-27 18:56:21 +08:00
hgaiser
e6ef75204b Fix assigned/created issues in dashboard. (#3560)
* Fix assigned/created issues in dashboard.

* Use GetUserIssueStats for getting all Dashboard stats.

* Use gofmt to format the file properly.

* Replace &Issue{} with new(Issue).

* Check if user has access to given repository.

* Remove unnecessary filtering of issues.

* Return 404 error if invalid repository is given.

* Use correct number of issues in paginater.
2016-12-27 18:54:24 +08:00
Joel-Liang
d674cb7f20 Fix wrong anchors for non-latin headings (#3981)
Change Javascript regular expression to match non-latin characters
The regex comes from here: http://stackoverflow.com/questions/150033/regular-expression-to-match-non-english-characters#comment22322603_150078

And this patch should fixed these two issues: #3919 #3843
2016-12-26 22:37:20 -05:00
Unknwon
114c179e5a Update .gopmfile and glide.lock 2016-12-23 21:53:30 -05:00
Unknwon
598e062241 Add Galician support
- Update locales
2016-12-23 21:06:15 -05:00
David A. Lareo
bf70082c22 New locale "galician" (#3917) 2016-12-23 20:53:24 -05:00
Unknwon
2994272e91 Code fix for PR #3748 2016-12-23 20:44:27 -05:00
typeless
cdedc2d188 Use temporary file to avoid out-of-memory when receiving big chunks. (#3748)
* Use temporary file to avoid out-of-memory when receiving big chunk.

Not perfect but I think it's a reasonable solution.
For small request bodies, I suppose performance wouldn't be an issue.
For large ones, this seems to be a necessary evil.

* Must close the open file to avoid fd leaks
2016-12-23 19:50:12 -05:00
Unknwon
42a3bbb0f4 Fetch before Checkout when create pull request (#3699) 2016-12-23 19:36:16 -05:00
Unknwon
eb79532812 Minor fix for PR #3436 2016-12-23 19:00:24 -05:00
lstahlman
5feb68a589 Improve issue references in markdown. (#3436) 2016-12-23 18:49:53 -05:00
Unknwon
03f7f3ee67 Some code renaming 2016-12-22 19:58:30 -05:00
Unknwon
6383bf7480 Fix reported vulnerability
Ability to use labels from arbitrary repositories.

Reported by Miguel Ángel Jimeno.
2016-12-22 19:44:59 -05:00
Unknwon
f471ef1bc7 Fix vulnerability reported in #3962 2016-12-22 19:35:06 -05:00
Unknwon
7ebe0a9916 Fix vulnerabilities reported in #3959 2016-12-22 19:19:56 -05:00
Unknwon
89e93fe01e Minor code fix for PR #3602
Closes #1122
2016-12-22 03:49:50 -05:00
raphael10241024
0f8a5fdf49 fix bug #1122 log.smtp receiver configure error (#3602) 2016-12-22 03:45:51 -05:00
Gian Perrone
3c91c9063b Enable Ubuntu 16.04 build at packager.io (#3617) 2016-12-22 03:41:54 -05:00
Unknwon
e629c7583b Fix #3675
Closes #3676
2016-12-22 03:35:53 -05:00
ipavl
539b07e205 Pluralize "Statistic" (#3665)
Other locales appear to use the plural version, and the text is being associated with more than one statistic.
2016-12-22 03:26:33 -05:00
Unknwon
16d3e7085e Minor fix for PR #3667 2016-12-22 01:51:49 -05:00
Thibault Meyer
c47fbc629b Feature #2583: Disable HTTP cloning (#3667)
* Can disable GIT interactions by HTTP protocol

* rename variable + fix wiki link

* missing space
2016-12-22 01:42:04 -05:00
Unknwon
d04b19545d Code fix for PR #3547 2016-12-22 01:28:06 -05:00
Kurt Madel
3b0e2c1c3f PR Webhook - Add base/head info (#3547)
* messing with getting local go-gogs-client

* coding style fix

* added comments for required fields
2016-12-22 01:01:15 -05:00
Unknwon
79a2745b4a Set ProdMode in the correct place
Closes #3696, #3611

Previously, ProdMode can only be true for web server,
which always prints dev mode log message to incoming SSH
connections and leaks unexpected information.
2016-12-22 00:27:45 -05:00
Unknwon
6cc992ea54 Minor fix for PR #3687 2016-12-21 23:52:11 -05:00
Stefan Grönke
3376354ed8 Check if file is a symlink with web editor (#3687)
* editor checks for symlinks

* translate file_is_a_symlink message

* credit translation author
2016-12-21 23:49:56 -05:00
Unknwon
c2e1370588 Update README
[CI SKIP]
2016-12-21 22:47:55 -05:00
Thibault Meyer
93616fe776 Fix regex on route file (#3851) 2016-12-21 19:46:43 -05:00
Najeeb R
e5972bbcde #3480 Fix new ssh key adding issues (#3565)
* #3480 Fix new ssh key adding issues

Added regular exp match (108) and remove training new line (111) that cause system to think its an ssh2 key.

* #3480 Fix new ssh key adding issues

-Sanitizate new lines (windows format) in posted key
-Edit sanitization implementation to use string replace for code readability and maintenability.
2016-12-21 19:35:48 -05:00
Flare
952e510dfa Added public entries to reserved keywords list
Closes #3728
2016-12-21 19:24:23 -05:00
Unknwon
8f442dde03 Dirty hack for #3905
I beileve this is a bug in XORM which wrongly identifies a struct
to inappropriate table name. Also seems to be random.
2016-12-21 05:11:52 -05:00
Unknwon
c1e53cdc72 Minor fix for PR #3822 2016-12-21 04:18:23 -05:00
stroucki
e9f6a43073 Fix database write context interleaving bug (#3822)
* UpdateIssueUsersByMentions was calling database write operations while
a transaction session was in progress. MailParticipants was failing
silently because of the SQLITE_LOCKED error. Make sure failures in
MailParticipants enter the log, and pass on the transaction context.

issue: let caller pass in database context, and use it
issue_comment: obtain database context to pass to UpdateIssueMentions
issue_comment: log any error from call to MailParticipants
issue_mail: pass on database context to UpdateIssueMentions

* issue: forgot debug statement
2016-12-21 04:11:07 -05:00
Unknwon
67380cf47b Minor code fix 2016-12-21 04:08:23 -05:00
LefsFlare
39fdb0f9c4 Fixed 404 caused by unexpected question mark (#3668)
This fixes 404 caused when creating new files or wiki pages with question marks.
2016-12-21 04:05:49 -05:00
imilo
85fbd6e9c6 New settings option for a custom SSH host (#3763) 2016-12-21 03:46:54 -05:00
Mateusz Hromada
2cfdce88e0 Check for zero length passwords in LDAP module. (#3827) 2016-12-21 03:43:37 -05:00
Саша Иванов
ca6cbb95cc #3791 update LDAP username check (#3906) 2016-12-21 03:43:22 -05:00
leonklingele
7cb440273c Don't use custom PBKDF2 function (#3952)
Instead, use golang.org/x/crypto/pbkdf2
2016-12-21 03:42:44 -05:00
leonklingele
d96f2a7184 Fix random string generator (#3953)
* Remove unused custom-alphabet feature of random string generator

* Fix modulo-biased random string generator

* Random string generator should return error if it fails to read random data via crypto/rand
2016-12-21 03:41:37 -05:00
Nico Mandery
adcb1d7c65 serve video files using the HTML5 video tag (#3967) 2016-12-21 03:40:23 -05:00
afilippov1985
04fbfad2d4 init script for gentoo (#3761) 2016-12-21 03:38:07 -05:00
SeongAhJo
bab051a8c1 Fix Typo Errors (#3885)
* Fix typos

* Fix typos
2016-12-21 03:33:30 -05:00
leonklingele
ad6de46ce4 Fix typo: 'passowrd' -> 'password' (#3951) 2016-12-21 03:31:40 -05:00
Bo Zhang
282f7fb8fa Fix typos (#3852) 2016-12-21 03:13:11 -05:00
M5oul
5034ef787c [mod] readme: update YunoHost package link. (#3881) 2016-12-21 03:12:53 -05:00
Sandro Santilli
3925166d31 Add support for using "libravatar" as the GravatarSource (#3969)
Just to make it easier for administrator to configure libre avatar,
as it is done for "duoshuo" and "gravatar"
2016-12-21 03:10:15 -05:00
Alexander Lunegov
7358e46815 Fix string format verbs (#3637) 2016-12-21 02:09:43 -05:00
Unknwon
8f09fc64bd Minor fix for PR #3624 2016-12-21 01:48:11 -05:00
Kim "BKC" Carlbäcker
b2de3d71c5 More Issue-Comments API-endpoints (#3624)
* ListAllInRepo & Delete Issue-Comments

* Moar data in issue-comments
2016-12-21 01:21:15 -05:00
Unknwon
44ed991726 Merge branch 'develop' of https://github.com/tanapoln/gogs into develop 2016-12-21 00:49:44 -05:00
Unknwon
34b92cdb44 Fix #3905 2016-12-20 23:23:57 -05:00
Unknwon
d3b2ff17d6 Update locales 2016-12-20 22:35:55 -05:00
Unknwon
cc45a8ab06 cmd: new command 'import locale'
Quickly import locale files downloaded from Crowdin.
2016-12-20 22:34:58 -05:00
Unknwon
105c528369 Add Korean support 2016-12-20 21:59:59 -05:00
Unknwon
5d0b334d56 Update git-module required version 2016-12-20 21:28:32 -05:00
Unknwon
b092733c2e Update git-module version to support back Git 1.7.1 2016-12-08 11:44:45 -05:00
Unknwon
baeccdb161 Add github.com/go-xorm/builder to dependency 2016-11-23 21:04:16 -05:00
Unknwon
394fc61129 Update glide.lock and .gopmfile for XORM 2016-11-23 20:58:45 -05:00
Unknwon
55dc9d898f Drop Go 1.4 support
Due to golang.org/x/crypto/ssh requires a method from STD in Go 1.5.

And Go 1.4 is fairly old version for now.
2016-11-23 20:23:18 -05:00
Unknwon
552d5c7ceb Update glide.lock and .gopmfile
Closes #3690 #3727
2016-11-23 20:06:41 -05:00
Unknwon
95065de39a Fork go-libravatar to remove import path check
To use GitHub import path as much as possible.
2016-11-19 21:55:21 -05:00
Unknwon
a3ea4b8802 Update locales and add Swedish 2016-11-19 21:40:13 -05:00
Rémy Boulanouar
6bcff7828f Fix mention in comments like (@dblk) (#3655)
* Fix mention in comments like (@dblk)

* Better fix to avoid making link for "Hello@DblK"
2016-10-16 22:17:59 -04:00
LefsFlare
2cb5ec5983 Prevented user enumeration of valid users through HTTP status codes of login (#3639) (#3654) 2016-10-16 22:08:40 -04:00
LefsFlare
2bec8a4f1e Changed interface (#3685) 2016-09-22 19:38:12 -04:00
Unknwon
7e15ff9486 Update locales
Add new locale Serbian (Cyrillic)
2016-09-15 20:03:36 -04:00
Unknwon
12445fe2ed Add build system link to README [CI SKIP] 2016-09-08 20:56:05 -04:00
Unknwon
491407ddf8 #3590 fix 404 for release draft edition
Closes #3591
2016-09-03 06:00:59 -04:00
Unknwon
6da55159a2 #3589 LoadRepoConfig after ORM is initialized 2016-09-02 23:18:37 -04:00
Tanapol Nearunchorn
73fedc7275 provide button to delete merged pull request 2016-09-02 10:12:21 +07:00
Unknwon
c50d59874d #3577 incorrect URL produced by AvatarLink 2016-09-01 12:36:26 -04:00
Daniel Oaks
b3d9ca4ccd Add the ability to explore organizations (#3573)
* Add ability to explore organizations

* Use right icon for org explore links
2016-09-01 09:08:05 -04:00
Daniel Oaks
4efaf8e882 Fix repo list display on Safari (#3569) 2016-09-01 08:04:25 -04:00
raphael10241024
178556142a fix link error under preview (#3566) 2016-09-01 06:01:27 -04:00
Unknwon
7c1fbed057 Fix panic when attempt login with non-exist user 2016-09-01 05:12:34 -04:00
Thibault Meyer
bc902b8f74 Feature #3492: Add option to hide footer load times (#3562)
* Add option to hide footer load times

* Rename option variable + minor changes
2016-09-01 01:01:32 -04:00
Unknwon
8ee14db51e Update locales 2016-09-01 00:35:04 -04:00
Rémy Boulanouar
5d35578811 Update size of SHA to fix #3538 (#3563) 2016-08-31 14:22:17 -07:00
Corben Dallas
d09fca3ca9 Add a (Open)SuSE init script (#3558) 2016-08-31 14:04:21 -07:00
Unknwon
dadd35b636 #3559 fix template error 2016-08-31 13:59:23 -07:00
Unknwon
c2afdf2192 Minor code fix [CI SKIP] 2016-08-31 04:31:53 -07:00
Unknwon
152e715999 models/login_source: code improvement 2016-08-31 01:22:41 -07:00
Unknwon
99c2ae7b35 #3515 use alert instead 500 for duplicated login source name 2016-08-31 00:56:10 -07:00
无闻
cd9b926af7 Support Editorconfig on web editor (#3512) 2016-08-30 16:47:22 -07:00
Andrey Nering
9ac46fb983 Support Editorconfig on web editor 2016-08-30 20:30:47 -03:00
Unknwon
8516dfcb6c #2018 able to sync now for mirrors
- Refactor code to use sync.UniqueQueue
- Closes #3509
2016-08-30 16:18:33 -07:00
Unknwon
c1ecb6c60a modules/sync: add UniqueQueue 2016-08-30 15:50:30 -07:00
Unknwon
43297148b2 modules/sync: rename SingleInstancePool to ExclusivePool 2016-08-30 15:19:53 -07:00
Unknwon
c0c1a4b01b js: fix comment issue status button title change 2016-08-30 14:37:46 -07:00
Sandro Santilli
47a3243ff1 Add all, check and dist Makefile rules (#3549)
These are to follow the GNU Coding Standards Makefile Targets:
https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
2016-08-30 14:06:05 -07:00
Unknwon
22e14a0a67 templates/repo/view: fix bad link 2016-08-30 13:59:41 -07:00
Unknwon
48a0b5b026 UI: fix block selection on code for empty line are not highlighted 2016-08-30 06:03:38 -07:00
Unknwon
16eb2eb6a3 Fix import path 2016-08-30 05:49:54 -07:00
Unknwon
e6ec1ca1f8 #3548 disable issue cannot edit label and milestonefor pull requests 2016-08-30 05:30:47 -07:00
Unknwon
6f90835f95 Make bindata 2016-08-30 05:24:34 -07:00
Unknwon
643142acab Web editor: support upload files 2016-08-30 05:23:59 -07:00
Unknwon
7c31f235da Web editor: support upload files 2016-08-30 05:12:37 -07:00
Kim "BKC" Carlbäcker
4f40019130 codegangsta/cli => urfave/cli (#3546) 2016-08-30 04:57:58 -07:00
Unknwon
780cc2d110 router/repo: code refactoring 2016-08-30 02:08:38 -07:00
Unknwon
2a13f682e0 Bump git-module required version 2016-08-29 23:57:22 -07:00
Unknwon
28cf0e6aaa #3459 code quality improvement 2016-08-29 20:00:06 -07:00
Thibault Meyer
92fb30c526 Load a set of predefined labels (#3459)
* Can use a predefined set of labels

* Change UI

* Fix HTML file indentation

* Avoid reading file from other directory (security issue)

* Apply a better fix

* Remove not used variable

* Merge upstream/develop

* Do modifications

* Raname

* remove binding + rename variable
2016-08-29 19:02:49 -07:00
Andrey Nering
9f44c26789 Update .editorconfig (#3534)
[CI SKIP]
2016-08-29 18:05:44 -07:00
LFlare
3738b6399e Fixed typo (#3533)
Git convention has it capitalised.
2016-08-29 11:31:12 -07:00
Unknwon
62b0dc4853 Web editor: fix cannot create new file in subdirectory 2016-08-29 00:10:21 -07:00
Unknwon
429c92c0ce #3516 enforce line ending to be \n from web editor 2016-08-28 05:32:10 -07:00
Unknwon
579e5e4fee Web editor: disallow edit mirror repository 2016-08-28 04:56:41 -07:00
Unknwon
ba27d71abe Web editor: improve edit file 2016-08-28 04:31:42 -07:00
Unknwon
7115e3a4d5 css: remove profile avatar height 2016-08-28 03:19:27 -07:00
Unknwon
0114fdcba4 Web editor: improve delete file process 2016-08-28 01:41:44 -07:00
Unknwon
dad5c15520 #2901 allow setting preferred licenses
- Closes #3488
2016-08-28 00:06:22 -07:00
Unknwon
6e171c5225 Web editor: improve edit file tooltip 2016-08-27 15:25:01 -07:00
Unknwon
f0b5c3b90a #3448 redirect if any after sign in 2016-08-27 15:07:02 -07:00
Unknwon
c30b856d14 #3505 use user’s info for committer and author 2016-08-27 13:37:55 -07:00
Unknwon
13c106af77 label: adjust forecolor boundary 2016-08-27 12:44:39 -07:00
Unknwon
ce1e4348da #3521 fix wiki HTTP/S clone URL does not have .wiki suffix 2016-08-27 12:29:52 -07:00
Unknwon
13a8823bd3 #3495 only start builtin SSH server after user finish installation 2016-08-27 12:25:22 -07:00
Unknwon
bbca2916f7 Update highlightjs 2016-08-27 11:56:20 -07:00
Unknwon
37305a59ca migrations: sync table first 2016-08-26 17:32:41 -07:00
Unknwon
bb359a74f1 migrations: set comment updated as created 2016-08-26 14:07:21 -07:00
Unknwon
6b98d58906 #2966 code cleanup 2016-08-26 13:40:53 -07:00
Iwan Budi Kusnanto
8dca9f95fa issues comment API : list, create, edit (#2966)
add `since` query string support to list issue comment
2016-08-26 11:23:21 -07:00
Thibault Meyer
f50e568fd1 Fix #3189: Sort labels by name (#3446)
* Fix #3189 #3445: Order labels by name

* Order labels by name on Issues view
2016-08-25 17:43:53 -07:00
Unknwon
f8a48ffaad Web editor: improve code quality 2016-08-24 21:35:03 -07:00
Kurt Madel
67fb0fe6a5 added support to set pull_request event from api (#3513) 2016-08-24 20:44:58 -07:00
Unknwon
0b273ac4d5 #3383 code cleanup 2016-08-24 16:05:56 -07:00
lstahlman
84b56c3c53 Additional API support for milestones (#3383) 2016-08-24 15:18:56 -07:00
Kim "BKC" Carlbäcker
06602a84ff Fix PR-webhook issue where Label-data is stale (#3486) (#3510)
* Fix PR-webhook issue where Label-data is stale

* Conventions \o/

* logs are nice if they're consistent...
2016-08-24 12:01:30 -07:00
Kim Carlbäcker
b710f6bd65 Update gopmfile and glide.lock (#3508) 2016-08-23 14:53:16 -07:00
rugk
95bd19c509 libravatar.org supports HTTPS (#3498) 2016-08-23 09:50:33 -07:00
Kim Carlbäcker
7c5710d31f Issues can be closed via API (#3170) (#3479)
* Issues can be closed via API

* Error-checking is nice xD

* EditIssueOption.Status => State

* Use const instead of string-literal
2016-08-23 09:09:32 -07:00
Unknwon
7f7216be6e Code quality improvement on JS 2016-08-17 22:44:07 -07:00
Unknwon
ec332cf903 Minor naming improvement 2016-08-17 16:10:07 -07:00
Thibault Meyer
2c5411b00c Fix #3361: Dumps are created world readable (#3473)
* Set dump file permission to 0600

* Typo
2016-08-17 11:38:42 -07:00
Unknwon
a00c932bbc General code quality improvement 2016-08-16 23:06:38 -07:00
Unknwon
6f9a95f830 #2246 add HTMLURL to webhook type
- Fill Milestone and Assignee field when available in webhook payload
2016-08-16 10:19:09 -07:00
Unknwon
8bf57be9ba Fix git diff tests 2016-08-16 07:45:06 -07:00
Unknwon
b1504ed99a #3464 add diff signs which does not have inline diff 2016-08-16 07:37:28 -07:00
Unknwon
9349def72e #3464 reproduce diff signs
Commited wrong file.
2016-08-16 07:33:53 -07:00
Unknwon
6cda35a75f #3464 reproduce diff signs 2016-08-16 07:31:54 -07:00
Unknwon
2625193a48 models/repo_editor: improve code quality 2016-08-15 22:20:55 -07:00
Unknwon
f3c3258921 Fix repository owner can assign self 2016-08-15 18:48:20 -07:00
Unknwon
4042d1f0c3 models/issue: improve quality and performance of NewIssue function 2016-08-15 18:40:32 -07:00
Unknwon
4a46613916 markdown: fix treating pure number as SHA1
- Detect non-exist commit and return 404 not 500
2016-08-15 15:27:19 -07:00
Unknwon
6c8fcb3af2 #3467 fix clone fail when wiki is empty 2016-08-15 15:09:34 -07:00
Unknwon
61e27dedf7 #3466 fix response of pull request form validation error 2016-08-15 14:04:44 -07:00
Unknwon
94392a7af3 Fix empty repository panic on send test webhook 2016-08-15 05:53:47 -07:00
Unknwon
cc647ba9d5 #3461 fix security issue of REAMDE path in create repository 2016-08-15 02:35:54 -07:00
Unknwon
5e89485cec Update README [CI SKIP] 2016-08-15 02:12:18 -07:00
Unknwon
8637e67e6f Fix outdated edit can’t overwrite changes 2016-08-15 02:06:35 -07:00
Unknwon
4a19fd6441 Web editor: temporarily disable upload and quick fix for edit and new
Try to merge into develop branch ASAP, then continue minor fixes afterwards.
2016-08-15 01:42:20 -07:00
Unknwon
54e0ada9d5 Web editor: improve delete file 2016-08-14 23:52:24 -07:00
Unknwon
cd89f6c502 Web editor: improve edit file and diff preview 2016-08-14 23:52:24 -07:00
Unknwon
660e7a178a modules/sync: move sync objects to independent module 2016-08-14 23:52:24 -07:00
Unknwon
15845cb287 Code clean up for new config options 2016-08-14 23:52:24 -07:00
Richard Mahn
d0a0239bac Squashed commit of the following:
commit 0afcb843d7
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 17:13:29 2016 -0600

    Removed Upload stats as the upload table is just a temporary table

commit 7ecd73ff55
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 08:42:41 2016 -0600

    Fix for CodeMirror mode

commit c29b9ab531
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 08:03:33 2016 -0600

    Made tabbing in editor use spaces

commit 23af384c53
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:56:46 2016 -0600

    Fix for data-url

commit cfb8a97591
Merge: 7fc8a89 991ce42
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:42:53 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go
    	public/js/gogs.js

commit 7fc8a89cb4
Merge: fd3d86c c03d040
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:40:00 2016 -0600

    Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file

commit fd3d86ca6b
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:39:44 2016 -0600

    Code cleanup

commit c03d0401c1
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 29 15:38:23 2016 -0600

    Code cleanup

commit 98e1206ccf
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Thu Jul 28 18:36:01 2016 -0600

    Code cleanup and fixes

commit c2895dc742
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Thu Jul 28 18:24:04 2016 -0600

    Fixes per Unknwon's requests

commit 6aa7e46b21
Merge: 889e9fa ad7ea88
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Thu Jul 28 17:13:43 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go
    	modules/setting/setting.go

commit 889e9faf1b
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 22 14:09:18 2016 -0600

    Fix in gogs.js

commit 47603edf22
Merge: bb57912 cf85e9e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 22 14:07:36 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go
    	public/js/gogs.js

commit bb57912558
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 22 14:02:18 2016 -0600

    Update for using CodeMirror mode addon

commit d10d128c51
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Tue Jul 19 16:12:57 2016 -0600

    Update for Edit

commit 34a3498202
Merge: fa1b752 1c7dcdd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Tue Jul 19 11:52:02 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go

commit fa1b752be2
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 15 18:35:42 2016 -0600

    Feature for editing, creating, uploading and deleting files
2016-08-14 23:52:24 -07:00
Unknwon
7e7613cdec Fix template nil error 2016-08-14 23:43:13 -07:00
Unknwon
a5b88c4d0c Fix template error [CI SKIP] 2016-08-14 16:45:15 -07:00
Unknwon
dccb0c15b9 Replace convert.To with APIFormat calls 2016-08-14 04:17:26 -07:00
Unknwon
3f7f4852ef #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Unknwon
0f33b04c87 Add subcommand to create new user in CLI 2016-08-13 16:11:52 -07:00
Unknwon
fd3b9ca3aa CSS: remove font “Meiryo Ui” 2016-08-12 22:05:20 -07:00
Justin Ray Vrooman
f1a5a4277d fix grammar + typo. (#3453) 2016-08-12 17:06:07 -07:00
Unknwon
f59d2dd034 Code clean up 2016-08-12 03:04:50 -07:00
Unknwon
5be881756b #3442 add test suites 2016-08-12 02:56:50 -07:00
Thibault Meyer
4296427214 Fix #3437: Cannot connect to PostgreSQL via IPv6 address (#3442)
* Change PostgreSQL connstring parsing to handle IPv6

* Fix used variable

* Remove redundant code + use variable
2016-08-12 02:42:06 -07:00
Unknwon
7551141dbe Minor fix on top menu dropdown icon position 2016-08-11 23:12:06 -07:00
Unknwon
5544a7037b Add new dependency 2016-08-11 17:12:55 -07:00
Andrey Nering
dbed39ba05 On showing diff/file, use the tab_width specified on .editorconfig, if any (#3241)
Closes #3182
2016-08-11 17:07:09 -07:00
Unknwon
aa1fc30b89 Add .mailmap 2016-08-11 16:57:48 -07:00
Andrey Nering
fa12c282f6 Add Content-Disposition header for downloads (#3439) 2016-08-11 16:53:40 -07:00
Andrey Nering
25b23c4bc9 Do not show non-image attachment in a <img> tag. Fixes #3215 (#3311) 2016-08-11 16:16:36 -07:00
Thibault Meyer
7eafe3213f Fix #3321: commit tag shortener (#3418)
* Fix #3321: commit tag shortener

* Check short commit

* remove debug

* Edit unit tests

* Show 10-char short SHA
2016-08-11 15:34:00 -07:00
Unknwon
2cb04db526 Fix #3391 2016-08-11 15:29:39 -07:00
Unknwon
96f92e6105 Fix email FROM 2016-08-11 15:16:01 -07:00
Unknwon
a47aef5460 #2852 code cleanup 2016-08-11 14:55:10 -07:00
Odin Ugedal
1dd003bd4c Add initial support for unix sockets (#2852) 2016-08-11 14:46:33 -07:00
Unknwon
70fbcd2f27 models: rename EnableTidb to EnableTiDB 2016-08-11 14:38:45 -07:00
Unknwon
5850308a37 #3013 support connect PostgreSQL via unix socket 2016-08-11 14:38:26 -07:00
Thibault Meyer
53c573ed02 Fix #3314: Cannot edit release with tag name contains slash (#3434) 2016-08-11 13:45:42 -07:00
Unknwon
10b47eddd2 Update glide.lock and .gopmfile [CI SKIP] 2016-08-11 11:51:12 -07:00
Robin Lambertz
5a9709fa9d Add MaxRepoCreation to EditUser API (#2781) 2016-08-11 11:49:31 -07:00
Unknwon
7e9b42c87d #2780 code clean up 2016-08-11 11:35:46 -07:00
Robin Lambertz
b6c14f8b21 Add AddCollaborator API Endpoint (#2780)
* Add AddCollaborator API Endpoint

* Add optional Permission to AddCollaborator endpoint

* Use APIContext
2016-08-11 11:23:25 -07:00
Unknwon
5077408d78 #3233 code cleanup and minor issue fix 2016-08-11 10:53:51 -07:00
Andrew
0885784f13 Wiki mirroring implementation (#3233)
* Implement wiki mirroring, add Update mirrors operation to admin dashboard

* bindata.go update after merge

* Implement checking Git repo endpoint existence, support for BB included

* Remove admin dashboard operation
Fix bindata.go

* Apply gofmt to repo model file

* Try to remove bindata from PR

* Revert accepted wiki names change in favor of better system

* Remove unused imports
2016-08-11 10:18:51 -07:00
Sandro Santilli
3380c946e1 Always set redirect_to on header-provided sign-in (#3435)
This is an attempt to fix #3089 following the strategy introduced
in d625e41c6c, although that strategy
by itself does not seem to be sufficient.

What needs be done is honouring the redirect_url query parameter
from the auth router.
2016-08-11 10:14:39 -07:00
Unknwon
d625e41c6c #3408 minor code fix 2016-08-11 07:41:01 -07:00
Sandro Santilli
eb1bfe0e59 Do not show the "Sign up for free" button in issue tracker (#3408)
* Do not show the "Sign up for free" button in issue tracker

The "Sign in to comment" link is good enough and will correctly
show or not show the "Sign Up" button link for those not having
an account already.

Fixes #3407 (link to nowhere when registration is disabled)

* Move html from translation to template

* Remove extra space in `{{ .SignInLink }}`.
2016-08-11 07:36:23 -07:00
Unknwon
042d350762 Fix only user has repo write access can comment 2016-08-11 06:22:56 -07:00
Unknwon
0f26f3678a #3279 use doer email for FROM field of issues 2016-08-11 06:17:45 -07:00
Thibault Meyer
6a81632e36 Fix typo CacheInternal -> CacheInterval (#3432) 2016-08-11 05:59:11 -07:00
Kim Carlbäcker
b756806ee9 Add "support" for git-daemon-export-ok (#2940) (#3046)
* add git-daemon-export-ok "support"

* Slight fix to git-daemon-export-ok

* Add error-checking for git-demon-export-ok

* Remove old comments and fixed logging-issues

* Check if git-daemon-export-ok exists or not
2016-08-10 20:08:09 -07:00
1251 changed files with 722442 additions and 7686 deletions

View File

@@ -1,6 +1,6 @@
[run]
init_cmds = [
["make", "build-dev", "TAGS=sqlite"],
["make", "build-dev"],
["./gogs", "web"]
]
watch_all = true
@@ -14,6 +14,6 @@ watch_exts = [".go"]
ignore_files = [".+_test.go"]
build_delay = 1500
cmds = [
["make", "build-dev", "TAGS=sqlite"], # cert pam tidb
["make", "build-dev"], # TAGS=sqlite cert pam tidb
["./gogs", "web"]
]

View File

@@ -1,6 +1,7 @@
conf/**
docker/**
public/**
modules/bindata/**
packager/**
public/**
scripts/**
templates/**

View File

@@ -5,8 +5,21 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[*.yml]
[*.go]
indent_style = tab
indent_size = 4
[*.tmpl]
indent_style = tab
indent_size = 2
[*.{less,yml}]
indent_style = space
indent_size = 2
[*.js]
indent_style = space
indent_size = 4

4
.gitattributes vendored
View File

@@ -5,7 +5,7 @@ public/plugins/* linguist-vendored
public/plugins/* linguist-vendored
public/css/themes/* linguist-vendored
public/css/github.min.css linguist-vendored
public/css/semantic-2.2.1.min.css linguist-vendored
public/css/semantic-2.2.9.min.css linguist-vendored
public/js/libs/* linguist-vendored
public/js/jquery-1.11.3.min.js linguist-vendored
public/js/semantic-2.2.1.min.js linguist-vendored
public/js/semantic-2.2.9.min.js linguist-vendored

View File

@@ -18,7 +18,7 @@ The issue will be closed without any reasons if it does not satisfy any of follo
- [ ] Yes (provide example URL)
- [ ] No
- [ ] Not relevant
- Log gist:
- Log gist (usually found in `log/gogs.log`):
## Description

5
.gitignore vendored
View File

@@ -14,7 +14,6 @@ public/img/avatar/
profile/
*.pem
output*
gogs.sublime-project
gogs.sublime-workspace
*.sublime-project
*.sublime-workspace
/release
vendor

View File

@@ -2,58 +2,63 @@
path = github.com/gogits/gogs
[deps]
github.com/bradfitz/gomemcache = commit:fb1f79c
github.com/codegangsta/cli = commit:1efa31f
github.com/go-macaron/binding = commit:9440f33
github.com/bradfitz/gomemcache = commit:2fafb84
github.com/urfave/cli = commit:347a988
github.com/go-macaron/binding = commit:4892016
github.com/go-macaron/cache = commit:5617353
github.com/go-macaron/captcha = commit:8aa5919
github.com/go-macaron/csrf = commit:6a9a7df
github.com/go-macaron/gzip = commit:cad1c65
github.com/go-macaron/i18n = commit:ef57533
github.com/go-macaron/inject = commit:c5ab7bf
github.com/go-macaron/inject = commit:d8a0b86
github.com/go-macaron/session = commit:66031fc
github.com/go-macaron/toolbox = commit:82b5115
github.com/go-sql-driver/mysql = commit:0b58b37
github.com/go-xorm/core = commit:5bf745d
github.com/go-xorm/xorm = commit:c6c7056
github.com/go-sql-driver/mysql = commit:2e00b5c
github.com/go-xorm/builder = commit:9c35786
github.com/go-xorm/core = commit:7daacb2
github.com/go-xorm/xorm = commit:19f6dfc
github.com/gogits/chardet = commit:2404f77
github.com/gogits/cron = commit:7f3990a
github.com/gogits/git-module = commit:18dd87d
github.com/gogits/go-gogs-client = commit:d1020b4
github.com/gogits/cron = commit:2fc07a4
github.com/gogits/git-module = commit:1b9552b
github.com/gogits/go-gogs-client = commit:264a3d5
github.com/gogits/go-libravatar = commit:cd1abbd
github.com/issue9/identicon = commit:d36b545
github.com/jaytaylor/html2text = commit:52d9b78
github.com/jaytaylor/html2text = commit:d16d412
github.com/kardianos/minwinsvc = commit:cad6b2b
github.com/klauspost/compress = commit:14eb9c4
github.com/klauspost/compress = commit:461e8fd
github.com/klauspost/cpuid = commit:09cded8
github.com/klauspost/crc32 = commit:19b0b33
github.com/lib/pq = commit:80f8150
github.com/mattn/go-sqlite3 = commit:e118d44
github.com/mcuadros/go-version = commit:d52711f
github.com/microcosm-cc/bluemonday = commit:9dc1992
github.com/klauspost/crc32 = commit:cb6bfca
github.com/lib/pq = commit:67c3f2a
github.com/mattn/go-colorable = commit:d228849
github.com/mattn/go-isatty = commit:30a891c
github.com/mattn/go-sqlite3 = commit:ce9149a
github.com/mcuadros/go-version = commit:257f7b9
github.com/microcosm-cc/bluemonday = commit:e797637
github.com/msteinert/pam = commit:02ccfbf
github.com/nfnt/resize = commit:891127d
github.com/russross/blackfriday = commit:93622da
github.com/satori/go.uuid = commit:0aa62d5
github.com/sergi/go-diff = commit:ec7fdbb
github.com/strk/go-libravatar = commit:5eed7bf
github.com/shurcooL/sanitized_anchor_name = commit:10ef21a
github.com/Unknwon/cae = commit:7f5e046
github.com/russross/blackfriday = commit:5f33e7b
github.com/satori/go.uuid = commit:b061729
github.com/sergi/go-diff = commit:24e2351
github.com/shurcooL/sanitized_anchor_name = commit:1dba4b3
github.com/Unknwon/cae = commit:c6aac99
github.com/Unknwon/com = commit:28b053d
github.com/Unknwon/i18n = commit:39d6f27
github.com/Unknwon/paginater = commit:7748a72
golang.org/x/crypto = commit:bc89c49
golang.org/x/net = commit:57bfaa8
golang.org/x/sys = commit:a646d33
golang.org/x/text = commit:2910a50
github.com/Unknwon/i18n = commit:e0eb0ce
github.com/Unknwon/paginater = commit:701c23f
github.com/fatih/color = commit:42c364b
golang.org/x/crypto = commit:dc137be
golang.org/x/net = commit:f249948
golang.org/x/sys = commit:d75a526
golang.org/x/text = commit:ece019d
gopkg.in/alexcesaro/quotedprintable.v3 = commit:2caba25
gopkg.in/asn1-ber.v1 = commit:4e86f43
gopkg.in/bufio.v1 = commit:567b2bf
gopkg.in/clog.v1 = commit:bf4bf4a
gopkg.in/editorconfig/editorconfig-core-go.v1 = commit:a872f05
gopkg.in/gomail.v2 = commit:81ebce5
gopkg.in/ini.v1 = commit:cf53f92
gopkg.in/ldap.v2 = commit:d0a5ced
gopkg.in/macaron.v1 = commit:7564489
gopkg.in/ini.v1 = commit:e3c2d47
gopkg.in/ldap.v2 = commit:8168ee0
gopkg.in/macaron.v1 = commit:8be5635
gopkg.in/redis.v2 = commit:e617904
[res]
include = public|scripts|templates

2
.mailmap Normal file
View File

@@ -0,0 +1,2 @@
Unknwon <u@gogs.io> <joe2010xtmf@163.com>
Unknwon <u@gogs.io> 无闻 <u@gogs.io>

View File

@@ -7,13 +7,20 @@ targets:
- git
debian-8:
<<: *debian
ubuntu-14.04:
<<: *debian
ubuntu-12.04:
<<: *debian
ubuntu-14.04:
<<: *debian
ubuntu-16.04:
<<: *debian
build_dependencies:
- bzr
- mercurial
centos-6: &el
build_dependencies:
- pam-devel
# required for go buildpack
- perl-Digest-SHA
dependencies:
- pam
- git
@@ -21,7 +28,7 @@ targets:
<<: *el
before:
- mv packager/Procfile .
- mv packager/.godir .
after:
- mv bin/main gogs
- mv bin/gogs gogs
after_install: ./packager/hooks/postinst
buildpack: https://github.com/heroku/heroku-buildpack-go.git#v62

View File

@@ -1,29 +1,17 @@
language: go
go:
- 1.4
- 1.5
- 1.6
- 1.5.x
- 1.6.x
- 1.7.x
- master
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libpam-dev
- go get github.com/msteinert/pam
install:
- go get -t -v ./...
env:
- GO15VENDOREXPERIMENT=1
script:
- go build -v -tags "pam"
- go test -v -cover -race ./...
notifications:
email:
- u@gogs.io
slack: gophercn:o5pSanyTeNhnfYc3QnG0X7Wx
webhooks:
urls:
- https://webhooks.gitter.im/e/b590f8e03882f7aedc3e
on_success: change
on_failure: always
on_start: never

View File

@@ -1,5 +1,4 @@
FROM alpine:3.3
MAINTAINER jp@roemer.im
FROM alpine:3.5
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-amd64 /usr/sbin/gosu
@@ -8,9 +7,12 @@ RUN chmod +x /usr/sbin/gosu \
ENV GOGS_CUSTOM /data/gogs
COPY . /app/gogs/
WORKDIR /app/gogs/
RUN ./docker/build.sh
COPY . /app/gogs/build
WORKDIR /app/gogs/build
RUN ./docker/build-go.sh \
&& ./docker/build.sh \
&& ./docker/finalize.sh
# Configure LibC Name Service
COPY docker/nsswitch.conf /etc/nsswitch.conf
@@ -18,5 +20,5 @@ COPY docker/nsswitch.conf /etc/nsswitch.conf
# Configure Docker Container
VOLUME ["/data"]
EXPOSE 22 3000
ENTRYPOINT ["docker/start.sh"]
ENTRYPOINT ["/app/gogs/docker/start.sh"]
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]

22
Dockerfile.aarch64 Normal file
View File

@@ -0,0 +1,22 @@
FROM aarch64/alpine:3.5
MAINTAINER atzoum@gmail.com
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-arm64 /usr/sbin/gosu
RUN chmod +x /usr/sbin/gosu \
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata
ENV GOGS_CUSTOM /data/gogs
COPY . /app/gogs/
WORKDIR /app/gogs/
RUN ./docker/build.sh
# Configure LibC Name Service
COPY docker/nsswitch.conf /etc/nsswitch.conf
# Configure Docker Container
VOLUME ["/data"]
EXPOSE 22 3000
ENTRYPOINT ["docker/start.sh"]
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]

View File

@@ -1,19 +1,18 @@
FROM hypriot/rpi-alpine-scratch:v3.2
MAINTAINER jp@roemer.im, raxetul@gmail.com
FROM armhf/alpine:3.5
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-armhf /usr/sbin/gosu
RUN chmod +x /usr/sbin/gosu \
&& echo "http://dl-4.alpinelinux.org/alpine/v3.3/main/" | tee /etc/apk/repositories \
&& echo "http://dl-4.alpinelinux.org/alpine/v3.3/community/" | tee -a /etc/apk/repositories \
&& apk -U --no-progress upgrade && rm -f /var/cache/apk/APKINDEX.* \
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata
ENV GOGS_CUSTOM /data/gogs
COPY . /app/gogs/
WORKDIR /app/gogs/
RUN ./docker/build.sh
COPY . /app/gogs/build
WORKDIR /app/gogs/build
RUN ./docker/build-go.sh \
&& ./docker/build.sh \
&& ./docker/finalize.sh
# Configure LibC Name Service
COPY docker/nsswitch.conf /etc/nsswitch.conf
@@ -21,5 +20,5 @@ COPY docker/nsswitch.conf /etc/nsswitch.conf
# Configure Docker Container
VOLUME ["/data"]
EXPOSE 22 3000
ENTRYPOINT ["docker/start.sh"]
ENTRYPOINT ["/app/gogs/docker/start.sh"]
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]

View File

@@ -5,6 +5,8 @@ DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
GENERATED := modules/bindata/bindata.go public/css/gogs.css
OS := $(shell uname)
TAGS = ""
BUILD_FLAGS = "-v"
@@ -17,8 +19,14 @@ GOVET = go tool vet -composites=false -methods=false -structtags=false
.IGNORE: public/css/gogs.css
all: build
check: test
dist: release
govet:
$(GOVET) gogs.go
$(GOVET) gogs.go
$(GOVET) models modules routers
build: $(GENERATED)
@@ -62,7 +70,11 @@ test:
go test -cover -race ./...
fixme:
grep -rnw "FIXME" routers models modules
grep -rnw "FIXME" cmd routers models modules
todo:
grep -rnw "TODO" routers models modules
grep -rnw "TODO" cmd routers models modules
# Legacy code should be remove by the time of release
legacy:
grep -rnw "LEGACY" cmd routers models modules

View File

@@ -1,9 +1,9 @@
Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?branch=master)](https://travis-ci.org/gogits/gogs) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/gogs/localized.svg)](https://crowdin.com/project/gogs) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gogits/gogs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Gogs [![Build Status](https://travis-ci.org/gogits/gogs.svg?branch=master)](https://travis-ci.org/gogits/gogs) [![Build status](https://ci.appveyor.com/api/projects/status/b9uu5ejl933e2wlt/branch/master?svg=true)](https://ci.appveyor.com/project/Unknwon/gogs/branch/master) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/gogs/localized.svg)](https://crowdin.com/project/gogs) [![Sourcegraph](https://sourcegraph.com/github.com/gogits/gogs/-/badge.svg)](https://sourcegraph.com/github.com/gogits/gogs?badge) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gogits/gogs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
=====================
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current tip version: 0.9.71 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
##### Current tip version: [`.VERSION`](templates/.VERSION) (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
@@ -29,7 +29,6 @@ The goal of this project is to make the easiest, fastest, and most painless way
## Overview
- Please see the [Documentation](https://gogs.io/docs/intro) for common usages and change log.
- See the [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) to follow the develop team.
- Want to try it before doing anything else? Do it [online](https://try.gogs.io/gogs/gogs)!
- Having trouble? Get help with [Troubleshooting](https://gogs.io/docs/intro/troubleshooting.html) or [User Forum](https://discuss.gogs.io/).
- Want to help with localization? Check out the [guide](https://gogs.io/docs/features/i18n.html)!
@@ -41,25 +40,29 @@ The goal of this project is to make the easiest, fastest, and most painless way
- SMTP/LDAP/Reverse proxy authentication
- Reverse proxy with sub-path
- Account/Organization/Repository management
- Repository/Organization webhooks (including Slack)
- Repository Git hooks/deploy keys
- Repository issues, pull requests and wiki
- Add/Remove repository collaborators
- Repository/Organization webhooks (including Slack and Discord)
- Repository Git hooks/deploy keys
- Repository issues, pull requests, wiki and protected branches
- Migrate and mirror repository and its wiki
- Web editor for repository files and wiki
- Jupyter Notebook
- Gravatar and Federated avatar with custom source
- Mail service
- Administration panel
- Supports MySQL, PostgreSQL, SQLite3 and [TiDB](https://github.com/pingcap/tidb) (experimental)
- Multi-language support ([18 languages](https://crowdin.com/project/gogs))
- Supports MySQL, PostgreSQL, SQLite3, MSSQL and [TiDB](https://github.com/pingcap/tidb) (experimental)
- Multi-language support ([23 languages](https://crowdin.com/project/gogs))
## System Requirements
## Hardware Requirements
- A cheap Raspberry Pi is powerful enough for basic functionality.
- 2 CPU cores and 1GB RAM would be the baseline for teamwork.
- A Raspberry Pi or $5 Digital Ocean Droplet is more than enough to get you started. Some even use 64MB RAM Docker [CaaS](https://blog.docker.com/2016/02/containers-as-a-service-caas/).
- 2 CPU cores and 512MB RAM would be the baseline for teamwork.
- Increase CPU cores when your team size gets significantly larger, memory footprint remains low.
## Browser Support
- Please see [Semantic UI](https://github.com/Semantic-Org/Semantic-UI#browser-support) for specific versions of supported browsers.
- The official support minimal size is **1024*768**, UI may still looks right in smaller size but no promises and fixes.
- The smallest resolution officially supported is **1024*768**, however the UI may still look right in smaller resolutions, but no promises or fixes.
## Installation
@@ -78,12 +81,12 @@ There are 5 ways to install Gogs:
- [How To Set Up Gogs on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-gogs-on-ubuntu-14-04)
- [Run your own GitHub-like service with the help of Docker](http://blog.hypriot.com/post/run-your-own-github-like-service-with-docker/)
- [Dockerized Gogs git server and alpine postgres in 20 minutes or less](http://garthwaite.org/docker-gogs.html)
- [Host Your Own Private GitHub with Gogs.io](https://eladnava.com/host-your-own-private-github-with-gogs-io/)
- [Host Your Own Private GitHub with Gogs](https://eladnava.com/host-your-own-private-github-with-gogs-io/)
- [使用 Gogs 搭建自己的 Git 服务器](https://mynook.info/blog/post/host-your-own-git-server-using-gogs) (Chinese)
- [阿里云上 Ubuntu 14.04 64 位安装 Gogs](http://my.oschina.net/luyao/blog/375654) (Chinese)
- [Installing Gogs on FreeBSD](https://www.codejam.info/2015/03/installing-gogs-on-freebsd.html)
- [Gogs on Raspberry Pi](http://blog.meinside.pe.kr/Gogs-on-Raspberry-Pi/)
- [Cloudflare Full SSL with GOGS (Go Git Service) using NGINX](http://www.listekconsulting.com/articles/cloudflare-full-ssl-with-gogs-go-git-service-using-nginx/)
- [Cloudflare Full SSL with Gogs using NGINX](http://www.listekconsulting.com/articles/cloudflare-full-ssl-with-gogs-go-git-service-using-nginx/)
### Screencasts
@@ -95,15 +98,15 @@ There are 5 ways to install Gogs:
- [OpenShift](https://github.com/tkisme/gogs-openshift)
- [Cloudron](https://cloudron.io/appstore.html#io.gogs.cloudronapp)
- [Scaleway](https://www.scaleway.com/imagehub/gogs/)
- [Portal](https://portaldemo.xyz/cloud/)
- [Sandstorm](https://github.com/cem/gogs-sandstorm)
- [sloppy.io](https://github.com/sloppyio/quickstarters/tree/master/gogs)
- [YunoHost](https://github.com/mbugeia/gogs_ynh)
- [YunoHost](https://github.com/YunoHost-Apps/gogs_ynh)
- [DPlatform](https://github.com/j8r/DPlatform)
## Software and Service Support
- [Drone](https://github.com/drone/drone) (CI)
- [Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Gogs+Webhook+Plugin) (CI)
- [Fabric8](http://fabric8.io/) (DevOps)
- [Taiga](https://taiga.io/) (Project Management)
- [Puppet](https://forge.puppetlabs.com/Siteminds/gogs) (IT)
@@ -118,17 +121,14 @@ There are 5 ways to install Gogs:
## Acknowledgments
- Router and middleware mechanism of [Macaron](https://github.com/go-macaron/macaron).
- System Monitor Status is inspired by [GoBlog](https://github.com/fuxiaohei/goblog).
- Thanks [lavachen](http://www.lavachen.cn/) and [Rocker](http://weibo.com/rocker1989) for designing Logo.
- Thanks [Egon Elbre](https://twitter.com/egonelbre) for designing logo.
- Thanks [Crowdin](https://crowdin.com/project/gogs) for providing open source translation plan.
- Thanks [DigitalOcean](https://www.digitalocean.com) for hosting home and demo sites.
- Thanks [KeyCDN](https://www.keycdn.com/) and [QiNiu](http://www.qiniu.com/) for providing CDN service.
## Contributors
- Ex-team members [@lunny](https://github.com/lunny), [@fuxiaohei](https://github.com/fuxiaohei) and [@slene](https://github.com/slene).
- See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for full list of contributors.
- See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for top 100 contributors.
- See [TRANSLATORS](conf/locale/TRANSLATORS) for public list of translators.
## License

View File

@@ -1,7 +1,7 @@
Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?branch=master)](https://travis-ci.org/gogits/gogs)
Gogs [![Build Status](https://travis-ci.org/gogits/gogs.svg?branch=master)](https://travis-ci.org/gogits/gogs) [![Build status](https://ci.appveyor.com/api/projects/status/b9uu5ejl933e2wlt/branch/master?svg=true)](https://ci.appveyor.com/project/Unknwon/gogs/branch/master)
=====================
Gogs (Go Git Service) 是一款极易搭建的自助 Git 服务。
Gogs 是一款极易搭建的自助 Git 服务。
## 开发目的
@@ -10,7 +10,6 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
## 项目概览
- 有关基本用法和变更日志,请通过 [使用手册](https://gogs.io/docs/intro/) 查看。
- 您可以到 [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) 跟随开发团队的脚步。
- 想要先睹为快?直接去 [在线体验](https://try.gogs.io/gogs/gogs) 。
- 使用过程中遇到问题?尝试从 [故障排查](https://gogs.io/docs/intro/troubleshooting.html) 页面或 [用户论坛](https://discuss.gogs.io/) 获取帮助。
- 希望帮助多国语言界面的翻译吗?请立即访问 [详情页面](https://gogs.io/docs/features/i18n.html)
@@ -22,20 +21,24 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- 支持 SMTP、LDAP 和反向代理的用户认证
- 支持反向代理子路径
- 支持用户、组织和仓库管理系统
- 支持仓库和组织级别 Web 钩子(包括 Slack 集成)
- 支持仓库 Git 钩子和部署密钥
- 支持仓库工单Issue、合并请求Pull Request以及 Wiki
- 支持添加和删除仓库协作者
- 支持仓库和组织级别 Web 钩子(包括 Slack 和 Discord 集成)
- 支持仓库 Git 钩子和部署密钥
- 支持仓库工单Issue、合并请求Pull Request、Wiki 和保护分支
- 支持迁移和镜像仓库以及它的 Wiki
- 支持在线编辑仓库文件和 Wiki
- 支持自定义源的 Gravatar 和 Federated Avatar
- 支持 Jupyter Notebook
- 支持邮件服务
- 支持后台管理面板
- 支持 MySQL、PostgreSQL、SQLite3 和 [TiDB](https://github.com/pingcap/tidb)(实验性支持) 数据库
- 支持多语言本地化([18 种语言]([more](https://crowdin.com/project/gogs))
- 支持 MySQL、PostgreSQL、SQLite3、MSSQL 和 [TiDB](https://github.com/pingcap/tidb)(实验性支持) 数据库
- 支持多语言本地化([23 种语言]([more](https://crowdin.com/project/gogs))
## 系统要求
## 硬件要求
- 最低的系统硬件要求为一个廉价的树莓派
- 如果用于团队项目,建议使用 2 核 CPU 及 1GB 内存
- 如果用于团队项目管理,建议使用 2 核 CPU 及 512MB 内存
- 当团队成员大量增加时,可以考虑添加 CPU 核数,内存占用保持不变
## 浏览器支持
@@ -64,7 +67,6 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- [OpenShift](https://github.com/tkisme/gogs-openshift)
- [Cloudron](https://cloudron.io/appstore.html#io.gogs.cloudronapp)
- [Scaleway](https://www.scaleway.com/imagehub/gogs/)
- [Portal](https://portaldemo.xyz/cloud/)
- [Sandstorm](https://github.com/cem/gogs-sandstorm)
- [sloppy.io](https://github.com/sloppyio/quickstarters/tree/master/gogs)
- [YunoHost](https://github.com/mbugeia/gogs_ynh)
@@ -73,6 +75,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
## 软件及服务支持
- [Drone](https://github.com/drone/drone)CI
- [Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Gogs+Webhook+Plugin)CI
- [Fabric8](http://fabric8.io/)DevOps
- [Taiga](https://taiga.io/)(项目管理)
- [Puppet](https://forge.puppetlabs.com/Siteminds/gogs)IT
@@ -87,17 +90,14 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
## 特别鸣谢
- 基于 [Macaron](https://github.com/go-macaron/macaron) 的路由与中间件机制
- 基于 [GoBlog](https://github.com/fuxiaohei/goblog) 修改的系统监视状态。
- 感谢 [lavachen](http://www.lavachen.cn/) 和 [Rocker](http://weibo.com/rocker1989) 设计的 Logo。
- 感谢 [Egon Elbre](https://twitter.com/egonelbre) 设计的 Logo
- 感谢 [Crowdin](https://crowdin.com/project/gogs) 提供免费的开源项目本地化支持。
- 感谢 [DigitalOcean](https://www.digitalocean.com) 提供主站和体验站点的服务器赞助。
- 感谢 [KeyCDN](https://www.keycdn.com/) 和 [七牛云存储](http://www.qiniu.com/) 提供 CDN 服务赞助。
## 贡献成员
- 前团队成员 [@lunny](https://github.com/lunny)、[@fuxiaohei](https://github.com/fuxiaohei) 和 [@slene](https://github.com/slene)
- 您可以通过查看 [贡献者页面](https://github.com/gogits/gogs/graphs/contributors) 获取完整的贡献者列表。
- 您可以通过查看 [贡献者页面](https://github.com/gogits/gogs/graphs/contributors) 获取 TOP 100 的贡献者列表
- 您可以通过查看 [TRANSLATORS](conf/locale/TRANSLATORS) 文件获取公开的翻译人员列表。
## 授权许可

20
appveyor.yml Normal file
View File

@@ -0,0 +1,20 @@
version: "{build}"
skip_tags: true
clone_folder: c:\gopath\src\github.com\gogits\gogs
clone_depth: 1
environment:
GOPATH: c:\gopath
GOVERSION: 1.7
build: false
deploy: false
install:
- go build -v
notifications:
- provider: Email
to:
- u@gogs.io
on_build_success: false

70
cmd/admin.go Normal file
View File

@@ -0,0 +1,70 @@
// Copyright 2016 The Gogs 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 cmd
import (
"fmt"
"github.com/urfave/cli"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/setting"
)
var (
CmdAdmin = cli.Command{
Name: "admin",
Usage: "Preform admin operations on command line",
Description: `Allow using internal logic of Gogs without hacking into the source code
to make automatic initialization process more smoothly`,
Subcommands: []cli.Command{
subcmdCreateUser,
},
}
subcmdCreateUser = cli.Command{
Name: "create-user",
Usage: "Create a new user in database",
Action: runCreateUser,
Flags: []cli.Flag{
stringFlag("name", "", "Username"),
stringFlag("password", "", "User password"),
stringFlag("email", "", "User email address"),
boolFlag("admin", "User is an admin"),
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
}
)
func runCreateUser(c *cli.Context) error {
if !c.IsSet("name") {
return fmt.Errorf("Username is not specified")
} else if !c.IsSet("password") {
return fmt.Errorf("Password is not specified")
} else if !c.IsSet("email") {
return fmt.Errorf("Email is not specified")
}
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
setting.NewContext()
models.LoadConfigs()
models.SetEngine()
if err := models.CreateUser(&models.User{
Name: c.String("name"),
Email: c.String("email"),
Passwd: c.String("password"),
IsActive: true,
IsAdmin: c.Bool("admin"),
}); err != nil {
return fmt.Errorf("CreateUser: %v", err)
}
fmt.Printf("New user '%s' has been successfully created!\n", c.String("name"))
return nil
}

View File

@@ -22,7 +22,7 @@ import (
"strings"
"time"
"github.com/codegangsta/cli"
"github.com/urfave/cli"
)
var CmdCert = cli.Command{

View File

@@ -10,7 +10,7 @@ import (
"fmt"
"os"
"github.com/codegangsta/cli"
"github.com/urfave/cli"
)
var CmdCert = cli.Command{

View File

@@ -7,7 +7,7 @@ package cmd
import (
"time"
"github.com/codegangsta/cli"
"github.com/urfave/cli"
)
func stringFlag(name, value, usage string) cli.StringFlag {

View File

@@ -14,7 +14,8 @@ import (
"io/ioutil"
"github.com/Unknwon/cae/zip"
"github.com/codegangsta/cli"
"github.com/Unknwon/com"
"github.com/urfave/cli"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/setting"
@@ -87,15 +88,32 @@ func runDump(ctx *cli.Context) error {
} else {
log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath)
}
if err := z.AddDir("log", setting.LogRootPath); err != nil {
log.Fatalf("Fail to include log: %v", err)
}
for _, dir := range []string{"attachments", "avatars"} {
dirPath := path.Join(setting.AppDataPath, dir)
if !com.IsDir(dirPath) {
continue
}
if err := z.AddDir(path.Join("data", dir), dirPath); err != nil {
log.Fatalf("Fail to include '%s': %v", dirPath, err)
}
}
// FIXME: SSH key file.
if err = z.Close(); err != nil {
os.Remove(fileName)
log.Fatalf("Fail to save %s: %v", fileName, err)
}
if err := os.Chmod(fileName, 0600); err != nil {
log.Printf("Can't change file access permissions mask to 0600: %v", err)
}
log.Printf("Removing tmp work dir: %s", TmpWorkDir)
os.RemoveAll(TmpWorkDir)
log.Printf("Finish dumping in file %s", fileName)

241
cmd/hook.go Normal file
View File

@@ -0,0 +1,241 @@
// Copyright 2014 The Gogs 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 cmd
import (
"bufio"
"bytes"
"crypto/tls"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/Unknwon/com"
"github.com/urfave/cli"
log "gopkg.in/clog.v1"
"github.com/gogits/git-module"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/httplib"
"github.com/gogits/gogs/modules/setting"
http "github.com/gogits/gogs/routers/repo"
)
var (
CmdHook = cli.Command{
Name: "hook",
Usage: "Delegate commands to corresponding Git hooks",
Description: "All sub-commands should only be called by Git",
Flags: []cli.Flag{
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
Subcommands: []cli.Command{
subcmdHookPreReceive,
subcmdHookUpadte,
subcmdHookPostReceive,
},
}
subcmdHookPreReceive = cli.Command{
Name: "pre-receive",
Usage: "Delegate pre-receive Git hook",
Description: "This command should only be called by Git",
Action: runHookPreReceive,
}
subcmdHookUpadte = cli.Command{
Name: "update",
Usage: "Delegate update Git hook",
Description: "This command should only be called by Git",
Action: runHookUpdate,
}
subcmdHookPostReceive = cli.Command{
Name: "post-receive",
Usage: "Delegate post-receive Git hook",
Description: "This command should only be called by Git",
Action: runHookPostReceive,
}
)
func runHookPreReceive(c *cli.Context) error {
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
return nil
}
setup(c, "hooks/pre-receive.log", true)
isWiki := strings.Contains(os.Getenv(http.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")
buf := bytes.NewBuffer(nil)
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
buf.Write(scanner.Bytes())
buf.WriteByte('\n')
if isWiki {
continue
}
fields := bytes.Fields(scanner.Bytes())
if len(fields) != 3 {
continue
}
oldCommitID := string(fields[0])
newCommitID := string(fields[1])
branchName := strings.TrimPrefix(string(fields[2]), git.BRANCH_PREFIX)
// Branch protection
repoID := com.StrTo(os.Getenv(http.ENV_REPO_ID)).MustInt64()
protectBranch, err := models.GetProtectBranchOfRepoByName(repoID, branchName)
if err != nil {
if models.IsErrBranchNotExist(err) {
continue
}
fail("Internal error", "GetProtectBranchOfRepoByName [repo_id: %d, branch: %s]: %v", repoID, branchName, err)
}
if !protectBranch.Protected {
continue
}
// Check if whitelist is enabled
userID := com.StrTo(os.Getenv(http.ENV_AUTH_USER_ID)).MustInt64()
if protectBranch.EnableWhitelist && !models.IsUserInProtectBranchWhitelist(repoID, userID, branchName) {
fail(fmt.Sprintf("Branch '%s' is protected and you are not in the push whitelist", branchName), "")
}
// Check if branch allows direct push
if protectBranch.RequirePullRequest {
fail(fmt.Sprintf("Branch '%s' is protected and commits must be merged through pull request", branchName), "")
}
// check and deletion
if newCommitID == git.EMPTY_SHA {
fail(fmt.Sprintf("Branch '%s' is protected from deletion", branchName), "")
}
// Check force push
output, err := git.NewCommand("rev-list", oldCommitID, "^"+newCommitID).Run()
if err != nil {
fail("Internal error", "Fail to detect force push: %v", err)
} else if len(output) > 0 {
fail(fmt.Sprintf("Branch '%s' is protected from force push", branchName), "")
}
}
customHooksPath := filepath.Join(os.Getenv(http.ENV_REPO_CUSTOM_HOOKS_PATH), "pre-receive")
if !com.IsFile(customHooksPath) {
return nil
}
hookCmd := exec.Command(customHooksPath)
hookCmd.Stdout = os.Stdout
hookCmd.Stdin = buf
hookCmd.Stderr = os.Stderr
if err := hookCmd.Run(); err != nil {
fail("Internal error", "Fail to execute custom pre-receive hook: %v", err)
}
return nil
}
func runHookUpdate(c *cli.Context) error {
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
return nil
}
setup(c, "hooks/update.log", false)
args := c.Args()
if len(args) != 3 {
fail("Arguments received are not equal to three", "Arguments received are not equal to three")
} else if len(args[0]) == 0 {
fail("First argument 'refName' is empty", "First argument 'refName' is empty")
}
customHooksPath := filepath.Join(os.Getenv(http.ENV_REPO_CUSTOM_HOOKS_PATH), "update")
if !com.IsFile(customHooksPath) {
return nil
}
hookCmd := exec.Command(customHooksPath, args...)
hookCmd.Stdout = os.Stdout
hookCmd.Stdin = os.Stdin
hookCmd.Stderr = os.Stderr
if err := hookCmd.Run(); err != nil {
fail("Internal error", "Fail to execute custom pre-receive hook: %v", err)
}
return nil
}
func runHookPostReceive(c *cli.Context) error {
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
return nil
}
setup(c, "hooks/post-receive.log", true)
isWiki := strings.Contains(os.Getenv(http.ENV_REPO_CUSTOM_HOOKS_PATH), ".wiki.git/")
buf := bytes.NewBuffer(nil)
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
buf.Write(scanner.Bytes())
buf.WriteByte('\n')
// TODO: support news feeds for wiki
if isWiki {
continue
}
fields := bytes.Fields(scanner.Bytes())
if len(fields) != 3 {
continue
}
options := models.PushUpdateOptions{
OldCommitID: string(fields[0]),
NewCommitID: string(fields[1]),
RefFullName: string(fields[2]),
PusherID: com.StrTo(os.Getenv(http.ENV_AUTH_USER_ID)).MustInt64(),
PusherName: os.Getenv(http.ENV_AUTH_USER_NAME),
RepoUserName: os.Getenv(http.ENV_REPO_OWNER_NAME),
RepoName: os.Getenv(http.ENV_REPO_NAME),
}
if err := models.PushUpdate(options); err != nil {
log.Error(2, "PushUpdate: %v", err)
}
// Ask for running deliver hook and test pull request tasks.
reqURL := setting.LocalURL + options.RepoUserName + "/" + options.RepoName + "/tasks/trigger?branch=" +
strings.TrimPrefix(options.RefFullName, git.BRANCH_PREFIX) +
"&secret=" + os.Getenv(http.ENV_REPO_OWNER_SALT_MD5) +
"&pusher=" + os.Getenv(http.ENV_AUTH_USER_ID)
log.Trace("Trigger task: %s", reqURL)
resp, err := httplib.Head(reqURL).SetTLSClientConfig(&tls.Config{
InsecureSkipVerify: true,
}).Response()
if err == nil {
resp.Body.Close()
if resp.StatusCode/100 != 2 {
log.Error(2, "Fail to trigger task: not 2xx response code")
}
} else {
log.Error(2, "Fail to trigger task: %v", err)
}
}
customHooksPath := filepath.Join(os.Getenv(http.ENV_REPO_CUSTOM_HOOKS_PATH), "post-receive")
if !com.IsFile(customHooksPath) {
return nil
}
hookCmd := exec.Command(customHooksPath)
hookCmd.Stdout = os.Stdout
hookCmd.Stdin = buf
hookCmd.Stderr = os.Stderr
if err := hookCmd.Run(); err != nil {
fail("Internal error", "Fail to execute custom post-receive hook: %v", err)
}
return nil
}

113
cmd/import.go Normal file
View File

@@ -0,0 +1,113 @@
// Copyright 2016 The Gogs 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 cmd
import (
"bufio"
"bytes"
"fmt"
"os"
"path/filepath"
"time"
"github.com/Unknwon/com"
"github.com/urfave/cli"
"github.com/gogits/gogs/modules/setting"
)
var (
CmdImport = cli.Command{
Name: "import",
Usage: "Import portable data as local Gogs data",
Description: `Allow user import data from other Gogs installations to local instance
without manually hacking the data files`,
Subcommands: []cli.Command{
subcmdImportLocale,
},
}
subcmdImportLocale = cli.Command{
Name: "locale",
Usage: "Import locale files to local repository",
Action: runImportLocale,
Flags: []cli.Flag{
stringFlag("source", "", "Source directory that stores new locale files"),
stringFlag("target", "", "Target directory that stores old locale files"),
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
}
)
func runImportLocale(c *cli.Context) error {
if !c.IsSet("source") {
return fmt.Errorf("Source directory is not specified")
} else if !c.IsSet("target") {
return fmt.Errorf("Target directory is not specified")
}
if !com.IsDir(c.String("source")) {
return fmt.Errorf("Source directory does not exist or is not a directory")
} else if !com.IsDir(c.String("target")) {
return fmt.Errorf("Target directory does not exist or is not a directory")
}
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
setting.NewContext()
now := time.Now()
line := make([]byte, 0, 100)
badChars := []byte(`="`)
escapedQuotes := []byte(`\"`)
regularQuotes := []byte(`"`)
// Cut out en-US.
for _, lang := range setting.Langs[1:] {
name := fmt.Sprintf("locale_%s.ini", lang)
source := filepath.Join(c.String("source"), name)
target := filepath.Join(c.String("target"), name)
if !com.IsFile(source) {
continue
}
// Crowdin surrounds double quotes for strings contain quotes inside,
// this breaks INI parser, we need to fix that.
sr, err := os.Open(source)
if err != nil {
return fmt.Errorf("Open: %v", err)
}
tw, err := os.Create(target)
if err != nil {
if err != nil {
return fmt.Errorf("Open: %v", err)
}
}
scanner := bufio.NewScanner(sr)
for scanner.Scan() {
line = scanner.Bytes()
idx := bytes.Index(line, badChars)
if idx > -1 && line[len(line)-1] == '"' {
// We still want the "=" sign
line = append(line[:idx+1], line[idx+2:len(line)-1]...)
line = bytes.Replace(line, escapedQuotes, regularQuotes, -1)
}
tw.Write(line)
tw.WriteString("\n")
}
sr.Close()
tw.Close()
// Modification time of files from Crowdin often ahead of current,
// so we need to set back to current.
os.Chtimes(target, now, now)
}
fmt.Println("Locale files has been successfully imported!")
return nil
}

272
cmd/serv.go Normal file
View File

@@ -0,0 +1,272 @@
// Copyright 2014 The Gogs 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 cmd
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/Unknwon/com"
"github.com/urfave/cli"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/setting"
http "github.com/gogits/gogs/routers/repo"
)
const (
_ACCESS_DENIED_MESSAGE = "Repository does not exist or you do not have access"
)
var Serv = cli.Command{
Name: "serv",
Usage: "This command should only be called by SSH shell",
Description: `Serv provide access auth for repositories`,
Action: runServ,
Flags: []cli.Flag{
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
}
func fail(userMessage, logMessage string, args ...interface{}) {
fmt.Fprintln(os.Stderr, "Gogs:", userMessage)
if len(logMessage) > 0 {
if !setting.ProdMode {
fmt.Fprintf(os.Stderr, logMessage+"\n", args...)
}
log.Fatal(3, logMessage, args...)
}
os.Exit(1)
}
func setup(c *cli.Context, logPath string, connectDB bool) {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
} else if c.GlobalIsSet("config") {
setting.CustomConf = c.GlobalString("config")
}
setting.NewContext()
level := log.TRACE
if setting.ProdMode {
level = log.ERROR
}
log.New(log.FILE, log.FileConfig{
Level: level,
Filename: filepath.Join(setting.LogRootPath, logPath),
FileRotationConfig: log.FileRotationConfig{
Rotate: true,
Daily: true,
MaxDays: 3,
},
})
log.Delete(log.CONSOLE) // Remove primary logger
if !connectDB {
return
}
models.LoadConfigs()
if setting.UseSQLite3 {
workDir, _ := setting.WorkDir()
os.Chdir(workDir)
}
if err := models.SetEngine(); err != nil {
fail("Internal error", "SetEngine: %v", err)
}
}
func parseSSHCmd(cmd string) (string, string) {
ss := strings.SplitN(cmd, " ", 2)
if len(ss) != 2 {
return "", ""
}
return ss[0], strings.Replace(ss[1], "'/", "'", 1)
}
func checkDeployKey(key *models.PublicKey, repo *models.Repository) {
// Check if this deploy key belongs to current repository.
if !models.HasDeployKey(key.ID, repo.ID) {
fail("Key access denied", "Deploy key access denied: [key_id: %d, repo_id: %d]", key.ID, repo.ID)
}
// Update deploy key activity.
deployKey, err := models.GetDeployKeyByRepo(key.ID, repo.ID)
if err != nil {
fail("Internal error", "GetDeployKey: %v", err)
}
deployKey.Updated = time.Now()
if err = models.UpdateDeployKey(deployKey); err != nil {
fail("Internal error", "UpdateDeployKey: %v", err)
}
}
var (
allowedCommands = map[string]models.AccessMode{
"git-upload-pack": models.ACCESS_MODE_READ,
"git-upload-archive": models.ACCESS_MODE_READ,
"git-receive-pack": models.ACCESS_MODE_WRITE,
}
)
func runServ(c *cli.Context) error {
setup(c, "serv.log", true)
if setting.SSH.Disabled {
println("Gogs: SSH has been disabled")
return nil
}
if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arguments")
}
sshCmd := os.Getenv("SSH_ORIGINAL_COMMAND")
if len(sshCmd) == 0 {
println("Hi there, You've successfully authenticated, but Gogs does not provide shell access.")
println("If this is unexpected, please log in with password and setup Gogs under another user.")
return nil
}
verb, args := parseSSHCmd(sshCmd)
repoFullName := strings.ToLower(strings.Trim(args, "'"))
repoFields := strings.SplitN(repoFullName, "/", 2)
if len(repoFields) != 2 {
fail("Invalid repository path", "Invalid repository path: %v", args)
}
ownerName := strings.ToLower(repoFields[0])
repoName := strings.TrimSuffix(strings.ToLower(repoFields[1]), ".git")
repoName = strings.TrimSuffix(repoName, ".wiki")
owner, err := models.GetUserByName(ownerName)
if err != nil {
if models.IsErrUserNotExist(err) {
fail("Repository owner does not exist", "Unregistered owner: %s", ownerName)
}
fail("Internal error", "Fail to get repository owner '%s': %v", ownerName, err)
}
repo, err := models.GetRepositoryByName(owner.ID, repoName)
if err != nil {
if models.IsErrRepoNotExist(err) {
fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", owner.Name, repoName)
}
fail("Internal error", "Fail to get repository: %v", err)
}
repo.Owner = owner
requestMode, ok := allowedCommands[verb]
if !ok {
fail("Unknown git command", "Unknown git command '%s'", verb)
}
// Prohibit push to mirror repositories.
if requestMode > models.ACCESS_MODE_READ && repo.IsMirror {
fail("Mirror repository is read-only", "")
}
// Allow anonymous (user is nil) clone for public repositories.
var user *models.User
key, err := models.GetPublicKeyByID(com.StrTo(strings.TrimPrefix(c.Args()[0], "key-")).MustInt64())
if err != nil {
fail("Invalid key ID", "Invalid key ID '%s': %v", c.Args()[0], err)
}
if requestMode == models.ACCESS_MODE_WRITE || repo.IsPrivate {
// Check deploy key or user key.
if key.IsDeployKey() {
if key.Mode < requestMode {
fail("Key permission denied", "Cannot push with deployment key: %d", key.ID)
}
checkDeployKey(key, repo)
} else {
user, err = models.GetUserByKeyID(key.ID)
if err != nil {
fail("Internal error", "Fail to get user by key ID '%d': %v", key.ID, err)
}
mode, err := models.AccessLevel(user.ID, repo)
if err != nil {
fail("Internal error", "Fail to check access: %v", err)
}
if mode < requestMode {
clientMessage := _ACCESS_DENIED_MESSAGE
if mode >= models.ACCESS_MODE_READ {
clientMessage = "You do not have sufficient authorization for this action"
}
fail(clientMessage,
"User '%s' does not have level '%v' access to repository '%s'",
user.Name, requestMode, repoFullName)
}
}
} else {
setting.NewService()
// Check if the key can access to the repository in case of it is a deploy key (a deploy keys != user key).
// A deploy key doesn't represent a signed in user, so in a site with Service.RequireSignInView activated
// we should give read access only in repositories where this deploy key is in use. In other case, a server
// or system using an active deploy key can get read access to all the repositories in a Gogs service.
if key.IsDeployKey() && setting.Service.RequireSignInView {
checkDeployKey(key, repo)
}
}
// Update user key activity.
if key.ID > 0 {
key, err := models.GetPublicKeyByID(key.ID)
if err != nil {
fail("Internal error", "GetPublicKeyByID: %v", err)
}
key.Updated = time.Now()
if err = models.UpdatePublicKey(key); err != nil {
fail("Internal error", "UpdatePublicKey: %v", err)
}
}
// Special handle for Windows.
if setting.IsWindows {
verb = strings.Replace(verb, "-", " ", 1)
}
var gitCmd *exec.Cmd
verbs := strings.Split(verb, " ")
if len(verbs) == 2 {
gitCmd = exec.Command(verbs[0], verbs[1], repoFullName)
} else {
gitCmd = exec.Command(verb, repoFullName)
}
if requestMode == models.ACCESS_MODE_WRITE {
gitCmd.Env = append(os.Environ(), http.ComposeHookEnvs(http.ComposeHookEnvsOptions{
AuthUser: user,
OwnerName: owner.Name,
OwnerSalt: owner.Salt,
RepoID: repo.ID,
RepoName: repo.Name,
RepoPath: repo.RepoPath(),
})...)
}
gitCmd.Dir = setting.RepoRootPath
gitCmd.Stdout = os.Stdout
gitCmd.Stdin = os.Stdin
gitCmd.Stderr = os.Stderr
if err = gitCmd.Run(); err != nil {
fail("Internal error", "Fail to execute git command: %v", err)
}
return nil
}

View File

@@ -1,295 +0,0 @@
// Copyright 2014 The Gogs 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 cmd
import (
"crypto/tls"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/Unknwon/com"
"github.com/codegangsta/cli"
gouuid "github.com/satori/go.uuid"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/httplib"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
)
const (
_ACCESS_DENIED_MESSAGE = "Repository does not exist or you do not have access"
)
var CmdServ = cli.Command{
Name: "serv",
Usage: "This command should only be called by SSH shell",
Description: `Serv provide access auth for repositories`,
Action: runServ,
Flags: []cli.Flag{
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
}
func setup(logPath string) {
setting.NewContext()
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
models.LoadConfigs()
if setting.UseSQLite3 || setting.UseTiDB {
workDir, _ := setting.WorkDir()
os.Chdir(workDir)
}
models.SetEngine()
}
func parseCmd(cmd string) (string, string) {
ss := strings.SplitN(cmd, " ", 2)
if len(ss) != 2 {
return "", ""
}
return ss[0], strings.Replace(ss[1], "'/", "'", 1)
}
var (
allowedCommands = map[string]models.AccessMode{
"git-upload-pack": models.ACCESS_MODE_READ,
"git-upload-archive": models.ACCESS_MODE_READ,
"git-receive-pack": models.ACCESS_MODE_WRITE,
}
)
func fail(userMessage, logMessage string, args ...interface{}) {
fmt.Fprintln(os.Stderr, "Gogs:", userMessage)
if len(logMessage) > 0 {
if !setting.ProdMode {
fmt.Fprintf(os.Stderr, logMessage+"\n", args...)
}
log.GitLogger.Fatal(3, logMessage, args...)
return
}
log.GitLogger.Close()
os.Exit(1)
}
func handleUpdateTask(uuid string, user, repoUser *models.User, reponame string, isWiki bool) {
task, err := models.GetUpdateTaskByUUID(uuid)
if err != nil {
if models.IsErrUpdateTaskNotExist(err) {
log.GitLogger.Trace("No update task is presented: %s", uuid)
return
}
log.GitLogger.Fatal(2, "GetUpdateTaskByUUID: %v", err)
} else if err = models.DeleteUpdateTaskByUUID(uuid); err != nil {
log.GitLogger.Fatal(2, "DeleteUpdateTaskByUUID: %v", err)
}
if isWiki {
return
}
if err = models.PushUpdate(models.PushUpdateOptions{
RefName: task.RefName,
OldCommitID: task.OldCommitID,
NewCommitID: task.NewCommitID,
PusherID: user.ID,
PusherName: user.Name,
RepoUserName: repoUser.Name,
RepoName: reponame,
}); err != nil {
log.GitLogger.Error(2, "Update: %v", err)
}
// Ask for running deliver hook and test pull request tasks.
reqURL := setting.LocalURL + repoUser.Name + "/" + reponame + "/tasks/trigger?branch=" +
strings.TrimPrefix(task.RefName, "refs/heads/") + "&secret=" + base.EncodeMD5(repoUser.Salt)
log.GitLogger.Trace("Trigger task: %s", reqURL)
resp, err := httplib.Head(reqURL).SetTLSClientConfig(&tls.Config{
InsecureSkipVerify: true,
}).Response()
if err == nil {
resp.Body.Close()
if resp.StatusCode/100 != 2 {
log.GitLogger.Error(2, "Fail to trigger task: not 2xx response code")
}
} else {
log.GitLogger.Error(2, "Fail to trigger task: %v", err)
}
}
func runServ(c *cli.Context) error {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
setup("serv.log")
if setting.SSH.Disabled {
println("Gogs: SSH has been disabled")
return nil
}
if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arguments")
}
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
if len(cmd) == 0 {
println("Hi there, You've successfully authenticated, but Gogs does not provide shell access.")
println("If this is unexpected, please log in with password and setup Gogs under another user.")
return nil
}
verb, args := parseCmd(cmd)
repoPath := strings.ToLower(strings.Trim(args, "'"))
rr := strings.SplitN(repoPath, "/", 2)
if len(rr) != 2 {
fail("Invalid repository path", "Invalid repository path: %v", args)
}
username := strings.ToLower(rr[0])
reponame := strings.ToLower(strings.TrimSuffix(rr[1], ".git"))
isWiki := false
if strings.HasSuffix(reponame, ".wiki") {
isWiki = true
reponame = reponame[:len(reponame)-5]
}
repoUser, err := models.GetUserByName(username)
if err != nil {
if models.IsErrUserNotExist(err) {
fail("Repository owner does not exist", "Unregistered owner: %s", username)
}
fail("Internal error", "Failed to get repository owner (%s): %v", username, err)
}
repo, err := models.GetRepositoryByName(repoUser.ID, reponame)
if err != nil {
if models.IsErrRepoNotExist(err) {
fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", repoUser.Name, reponame)
}
fail("Internal error", "Failed to get repository: %v", err)
}
requestedMode, has := allowedCommands[verb]
if !has {
fail("Unknown git command", "Unknown git command %s", verb)
}
// Prohibit push to mirror repositories.
if requestedMode > models.ACCESS_MODE_READ && repo.IsMirror {
fail("mirror repository is read-only", "")
}
// Allow anonymous clone for public repositories.
var (
keyID int64
user *models.User
)
if requestedMode == models.ACCESS_MODE_WRITE || repo.IsPrivate {
keys := strings.Split(c.Args()[0], "-")
if len(keys) != 2 {
fail("Key ID format error", "Invalid key argument: %s", c.Args()[0])
}
key, err := models.GetPublicKeyByID(com.StrTo(keys[1]).MustInt64())
if err != nil {
fail("Invalid key ID", "Invalid key ID[%s]: %v", c.Args()[0], err)
}
keyID = key.ID
// Check deploy key or user key.
if key.Type == models.KEY_TYPE_DEPLOY {
if key.Mode < requestedMode {
fail("Key permission denied", "Cannot push with deployment key: %d", key.ID)
}
// Check if this deploy key belongs to current repository.
if !models.HasDeployKey(key.ID, repo.ID) {
fail("Key access denied", "Deploy key access denied: [key_id: %d, repo_id: %d]", key.ID, repo.ID)
}
// Update deploy key activity.
deployKey, err := models.GetDeployKeyByRepo(key.ID, repo.ID)
if err != nil {
fail("Internal error", "GetDeployKey: %v", err)
}
deployKey.Updated = time.Now()
if err = models.UpdateDeployKey(deployKey); err != nil {
fail("Internal error", "UpdateDeployKey: %v", err)
}
} else {
user, err = models.GetUserByKeyID(key.ID)
if err != nil {
fail("internal error", "Failed to get user by key ID(%d): %v", keyID, err)
}
mode, err := models.AccessLevel(user, repo)
if err != nil {
fail("Internal error", "Fail to check access: %v", err)
} else if mode < requestedMode {
clientMessage := _ACCESS_DENIED_MESSAGE
if mode >= models.ACCESS_MODE_READ {
clientMessage = "You do not have sufficient authorization for this action"
}
fail(clientMessage,
"User %s does not have level %v access to repository %s",
user.Name, requestedMode, repoPath)
}
}
}
uuid := gouuid.NewV4().String()
os.Setenv("uuid", uuid)
// Special handle for Windows.
if setting.IsWindows {
verb = strings.Replace(verb, "-", " ", 1)
}
var gitcmd *exec.Cmd
verbs := strings.Split(verb, " ")
if len(verbs) == 2 {
gitcmd = exec.Command(verbs[0], verbs[1], repoPath)
} else {
gitcmd = exec.Command(verb, repoPath)
}
gitcmd.Dir = setting.RepoRootPath
gitcmd.Stdout = os.Stdout
gitcmd.Stdin = os.Stdin
gitcmd.Stderr = os.Stderr
if err = gitcmd.Run(); err != nil {
fail("Internal error", "Failed to execute git command: %v", err)
}
if requestedMode == models.ACCESS_MODE_WRITE {
handleUpdateTask(uuid, user, repoUser, reponame, isWiki)
}
// Update user key activity.
if keyID > 0 {
key, err := models.GetPublicKeyByID(keyID)
if err != nil {
fail("Internal error", "GetPublicKeyById: %v", err)
}
key.Updated = time.Now()
if err = models.UpdatePublicKey(key); err != nil {
fail("Internal error", "UpdatePublicKey: %v", err)
}
}
return nil
}

View File

@@ -1,58 +0,0 @@
// Copyright 2014 The Gogs 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 cmd
import (
"os"
"github.com/codegangsta/cli"
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
)
var CmdUpdate = cli.Command{
Name: "update",
Usage: "This command should only be called by Git hook",
Description: `Update get pushed info and insert into database`,
Action: runUpdate,
Flags: []cli.Flag{
stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
},
}
func runUpdate(c *cli.Context) error {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
setup("update.log")
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
log.GitLogger.Trace("SSH_ORIGINAL_COMMAND is empty")
return nil
}
args := c.Args()
if len(args) != 3 {
log.GitLogger.Fatal(2, "Arguments received are not equal to three")
} else if len(args[0]) == 0 {
log.GitLogger.Fatal(2, "First argument 'refName' is empty, shouldn't use")
}
task := models.UpdateTask{
UUID: os.Getenv("uuid"),
RefName: args[0],
OldCommitID: args[1],
NewCommitID: args[2],
}
if err := models.AddUpdateTask(&task); err != nil {
log.GitLogger.Fatal(2, "AddUpdateTask: %v", err)
}
return nil
}

View File

@@ -8,13 +8,13 @@ import (
"crypto/tls"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/fcgi"
"os"
"path"
"strings"
"github.com/codegangsta/cli"
"github.com/go-macaron/binding"
"github.com/go-macaron/cache"
"github.com/go-macaron/captcha"
@@ -25,6 +25,8 @@ import (
"github.com/go-macaron/toolbox"
"github.com/go-xorm/xorm"
"github.com/mcuadros/go-version"
"github.com/urfave/cli"
log "gopkg.in/clog.v1"
"gopkg.in/ini.v1"
"gopkg.in/macaron.v1"
@@ -35,7 +37,7 @@ import (
"github.com/gogits/gogs/modules/auth"
"github.com/gogits/gogs/modules/bindata"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/mailer"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/template"
"github.com/gogits/gogs/routers"
@@ -72,28 +74,34 @@ func checkVersion() {
if err != nil {
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
}
if string(data) != setting.AppVer {
log.Fatal(4, "Binary and template file version does not match, did you forget to recompile?")
tplVer := string(data)
if tplVer != setting.AppVer {
if version.Compare(tplVer, setting.AppVer, ">") {
log.Fatal(4, "Binary version is lower than template file version, did you forget to recompile Gogs?")
} else {
log.Fatal(4, "Binary version is higher than template file version, did you forget to update template files?")
}
}
// Check dependency version.
// LEGACY [0.11]: no need to check version as we check in vendor into version control
checkers := []VerChecker{
{"github.com/go-xorm/xorm", func() string { return xorm.Version }, "0.5.5"},
{"github.com/go-xorm/xorm", func() string { return xorm.Version }, "0.6.0"},
{"github.com/go-macaron/binding", binding.Version, "0.3.2"},
{"github.com/go-macaron/cache", cache.Version, "0.1.2"},
{"github.com/go-macaron/csrf", csrf.Version, "0.1.0"},
{"github.com/go-macaron/i18n", i18n.Version, "0.3.0"},
{"github.com/go-macaron/session", session.Version, "0.1.6"},
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.3"},
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
{"gopkg.in/macaron.v1", macaron.Version, "1.1.7"},
{"github.com/gogits/git-module", git.Version, "0.3.4"},
{"github.com/gogits/go-gogs-client", gogs.Version, "0.10.3"},
{"github.com/gogits/git-module", git.Version, "0.4.12"},
{"github.com/gogits/go-gogs-client", gogs.Version, "0.12.1"},
}
for _, c := range checkers {
if !version.Compare(c.Version(), c.Expected, ">=") {
log.Fatal(4, `Dependency outdated!
Package '%s' current version (%s) is below requirement (%s),
Package '%s' current version (%s) is below requirement (%s),
please use following command to update this package and recompile Gogs:
go get -u %[1]s`, c.ImportPath, c.Version(), c.Expected)
}
@@ -110,7 +118,7 @@ func newMacaron() *macaron.Macaron {
if setting.EnableGzip {
m.Use(gzip.Gziper())
}
if setting.Protocol == setting.FCGI {
if setting.Protocol == setting.SCHEME_FCGI {
m.SetURLPrefix(setting.AppSubUrl)
}
m.Use(macaron.Static(
@@ -134,7 +142,7 @@ func newMacaron() *macaron.Macaron {
Funcs: funcMap,
IndentJSON: macaron.Env != macaron.PROD,
}))
models.InitMailRender(path.Join(setting.StaticRootPath, "templates/mail"),
mailer.InitMailRender(path.Join(setting.StaticRootPath, "templates/mail"),
path.Join(setting.CustomPath, "templates/mail"), funcMap)
localeNames, err := bindata.AssetDir("conf/locale")
@@ -157,7 +165,7 @@ func newMacaron() *macaron.Macaron {
m.Use(cache.Cacher(cache.Options{
Adapter: setting.CacheAdapter,
AdapterConfig: setting.CacheConn,
Interval: setting.CacheInternal,
Interval: setting.CacheInterval,
}))
m.Use(captcha.Captchaer(captcha.Options{
SubURL: setting.AppSubUrl,
@@ -208,6 +216,7 @@ func runWeb(ctx *cli.Context) error {
})
m.Get("/repos", routers.ExploreRepos)
m.Get("/users", routers.ExploreUsers)
m.Get("/organizations", routers.ExploreOrganizations)
}, ignSignIn)
m.Combo("/install", routers.InstallInit).Get(routers.Install).
Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost)
@@ -240,6 +249,12 @@ func runWeb(ctx *cli.Context) error {
m.Combo("/applications").Get(user.SettingsApplications).
Post(bindIgnErr(auth.NewAccessTokenForm{}), user.SettingsApplicationsPost)
m.Post("/applications/delete", user.SettingsDeleteApplication)
m.Group("/organizations", func() {
m.Get("", user.SettingsOrganizations)
m.Post("/leave", user.SettingsLeaveOrganization)
})
m.Route("/delete", "GET,POST", user.SettingsDelete)
}, reqSignIn, func(ctx *context.Context) {
ctx.Data["PageIsUserSettings"] = true
@@ -324,6 +339,7 @@ func runWeb(ctx *cli.Context) error {
defer fr.Close()
ctx.Header().Set("Cache-Control", "public,max-age=86400")
ctx.Header().Set("Content-Disposition", fmt.Sprintf(`inline; filename="%s"`, attach.Name))
// Fix #312. Attachments with , in their name are not handled correctly by Google Chrome.
// We must put the name in " manually.
if err = repo.ServeData(ctx, "\""+attach.Name+"\"", fr); err != nil {
@@ -347,8 +363,14 @@ func runWeb(ctx *cli.Context) error {
// ***** START: Organization *****
m.Group("/org", func() {
m.Get("/create", org.Create)
m.Post("/create", bindIgnErr(auth.CreateOrgForm{}), org.CreatePost)
m.Group("", func() {
m.Get("/create", org.Create)
m.Post("/create", bindIgnErr(auth.CreateOrgForm{}), org.CreatePost)
}, func(ctx *context.Context) {
if !ctx.User.CanCreateOrganization() {
ctx.NotFound()
}
})
m.Group("/:org", func() {
m.Get("/dashboard", user.Dashboard)
@@ -385,9 +407,11 @@ func runWeb(ctx *cli.Context) error {
m.Get("/:type/new", repo.WebhooksNew)
m.Post("/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
m.Get("/:id", repo.WebHooksEdit)
m.Post("/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost)
m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost)
m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost)
})
m.Route("/delete", "GET,POST", org.SettingsDelete)
@@ -413,10 +437,21 @@ func runWeb(ctx *cli.Context) error {
m.Combo("").Get(repo.Settings).
Post(bindIgnErr(auth.RepoSettingForm{}), repo.SettingsPost)
m.Group("/collaboration", func() {
m.Combo("").Get(repo.Collaboration).Post(repo.CollaborationPost)
m.Combo("").Get(repo.SettingsCollaboration).Post(repo.SettingsCollaborationPost)
m.Post("/access_mode", repo.ChangeCollaborationAccessMode)
m.Post("/delete", repo.DeleteCollaboration)
})
m.Group("/branches", func() {
m.Get("", repo.SettingsBranches)
m.Post("/default_branch", repo.UpdateDefaultBranch)
m.Combo("/*").Get(repo.SettingsProtectedBranch).
Post(bindIgnErr(auth.ProtectBranchForm{}), repo.SettingsProtectedBranchPost)
}, func(ctx *context.Context) {
if ctx.Repo.Repository.IsMirror {
ctx.NotFound()
return
}
})
m.Group("/hooks", func() {
m.Get("", repo.Webhooks)
@@ -424,21 +459,23 @@ func runWeb(ctx *cli.Context) error {
m.Get("/:type/new", repo.WebhooksNew)
m.Post("/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
m.Get("/:id", repo.WebHooksEdit)
m.Post("/:id/test", repo.TestWebhook)
m.Post("/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost)
m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost)
m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost)
m.Group("/git", func() {
m.Get("", repo.GitHooks)
m.Combo("/:name").Get(repo.GitHooksEdit).
Post(repo.GitHooksEditPost)
m.Get("", repo.SettingsGitHooks)
m.Combo("/:name").Get(repo.SettingsGitHooksEdit).
Post(repo.SettingsGitHooksEditPost)
}, context.GitHookService())
})
m.Group("/keys", func() {
m.Combo("").Get(repo.DeployKeys).
Post(bindIgnErr(auth.AddSSHKeyForm{}), repo.DeployKeysPost)
m.Combo("").Get(repo.SettingsDeployKeys).
Post(bindIgnErr(auth.AddSSHKeyForm{}), repo.SettingsDeployKeysPost)
m.Post("/delete", repo.DeleteDeployKey)
})
@@ -459,12 +496,12 @@ func runWeb(ctx *cli.Context) error {
m.Post("/label", repo.UpdateIssueLabel)
m.Post("/milestone", repo.UpdateIssueMilestone)
m.Post("/assignee", repo.UpdateIssueAssignee)
m.Combo("/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
}, reqRepoWriter)
m.Group("/:index", func() {
m.Post("/title", repo.UpdateIssueTitle)
m.Post("/content", repo.UpdateIssueContent)
m.Combo("/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
})
})
m.Group("/comments/:id", func() {
@@ -475,7 +512,8 @@ func runWeb(ctx *cli.Context) error {
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
m.Post("/delete", repo.DeleteLabel)
}, repo.MustEnableIssues, reqRepoWriter, context.RepoRef())
m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), repo.InitializeLabels)
}, reqRepoWriter, context.RepoRef())
m.Group("/milestones", func() {
m.Combo("/new").Get(repo.NewMilestone).
Post(bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
@@ -483,18 +521,49 @@ func runWeb(ctx *cli.Context) error {
m.Post("/:id/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.EditMilestonePost)
m.Get("/:id/:action", repo.ChangeMilestonStatus)
m.Post("/delete", repo.DeleteMilestone)
}, repo.MustEnableIssues, reqRepoWriter, context.RepoRef())
}, reqRepoWriter, context.RepoRef())
m.Group("/releases", func() {
m.Get("/new", repo.NewRelease)
m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
m.Get("/edit/:tagname", repo.EditRelease)
m.Post("/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
m.Post("/delete", repo.DeleteRelease)
m.Get("/edit/*", repo.EditRelease)
m.Post("/edit/*", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
}, reqRepoWriter, context.RepoRef())
// FIXME: Should use ctx.Repo.PullRequest to unify template, currently we have inconsistent URL
// for PR in same repository. After select branch on the page, the URL contains redundant head user name.
// e.g. /org1/test-repo/compare/master...org1:develop
// which should be /org1/test-repo/compare/master...develop
m.Combo("/compare/*", repo.MustAllowPulls).Get(repo.CompareAndPullRequest).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
m.Group("", func() {
m.Combo("/_edit/*").Get(repo.EditFile).
Post(bindIgnErr(auth.EditRepoFileForm{}), repo.EditFilePost)
m.Combo("/_new/*").Get(repo.NewFile).
Post(bindIgnErr(auth.EditRepoFileForm{}), repo.NewFilePost)
m.Post("/_preview/*", bindIgnErr(auth.EditPreviewDiffForm{}), repo.DiffPreviewPost)
m.Combo("/_delete/*").Get(repo.DeleteFile).
Post(bindIgnErr(auth.DeleteRepoFileForm{}), repo.DeleteFilePost)
m.Group("", func() {
m.Combo("/_upload/*").Get(repo.UploadFile).
Post(bindIgnErr(auth.UploadRepoFileForm{}), repo.UploadFilePost)
m.Post("/upload-file", repo.UploadFileToServer)
m.Post("/upload-remove", bindIgnErr(auth.RemoveUploadFileForm{}), repo.RemoveUploadFileFromServer)
}, func(ctx *context.Context) {
if !setting.Repository.Upload.Enabled {
ctx.NotFound()
return
}
})
}, reqRepoWriter, context.RepoRef(), func(ctx *context.Context) {
if !ctx.Repo.CanEnableEditor() {
ctx.NotFound()
return
}
})
}, reqSignIn, context.RepoAssignment(), repo.MustBeNotBare)
m.Group("/:username/:reponame", func() {
@@ -507,6 +576,7 @@ func runWeb(ctx *cli.Context) error {
}, context.RepoRef())
// m.Get("/branches", repo.Branches)
m.Post("/branches/delete/*", reqSignIn, reqRepoWriter, repo.DeleteBranchPost)
m.Group("/wiki", func() {
m.Get("/?:page", repo.Wiki)
@@ -533,12 +603,12 @@ func runWeb(ctx *cli.Context) error {
m.Get("/src/*", repo.Home)
m.Get("/raw/*", repo.SingleDownload)
m.Get("/commits/*", repo.RefCommits)
m.Get("/commit/:sha([a-z0-9]{40})$", repo.Diff)
m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.Diff)
m.Get("/forks", repo.Forks)
}, context.RepoRef())
m.Get("/commit/:sha([a-z0-9]{40})\\.:ext(patch|diff)", repo.RawDiff)
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff)
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff)
m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", context.RepoRef(), repo.CompareDiff)
}, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare)
m.Group("/:username/:reponame", func() {
m.Get("/stars", repo.Stars)
@@ -546,15 +616,18 @@ func runWeb(ctx *cli.Context) error {
}, ignSignIn, context.RepoAssignment(), context.RepoRef())
m.Group("/:username", func() {
m.Group("/:reponame", func() {
m.Get("", repo.Home)
m.Get("\\.git$", repo.Home)
m.Group("", func() {
m.Get("/:reponame", repo.Home)
}, ignSignIn, context.RepoAssignment(true), context.RepoRef())
m.Group("/:reponame", func() {
m.Any("/*", ignSignInAndCsrf, repo.HTTP)
m.Head("/tasks/trigger", repo.TriggerTask)
})
// Use the regexp to match the repository name validation
m.Group("/:reponame([\\d\\w-_\\.]+\\.git$)", func() {
m.Get("", ignSignIn, context.RepoAssignment(true), context.RepoRef(), repo.Home)
m.Route("/*", "GET,POST", ignSignInAndCsrf, repo.HTTPContexter(), repo.HTTP)
})
})
// ***** END: Repository *****
@@ -576,21 +649,52 @@ func runWeb(ctx *cli.Context) error {
// Flag for port number in case first time run conflict.
if ctx.IsSet("port") {
setting.AppUrl = strings.Replace(setting.AppUrl, setting.HttpPort, ctx.String("port"), 1)
setting.HttpPort = ctx.String("port")
setting.AppUrl = strings.Replace(setting.AppUrl, setting.HTTPPort, ctx.String("port"), 1)
setting.HTTPPort = ctx.String("port")
}
var err error
listenAddr := fmt.Sprintf("%s:%s", setting.HttpAddr, setting.HttpPort)
var listenAddr string
if setting.Protocol == setting.SCHEME_UNIX_SOCKET {
listenAddr = fmt.Sprintf("%s", setting.HTTPAddr)
} else {
listenAddr = fmt.Sprintf("%s:%s", setting.HTTPAddr, setting.HTTPPort)
}
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubUrl)
var err error
switch setting.Protocol {
case setting.HTTP:
case setting.SCHEME_HTTP:
err = http.ListenAndServe(listenAddr, m)
case setting.HTTPS:
server := &http.Server{Addr: listenAddr, TLSConfig: &tls.Config{MinVersion: tls.VersionTLS10}, Handler: m}
case setting.SCHEME_HTTPS:
server := &http.Server{Addr: listenAddr, TLSConfig: &tls.Config{
MinVersion: tls.VersionTLS10,
CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256},
PreferServerCipherSuites: true,
CipherSuites: []uint16{
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // Required for HTTP/2 support.
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
tls.TLS_RSA_WITH_AES_256_CBC_SHA,
},
}, Handler: m}
err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile)
case setting.FCGI:
case setting.SCHEME_FCGI:
err = fcgi.Serve(nil, m)
case setting.SCHEME_UNIX_SOCKET:
os.Remove(listenAddr)
var listener *net.UnixListener
listener, err = net.ListenUnix("unix", &net.UnixAddr{listenAddr, "unix"})
if err != nil {
break // Handle error after switch
}
// FIXME: add proper implementation of signal capture on all protocols
// execute this on SIGTERM or SIGINT: listener.Close()
if err = os.Chmod(listenAddr, os.FileMode(setting.UnixSocketPermission)); err != nil {
log.Fatal(4, "Failed to set permission of unix socket: %v", err)
}
err = http.Serve(listener, m)
default:
log.Fatal(4, "Invalid protocol: %s", setting.Protocol)
}

View File

@@ -1,66 +1,22 @@
# NEVER EVER MODIFY THIS FILE
# PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE
# !!! NEVER EVER MODIFY THIS FILE !!!
# !!! PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE !!!
# !!! IF YOU ARE PACKAGING PROVIDER, PLEASE MAKE OWN COPY OF IT !!!
; App name that shows on every page title
APP_NAME = Gogs: Go Git Service
; Change it if you run locally
APP_NAME = Gogs
; The name of the system user that runs Gogs
RUN_USER = git
; Either "dev", "prod" or "test", default is "dev"
; Either "dev", "prod" or "test"
RUN_MODE = dev
[repository]
ROOT =
SCRIPT_TYPE = bash
; Default ANSI charset
ANSI_CHARSET =
; Force every new repository to be private
FORCE_PRIVATE = false
; Global maximum creation limit of repository per user, -1 means no limit
MAX_CREATION_LIMIT = -1
; Patch test queue length, make it as large as possible
PULL_REQUEST_QUEUE_LENGTH = 10000
[ui]
; Number of repositories that are showed in one explore page
EXPLORE_PAGING_NUM = 20
; Number of issues that are showed in one page
ISSUE_PAGING_NUM = 10
; Number of maximum commits showed in one activity feed
FEED_MAX_COMMIT_NUM = 5
; Value of `theme-color` meta tag, used by Android >= 5.0
; An invalid color like "none" or "disable" will have the default style
; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
THEME_COLOR_META_TAG = `#ff5343`
; Max size of files to be displayed (defaults is 8MiB)
MAX_DISPLAY_FILE_SIZE = 8388608
[ui.admin]
; Number of users that are showed in one page
USER_PAGING_NUM = 50
; Number of repos that are showed in one page
REPO_PAGING_NUM = 50
; Number of notices that are showed in one page
NOTICE_PAGING_NUM = 25
; Number of organization that are showed in one page
ORG_PAGING_NUM = 50
[ui.user]
; Number of repos that are showed in one page
REPO_PAGING_NUM = 15
[markdown]
; Enable hard line break extension
ENABLE_HARD_LINE_BREAK = false
; List of custom URL-Schemes that are allowed as links when rendering Markdown
; for example git,magnet
CUSTOM_URL_SCHEMES =
[server]
PROTOCOL = http
DOMAIN = localhost
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 3000
; Permission for unix socket
UNIX_SOCKET_PERMISSION = 666
; Local (DMZ) URL for Gogs workers (such as SSH update) accessing web service.
; In most cases you do not need to change the default value.
; Alter it only if your SSH server node is not the same as HTTP node.
@@ -69,14 +25,18 @@ LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
DISABLE_SSH = false
; Whether use builtin SSH server or not.
START_SSH_SERVER = false
; Domain name to be exposed in clone URL
; Domain name to be exposed in SSH clone URL
SSH_DOMAIN = %(DOMAIN)s
; Port number to be exposed in clone URL
; Port number to be exposed in SSH clone URL
SSH_PORT = 22
; Network interface builtin SSH server listens on
SSH_LISTEN_HOST = 0.0.0.0
; Port number builtin SSH server listens on
SSH_LISTEN_PORT = %(SSH_PORT)s
; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
SSH_ROOT_PATH =
; Choose the ciphers to support for SSH connections
SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128
; Directory to create temporary files when test publick key using ssh-keygen,
; default is system temporary directory.
SSH_KEY_TEST_PATH =
@@ -106,6 +66,68 @@ ENABLE_GZIP = false
; Landing page for non-logged users, can be "home" or "explore"
LANDING_PAGE = home
[repository]
; Root path for storing repositories's data, default is "~/<username>/gogs-repositories"
ROOT =
; The script type server supports, sometimes could be "sh"
SCRIPT_TYPE = bash
; Default ANSI charset for an unrecognized charset
ANSI_CHARSET =
; Force every new repository to be private
FORCE_PRIVATE = false
; Global maximum creation limit of repository per user, -1 means no limit
MAX_CREATION_LIMIT = -1
; Mirror sync queue length, increase if mirror syncing starts hanging
MIRROR_QUEUE_LENGTH = 1000
; Patch test queue length, increase if pull request patch testing starts hanging
PULL_REQUEST_QUEUE_LENGTH = 1000
; Preferred Licenses to place at the top of the list
; Name must match file name in conf/license or custom/conf/license
PREFERRED_LICENSES = Apache License 2.0,MIT License
; Disable ability to interact with repositories by HTTP protocol
DISABLE_HTTP_GIT = false
; Enable ability to migrate repository by local path
ENABLE_LOCAL_PATH_MIGRATION = false
; Concurrency is used to retrieve commits information. This variable define
; the maximum number of tasks that can be run at the same time. Usually, the
; value depend of how many CPUs (cores) you have. If the value is set to zero
; or under, GOGS will automatically detect the number of CPUs your system have
COMMITS_FETCH_CONCURRENCY = 0
[repository.editor]
; List of file extensions that should have line wraps in the CodeMirror editor.
; Separate extensions with a comma. To line wrap files without extension, just put a comma
LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
; Valid file modes that have a preview API associated with them, such as api/v1/markdown.
; Separate values by commas. Preview tab in edit mode won't show if the file extension doesn't match
PREVIEWABLE_FILE_MODES = markdown
[repository.upload]
; Enable repository file uploads.
ENABLED = true
; Path to temporarily store uploads (default path gets cleaned by Gogs in every start)
TEMP_PATH = data/tmp/uploads
; File types that are allowed to be uploaded, e.g. image/jpeg|image/png. Leave empty means allow any file type
ALLOWED_TYPES =
; Maximum size of each file in MB
FILE_MAX_SIZE = 3
; Maximum number of files per upload
MAX_FILES = 5
[markdown]
; Enable hard line break extension
ENABLE_HARD_LINE_BREAK = false
; List of custom URL-Schemes that are allowed as links when rendering Markdown
; for example git,magnet
CUSTOM_URL_SCHEMES =
; List of file extensions that should be rendered/edited as Markdown
; Separate extensions with a comma. To render files w/o extension as markdown, just put a comma
FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
[http]
; Value for Access-Control-Allow-Origin header, default is not to present
ACCESS_CONTROL_ALLOW_ORIGIN =
; Define allowed algorithms and their minimum key length (use -1 to disable a type)
[ssh.minimum_key_sizes]
ED25519 = 256
@@ -114,7 +136,7 @@ RSA = 2048
DSA = 1024
[database]
; Either "mysql", "postgres" or "sqlite3", it's your choice
; Either "mysql", "postgres" or "sqlite3", you can connect to TiDB with MySQL protocol
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gogs
@@ -126,6 +148,8 @@ SSL_MODE = disable
PATH = data/gogs.db
[admin]
; Disable regular (non-admin) users to create organizations
DISABLE_REGULAR_ORG_CREATION = false
[security]
INSTALL_LOCK = false
@@ -135,6 +159,7 @@ SECRET_KEY = !#@FDEWREWR&*(
LOGIN_REMEMBER_DAYS = 7
COOKIE_USERNAME = gogs_awesome
COOKIE_REMEMBER_NAME = gogs_incredible
COOKIE_SECURE = false
; Reverse proxy authentication header name of user name
REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
@@ -156,7 +181,9 @@ ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
ENABLE_CAPTCHA = true
[webhook]
; Hook task queue length
; Types are enabled for users to use, can be "gogs", "slack", "discord"
TYPES = gogs, slack, discord
; Hook task queue length, increase if webhook shooting starts hanging
QUEUE_LENGTH = 1000
; Deliver timeout in seconds
DELIVER_TIMEOUT = 5
@@ -223,8 +250,11 @@ ENABLE_SET_COOKIE = true
GC_INTERVAL_TIME = 86400
; Session life time, default is 86400
SESSION_LIFE_TIME = 86400
; Cookie name for CSRF
CSRF_COOKIE_NAME = _csrf
[picture]
; Path to store user uploaded avatars
AVATAR_UPLOAD_PATH = data/avatars
; Chinese users can choose "duoshuo"
; or a custom avatar source, like: http://cn.gravatar.com/avatar/
@@ -232,9 +262,9 @@ GRAVATAR_SOURCE = gravatar
; This value will be forced to be true in offline mode.
DISABLE_GRAVATAR = false
; Federated avatar lookup uses DNS to discover avatar associated
; with emails, see http://www.libravatar.org
; with emails, see https://www.libravatar.org
; This value will be forced to be false in offline mode or Gravatar is disbaled.
ENABLE_FEDERATED_AVATAR = false
ENABLE_FEDERATED_AVATAR = true
[attachment]
; Whether attachments are enabled. Defaults to `true`
@@ -254,66 +284,43 @@ MAX_FILES = 5
; For more information about the format see http://golang.org/pkg/time/#pkg-constants
FORMAT =
; General settings of loggers
[log]
ROOT_PATH =
; Either "console", "file", "conn", "smtp" or "database", default is "console"
; Can be "console" and "file", default is "console"
; Use comma to separate multiple modes, e.g. "console, file"
MODE = console
; Buffer length of channel, keep it as it is if you don't know what it is.
BUFFER_LEN = 10000
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
BUFFER_LEN = 100
; Either "Trace", "Info", "Warn", "Error", "Fatal", default is "Trace"
LEVEL = Trace
; For "console" mode only
[log.console]
; leave empty to inherit
LEVEL =
; For "file" mode only
[log.file]
; leave empty to inherit
LEVEL =
; This enables automated log rotate(switch of following options), default is true
; This enables automated log rotate (switch of following options)
LOG_ROTATE = true
; Max line number of single file, default is 1000000
MAX_LINES = 1000000
; Segment log daily
DAILY_ROTATE = true
; Max size shift of single file, default is 28 means 1 << 28, 256MB
MAX_SIZE_SHIFT = 28
; Segment log daily, default is true
DAILY_ROTATE = true
; Expired days of log file(delete after max days), default is 7
; Max line number of single file
MAX_LINES = 1000000
; Expired days of log file (delete after max days)
MAX_DAYS = 7
; For "conn" mode only
[log.conn]
; For "slack" mode only
[log.slack]
; leave empty to inherit
LEVEL =
; Reconnect host for every single message, default is false
RECONNECT_ON_MSG = false
; Try to reconnect when connection is lost, default is false
RECONNECT = false
; Either "tcp", "unix" or "udp", default is "tcp"
PROTOCOL = tcp
; Host address
ADDR =
; For "smtp" mode only
[log.smtp]
LEVEL =
; Name displayed in mail title, default is "Diagnostic message from server"
SUBJECT = Diagnostic message from server
; Mail server
HOST =
; Mailer user name and password
USER =
PASSWD =
; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
RECEIVERS =
; For "database" mode only
[log.database]
LEVEL =
; Either "mysql" or "postgres"
DRIVER =
; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
CONN =
; Webhook URL
URL =
[cron]
; Enable running cron tasks periodically.
@@ -338,6 +345,13 @@ ARGS =
RUN_AT_START = true
SCHEDULE = @every 24h
; Cleanup repository archives
[cron.repo_archive_cleanup]
RUN_AT_START = false
SCHEDULE = @every 24h
; Time duration to check if archive should be cleaned
OLDER_THAN = 24h
[git]
; Disables highlight of added and removed changes
DISABLE_DIFF_HIGHLIGHT = false
@@ -361,15 +375,43 @@ GC = 60
[mirror]
; Default interval in hours between each check
DEFAULT_INTERVAL = 24
DEFAULT_INTERVAL = 8
[api]
; Max number of items will response in a page
MAX_RESPONSE_ITEMS = 50
[ui]
; Number of repositories that are showed in one explore page
EXPLORE_PAGING_NUM = 20
; Number of issues that are showed in one page
ISSUE_PAGING_NUM = 10
; Number of maximum commits showed in one activity feed
FEED_MAX_COMMIT_NUM = 5
; Value of "theme-color" meta tag, used by Android >= 5.0
; An invalid color like "none" or "disable" will have the default style
; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
THEME_COLOR_META_TAG = `#ff5343`
; Max size in bytes of files to be displayed (default is 8MB)
MAX_DISPLAY_FILE_SIZE = 8388608
[ui.admin]
; Number of users that are showed in one page
USER_PAGING_NUM = 50
; Number of repos that are showed in one page
REPO_PAGING_NUM = 50
; Number of notices that are showed in one page
NOTICE_PAGING_NUM = 25
; Number of organization that are showed in one page
ORG_PAGING_NUM = 50
[ui.user]
; Number of repos that are showed in one page
REPO_PAGING_NUM = 15
[i18n]
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ
NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türkçe,čeština
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,gl-ES,uk-UA
NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türkçe,čeština,Српски,Svenska,한국어,Galego,Українська
; Used for datetimepicker
[i18n.datelang]
@@ -391,6 +433,11 @@ it-IT = it
fi-FI = fi
tr-TR = tr
cs-CZ = cs-CZ
sr-SP = sr
sv-SE = sv
ko-KR = ko
gl-ES = gl
uk-UA = uk
; Extension mapping to highlight class
; e.g. .toml=ini
@@ -398,5 +445,7 @@ cs-CZ = cs-CZ
[other]
SHOW_FOOTER_BRANDING = false
; Show version information about gogs and go in the footer
; Show version information about Gogs and Go in the footer
SHOW_FOOTER_VERSION = true
; Show time of template execution in the footer
SHOW_FOOTER_TEMPLATE_LOAD_TIME = true

7
conf/label/Default Normal file
View File

@@ -0,0 +1,7 @@
#ee0701 bug
#cccccc duplicate
#84b6eb enhancement
#128a0c help wanted
#e6e6e6 invalid
#cc317c question
#ffffff wontfix

View File

@@ -7,8 +7,12 @@ Akihiro YAGASAKI <yaggytter AT momiage DOT com>
Aleksejs Grocevs <aleksejs AT grocevs DOT pro>
Aleksey Tarakin <hukendo AT yandex DOT ru>
Alexander Steinhöfer <kontakt AT lx-s DOT de>
Alexandre Espinosa Menor <aemenor DOT gmail DOT com>
Alexandre Magno <alexandre DOT mbm AT gmail DOT com>
Anders B. Hansen <anders AT birkoe DOT com>
András Schenkerik <moviesharkteam AT gmail DOT com>
Andrey Nering <andrey AT nering DOT com DOT br>
Andrey Paskal <apaskal AT gmail DOT com>
Andrey Solomatin <toadron AT yandex DOT ru>
Antoine GIRARD <sapk AT sapk DOT fr>
Arthur Aslanyan <arthur DOT e DOT aslanyan AT gmail DOT com>
@@ -17,12 +21,16 @@ Barış Arda Yılmaz <ardayilmazgamer AT gmail DOT com>
Camille Baronnet <gogs AT camillebaronnet DOT fr>
Christoph Kisfeld <christoph DOT kisfeld AT gmail DOT com>
Cysioland
Damaris Padieu <damizx AT hotmail DOT fr>
Daniel Speichert <daniel AT speichert DOT pl>
David Yzaguirre <dvdyzag AT gmail DOT com>
Denys Khomenko
Dmitriy Nogay <me AT catwhocode DOT ga>
Enrico Testori hypertesto AT gmail DOT com
Ezequiel Gonzalez Rial <gonrial AT gmail DOT com>
Farhan Naysee <wpmagic70 AT gmail DOT com>
Gabriel Dugny <gabriel DOT dugny AT gmail DOT com>
Ganesha <reekoheek AT gmail DOT com>
Gregor Santner <gdev AT live DOT de>
Halil Kaya <halil AT halilkaya DOT net>
Hamid Feizabadi <hamidfzm AT gmail DOT com>
@@ -30,14 +38,17 @@ Huimin Wang <wanghm2009 AT hotmail DOT co DOT jp>
ilko <kontact-mr.k AT outlook DOT com">
Ilya Makarov
Jamie Mansfield <dev AT jamierocks DOT uk>
Javier Ortiz Bultron <javier DOT ortiz DOT 78 AT gmail DOT com>
Jean THOMAS <contact AT tibounise DOT com>
Jonas De Kegel <jonasgithub [AT] gmail [DOT] com>
Joubert RedRat <me+github AT redrat DOT com DOT br>
Juraj Bubniak <contact AT jbub DOT eu>
Lafriks <lafriks AT gmail DOT com>
Lauri Ojansivu <x AT xet7 DOT org>
Luc Stepniewski <luc AT stepniewski DOT fr>
Luca Bozzo <luca AT bozzo DOT it>
Luca Kröger <l DOT kroeger01 AT gmail DOT com>
Luc Stepniewski <luc AT stepniewski DOT fr>
Łukasz Jan Niemier <lukasz AT niemier DOT pl>
Marc Schiller <marc AT schiller DOT im>
Marvin Menzerath <github AT marvin-menzerath DOT de>
Michael Härtl <haertl DOT mike AT gmail DOT com>
@@ -48,15 +59,21 @@ Muhammad Fawwaz Orabi <mfawwaz93 AT gmail DOT com>
Nakao Takamasa <at.mattenn AT gmail DOT com>
Natan Albuquerque <natanalbuquerque5 AT gmail DOT com>
Odilon Junior <odilon DOT junior93 AT gmail DOT com>
Oleksandr Yermakov <olexander DOT yermakov AT gmail DOT com>
Óscar García Amor <ogarcia AT connectical DOT com>
Pablo Saavedra <psaavedra AT igalia DOT com>
Pierre Prinetti >meatqrawldotnet<
Richard Bukovansky <richard DOT bukovansky @ gmail DOT com>
Robert Nuske <robert DOT nuske AT web DOT de>
Robin Hübner <profan AT prfn DOT se>
Rste Risafov <risafov AT lazy DOT com>
SeongJae Park <sj38 DOT park AT gmail DOT com>
Sergey Stepanov <sergystepanov AT gmail DOT com>
Thomas Fanninger <gogs DOT thomas AT fanninger DOT at>
Tilmann Bach <tilmann AT outlook DOT com>
Toni Villena Jiménez <tonivj5 AT gmail DOT com>
Vladimir Jigulin mogaika AT yandex DOT ru
Vladimir Vissoultchev <wqweto AT gmail DOT com>
Vongola <me AT vongola DOT tw>
YJSoft <yjsoft AT yjsoft DOT pe DOT kr>
Łukasz Jan Niemier <lukasz AT niemier DOT pl>
Pablo Saavedra <psaavedra AT igalia DOT com>
Oscar Quisbert <quisbert_karos AT outlook DOT com>

View File

@@ -48,7 +48,7 @@ cancel=Отказ
install=Инсталация
title=Стъпки за инсталиране при първоначално стартиране
docker_helper=Ако Gogs е стартиран в Docker контейнер, моля прочетете <a target="_blank" href="%s">нашите указания</a> внимателно, преди да правите промени по настройките на тази страница!
requite_db_desc=Gogs изисква MySQL, PostgreSQL, SQLite3 или TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Настройки на базата данни
db_type=Тип на база данни
host=Сървър
@@ -58,9 +58,8 @@ db_name=Име на база данни
db_helper=Моля, използвайте INNODB engine с utf8_general_ci кодиране на знаци за MySQL.
ssl_mode=Режим SSL
path=Път
sqlite_helper=Файл на SQLite3 или TiDB база данни.<br>Моля използвайте абсолютен път до файл когато стартирате Gogs като услуга.
err_empty_db_path=Пътят до SQLite3 или TiDB база данни не може да е празен.
err_invalid_tidb_name=TiDB не позволява "." и "-" в името на базата данни.
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Невъзможно изключване на регистрациите без предварително да е създаден поне един административен профил.
err_empty_admin_password=Паролата на администратор не може да е празна.
@@ -75,6 +74,8 @@ domain=Домейн
domain_helper=Тази настройка влияе на URL адреса за клониране чрез SSH.
ssh_port=SSH порт
ssh_port_helper=Номер на порт на SSH сървъра. Оставете празно за да изключите достъп през SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=HTTP порт
http_port_helper=Порт, на който приложението ще слуша.
app_url=URL адрес на приложението
@@ -96,8 +97,8 @@ offline_mode=Включи офлайн режима
offline_mode_popup=Изключи CDN дори в продукционен режим, всички ресурсни файлове ще бъдат доставяни локално.
disable_gravatar=Изключи връзка с Gravatar
disable_gravatar_popup=Изключва Gravatar и външни източници, така че всички аватари трябва да са или качени от потребителите или да се ползват аватари по подразбиране.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Използване на външни аватари
federated_avatar_lookup_popup=Позволява използване на външни аватари от услуги съвместими с libravatar.
disable_registration=Изключи саморегистрацията
disable_registration_popup=Изключи потребителската саморегистрация, само администратор може да създава профили.
enable_captcha=Включи Captcha
@@ -116,6 +117,7 @@ sqlite3_not_available=Вашата версия не поддържа SQLite3,
invalid_db_setting=Настройките на базата данни са некоректни: %v
invalid_repo_path=Основният път към хранилищата е невалиден: %v
run_user_not_match=Потребителският контекст на приложението не е на текущия потребител: %s -> %s
invalid_smtp_from=Невалидно поле От: %v
save_config_failed=Неуспешно запазване на конфигурация: %v
invalid_admin_setting=Настройките на профил на администратора са невалидни: %v
install_success=Добре дошли! Радваме се, че избрахте Gogs, и Ви пожелаваме приятна работа и сърдечни поздрави!
@@ -137,6 +139,7 @@ issues.in_your_repos=Във Вашите хранилища
[explore]
repos=Хранилища
users=Потребители
organizations=Организации
search=Търсене
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Вашият профил е със забрана за вл
resent_limit_prompt=За съжаление Вие съвсем наскоро изпратихте писмо за активация. Моля изчакайте 3 минути, след което опитайте отново.
has_unconfirmed_mail=Здравейте %s, имате непотвърден адрес на ел. поща (<b>%s</b>). Ако не сте получили писмо за потвърждение или имате нужда да се изпрати ново писмо, моля щракнете бутона по-долу.
resend_mail=Щракнете тук, за да се изпрати ново писмо за потвърждение
email_not_associate=Този адрес на ел. поща не е свързан с никой профил.
send_reset_mail=Щракнете тук, за да получите (отново) писмо за нулиране на паролата
reset_password=Нулиране на паролата
invalid_code=За съжаление Вашия код за потвърждение е изтекъл или е невалиден.
@@ -189,6 +191,13 @@ TeamName=Име на екипа
AuthName=Име на удостоверението
AdminEmail=Ел. поща на администратора
NewBranchName=Име на нов клон
CommitSummary=Резюме на ревизия
CommitMessage=Текст на ревизия
CommitChoice=Избор на ревизия
TreeName=Път до файл
Content=Съдържание
require_error=` не може да бъде празен.`
alpha_dash_error=` трябва да e валидна буква, число или тире(-_).`
alpha_dash_dot_error=` трябва да e валидна буква, число, тире(-_) или точка.`
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Потребителското име '%s' не е
[settings]
profile=Профил
password=Парола
avatar=Avatar
avatar=Аватар
ssh_keys=SSH ключове
social=Социални профили
applications=Приложения
@@ -262,8 +271,8 @@ change_username_prompt=Този промяна ще засегне всички
continue=Продължи
cancel=Отказ
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Търсене на аватари по адрес на ел. поща
federated_avatar_lookup=Външно търсене на аватари
enable_custom_avatar=Разреши потребителски аватар
choose_new_avatar=Избор на нов аватар
update_avatar=Запази настройките на аватара
@@ -330,6 +339,10 @@ access_token_deletion=Изтрий индивидуален API ключ за д
access_token_deletion_desc=При изтриване на този индивидуален API ключ за достъп ще се премахнат всички свързани права на приложението. Желаете ли да продължите?
delete_token_success=Индивидуалният API ключ за достъп е изтрит успешно! Не забравяйте да преконфигурирате приложението също.
orgs.none=Не сте член на никоя организация.
orgs.leave_title=Напусни организация
orgs.leave_desc=Ще загубите достъп до всички хранилища и екипи, след като напуснете организацията. Желаете ли да продължите?
delete_account=Изтриване на собствения профил
delete_prompt=Тази операция ще изтрие Вашия профил завинаги и тя <strong>НЕ МОЖЕ</strong> да бъде отменена в последствие!
confirm_delete_account=Потвърди изтриването
@@ -350,7 +363,7 @@ fork_from=Разклонение от
fork_visiblity_helper=Не може да променяте видимостта на разклонено хранилище.
repo_desc=Описание
repo_lang=Програмен език
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Избор на .gitignore шаблони
license=Лиценз
license_helper=Изберете лицензионен файл
readme=Readme
@@ -363,6 +376,7 @@ mirror_prune_desc=Премахва всички препратки за отда
mirror_interval=Интервал на отразяване (часове)
mirror_address=Адрес на огледало
mirror_address_desc=Моля включете потребител и парола в адреса ако са нужни.
mirror_last_synced=Последна синхр.
watchers=Наблюдаващи
stargazers=Харесващи
forks=Разклонения
@@ -376,14 +390,14 @@ migrate_type=Тип мигриране
migrate_type_helper=Това хранилище ще бъде <span class="text blue">огледало</span>
migrate_repo=Мигрирай хранилище
migrate.clone_address=Адрес за клониране
migrate.clone_address_desc=Това може да е HTTP/HTTPS/GIT адрес или локален път на сървъра.
migrate.clone_address_desc=Може да използвате HTTP/HTTPS/GIT адрес.
migrate.clone_address_desc_import_local=Можете да мигрирате хранилище от локален път на сървъра.
migrate.permission_denied=Недостатъчни права за импорт на локални хранилища.
migrate.invalid_local_path=Невалиден път - не съществува или не е директория.
migrate.failed=Грешка при миграция: %v
mirror_from=огледало от
forked_from=разклонено от
fork_from_self=Не можете да разклоните хранилище което си е Ваше!
copy_link=Копирай
copy_link_success=Копирано!
copy_link_error=Натиснете ⌘-C или Ctrl-C за да копирате
@@ -401,7 +415,7 @@ create_new_repo_command=Създай ново хранилище чрез ком
push_exist_repo=Предай съществуващо хранилище през командния ред
repo_is_empty=Това хранилище е празно. Моля проверете по-късно пак!
code=Код
files=Файлове
branch=Клон
tree=ИН на ревизия
filter_branch_and_tag=Филтър по маркер или клон
@@ -418,7 +432,48 @@ file_history=История
file_view_raw=Виж директен файл
file_permalink=Постоянна връзка
file_too_large=Този файл е твърде голям за да се визуализира
video_not_supported_in_browser=Вашият браузър не поддържа HTML5 видео тагове.
editor.new_file=Нов файл
editor.upload_file=Качи файл
editor.edit_file=Редактирай файл
editor.preview_changes=Преглед на промени
editor.cannot_edit_non_text_files=Невъзможна редакция на нетекстови файлове
editor.edit_this_file=Редактирай този файл
editor.must_be_on_a_branch=Трябва да сте избрали клон за да предложите промени в този файл
editor.fork_before_edit=Първо трябва да разклоните хранилището преди да редактирате файл
editor.delete_this_file=Изтрий този файл
editor.must_have_write_access=Трябва да имате права за писане за да предложите промени в този файл
editor.file_delete_success=Файл '%s' е изтрит успешно!
editor.name_your_file=Име на файл...
editor.filename_help=За да добавите директория, въведете името ѝ и натиснете /. За да я премахнете, позиционирайте се в началото на полето и натиснете BackSpace.
editor.or=или
editor.cancel_lower=отказ
editor.commit_changes=Промени в ревизия
editor.add_tmpl=Добави '%s/<filename>'
editor.add=Добави '%s'
editor.update=Модифицирай '%s'
editor.delete=Изтрий '%s'
editor.commit_message_desc=Добавяне на опционално разширено описание...
editor.commit_directly_to_this_branch=Запази ревизия директно в клон <strong class="branch-name">%s</strong>.
editor.create_new_branch=Създай <strong>нов клон</strong> от тази ревизия и изпрати заявки за сливане.
editor.new_branch_name_desc=Име на нов клон...
editor.cancel=Отказ
editor.filename_cannot_be_empty=Името не може да бъде празно.
editor.branch_already_exists=Клон '%s' вече съществува в това хранилище.
editor.directory_is_a_file=Частта '%s' в пътя е файл, не директория в това хранилище.
editor.file_is_a_symlink=Файл "%s" е символна връзка, която не може да се модифицира от редактора.
editor.filename_is_a_directory=Име '%s' вече съществува като директория в това хранилище.
editor.file_editing_no_longer_exists=Файл '%s' който редактирате вече не съществува в това хранилище.
editor.file_changed_while_editing=Съдържанието на файла е било променено докато правихте редакциите. <a target="_blank" href="%s">Щракнете тук</a> за да прегледате какво е променено или <strong>натиснете Запис на ревизия</strong> отново за да презапишете чуждите промени.
editor.file_already_exists=Файл с име '%s' вече съществува в това хранилище.
editor.no_changes_to_show=Няма промени.
editor.fail_to_update_file=Невъзможно модифициране/създаване на файл '%s' заради грешка: %v
editor.add_subdir=Добави поддиректория...
editor.unable_to_upload_files=Невъзможно качване на файлове в '%s' заради грешка: %v
editor.upload_files_to_dir=Качи файлове в '%s'
commits.commit_history=Commit History
commits.commits=Ревизии
commits.search=Търсене в ревизии
commits.find=Намери
@@ -444,6 +499,11 @@ issues.create=Създай задача
issues.new_label=Нов етикет
issues.new_label_placeholder=Име на етикета...
issues.create_label=Създай етикет
issues.label_templates.title=Зареждане на предварително зададен набор от етикети
issues.label_templates.info=Липсват етикети все още. Можете да щракнете върху "Нов етикет" по-горе, за да създадете нов или да изберете предварително зададени набори от по-долу.
issues.label_templates.helper=Изберете набор етикети
issues.label_templates.use=Използвай този набор етикети
issues.label_templates.fail_to_load_file=Неуспешно зареждане на шаблон с етикети '%s': %v
issues.open_tab=%d отворени
issues.close_tab=%d затворени
issues.filter_label=Етикет
@@ -485,8 +545,7 @@ issues.commit_ref_at=`посочи тази задача от ревизия <a
issues.poster=Участник
issues.collaborator=Сътрудник
issues.owner=Притежател
issues.sign_up_for_free=Регистрирай се безплатно
issues.sign_in_require_desc=за да се включите в този разговор. Вече имате профил? <a href="%s">Влезте, за да коментирате</a>
issues.sign_in_require_desc=<a href="%s">Впишете се</a> за да се присъедините към разговора.
issues.edit=Редакция
issues.cancel=Отказ
issues.save=Запис
@@ -501,6 +560,8 @@ issues.label_deletion=Изтрий етикет
issues.label_deletion_desc=При изтриване на този етикет ще се премахне информацията за него във всички свързани задачи. Желаете ли да продължите?
issues.label_deletion_success=Етикетът е изтрит успешно!
issues.num_participants=%d участника
issues.attachment.open_tab=`Щракнете за да прегледате "%s" в нов раздел`
issues.attachment.download=`Щракнете за да изтеглите "%s"`
pulls.new=Нова заявка за сливане
pulls.compare_changes=Сравни промените
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Не може да се извърши обедин
pulls.cannot_auto_merge_helper=Моля, използвайте инструменти на командния ред за да разрешите конфликтите.
pulls.merge_pull_request=Обедини заявка за сливане
pulls.open_unmerged_pull_exists=`Невъзможно повторно отваряне, защото вече съществува заявка за сливане (#%d) от същото хранилище със същата информация за обединяване, която чака да бъде извършена`
pulls.delete_branch=Изтрий клон
pulls.delete_branch_has_new_commits=Клонът не може да бъде изтрит, защото има ревизии след последното обединяване.
milestones.new=Нов етап
milestones.open_tab=%d отворени
@@ -577,21 +640,47 @@ settings.collaboration.admin=За администрация
settings.collaboration.write=За писане
settings.collaboration.read=За четене
settings.collaboration.undefined=Недефинирано
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Уеб-куки
settings.githooks=Git куки
settings.basic_settings=Основни настройки
settings.mirror_settings=Настройки на огледало
settings.sync_mirror=Синхр. сега
settings.mirror_sync_in_progress=Синхронизация на огледалото е в ход, моля обновете страницата след минута.
settings.site=Официален сайт
settings.update_settings=Запази настройките
settings.change_reponame_prompt=Тази промяна ще засегне връзките, които се отнасят до това хранилището.
settings.advanced_settings=Разширени настройки
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Включи система за уики
settings.use_internal_wiki=Използвай вградено уики
settings.use_external_wiki=Използвай външно уики
settings.external_wiki_url=URL адрес на външно уики
settings.external_wiki_url_desc=Посетителите ще бъдат пренасочени към този URL адрес от връзката за раздел уики.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Включи система за проследяване на задачи
settings.use_internal_issue_tracker=Изполвай вградена система за проследяване на задачи
settings.use_external_issue_tracker=Използвай външна система за проследяване на задачи
settings.external_tracker_url=URL адрес на външна система за проследяване на задачи
settings.external_tracker_url_desc=Посетителите ще бъдат пренасочени към този URL адрес от връзката на раздела.
settings.tracker_url_format=Формат на URL адрес на външна система за проследяване на задачи
settings.tracker_issue_style=Стил на именуване на външна система за проследяване на задачи:
settings.tracker_issue_style.numeric=Цифров
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Символен
settings.tracker_url_format_desc=Можете да използвате текстови маркери <code>{user} {repo} {index}</code> за потребителско име, име на хранилище и индекс на задача съответно.
settings.pulls_desc=Включва заявки за сливане за да може да се приемат външни доработки
settings.danger_zone=Опасна зона
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Новият притежател вече има хранилище със същото име. Изберете друго име.
settings.convert=Промени към редовно хранилище
settings.convert_desc=Можете да промените това огледало към редовно хранилище. Конверсията не може да се отмени.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Този потребител няма да
settings.remove_collaborator_success=Сътрудникът е премахнат.
settings.search_user_placeholder=Име на потребител...
settings.org_not_allowed_to_be_collaborator=Невъзможно добавяне на организация като сътрудник.
settings.user_is_org_member=Потребителят вече участва в организацията и не може да бъде добавен като сътрудник.
settings.add_webhook=Добави уеб-кука
settings.hooks_desc=Уеб-куките много приличат на обикновен HTTP POST тригер. Когато нещо се случи в Gogs, ние ще изпратим уведомление до сървъра, който посочите. Научете повече в <a target="_blank" href="%s">Ръководство за уеб-куки</a>.
settings.webhook_deletion=Изтрий уеб-кука
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Gogs ще изпрати <code>POST</code> заявк
settings.payload_url=URL адрес на изпращане
settings.content_type=Тип на съдържанието
settings.secret=Тайна
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Потребителско име
settings.slack_icon_url=URL адрес на икона
settings.slack_color=Цвят
@@ -665,6 +755,8 @@ settings.event_send_everything=При <strong>всички</strong> събити
settings.event_choose=Нека избера от какво имам нужда.
settings.event_create=Създаване
settings.event_create_desc=Създаване на клон или маркер
settings.event_pull_request=Заявка за сливане
settings.event_pull_request_desc=Заявка за сливане е отворена, затворена, отворена повторно, редактирана, възложена, отменена, при модифициран етикет, при премахнат етикет или е синхронизирана.
settings.event_push=Предаване
settings.event_push_desc=Git предаване към хранилището
settings.active=Активна
@@ -676,10 +768,12 @@ settings.delete_webhook=Изтрий уеб-куката
settings.recent_deliveries=Последни изпращания
settings.hook_type=Тип на куката
settings.add_slack_hook_desc=Добавяне на интеграция със <a href="%s">Slack</a> във Вашето хранилище.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=API ключ
settings.slack_domain=Домейн
settings.slack_channel=Канал
settings.deploy_keys=Ключове за внедряване
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Добави ключ за внедряване
settings.deploy_key_desc=Този ключ за внедряване има права само за четене. Това не е същото като SSH ключове на персонален потребител.
settings.no_deploy_keys=Все още няма настроен никакъв ключ за внедряване.
@@ -758,6 +852,7 @@ team_permission_desc=Какво ниво на достъп трябва да и
form.name_reserved=Името на организацията '%s' е запазено.
form.name_pattern_not_allowed=Име на организацията от вида '%s' не е разрешено.
form.team_name_reserved=Team name '%s' is reserved.
settings=Настройки
settings.options=Опции
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Почисти изтрити данни в хранил
dashboard.git_gc_repos_success=Всички хранилища са почистени от изтрити данни успешно.
dashboard.resync_all_sshkeys=Презапис на ".ssh/authorized_keys" файл (внимание: не-Gogs ключове ще бъдат загубени)
dashboard.resync_all_sshkeys_success=Всички публични ключове са презаписани успешно.
dashboard.resync_all_update_hooks=Презапис на всички куки, закачени на актуализация на хранилищата (необходимо, когато се ползва собствен път за конфигурацията)
dashboard.resync_all_update_hooks_success=Всички куки, закачени на актуализация на хранилищата, са презаписани успешно.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Реинициализира всички записи за хранилища
dashboard.reinit_missing_repos_success=Всички записи за хранилища със загубени Git файлове са реинициализирани успешно.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Изтрий удостоверяването
auths.delete_auth_desc=Това удостоверяване ще бъде изтрито. Желаете ли да продължите?
auths.still_in_used=Това удостоверяване все още се използва от някои потребители. Моля изтрийте ги или ги конвертирайте до друг тип на влизане първо.
auths.deletion_success=Удостоверяването е изтрито успешно!
auths.login_source_exist=Източник за валидация на потребители "%s" вече съществува.
config.server_config=Сървърни настройки
config.app_name=Име на приложението
@@ -981,10 +1077,9 @@ config.offline_mode=Офлайн режим
config.disable_router_log=Изключи журнал на маршрутизатора
config.run_user=Потребителски контекст
config.run_mode=Режим на изпълнение
config.repo_root_path=Основен път към хранилища
config.git_version=Git версия
config.static_file_root_path=Път към статични файлове
config.log_file_root_path=Път към журнал
config.script_type=Тип на скрипта
config.reverse_auth_user=Потребителско име при обратно удостоверяване
config.ssh_config=SSH конфигурация
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Път до генератор ('ssh-keygen')
config.ssh_minimum_key_size_check=Проверка за минимален размер на ключове
config.ssh_minimum_key_sizes=Минимален размер на ключове
config.repo_config=Repository Configuration
config.repo_root_path=Основен път към хранилища
config.script_type=Тип на скрипта
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Настройки на базата данни
config.db_type=Тип
config.db_host=Сървър
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Период на валидност на бисквит
config.picture_config=Конфигурация на изображения
config.picture_service=Услуги за снимки
config.disable_gravatar=Изключи Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Включи външни аватари
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Конфигурация на git
config.git_disable_diff_highlight=Забрани оцветяване на синтаксис при преглед на разлики
config.git_max_diff_lines=Максимален брой различни редове (за файл)
config.git_max_diff_line_characters=Максимален брой различни символи (на ред)
config.git_max_diff_files=Максимален брой променени файлове (при показване)
config.git_gc_args=Аргументи на GC
config.git_migrate_timeout=Време за отказ при миграция
config.git_mirror_timeout=Време за отказ при синхр. на огледало
config.git_clone_timeout=Време за отказ при клониране
config.git_pull_timeout=Време за отказ при сливане
config.git_gc_timeout=Време за отказ при GC
config.log_config=Конфигурация на журнал
config.log_mode=Режим на журнал

View File

@@ -13,7 +13,7 @@ version=Verze
page=Strana
template=Šablona
language=Jazyk
create_new=Vytořit...
create_new=Vytvořit...
user_profile_and_more=Uživatelský profil a další
signed_in_as=Přihlášen jako
@@ -48,7 +48,7 @@ cancel=Zrušit
install=Instalace
title=Kroky instalace pro první běh
docker_helper=Spouštíte-li Gogs uvnitř Dockeru, přečtěte si prosím pečlivě <a target="_blank" href="%s">návod</a>, než něco změníte na této stránce!
requite_db_desc=Gogs vyžaduje MySQL, PostgreSQL, SQLite3 nebo TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Nastavení databáze
db_type=Typ databáze
host=Hostitel
@@ -58,9 +58,8 @@ db_name=Název databáze
db_helper=Prosíme, pro MySQL použijte INNODB engine se znakovou sadou utf8_general_ci.
ssl_mode=SSL Mód
path=Cesta
sqlite_helper=Cesta k souboru s SQLite3 nebo TiDB databází.<br>Prosíme, použijte absolutní cestu, když startujete službu.
err_empty_db_path=Cesty k databázovým souborům SQLite3 nebo TiDB nemohou být prázdné.
err_invalid_tidb_name=Název databáze TiDB nemůže obsahovat znaky "." a "-".
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Nemůžete vypnout registraci účtů bez vytvoření účtu správce.
err_empty_admin_password=Heslo správce nemůže být prázdné.
@@ -75,6 +74,8 @@ domain=Doména
domain_helper=Toto ovlivňuje URL klonů skrze SSH.
ssh_port=Port SSH
ssh_port_helper=Číslo portu, které používá váš SSH server. Nechte jej prázdné pro vypnutí používání SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=Port HTTP
http_port_helper=Číslo portu, na kterém aplikace naslouchá.
app_url=URL aplikace
@@ -96,8 +97,8 @@ offline_mode=Zapnout režim offline
offline_mode_popup=Vypnout síť doručování obsahu (CDN) i v produkčním režimu, vše bude obslouženo místně.
disable_gravatar=Vypnout službu Gravatar
disable_gravatar_popup=Vypnout službu Gravatar a ostatní zdroje. Všechny ikony uživatelů budou nahrány uživateli nebo výchozí.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Povolit vyhledání avatarů z veřejných zdrojů
federated_avatar_lookup_popup=Povolte vyhledání avatarů z veřejných zdrojů pro využití služeb založených na libravatar.
disable_registration=Vypnout možnost se zaregistrovat
disable_registration_popup=Vypnout možnost registrace, pouze správce může vytvořit účty.
enable_captcha=Povolit službu CAPTCHA
@@ -116,6 +117,7 @@ sqlite3_not_available=Vaše verze vydání Gogs nepodporuje SQLite3, prosíme st
invalid_db_setting=Nastavení databáze není správné: %v
invalid_repo_path=Kořenový adresář repositáře není správný: %v
run_user_not_match=Uživatel pro spuštění není aktuální uživatel: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=Uložení konfigurace se nezdařilo: %v
invalid_admin_setting=Nastavení účtu správce není správné: %v
install_success=Vítejte! Jsme rádi, že jste si vybrali Gogs. Bavte se a opatrujte se.
@@ -126,7 +128,7 @@ uname_holder=Uživatelské jméno nebo e-mailová adresa
password_holder=Heslo
switch_dashboard_context=Přepnout kontext přehledu
my_repos=Mé repositáře
show_more_repos=Show more repositories...
show_more_repos=Zobrazit více repositářů...
collaborative_repos=Společné repositáře
my_orgs=Mé organizace
my_mirrors=Má zrcadla
@@ -137,6 +139,7 @@ issues.in_your_repos=Ve vašich repositářích
[explore]
repos=Repositáře
users=Uživatelé
organizations=Organizace
search=Vyhledat
[auth]
@@ -151,18 +154,17 @@ forget_password=Zapomněli jste heslo?
sign_up_now=Potřebujete účet? Zaregistrujte se.
confirmation_mail_sent_prompt=Nový potvrzovací e-mail byl zaslán na <b>%s</b>, prosíme, zkontrolujte si vaši doručenou poštu během následující %d hodin pro dokončení registračního procesu.
active_your_account=Aktivujte si váš účet
prohibit_login=Login Prohibited
prohibit_login_desc=Your account is prohibited to login, please contact site admin.
prohibit_login=Přihlášení zakázáno
prohibit_login_desc=Vašemu účtu je zakázáno se přihlásit, kontaktujte prosím správce webu.
resent_limit_prompt=Omlouváme se, ale před chvílí jste požádal o aktivační e-mail. Prosíme, počkejte 3 minuty a pak to zkuste znovu.
has_unconfirmed_mail=Zdravím, %s, máte nepotvrzenou e-mailovou adresu (<b>%s</b>). Pokud jste nedostali e-mail pro potvrzení nebo potřebujete zaslat nový, klikněte prosím na tlačítku níže.
resend_mail=Klikněte zde pro odeslání aktivačního e-mailu
email_not_associate=Tato e-mailová adresa není spojena s žádným účtem.
send_reset_mail=Klikněte zde pro znovuposlání e-mailu pro změnu vašeho hesla
reset_password=Obnova vašeho hesla
invalid_code=Omlouváme se, ale kód potvrzení vašeho účtu vypršel nebo není správný.
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
password_too_short=Délka hesla musí být minimálně 6 znaků.
non_local_account=Non-local accounts cannot change passwords through Gogs.
non_local_account=Externí účty nemohou měnit hesla přes Gogs.
[mail]
activate_account=Prosíme, aktivujte si váš účet
@@ -189,6 +191,13 @@ TeamName=Název týmu
AuthName=Název ověření
AdminEmail=E-mailová adresa správce
NewBranchName=Název nové větve
CommitSummary=Shrnutí revize
CommitMessage=Zpráva revize
CommitChoice=Výběr revize
TreeName=Cesta k souboru
Content=Obsah
require_error=` nemůže být prázdný.`
alpha_dash_error=` musí být pouze písmena, číslice či znaky - a _ .`
alpha_dash_dot_error=` musí být pouze písmena, číslice, tečka či znaky - a _ .`
@@ -225,7 +234,7 @@ org_still_own_repo=Tato organizace stále vlastní repositáře, musíte je nejd
target_branch_not_exist=Cílová větev neexistuje.
[user]
change_avatar=Change your avatar
change_avatar=Změnit vaši uživatelskou ikonu
join_on=Připojil se dne
repositories=Repositáře
activity=Veřejná aktivita
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Vzor uživatelského jména '%s' není povolen.
[settings]
profile=Profil
password=Heslo
avatar=Avatar
avatar=Uživatelská ikona
ssh_keys=Klíče SSH
social=Sociální účty
applications=Aplikace
@@ -262,8 +271,8 @@ change_username_prompt=Tato změna ovlivní vztah odkazů k vašemu účtu.
continue=Pokračovat
cancel=Zrušit
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Vyhledávat uživatelskou ikonu podle emailu
federated_avatar_lookup=Vyhledání Avatarů ve veřejných zdrojích
enable_custom_avatar=Povolit uživatelskou ikonu uživatele
choose_new_avatar=Vybrat novou ikonu uživatele
update_avatar=Aktualizovat nastavení ikony uživatele
@@ -330,6 +339,10 @@ access_token_deletion=Smazání osobní přístupové poukázky
access_token_deletion_desc=Smazáním této osobní přístupové poukázky odstraní všechen návazný přístup aplikace. Chcete pokračovat?
delete_token_success=Osobní přístupová poukázka byla úspěšně odstraněna! Nezapomeňte také aktualizovat vaši aplikaci.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account=Smazat váš účet
delete_prompt=Tato operace permanentně smaže váš účet a tato změna <strong>nemůže</strong> být vrácena!
confirm_delete_account=Potvrdit smazání
@@ -350,7 +363,7 @@ fork_from=Rozštěpit z
fork_visiblity_helper=Nemůžete změnit viditelnost repositáře rozštěpení.
repo_desc=Popis
repo_lang=Jazyk
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Vyberte šablony .gitignore
license=Licence
license_helper=Vyberte licenční soubor
readme=Soubor README
@@ -358,11 +371,12 @@ readme_helper=Vyberte šablonu souboru README
auto_init=Inicializovat tento repositář s vybranými soubory a šablonou
create_repo=Vytvořit repositář
default_branch=Výchozí větev
mirror_prune=Prune
mirror_prune_desc=Remove any remote-tracking references that no longer exist on the remote
mirror_prune=Vyčistit
mirror_prune_desc=Odstranit vzdálené odkazy, které již ve vzdáleném repozitáři neexistují
mirror_interval=Odstup zrcadlení (hodina)
mirror_address=Adresa zrcadla
mirror_address_desc=Prosím, přidejte do adresy potřebné přihlašovací údaje.
mirror_last_synced=Naposledy synchronizováno
watchers=Sledující
stargazers=Sledující
forks=Rozštěpení
@@ -376,14 +390,14 @@ migrate_type=Typ migrace
migrate_type_helper=Tento repositář bude <span class="text blue">zrcadlem</span>
migrate_repo=Přenést repositář
migrate.clone_address=Naklonovat adresu
migrate.clone_address_desc=Tím může být HTTP/HTTPS/GIT URL nebo cesta k lokálnímu serveru.
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=Není dovoleno importovat místní repositáře.
migrate.invalid_local_path=Neplatná místní cesta, buď neexistuje nebo není adresářem.
migrate.failed=Přenesení selhalo: %v
mirror_from=zrcadlo
forked_from=rozštěpen z
fork_from_self=Nemůžete rozštěpit repositář, který již vlastníte!
copy_link=Kopie
copy_link_success=Zkopírováno!
copy_link_error=Pro zkopírování stiskněte ⌘-C nebo Ctrl-C
@@ -401,7 +415,7 @@ create_new_repo_command=Vytvořit nový repositář v příkazové řádce
push_exist_repo=Nahrát existující repositář z příkazové řádky
repo_is_empty=Tento repositář je prázdný, prosíme, vraťte se brzo zpátky!
code=Zdrojový kód
files=Files
branch=Větev
tree=Strom
filter_branch_and_tag=Filtr pro větev nebo značku
@@ -417,8 +431,49 @@ file_raw=Surový
file_history=Historie
file_view_raw=Zobrazit v surovém stavu
file_permalink=Trvalý odkaz
file_too_large=This file is too large to be shown
file_too_large=Tento soubor je příliš velký pro zobrazení
video_not_supported_in_browser=Váš prohlížeč nepodporuje tag pro HTML5 video.
editor.new_file=Nový soubor
editor.upload_file=Nahrát soubor
editor.edit_file=Upravit soubor
editor.preview_changes=Náhled změn
editor.cannot_edit_non_text_files=Netextové soubory není možné upravovat
editor.edit_this_file=Upravit tento soubor
editor.must_be_on_a_branch=Musíte mít zvolenu větev pro úpravu či návrh změn tohoto souboru
editor.fork_before_edit=Musíte provést rozvětvení repositáře před úpravou souboru
editor.delete_this_file=Odstranit tento soubor
editor.must_have_write_access=Musíte mít přístup pro zápis pro dělání či navrhování změn tohoto souboru
editor.file_delete_success=Soubor '%s' byl úspěšně odstraněn!
editor.name_your_file=Pojmenujte váš soubor...
editor.filename_help=Pro vložení adresáře prostě napište jméno a přidejte /. K odstranění adresáře běžte na začátek pole a stiskněte backspace.
editor.or=nebo
editor.cancel_lower=zrušit
editor.commit_changes=Uložit změny revize
editor.add_tmpl=Přidat '%s/<nazev_souboru>'
editor.add=Přidat '%s'
editor.update=Aktualizovat "%s"
editor.delete=Smazat '%s'
editor.commit_message_desc=Přidat dobrovolný rozšířený popis...
editor.commit_directly_to_this_branch=Uložte změny revize přímo do větve <strong class="branch-name">%s</strong>.
editor.create_new_branch=Vytvořit <strong>novou větev</strong> pro tuto revizi a spustit požadavek na stažení.
editor.new_branch_name_desc=Nový název větve...
editor.cancel=Zrušit
editor.filename_cannot_be_empty=Název souboru nemůže být prázdný.
editor.branch_already_exists=Repositář větev '%s' již obsahuje.
editor.directory_is_a_file=Položka '%s' v nadřazené cestě je v tomto repozitáři soubor, ne adresář.
editor.file_is_a_symlink=Soubor '%s' je symbolický odkaz a nemůže být změněn pomocí webového editoru.
editor.filename_is_a_directory=Jméno souboru '%s' koliduje v tomto repozitáři se jménem adresáře.
editor.file_editing_no_longer_exists=Soubor '%s', který upravujete, již neexistuje v tomto repozitáři.
editor.file_changed_while_editing=Obsah souboru se změnil od začátku úprav. <a target="_blank" href="%s"> Klepnutím sem</a> zobrazíte, co se změnilo, nebo <strong>stiskněte potvrdit znovu</strong> pro přepsání změn.
editor.file_already_exists=Soubor '%s' již existuje v tomto repozitáři.
editor.no_changes_to_show=Žádné změny k zobrazení.
editor.fail_to_update_file=Vytvoření nebo změna souboru '%s' skončilo chybou: %v
editor.add_subdir=Přidat podadresář...
editor.unable_to_upload_files=Nepodařilo se nahrát soubor '%s'. Chyba: %v
editor.upload_files_to_dir=Nahrát soubory do '%s'
commits.commit_history=Commit History
commits.commits=Revize
commits.search=Hledání revizí
commits.find=Hledat
@@ -444,6 +499,11 @@ issues.create=Vytvořit úkol
issues.new_label=Nový štítek
issues.new_label_placeholder=Název štítku...
issues.create_label=Vytvořit štítek
issues.label_templates.title=Nahrát předdefinovanou sadu značek
issues.label_templates.info=Nejsou zadány žádné značky. Pro vytvoření nové klikněte na tlačítko Nová značka nebo použijte předdefinovanou sadu.
issues.label_templates.helper=Vyberte sadu značek
issues.label_templates.use=Použít tuto sadu značek
issues.label_templates.fail_to_load_file=Nepodařilo se nahrát soubor šablony značek '%s': %v
issues.open_tab=%d otevřených
issues.close_tab=%d zavřených
issues.filter_label=Štítek
@@ -471,8 +531,8 @@ issues.next=Další
issues.open_title=otevřený
issues.closed_title=zavřený
issues.num_comments=%d komentářů
issues.commented_at=`commented <a href="#%s">%s</a>`
issues.delete_comment_confirm=Are you sure you want to delete this comment?
issues.commented_at=`okomentoval <a href="#%s">%s</a>`
issues.delete_comment_confirm=Jste si jist, že chcete smazat tento komentář?
issues.no_content=Není zde žádný obsah.
issues.close_issue=Zavřít
issues.close_comment_issue=Okomentovat a zavřít
@@ -485,8 +545,7 @@ issues.commit_ref_at=`odkázal na tento úkol z revize <a id="%[1]s" href="#%[1]
issues.poster=Autor
issues.collaborator=Spolupracovník
issues.owner=Vlastník
issues.sign_up_for_free=Zaregistrujte se zdarma
issues.sign_in_require_desc=pro zapojení do konverzace. Již máte účet? <a href="%s">Přihlaste se</a>
issues.sign_in_require_desc=<a href="%s">Přihlašte se</a> pro zapojení do konverzace.
issues.edit=Upravit
issues.cancel=Zrušit
issues.save=Uložit
@@ -501,6 +560,8 @@ issues.label_deletion=Smazání štítku
issues.label_deletion_desc=Smazání tohoto štítku jej smaže také ze všech návazných úkolech. Chcete pokračovat?
issues.label_deletion_success=Štítek byl úspěšně smazán!
issues.num_participants=%d účastníků
issues.attachment.open_tab=`Klikněte pro zobrazení "%s" v nové záložce`
issues.attachment.download=`Klikněte pro stažení "%s"`
pulls.new=Nový požadavek na natažení
pulls.compare_changes=Porovnat změny
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Tento požadavek na natažení nemůže být automa
pulls.cannot_auto_merge_helper=Prosíme proveďte sloučení ručně, aby byly vyřešeny konflitky.
pulls.merge_pull_request=Sloučit požadavek na stažení
pulls.open_unmerged_pull_exists=`Nemůžete znovuotevřít požadavek na stažení, neboť požadavek na stažení ze stejného repositáře se stejnými informacemi pro sloučení již existuje (#%d).`
pulls.delete_branch=Smazat větev
pulls.delete_branch_has_new_commits=Větev nemůže být smazána, neboť po sloučení jsou v ní nové revize.
milestones.new=Nový milník
milestones.open_tab=%d otevřených
@@ -573,32 +636,59 @@ wiki.last_updated=Naposledy aktualizováno: %s
settings=Nastavení
settings.options=Možnosti
settings.collaboration=Spolupráce
settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.collaboration.admin=Správce
settings.collaboration.write=Zápis
settings.collaboration.read=Čtení
settings.collaboration.undefined=Neurčeno
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webové háčky
settings.githooks=Háčky Gitu
settings.basic_settings=Základní nastavení
settings.mirror_settings=Nastavení zrcadla
settings.sync_mirror=Provést synchronizaci
settings.mirror_sync_in_progress=Synchronizace zrcadel probíhá, prosím načtěte znovu stránku přibližně za minutu.
settings.site=Oficiální stránky
settings.update_settings=Změnit nastavení
settings.change_reponame_prompt=Tato změna ovlivní vztah odkazů k repositáři.
settings.advanced_settings=Pokročilá nastavení
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Povolit systém Wiki
settings.use_internal_wiki=Použít vestavěný systém Wiki
settings.use_external_wiki=Používat externí Wiki
settings.external_wiki_url=URL externí Wiki
settings.external_wiki_url_desc=Návštěvníci budou při kliknutí na záložku přesměrování na tuto URL.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Povolit systém úkolů
settings.use_internal_issue_tracker=Povolit věstavěný odlehčený systém úkolů
settings.use_external_issue_tracker=Použít externí systém úkolů
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=Formát URL externího systému úkolů
settings.tracker_issue_style=External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric=Numeric
settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_issue_style=Styl pojmenování externího systému úkolů:
settings.tracker_issue_style.numeric=Číselný
settings.tracker_issue_style.alphanumeric=Alfanumeric
settings.tracker_url_format_desc=Můžete použít zástupné výrazy <code>{user} {repo} {index}</code> pro uživatelské jméno, název repositáře a index úkolu.
settings.pulls_desc=Povolit požadavky na stažení, aby veřejné příspěvky mohly být akceptovány
settings.danger_zone=Nebezpečná zóna
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Nový vlastník již repositář se stejným názvem má. Vyberte, prosíme, jiné jméno.
settings.convert=Převést na běžný repositář
settings.convert_desc=Můžete převést toto zrcadlo na běžný repositář. Tato změna nemůže být vrácena.
@@ -618,7 +708,7 @@ settings.delete=Smazat tento repositář
settings.delete_desc=Jakmile smažete repositář, není možné se vrátit. Buďte si, prosím, jist.
settings.delete_notices_1=- Tuto operaci <strong>nelze</strong> zvrátit.
settings.delete_notices_2=Tato operace permanentně smaže vše v tomto repositáři, včetně dat Gitu, úkolů, komentářů a přístupu spolupracovníků.
settings.delete_notices_fork_1=- All forks will become independent after deletion.
settings.delete_notices_fork_1=- Po smazání se všechny forky se stanou nezávislé.
settings.deletion_success=Repositář byl úspěšně smazán!
settings.update_settings_success=Možnosti repositáře byly úspěšně změněny.
settings.transfer_owner=Nový vlastník
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Tento uživatel po tom, co bude smazán, ji
settings.remove_collaborator_success=Spolupracovník byl smazán.
settings.search_user_placeholder=Hledat uživatele...
settings.org_not_allowed_to_be_collaborator=Není dovoleno přidat organizaci jako spolupracovníka.
settings.user_is_org_member=Uživatel je již členem organizace, tudíž nemůže být přidán jako spolupracovník.
settings.add_webhook=Přidat webový háček
settings.hooks_desc=Webové háčky jsou podobné základním spouštím HTTP POST událostí. Kdykoliv se něco stane v Gogs, bude postaráno o oznámení specifikovanému cílovému serveru. Více se o daném dozvíte v <a target="_blank" href="%s">příručce webových háčků</a>.
settings.webhook_deletion=Smazat webový háček
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Gogs zašle požadavek typu <code>POST</code> na zadan
settings.payload_url=URL obsahu
settings.content_type=Typ obsahu
settings.secret=Tajný klíč
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Uživatelské jméno
settings.slack_icon_url=URL ikony uživatele
settings.slack_color=Barva
@@ -665,6 +755,8 @@ settings.event_send_everything=Potřebuji <strong>vše</strong>.
settings.event_choose=Nech mne vybrat, co potřebuji.
settings.event_create=Vytvořit
settings.event_create_desc=Větev nebo značka byla vytvořena
settings.event_pull_request=Požadavek na stažení
settings.event_pull_request_desc=Pull request byl otevřen, uzavřen, znovu-otevřen, upraven, přiřazen, zrušeno přiřazení, popis upraven, smazán nebo synchronizován.
settings.event_push=Nahrát
settings.event_push_desc=Nahrání pomocí Gitu do repositáře
settings.active=Aktivní
@@ -676,10 +768,12 @@ settings.delete_webhook=Smazat webový háček
settings.recent_deliveries=Nedávné dodávky
settings.hook_type=Typ háčku
settings.add_slack_hook_desc=Přidat integraci <a href="%s">Slacku</a> do vašeho repositáře.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Poukázka
settings.slack_domain=Doména
settings.slack_channel=Kanál
settings.deploy_keys=Klíče pro nasazení
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Přidat klíč pro nasazení
settings.deploy_key_desc=Klíče pro nasazení mají pouze přístup ke čtení. Nejsou stejné jako osobní klíče SSH.
settings.no_deploy_keys=Žádné klíče pro nasazení nebyly ještě přidány.
@@ -702,8 +796,8 @@ diff.show_unified_view=Jednotný pohled
diff.stats_desc=<strong> %d změnil soubory</strong>, kde provedl <strong>%d přidání</strong> a <strong>%d odebrání</strong>
diff.bin=binární
diff.view_file=Zobrazit soubor
diff.file_suppressed=File diff suppressed because it is too large
diff.too_many_files=Some files were not shown because too many files changed in this diff
diff.file_suppressed=Diff nebyl zobrazen, protože je příliš veliký
diff.too_many_files=Některé soubory nejsou zobrazny, neboť je v této revizi změněno mnoho souborů
release.releases=Vydání
release.new_release=Nové vydání
@@ -734,7 +828,7 @@ release.deletion=Smazání vydání
release.deletion_desc=Smazáním tohoto vydání se také smaže odpovídající značka. Chcete pokračovat?
release.deletion_success=Vydání bylo úspěšně smazáno!
release.tag_name_already_exist=Vydání s touto značkou již existuje.
release.tag_name_invalid=Tag name is not valid.
release.tag_name_invalid=Název štítku není platný.
release.downloads=Soubory ke stažení
[org]
@@ -758,6 +852,7 @@ team_permission_desc=Jakou úroveň přístupu má mít tento tým?
form.name_reserved=Název organizace '%s' je již rezervován.
form.name_pattern_not_allowed=Vzor názvu organizace '%s' není povolen.
form.team_name_reserved=Team name '%s' is reserved.
settings=Nastavení
settings.options=Možnosti
@@ -803,7 +898,7 @@ teams.owners_permission_desc=Vlastníci mají plný přístup do <strong>všech
teams.members=Členové týmu
teams.update_settings=Upravit nastavení
teams.delete_team=Smazat tento tým
teams.add_team_member=Přidát člena týmu
teams.add_team_member=Přidat člena týmu
teams.delete_team_title=Smazání týmu
teams.delete_team_desc=Jelikož bude tento tým smazán, jeho členové mohou ztratit přístup do některých repositářů. Chcete pokračovat?
teams.delete_team_success=Daný tým byl úspěšně smazán.
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Provést úklid nad repositáři
dashboard.git_gc_repos_success=Úklid nad všemi repositáři byl úspěšně proveden.
dashboard.resync_all_sshkeys=Přepsat soubor '.ssh/authorized_keys' (upozornění: klíče nevzniklé v Gogs budou ztraceny)
dashboard.resync_all_sshkeys_success=Všechny veřejné klíče byly úspěšně přepsány.
dashboard.resync_all_update_hooks=Přepsat háček úprav všech repositářů (potřebný v momentě změny cesty k uživatelskému konfiguračnímu souboru)
dashboard.resync_all_update_hooks_success=Háček úprav všech repositářů byl úspěšně přepsán.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Znovu inicializovat záznamy všech repositářů, které ztratily soubory Gitu
dashboard.reinit_missing_repos_success=Záznamy všech repositářů, které ztratily soubory Gitu, byly znovu úspěšně inicializovány.
@@ -902,7 +997,7 @@ users.edit_account=Upravit účet
users.max_repo_creation=Limit počtu vytvořených repositářů
users.max_repo_creation_desc=(Nastavte na -1 pro použití výchozího systémového limitu)
users.is_activated=Tento účet je aktivován
users.prohibit_login=This account is prohibited to login
users.prohibit_login=Tento účet má zakázáno přihlášení
users.is_admin=Tento účet je správce
users.allow_git_hook=Tento účet má právo vytváře háčky Gitu
users.allow_import_local=Tento účet má právo importovat místní repositáře
@@ -933,7 +1028,7 @@ auths.enabled=Povolený
auths.updated=Upravený
auths.auth_type=Typ ověření
auths.auth_name=Název ověření
auths.security_protocol=Security Protocol
auths.security_protocol=Protokol zabezpečení
auths.domain=Doména
auths.host=Server
auths.port=Port
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Smazání způsobu ověřování
auths.delete_auth_desc=Tento způsob ověřování bude smazán, chcete pokračovat?
auths.still_in_used=Tento způsob ověřování je stále používán některými uživateli. Prosím, nejdříve změňte u těchto uživatelů typ ověřování na jiný.
auths.deletion_success=Způsob ověřování byl úspěšně smazán!
auths.login_source_exist=Zdroj přihlášení '%s' již existuje.
config.server_config=Nastavení serveru
config.app_name=Název aplikace
@@ -981,10 +1077,9 @@ config.offline_mode=Režim off-line
config.disable_router_log=Vypnout log směrovače
config.run_user=Účet pro spouštění
config.run_mode=Režim spouštění
config.repo_root_path=Kořenový adresář repositářů
config.git_version=Git Version
config.static_file_root_path=Kořenový adresář statického souboru
config.log_file_root_path=Kořenový adresář souboru logu
config.script_type=Typ skriptu
config.reverse_auth_user=Uživatel obráceného ověření
config.ssh_config=Nastavení SSH
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Cesta ke generátoru klíčů ('ssh-keygen')
config.ssh_minimum_key_size_check=Kontrola minimální velikosti klíčů
config.ssh_minimum_key_sizes=Minimální velikost klíčů
config.repo_config=Repository Configuration
config.repo_root_path=Kořenový adresář repositářů
config.script_type=Typ skriptu
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Nastavení databáze
config.db_type=Typ
config.db_host=Server
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Doba života souboru cookie
config.picture_config=Nastavení ikony uživatele
config.picture_service=Služba ikon uživatelů
config.disable_gravatar=Zakázat službu Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Povolit jednotné avatary
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Konfigurace Gitu
config.git_disable_diff_highlight=Zakázat zvýraznění syntaxe v rozdílovém zobrazení
config.git_max_diff_lines=Maximální počet rozdílových řádků jednoho souboru
config.git_max_diff_line_characters=Maximální počet zobrazených rozdílových znaků
config.git_max_diff_files=Maximální počet zobrazených rozdílových souborů
config.git_gc_args=Parametry GC
config.git_migrate_timeout=Časový limit migrace
config.git_mirror_timeout=Časový limit aktualizace zrcadla
config.git_clone_timeout=Časový limit operace naklonování
config.git_pull_timeout=Časový limit operace stažení
config.git_gc_timeout=Časový limit operace GC
config.log_config=Nastavení logů
config.log_mode=Způsob logování
@@ -1125,13 +1230,13 @@ now=nyní
1w=%s 1 týdnem
1mon=%s 1 měsícem
1y=%s 1 rokem
seconds=%s %d sekundami
minutes=%s %d minutami
hours=%s %d hodinami
days=%s %d dny
weeks=%s %d týdny
months=%s %d měsíci
years=%s %d roky
seconds=%[2]s %[1]d sekundami
minutes=%[2]s %[1]d minutami
hours=%[2]s %[1]d hodinami
days=%[2]s %[1]d dny
weeks=%[2]s %[1]d týdny
months=%[2]s %[1]d měsíci
years=%[2]s %[1]d roky
raw_seconds=sekund
raw_minutes=minut

View File

@@ -47,8 +47,8 @@ cancel=Abbrechen
[install]
install=Installation
title=Installationsschritte für den ersten Start
docker_helper=Wenn Gogs innerhalb Docker läuft, lesen Sie sich bitte den <a target="_blank" href="%s">Leitfaden</a> genau durch, bevor Sie irgendwas auf dieser Seite ändern!
requite_db_desc=Gogs benötigt MySQL, PostgreSQL, SQLite3 oder TiDB.
docker_helper=Wenn Gogs innerhalb von Docker läuft, lesen Sie sich bitte den <a target="_blank" href="%s">Leitfaden</a> genau durch, bevor Sie irgendwas auf dieser Seite ändern!
requite_db_desc=Gogs benötigt MySQL, PostgreSQL, SQLite3, MSSQL oder TiDB.
db_title=Datenbankeinstellungen
db_type=Datenbanktyp
host=Host
@@ -58,9 +58,8 @@ db_name=Datenbankname
db_helper=Bitte verwenden Sie in MySQL die InnoDB-Engine mit dem Zeichensatz utf8_general_ci.
ssl_mode=SSL-Modus
path=Pfad
sqlite_helper=Der Dateipfad zur SQLite3- oder TiDB-Datenbank. <br>Bitte verwenden Sie einen absoluten Pfad, wenn Gogs als Service gestartet wird.
err_empty_db_path=SQLite3 oder TiDB Datenbankpfad darf nicht leer sein.
err_invalid_tidb_name=Der TiDB Datenbankname darf nicht "." und "-" enthalten.
sqlite_helper=Der Dateipfad zur SQLite3-Datenbank. <br>Bitte verwenden Sie einen absoluten Pfad, wenn Gogs als Service gestartet wird.
err_empty_db_path=SQLite3 Datenbankpfad darf nicht leer sein.
no_admin_and_disable_registration=Sie können die Registrierung nicht deaktivieren, ohne ein Administratorkonto zu erstellen.
err_empty_admin_password=Das Administrator-Passwort darf nicht leer sein.
@@ -75,6 +74,8 @@ domain=Domain
domain_helper=Dies hat Auswirkung auf die SSH Klon-URLs.
ssh_port=SSH Port
ssh_port_helper=Der Port Ihres SSH-Servers. Leer lassen um SSH zu deaktivieren.
use_builtin_ssh_server=Eingebauten SSH-Server verwenden
use_builtin_ssh_server_popup=Starte eingebauten SSH-Server für git-Aufgaben, um es vom System-SSH-Dämon zu trennen.
http_port=HTTP Port
http_port_helper=Auf dieser Port Nummer wird Gogs erreichbar sein.
app_url=Anwendungs-URL
@@ -96,8 +97,8 @@ offline_mode=Offline-Modus aktivieren
offline_mode_popup=CDN auch im Produktivmodus deaktivieren. Alle Dateien werden von diesem Server ausgeliefert.
disable_gravatar=Gravatar-Dienst deaktivieren
disable_gravatar_popup=Gravatar und benutzerdefinierte Quellen deaktivieren. Alle Profilbilder werden vom Nutzer hochgeladen oder sind das Standard-Profilbild.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Suche nach föderierten Profilbildern einschalten
federated_avatar_lookup_popup=Der Suche nach föderierten Profilbildern die Verwendung von föderierten open source Services basierend auf libravatar erlauben.
disable_registration=Registrierung deaktivieren
disable_registration_popup=Registrierung neuer Benutzer deaktivieren. Nur Administratoren können Benutzerkonten anlegen.
enable_captcha=Captcha aktivieren
@@ -116,6 +117,7 @@ sqlite3_not_available=Ihre Gogs-Version unterstützt SQLite3 nicht. Bitte laden
invalid_db_setting=Datenbankeinstellungen sind nicht korrekt: %v
invalid_repo_path=Repository Verzeichnis ist ungültig: %v
run_user_not_match=Der ausführende Benutzer ist nicht der aktuelle Benutzer: %s -> %s
invalid_smtp_from=SMTP Absender Feld ist nicht gültig: %v
save_config_failed=Fehler beim Speichern der Konfiguration: %v
invalid_admin_setting=Admin-Konto Einstellungen sind ungültig: %v
install_success=Herzlich Willkommen! Wir sind froh, dass Sie sich für Gogs entschieden haben. Wir wünschen viel Vergnügen damit.
@@ -137,6 +139,7 @@ issues.in_your_repos=In Ihren Repositories
[explore]
repos=Repositories
users=Benutzer
organizations=Organisationen
search=Suche
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Ihrem Konto ist es nicht gestattet sich anzumelden. Bitte ko
resent_limit_prompt=Es tut uns leid, aber Sie haben bereits eine Aktivierungs-E-Mail angefordert. Bitte warten Sie 3 Minuten und probieren Sie es dann nochmal.
has_unconfirmed_mail=Hallo %s, Sie haben eine unbestätigte E-Mail-Adresse (<b>%s</b>). Wenn Sie keine Bestätigungs-E-Mail erhalten haben oder eine neue benötigen, klicken Sie bitte auf den folgenden Button.
resend_mail=Hier klicken, um die Aktivierungs-E-Mail erneut zu versenden
email_not_associate=Diese E-Mail-Adresse ist mit keinem Konto verknüpft.
send_reset_mail=Hier klicken, um die E-Mail zum Passwort-zurücksetzen erneut zu versenden
reset_password=Passwort zurücksetzen
invalid_code=Es tut uns leid, der Bestätigungscode ist abgelaufen oder ungültig.
@@ -189,6 +191,13 @@ TeamName=Teamname
AuthName=Name der Autorisierung
AdminEmail=Administrator E-Mail
NewBranchName=Neuer Branch Name
CommitSummary=Commit Zusammenfassung
CommitMessage=Commit Nachricht
CommitChoice=Commit Auswahl
TreeName=Dateipfad
Content=Inhalt
require_error=` darf nicht leer sein.`
alpha_dash_error=` kann ausschließlich alphanumerische Zeichen und "-_" enthalten.`
alpha_dash_dot_error=` kann ausschließlich alphanumerische Zeichen und ".-_" enthalten.`
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Benutzernamen der Form '%s' sind nicht erlaubt.
[settings]
profile=Profil
password=Passwort
avatar=Avatar
avatar=Profilbild
ssh_keys=SSH-Schlüssel
social=Soziale Konten
applications=Anwendungen
@@ -262,8 +271,8 @@ change_username_prompt=Diese Änderung wirkt sich auf die Links zu Ihrem Benutze
continue=Weiter
cancel=Abbrechen
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Suche nach Profilbildern via E-Mail
federated_avatar_lookup=Suche nach föderierten Profilbildern
enable_custom_avatar=Benutzerdefiniertes Profilbild aktivieren
choose_new_avatar=Neues Profilbild auswählen
update_avatar=Profilbildeinstellungen aktualisieren
@@ -319,7 +328,7 @@ unbind=Verknüpfung entfernen
unbind_success=Die Verknüpfung zum sozialen Konto wurde entfernt.
manage_access_token=Verwaltung persönlicher Zugangs-Token
generate_new_token=Neuen Token erzeugen
generate_new_token=Neues Token erzeugen
tokens_desc=Die von Ihnen erzeugten Token können zum Zugriff auf die Gogs-API verwendet werden.
new_token_desc=Jeder Token erlaubt vollen Zugriff auf ihr Konto.
token_name=Token-Name
@@ -330,6 +339,10 @@ access_token_deletion=Persönlichen Token entfernen
access_token_deletion_desc=Das Löschen dieses persönlichen Zugangs-Tokens wird alle zugehörigen Zugriffe der Anwendung entfernen. Möchten Sie fortfahren?
delete_token_success=Persönlicher Zugriffs-Token wurde erfolgreich entfernt! Vergessen Sie nicht Ihre Anwendung zu aktualisieren.
orgs.none=Sie sind kein Mitglied einer Organisation.
orgs.leave_title=Organisation verlassen
orgs.leave_desc=Sie verlieren den Zugriff auf alle Repositories und Teams nach dem Verlassen der Organisation. Möchten Sie fortfahren?
delete_account=Konto löschen
delete_prompt=Diese Aktion wird Ihr Konto dauerhaft löschen und kann <strong>NICHT</strong> rückgängig gemacht werden!
confirm_delete_account=Löschvorgang bestätigen
@@ -344,13 +357,13 @@ visibility=Sichtbarkeit
visiblity_helper=Dieses Repository ist <span class="ui red text">privat</span>
visiblity_helper_forced=Der Administrator hat festgelegt, dass alle neuen Repositories <span class="ui red text">privat</span> sein müssen
visiblity_fork_helper=(Eine Änderung dieses Wertes wirkt sich auf alle Forks aus)
clone_helper=Sie brauchen Hilfe beim Klonen? Öffnen Sie die <a target="_blank" href="%s">Hilfe</a>!
clone_helper=Brauchen Sie Hilfe beim Klonen? Hier gibt es <a target="_blank" href="%s">Hilfe</a>!
fork_repo=Repository forken
fork_from=Fork von
fork_visiblity_helper=Die Sichtbarkeit von geforkten Repositories ist nicht veränderbar.
repo_desc=Beschreibung
repo_lang=Sprache
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Wählen Sie eine .gitignore Vorlage aus
license=Lizenz
license_helper=Wählen Sie eine Lizenz aus
readme=Readme
@@ -363,6 +376,7 @@ mirror_prune_desc=Entferne alle Verweise auf nicht mehr existierende entfernte R
mirror_interval=Mirror-Intervall (in Stunden)
mirror_address=Mirror-Adresse
mirror_address_desc=Bitte die nötigen Zugangsdaten in die Adresse mit aufnehmen.
mirror_last_synced=Zuletzt synchronisiert
watchers=Beobachter
stargazers=In Favoriten von
forks=Forks
@@ -376,14 +390,14 @@ migrate_type=Migrationstyp
migrate_type_helper=Dieses Repository wird ein <span class="text blue">Mirror</span> sein
migrate_repo=Repository migrieren
migrate.clone_address=Adresse kopieren
migrate.clone_address_desc=Dies kann eine HTTP/HTTPS/GIT URL oder ein lokaler Serverpfad sein.
migrate.clone_address_desc=Dies kann eine HTTP/HTTPS/GIT-URL sein.
migrate.clone_address_desc_import_local=Sie dürfen auch eine Repository vom lokalen Serverpfad migrieren.
migrate.permission_denied=Ihnen fehlen die Rechte zum Importieren lokaler Repositories.
migrate.invalid_local_path=Der lokale Pfad ist ungültig, existiert nicht oder ist kein Ordner.
migrate.failed=Fehler bei Migration: %v
mirror_from=Mirror von
forked_from=geforkt von
fork_from_self=Sie können kein Repository forken, das Ihnen gehört!
copy_link=Kopieren
copy_link_success=Kopiert!
copy_link_error=Drücken Sie ⌘-C oder Strg-C zum Kopieren
@@ -401,7 +415,7 @@ create_new_repo_command=Erstellen Sie ein neues Repository mittels der Kommandoz
push_exist_repo=Bestehendes Repository von der Kommandozeile pushen
repo_is_empty=Dieses Repository ist leer. Bitte kommen Sie später wieder!
code=Code
files=Dateien
branch=Branch
tree=Struktur
filter_branch_and_tag=Nach Branch oder Tag filtern
@@ -418,7 +432,48 @@ file_history=Verlauf
file_view_raw=Ansicht im Originalformat
file_permalink=Permalink
file_too_large=Diese Datei ist zu groß zum Anzeigen
video_not_supported_in_browser=Ihr Browser unterstützt HTML5 Video-Tags nicht.
editor.new_file=Neue Datei
editor.upload_file=Datei hochladen
editor.edit_file=Datei bearbeiten
editor.preview_changes=Vorschau der Änderungen
editor.cannot_edit_non_text_files=Nicht-Text Dateien können nicht bearbeitet werden
editor.edit_this_file=Datei bearbeiten
editor.must_be_on_a_branch=Sie müssen sich in einem Branch befinden, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen
editor.fork_before_edit=Um die Datei zu bearbeiten, müssen Sie das Repository forken
editor.delete_this_file=Datei löschen
editor.must_have_write_access=Du musst Schreibzugriff haben, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen
editor.file_delete_success=Die Datei '%s' wurde erfolgreich gelöscht!
editor.name_your_file=Dateinamen eingeben...
editor.filename_help=Um einen Ordner hinzuzufügen, gib den Namen ein und drücke /. Um einen Ordner zu entfernen, gehe zum Anfang des Feldes und drücke auf die Rücktaste.
editor.or=oder
editor.cancel_lower=abbrechen
editor.commit_changes=Änderungen einchecken
editor.add_tmpl=Hinzufügen von '%s/<filename>'
editor.add='%s' hinzufügen
editor.update='%s' ändern
editor.delete='%s' löschen
editor.commit_message_desc=Eine ausführlichere Beschreibung kann hinzugefügt werden...
editor.commit_directly_to_this_branch=Direkt in den <strong class="branch-name">%s</strong> Branch einchecken.
editor.create_new_branch=Einen <strong>neuen Branch</strong> für diesen Commit erstellen und einen Pull Request starten.
editor.new_branch_name_desc=Neuer Branch Name...
editor.cancel=Abbrechen
editor.filename_cannot_be_empty=Der Dateiname darf nicht leer sein.
editor.branch_already_exists=Branch '%s' existiert bereits in diesem Repository.
editor.directory_is_a_file='%s' im übergeordneten Verzeichnis ist eine Datei und kein Verzeichnis.
editor.file_is_a_symlink=Die Datei '%s' ist ein Symlink, der im Webeditor nicht bearbeitet werden kann.
editor.filename_is_a_directory=Die Datei '%s' existiert bereits als Verzeichnis in diesem Repository.
editor.file_editing_no_longer_exists=Die Datei '%s', welche Sie bearbeiten, existiert in diesem Repository nicht mehr.
editor.file_changed_while_editing=Seit dem Start der Bearbeitung hat sich die Datei geändert. <a target="_blank" href="%s">Hier klicken</a> um die Änderungen zu sehen, oder nochmals <strong>Commit drücken</strong> um die Änderungen zu überschreiben.
editor.file_already_exists=Eine Datei mit dem Namen '%s' existiert bereits in diesem Repository.
editor.no_changes_to_show=Keine Änderungen vorhanden.
editor.fail_to_update_file=Fehler beim Ändern/Erstellen der Datei '%s'. Fehler: %v
editor.add_subdir=Unterverzeichnis erstellen...
editor.unable_to_upload_files=Fehler beim Hochladen der Dateien zu '%s'. Fehler: %v
editor.upload_files_to_dir=Dateien hochladen nach '%s'
commits.commit_history=Commit Verlauf
commits.commits=Commits
commits.search=Commits durchsuchen
commits.find=Finden
@@ -444,6 +499,11 @@ issues.create=Issue erstellen
issues.new_label=Neues Label
issues.new_label_placeholder=Label-Name...
issues.create_label=Label erstellen
issues.label_templates.title=Lade vordefinierte Label
issues.label_templates.info=Es sind noch keine Label vorhanden. Sie können vordefinierte Label benutzen, oder auf "Neues Label" klicken um eines zu erstellen.
issues.label_templates.helper=Wählen Sie ein Label
issues.label_templates.use=Dieses Label Set benutzen
issues.label_templates.fail_to_load_file=Fehler beim Laden der Label Template Datei '%s': %v
issues.open_tab=%d offen
issues.close_tab=%d geschlossen
issues.filter_label=Label
@@ -485,8 +545,7 @@ issues.commit_ref_at=`hat dieses Issue <a id="%[1]s" href="#%[1]s">%[2]s</a> aus
issues.poster=Ersteller
issues.collaborator=Mitarbeiter
issues.owner=Besitzer
issues.sign_up_for_free=Kostenlos anmelden
issues.sign_in_require_desc=um dieser Diskussion beizutreten. Haben Sie bereits ein Konto? <a href="%s">Anmelden um zu kommentieren</a>
issues.sign_in_require_desc=<a href="%s">Anmelden</a>, um an der Diskussion teilzunehmen.
issues.edit=Bearbeiten
issues.cancel=Abbrechen
issues.save=Speichern
@@ -501,6 +560,8 @@ issues.label_deletion=Label löschen
issues.label_deletion_desc=Das Label wird von allen verknüpften Issues entfernt. Möchten Sie fortfahren?
issues.label_deletion_success=Label wurde erfolgreich gelöscht!
issues.num_participants=%d Beteiligte
issues.attachment.open_tab=`Klicken um "%s" in einem neuen Tab zu öffnen`
issues.attachment.download=`Klicken um "%s" herunterzuladen`
pulls.new=Neuer Pull-Request
pulls.compare_changes=Änderungen vergleichen
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Dieser Pull-Request kann nicht automatisch zusammen
pulls.cannot_auto_merge_helper=Bitte manuell zusammenführen, um die Konflikte zu lösen.
pulls.merge_pull_request=Pull-Request zusammenführen
pulls.open_unmerged_pull_exists=`Sie können diesen Pull-Request nicht wieder öffnen, da bereits ein offener Pull-Request (#%d) aus dem selben Repository mit den gleichen Merge-Informationen existiert und auf das Zusammenführen wartet.`
pulls.delete_branch=Zweig löschen
pulls.delete_branch_has_new_commits=Zweig kann nicht gelöscht werden, da er noch weitere Commits nach dem Zusammenführen enthält.
milestones.new=Neuer Meilenstein
milestones.open_tab=%d offen
@@ -577,21 +640,47 @@ settings.collaboration.admin=Adminrechte
settings.collaboration.write=Schreibrechte
settings.collaboration.read=Leserechte
settings.collaboration.undefined=Nicht definiert
settings.branches=Branches
settings.default_branch=Standard-Branch
settings.default_branch_desc=Der Standard-Branch gilt als Basis für Commits, Pull-Requests und Online-Bearbeitung.
settings.update=Aktualisieren
settings.update_default_branch_success=Standard-Branch dieses Repositories wurde erfolgreich aktualisiert!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Schützt Branches vor forcierten Pushes und versehentlichem Löschen. Comitter können freigeschaltet werden.
settings.choose_a_branch=Wählen Sie einen Branch...
settings.branch_protection=Branch-Schutz
settings.branch_protection_desc=Bitte wählen Sie Schutzoptionen für den Branch <b>%s</b>.
settings.protect_this_branch=Diesen Branch schützen
settings.protect_this_branch_desc=Verhindere forcierte Pushes sowie Löschungen.
settings.protect_require_pull_request=Verlange Pull-Request an Stelle von direkten Pushes
settings.protect_require_pull_request_desc=Aktivieren Sie diese Option, um direktes Pushen in diesen Branch zu verhindern. Commits müssen in einen anderen, ungeschützten Branch gepusht werden und dann per Pull-Request in diesen Branch überführt werden.
settings.protect_whitelist_committers=Fügt die Benutzer zu Whitelist hinzu, die in diesen Branch pushen dürfen
settings.protect_whitelist_committers_desc=Benutzer oder Teams zur Whitelist hinzufügen.
settings.protect_whitelist_users=Benutzer, die in diesen Branch pushen können
settings.protect_whitelist_search_users=Benutzer suchen
settings.protect_whitelist_teams=Teams, deren Mitglieder in diesen Branch pushen können
settings.protect_whitelist_search_teams=Teams suchen
settings.update_protect_branch_success=Schutzoptionen für diesen Branch wurden erfolgreich aktualisiert!
settings.hooks=Webhooks
settings.githooks=Git-Hooks
settings.basic_settings=Grundeinstellungen
settings.mirror_settings=Mirror Einstellungen
settings.sync_mirror=Jetzt synchronisieren
settings.mirror_sync_in_progress=Mirror Synchronisierung läuft, bitte die Seite in ca. einer Minute neu laden.
settings.site=Offizielle Webseite
settings.update_settings=Einstellungen speichern
settings.change_reponame_prompt=Diese Änderung wirkt sich darauf aus, wie sich Links auf Repositories beziehen.
settings.advanced_settings=Erweiterte Einstellungen
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Wiki einschalten
settings.use_internal_wiki=Eingebautes Wiki verwenden
settings.use_external_wiki=Externes Wiki verwenden
settings.external_wiki_url=Externe Wiki URL
settings.external_wiki_url_desc=Besucher werden auf diese URL umgeleitet, wenn sie auf den Tab klicken.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Issue-Tracker einschalten
settings.use_internal_issue_tracker=Eingebauten Issue-Tracker verwenden
settings.use_external_issue_tracker=Externes Issue-System verwenden
settings.external_tracker_url=URL eines externen Issue Trackers
settings.external_tracker_url_desc=Besucher werden auf diese URL umgeleitet, wenn sie auf den Tab klicken.
settings.tracker_url_format=URL-Format des externen Issue-Systems
settings.tracker_issue_style=Namenskonvention des externen Issue-Trackers:
settings.tracker_issue_style.numeric=Numerisch
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumerisch
settings.tracker_url_format_desc=Sie können die Platzhalter <code>{user} {repo} {index}</code> für den Benutzernamen, den Namen des Repositories und die Issue-Nummer verwenden.
settings.pulls_desc=Pull-Requests aktivieren, um öffentliche Mitwirkung zu ermöglichen
settings.danger_zone=Gefahrenzone
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Der neue Eigentümer hat bereits ein Repository mit dem gleichen Namen. Bitte wählen Sie einen anderen Namen.
settings.convert=In ein normales Repository umwandeln
settings.convert_desc=Dieser Mirror kann in ein normales Repository umgewandelt werden. Dies kann nicht rückgängig gemacht werden.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Nach dem Löschen wird dieser Benutzer keine
settings.remove_collaborator_success=Mitarbeiter wurde entfernt.
settings.search_user_placeholder=Benutzer suchen...
settings.org_not_allowed_to_be_collaborator=Eine Organisation kann nicht als Mitarbeiter hinzugefügt werden.
settings.user_is_org_member=Benutzer ist ein Organisationsmitglied und kann nicht als Mitarbeiter hinzugefügt werden.
settings.add_webhook=Webhook hinzufügen
settings.hooks_desc=Webhooks erlauben es Ihnen, externe Dienste zu informieren, wenn etwas Bestimmtes in Ihrem Repository passiert. Gogs sendet dann einen POST-Request an alle angegebenen URLs. Erfahren Sie mehr in unserem <a target="_blank" href="%s">Webhooks Guide</a>.
settings.webhook_deletion=Webhook entfernen
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Gogs sendet einen <code>POST</code>-Request an die unt
settings.payload_url=Payload URL
settings.content_type=Inhaltstyp
settings.secret=Secret
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Benutzername
settings.slack_icon_url=Icon URL
settings.slack_color=Farbe
@@ -665,6 +755,8 @@ settings.event_send_everything=Ich brauche <strong>alles</strong>.
settings.event_choose=Lass mich auswählen, was ich brauche.
settings.event_create=Erstellen
settings.event_create_desc=Branch/Tag erstellt
settings.event_pull_request=Pull-Request
settings.event_pull_request_desc=Pull-Request geöffnet, geschlossen, wieder geöffnet, bearbeitet, zugewiesen, nicht zugewiesen, Label aktualisiert, Label gelöscht oder synchronisiert.
settings.event_push=Push
settings.event_push_desc=Git push auf ein Repository
settings.active=Aktiv
@@ -676,10 +768,12 @@ settings.delete_webhook=Webhook löschen
settings.recent_deliveries=Letzte Zustellungen
settings.hook_type=Hook Typ
settings.add_slack_hook_desc=Fügen Sie <a href="%s">Slack</a>-Integration zu Ihrem Repository hinzu.
settings.add_discord_hook_desc=Fügen Sie <a href="%s">Discord</a>-Integration zu Ihrem Repository hinzu.
settings.slack_token=Token
settings.slack_domain=Domain
settings.slack_channel=Kanal
settings.deploy_keys=Deploy-Schlüssel
settings.deploy_keys_helper=<b>Häufiger Fehler!</b> Wenn Sie öffentliche Schlüssel hinzufügen wollen, gehen Sie zu Ihren <a href="%s%s"> Kontoeinstellungen</a>.
settings.add_deploy_key=Deploy-Schlüssel hinzufügen
settings.deploy_key_desc=Deploy-Schlüssel haben nur lesenden Zugriff. Sie sind nicht identisch mit dem SSH-Schlüssel des persönlichen Kontos.
settings.no_deploy_keys=Sie haben noch keine Deploy-Schlüssel hinzugefügt.
@@ -758,6 +852,7 @@ team_permission_desc=Welche Berechtigungsstufe soll das Team haben?
form.name_reserved=Organisationsname '%s' ist bereits vergeben.
form.name_pattern_not_allowed=Organisationsnamen der Form '%s' sind nicht erlaubt.
form.team_name_reserved=Der Teamname '%s' ist reserviert.
settings=Einstellungen
settings.options=Optionen
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Garbage Collection auf Repositories ausführen
dashboard.git_gc_repos_success=Garbage Collection wurde auf allen Repositories erfolgreich ausgeführt.
dashboard.resync_all_sshkeys=Datei '.ssh/authorized_keys' neu anlegen (Achtung: Schlüssel, die nicht zu Gogs gehören gehen verloren)
dashboard.resync_all_sshkeys_success=Alle öffentlichen Keys wurden erfolgreich neu geschrieben.
dashboard.resync_all_update_hooks=Alle Aktualisierungs-Hooks von Repositories neu anlegen (wird benötigt, wenn der angepasste Konfigurationspfad geändert wurde)
dashboard.resync_all_update_hooks_success=Die Hooks aller Repositories wurden erfolgreich neu angelegt.
dashboard.resync_all_hooks=Synchronisiere pre-receive, update und post-receive Hooks für alle Repositorien
dashboard.resync_all_hooks_success=Pre-receive, update und post-receive Hooks aller Repositorien wurden erfolgreich synchronisiert.
dashboard.reinit_missing_repos=Alle Repository-Datensätze mit verloren gegangenen Git-Dateien neu initialisieren
dashboard.reinit_missing_repos_success=Alle Repository-Datensätze, die Git-Dateien verloren haben wurden erfolgreich neu initialisiert.
@@ -941,7 +1036,7 @@ auths.bind_dn=DN binden
auths.bind_password=Passwort binden
auths.bind_password_helper=Achtung: Das Passwort wird im Klartext gespeichert. Benutzen Sie kein Konto mit hoher Berechtigungsstufe.
auths.user_base=Basis für Benutzersuche
auths.user_dn=Benutzer DN
auths.user_dn=Benutzer-DN
auths.attribute_username=Attribut Benutzername
auths.attribute_username_placeholder=Leer lassen, um den Wert aus dem Anmeldeformular als Benutzernamen zu verwenden.
auths.attribute_name=Attribut Vorname
@@ -971,9 +1066,10 @@ auths.delete_auth_title=Authentifizierung löschen
auths.delete_auth_desc=Diese Authentifizierung wird gelöscht. Möchten Sie fortfahren?
auths.still_in_used=Diese Authentifizierung wird noch von einigen Benutzern verwendet. Bitte löschen Sie diese Benutzer oder ändern Sie deren Anmeldetyp.
auths.deletion_success=Authentifizierung wurde erfolgreich gelöscht!
auths.login_source_exist=Login-Quelle '%s' ist bereits vorhanden.
config.server_config=Serverkonfiguration
config.app_name=Anwendungsname
config.app_name=Name der Anwendung
config.app_ver=Anwendungsversion
config.app_url=Anwendungs-URL
config.domain=Domain
@@ -981,10 +1077,9 @@ config.offline_mode=Offline-Modus
config.disable_router_log=Router-Log deaktivieren
config.run_user=Ausführender Benutzer
config.run_mode=Laufzeit-Modus
config.repo_root_path=Repository-Verzeichnis
config.git_version=Git Version
config.static_file_root_path=Verzeichnis für statische Dateien
config.log_file_root_path=Log-Verzeichnis
config.script_type=Skript-Typ
config.reverse_auth_user=Nutzer bei Reverse-Authentifizierung
config.ssh_config=SSH Konfiguration
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Keygen ('ssh-keygen') Pfad
config.ssh_minimum_key_size_check=Prüfung der Mindestschlüssellänge
config.ssh_minimum_key_sizes=Minimale Schlüssellängen
config.repo_config=Repository-Konfiguration
config.repo_root_path=Repository-Verzeichnis
config.script_type=Skript-Typ
config.repo_force_private=Erzwinge privat
config.max_creation_limit=Maximal erstellbare Anzahl
config.preferred_licenses=Bevorzugte Lizenzen
config.disable_http_git=Deaktiviere HTTP-Git
config.enable_local_path_migration=Erlaube Migration von lokalem Pfad
config.commits_fetch_concurrency=Anzahl gleichzeitiger Commit-/Fetch-Prozesse
config.db_config=Datenbankkonfiguration
config.db_type=Typ
config.db_host=Host
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Cookie-Lebensdauer
config.picture_config=Konfiguration der Profilbilder
config.picture_service=Bildservice
config.disable_gravatar=Gravatar deaktivieren
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Föderierte Profilbilder einschalten
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Git Konfiguration
config.git_disable_diff_highlight=Diff Syntaxhervorhebung ausschalten
config.git_max_diff_lines=Max Diff Zeilen (in einer Datei)
config.git_max_diff_line_characters=Max Diff Zeichen (in einer Zeile)
config.git_max_diff_files=Max Diff Dateien (Anzeige)
config.git_gc_args=GC-Argumente
config.git_migrate_timeout=Zeitlimit für Migration
config.git_mirror_timeout=Zeitlimit für Mirror-Aktualisierung
config.git_clone_timeout=Zeitlimit für Clone
config.git_pull_timeout=Zeitlimit für Pull
config.git_gc_timeout=Zeitlimit für GC
config.log_config=Konfiguration des Loggings
config.log_mode=Log-Modus

View File

@@ -48,7 +48,7 @@ cancel = Cancel
install = Installation
title = Install Steps For First-time Run
docker_helper = If you're running Gogs inside Docker, please read <a target="_blank" href="%s">Guidelines</a> carefully before you change anything in this page!
requite_db_desc = Gogs requires MySQL, PostgreSQL, SQLite3 or TiDB.
requite_db_desc = Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title = Database Settings
db_type = Database Type
host = Host
@@ -58,9 +58,8 @@ db_name = Database Name
db_helper = Please use INNODB engine with utf8_general_ci charset for MySQL.
ssl_mode = SSL Mode
path = Path
sqlite_helper = The file path of SQLite3 or TiDB database. <br>Please use absolute path when you start as service.
err_empty_db_path = SQLite3 or TiDB database path cannot be empty.
err_invalid_tidb_name = TiDB database name does not allow characters "." and "-".
sqlite_helper = The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path = SQLite3 database path cannot be empty.
no_admin_and_disable_registration = You cannot disable registration without creating an admin account.
err_empty_admin_password = Admin password cannot be empty.
@@ -75,6 +74,8 @@ domain = Domain
domain_helper = This affects SSH clone URLs.
ssh_port = SSH Port
ssh_port_helper = Port number which your SSH server is using, leave it empty to disable SSH feature.
use_builtin_ssh_server = Use Builtin SSH Server
use_builtin_ssh_server_popup = Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port = HTTP Port
http_port_helper = Port number which application will listen on.
app_url = Application URL
@@ -116,6 +117,7 @@ sqlite3_not_available = Your release version does not support SQLite3, please do
invalid_db_setting = Database setting is not correct: %v
invalid_repo_path = Repository root path is invalid: %v
run_user_not_match = Run user isn't the current user: %s -> %s
invalid_smtp_from = SMTP From field is not valid: %v
save_config_failed = Fail to save configuration: %v
invalid_admin_setting = Admin account setting is invalid: %v
install_success = Welcome! We're glad that you chose Gogs, have fun and take care.
@@ -137,6 +139,7 @@ issues.in_your_repos = In your repositories
[explore]
repos = Repositories
users = Users
organizations = Organizations
search = Search
[auth]
@@ -144,7 +147,7 @@ create_new_account = Create New Account
register_hepler_msg = Already have an account? Sign in now!
social_register_hepler_msg = Already have an account? Bind now!
disable_register_prompt = Sorry, registration has been disabled. Please contact the site administrator.
disable_register_mail = Sorry, Register Mail Confirmation has been disabled.
disable_register_mail = Sorry, email services are disabled. Please contact the site administrator.
remember_me = Remember Me
forgot_password= Forgot Password
forget_password = Forgot password?
@@ -156,7 +159,6 @@ prohibit_login_desc = Your account is prohibited to login, please contact site a
resent_limit_prompt = Sorry, you already requested an activation email recently. Please wait 3 minutes then try again.
has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below.
resend_mail = Click here to resend your activation email
email_not_associate = This email address is not associated with any account.
send_reset_mail = Click here to (re)send your password reset email
reset_password = Reset Your Password
invalid_code = Sorry, your confirmation code has expired or not valid.
@@ -189,6 +191,13 @@ TeamName = Team name
AuthName = Authorization name
AdminEmail = Admin email
NewBranchName = New branch name
CommitSummary = Commit summary
CommitMessage = Commit message
CommitChoice = Commit choice
TreeName = File path
Content = Content
require_error = ` cannot be empty.`
alpha_dash_error = ` must be valid alpha or numeric or dash(-_) characters.`
alpha_dash_dot_error = ` must be valid alpha or numeric or dash(-_) or dot characters.`
@@ -330,6 +339,10 @@ access_token_deletion = Personal Access Token Deletion
access_token_deletion_desc = Delete this personal access token will remove all related accesses of application. Do you want to continue?
delete_token_success = Personal access token has been removed successfully! Don't forget to update your application as well.
orgs.none = You are not a member of any organizations.
orgs.leave_title = Leave an organization
orgs.leave_desc = You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account = Delete Your Account
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
confirm_delete_account = Confirm Deletion
@@ -363,6 +376,7 @@ mirror_prune_desc = Remove any remote-tracking references that no longer exist o
mirror_interval = Mirror Interval (hour)
mirror_address = Mirror Address
mirror_address_desc = Please include necessary user credentials in the address.
mirror_last_synced = Last Synced
watchers = Watchers
stargazers = Stargazers
forks = Forks
@@ -376,14 +390,14 @@ migrate_type = Migration Type
migrate_type_helper = This repository will be a <span class="text blue">mirror</span>
migrate_repo = Migrate Repository
migrate.clone_address = Clone Address
migrate.clone_address_desc = This can be a HTTP/HTTPS/GIT URL or local server path.
migrate.clone_address_desc = This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local = You're also allowed to migrate a repository by local server path.
migrate.permission_denied = You are not allowed to import local repositories.
migrate.invalid_local_path = Invalid local path, it does not exist or not a directory.
migrate.failed = Migration failed: %v
mirror_from = mirror of
forked_from = forked from
fork_from_self = You cannot fork a repository you already own!
copy_link = Copy
copy_link_success = Copied!
copy_link_error = Press ⌘-C or Ctrl-C to copy
@@ -401,7 +415,7 @@ create_new_repo_command = Create a new repository on the command line
push_exist_repo = Push an existing repository from the command line
repo_is_empty = This repository is empty, please come back later!
code = Code
files = Files
branch = Branch
tree = Tree
filter_branch_and_tag = Filter branch or tag
@@ -418,7 +432,48 @@ file_history = History
file_view_raw = View Raw
file_permalink = Permalink
file_too_large = This file is too large to be shown
video_not_supported_in_browser = Your browser doesn't support HTML5 video tag.
editor.new_file = New file
editor.upload_file = Upload file
editor.edit_file = Edit file
editor.preview_changes = Preview Changes
editor.cannot_edit_non_text_files = Cannot edit non-text files
editor.edit_this_file = Edit this file
editor.must_be_on_a_branch = You must be on a branch to make or propose changes to this file
editor.fork_before_edit = You must fork this repository before editing the file
editor.delete_this_file = Delete this file
editor.must_have_write_access = You must have write access to make or propose changes to this file
editor.file_delete_success = File '%s' has been deleted successfully!
editor.name_your_file = Name your file...
editor.filename_help = To add directory, just type it and press /. To remove a directory, go to the beginning of the field and press backspace.
editor.or = or
editor.cancel_lower = cancel
editor.commit_changes = Commit Changes
editor.add_tmpl = Add '%s/<filename>'
editor.add = Add '%s'
editor.update = Update '%s'
editor.delete = Delete '%s'
editor.commit_message_desc = Add an optional extended description...
editor.commit_directly_to_this_branch = Commit directly to the <strong class="branch-name">%s</strong> branch.
editor.create_new_branch = Create a <strong>new branch</strong> for this commit and start a pull request.
editor.new_branch_name_desc = New branch name...
editor.cancel = Cancel
editor.filename_cannot_be_empty = Filename cannot be empty.
editor.branch_already_exists = Branch '%s' already exists in this repository.
editor.directory_is_a_file = Entry '%s' in the parent path is a file not a directory in this repository.
editor.file_is_a_symlink = The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory = The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists = The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing = File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists = A file with name '%s' already exists in this repository.
editor.no_changes_to_show = There are no changes to show.
editor.fail_to_update_file = Failed to update/create file '%s' with error: %v
editor.add_subdir = Add subdirectory...
editor.unable_to_upload_files = Failed to upload files to '%s' with error: %v
editor.upload_files_to_dir = Upload files to '%s'
commits.commit_history = Commit History
commits.commits = Commits
commits.search = Search commits
commits.find = Find
@@ -444,6 +499,11 @@ issues.create = Create Issue
issues.new_label = New Label
issues.new_label_placeholder = Label name...
issues.create_label = Create Label
issues.label_templates.title = Load a predefined set of labels
issues.label_templates.info = There aren't any labels yet. You can click on the "New Label" button above to create one or use a predefined set below.
issues.label_templates.helper = Select a label set
issues.label_templates.use = Use this label set
issues.label_templates.fail_to_load_file = Failed to load label template file '%s': %v
issues.open_tab = %d Open
issues.close_tab = %d Closed
issues.filter_label = Label
@@ -485,8 +545,7 @@ issues.commit_ref_at = `referenced this issue from a commit <a id="%[1]s" href="
issues.poster = Poster
issues.collaborator = Collaborator
issues.owner = Owner
issues.sign_up_for_free = Sign up for free
issues.sign_in_require_desc = to join this conversation. Already have an account? <a href="%s">Sign in to comment</a>
issues.sign_in_require_desc = <a href="%s">Sign in</a> to join this conversation.
issues.edit = Edit
issues.cancel = Cancel
issues.save = Save
@@ -501,6 +560,8 @@ issues.label_deletion = Label Deletion
issues.label_deletion_desc = Deleting this label will remove its information in all related issues. Do you want to continue?
issues.label_deletion_success = Label has been deleted successfully!
issues.num_participants = %d Participants
issues.attachment.open_tab = `Click to see "%s" in a new tab`
issues.attachment.download = `Click to download "%s"`
pulls.new = New Pull Request
pulls.compare_changes = Compare Changes
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc = This pull request can't be merged automatically b
pulls.cannot_auto_merge_helper = Please merge manually in order to resolve the conflicts.
pulls.merge_pull_request = Merge Pull Request
pulls.open_unmerged_pull_exists = `You can't perform reopen operation because there is already an open pull request (#%d) from same repository with same merge information and is waiting for merging.`
pulls.delete_branch = Delete Branch
pulls.delete_branch_has_new_commits = Branch cannot be deleted because it has new commits after mergence.
milestones.new = New Milestone
milestones.open_tab = %d Open
@@ -577,9 +640,33 @@ settings.collaboration.admin = Admin
settings.collaboration.write = Write
settings.collaboration.read = Read
settings.collaboration.undefined = Undefined
settings.branches = Branches
settings.default_branch = Default Branch
settings.default_branch_desc = The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update = Update
settings.update_default_branch_success = Default branch of this repository has been updated successfully!
settings.protected_branches = Protected Branches
settings.protected_branches_desc = Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch = Choose a branch...
settings.branch_protection = Branch Protection
settings.branch_protection_desc = Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch = Protect this branch
settings.protect_this_branch_desc = Disable force pushes and prevent from deletion.
settings.protect_require_pull_request = Require pull request instead direct pushing
settings.protect_require_pull_request_desc = Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers = Whitelist who can push to this branch
settings.protect_whitelist_committers_desc = Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users = Users who can push to this branch
settings.protect_whitelist_search_users = Search users
settings.protect_whitelist_teams = Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams = Search teams
settings.update_protect_branch_success = Protect options for this branch has been updated successfully!
settings.hooks = Webhooks
settings.githooks = Git Hooks
settings.basic_settings = Basic Settings
settings.mirror_settings = Mirror Settings
settings.sync_mirror = Sync Now
settings.mirror_sync_in_progress = Mirror syncing is in progress, please refresh page in about a minute.
settings.site = Official Site
settings.update_settings = Update Settings
settings.change_reponame_prompt = This change will affect how links relate to the repository.
@@ -592,6 +679,8 @@ settings.external_wiki_url_desc = Visitors will be redirected to URL when they c
settings.issues_desc = Enable issue tracker
settings.use_internal_issue_tracker = Use builtin lightweight issue tracker
settings.use_external_issue_tracker = Use external issue tracker
settings.external_tracker_url = External Issue Tracker URL
settings.external_tracker_url_desc = Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format = External Issue Tracker URL Format
settings.tracker_issue_style = External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric = Numeric
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric = Alphanumeric
settings.tracker_url_format_desc = You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
settings.pulls_desc = Enable pull requests to accept public contributions
settings.danger_zone = Danger Zone
settings.cannot_fork_to_same_owner = You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo = The new owner already has a repository with same name. Please choose another name.
settings.convert = Convert To Regular Repository
settings.convert_desc = You can convert this mirror to a regular repository. This cannot be reversed.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc = This user will no longer have collaboratio
settings.remove_collaborator_success = Collaborator has been removed.
settings.search_user_placeholder = Search user...
settings.org_not_allowed_to_be_collaborator = Organization is not allowed to be added as a collaborator.
settings.user_is_org_member = User is organization member who cannot be added as a collaborator.
settings.add_webhook = Add Webhook
settings.hooks_desc = Webhooks are much like basic HTTP POST event triggers. Whenever something occurs in Gogs, we will handle the notification to the target host you specify. Learn more in this <a target="_blank" href="%s">Webhooks Guide</a>.
settings.webhook_deletion = Delete Webhook
@@ -656,6 +745,7 @@ settings.add_webhook_desc = Gogs will send a <code>POST</code> request to the UR
settings.payload_url = Payload URL
settings.content_type = Content Type
settings.secret = Secret
settings.secret_desc = Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username = Username
settings.slack_icon_url = Icon URL
settings.slack_color = Color
@@ -665,6 +755,8 @@ settings.event_send_everything = I need <strong>everything</strong>.
settings.event_choose = Let me choose what I need.
settings.event_create = Create
settings.event_create_desc = Branch, or tag created
settings.event_pull_request = Pull Request
settings.event_pull_request_desc = Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, or synchronized.
settings.event_push = Push
settings.event_push_desc = Git push to a repository
settings.active = Active
@@ -676,10 +768,12 @@ settings.delete_webhook = Delete Webhook
settings.recent_deliveries = Recent Deliveries
settings.hook_type = Hook Type
settings.add_slack_hook_desc = Add <a href="%s">Slack</a> integration to your repository.
settings.add_discord_hook_desc = Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token = Token
settings.slack_domain = Domain
settings.slack_channel = Channel
settings.deploy_keys = Deploy Keys
settings.deploy_keys_helper = <b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key = Add Deploy Key
settings.deploy_key_desc = Deploy keys have read-only access. They are not the same as personal account SSH keys.
settings.no_deploy_keys = You haven't added any deploy keys.
@@ -758,6 +852,7 @@ team_permission_desc = What permission level should this team have?
form.name_reserved = Organization name '%s' is reserved.
form.name_pattern_not_allowed = Organization name pattern '%s' is not allowed.
form.team_name_reserved = Team name '%s' is reserved.
settings = Settings
settings.options = Options
@@ -829,7 +924,7 @@ first_page = First
last_page = Last
total = Total: %d
dashboard.statistic = Statistic
dashboard.statistic = Statistics
dashboard.operations = Operations
dashboard.system_status = System Monitor Status
dashboard.statistic_info = Gogs database has <b>%d</b> users, <b>%d</b> organizations, <b>%d</b> public keys, <b>%d</b> repositories, <b>%d</b> watches, <b>%d</b> stars, <b>%d</b> actions, <b>%d</b> accesses, <b>%d</b> issues, <b>%d</b> comments, <b>%d</b> social accounts, <b>%d</b> follows, <b>%d</b> mirrors, <b>%d</b> releases, <b>%d</b> login sources, <b>%d</b> webhooks, <b>%d</b> milestones, <b>%d</b> labels, <b>%d</b> hook tasks, <b>%d</b> teams, <b>%d</b> update tasks, <b>%d</b> attachments.
@@ -848,8 +943,8 @@ dashboard.git_gc_repos = Do garbage collection on repositories
dashboard.git_gc_repos_success = All repositories have done garbage collection successfully.
dashboard.resync_all_sshkeys = Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)
dashboard.resync_all_sshkeys_success = All public keys have been rewritten successfully.
dashboard.resync_all_update_hooks = Rewrite all update hook of repositories (needed when custom config path is changed)
dashboard.resync_all_update_hooks_success = All repositories' update hook have been rewritten successfully.
dashboard.resync_all_hooks = Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success = All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos = Reinitialize all repository records that lost Git files
dashboard.reinit_missing_repos_success = All repository records that lost Git files have been reinitialized successfully.
@@ -971,6 +1066,7 @@ auths.delete_auth_title = Authentication Deletion
auths.delete_auth_desc = This authentication is going to be deleted, do you want to continue?
auths.still_in_used = This authentication is still used by some users, please delete or convert these users to another login type first.
auths.deletion_success = Authentication has been deleted successfully!
auths.login_source_exist = Login source '%s' already exists.
config.server_config = Server Configuration
config.app_name = Application Name
@@ -981,10 +1077,9 @@ config.offline_mode = Offline Mode
config.disable_router_log = Disable Router Log
config.run_user = Run User
config.run_mode = Run Mode
config.repo_root_path = Repository Root Path
config.git_version = Git Version
config.static_file_root_path = Static File Root Path
config.log_file_root_path = Log File Root Path
config.script_type = Script Type
config.reverse_auth_user = Reverse Authentication User
config.ssh_config = SSH Configuration
@@ -999,6 +1094,16 @@ config.ssh_keygen_path = Keygen ('ssh-keygen') Path
config.ssh_minimum_key_size_check = Minimum Key Size Check
config.ssh_minimum_key_sizes = Minimum Key Sizes
config.repo_config = Repository Configuration
config.repo_root_path = Repository Root Path
config.script_type = Script Type
config.repo_force_private = Force Private
config.max_creation_limit = Max Creation Limit
config.preferred_licenses = Preferred Licenses
config.disable_http_git = Disable HTTP Git
config.enable_local_path_migration = Enable Local Path Migration
config.commits_fetch_concurrency = Commits Fetch Concurrency
config.db_config = Database Configuration
config.db_type = Type
config.db_host = Host

View File

@@ -25,7 +25,7 @@ captcha=Captcha
repository=Repositorio
organization=Organización
mirror=Mirror
mirror=Réplica
new_repo=Nuevo repositorio
new_migrate=Nueva migración
new_mirror=Nueva réplica
@@ -48,7 +48,7 @@ cancel=Cancelar
install=Instalación
title=Pasos de la instalación por primera vez
docker_helper=Si está ejecutando Gogs usando Docker, ¡por favor lea <a target="_blank" href="%s"> estas pautas</a> antes de cambiar nada en esta página!
requite_db_desc=Gogs requiere una base de datos MySQL, PostgreSQL, SQLite3 o TiDB.
requite_db_desc=Gogs requiere un SGBD como MySQL, PostgreSQL, SQLite3 o TiDB.
db_title=Configuración de base de datos
db_type=Tipo de base de datos
host=Host
@@ -58,9 +58,8 @@ db_name=Nombre de la base de datos
db_helper=Por favor utilice el motor INNODB con la configuración de caracteres utf8_general_ci para MySQL.
ssl_mode=Modo SSL
path=Ruta
sqlite_helper=Ruta al archivo de base de datos SQLite3 o TiDB. <br>Por favor, usa una ruta absoluta cuando inicies como servicio.
err_empty_db_path=La ruta a la base de datos SQLite3 o TiDB no puede estar vacía.
err_invalid_tidb_name=El nombre de la base de datos TiDB no puede contener los caracteres "." ni "-".
sqlite_helper=La ruta del archivo de base de datos de SQLite3. <br> Por favor usar una ruta absoluta al iniciar Gogs como servicio.
err_empty_db_path=La ruta de la base de datos SQLite3 no puede estar vacía.
no_admin_and_disable_registration=No puede deshabilitar el registro sin crear una cuenta de administrador.
err_empty_admin_password=La contraseña de administrador no puede estar vacía.
@@ -75,6 +74,8 @@ domain=Dominio
domain_helper=Esto afecta a las URLs para clonar por SSH.
ssh_port=Puerto SSH
ssh_port_helper=Número de puerto de su servidor SSH, déjelo en blanco para desactivar SSH.
use_builtin_ssh_server=Usar Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=Puerto HTTP
http_port_helper=Puerto en el que escuchará la aplicación.
app_url=URL de la aplicación
@@ -96,8 +97,8 @@ offline_mode=Activar el modo Sin Conexión
offline_mode_popup=Desactivar el CDN incluso en el modo de producción, todos los recursos se servirán localmente.
disable_gravatar=Desactivar el servicio Gravatar
disable_gravatar_popup=Desactivar Gravatar y cualquier otra fuente personalizada. Todos los avatares deben ser cargados por los usuarios o en su defecto se mostrará el avatar predeterminado.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Habilitar búsqueda de Avatares Federados
federated_avatar_lookup_popup=Habilitar búsqueda de avatares federador para usar el servicio federado de código abierto basado en libravatar.
disable_registration=Desactivar Auto-Registro
disable_registration_popup=Desactivar auto-registro del usuario, solo el administrador podrá crear cuentas nuevas.
enable_captcha=Activar la Captcha
@@ -116,6 +117,7 @@ sqlite3_not_available=Tu versión no soporta SQLite3, por favor descarga el bina
invalid_db_setting=La configuración de la base de datos no es correcta: %v
invalid_repo_path=La ruta de la raíz del repositorio es inválida: %v
run_user_not_match=El usuario que está ejecutando la aplicación no es el usuario actual: %s -> %s
invalid_smtp_from=El campo SMTP no es válido: %v
save_config_failed=Error al guardar la configuración: %v
invalid_admin_setting=La configuración de la cuenta de administración es inválida: %v
install_success=Bienvenido! Estamos encantados de que hayas escogido Gogs, diviértete y cuídate.
@@ -137,6 +139,7 @@ issues.in_your_repos=En tus repositorios
[explore]
repos=Repositorios
users=Usuarios
organizations=Organizaciones
search=Buscar
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Su cuenta tiene prohibido ingresar al sistema, fovor contact
resent_limit_prompt=Lo sentimos, estás solicitando el reenvío del mail de activación con demasiada frecuencia. Por favor, espera 3 minutos.
has_unconfirmed_mail=Hola %s, tu correo electrónico (<b>%s</b>) no está confirmado. Si no has recibido un correo de confirmación o necesitas que lo enviemos de nuevo, por favor, haz click en el siguiente botón.
resend_mail=Haz click aquí para reenviar tu correo electrónico de activación
email_not_associate=Esta dirección de correo electrónico no esta asociada a ninguna cuenta.
send_reset_mail=Haga clic aquí para (re)enviar el correo para el restablecimiento de la contraseña
reset_password=Restablecer su contraseña
invalid_code=Lo sentimos, su código de confirmación ha expirado o no es valido.
@@ -189,6 +191,13 @@ TeamName=Nombre del equipo
AuthName=Nombre de autorización
AdminEmail=Correo electrónico del administrador
NewBranchName=Nuevo nombre de rama
CommitSummary=Resumen del commit
CommitMessage=Mensaje de commit
CommitChoice=Hacer commit de la elección
TreeName=Ruta del archivo
Content=Contenido
require_error=` no puede estar vacío.`
alpha_dash_error=` los caracteres deben ser Alfanumericos o dash(-_).`
alpha_dash_dot_error=` debe ser un caracter alfanumérivo válido, un guión alto o bajo (-_) o un signo de puntuación.`
@@ -262,8 +271,8 @@ change_username_prompt=Este cambio afectará a los enlaces que hacen referencia
continue=Continuar
cancel=Cancelar
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Buscar avatar por correo
federated_avatar_lookup=Búsqueda de Avatar Federado
enable_custom_avatar=Activar avatar personalizado
choose_new_avatar=Selecciona nuevo avatar
update_avatar=Actualizar configuración del avatar
@@ -330,6 +339,10 @@ access_token_deletion=Borrado de Token de Acceso Personal
access_token_deletion_desc=Si elimina este token de acceso personal la aplicación asociada perderá el permiso de acceso. ¿Desea continuar?
delete_token_success=¡El token de acceso personal ha sido eliminado con éxito! No se olvide de actualizar también las aplicaciones asociadas.
orgs.none=No eres un miembro de ninguna organización.
orgs.leave_title=Salir de una organización
orgs.leave_desc=Perderá el acceso a todos los repositorios y equipos después dejar la organización. ¿Desea continuar?
delete_account=Elimina tu cuenta
delete_prompt=La operación eliminará tu cuenta de forma permanente y ¡<strong>NO</strong> se puede deshacer!
confirm_delete_account=Confirmar Eliminación
@@ -350,7 +363,7 @@ fork_from=Crear un Fork desde
fork_visiblity_helper=No es posible cambiar la visibilidad de un Fork
repo_desc=Descripción
repo_lang=Idioma
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Seleccionar plantillas de .gitignore
license=Licencia
license_helper=Selecciona un fichero de licencia
readme=Readme
@@ -363,6 +376,7 @@ mirror_prune_desc=Remover referencias remotas que no existan remotamente
mirror_interval=Intervalo de la réplica (en horas)
mirror_address=Dirección de la réplica
mirror_address_desc=Por favor, incluya las credenciales de usuario necesarias en la dirección.
mirror_last_synced=Última sincronización
watchers=Seguidores
stargazers=Fans
forks=Forks
@@ -376,14 +390,14 @@ migrate_type=Tipo de migración
migrate_type_helper=Este repositorio será una <span class="text blue">réplica</span>
migrate_repo=Migrar Repositorio
migrate.clone_address=Clonar dirección
migrate.clone_address_desc=Puede ser una URL HTTP/HTTPS/GIT o una ruta local del servidor.
migrate.clone_address_desc=Esto puede ser una dirección URL HTTP/HTTPS/GIT.
migrate.clone_address_desc_import_local=También se le permite migrar un repositorio por la ruta del servidor local.
migrate.permission_denied=No te está permitido importar repositorios locales.
migrate.invalid_local_path=Rutal local inválida, no existe o no es un directorio.
migrate.failed=Migración fallida: %v
mirror_from=espejo de
forked_from=forked de
fork_from_self=¡No puedes crear un fork de un repositorio que ya es tuyo!
copy_link=Copiar
copy_link_success=¡Copiado!
copy_link_error=Presione ⌘ + C o Ctrl-C para copiar
@@ -401,7 +415,7 @@ create_new_repo_command=Crear un nuevo repositorio desde línea de comandos
push_exist_repo=Hacer Push de un repositorio existente desde línea de comandos
repo_is_empty=Este repositorio está vacío, por favor, ¡vuelva más tarde!
code=Código
files=Archivos
branch=Rama
tree=Árbol
filter_branch_and_tag=Filtrar por rama o etiqueta
@@ -418,9 +432,50 @@ file_history=Histórico
file_view_raw=Ver Raw
file_permalink=Permalink
file_too_large=Este archivo es demasiado grande para ser mostrado
video_not_supported_in_browser=Su navegador no soporta el tag video de HTML5.
editor.new_file=Nuevo archivo
editor.upload_file=Subir archivo
editor.edit_file=Editar archivo
editor.preview_changes=Vista previa de los cambios
editor.cannot_edit_non_text_files=Sólo puede editar archivos de texto
editor.edit_this_file=Editar este archivo
editor.must_be_on_a_branch=Debes estar en una rama para hacer o proponer cambios en este archivo
editor.fork_before_edit=Debes hacer un fork de este repositorio antes de editar el archivo
editor.delete_this_file=Eliminar este archivo
editor.must_have_write_access=Debes tener permisos de escritura para hacer o proponer cambios a este archivo
editor.file_delete_success=¡El archivo '%s' ha sido eliminado con éxito!
editor.name_your_file=Nombre de archivo...
editor.filename_help=Para añadir un directorio, simplemente escribelo y presiona /. Para eliminar un directorio, ve al principio del campo y presiona retroceso.
editor.or=o
editor.cancel_lower=cancelar
editor.commit_changes=Hacer commit de los cambios
editor.add_tmpl=Añadir '%s<filename>'
editor.add=Añadir '%s'
editor.update=Actualizar '%s'
editor.delete=Eliminar '%s'
editor.commit_message_desc=Añadir una descripción extendida opcional...
editor.commit_directly_to_this_branch=Hacer commit directamente en la rama <strong class="branch-name">%s</strong>.
editor.create_new_branch=Crear una <strong>nueva rama</strong> para este commit y hacer un pull request.
editor.new_branch_name_desc=Nombre de la rama nueva...
editor.cancel=Cancelar
editor.filename_cannot_be_empty=El nombre del archivo no puede estar vacío.
editor.branch_already_exists=La rama '%s' ya existe en este repositorio.
editor.directory_is_a_file=La entrada '%s' en el directorio padre es un archivo no un directorio en este repositorio.
editor.file_is_a_symlink=El archivo '%s' es un enlace simbólico que no puede ser modificado desde el editor de la web.
editor.filename_is_a_directory=El nombre del fichero '%s' es un directorio existente en este repositorio.
editor.file_editing_no_longer_exists=El archivo '%s' que estás editando ya no existe en este repositorio.
editor.file_changed_while_editing=El contenido del archivo ha sido modificado desde que empezó a editarlo. <a target="_blank" href="%s">Clic aquí</a> para ver qué ha sido modificado o <strong>presiona confirmar de nuevo</strong> para sobrescribir estos cambios.
editor.file_already_exists=Ya existe un archivo con nombre '%s' en este repositorio.
editor.no_changes_to_show=No existen cambios para mostrar.
editor.fail_to_update_file=Error al actualizar/crear el archivo '%s', error: %v
editor.add_subdir=Añadir subdirectorio...
editor.unable_to_upload_files=Error al subir archivos a '%s', error: %v
editor.upload_files_to_dir=Subir archivos a '%s'
commits.commit_history=Commit History
commits.commits=Commits
commits.search=Buscar Commits
commits.search=Buscar commits
commits.find=Buscar
commits.author=Autor
commits.message=Mensaje
@@ -444,6 +499,11 @@ issues.create=Crear incidencia
issues.new_label=Nueva Etiqueta
issues.new_label_placeholder=Nombre etiqueta...
issues.create_label=Crear etiqueta
issues.label_templates.title=Carga un conjunto predefinido de etiquetas
issues.label_templates.info=Tdavía no hay ninguna etiqueta. Puede hacer clic en el botón "Nueva etiqueta" para crear una o utilizar un conjunto predefinido abajo.
issues.label_templates.helper=Seleccionar un conjunto de etiquetas
issues.label_templates.use=Usar este conjunto de etiquetas
issues.label_templates.fail_to_load_file=Error al cargar el archivo de plantilla de etiqueta '%s': %v
issues.open_tab=%d abiertas
issues.close_tab=%d cerradas
issues.filter_label=Etiqueta
@@ -471,7 +531,7 @@ issues.next=Página Siguiente
issues.open_title=Abierta
issues.closed_title=Cerrada
issues.num_comments=%d comentarios
issues.commented_at='comentado <a href="#%s"> %s'</a>
issues.commented_at=`comentado <a href="#%s"> %s</a>`
issues.delete_comment_confirm=¿Seguro que deseas eliminar este comentario?
issues.no_content=Aún no existe contenido.
issues.close_issue=Cerrar
@@ -485,8 +545,7 @@ issues.commit_ref_at=`mencionada esta incidencia en un commit <a id="%[1]s" href
issues.poster=Autor
issues.collaborator=Colaborador
issues.owner=Propietario
issues.sign_up_for_free=Registro gratuito
issues.sign_in_require_desc=para unirse a esta conversación. ¿Ya dispone de una cuenta? <a href="%s">Inicie sesión para comentar</a>
issues.sign_in_require_desc=<a href="%s"> Inicie sesión</a> para unirse a esta conversación.
issues.edit=Editar
issues.cancel=Cancelar
issues.save=Guardar
@@ -501,6 +560,8 @@ issues.label_deletion=Borrado de Etiqueta
issues.label_deletion_desc=Al borrar la etiqueta su información será eliminada de todas las incidencias relacionadas. Desea continuar?
issues.label_deletion_success=Etiqueta borrada con éxito!
issues.num_participants=%d participantes
issues.attachment.open_tab='Haga clic para ver "%s" en una pestaña nueva'
issues.attachment.download=`Haga clic para descargar "%s"`
pulls.new=Nuevo Pull Request
pulls.compare_changes=Comparar cambios
@@ -518,8 +579,8 @@ pulls.tab_conversation=Conversación
pulls.tab_commits=Commits
pulls.tab_files=Archivos modificados
pulls.reopen_to_merge=Por favor reabra este Pull Request para proceder con la operación de fusionado.
pulls.merged=Fuisionado
pulls.has_merged=¡Este pull request se ha completado con éxito!
pulls.merged=Fusionado
pulls.has_merged=¡Este Pull Request se ha completado con éxito!
pulls.data_broken=Los datos de este pull request ya no están disponibles porque se ha eliminado la información del fork.
pulls.is_checking=Se está procediendo a la búsqueda de conflictos, por favor actualice la página en unos momentos.
pulls.can_auto_merge_desc=Este Pull Request puede ser fusionado automáticamente.
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Este Pull Request no puede ser fusionado automátic
pulls.cannot_auto_merge_helper=Por favor, fusiona manualmente para resolver los conflictos.
pulls.merge_pull_request=Fusionar Pull Request
pulls.open_unmerged_pull_exists=`Usted no puede realizar la operación de reapertura porque en estos momentos existe una solicitud de pull request (#%d) para el mismo repositorio con la misma información que se encuentra a la espera de aprobación`
pulls.delete_branch=Eliminar la rama
pulls.delete_branch_has_new_commits=La rama no se puede eliminar porque tiene nuevos commits después de la fusión.
milestones.new=Nuevo Milestone
milestones.open_tab=%d abiertas
@@ -577,21 +640,47 @@ settings.collaboration.admin=Administrador
settings.collaboration.write=Escritura
settings.collaboration.read=Lectura
settings.collaboration.undefined=Indefinido
settings.branches=Ramas
settings.default_branch=Rama predeterminada
settings.default_branch_desc=Se considera la rama «base» como la rama por defecto para commits de código, las solicitudes pull y edición en línea.
settings.update=Actualizar
settings.update_default_branch_success=¡La Rama por defecto de este repositorio ha sido actualizado con éxito!
settings.protected_branches=Ramas protegidas
settings.protected_branches_desc=Proteger ramas force pushing, de eliminación accidental y lista blanca de committers de código.
settings.choose_a_branch=Elegir una rama...
settings.branch_protection=Protección de la rama
settings.branch_protection_desc=Por favor, elija una opción de protección para la rama <b>%s</b>.
settings.protect_this_branch=Proteger esta rama
settings.protect_this_branch_desc=Desactivar force pushes y evite la eliminación.
settings.protect_require_pull_request=Requiere una solicitud pull, en lugar de un push directo
settings.protect_require_pull_request_desc=Active esta opción para deshabilitar un push directo a esta rama. Los commits tienen que ser empujados a otra rama no protegida y fusionados a esta rama a través de la solicitud pull.
settings.protect_whitelist_committers=Lista blanca de quienes pueden empujar a esta rama
settings.protect_whitelist_committers_desc=Añadir personas o equipos a la lista blanca de empuje directo a esta rama.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webhooks
settings.githooks=Git Hooks
settings.basic_settings=Configuración Básica
settings.mirror_settings=Configuración de réplica
settings.sync_mirror=Sincronizar ahora
settings.mirror_sync_in_progress=Sincronización de réplica en curso, por favor actualice la página en unos minutos.
settings.site=Sitio oficial
settings.update_settings=Actualizar configuración
settings.change_reponame_prompt=Este cambio afectará a los enlaces al repositorio.
settings.advanced_settings=Ajustes avanzados
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Activar sistema de wiki
settings.use_internal_wiki=Usar wiki integrada
settings.use_external_wiki=Usar Wiki externa
settings.external_wiki_url=URL externa de la Wiki
settings.external_wiki_url_desc=Los visitantes serán redireccionados a la URL cuando hagan click en la barra.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Habilitar rastreo de incidencias
settings.use_internal_issue_tracker=Usar rastreo de incidencias ligero incluido
settings.use_external_issue_tracker=Usar tracker externo de incidencias
settings.external_tracker_url=URL de seguimiento de problemas externos
settings.external_tracker_url_desc=Los visitantes serán redirigidos a la URL cuando hagan click en la barra.
settings.tracker_url_format=Formato URL del tracker de incidencias externo
settings.tracker_issue_style=Estilo de etiquetado del tracker externo de incidencias:
settings.tracker_issue_style.numeric=Numérico
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumérico
settings.tracker_url_format_desc=Puedes usar las plantillas <code>{user} {repo} {index}</code> para el nombre de usuario, nombre del repositorio e índice de la incidencia.
settings.pulls_desc=Habilitar Pull Requests para aceptar contribuciones públicas
settings.danger_zone=Zona de Peligro
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=El nuevo propietario tiene un repositorio con el mismo nombre.
settings.convert=Convertir en un repositorio normal
settings.convert_desc=Puedes convertir este repositorio en un repositorio normal. Este cambio no se puede deshacer.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Este usuario no podrá colaborar en este rep
settings.remove_collaborator_success=El colaborador ha sido eliminado.
settings.search_user_placeholder=Buscar usuario...
settings.org_not_allowed_to_be_collaborator=Las organizaciones no tiene permitido ser añadidas como colaboradores.
settings.user_is_org_member=El usuario es miembro de la organización, no puede ser añadido como colaborador.
settings.add_webhook=Añadir Webhook
settings.hooks_desc=Los Webhooks permiten a servicios externos recibir notificaciones cuando sucedan ciertos eventos en Gogs. Cuando sucedan los eventos especificados, enviaremos una petición POST a cada una de las URLs indicadas. Para obtener más información, consulta nuestra <a target="_blank" href="%s">Guía de Webhooks</a>.
settings.webhook_deletion=Eliminar Webhook
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Enviaremos una petición <code>POST</code> a la siguie
settings.payload_url=URL de Payload
settings.content_type=Tipo de contenido
settings.secret=Secreto
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Nombre de usuario
settings.slack_icon_url=URL de icono
settings.slack_color=Color
@@ -665,6 +755,8 @@ settings.event_send_everything=Necesito <strong>todo</strong>.
settings.event_choose=Déjeme elegir lo que necesito.
settings.event_create=Crear
settings.event_create_desc=Rama o etiqueta creada
settings.event_pull_request=Pull Request
settings.event_pull_request_desc=Pull request, abierta, cerrada, reabierta, editada, asignada, desasignada, con etiqueta actualizada, con etiqueta eliminada, o sincronizada.
settings.event_push=Push
settings.event_push_desc=Git push a un repositorio
settings.active=Activo
@@ -676,10 +768,12 @@ settings.delete_webhook=Borrar Webhook
settings.recent_deliveries=Envíos Recientes
settings.hook_type=Tipo de Hook
settings.add_slack_hook_desc=Añade integración con <a href="%s">Slack</a> a tu repositorio.
settings.add_discord_hook_desc=Añade integración con <a href="%s">Slack</a> a tu repositorio.
settings.slack_token=Token
settings.slack_domain=Dominio
settings.slack_channel=Canal
settings.deploy_keys=Claves de Despliegue
settings.deploy_keys_helper=<b>Gotcha!</b> Si usted está buscando agregar claves públicas personales, por favor, agréguelos en la <a href="%s%s"> configuración de la cuenta</a>.
settings.add_deploy_key=Añadir Clave de Despliegue
settings.deploy_key_desc=La clave de desarrollo tiene sólo acceso de lectura. No es igual que las claves SSH de las cuentas personales.
settings.no_deploy_keys=No has añadido ninguna clave de despliegue.
@@ -758,6 +852,7 @@ team_permission_desc=¿Qué nivel de permisos debería tener este equipo?
form.name_reserved=El nombre de la organización '%s' está reservado.
form.name_pattern_not_allowed=El patrón de nombre de la organización '%s' no está permitido.
form.team_name_reserved=El nombre de equipo '%s' está reservado.
settings=Configuración
settings.options=Opciones
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Ejecutar la recolección de basura en los repositorios
dashboard.git_gc_repos_success=Todos los repositorios han ejecutado correctamente el recolector de basuras.
dashboard.resync_all_sshkeys=Reescribir el fichero '.ssh/authorized_keys'(atención: se perderán las claves que no pertenezcan a Gogs)
dashboard.resync_all_sshkeys_success=Todas las claves públicas se han reescrito correctamente.
dashboard.resync_all_update_hooks=Reescribir todos los hooks de actualización de los repositorios (necesario cuando se modifica la ruta de configuración personalizada)
dashboard.resync_all_update_hooks_success=Todos los hooks de actualización de los repositorios se han reescrito correctamente.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Reinicializar todos los registros del repositorio que tienen archivos Git eliminados
dashboard.reinit_missing_repos_success=Todos los registros del repositorio con archivos Git eliminados han sido reinicializados con éxito.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Borrado de autenticación
auths.delete_auth_desc=Esta autenticación será eliminada. ¿Deseas continuar?
auths.still_in_used=Este método de autentificación aún es utilizado por algunos usuarios, por favor elimine o convierta estos usuarios a otro tipo de autentificación.
auths.deletion_success=¡La autenticación ha sido eliminada con éxito!
auths.login_source_exist=El origen de autenticación '%s' ya existe.
config.server_config=Configuración del servidor
config.app_name=Nombre de la Aplicación
@@ -981,10 +1077,9 @@ config.offline_mode=Modo Sin Conexión
config.disable_router_log=Deshabilitar Log del Router
config.run_user=Ejecutada como Usuario
config.run_mode=Modo de ejecución
config.repo_root_path=Ruta del Repositorio
config.git_version=Versión de Git
config.static_file_root_path=Ruta de los Ficheros Estáticos
config.log_file_root_path=Ruta de los Ficheros de Log
config.script_type=Tipo de Script
config.reverse_auth_user=Autenticación Inversa de Usuario
config.ssh_config=Configuración SSH
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Ruta del generador de claves ('ssh-keygen')
config.ssh_minimum_key_size_check=Tamaño mínimo de la clave de verificación
config.ssh_minimum_key_sizes=Tamaños de clave mínimos
config.repo_config=Configuración del repositorio
config.repo_root_path=Ruta del Repositorio
config.script_type=Tipo de Script
config.repo_force_private=Force Private
config.max_creation_limit=Limite máximo de creación
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Desactivar HTTP Git
config.enable_local_path_migration=Activar la migración de la ruta de acceso Local
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Configuración de la Base de Datos
config.db_type=Tipo
config.db_host=Host
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Tiempo de Vida de la Cookie
config.picture_config=Configuración de Imagen
config.picture_service=Servicio de Imágen
config.disable_gravatar=Desactivar Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Habilitar Avatares Federados
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Configuración de Git
config.git_disable_diff_highlight=Desactivar resaltado de sintaxis del Diff
config.git_max_diff_lines=Líneas de Diff máximas (por un solo archivo)
config.git_max_diff_line_characters=Carácteres de Diff máximos (para una sola línea)
config.git_max_diff_files=Máximo de archivos de Diff (que se mostrarán)
config.git_gc_args=Argumentos de GC
config.git_migrate_timeout=Tiempo de espera de migración
config.git_mirror_timeout=Tiempo de espera de actualización de réplicas
config.git_clone_timeout=Tiempo de espera de operación de clones
config.git_pull_timeout=Tiempo de espera de operación de pull
config.git_gc_timeout=Tiempo de espera de operación de GC
config.log_config=Configuración del Log
config.log_mode=Modo del Log
@@ -1131,7 +1236,7 @@ hours=%[2]s %[1]d horas
days=%[2]s %[1]d días
weeks=%[2]s %[1]d semanas
months=%[2]s %[1]d meses
years=%s %d años
years=%[2]s %[1]d años
raw_seconds=segundos
raw_minutes=minutos

View File

@@ -23,13 +23,13 @@ password=Salasana
re_type=Kirjoita uudelleen
captcha=Captcha
repository=Repo
repository=Repository
organization=Organisaatio
mirror=Peili
new_repo=Uusi repo
new_repo=Uusi repository
new_migrate=Uusi migraatio
new_mirror=Uusi peilaus
new_fork=Uusi haara reposta
new_fork=Uusi fork-repository
new_org=Uusi organisaatio
manage_org=Ylläpidä organisaatioita
admin_panel=Ylläpito paneeli
@@ -48,7 +48,7 @@ cancel=Peruuta
install=Asennus
title=Asennusvaiheet ottaessa ensi kertaa käyttöön
docker_helper=Jos käytät Gogsia Dockerin sisällä, ole hyvä ja lue <a target="_blank" href="%s">ohjeet</a> huolellisesti ennen kuin muutat mitään tältä sivulta!
requite_db_desc=Gogs tarvitsee MySQL, PostgreSQL, SQLite3 tai TiDB.
requite_db_desc=Gogs tarvitsee jonkin seuraavista: MySQL, PostgreSQL, SQLite3, MSSQL tai TiDB.
db_title=Tietokanta asetukset
db_type=Tietokanta tyyppi
host=Isäntä
@@ -58,9 +58,8 @@ db_name=Tietokannan nimi
db_helper=Ole hyvä ja käytä INNODB moottoria ja utf8_general_ci merkistöä MySQLssä.
ssl_mode=SSL tila
path=Polku
sqlite_helper=SQLite3 tai TiDB tietokanta polku. <br>Käytä absoluuttista polkua kun käynnistät palvelun.
err_empty_db_path=SQLite3 tai TiDB tietokanta polku ei voi olla tyhjä.
err_invalid_tidb_name=TiDB tietokannan nimessä ei voi olla merkkejä "." ja "-".
sqlite_helper=Tiedostopolku SQLite3 tietokantaan. <br>Käytä absoluuttista polkua ajaessasi palveluna.
err_empty_db_path=SQLite3 tietokantapolku ei voi olla tyhjä.
no_admin_and_disable_registration=Et voi poistaa käytöstä rekisteröintiä luomatta ylläpito tiliä.
err_empty_admin_password=Ylläpito salasana ei voi olla tyhjä.
@@ -70,11 +69,13 @@ app_name_helper=Laita organisaatiosi nimi tähän isolla ja kovaäänisesti!
repo_path=Repon juuren polku
repo_path_helper=Kaikki Git etä repot tullaan tallentamaan tähän hakemistoon.
run_user=Suorita käyttäjänä
run_user_helper=Käyttäjällä täytyy olla pääsy repo juuri polkuun ja suorittaa Gogs.
run_user_helper=Käyttäjällä täytyy olla oikeus repositoryn juuripolkuun. Käyttäjällä täytyy myös olla oikeus suorittaa Gogs.
domain=Verkkotunnus
domain_helper=Tämä vaikuttaa SSH klooni URLeihin.
ssh_port=SSH portti
ssh_port_helper=Portti numero jota SSH palvelimesi käyttää, jätä tyhjäksi poistaaksesi käytöstä SSH toiminnon.
use_builtin_ssh_server=Käytä sisäänrakennettua SSH palvelinta
use_builtin_ssh_server_popup=Käynnistä sisäänrakennettu SSH-palvelin Git-operaatioille, järjestelmän SSH-palvelusta erottautumiseksi.
http_port=HTTP portti
http_port_helper=Portti numero jota sovellus tulee kuuntelemaan.
app_url=Sovellus URL
@@ -96,8 +97,8 @@ offline_mode=Ota käyttöön Offline tila
offline_mode_popup=Poista käytöstä CDN myös tuotanto tilassa, kaikki resurssi tiedostot palvellaan paikallisesti.
disable_gravatar=Poista käytöstä Gravatar palvelu
disable_gravatar_popup=Poista käytöstä Gravatar ja mukautetut lähteet, kaikki profiilikuvat on käyttäjien palvelimelle lähettämiä tai oletus.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Käytä ulkopuolista profiilikuvien hakua
federated_avatar_lookup_popup=Ota ulkopuolinen profiilikuvien haku käyttöön käyttääksesi avoimen lähdekoodin libravatar-palvelua.
disable_registration=Poista käytöstä itse-rekisteröinti
disable_registration_popup=Poista käyttäjän itse rekisteröinti, vain ylläpito voi luoda tilejä.
enable_captcha=Ota käyttöön Captcha
@@ -116,6 +117,7 @@ sqlite3_not_available=Julkaisu versiosi ei tue SQLite3, ole hyvä ja lataa viral
invalid_db_setting=Tietokanta asetus ei ole oikea: %v
invalid_repo_path=Repo juuri polku on virheellinen: %v
run_user_not_match=Suoritus käyttäjä ei ole nykyinen käyttäjä: %s -> %s
invalid_smtp_from=SMTP From kenttä ei ole kelvollinen: %v
save_config_failed=Asetuksien tallennus epäonnistui: %v
invalid_admin_setting=Ylläpito tili asetus virheellinen: %v
install_success=Tervetuloa! Olemme iloisia että valitsit Gogs, pidä hauskaa ja pidä huolta itsestäsi.
@@ -126,7 +128,7 @@ uname_holder=Käyttäjätunnus tai sähköposti
password_holder=Salasana
switch_dashboard_context=Vaihda kojelaudan kontekstia
my_repos=Reponi
show_more_repos=Show more repositories...
show_more_repos=Näytä lisää repoja...
collaborative_repos=Yhteistyö repot
my_orgs=Organisaationi
my_mirrors=Peilini
@@ -136,8 +138,9 @@ issues.in_your_repos=Repoissasi
[explore]
repos=Repot
users=Users
search=Search
users=Käyttäjät
organizations=Organisaatiot
search=Hae
[auth]
create_new_account=Luo uusi tili
@@ -151,18 +154,17 @@ forget_password=Unohtuiko salasana?
sign_up_now=Tarvitsetko tilin? Rekisteröidy nyt.
confirmation_mail_sent_prompt=Uusi varmistus sähköposti on lähetetty osoitteeseen <b>%s</b>, ole hyvä ja tarkista saapuneet seuraavan %d tunnin sisällä saadaksesi rekisteröintiprosessin valmiiksi.
active_your_account=Aktivoi tilisi
prohibit_login=Login Prohibited
prohibit_login_desc=Your account is prohibited to login, please contact site admin.
prohibit_login=Kirjautuminen kielletty
prohibit_login_desc=Käyttäjätilisi kirjautuminen on estetty. Ota yhteys sivuston ylläpitäjään.
resent_limit_prompt=Sori, olet jo tilannut aktivointi sähköpostin lähiaikoina. Ole hyvä ja odota 3 minuuttia ja yritä sitten uudelleen.
has_unconfirmed_mail=Hei %s, sinulla on varmistamaton sähköposti osoite (<b>%s</b>). Jos et ole saanut varmistus sähköpostia tai tarvitset uudelleenlähetyksen, ole hyvä ja klikkaa allaolevaa painiketta.
resend_mail=Klikkaa tästä uudelleenlähettääksesi aktivointi sähköpostisi
email_not_associate=Tätä sähköposti osoitetta ei ole liitetty mihinkään tiliin.
send_reset_mail=Klikkaa tästä (uudelleen)lähettääksesi salasanan nollaus sähköpostin
reset_password=Nollaa salasanasi
invalid_code=Sori, varmistuskoodisi on vanhentunut tai väärä.
reset_password_helper=Klikkaa tästä nollataksesi salasanasi
password_too_short=Salasanan pituus ei voi olla vähemmän kuin 6 merkkiä.
non_local_account=Non-local accounts cannot change passwords through Gogs.
non_local_account=Vain paikallisten käyttäjätilien salasanan vaihto onnistuu Gogsin kautta.
[mail]
activate_account=Ole hyvä ja aktivoi tilisi
@@ -189,6 +191,13 @@ TeamName=Tiimin nimi
AuthName=Luvan nimi
AdminEmail=Ylläpito sähköposti
NewBranchName=Uuden haaran nimi
CommitSummary=Commitin yhteenveto
CommitMessage=Commitin viesti
CommitChoice=Commitin valinta
TreeName=Tiedostopolku
Content=Sisältö
require_error=` ei voi olla tyhjä.`
alpha_dash_error=` täytyy olla kirjaimia tai numeroita tai väliviiva(-_) merkkejä.`
alpha_dash_dot_error=` täytyy olla kirjaimia tai numeroita tai väliviiva(-_) tai piste merkkejä.`
@@ -225,7 +234,7 @@ org_still_own_repo=Tällä organisaatiolla on yhä omistajuus repoon, sinun täy
target_branch_not_exist=Kohde branchia ei ole olemassa.
[user]
change_avatar=Change your avatar
change_avatar=Vaihda profiilikuvasi
join_on=Liitytty
repositories=Repot
activity=Julkinen toiminta
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Käyttäjätunnus mallia '%s' ei ole sallittu.
[settings]
profile=Profiili
password=Salasana
avatar=Avatar
avatar=Profiilikuva
ssh_keys=SSH avaimet
social=Sosiaaliset tilit
applications=Sovellukset
@@ -262,8 +271,8 @@ change_username_prompt=Tämä muutos vaikuttaa tapaan kuinka linkit liittyvät t
continue=Jatka
cancel=Peruuta
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Hae profiilikuva sähköpostiosoitteen avulla
federated_avatar_lookup=Ulkopuolinen profiilikuvan haku
enable_custom_avatar=Ota käyttöön mukautettu profiilikuva
choose_new_avatar=Valitse uusi profiilikuva
update_avatar=Päivitä profiilikuva asetus
@@ -330,6 +339,10 @@ access_token_deletion=Henkilökohtaisen pääsymerkin poisto
access_token_deletion_desc=Tämän henkilökohtaisen pääsymerkin poistaminen poistaa kaikki siihen liittyvät pääsyt sovellukseen. Haluatko jatkaa?
delete_token_success=Henkilökohtainen pääsymerkki on poistettu onnistuneesti! Älä unohda päivittää sovellustasi myös.
orgs.none=Et ole yhdenkään organisaation jäsen.
orgs.leave_title=Poistu organisaatiosta
orgs.leave_desc=Menetät oikeudet kaikkiin niihin repoihin ja tiimeihin joihin organisaatio on sinulle oikeudet antanut. Haluatko varmasti jatkaa?
delete_account=Poista tilisi
delete_prompt=Toiminto poistaa tilisi pysyvästi ja tätä <strong>EI VOI</strong> peruuttaa myöhemmin!
confirm_delete_account=Varmista poisto
@@ -350,7 +363,7 @@ fork_from=Forkkaa lähteestä
fork_visiblity_helper=Et voi muuttaa forkatun repon näkyvyyttä.
repo_desc=Kuvaus
repo_lang=Kieli
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Valitse .gitignore malli
license=Lisenssi
license_helper=Valitse lisenssitiedosto
readme=Lueminut-tiedosto
@@ -358,11 +371,12 @@ readme_helper=Valitse Lueminut-malli
auto_init=Alusta tämä repo valituilla tiedostoilla ja mallilla
create_repo=Luo repo
default_branch=Oletus branch
mirror_prune=Prune
mirror_prune_desc=Remove any remote-tracking references that no longer exist on the remote
mirror_prune=Karsi
mirror_prune_desc=Poista kaikki paikalliset seurantahaarat joiden vastaavia etähaaroja ei ole enää olemassa
mirror_interval=Peili aikaväli (tuntia)
mirror_address=Peili osoite
mirror_address_desc=Ole hyvä ja liitä osoitteeseen tarvittavat käyttäjätunnukset.
mirror_last_synced=Synkronoitu viimeksi
watchers=Tarkkailijat
stargazers=Tähtiharrastajat
forks=Haarat
@@ -376,14 +390,14 @@ migrate_type=Siirtotyyppi
migrate_type_helper=Tämä repo tulee olemaan <span class="text blue">peili</span>
migrate_repo=Siirrä repo
migrate.clone_address=Kloonaa osoite
migrate.clone_address_desc=Tämä voi olla HTTP/HTTPS/GIT URL tai paikallisen palvelimen polku.
migrate.clone_address_desc=Tämä voi olla HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=Paikallisen palvelimen kansiopolun käyttö repon migraatiossa on myös salittua.
migrate.permission_denied=Sinun ei sallita tuovan paikallisia repoja.
migrate.invalid_local_path=Virheellinen paikallinen polku, ei ole olemassa tai ei ole hakemisto.
migrate.failed=Siirto epäonnistui: %v
mirror_from=peilaus alkaen
forked_from=forkattu lähteestä
fork_from_self=Et voi forkata repoa jonka jo omistat!
copy_link=Kopioi
copy_link_success=Kopioitu!
copy_link_error=Paina ⌘-C tai Ctrl-C kopioidaksesi
@@ -401,7 +415,7 @@ create_new_repo_command=Luo uusi repo komentoriviltä
push_exist_repo=Työnnä olemassaoleva repo komentoriviltä
repo_is_empty=Tämä repo on tyhjä, ole hyvä ja tule takaisin myöhemmin!
code=Koodi
files=Tiedostot
branch=Branch
tree=Puu
filter_branch_and_tag=Suodata haara tai tagi
@@ -417,8 +431,49 @@ file_raw=Raaka
file_history=Historia
file_view_raw=Näytä raaka
file_permalink=Pysyvä linkki
file_too_large=This file is too large to be shown
file_too_large=Tämä tiedosto on liian suuri näytettäväksi
video_not_supported_in_browser=Selaimesi ei tue HTML5 video-tagia.
editor.new_file=Uusi tiedosto
editor.upload_file=Liitä tiedosto
editor.edit_file=Muokkaa tiedostoa
editor.preview_changes=Muutosten esikatselu
editor.cannot_edit_non_text_files=Voit editoida vain tekstitiedostoja
editor.edit_this_file=Muokkaa tätä tiedostoa
editor.must_be_on_a_branch=Haara täytyy olla valittuna jotta voit tehdä tai ehdottaa muutoksia tähän tiedostoon
editor.fork_before_edit=Sinun täytyy forkata tämä repo ennenkuin voit muokata tiedostoa
editor.delete_this_file=Poista tämä tiedosto
editor.must_have_write_access=Sinulla on kirjoitusoikeus tai ehdottaa muutoksia tiedostoon
editor.file_delete_success=Tiedosto "%s" on poistettu onnistuneesti!
editor.name_your_file=Nimeä tiedostosi...
editor.filename_help=Lisää hakemisto, kirjoita se ja paina /. Poista hakemisto, siirry kentän alkuun ja paina ASKELPALAUTINTA.
editor.or=tai
editor.cancel_lower=peruuta
editor.commit_changes=Vahvista muutokset
editor.add_tmpl=Lisää '%s/<filename>'
editor.add=Lisää "%s"
editor.update=Päivitä '%s'
editor.delete=Poista "%s"
editor.commit_message_desc=Lisää pidennetty selite (valinnainen)...
editor.commit_directly_to_this_branch=Committaa suoraan haaraan <strong class="branch-name">%s</strong>.
editor.create_new_branch=Luo <strong>uusi haara</strong> tälle commitille tai aloita pull-pyyntö.
editor.new_branch_name_desc=Uuden haaran nimi...
editor.cancel=Peruuta
editor.filename_cannot_be_empty=Tiedostonimi ei voi olla tyhjä.
editor.branch_already_exists=Haara '%s' on jo olemassa tässä repossa.
editor.directory_is_a_file=Annettu nimi '%s' on tiedosto, ei kansio.
editor.file_is_a_symlink=Tiedosto '%s' on symlinkki jota ei voi muokata web-selaimesta.
editor.filename_is_a_directory=Kansio nimeltä '%s' on jo olemassa tässä repossa.
editor.file_editing_no_longer_exists=Tiedostoa '%s' jota olet muokkaamassa ei ole enää olemassa tässä repossa.
editor.file_changed_while_editing=Tiedoston sisältöä on muutettu aloittamisesi jälkeen. <a target="_blank" href="%s">Klikkaa tästä</a> nähdäksesi mitä on muutettu tai <strong>paina commit uudelleen</strong> ylikirjoittaaksesi muutokset.
editor.file_already_exists=Tiedosto '%s' on jo olemassa tässä repossa.
editor.no_changes_to_show=Ei muutoksia näytettäväksi.
editor.fail_to_update_file=Tiedoston '%s' päivitys/luonti epäonnistui virheeseen: %v
editor.add_subdir=Lisää alikansio...
editor.unable_to_upload_files=Tiedostojen lataus epäonnistui kansioon '%s' virheellä: %v
editor.upload_files_to_dir=Lataa tiedostoja kansioon '%s'
commits.commit_history=Commit History
commits.commits=Commitit
commits.search=Etsi commiteista
commits.find=Etsi
@@ -444,6 +499,11 @@ issues.create=Ilmoita ongelma
issues.new_label=Uusi tunniste
issues.new_label_placeholder=Tunnisteen nimi...
issues.create_label=Luo tunniste
issues.label_templates.title=Lataa ennaltamääritelty tarrajoukko
issues.label_templates.info=Tarroja ei ole. Voit luoda uuden klikkaamalla "Uusi tarra" tai käyttää ennaltamääriteltyä tarrajoukkoa alta.
issues.label_templates.helper=Valitse tarrajoukko
issues.label_templates.use=Käytä tätä tarrajoukkoa
issues.label_templates.fail_to_load_file=Tarramallin lataus epäonnistui tiedostosta '%s': %v
issues.open_tab=%d avoinna
issues.close_tab=%d suljettu
issues.filter_label=Tunniste
@@ -471,8 +531,8 @@ issues.next=Seuraava
issues.open_title=Avoinna
issues.closed_title=Suljettu
issues.num_comments=%d kommenttia
issues.commented_at=`commented <a href="#%s">%s</a>`
issues.delete_comment_confirm=Are you sure you want to delete this comment?
issues.commented_at=`kommentoitu <a href="#%s">%s</a>`
issues.delete_comment_confirm=Haluatko varmasti poistaa tämän kommentin?
issues.no_content=Sisältöä ei vielä ole.
issues.close_issue=Sulje
issues.close_comment_issue=Kommentoi ja sulje
@@ -485,8 +545,7 @@ issues.commit_ref_at=`viittasi tähän ongelmaan commitissa <a id="%[1]s" href="
issues.poster=Tekijä
issues.collaborator=Yhteistyökumppani
issues.owner=Omistaja
issues.sign_up_for_free=Rekisteröidy ilmaiseksi
issues.sign_in_require_desc=liittyäksesi tähän keskusteluu. Onko sinulla jo tili? <a href="%s">Kirjaudu sisään kommentoidaksesi</a>
issues.sign_in_require_desc=<a href="%s">Kirjaudu sisään</a> osallistuaksesi tähän keskusteluun.
issues.edit=Muokkaa
issues.cancel=Peruuta
issues.save=Tallenna
@@ -501,6 +560,8 @@ issues.label_deletion=Tunnisteen poistaminen
issues.label_deletion_desc=Tämän tunnisteen poistaminen poistaa sen tiedot kaikista siihen liittyvistä ongelmista. Haluatko jatkaa?
issues.label_deletion_success=Tunniste on poistettu onnistuneesti!
issues.num_participants=%d osallistujaa
issues.attachment.open_tab=`Klikkaa nähdäksesi "%s" uudessa välilehdessä`
issues.attachment.download=`Klikkaa ladataksesi "%s"`
pulls.new=Uusi pull pyyntö
pulls.compare_changes=Vertaa muutoksia
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Tätä pull-pyyntöä ei voi yhdistää automaattis
pulls.cannot_auto_merge_helper=Ole hyvä ja yhdistä manuaalisesti konfliktien ratkaisemiseksi.
pulls.merge_pull_request=Yhdistä Pull-pyyntö
pulls.open_unmerged_pull_exists=`Et voi suorittaa uudelleenavaus toimintoa koska on jo olemassa pull-pyyntö (#%d) samasta reposta samoilla yhdistämistiedoilla ja odottaa yhdistämistä.`
pulls.delete_branch=Poista haara
pulls.delete_branch_has_new_commits=Haaraa ei voida poistaa koska siinä on uusia committeja mergen jälkeen.
milestones.new=Uusi merkkipaalu
milestones.open_tab=%d avoinna
@@ -573,32 +636,59 @@ wiki.last_updated=Viimeksi päivitetty: %s
settings=Asetukset
settings.options=Valinnaiset
settings.collaboration=Yhteistyö
settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.collaboration.admin=Ylläpitäjä
settings.collaboration.write=Kirjoita
settings.collaboration.read=Lue
settings.collaboration.undefined=Määrittelemätön
settings.branches=Haarat
settings.default_branch=Oletushaara
settings.default_branch_desc=Oletushaaraa käytetään "pohjahaarana" commiteille, pull-pyynnöille ja sivustolla toteutetuille muokkauksille.
settings.update=Päivitä
settings.update_default_branch_success=Repositoryn oletushaara päivitetty!
settings.protected_branches=Suojatut haarat
settings.protected_branches_desc=Suojaa haaroja pakotetulta push-operaatiolta, vahinkopoistamisilta ja sallitun listan committereilta.
settings.choose_a_branch=Valitse haara...
settings.branch_protection=Haaran suojaus
settings.branch_protection_desc=Valitse suojausasetus haaralle <b>%s</b>.
settings.protect_this_branch=Suojaa tämä haara
settings.protect_this_branch_desc=Kiellä pakoteut push-operaatiot ja estä poistaminen.
settings.protect_require_pull_request=Vaadi pull-pyyntö suoran push-operaation sijaan
settings.protect_require_pull_request_desc=Estä suorat push-operaatiot tähän haaraan. Commitit täytyy pushata ei-suojattuun haaraan ja yhdistää tähän haaraan pull-pyynnön kautta.
settings.protect_whitelist_committers=Lista sallituista, jotka voivat pushata tähän haaraan
settings.protect_whitelist_committers_desc=Lisää ihmisiä tai tiimejä sallittujen listaan, jotka voivat pushata suoraan tähän haaraan.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webkoukut
settings.githooks=Git koukut
settings.basic_settings=Perusasetukset
settings.mirror_settings=Peilauksen asetukset
settings.sync_mirror=Synkronisoi nyt
settings.mirror_sync_in_progress=Peilaus käynnissä. Päivitä sivu minuutin kuluttua uudelleen.
settings.site=Virallinen sivusto
settings.update_settings=Päivitä asetukset
settings.change_reponame_prompt=Tämä muutos vaikuttaa siihen miten linkit liittyvät repoon.
settings.advanced_settings=Lisäasetukset
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Ota wiki käyttöön
settings.use_internal_wiki=Käytä sisäänrakennettua wikiä
settings.use_external_wiki=Käytä ulkoista wikiä
settings.external_wiki_url=Ulkoinen Wiki URL
settings.external_wiki_url_desc=Vierailijat uudelleenohjataan URL-osoitteeseen kun he klikkaavat välilehteä.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Ota virheenseuranta käyttöön
settings.use_internal_issue_tracker=Käytä sisäänrakennettua kevyttä virheenseurantaa
settings.use_external_issue_tracker=Käytä ulkoista vikaseurantaa
settings.external_tracker_url=Ulkoisen virheenseurannan URL
settings.external_tracker_url_desc=Vierailijat ohjataan URL-osoitteeseen kun he klikkaavat välilehteä.
settings.tracker_url_format=Ulkoisen vikaseurannan URL muoto
settings.tracker_issue_style=External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric=Numeric
settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_issue_style=Ulkoisen virheenseurannan nimeämistyyli:
settings.tracker_issue_style.numeric=Numeerinen
settings.tracker_issue_style.alphanumeric=Aakkosnumeerinen
settings.tracker_url_format_desc=Voit käyttää paikkamerkkiä <code>{user} {repo} {index}</code> käyttäjänimelle, reponimelle ja vikanumerolle.
settings.pulls_desc=Ota käyttöön pull-pyynnöt salliaksesi julkiset koodilahjoitukset
settings.danger_zone=Vaaravyöhyke
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Uudella omistajalla on jo samanniminen repo. Ole hyvä ja valitse toinen nimi.
settings.convert=Muunna tavalliseksi repoksi
settings.convert_desc=Voit muuntaa tämän peilin tavalliseksi repoksi. Tätä ei voi peruuttaa.
@@ -618,7 +708,7 @@ settings.delete=Poista tämä repo
settings.delete_desc=Huomio, kun kerran poistat repon, niin ei ole paluuta. Varmista että haluat todella tehdä tämän.
settings.delete_notices_1=- Tätä toimintoa <strong>EI VOI</strong> peruuttaa myöhemmin.
settings.delete_notices_2=- Tämä toiminto poistaa pysyvästi kaikki tästä reposta, mukaanlukien Git tiedot, ongelmat, kommentit ja yhteistyökumppanien pääsyoikeudet.
settings.delete_notices_fork_1=- All forks will become independent after deletion.
settings.delete_notices_fork_1=- Kaikki haarat muuttuvat itsenäisiksi poiston jälkeen.
settings.deletion_success=Repo on poistettu onnistuneesti!
settings.update_settings_success=Repom asetukset on päivitetty onnistuneesti.
settings.transfer_owner=Uusi omistaja
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Tällä käyttäjällä ei tule enää olema
settings.remove_collaborator_success=Yhteistyökumppani on poistettu.
settings.search_user_placeholder=Etsi käyttäjä...
settings.org_not_allowed_to_be_collaborator=Yhteistyökumppaniksi ei voi lisätä organisaatiota.
settings.user_is_org_member=Käyttäjä on organisaation jäsen, jota ei voi lisätä yhteistyökumppaniksi.
settings.add_webhook=Lisää webkoukku
settings.hooks_desc=Webkoukut muistuttavat paljon perus HTTP POST tapahtuma laukaisimia. Aina kun jotain tapahtuu Gogsissa, käsittelemme ilmoituksen määrittäämääsi kohteeseen. Lisätietoja <a target="_blank" href="%s">webkoukku oppaassa</a>.
settings.webhook_deletion=Poista webkoukku
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Gogs lähettää <code>POST</code> requestin määritt
settings.payload_url=Payload URL
settings.content_type=Sisältötyyppi
settings.secret=Salaus
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Käyttäjätunnus
settings.slack_icon_url=Kuvakkeen URL
settings.slack_color=Väri
@@ -665,6 +755,8 @@ settings.event_send_everything=Tarvitsen <strong>kaiken</strong>.
settings.event_choose=Haluan valita, mitä tarvitsen.
settings.event_create=Luo
settings.event_create_desc=Branch, tai tagi luotu
settings.event_pull_request=Pull-pyyntö
settings.event_pull_request_desc=Pull-pyyntö avattu, suljettu, uudelleenavattu, muokattu, annettu, anto vedottu, tarra päivitetty, tarra poistettu tai synkronoitu.
settings.event_push=Push
settings.event_push_desc=Git push repoon
settings.active=Aktiivinen
@@ -676,10 +768,12 @@ settings.delete_webhook=Poista webkoukku
settings.recent_deliveries=Viimeisimmät toimitukset
settings.hook_type=Koukkutyyppi
settings.add_slack_hook_desc=Lisää <a href="%s">Slack</a> integraatio repoosi.
settings.add_discord_hook_desc=Lisää <a href="%s">Discord</a> integraatio repositoryysi.
settings.slack_token=Pääsymerkki
settings.slack_domain=Verkkotunnus
settings.slack_channel=Kanava
settings.deploy_keys=Deploy avaimet
settings.deploy_keys_helper=<b>Huomautus!</b> Voit lisätä julkiset avaimesi <a href="%s%s">tilisi asetuksissa</a>.
settings.add_deploy_key=Lisää deploy avain
settings.deploy_key_desc=Deploy avaimilla on vain luku-oikeudet. Ne eivät ole sama asia kuin henkilökohtaiset SSH avaimet.
settings.no_deploy_keys=Et ole lisännyt yhtään deploy avainta.
@@ -702,8 +796,8 @@ diff.show_unified_view=Yhdistetty näkymä
diff.stats_desc=<strong>%d muutettua tiedostoa</strong> jossa <strong>%d lisäystä</strong> ja <strong>%d poistoa</strong>
diff.bin=BIN
diff.view_file=Näytä tiedosto
diff.file_suppressed=File diff suppressed because it is too large
diff.too_many_files=Some files were not shown because too many files changed in this diff
diff.file_suppressed=Tiedoston diff-näkymää rajattu, sillä se on liian suuri
diff.too_many_files=Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä
release.releases=Julkaisut
release.new_release=Uusi julkaisu
@@ -734,7 +828,7 @@ release.deletion=Version poisto
release.deletion_desc=Tämän version poistaminen poistaa vastaavan Git tagin. Haluatko jatkaa?
release.deletion_success=Versio on poistettu onnistuneesti!
release.tag_name_already_exist=Versio tällä taginimellä on jo olemassa.
release.tag_name_invalid=Tag name is not valid.
release.tag_name_invalid=Tagin nimi ei kelpaa
release.downloads=Lataukset
[org]
@@ -758,6 +852,7 @@ team_permission_desc=Mikä käyttöoikeustaso tuliti tällä tiimillä olla?
form.name_reserved=Organisaation nimi '%s' on varattu.
form.name_pattern_not_allowed=Organisaation nimi mallia '%s' ei ole sallittu.
form.team_name_reserved=Tiimin nimi '%s' on varattu.
settings=Asetukset
settings.options=Valinnaiset
@@ -812,7 +907,7 @@ teams.write_permission_desc=Tämä tiimi myöntää <strong>kirjoitusoikeuden</s
teams.admin_permission_desc=Tämä tiimi myöntää <strong>ylläpito-oikeuden</strong>: jäsenet voivat lukea, pushata, ja lisätä yhteistyökumppaneita tiimin repoihin.
teams.repositories=Tiimin repot
teams.search_repo_placeholder=Etsi repo...
teams.add_team_repository=Lisää tiimirepo
teams.add_team_repository=Lisää tiimi-repository
teams.remove_repo=Poista
teams.add_nonexistent_repo=Repo jota yrität lisätä ei ole vielä olemassa, ole hyvä ja luo se ensin.
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Suorita roskienkeruu repoille
dashboard.git_gc_repos_success=Kaikki repot ovat tehneet roskienkeruun onnistuneesti.
dashboard.resync_all_sshkeys=Uudelleenkirjoita '.ssh/authorized_keys' tiedosto (varoitus: ei-Gogs avaimet menetetään)
dashboard.resync_all_sshkeys_success=Kaikki julkiset avaimet on uudelleenkirjoitettu onnistuneesti.
dashboard.resync_all_update_hooks=Uudelleenkirjoita kaikki päivityskoukut repoista (tarvitaan mukautetun asetuspolun muuttuessa)
dashboard.resync_all_update_hooks_success=Kaikki repojen päivityskoukut on uudelleenkirjoitettu onnistuneesti.
dashboard.resync_all_hooks=Uudelleensynkronoi kaikkien repositoryjen "pre-receive, update ja post-receive" hookit.
dashboard.resync_all_hooks_success=Kaikkien repositoryjen "pre-receive, update ja post-receive" hookit synkronoitu.
dashboard.reinit_missing_repos=Resetoi kaikki repo tietueet jotka menettivät Git tiedostoja
dashboard.reinit_missing_repos_success=Kaikki repo tietueet jotka menettivät Git tiedostoja on resetoitu onnistuneesti.
@@ -902,7 +997,7 @@ users.edit_account=Muokkaa tiliä
users.max_repo_creation=Maksimi repojen määrä jonka voi luoda
users.max_repo_creation_desc=(Aseta -1 käyttääksesi globaalia oletusrajaa)
users.is_activated=Tämä tili on aktivoitu
users.prohibit_login=This account is prohibited to login
users.prohibit_login=Tämän käyttäjätilin sisäänkirjautuminen on estetty
users.is_admin=Tällä tilillä on ylläpito-oikeudet
users.allow_git_hook=Tällä tilillä on oikeudet luoda Git koukkuja
users.allow_import_local=Tällä tilillä on oikeudet tuoda paikallisia repoja
@@ -933,7 +1028,7 @@ auths.enabled=Käytössä
auths.updated=Päivitetty
auths.auth_type=Todennustyyppi
auths.auth_name=Todennusnimi
auths.security_protocol=Security Protocol
auths.security_protocol=Suojausprotokolla
auths.domain=Verkkotunnus
auths.host=Isäntä
auths.port=Portti
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Todennuksen poistaminen
auths.delete_auth_desc=Tämä todennus poistetaan, haluatko jatkaa?
auths.still_in_used=Tämä todennus on yhä joidenkin käyttäjien käytössä, ole hyvä ja poista tai muunna nämä käyttäjät toiselle kirjaututumistyypille ensin.
auths.deletion_success=Todennus on poistettu onnistuneesti!
auths.login_source_exist=Kirjautumislähde '%s' on jo olemassa
config.server_config=Palvelin asetukset
config.app_name=Sovellus nimi
@@ -981,10 +1077,9 @@ config.offline_mode=Offline-tila
config.disable_router_log=Poista käytöstä reitittimen loki
config.run_user=Suorita käyttäjänä
config.run_mode=Suoritustila
config.repo_root_path=Repon juuren polku
config.git_version=Git versio
config.static_file_root_path=Staattisen tiedoston juuren polku
config.log_file_root_path=Lokitiedoston juuren polku
config.script_type=Komentosarjan tyyppi
config.reverse_auth_user=Käänteinen todennus käyttäjä
config.ssh_config=SSH asetukset
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Keygen ('ssh-keygen') polku
config.ssh_minimum_key_size_check=Avaimen vähimmäiskoko tarkistus
config.ssh_minimum_key_sizes=Avaimen vähimmäiskoot
config.repo_config=Repositoryn asetukset
config.repo_root_path=Repon juuren polku
config.script_type=Komentosarjan tyyppi
config.repo_force_private=Pakota yksityiseksi
config.max_creation_limit=Enimmäis-luontiraja
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Tietokannan asetukset
config.db_type=Tyyppi
config.db_host=Isäntä
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Evästeen elinikä
config.picture_config=Kuva asetukset
config.picture_service=Kuva palvelu
config.disable_gravatar=Poista käytöstä Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Käytä ulkopuolisia profiilikuvia
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Git asetukset
config.git_disable_diff_highlight=Poista koodinväritys käytöstä diff-näkymässä
config.git_max_diff_lines=Diff-rivien enimmäismäärä (yhdelle tiedostolle)
config.git_max_diff_line_characters=Enimmäismäärä merkkejä (yhdellä diff-rivillä)
config.git_max_diff_files=Enimmäismäärä tiedostoja (diff-näkymässä)
config.git_gc_args=Roskienkeruun parametrit
config.git_migrate_timeout=Migraatio aikakatkaistiin
config.git_mirror_timeout=Peilauspäivitys aikakatkaistiin
config.git_clone_timeout=Kloonaus aikakatkaistiin
config.git_pull_timeout=Pull-operaatio aikakatkaistiin
config.git_gc_timeout=Roskienkeruu aikakatkaistiin
config.log_config=Loki asetukset
config.log_mode=Loki tila

View File

@@ -48,7 +48,7 @@ cancel=Annuler
install=Installation
title=Instructions pour la première exécution
docker_helper=Si vous exécutez Gogs grâce à Docker, merci de lire la <a target="_blank" href="%s">procédure</a> attentivement avant de modifier quoi que ce soit sur cette page !
requite_db_desc=Gogs requiert MySQL, PostgreSQL, SQLite3 ou TiDB.
requite_db_desc=Gogs requiert MySQL, PostgreSQL, SQLite3, MSSQL ou TiDB.
db_title=Paramètres de la base de données
db_type=Type de base de données
host=Hôte
@@ -58,9 +58,8 @@ db_name=Nom de base de données
db_helper=Veuillez utiliser le moteur INNODB avec le jeu de caractères utf8_general_ci pour MySQL.
ssl_mode=Mode SSL
path=Emplacement
sqlite_helper=Le chemin du fichier de base de données SQLite3 ou TiDB. <br>Utilisez un chemin absolu lorsque vous démarrez en tant que service.
err_empty_db_path=Le chemin de la base de données SQLite3 ou TiDB ne peut être vide.
err_invalid_tidb_name=Le nom de la base de données TiDB ne peut contenir les caractères "." ou "-".
sqlite_helper=Le chemin du fichier de base de données SQLite3. <br>Utilisez un chemin absolu lorsque vous démarrez en tant que service.
err_empty_db_path=Le chemin de la base de données SQLite3 ne peut être vide.
no_admin_and_disable_registration=Vous ne pouvez pas désactiver l'enregistrement sans créer un compte administrateur.
err_empty_admin_password=Le mot de passe du compte administrateur ne peut être vide.
@@ -75,6 +74,8 @@ domain=Domaine
domain_helper=Cela affecte les doublons d'URL SSH.
ssh_port=Port SSH
ssh_port_helper=Numéro de port utilisé par votre serveur SSH, le laisser vide pour désactiver la fonctionnalité.
use_builtin_ssh_server=Utiliser le serveur SSH incorporé
use_builtin_ssh_server_popup=Démarrer le serveur SSH incorporé pour les opérations Git afin de le distinguer du démon SSH système.
http_port=Port HTTP
http_port_helper=Numéro de port que l'application écoutera.
app_url=URL de l'application
@@ -96,8 +97,8 @@ offline_mode=Activer le mode hors connexion
offline_mode_popup=Désactiver le CDN, même en production. Toutes les ressources seront distribuées en local.
disable_gravatar=Désactiver le service Gravatar
disable_gravatar_popup=Désactiver Gravatar et les sources personnalisées, tous les avatars sont téléchargés par les utilisateurs ou par défaut.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Activer les recherches d'avatars unifiés
federated_avatar_lookup_popup=Activer la recherche unifiée d'avatars en utilisant le service open source unifié basé sur libravatar.
disable_registration=Désactiver le formulaire d'inscription
disable_registration_popup=Désactiver le formulaire d'inscription, seuls les administrateurs peuvent créer des comptes.
enable_captcha=Activez le Captcha
@@ -115,16 +116,17 @@ test_git_failed=Le test de la commande "git" a échoué : %v
sqlite3_not_available=Votre version publiée ne prend pas en charge SQLite3. Veuillez télécharger la version binaire officielle à cette adresse %s.
invalid_db_setting=Paramètres de base de données incorrects : %v
invalid_repo_path=Chemin vers la racine du dépôt invalide : %v
run_user_not_match=L'utilisateur entré n'est pas l'utilisateur actuel : %s -> %s
run_user_not_match=L'utilisateur d'exécution saisi n'est pas l'utilisateur d'exécution actuel : %s -> %s
invalid_smtp_from=Le champ SMTP Provenant de n'est pas valide: %v
save_config_failed=La sauvegarde de la configuration a échoué : %v
invalid_admin_setting=Paramètres du compte administrateur invalides : %v
install_success=Bienvenue ! Nous sommes heureux que vous ayez choisi Gogs, amusez-vous et prenez soin de vous.
invalid_log_root_path=Le chemin principal des fichiers logs est invalide: %v
invalid_log_root_path=L'emplacement racine des fichiers logs est invalide : %v
[home]
uname_holder=Nom d'utilisateur ou e-mail
password_holder=Mot de passe
switch_dashboard_context=Basculer le Contexte du Tableau de Bord
switch_dashboard_context=Basculer le contexte du tableau de bord
my_repos=Mes dépôts
show_more_repos=Afficher plus de dépôts...
collaborative_repos=Dépôts collaboratifs
@@ -137,6 +139,7 @@ issues.in_your_repos=Dans vos dépôts
[explore]
repos=Dépôts
users=Utilisateurs
organizations=Organisations
search=Rechercher
[auth]
@@ -144,7 +147,7 @@ create_new_account=Créer un nouveau compte
register_hepler_msg=Déjà enregistré ? Connectez-vous !
social_register_hepler_msg=Déjà enregistré ? Associez-le !
disable_register_prompt=Désolé, les enregistrements ont été désactivés. Veuillez contacter l'administrateur du site.
disable_register_mail=Désolé, la Confirmation par Mail des Enregistrements a été désactivée.
disable_register_mail=Désolé, la confirmation par e-mail des enregistrements a été désactivée.
remember_me=Se souvenir de moi
forgot_password=Mot de passe oublié
forget_password=Mot de passe oublié ?
@@ -156,19 +159,18 @@ prohibit_login_desc=Votre compte est interdit de se connecter, contactez ladm
resent_limit_prompt=Désolé, vos tentatives d'activation sont trop fréquentes. Veuillez réessayer dans 3 minutes.
has_unconfirmed_mail=Bonjour %s, votre adresse e-mail (<b>%s</b>) n'a pas été confirmée. Si vous n'avez reçu aucun mail de confirmation ou souhaitez renouveler l'envoi, cliquez sur le bouton ci-dessous.
resend_mail=Cliquez ici pour renvoyer un mail de confirmation
email_not_associate=Cette adresse e-mail n'est associée à aucun compte.
send_reset_mail=Cliquez ici pour (r)envoyer le mail de réinitialisation du mot de passe
reset_password=Réinitialiser le mot de passe
invalid_code=Désolé, votre code de confirmation est invalide ou a expiré.
reset_password_helper=Cliquez ici pour réinitialiser votre mot de passe
password_too_short=Le mot de passe doit contenir 6 caractères minimum.
non_local_account=Les comptes non-locaux ne peuvent pas changer leur mot de passe via Gogs.
non_local_account=Les comptes non locaux ne peuvent pas changer leur mot de passe via Gogs.
[mail]
activate_account=Veuillez activer votre compte
activate_email=Veuillez vérifier votre adresse e-mail
reset_password=Réinitialiser votre mot de passe
register_success=Succès de l'enregistrement, Bienvenue
register_success=Inscription réussie, bienvenue
register_notify=Bienvenue à bord
[modal]
@@ -179,19 +181,26 @@ modify=Modifier
[form]
UserName=Nom d'utilisateur
RepoName=Nom du dépôt
Email=Adresse E-mail
Email=Adresse e-mail
Password=Mot de passe
Retype=Confirmez le mot de passe
SSHTitle=Nom de la clé SSH
HttpsUrl=URL HTTPS
PayloadUrl=URL des Données Utiles
TeamName=Nom d'équipe
PayloadUrl=URL des données utiles
TeamName=Nom de l'équipe
AuthName=Nom d'autorisation
AdminEmail=E-mail de l'administrateur
require_error=` Ne peut être vide `
alpha_dash_error=` doivent être des caractères alpha, numeriques ou console (-_) valides `
alpha_dash_dot_error=` doivent être des caractères alpha, numeriques, console (-_) valides ou des points `
NewBranchName=Nouveau nom de la branche
CommitSummary=Résumé du commit
CommitMessage=Message de commit
CommitChoice=Choix de commit
TreeName=Chemin du fichier
Content=Contenu
require_error=` ne peut pas être vide.`
alpha_dash_error=` doivent être des caractères alpha, numériques ou tirets (-_) valides.`
alpha_dash_dot_error=` doivent être des caractères alpha, numériques, tirets (-_) valides ou des points.`
size_error=` doit être à la taille de %s.`
min_size_error=` %s caractères minimum `
max_size_error=` %s caractères maximum `
@@ -262,8 +271,8 @@ change_username_prompt=Cette modification affectera la manière dont les liens s
continue=Continuer
cancel=Annuler
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Recherche d'avatar par email
federated_avatar_lookup=Recherche d'avatars unifiés
enable_custom_avatar=Activer l'avatar personnalisé
choose_new_avatar=Sélectionner un nouvel avatar
update_avatar=Mettre à jour l'avatar
@@ -330,6 +339,10 @@ access_token_deletion=Suppression du jeton d'accès
access_token_deletion_desc=Supprimer ce jeton d'accès supprimera tous les accès de l'application. Voulez-vous continuer ?
delete_token_success=Le jeton d'accèsa été supprimé avec succès ! N'oubliez pas de mettre à jour vos applications.
orgs.none=Vous n'êtes membre d'aucune organisation.
orgs.leave_title=Quitter une organisation
orgs.leave_desc=Vous perdrez accès à tous les dépôts et équipes après que vous ayez quitté l'organisation. Voulez-vous continuer ?
delete_account=Supprimer votre compte
delete_prompt=Votre compte sera définitivement supprimé et cette opération est <strong>irréversible</strong> !
confirm_delete_account=Confirmer la suppression
@@ -350,7 +363,7 @@ fork_from=Fork de
fork_visiblity_helper=La visibilité d'un fork ne peut pas être modifiée.
repo_desc=Description
repo_lang=Langue
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Choisissez un modèle de fichier .gitignore
license=Licence
license_helper=Sélectionner un fichier de licence
readme=Fichier Readme
@@ -363,6 +376,7 @@ mirror_prune_desc=Supprimez toute référence de suivi à distance qui n'existe
mirror_interval=Intervalle du miroir (heure)
mirror_address=Adresse du miroir
mirror_address_desc=Veuillez inclure les informations d'identification nécessaires dans l'adresse.
mirror_last_synced=Dernière synchronisation
watchers=Observateurs
stargazers=Stargazers
forks=Forks
@@ -376,14 +390,14 @@ migrate_type=Type de migration
migrate_type_helper=Ce dépôt sera un <span class="text blue"> miroir</span>
migrate_repo=Migrer le dépôt
migrate.clone_address=Adresse du clone
migrate.clone_address_desc=Cela peut être une URL HTTP/HTTPS/GIT ou un chemin d'accès local.
migrate.clone_address_desc=Cela peut être une URL HTTP/HTTPS/GIT.
migrate.clone_address_desc_import_local=Vous êtes aussi autorisé à migrer un dépôt via un chemin local du serveur.
migrate.permission_denied=Vous n'êtes pas autorisé à importer des dépôts locaux.
migrate.invalid_local_path=Chemin local non valide, non existant ou n'étant pas un dossier.
migrate.failed=Echec de migration: %v
mirror_from=miroir de
forked_from=forké depuis
fork_from_self=Vous ne pouvez pas forker un dépôt que vous possédez déja !
copy_link=Copier
copy_link_success=Copié!
copy_link_error=Appuyez sur ⌘-C ou Ctrl-C pour copier
@@ -401,7 +415,7 @@ create_new_repo_command=Créer un nouveau dépôt en ligne de commande
push_exist_repo=Soumettre un dépôt existant par ligne de commande
repo_is_empty=Ce dépôt est vide, veuillez revenir plus tard !
code=Code
files=Fichiers
branch=Branche
tree=Aborescence
filter_branch_and_tag=Filtrer une branche ou un tag
@@ -418,7 +432,48 @@ file_history=Historique
file_view_raw=Voir le Raw
file_permalink=Lien permanent
file_too_large=Ce fichier est trop gros pour être afficher
video_not_supported_in_browser=Votre navigateur ne supporte pas la balise video HTML5.
editor.new_file=Nouveau fichier
editor.upload_file=Téléverser un fichier
editor.edit_file=Modifier fichier
editor.preview_changes=Aperçu des modifications
editor.cannot_edit_non_text_files=Impossible de modifier les fichiers non-texte
editor.edit_this_file=Modifier ce fichier
editor.must_be_on_a_branch=Vous devez être sur une branche pour appliquer ou proposer des modifications à ce fichier
editor.fork_before_edit=Vous devez fourcher ce dépôt avant de modifier le fichier
editor.delete_this_file=Supprimer ce fichier
editor.must_have_write_access=Vous devez avoir un accès en écriture pour appliquer ou proposer des modifications à ce fichier
editor.file_delete_success=Fichier '%s' a été supprimé avec succès!
editor.name_your_file=Nommez votre fichier...
editor.filename_help=Pour ajouter un répertoire, il suffit de le taper puis d'appuyer sur /. Pour supprimer un répertoire, aller au début du champ et appuyerz sur retour arrière.
editor.or=ou
editor.cancel_lower=annuler
editor.commit_changes=Commit les modifications
editor.add_tmpl=Ajouter '%s/<filename>'
editor.add=Ajouter '%s'
editor.update=Mettre à jour '%s'
editor.delete=Supprimer '%s'
editor.commit_message_desc=Ajouter une optionnelle description détaillée...
editor.commit_directly_to_this_branch=Soumettre directement à la branche <strong class="branch-name">%s</strong>.
editor.create_new_branch=Créer une <strong>nouvelle branche</strong> pour cette validation et envoyer une nouvelle pull request.
editor.new_branch_name_desc=Nouveau nom de la branche...
editor.cancel=Annuler
editor.filename_cannot_be_empty=Nom de fichier ne peut pas être vide.
editor.branch_already_exists=La branche '%s' existe déjà dans ce dépôt.
editor.directory_is_a_file=L'entrée '%s' dans le chemin daccès parent est un fichier pas un répertoire dans ce dépôt.
editor.file_is_a_symlink=Le fichier « %s » est un lien symbolique qui ne peut être modifié depuis l'éditeur web.
editor.filename_is_a_directory=Le nom de fichier '%s' existe déjà dans ce dépot.
editor.file_editing_no_longer_exists=Le fichier '%s' que vous modifiez n'existe plus dans le dépôt.
editor.file_changed_while_editing=Le contenu du fichier à changé depuis que vous avez commencé à l'éditer. <a target="_blank" href="%s">Cliquez ici</a> pour voir ce qui à été modifié ou <strong>appuyez sur commit encore une fois</strong> pour remplacer ces changements.
editor.file_already_exists=La branche '%s' existe déjà dans ce dépôt.
editor.no_changes_to_show=Il ny a aucun changement à afficher.
editor.fail_to_update_file=Échec lors de la mise à jour/création du fichier '%s' avec lerreur : %v
editor.add_subdir=Ajouter un sous-répertoire...
editor.unable_to_upload_files=Échec lors de l'envoie du fichier '%s' avec lerreur : %v
editor.upload_files_to_dir=Transférer les fichiers vers '%s'
commits.commit_history=Historique des commits
commits.commits=Commits
commits.search=Rechercher des commits
commits.find=Trouver
@@ -432,18 +487,23 @@ issues.new=Nouveau ticket
issues.new.labels=Etiquettes
issues.new.no_label=Pas d'étiquette
issues.new.clear_labels=Effacer les étiquettes
issues.new.milestone=Étape
issues.new.no_milestone=Pas d'étape
issues.new.clear_milestone=Effacer l'étape
issues.new.open_milestone=Ouvrir l'étape
issues.new.milestone=Jalon
issues.new.no_milestone=Aucun jalon
issues.new.clear_milestone=Effacer le jalon
issues.new.open_milestone=Ouvrir un jalon
issues.new.closed_milestone=Jalons fermés
issues.new.assignee=Affecté à
issues.new.clear_assignee=Supprimer les assignataires
issues.new.no_assignee=Pas d'assignataire
issues.create=Créer un rapport de problème
issues.create=Créer un ticket
issues.new_label=Nouvelle étiquette
issues.new_label_placeholder=Nom de l'étiquette...
issues.create_label=Créer une étiquette
issues.label_templates.title=Charger un ensemble prédéfini d'étiquettes
issues.label_templates.info=Il n'y a pas encore d'étiquettes. Vous pouvez cliquer sur le bouton "Nouveau Label" ci-dessus pour créer une ou utiliser un ensemble prédéfini ci-dessous.
issues.label_templates.helper=Sélectionnez un ensemble d'étiquettes
issues.label_templates.use=Utilisez ce jeu d'étiquettes
issues.label_templates.fail_to_load_file=Impossible de charger le fichier de modèle étiquette '%s' : %v
issues.open_tab=%d Ouvert
issues.close_tab=%d Fermé
issues.filter_label=Étiquette
@@ -479,14 +539,13 @@ issues.close_comment_issue=Commenter et fermer
issues.reopen_issue=Réouvrir
issues.reopen_comment_issue=Commenter et réouvrir
issues.create_comment=Créer un commentaire
issues.closed_at=`fermé à <a id="%[1]s"href="#%[1]s"> %[2]s"</a>`
issues.closed_at=`fermé à <a id="%[1]s"href="#%[1]s"> %[2]s</a>`
issues.reopened_at=`réouvert à <a id="%[1]s" href="#%[1]s"> %[2]s</a>`
issues.commit_ref_at=`a référencé ce problème à partir d'un commit <a id="%[1]s" href="#%[1]s"> %[2]s</a>`
issues.poster=Publier
issues.collaborator=Collaborateur
issues.owner=Propriétaire
issues.sign_up_for_free=Inscrivez-vous gratuitement
issues.sign_in_require_desc=pour rejoindre cette conversation. Vous avez déjà un compte ? <a href="%s">Connectez-vous commenter</a>
issues.sign_in_require_desc=<a href="%s">Connectez-vous</a> pour rejoindre cette conversation.
issues.edit=Modifier
issues.cancel=Annuler
issues.save=Enregistrer
@@ -501,6 +560,8 @@ issues.label_deletion=Suppression du Label
issues.label_deletion_desc=Cette opération supprimera également toutes les informations relatives aux tickets. Voulez-vous continuer ?
issues.label_deletion_success=Label supprimé avec succès !
issues.num_participants=%d Participants
issues.attachment.open_tab=`Cliquez ici pour voir '%s' dans un nouvel onglet`
issues.attachment.download=`Cliquez pour télécharger "%s"`
pulls.new=Nouvelle Pull Request
pulls.compare_changes=Comparer les changements
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Cette pull request ne peut être fusionnée automat
pulls.cannot_auto_merge_helper=Fusionner manuellement afin de résoudre les conflits.
pulls.merge_pull_request=Fusionner la Pull Request
pulls.open_unmerged_pull_exists=`Vous ne pouvez effectuer une réouverture car il y a déjà une pull-request ouverte (#%d) depuis le même dépôt avec les mêmes informations de fusion et est en attente de fusion.`
pulls.delete_branch=Supprimer la branche
pulls.delete_branch_has_new_commits=La branche ne peut pas être supprimée car de nouveaux commits ont été effectuées après la fusion.
milestones.new=Nouveau Jalon
milestones.open_tab=%d Ouvert
@@ -577,21 +640,47 @@ settings.collaboration.admin=Administrateur
settings.collaboration.write=Écrire
settings.collaboration.read=Lire
settings.collaboration.undefined=Indéfini
settings.branches=Branches
settings.default_branch=Branche par défaut
settings.default_branch_desc=La branche par défaut est considérée comme la branche « originale » pour les commits de code, les requêtes de fusion et l'édition en ligne.
settings.update=Actualiser
settings.update_default_branch_success=La branche par défaut de ce dépôt a bien été mise à jour.
settings.protected_branches=Branches protégées
settings.protected_branches_desc=Protéger les branches du push forcé, de la suppression accidentelle et des publicateurs de code en liste blanche.
settings.choose_a_branch=Choisir une branche…
settings.branch_protection=Protection de branche
settings.branch_protection_desc=Sélectionnez les options de protection pour la branche <b>%s</b>.
settings.protect_this_branch=Protéger cette branche
settings.protect_this_branch_desc=Interdire les push forcés et empêcher la suppression.
settings.protect_require_pull_request=Exiger une requête de fusion plutôt qu'un push immédiat
settings.protect_require_pull_request_desc=Activez cette option pour empêcher la publication immédiate vers cette branche. Les commits devront être publiés vers une autre branche (non protégée) et fusionnée dans cette branche avec une requête de fusion.
settings.protect_whitelist_committers=Liste blanche de personnes pouvant publier sur cette branche
settings.protect_whitelist_committers_desc=Ajouter des personnes ou des équipes à la liste blanche de publication directe vers cette branche.
settings.protect_whitelist_users=Utilisateurs qui peuvent pousser sur cette branche
settings.protect_whitelist_search_users=Rechercher des utilisateurs
settings.protect_whitelist_teams=Les équipes pour lesquelles les membres peuvent pousser sur cette branche
settings.protect_whitelist_search_teams=Rechercher des équipes
settings.update_protect_branch_success=Les options de protection de cette branches ont été mises à jour avec succès.
settings.hooks=Webhooks
settings.githooks=Git Hooks
settings.basic_settings=Paramètres de base
settings.mirror_settings=Réglages Miroir
settings.sync_mirror=Synchroniser maintenant
settings.mirror_sync_in_progress=Synchronisation du miroir en cours, merci de rafraîchir la page dans une minute environ.
settings.site=Site officiel
settings.update_settings=Valider
settings.change_reponame_prompt=Ce changement affectera comment les liens sont reliés avec le dépôt.
settings.advanced_settings=Paramètres avancés
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Activer le wiki
settings.use_internal_wiki=Utiliser le wiki interne
settings.use_external_wiki=Utiliser un wiki externe
settings.external_wiki_url=URL Wiki externe
settings.external_wiki_url_desc=Les visiteurs seront redirigés vers cette URL lorsqu'ils cliqueront sur l'onglet.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Activer le système de tickets
settings.use_internal_issue_tracker=Utiliser le système simplifié de tickets interne
settings.use_external_issue_tracker=Utiliser un bug-tracker externe
settings.external_tracker_url=Adresse de l'issue tracker externe
settings.external_tracker_url_desc=Les visiteurs seront redirigés vers cette URL lorsqu'ils cliqueront sur l'onglet.
settings.tracker_url_format=Format d'URL du bug tracker
settings.tracker_issue_style=Style de nommage des bugs du tracker externe :
settings.tracker_issue_style.numeric=Numérique
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumérique
settings.tracker_url_format_desc=Vous pouvez utiliser l'espace réservé <code>{user} {repo} {index}</code> pour le nom d'utilisateur, le nom du dépôt et le numéro de bug.
settings.pulls_desc=Activer les pull requests pour accepter les contributions publiques
settings.danger_zone=Zone de danger
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Le nouveau propriétaire a déjà un dépôt nommé ainsi.
settings.convert=Convertir en dépôt ordinaire
settings.convert_desc=Vous pouvez convertir ce miroir en dépôt ordinaire. Cela ne peut pas être inversée.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Cet utilisateur n'aura plus accès pour coll
settings.remove_collaborator_success=Collaborateur supprimé.
settings.search_user_placeholder=Rechercher un utilisateur...
settings.org_not_allowed_to_be_collaborator=Une organisation n'est pas autorisée à être ajoutée en tant que collaborateur.
settings.user_is_org_member=Cet utilisateur ne peut pas être ajouté en tant que collaborateur car il fait partie d'une organisation.
settings.add_webhook=Ajouter un Webhook
settings.hooks_desc=Les Webhooks sont des déclencheurs de POST HTTP . Lorsque qu'un événement se produit dans Gogs, une notification sera envoyée vers l'hôte cible préalablement spécifié. Apprenez-en davantage dans le <a target="_blank" href="%s">Guide des Webhooks</a>.
settings.webhook_deletion=Supprimer le Webhook
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Une requête <code>POST</code> sera transmise vers l'U
settings.payload_url=URL des Données Utiles
settings.content_type=Type de contenu
settings.secret=Confidentiel
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Nom d'utilisateur
settings.slack_icon_url=URL de l'icône
settings.slack_color=Couleur
@@ -665,6 +755,8 @@ settings.event_send_everything=J'ai besoin de <strong>tout</strong>.
settings.event_choose=Permettez-moi de choisir ce dont j'ai besoin.
settings.event_create=Créer
settings.event_create_desc=Branche, ou Tag créé
settings.event_pull_request=Pull Request
settings.event_pull_request_desc=Pull request ouvert, fermé, rouvert, édité, attribuée, non attribuées, étiquette mise à jour, étiquette désactivée ou synchronisé.
settings.event_push=Push
settings.event_push_desc=Git push vers un dépôt
settings.active=Actif
@@ -676,10 +768,12 @@ settings.delete_webhook=Supprimer le Webhook
settings.recent_deliveries=Livraisons récentes
settings.hook_type=Type de Hook
settings.add_slack_hook_desc=Intégrer <a href="%s"> Slack</a> à votre dépôt.
settings.add_discord_hook_desc=Ajouter l'intégration de <a href="%s">Discord</a> à votre dépôt.
settings.slack_token=Jeton
settings.slack_domain=Domaine
settings.slack_channel=Canal
settings.deploy_keys=Clés de déploiement
settings.deploy_keys_helper=<b>Gotcha commun !</b> Si vous cherchez à ajouter des clés publiques personnelles, ajoutez-les dans vos <a href="%s%s">paramètres de compte</a>.
settings.add_deploy_key=Ajouter une Clé de Déploiement
settings.deploy_key_desc=Déployer une clé uniquement en lecture seule. Il ne s'agit pas des clés ssh de compte personnel.
settings.no_deploy_keys=Vous n'avez ajouté aucune clé de déploiement.
@@ -758,6 +852,7 @@ team_permission_desc=Quel niveau d'accès cette équipe devrait-elle posséder ?
form.name_reserved=Le nom d'organisation '%s' est réservé.
form.name_pattern_not_allowed=Motif '%s' interdit pour les noms d'organisation.
form.team_name_reserved=Le nom d'équipe « %s » est réservé.
settings=Paramètres
settings.options=Options
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Collecter les déchets des dépôts
dashboard.git_gc_repos_success=Tous les dépôts ont effectué la collecte avec succès.
dashboard.resync_all_sshkeys=Ré-écrire le fichier '.ssh/authorized_keys' (attention : les clés hors-Gogs vont être perdues)
dashboard.resync_all_sshkeys_success=Toutes les clés publiques ont été ré-écrites avec succès.
dashboard.resync_all_update_hooks=Ré-écrire tous les hooks de mises à jour des dépôts (requis quand le chemin de la configuration personnalisé est modifié)
dashboard.resync_all_update_hooks_success=Tous les hooks de mises à jour des dépôts ont été ré-écris avec succès.
dashboard.resync_all_hooks=Re-synchroniser les crochets pre-receive, update et post-receive de tous les dépôts.
dashboard.resync_all_hooks_success=Tous les crochets pre-receive, update et post-receive ont bien été resynchronisés.
dashboard.reinit_missing_repos=Réinitialiser tous les dépôts qui ont perdu des fichiers Git
dashboard.reinit_missing_repos_success=Tous les enregistrements de dépôts qui ont perdu des fichiers Git ont été réinitialisés avec succès.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Suppression de l'authentification
auths.delete_auth_desc=Cette authentification va être supprimée. voulez-vous continuer ?
auths.still_in_used=Cette authentification est encore utilisée par d'autres utilisateurs, supprimez-les ou convertir ces utilisateurs vers un autre type de session, avant.
auths.deletion_success=L'authentification a été supprimée avec succès !
auths.login_source_exist=La source de connexion « %s » existe déjà.
config.server_config=Configuration du Serveur
config.app_name=Nom de l'application
@@ -981,10 +1077,9 @@ config.offline_mode=Mode hors-ligne
config.disable_router_log=Désactiver la Journalisation du Routeur
config.run_user=Utilisateur système
config.run_mode=Mode d'Éxécution
config.repo_root_path=Emplacement des Dépôts
config.git_version=Version de Git
config.static_file_root_path=Chemin statique des fichiers racines
config.log_file_root_path=Emplacement Racine du Fichier Journal
config.script_type=Type de Script
config.reverse_auth_user=Annuler l'Authentification de l'Utilisateur
config.ssh_config=Configuration SSH
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Chemin vers le générateur de clefs ("ssh-keygen")
config.ssh_minimum_key_size_check=Vérification de la longueur de clé minimale
config.ssh_minimum_key_sizes=Tailles de clé minimales
config.repo_config=Configuration du dépôt
config.repo_root_path=Emplacement des Dépôts
config.script_type=Type de Script
config.repo_force_private=Privé forcé
config.max_creation_limit=Limite de création maximale
config.preferred_licenses=Licences préférées
config.disable_http_git=Désactiver Git HTTP
config.enable_local_path_migration=Activer la migration de chemin locale
config.commits_fetch_concurrency=Concurrence des récupérations de commits
config.db_config=Configuration de la Base de Données
config.db_type=Type
config.db_host=Hôte
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Expiration du cookie
config.picture_config=Configuration d'Image
config.picture_service=Service d'Imagerie
config.disable_gravatar=Désactiver Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Activer les avatars unifiés
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Configuration de Git
config.git_disable_diff_highlight=Désactiver la surbrillance syntaxique de Diff
config.git_max_diff_lines=Lignes de Diff Max (pour un seul fichier)
config.git_max_diff_line_characters=Nombre max de caractères de Diff (pour une seule ligne)
config.git_max_diff_files=Nombre max de fichiers de Diff (à afficher)
config.git_gc_args=Arguments de GC
config.git_migrate_timeout=Délai imparti pour une migration
config.git_mirror_timeout=Délai imparti pour mettre à jour le miroir
config.git_clone_timeout=Délai imparti pour l'opération "Clone"
config.git_pull_timeout=Délai imparti pour l'opération "Pull"
config.git_gc_timeout=Délai imparti pour l'opération "GC"
config.log_config=Configuration du Journal
config.log_mode=Mode du journal
@@ -1100,8 +1205,8 @@ notices.delete_success=Notifications système supprimées avec succès.
[action]
create_repo=a créé le dépôt <a href="%s">%s</a>
rename_repo=rebaptisé le dépôt de <code>%[1]s</code> à <a href="%[2]s">%[3]s</a>
commit_repo=a soumis à <a href="%[1]s/src/%[2]s">%[3]s</a> sur <a href="%[1]s">%[4]s</a>
rename_repo=a rebaptisé le dépôt de <code>%[1]s</code> vers <a href="%[2]s">%[3]s</a>
commit_repo=a commité dans <a href="%[1]s/src/%[2]s">%[3]s</a> sur <a href="%[1]s">%[4]s</a>
create_issue=`a ouvert un problème <a href="%s/issues/%s">%s#%[2]s</a>`
close_issue=`tickets clos <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue=`tickets ré-ouverts <a href="%s/issues/%s">%s#%[2]s</a>`
@@ -1115,23 +1220,23 @@ push_tag=a soumis le tag <a href="%s/src/%s">%[2]s</a> sur <a href="%[1]s">%[3]s
compare_commits=Comparer ces %d commits
[tool]
ago=auparavant
from_now=à partir de maintenant
ago=il y a
from_now=dans
now=maintenant
1s=1 seconde %s
1m=1 minute %s
1h=1 heure %s
1d=1 jour %s
1w=1 semaine %s
1mon=1 mois %s
1y=1 an %s
seconds=%d secondes %s
minutes=%d minutes %s
hours=%d heures %s
days=%d jours %s
weeks=%d semaines %s
months=%d mois %s
years=%d ans %s
1s=%s 1 seconde
1m=%s 1 minute
1h=%s 1 heure
1d=%s 1 jour
1w=%s 1 semaine
1mon=%s 1 mois
1y=%s 1 an
seconds=%[2]s %[1]d secondes
minutes=%[2]s %[1]d minutes
hours=%[2]s %[1]d heures
days=%[2]s %[1]d jours
weeks=%[2]s %[1]d semaines
months=%[2]s %[1]d mois
years=%[2]s %[1]d ans
raw_seconds=secondes
raw_minutes=minutes

1248
conf/locale/locale_gl-ES.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -48,7 +48,7 @@ cancel=Annulla
install=Installazione
title=Passi d'installazione per il primo avvio
docker_helper=Se stai utilizzando Gogs su Docker, per favore leggi le <a target="_blank" href="%s">Linee guida</a> con attenzione prima di cambiare qualcosa su questa pagina!
requite_db_desc=Gogs necessita MySQL, PostgreSQL, SQLite3 o TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Impostazioni Database
db_type=Tipo di database
host=Host
@@ -58,9 +58,8 @@ db_name=Nome del database
db_helper=Utilizza il motore INNODB con codifica utf8_general_ci per MySQL.
ssl_mode=Modalità SSL
path=Percorso
sqlite_helper=Il path assoluto per il database SQLite3 o TiDB. <br>Per favore usa il path assoluto quando lo avvii come servizio.
err_empty_db_path=Il percorso file del database SQLite3 o TiDB non può essere vuoto.
err_invalid_tidb_name=Il nome del database TiDB non ammette caratteri "." e "-".
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Non puoi disabilitare la registrazione senza aver creato un amministratore.
err_empty_admin_password=La password dell'amministratore non puo' essere vuota.
@@ -75,6 +74,8 @@ domain=Dominio
domain_helper=Questo influisce sugli URL per il clonaggio via SSH.
ssh_port=Porta SSH
ssh_port_helper=Numero di porta utilizzato dal server SSH, lasciare vuoto per disabilitare l'integrazione SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=Porta HTTP
http_port_helper=Porta di ascolto dell'applicazione.
app_url=URL Applicazione
@@ -96,8 +97,8 @@ offline_mode=Abilita Modalità Offline
offline_mode_popup=Disabilita il CDN anche in modalità produttiva, tutte le risorse saranno servite localmente.
disable_gravatar=Disattiva il servizio Gravatar
disable_gravatar_popup=Disabilita Gravatar e sorgenti customizzate, tutti gli avatar vengono caricati dagli utenti o come predefinito.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Abilita Federated Avatars
federated_avatar_lookup_popup=Abilita ricerca dell'avatar nel servizio libravatar Federated Avatars.
disable_registration=Disabilita Registrazione Manuale
disable_registration_popup=Disabilita la registrazione manuale degli utenti, solo gli amministratori possono creare account.
enable_captcha=Abilita Captcha
@@ -116,17 +117,18 @@ sqlite3_not_available=Questa versione non supporta SQLite3, si prega di scaricar
invalid_db_setting=La configurazione del database non è corretta: %v
invalid_repo_path=Percorso root del repository invalido: %v
run_user_not_match=Run user non è l'utente corrente: %s -> %s
invalid_smtp_from=Campo SMTP From non valido: %v
save_config_failed=Fallito il salvataggio della configurazione: %v
invalid_admin_setting=Impostazioni account Admin non valide: %v
install_success=Benvenuto! Siamo felici che tu abbia scelto Gogs, buon divertimento.
invalid_log_root_path=Log root path is invalid: %v
invalid_log_root_path=Percorso deilog non valido: %v
[home]
uname_holder=Nome Utente o E-mail
password_holder=Password
switch_dashboard_context=Cambia Dashboard Context
my_repos=I miei Repository
show_more_repos=Show more repositories...
show_more_repos=Visualizza altre repositories...
collaborative_repos=Repository Condivisi
my_orgs=Le mie Organizzazioni
my_mirrors=I miei Mirror
@@ -137,6 +139,7 @@ issues.in_your_repos=Nei tuoi repository
[explore]
repos=Repository
users=Utenti
organizations=Organizzazioni
search=Cerca
[auth]
@@ -151,18 +154,17 @@ forget_password=Password dimenticata?
sign_up_now=Bisogno di un account? Iscriviti ora.
confirmation_mail_sent_prompt=Una nuova email di conferma è stata inviata a <b>%s</b>, verifica la tua casella di posta entro le prossime %d ore per completare la registrazione.
active_your_account=Attiva il tuo Account
prohibit_login=Login Prohibited
prohibit_login_desc=Your account is prohibited to login, please contact site admin.
prohibit_login=Accesso Vietato
prohibit_login_desc=Il tuo account è impossibilitato al login, contatta l'amministratore del sito.
resent_limit_prompt=Siamo spiacenti, si stanno inviando e-mail di attivazione troppo spesso. Si prega di attendere 3 minuti.
has_unconfirmed_mail=Ciao %s, hai un indirizzo di posta elettronica non confermato (<b>%s</b>). Se non hai ricevuto una e-mail di conferma o vuoi riceverla nuovamente, fare clic sul pulsante qui sotto.
resend_mail=Clicca qui per inviare nuovamente l'e-mail di attivazione
email_not_associate=Questo indirizzo e-mail non è associato ad alcun account.
send_reset_mail=Clicca qui per (ri)inviare la tua e-mail di reimpostazione password
reset_password=Reimposta la tua Password
invalid_code=Siamo spiacenti, il codice di conferma è scaduto o non valido.
reset_password_helper=Clicca qui per reimpostare la password
password_too_short=La lunghezza della password non può essere meno 6 caratteri.
non_local_account=Non-local accounts cannot change passwords through Gogs.
non_local_account=Gli account non locali non possono modificare le password tramite Gogs.
[mail]
activate_account=Per favore attiva il tuo account
@@ -189,6 +191,13 @@ TeamName=Nome Team
AuthName=Nome autorizzazione
AdminEmail=Email dell'Admin
NewBranchName=Nuovo nome del branch
CommitSummary=Riepilogo dei commit
CommitMessage=Messaggio di commit
CommitChoice=Scelta di commit
TreeName=Percorso del file
Content=Contenuto
require_error=` non può essere vuoto.`
alpha_dash_error=` ammessi solo caratteri alfanumerici o trattini(-_).`
alpha_dash_dot_error=` ammessi solo caratteri alfanumerici o trattini(-_) o punti.`
@@ -225,7 +234,7 @@ org_still_own_repo=Questa organizzazione ha ancora la proprietà del repository,
target_branch_not_exist=Il ramo (branch) di destinazione non esiste.
[user]
change_avatar=Change your avatar
change_avatar=Cambia il tuo avatar
join_on=Si è unito il
repositories=Repository
activity=Attività pubblica
@@ -262,8 +271,8 @@ change_username_prompt=Questa modifica influenzerà il modo in cui i link si rif
continue=Continua
cancel=Annulla
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Ricerca Avatar per mail
federated_avatar_lookup=Ricerca Federated Avatars
enable_custom_avatar=Abilita avatar personalizzato
choose_new_avatar=Scegli un nuovo avatar
update_avatar=Aggiorna le impostazioni avatar
@@ -330,6 +339,10 @@ access_token_deletion=Eliminazione Token di accesso personale
access_token_deletion_desc=Eliminare questo token di accesso personale rimuoverà tutti i relativi accessi di applicazione. Si desidera continuare?
delete_token_success=Il token di accesso personale è stato eliminato! Non dimenticare di aggiornare anche l'applicazione.
orgs.none=Non sei membro di alcuna organizzazione.
orgs.leave_title=Abbandona una organizzazione
orgs.leave_desc=Abbandonando l'organizzazione perderai l'accesso a tutti i repository e i gruppi. Confermi?
delete_account=Elimina Account
delete_prompt=L'operazione eliminerà permanentemente l'account e <strong>NON POTRÀ</strong> essere annullata!
confirm_delete_account=Conferma Eliminazione
@@ -350,7 +363,7 @@ fork_from=Forka da
fork_visiblity_helper=Non puoi cambiare la visibilità di un repository forkato.
repo_desc=Descrizione
repo_lang=Lingua
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Seleziona i templates di .gitignore
license=Licenza
license_helper=Selezionare un file di licenza
readme=Readme
@@ -358,11 +371,12 @@ readme_helper=Seleziona un template per il readme
auto_init=Inizializzare questo repository con i file e il modello selezionati
create_repo=Crea Repository
default_branch=Ramo (Branch) predefinito
mirror_prune=Prune
mirror_prune=Rimuovi
mirror_prune_desc=Remove any remote-tracking references that no longer exist on the remote
mirror_interval=Intervallo Mirror (in ore)
mirror_address=Indirizzo del mirror
mirror_address_desc=Si prega di includere nell'indirizzo le credenziali utente necessarie.
mirror_last_synced=Ultimo aggiornamento
watchers=Osservatori
stargazers=Fan
forks=Fork
@@ -376,14 +390,14 @@ migrate_type=Tipo di migrazione
migrate_type_helper=Questo repository sarà un <span class="text blue">mirror</span>
migrate_repo=Migra Repository
migrate.clone_address=Duplica Indirizzo
migrate.clone_address_desc=Può essere un URL HTTP/HTTPS/GIT o il percorso del server locale.
migrate.clone_address_desc=Può essere un url HTTP/HTTPS/GIT.
migrate.clone_address_desc_import_local=Puoi anche migrare un repository usando un path locale sul server.
migrate.permission_denied=Non è consentito importare repository locali.
migrate.invalid_local_path=Percorso locale non valido, non esiste o non è una cartella.
migrate.failed=Migrazione non riuscita: %v
mirror_from=mirror da
forked_from=forkato da
fork_from_self=Non puoi forkare il tuo stesso repository!
copy_link=Copia
copy_link_success=Copiato!
copy_link_error=Premere ⌘-C o Ctrl-C per copiare
@@ -401,7 +415,7 @@ create_new_repo_command=Crea nuovo repository da riga di comando
push_exist_repo=Push un repo esistente dalla riga di comando
repo_is_empty=Questo repository è vuoto, si prega di tornare più tardi!
code=Codice
files=File
branch=Ramo (Branch)
tree=Albero (Tree)
filter_branch_and_tag=Filtra per branch o tag
@@ -417,8 +431,49 @@ file_raw=Originale
file_history=Cronologia
file_view_raw=Vedi originale
file_permalink=Permalink
file_too_large=This file is too large to be shown
file_too_large=Questo file è troppo grande per essere mostrato
video_not_supported_in_browser=Il tuo browser non supporta i tag "video" di HTML5.
editor.new_file=Nuovo file
editor.upload_file=Carica File
editor.edit_file=Modifica file
editor.preview_changes=Anteprima modifiche
editor.cannot_edit_non_text_files=Non è possibile modificare i file non di testo
editor.edit_this_file=Modifica questo file
editor.must_be_on_a_branch=Devi essere su quel branch per eseguire o proporre modifiche su quel determinato branch
editor.fork_before_edit=Forka il repository per modificare il file
editor.delete_this_file=Elimina questo file
editor.must_have_write_access=È necessario un accesso in scrittura per eseguire o proporre modifiche a questo file
editor.file_delete_success=Il file '%s' è stato eliminato!
editor.name_your_file=Dai un nome al file...
editor.filename_help=Per aggiungere una cartella, scrivine il nome seguito da /. Per eliminare una cartella, spostati all'inizio del campo di testo e premi "backspace".
editor.or=oppure
editor.cancel_lower=annulla
editor.commit_changes=Commit
editor.add_tmpl=Aggiungi '%s/<filename>'
editor.add=Aggiungi '%s'
editor.update=Aggiorna '%s'
editor.delete=Elimina '%s'
editor.commit_message_desc=Aggiungi una descrizione (opzionale)...
editor.commit_directly_to_this_branch=Commit direttamente nel branch <strong class="branch-name">%s</strong>.
editor.create_new_branch=Crea un <strong>nuovo branch</strong> per questo commit e inizia una pull request.
editor.new_branch_name_desc=Nome del nuovo branch...
editor.cancel=Annulla
editor.filename_cannot_be_empty=Il nome del file non può essere vuoto.
editor.branch_already_exists=Il branch '%s' esiste già in questo repository.
editor.directory_is_a_file='%s' nel percorso corrente è un file e non una cartella.
editor.file_is_a_symlink=Il file '%s' è un link simbolico che non può essere modificato con l'editor web.
editor.filename_is_a_directory=Il nome '%s' corrisponde a una cartella già presente in questo repository.
editor.file_editing_no_longer_exists=Il file '%s' non esiste più nel repository.
editor.file_changed_while_editing=Il file è stato cambiato in un'altra posizione. <a target="_blank" href="%s">Clicca qui</a> per vedere le modifiche o <strong>committa</strong> per sovrascrivere con la versione corrente.
editor.file_already_exists=Un file di nome '%s' esiste già in questo repository.
editor.no_changes_to_show=Nessuna modifica da mostrare.
editor.fail_to_update_file=La creazione o la modifica del file '%s' è fallita: %v
editor.add_subdir=Aggiungi sottocartella...
editor.unable_to_upload_files=È fallito il caricamento dei file su '%s': %v
editor.upload_files_to_dir=Carica file su '%s'
commits.commit_history=Commit History
commits.commits=Commits
commits.search=Ricerca una versione
commits.find=Cerca
@@ -444,6 +499,11 @@ issues.create=Crea Problema
issues.new_label=Nuova etichetta
issues.new_label_placeholder=Nome dell'etichetta...
issues.create_label=Crea Etichetta
issues.label_templates.title=Carica un set predefinito di etichette
issues.label_templates.info=Non sono presenti etichette. Puoi cliccare sul pulsante "Nuova etichetta" per crearne una, oppure usare un set predefinito mostrato qui sotto.
issues.label_templates.helper=Scegli un set di etichette
issues.label_templates.use=Usa questo set di etichette
issues.label_templates.fail_to_load_file=Failed to load label template file '%s': %v
issues.open_tab=%d Aperti
issues.close_tab=%d Chiusi
issues.filter_label=Etichetta
@@ -485,8 +545,7 @@ issues.commit_ref_at=`referenced this issue from a commit <a id="%[1]s" href="#%
issues.poster=Autore
issues.collaborator=Collaboratori
issues.owner=Proprietario
issues.sign_up_for_free=Registrati gratuitamente
issues.sign_in_require_desc=per partecipare a questa conversazione. Possiedi già un account?<a href="%s">Fai il login per commentare</a>
issues.sign_in_require_desc=<a href="%s">Sign in</a> to join this conversation.
issues.edit=Modifica
issues.cancel=Annulla
issues.save=Salva
@@ -501,6 +560,8 @@ issues.label_deletion=Elimina Etichetta
issues.label_deletion_desc=Eliminare l'etichetta rimuovera le sue informazioni in tutti i problemi correlati. Vuoi continuare?
issues.label_deletion_success=Etichetta eliminata con successo!
issues.num_participants=%d Partecipanti
issues.attachment.open_tab=`Click to see "%s" in a new tab`
issues.attachment.download=`Click to download "%s"`
pulls.new=Nuova Pull Request
pulls.compare_changes=Confronta le modifiche
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Questa pull request non può essere mergiata automa
pulls.cannot_auto_merge_helper=Effettua il merge manualmente per risolvere i conflitti.
pulls.merge_pull_request=Unisci Pull Request
pulls.open_unmerged_pull_exists=`You can't perform reopen operation because there is already an open pull request (#%d) from same repository with same merge information and is waiting for merging.`
pulls.delete_branch=Delete Branch
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=Nuova Milestone
milestones.open_tab=%d Aperti
@@ -577,9 +640,33 @@ settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webhooks
settings.githooks=Git Hooks
settings.basic_settings=Impostazioni di Base
settings.mirror_settings=Mirror Settings
settings.sync_mirror=Sync Now
settings.mirror_sync_in_progress=Mirror syncing is in progress, please refresh page in about a minute.
settings.site=Sito Ufficiale
settings.update_settings=Aggiorna Impostazioni
settings.change_reponame_prompt=Questa modifica influirà i link al repository.
@@ -592,6 +679,8 @@ settings.external_wiki_url_desc=I visitatori verranno reindirizzati all'URL quan
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.use_external_issue_tracker=Utilizza gestore di problemi esterno
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=Formato URL Gestore Problemi Esterno
settings.tracker_issue_style=External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric=Numeric
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_url_format_desc=You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
settings.pulls_desc=Abilita le pull requests per accettare contributi pubblici
settings.danger_zone=Zona Pericolosa
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Il nuovo proprietario ha già un repository con lo stesso nome. Per favore scegli un altro nome.
settings.convert=Converti in Repository Regolare
settings.convert_desc=Puoi convertire questo mirror in un repository regolare. Questa operazione non può essere annullata.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Questo utente non potrà più collaborare a
settings.remove_collaborator_success=Il collaboratore è stato rimosso.
settings.search_user_placeholder=Cerca utente...
settings.org_not_allowed_to_be_collaborator=Un'organizzazione non può essere aggiunta come collaboratore.
settings.user_is_org_member=L'utente è un membro dell'organizzazione che non può essere aggiunto come collaboratore.
settings.add_webhook=Aggiungi Webhook
settings.hooks_desc=I Webhooks sono molto simili a un basilare evento trigger HTTP POST. Ogni volta che qualcosa si verifica in Gogs, tratteremo la notifica all'host di destinazione specificato. Ulteriori informazioni in questa <a target="_blank" href="%s">Guida ai Webhooks</a>.
settings.webhook_deletion=Elimina Webhook
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Gogs manderà una richiesta <code>POST</code> all'URL
settings.payload_url=Payload URL
settings.content_type=Content Type
settings.secret=Secret
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Nome utente
settings.slack_icon_url=URL icona
settings.slack_color=Colore
@@ -665,6 +755,8 @@ settings.event_send_everything=Ho bisogno di <strong>tutto</strong>.
settings.event_choose=Lasciami scegliere ciò di cui ho bisogno.
settings.event_create=Crea
settings.event_create_desc=Branch, o tag creato
settings.event_pull_request=Pull request
settings.event_pull_request_desc=Pull request aperta, chiusa, riaperta, modificata, assegnata, riassegnata, etichettata o sincronizzata.
settings.event_push=Push
settings.event_push_desc=Git push in un repository
settings.active=Attivo
@@ -676,10 +768,12 @@ settings.delete_webhook=Eliminare Webhook
settings.recent_deliveries=Recenti Deliveries
settings.hook_type=Tipo di Hook
settings.add_slack_hook_desc=Aggiungi <a href="%s"> Slack</a> integrazione al tuo repository.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Token
settings.slack_domain=Dominio
settings.slack_channel=Canale
settings.deploy_keys=Dispiega Chiavi
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Aggiungi Deploy Key
settings.deploy_key_desc=Le deploy keys hanno accesso in sola lettura. Non equivalgono alle chiavi SSH personali.
settings.no_deploy_keys=Non hai aggiunto alcuna deploy key.
@@ -758,6 +852,7 @@ team_permission_desc=Quale livello di autorizzazione dovrebbe avere questa squad
form.name_reserved=Il nome organizzazione '%s' è riservato.
form.name_pattern_not_allowed=La struttura del nome dell'organizzazione '%s' non è consentita.
form.team_name_reserved=Team name '%s' is reserved.
settings=Impostazioni
settings.options=Opzioni
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Fare la procedura di garbage collection sui repository
dashboard.git_gc_repos_success=Tutti i repository hanno fatto la procedura di garbage collection con successo.
dashboard.resync_all_sshkeys=Riscrivi il file '.ssh/authorized_keys' (attenzione: le chiavi non appartenenti a Gogs saranno perse)
dashboard.resync_all_sshkeys_success=Tutte le chiavi pubbliche riscritte con successo.
dashboard.resync_all_update_hooks=Riscrivere tutti gli update hook dei repository (necessario quando il percorso di configurazione personalizzata viene modificato)
dashboard.resync_all_update_hooks_success=Tutti gli update hook dei repository riscritti con successo.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Reinitialize all repository records that lost Git files
dashboard.reinit_missing_repos_success=All repository records that lost Git files have been reinitialized successfully.
@@ -893,16 +988,16 @@ users.created=Creato
users.send_register_notify=Send Registration Notification To User
users.new_success=Il nuovo account '%s' è stato creato correttamente.
users.edit=Modifica
users.auth_source=Authentication Source
users.auth_source=Fonte di autenticazione
users.local=Locale
users.auth_login_name=Authentication Login Name
users.password_helper=Leave it empty to remain unchanged.
users.auth_login_name=Nome utente per l'autenticazione
users.password_helper=Lascia vuoto per non modificare.
users.update_profile_success=Profilo dell'account aggiornato con successo.
users.edit_account=Modifica Account
users.max_repo_creation=Limite massimo per la creazione di Repository
users.max_repo_creation_desc=(Inserire -1 per usare il limite globale di default)
users.is_activated=Questo account è attivato
users.prohibit_login=This account is prohibited to login
users.prohibit_login=Questo account non è abilitato al login
users.is_admin=Questo account ha permessi di amministratore
users.allow_git_hook=Questo account ha il permesso di creare hooks di Git
users.allow_import_local=Questo account dispone delle autorizzazioni per importare repository locali
@@ -925,7 +1020,7 @@ repos.watches=Segue
repos.stars=Voti
repos.issues=Problemi
auths.auth_manage_panel=Authentication Manage Panel
auths.auth_manage_panel=Pannello di configurazione dei meccanismi di autenticazione
auths.new=Aggiungi Nuova Origine
auths.name=Nome
auths.type=Tipo
@@ -933,7 +1028,7 @@ auths.enabled=Attivo
auths.updated=Aggiornato
auths.auth_type=Tipo di autenticazione
auths.auth_name=Nome di autenticazione
auths.security_protocol=Security Protocol
auths.security_protocol=Protocollo di sicurezza
auths.domain=Dominio
auths.host=Host
auths.port=Porta
@@ -943,7 +1038,7 @@ auths.bind_password_helper=Attenzione: Questa password è salvata in chiaro. Non
auths.user_base=User Search Base
auths.user_dn=DN dell'utente
auths.attribute_username=Attributo username
auths.attribute_username_placeholder=Leave empty to use sign-in form field value for user name.
auths.attribute_username_placeholder=Se vuoto, verrà usato il nome di login dell'accesso.
auths.attribute_name=Attributo Nome
auths.attribute_surname=Attributo Cognome
auths.attribute_mail=Attributo Email
@@ -955,7 +1050,7 @@ auths.smtp_auth=Tipo di autenticazione SMTP
auths.smtphost=Host SMTP
auths.smtpport=Porta SMTP
auths.allowed_domains=Domini consentiti
auths.allowed_domains_helper=Leave it empty to not restrict any domains. Multiple domains should be separated by comma ','.
auths.allowed_domains_helper=Lasciare vuoto per non imporre restrizioni di dominio. Domini separati da virgole ','.
auths.enable_tls=Abilitare Crittografia TLS
auths.skip_tls_verify=Salta verifica TLS
auths.pam_service_name=Nome del Servizio PAM
@@ -963,14 +1058,15 @@ auths.enable_auto_register=Abilitare Registrazione Automatica
auths.tips=Consigli
auths.edit=Modifica impostazioni di autenticazione
auths.activated=Questa Autenticazione è stata attivata
auths.new_success=New authentication '%s' has been added successfully.
auths.update_success=Authentication setting has been updated successfully.
auths.new_success=Nuovo meccanismo di autenticazione '%s' aggiunto.
auths.update_success=Parametro di autenticazione aggiornato.
auths.update=Aggiornare le impostazioni di autenticazione
auths.delete=Elimina questa autenticazione
auths.delete_auth_title=Authentication Deletion
auths.delete_auth_desc=This authentication is going to be deleted, do you want to continue?
auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
auths.deletion_success=Authentication has been deleted successfully!
auths.delete_auth_title=Eliminazione del meccanismo di autenticazione
auths.delete_auth_desc=Eliminazione del meccanismo di autenticazione. Continuare?
auths.still_in_used=Questo meccanismo di autenticazione è ancora attivo per alcuni utenti. Eliminare gli utenti o cambiare il loro meccanismo di autenticazione prima di ritentare.
auths.deletion_success=Il meccanismo di autenticazione è stato eliminato!
auths.login_source_exist=La fonte di autenticazione '%s' esiste già.
config.server_config=Configurazione Server
config.app_name=Nome Applicazione
@@ -981,10 +1077,9 @@ config.offline_mode=Modalità Offline
config.disable_router_log=Disattivare Log del Router
config.run_user=Utente Esecutore
config.run_mode=Modalità Esecuzione
config.repo_root_path=Percorso Root del Repository
config.git_version=Versione Git
config.static_file_root_path=Percorso Root del File Statico
config.log_file_root_path=Percorso Root del File di Log
config.script_type=Tipo di Script
config.reverse_auth_user=Autenticazione Utente Inversa
config.ssh_config=Configurazione SSH
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Percorso Keygen ('ssh-keygen')
config.ssh_minimum_key_size_check=Verifica delle dimensioni minime della chiave
config.ssh_minimum_key_sizes=Dimensioni minime della chiave
config.repo_config=Repository Configuration
config.repo_root_path=Percorso Root del Repository
config.script_type=Tipo di Script
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Configurazione Database
config.db_type=Tipo
config.db_host=Host
@@ -1012,7 +1117,7 @@ config.db_path_helper=(per "sqlite3" e "tidb")
config.service_config=Configurazione Servizio
config.register_email_confirm=Richiedono Conferma dell'Email
config.disable_register=Disabilita Registrazione
config.show_registration_button=Mostra Pulsane Registrazione
config.show_registration_button=Mostra Pulsante Registrazione
config.require_sign_in_view=Richiesto Accesso per Vedere
config.mail_notify=Email di Notifica
config.disable_key_size_check=Disabilita controllo sulle dimensioni minime della chiave
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Durata Cookie
config.picture_config=Configurazione Foto
config.picture_service=Servizio foto
config.disable_gravatar=Disabilita Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Attiva Federated Avatars
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Configurazione Git
config.git_disable_diff_highlight=Disattiva evidenziazione delle differenze
config.git_max_diff_lines=Numero massimo di righe di diff (per singolo file)
config.git_max_diff_line_characters=Numero massimo di caratteri di diff (per singola riga)
config.git_max_diff_files=Numero massimo di file diff mostrati
config.git_gc_args=Parametri GC
config.git_migrate_timeout=Timeout per la migrazione
config.git_mirror_timeout=Timeoute per l'aggiornamento del mirror
config.git_clone_timeout=Timeout per il clone
config.git_pull_timeout=Timeout per il pull
config.git_gc_timeout=Timeout per le operazioni di GC
config.log_config=Configurazione Log
config.log_mode=Modalità Log

View File

@@ -48,7 +48,7 @@ cancel=キャンセル
install=インストール
title=インストールをする前に必要な準備をしましょう
docker_helper=DockerでGogsを稼動する場合は、このページに変更を加える前に、 <a target="_blank" href="%s">ガイドライン</a>をよく読んでください!
requite_db_desc=Gogs は、MySQLPostgreSQLSQLite3 または TiDB が必要です。
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=データベース設定
db_type=データベースの種類
host=ホスト
@@ -58,9 +58,8 @@ db_name=データベース名
db_helper=MySQLではエンジンがINNODB、文字セットがutf8_general_ciである必要があります。
ssl_mode=SSL モード
path=パス
sqlite_helper=SQLite3かTiDBのデータベースのファイルパス。<br>サービスとして開始する際には絶対パスを利用してください。
err_empty_db_path=SQLite3 または TiDB データベースのパスを空にすることはできません。
err_invalid_tidb_name=TiDB データベース名は文字"."と"-"を許可しない。
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=管理者アカウントを作成せずに登録を無効にすることはできません。
err_empty_admin_password=管理者パスワードは空白にできません。
@@ -75,6 +74,8 @@ domain=ドメイン
domain_helper=これはSSH用クローンURLに影響します。
ssh_port=SSH ポート
ssh_port_helper=SSHサーバーを使用する場合はポート番号を入力してください。 空白にした場合は無効化されます。
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=HTTP ポート
http_port_helper=アプリケーションが待ち受けするポート番号。
app_url=アプリケーションの URL
@@ -116,6 +117,7 @@ sqlite3_not_available=このリリース バージョンは SQLite3 をサポー
invalid_db_setting=データベースの設定が正しくありません: %v
invalid_repo_path=リポジトリのルート パスが無効です: %v
run_user_not_match=実行ユーザーは、現在のユーザーではない: %s-> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=構成の保存に失敗した: %v
invalid_admin_setting=管理者アカウントの設定が無効です: %v
install_success=ようこそ!我々はあなたが Gogs を選んでくれて嬉しいです!楽しみましょう!
@@ -137,6 +139,7 @@ issues.in_your_repos=あなたのリポジトリ
[explore]
repos=リポジトリ
users=ユーザ
organizations=組織
search=検索
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=あなたのアカウントはログインを禁止されて
resent_limit_prompt=申し訳ありませんが、アクティベーションメールは頻繁に送信しています。3 分お待ちください。
has_unconfirmed_mail=こんにちは %s さん、あなたの電子メール アドレス (<b>%s</b>) は未確認です。もし確認メールをまだ確認できていないか、改めて再送信する場合は、下のボタンをクリックしてください。
resend_mail=アクティベーションメールを再送信するにはここをクリック
email_not_associate=この電子メール アドレスは、アカウントには関連付けられません。
send_reset_mail=パスワードリセットのメールを再送するにはここをクリック
reset_password=パスワードリセット
invalid_code=申し訳ありませんが、確認用コードが期限切れまたは無効です。
@@ -189,6 +191,13 @@ TeamName=チーム名
AuthName=承認名
AdminEmail=管理者の電子メール
NewBranchName=新しいブランチ名
CommitSummary=Commit summary
CommitMessage=Commit message
CommitChoice=Commit choice
TreeName=File path
Content=コンテンツ
require_error=空にできません
alpha_dash_error=アルファベット、数字、ハイフン"-"、アンダースコア"_"のいずれかの必要があります
alpha_dash_dot_error=' アルファベット、数値、ダッシュ(-)、アンダースコア(_) 、ドット(.)のいずれかを入力する必要があります。 '
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=ユーザ名のパターン '%s' は許可され
[settings]
profile=プロフィール
password=パスワード
avatar=Avatar
avatar=アバター
ssh_keys=SSH キー
social=SNSアカウント
applications=アプリケーション
@@ -262,7 +271,7 @@ change_username_prompt=この変更はリンクをアカウントに関連付け
continue=続行
cancel=キャンセル
lookup_avatar_by_mail=Lookup Avatar by mail
lookup_avatar_by_mail=メールからアバターを取得
federated_avatar_lookup=Federated Avatar Lookup
enable_custom_avatar=カスタムのアバターを有効にする
choose_new_avatar=新しいアバターを選択
@@ -330,6 +339,10 @@ access_token_deletion=パーソナルアクセストークンの削除
access_token_deletion_desc=パーソナルアクセストークンを削除すると、関連するアプリケーションのすべてのアクセスが削除されます。続行しますか?
delete_token_success=パーソナルアクセストークンは正常に削除されました!同時にあなたのアプリケーションを更新することを忘れないでください。
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account=アカウントを削除
delete_prompt=この操作をするとアカウントが完全に削除され、<strong>二度と元に戻すことができなくなります</strong>
confirm_delete_account=削除の確認
@@ -363,6 +376,7 @@ mirror_prune_desc=Remove any remote-tracking references that no longer exist on
mirror_interval=ミラー 間隔(時)
mirror_address=ミラー アドレス
mirror_address_desc=Please include necessary user credentials in the address.
mirror_last_synced=最終同期
watchers=ウォッチャー
stargazers=Stargazers
forks=フォーク
@@ -376,14 +390,14 @@ migrate_type=マイグレーションの種類
migrate_type_helper=このリポジトリは、<span class="text blue"> ミラー</span> になります
migrate_repo=リポジトリを移行
migrate.clone_address=クローンアドレス
migrate.clone_address_desc=これは、HTTP/HTTPS/GIT URL またはローカル サーバー パスを設定できます。
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=ローカル リポジトリをインポートすることはできません。
migrate.invalid_local_path=ローカルパスが無効です。存在しないかディレクトリではありません。
migrate.failed=移行に失敗しました: %v
mirror_from=同期ミラー
forked_from=フォーク元
fork_from_self=すでにあなたの所有しているリポジトリはフォークできません
copy_link=コピー
copy_link_success=コピーされました!
copy_link_error=⌘ C または Ctrl-C キーを押してコピー
@@ -401,7 +415,7 @@ create_new_repo_command=コマンドラインで新しいリポジトリを作
push_exist_repo=コマンド ・ ラインから既存のリポジトリをプッシュ
repo_is_empty=このリポジトリは空です、後で戻って来て下さい!
code=コード
files=Files
branch=ブランチ
tree=ツリー
filter_branch_and_tag=ブランチまたはタグをフィルタリング
@@ -418,7 +432,48 @@ file_history=履歴
file_view_raw=Rawデータを見る
file_permalink=パーマリンク
file_too_large=このファイルは大きすぎるため、表示できません。
video_not_supported_in_browser=Your browser doesn't support HTML5 video tag.
editor.new_file=New file
editor.upload_file=Upload file
editor.edit_file=ファイルを編集
editor.preview_changes=Preview Changes
editor.cannot_edit_non_text_files=Cannot edit non-text files
editor.edit_this_file=このファイルを編集
editor.must_be_on_a_branch=You must be on a branch to make or propose changes to this file
editor.fork_before_edit=You must fork this repository before editing the file
editor.delete_this_file=このファイルを削除
editor.must_have_write_access=You must have write access to make or propose changes to this file
editor.file_delete_success=File '%s' has been deleted successfully!
editor.name_your_file=Name your file...
editor.filename_help=To add directory, just type it and press /. To remove a directory, go to the beginning of the field and press backspace.
editor.or=or
editor.cancel_lower=キャンセル
editor.commit_changes=変更をコミット
editor.add_tmpl=Add '%s/<filename>'
editor.add='%s' を追加
editor.update='%s' を更新
editor.delete='%s' を削除
editor.commit_message_desc=Add an optional extended description...
editor.commit_directly_to_this_branch=Commit directly to the <strong class="branch-name">%s</strong> branch.
editor.create_new_branch=Create a <strong>new branch</strong> for this commit and start a pull request.
editor.new_branch_name_desc=New branch name...
editor.cancel=キャンセル
editor.filename_cannot_be_empty=Filename cannot be empty.
editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.file_is_a_symlink=The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
editor.add_subdir=Add subdirectory...
editor.unable_to_upload_files=Failed to upload files to '%s' with error: %v
editor.upload_files_to_dir=Upload files to '%s'
commits.commit_history=Commit History
commits.commits=コミット
commits.search=コミットの検索
commits.find=検索
@@ -444,6 +499,11 @@ issues.create=問題を作成
issues.new_label=新しいラベル
issues.new_label_placeholder=ラベル名...
issues.create_label=ラベルを作成
issues.label_templates.title=Load a predefined set of labels
issues.label_templates.info=There aren't any labels yet. You can click on the "New Label" button above to create one or use a predefined set below.
issues.label_templates.helper=Select a label set
issues.label_templates.use=Use this label set
issues.label_templates.fail_to_load_file=Failed to load label template file '%s': %v
issues.open_tab=%d オープン
issues.close_tab=%d クローズ
issues.filter_label=ラベル
@@ -485,8 +545,7 @@ issues.commit_ref_at=`referenced this issue from a commit <a id="%[1]s" href="#%
issues.poster=ポスター
issues.collaborator=コラボレータ
issues.owner=オーナー
issues.sign_up_for_free=無料でサインアップ
issues.sign_in_require_desc=to join this conversation. Already have an account? <a href="%s">Sign in to comment</a>
issues.sign_in_require_desc=<a href="%s">Sign in</a> to join this conversation.
issues.edit=編集
issues.cancel=キャンセル
issues.save=保存
@@ -501,6 +560,8 @@ issues.label_deletion=ラベルの削除
issues.label_deletion_desc=ラベルを削除すると、関連するすべての問題の情報が削除されます。続行しますか。
issues.label_deletion_success=ラベルは正常に削除されました。
issues.num_participants=%d Participants
issues.attachment.open_tab=`Click to see "%s" in a new tab`
issues.attachment.download=`Click to download "%s"`
pulls.new=新しいプルリクエスト
pulls.compare_changes=変更を比較
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=This pull request can't be merged automatically bec
pulls.cannot_auto_merge_helper=競合を解決するためには、手動でマージする必要があります。
pulls.merge_pull_request=プルリクエストをマージします。
pulls.open_unmerged_pull_exists=`You can't perform reopen operation because there is already an open pull request (#%d) from same repository with same merge information and is waiting for merging.`
pulls.delete_branch=Delete Branch
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=新しいマイルストーン
milestones.open_tab=%d オープン
@@ -564,7 +627,7 @@ wiki.save_page=ページを保存
wiki.last_commit_info=%s このページを編集 %s
wiki.edit_page_button=編集
wiki.new_page_button=新規ページ
wiki.delete_page_button=Delete Page
wiki.delete_page_button=ページの削除
wiki.delete_page_notice_1=This will delete the page <code>"%s"</code>. Please be certain.
wiki.page_already_exists=既に同じ名前のWiki ページが存在します。
wiki.pages=ページ
@@ -573,13 +636,37 @@ wiki.last_updated=最終更新 %s
settings=設定
settings.options=オプション
settings.collaboration=コラボレーション
settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.admin=管理
settings.collaboration.write=書込
settings.collaboration.read=読込
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webhooks
settings.githooks=Git のフック
settings.basic_settings=基本設定
settings.mirror_settings=Mirror Settings
settings.sync_mirror=今すぐ同期
settings.mirror_sync_in_progress=Mirror syncing is in progress, please refresh page in about a minute.
settings.site=公式サイト
settings.update_settings=設定の更新
settings.change_reponame_prompt=この変更はリンクがリポジトリに関連付ける方法に影響します。
@@ -592,13 +679,16 @@ settings.external_wiki_url_desc=Visitors will be redirected to URL when they cli
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.use_external_issue_tracker=外部課題トラッキングシステムを使用
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=外部課題トラッキングツール URLのフォーマット
settings.tracker_issue_style=External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric=Numeric
settings.tracker_issue_style.numeric=数値
settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_url_format_desc=You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
settings.pulls_desc=Enable pull requests to accept public contributions
settings.danger_zone=危険地帯
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=新しいオーナーは、既に同じ名前のリポジトリを持っています。
settings.convert=Convert To Regular Repository
settings.convert_desc=You can convert this mirror to a regular repository. This cannot be reversed.
@@ -610,10 +700,10 @@ settings.transfer_desc=リポジトリをあなたが管理者権限を持って
settings.transfer_notices_1=-新しい所有者が個人ユーザーの場合、あなたがアクセスできなくなります。
settings.transfer_notices_2=- You will conserve access if new owner is an organization and if you're one of the owners.
settings.transfer_form_title=操作を確認するために、以下の情報を入力してください。
settings.wiki_delete=Erase Wiki Data
settings.wiki_delete_desc=Once you erase wiki data there is no going back. Please be certain.
settings.wiki_delete=Wikiのデータ消去
settings.wiki_delete_desc=Wikiのデータを消去すると元に戻すことは出来ません。よく確認してください。
settings.wiki_delete_notices_1=- This will delete and disable the wiki for %s
settings.wiki_deletion_success=Repository wiki data have been erased successfully.
settings.wiki_deletion_success=Wikiのデータ消去が完了しました。
settings.delete=このリポジトリを削除
settings.delete_desc=リポジトリを削除すると元に戻せません。確実に確認してください。
settings.delete_notices_1=-この操作は<strong>元に戻せません</strong> 。
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=This user will no longer have collaboration
settings.remove_collaborator_success=共同編集者が削除されました。
settings.search_user_placeholder=Search users
settings.org_not_allowed_to_be_collaborator=組織を共同編集者として追加することはできません。
settings.user_is_org_member=ユーザーは組織の一員なので、共同編集者として追加することはできません。
settings.add_webhook=Webhook を追加
settings.hooks_desc=Webhooksは、Gogsで特定のイベントの発生時に指定された外部サービスに通知を許可します。イベントが発生すると、それぞれ指定されたUrlに、POSTリクエストが送られます。詳細はこちらのの <a target="_blank"href="%s"> Webhooks ガイド</a>をご覧ください。
settings.webhook_deletion=Webhook を削除
@@ -656,6 +745,7 @@ settings.add_webhook_desc=私たちは、指定されたURLに購読されたイ
settings.payload_url=ペイロードの URL
settings.content_type=コンテンツ タイプ
settings.secret=秘密
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=ユーザ名
settings.slack_icon_url=アイコン URL
settings.slack_color=カラー
@@ -665,6 +755,8 @@ settings.event_send_everything=<strong>すべて</strong> が必要です。
settings.event_choose=必要なものを選択しましょう。
settings.event_create=Create
settings.event_create_desc=ブランチ、またはタグを作成
settings.event_pull_request=Pull Request
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, or synchronized.
settings.event_push=プッシュ
settings.event_push_desc=Git リポジトリにプッシュ
settings.active=アクティブ
@@ -676,10 +768,12 @@ settings.delete_webhook=Webhook を削除
settings.recent_deliveries=最近のデリバリー
settings.hook_type=フックタイプ
settings.add_slack_hook_desc=<a href="%s"> Slack</a> インテグレーションをリポジトリに追加します。
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=トークン
settings.slack_domain=ドメイン
settings.slack_channel=チャンネル
settings.deploy_keys=デプロイキー
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=デプロイキーを追加
settings.deploy_key_desc=個人アカウントのSSHキーとは異なり、デプロイキーは読み取り専用アクセスとなります。
settings.no_deploy_keys=でプロキーは1つも追加されていません。
@@ -758,6 +852,7 @@ team_permission_desc=このチームに必要な権限レベルは?
form.name_reserved=組織名 '%s' は予約されています。
form.name_pattern_not_allowed=組織名のパターン '%s' は許可されていません。
form.team_name_reserved=Team name '%s' is reserved.
settings=設定
settings.options=オプション
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=リポジトリでのガベージコレクションを実
dashboard.git_gc_repos_success=すべてのリポジトリは正常にガベージ コレクションを行いました。
dashboard.resync_all_sshkeys='.ssh/ authorized_keys' ファイルを再生成します。警告Gogsキー以外は失われます
dashboard.resync_all_sshkeys_success=すべての公開鍵が正常に書き換えられました。
dashboard.resync_all_update_hooks=リポジトリの update フックをすべて再更新する(カスタムの設定パスが変更されたときに必要)
dashboard.resync_all_update_hooks_success=リポジトリの update フックがすべて正常に再更新されました。
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Reinitialize all repository records that lost Git files
dashboard.reinit_missing_repos_success=All repository records that lost Git files have been reinitialized successfully.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=認証削除
auths.delete_auth_desc=認証を削除します、継続しますか?
auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
auths.deletion_success=認証が正常に削除されました。
auths.login_source_exist=Login source '%s' already exists.
config.server_config=サーバーの構成
config.app_name=アプリケーション名
@@ -981,10 +1077,9 @@ config.offline_mode=オフラインモード
config.disable_router_log=ルーターのログを無効にする
config.run_user=実行ユーザ
config.run_mode=実行モード
config.repo_root_path=リポジトリのルートパス
config.git_version=Git Version
config.static_file_root_path=静的ファイルのルートパス
config.log_file_root_path=ログ ファイルのルート パス
config.script_type=スクリプトの種類
config.reverse_auth_user=リバース認証ユーザ
config.ssh_config=SSH Configuration
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Keygen ('ssh-keygen') Path
config.ssh_minimum_key_size_check=Minimum Key Size Check
config.ssh_minimum_key_sizes=Minimum Key Sizes
config.repo_config=Repository Configuration
config.repo_root_path=リポジトリのルートパス
config.script_type=スクリプトの種類
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=データベースの構成
config.db_type=タイプ
config.db_host=ホスト

1249
conf/locale/locale_ko-KR.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@ explore=Izpētīt
help=Palīdzība
sign_in=Pierakstīties
sign_out=Izrakstīties
sign_up=Pieteikties
sign_up=Reģistrēties
register=Reģistrēties
website=Mājas lapa
version=Versija
@@ -48,7 +48,7 @@ cancel=Atcelt
install=Instalācija
title=Instalācijas soļi pirmo reizi palaižot
docker_helper=Ja Gogs tiek lietots zem Docker, izlasiet uzmanīgi <a target="_blank" href="%s">vadlīnijas</a>, pirms ko maināt šajā lapā!
requite_db_desc=Gogs nepieciešams MySQL, PostgreSQL, SQLite3 vai TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Datu bāzes iestatījumi
db_type=Datu bāzes veids
host=Resursdators
@@ -58,9 +58,8 @@ db_name=Datu bāzes nosaukums
db_helper=Nepieciešams izmantot MySQL INNODB dzini ar rakstzīmju kopu utf8_general_ci.
ssl_mode=SSL režīms
path=Ceļš
sqlite_helper=SQLite3 vai TiDB datu bāzēs faila ceļš.<br>Izmantojiet absolūto ceļu, startējot kā servisu.
err_empty_db_path=Nepieciešams norādīt SQLite3 vai TiDB datu bāzes atrašanās vietu.
err_invalid_tidb_name=TiDB datu bāzes nosaukums nevar saturēt simbolus "." un "-".
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Reģistrāciju nevar atslēgt, kamēr nav izveidots administratora konts.
err_empty_admin_password=Administratora kontam ir obligāti jānorāda parole.
@@ -75,6 +74,8 @@ domain=Domēns
domain_helper=Tas ietekmē SSH klonēšanas URL.
ssh_port=SSH ports
ssh_port_helper=Porta numurs, kuru izmanto Jūsu SSH serveris, atstājiet tukšu, ja nevēlaties izmantot SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=HTTP ports
http_port_helper=Porta numurs pēc kura lietojumprogrammai būs iespējams pieslēgties.
app_url=Lietotnes URL
@@ -96,8 +97,8 @@ offline_mode=Iespējot bezsaistes režīmu
offline_mode_popup=Atspējot CDN arī produkcijas režīmā, visi resursu faili tiks piegādāti no servera.
disable_gravatar=Atspējot Gravatar pakalpojumu
disable_gravatar_popup=Atspējot Gravatar un citus avotus, visus avatarus augšupielādēts lietotāji vai izmantos noklusēto attēlu.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Iespējot apvienoto profila bilžu meklētāju
federated_avatar_lookup_popup=Iespējot apvienoto profila bilžu meklētāju, lai izmantotu atvērtā koda apvienoto servisu balstītu uz libravatar.
disable_registration=Atspējot lietotāju reģistrāciju
disable_registration_popup=Atspējot lietotāju reģistrāciju, tikai administrators varēs izveidot jaunus lietotāju kontus.
enable_captcha=Iespējot drošības kodu
@@ -116,6 +117,7 @@ sqlite3_not_available=Jūsu versija neatbalsta SQLite3, lūdzu lejupielādējiet
invalid_db_setting=Datu bāzes iestatījums nav pareizs: %v
invalid_repo_path=Repozitorija atrašanās vieta ir nekorekta: %v
run_user_not_match=Izpildes lietotājs nav pašreizējais lietotājs: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=Neizdevās saglabāt konfigurāciju: %v
invalid_admin_setting=Nekorekts admin konta iestatījums: %v
install_success=Laipni lūdzam! Mēs priecājamies, ka Jūs izvēlaties Gogs, patīkamu lietošanu!
@@ -137,6 +139,7 @@ issues.in_your_repos=Jūsu repozitorijos
[explore]
repos=Repozitoriji
users=Lietotāji
organizations=Organizations
search=Meklēt
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Ar Jūsu kontu nav atļauts pieteikties, sazinoties ar lapas
resent_limit_prompt=Atvainojiet, Jūs sūtījāt aktivizācijas e-pastu pārāk bieži. Lūdzu, gaidiet 3 minūtes.
has_unconfirmed_mail=Sveiki %s, Jums ir neapstiprināta e-pasta adrese (<b>%s</b>). Ja neesat saņēmis apstiprināšanas e-pastu vai Jums ir nepieciešams nosūtīt jaunu, lūdzu, nospiediet pogu, kas atrodas zemāk.
resend_mail=Nospiediet šeit, lai vēlreiz nosūtītu aktivizācijas e-pastu
email_not_associate=Šī e-pasta adrese nav saistīta ar Jūsu kontu.
send_reset_mail=Spiediet šeit, lai nosūtītu paroles maiņas vēstuli uz Jūsu e-pastu
reset_password=Atjaunot savu paroli
invalid_code=Atvainojiet, Jūsu apstiprināšanas kodam ir beidzies derīguma termiņš vai arī tas ir nepareizs.
@@ -189,6 +191,13 @@ TeamName=Komandas nosaukums
AuthName=Autorizācijas nosaukums
AdminEmail=Admin e-pasta adrese
NewBranchName=Jauna atzara nosaukums
CommitSummary=Revīzijas kopsavilkums
CommitMessage=Revīzijas ziņojums
CommitChoice=Revīzijas izvēle
TreeName=Faila ceļš
Content=Saturs
require_error=` nedrīkst būt tukšs.`
alpha_dash_error=` drīkst saturēt tikai latīņu alfabēta burtus, ciparus vai domuzīmes (-_).`
alpha_dash_dot_error=` drīkst saturēt tikai latīņu alfabēta burtus, ciparus, domuzīmes (-_) vai punktu.`
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Lietotāja vārds '%s' nav atļauts.
[settings]
profile=Profils
password=Parole
avatar=Avatar
avatar=Profila attēls
ssh_keys=SSH atslēgas
social=Sociālie konti
applications=Lietotnes
@@ -262,8 +271,8 @@ change_username_prompt=Šī izmaiņa ietekmēs saites, kas norāda uz Jūsu kont
continue=Turpināt
cancel=Atcelt
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Meklēt profila bildes pēc e-pasta
federated_avatar_lookup=Apvienotais profila bilžu meklētājs
enable_custom_avatar=Iespējot maināmu profila attēlu
choose_new_avatar=Izvēlēties jaunu profila attēlu
update_avatar=Saglabāt profila bildi
@@ -330,6 +339,10 @@ access_token_deletion=Personīgā piekļuves talona dzēšana
access_token_deletion_desc=Dzēšot personīgo piekļuves talonu, tiks liegta piekļuve aplikācijām, kas to izmanto. Vai vēlaties turpināt?
delete_token_success=Personīgās piekļuves talons veiksmīgi izdzēsts! Neaizmirstiet nomainīt uz citu aplikācijās, kas to izmantoja.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account=Dzēst savu kontu
delete_prompt=Šī darbība pilnībā izdzēsīs Jūsu kontu, kā arī tā ir <strong>NEATGRIEZENISKA</strong>!
confirm_delete_account=Apstiprināt dzēšanu
@@ -350,7 +363,7 @@ fork_from=Atdalīt no
fork_visiblity_helper=Atdalītam repozitorijam nav iespējams nomainīt tā redzamību
repo_desc=Apraksts
repo_lang=Valoda
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Izvēlieties .gitignore sagatavi
license=Licence
license_helper=Izvēlieties licences failu
readme=LasiMani
@@ -363,6 +376,7 @@ mirror_prune_desc=Izdzēst visas ārējās atsauces, kas ārējā repozitorijā
mirror_interval=Spoguļošanas intervāls (stundās)
mirror_address=Spoguļa adrese
mirror_address_desc=Lūdzu iekļaujiet adresē nepieciešamo lietotājvārdu/paroli.
mirror_last_synced=Pēdējo reizi sinhronizēts
watchers=Novērotāji
stargazers=Zvaigžņdevēji
forks=Atdalītie repozitoriji
@@ -376,14 +390,14 @@ migrate_type=Migrācijas veids
migrate_type_helper=Šis repozitorijs būs <span class="text blue">spogulis</span>
migrate_repo=Migrēt repozitoriju
migrate.clone_address=Klonēšanas adrese
migrate.clone_address_desc=Tas var būt HTTP/HTTPS/GIT URL vai ceļš uz lokālā servera.
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=Jums nav tiesību importēt lokālu repozitoriju.
migrate.invalid_local_path=Nekorents lokālais ceļš, tas neeksistē vai nav direktorijs.
migrate.failed=Migrācija neizdevās: %v
mirror_from=spogulis no
forked_from=atdalīts no
fork_from_self=Nav iespējams atdalīt repozitoriju, kuram esat īpašnieks!
copy_link=Kopēt
copy_link_success=Nokopēts!
copy_link_error=Nospiediet ⌘-C vai Ctrl-C, lai nokopētu
@@ -401,7 +415,7 @@ create_new_repo_command=Izveidot jaunu repozitoriju komandrindā
push_exist_repo=Nosūtīt izmaiņas no komandrindas eksistējošam repozitorijam
repo_is_empty=Šis repozitorijs ir tukšs, apskatiet atkal vēlāk!
code=Kods
files=Files
branch=Atzars
tree=Koks
filter_branch_and_tag=Filtrēt atzarus vai tagus
@@ -418,7 +432,48 @@ file_history=Vēsture
file_view_raw=Rādīt neapstrādātu
file_permalink=Patstāvīgā saite
file_too_large=Šis fails ir par lielu, lai to parādītu
video_not_supported_in_browser=Your browser doesn't support HTML5 video tag.
editor.new_file=Jauns fails
editor.upload_file=Augšupielādēt failu
editor.edit_file=Labot failu
editor.preview_changes=Priekšskatīt izmaiņas
editor.cannot_edit_non_text_files=Nevar rediģēt failus, kas nav teksta faili
editor.edit_this_file=Rediģēt šo failu
editor.must_be_on_a_branch=Ir jābūt izvēlētam atzaram, lai varētu veikt vai piedāvāt izmaiņas šim failam
editor.fork_before_edit=Lai varētu labot failu ir nepieciešams atdalīt repozitoriju
editor.delete_this_file=Dzēst šo failu
editor.must_have_write_access=Jums ir jābūt rakstīšanas tiesībām, lai varētu veikt vai piedāvāt izmaiņas šim failam
editor.file_delete_success=Fails '%s' ir veiksmīgi izdzēsts!
editor.name_your_file=Ievadiet faila nosaukumu...
editor.filename_help=Lai pievienotu direktoriju, ierakstiet tās nosaukumu un nospiediet /. Lai noņemtu direktoriju, ielieciet kursoru pirms faila nosaukuma un nospiediet atpakaļatkāpes taustiņu.
editor.or=vai
editor.cancel_lower=atcelt
editor.commit_changes=Pabeigt revīziju
editor.add_tmpl=Pievienot '%s/<filename>'
editor.add=Pievienot '%s'
editor.update=Atjaunināt '%s'
editor.delete=Dzēst '%s'
editor.commit_message_desc=Pievienot neobligātu paplašinātu aprakstu...
editor.commit_directly_to_this_branch=Apstiprināt revīzijas izmaiņas atzarā <strong class="branch-name">%s</strong>.
editor.create_new_branch=Izveidot <strong>jaunu atzaru</strong> un izmaiņu pieprasījumu šai revīzijai.
editor.new_branch_name_desc=Jaunā atzara nosaukums...
editor.cancel=Atcelt
editor.filename_cannot_be_empty=Nav ievadīts faila nosaukums.
editor.branch_already_exists=Atzars '%s' šajā repozitorijā jau eksistē.
editor.directory_is_a_file=Ieraksts '%s' vecāka ceļā ir fails nevis direktorija šajā repozitorijā.
editor.file_is_a_symlink=The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory=Faila nosaukums '%s' sakrīt ar direktorijas nosaukumu šajā repozitorijā.
editor.file_editing_no_longer_exists=Fails '%s', ko labojat, vairs neeksistē repozitorijā.
editor.file_changed_while_editing=Faila saturs ir mainījies kopš brīža, kad sākāt to labot. <a target="_blank" href="%s">Nospiediet šeit</a>, lai redzētu kas ir mainījies vai <strong>nospiediet atkārtoti pabeigt revīziju</strong>, lai pārrakstītu izmaiņas.
editor.file_already_exists=Fails ar nosaukumu '%s' repozitorijā jau eksistē.
editor.no_changes_to_show=Nav izmaiņu, ko rādīt.
editor.fail_to_update_file=Neizdevās izmainīt/izveidot failu '%s', kļūda: %v
editor.add_subdir=Pievienot apakšdirektoriju...
editor.unable_to_upload_files=Neizdevās augšupielādēt failus uz direktoriju '%s', kļūda: %v
editor.upload_files_to_dir=Augšupielādēt failus uz direktoriju '%s'
commits.commit_history=Commit History
commits.commits=Revīzijas
commits.search=Meklēt revīzijas
commits.find=Meklēt
@@ -444,6 +499,11 @@ issues.create=Pieteikt problēmu
issues.new_label=Jauna etiķete
issues.new_label_placeholder=Etiķetes nosaukums...
issues.create_label=Izveidot etiķeti
issues.label_templates.title=Ielādēt sākotnēji noteikto etiķešu kopu
issues.label_templates.info=Nav definēta neviena etiķete. Nospiediet pogu "Izveidot etiķeti", lai to izveidotu vai izmantojiet zemāk piedāvātās etiķetes.
issues.label_templates.helper=Izvēlieties etiķešu kopu
issues.label_templates.use=Izmantot šo etiķešu kopu
issues.label_templates.fail_to_load_file=Neizdevās ielādēt etiķetes sagataves failu '%s': %v
issues.open_tab=%d atvērti
issues.close_tab=%d aizvērti
issues.filter_label=Etiķete
@@ -485,8 +545,7 @@ issues.commit_ref_at=`pieminēja šo problēmu revīzijā <a id="%[1]s" href="#%
issues.poster=Autors
issues.collaborator=Līdzstrādnieks
issues.owner=Īpašnieks
issues.sign_up_for_free=Pievienojieties
issues.sign_in_require_desc=, lai piedalītos diskusijā. Jau ir konts? <a href="%s">Pierakstieties, lai komentētu</a>
issues.sign_in_require_desc=<a href="%s">Pierakstieties</a>, lai pievienotos šai sarunai.
issues.edit=Labot
issues.cancel=Atcelt
issues.save=Saglabāt
@@ -501,6 +560,8 @@ issues.label_deletion=Etiķetes dzēšana
issues.label_deletion_desc=Dzēšot šo etiķeti, tā tiks noņemta no visām saistītajām problēmām. Vai vēlaties turpināt?
issues.label_deletion_success=Etiķete tika veiksmīgi izdzēsta!
issues.num_participants=%d dalībnieki
issues.attachment.open_tab=`Noklikšķiniet, lai apskatītos "%s" jaunā logā`
issues.attachment.download=`Noklikšķiniet, lai lejupielādētu "%s"`
pulls.new=Jauns izmaiņu pieprasījums
pulls.compare_changes=Salīdzināt izmaiņas
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Šis izmaiņu pieprasījums nevar tikt automātiski
pulls.cannot_auto_merge_helper=Lūdzu sapludiniet manuāli, lai atrisinātu konfliktus.
pulls.merge_pull_request=Izmaiņu pieprasījuma sapludināšana
pulls.open_unmerged_pull_exists=`Jūs nevarat veikt atkārtotas atvēršanas darbību, jo jau eksistē izmaiņu pieprasījums (#%d) no šī repozitorija ar tādu pašu sapludināšanas informāciju un gaida sapludināšanu.`
pulls.delete_branch=Delete Branch
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=Jauns atskaites punkts
milestones.open_tab=%d atvērti
@@ -577,21 +640,47 @@ settings.collaboration.admin=Administrators
settings.collaboration.write=Rakstīšanas
settings.collaboration.read=Skatīšanās
settings.collaboration.undefined=Nedefinētas
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Tīmekļa āķi
settings.githooks=Git āķi
settings.basic_settings=Pamatiestatījumi
settings.mirror_settings=Spoguļa iestatījumi
settings.sync_mirror=Sinhronizēt tagad
settings.mirror_sync_in_progress=Notiek spoguļa sinhronizācija, uzgaidiet aptuveni minūti un atjaunojiet lapu.
settings.site=Oficiālā mājas lapa
settings.update_settings=Mainīt iestatījumus
settings.change_reponame_prompt=Šī izmaiņa ietekmēs saites, kas ir saistītas ar šo repozitoriju.
settings.advanced_settings=Papildu iestatījumi
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Iespējot vikivietnes
settings.use_internal_wiki=Izmantot iebūvēto vikivietni
settings.use_external_wiki=Izmantot ārējo vikivietni
settings.external_wiki_url=Ārējās Vikivietnes adrese
settings.external_wiki_url_desc=Apmeklētāji tiks novirzīti uz adresi, kad viņi uzklikšķinās uz cilnes.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Iespējot problēmu sekotāju
settings.use_internal_issue_tracker=Izmantot iebūvētu vieglu problēmu sekotāju
settings.use_external_issue_tracker=Izmantot ārējo problēmu sekotāju
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=Ārējā problēmu sekotāja adreses formāts
settings.tracker_issue_style=Ārējā problēmu reģistra nosaukumu stils:
settings.tracker_issue_style.numeric=Cipari
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Burti un cipari
settings.tracker_url_format_desc=Jūs varat izmantot <code>{user}{repo}{index}</code> lietotājvārdam, repozitorija nosaukumam un problēmas identifikātoram.
settings.pulls_desc=Iespējot izmaiņu pieprasījumus lai saņemtu publiskus ieguldījumus
settings.danger_zone=Bīstamā zona
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Jaunajam īpašniekam jau ir repozitorijs ar šādu nosaukumu.
settings.convert=Konvertēt uz parastu repozitoriju
settings.convert_desc=Šo spoguli ir iespējams konvertēt par parastu repozitoriju. Šī ir neatgriezeniska darbība.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Šim lietotājam pēc dzēšanas vairs nebū
settings.remove_collaborator_success=Līdzstrādnieks tika noņemts.
settings.search_user_placeholder=Meklēt lietotāju...
settings.org_not_allowed_to_be_collaborator=Organizāciju nav atļauts pievienot kā līdzstrādnieku.
settings.user_is_org_member=Lietotājs ir organizācijas biedrs, kas nevar tikt pievienots kā līdzstrādnieks.
settings.add_webhook=Pievienot tīmekļa āķi
settings.hooks_desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikomiem, kas notiek Git servisā. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Lai uzzinātu sīkāk skatieties <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
settings.webhook_deletion=Dzēst tīmekļa āķi
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Uz norādīto URL tiks nosūtīts <code>POST</code> pi
settings.payload_url=Vērtuma URL
settings.content_type=Satura tips
settings.secret=Noslēpums
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Lietotājvārds
settings.slack_icon_url=Ikonas URL
settings.slack_color=Krāsa
@@ -665,6 +755,8 @@ settings.event_send_everything=Vēlos saņemt <strong>visu</strong>.
settings.event_choose=Atzīmēt, ko vēlos saņemt.
settings.event_create=Izveidot
settings.event_create_desc=Atzara vai taga izveidošana
settings.event_pull_request=Izmaiņu pieprasījums
settings.event_pull_request_desc=Atvērts, aizvērts, atkāroti atvērts, labots, piešķirts vai noņemts izmaiņu pieprasījums, vai mainīta etiķete, vai veikta sinhronizācija.
settings.event_push=Izmaiņu nosūtīšana
settings.event_push_desc=Git izmaiņu nosūtīšana uz repozitoriju
settings.active=Aktīvs
@@ -676,10 +768,12 @@ settings.delete_webhook=Dzēst tīmekļa āķi
settings.recent_deliveries=Pēdējās piegādes
settings.hook_type=Āķa veids
settings.add_slack_hook_desc=PIevienot <a href="%s">Slack</a> integrāciju Jūsu repozitorijā.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Talons
settings.slack_domain=Domēns
settings.slack_channel=Kanāls
settings.deploy_keys=Izvietot atslēgas
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Pievienot izvietošanas atslēgu
settings.deploy_key_desc=Izvietošanas atslēgai ir tikai lasīšanas piekļuve. Tā nav tā pati kā Jūsu personīgā konta SSH atslēga.
settings.no_deploy_keys=Nav pievienota neviena izvietošanas atslēga.
@@ -758,6 +852,7 @@ team_permission_desc=Kādām tiesībām šai komandai būtu jābūt?
form.name_reserved=Organizācijas nosaukums '%s' ir rezervēts.
form.name_pattern_not_allowed=Organizācijas nosaukums '%s' nav atļauts.
form.team_name_reserved=Team name '%s' is reserved.
settings=Iestatījumi
settings.options=Opcijas
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Veikt repozitoriju datu sakārtošānu (git gc)
dashboard.git_gc_repos_success=Datu sakārtošana visiem repozitorijiem veiksmīgi pabeigta.
dashboard.resync_all_sshkeys=Pārrakstīt '.ssh/authorized_keys' failu (brīdinājums: ne-Git atslēgas tiks pazaudētas)
dashboard.resync_all_sshkeys_success=Visas publiskās atslēgas tika veiksmīgi pārrakstītas.
dashboard.resync_all_update_hooks=Pārrakstīt visu repozitoriju izmaiņu āķus (nepieciešams, ja tiek mainīta konfigurācijas faila atrašanās vieta)
dashboard.resync_all_update_hooks_success=Visu repozitoriju izmaiņu āķi tika veiksmīgi pārrakstīti.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Atkārtoti inicializēt visus repozitorija ierakstus, kam trūkst Git failu
dashboard.reinit_missing_repos_success=Visi repozitorija ieraksti, kam trūkst Git faili, tika atkārtoti inicializēti.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Autentifikācijas dzēšana
auths.delete_auth_desc=Šī autentifikācija tiks dzēsta, vai vēlaties turpināt?
auths.still_in_used=Daži lietotāji joprojām izmanto šo autentifikācijas veidu. Nepieciešams veikt šo lietotāju konvertāciju vai dzēšanu.
auths.deletion_success=Autentifikācija tika veiksmīgi izdzēsta!
auths.login_source_exist=Login source '%s' already exists.
config.server_config=Servera konfigurācija
config.app_name=Lietotnes nosaukums
@@ -981,10 +1077,9 @@ config.offline_mode=Bezsaistes režīms
config.disable_router_log=Atspējot maršrutētāja žurnalizēšanu
config.run_user=Izpildes lietotājs
config.run_mode=Izpildes režīms
config.repo_root_path=Repozitoriju glabāšanas vieta
config.git_version=Git Version
config.static_file_root_path=Statisko failu atrašanās vieta
config.log_file_root_path=Žurnalizēšanas failu glabāšanas vieta
config.script_type=Skripta veids
config.reverse_auth_user=Reversā lietotāja autentifikācija
config.ssh_config=SSH konfigurācija
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Keygen ('ssh-keygen') ceļš
config.ssh_minimum_key_size_check=Minimālā atslēgas lieluma pārbaude
config.ssh_minimum_key_sizes=Minimālais atslēgas lielums
config.repo_config=Repository Configuration
config.repo_root_path=Repozitoriju glabāšanas vieta
config.script_type=Skripta veids
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Datu bāzes konfigurācija
config.db_type=Veids
config.db_host=Resursdators
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Sīkdatņu glabāšanas ilgums
config.picture_config=Attēlu konfigurācija
config.picture_service=Lokāli attēli
config.disable_gravatar=Atspējot Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Iespējot apvienotās profila bildes
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Git konfigurācija
config.git_disable_diff_highlight=Atspējot salīdzināšanas sintakses iekrāsošanu
config.git_max_diff_lines=Maksimālais salīdzināmo rindu skaits vienam failam
config.git_max_diff_line_characters=Maksimālais salīdzināmo simbolu skaits vienai rindai
config.git_max_diff_files=Maksimālais salīdzināmo failu skaits, ko attēlot
config.git_gc_args=GC argumenti
config.git_migrate_timeout=Migrācijas noilgums
config.git_mirror_timeout=Spoguļa atjaunošanas noilgums
config.git_clone_timeout=Klonēšanas darbības noilgums
config.git_pull_timeout=Izmaiņu saņemšanas darbības noilgums
config.git_gc_timeout=GC darbības noilgums
config.log_config=Žurnalizēšanas konfigurācija
config.log_mode=Žurnalizēšanas veids

View File

@@ -13,7 +13,7 @@ version=Versie
page=Pagina
template=Sjabloon
language=Taal
create_new=Creëren...
create_new=Toevoegen...
user_profile_and_more=Gebruikersprofiel en meer
signed_in_as=Aangemeld als
@@ -48,19 +48,18 @@ cancel=Annuleren
install=Installatie
title=Installatiestappen voor de eerste keer opstarten
docker_helper=Als u gebruik maakt Gogs binnen Docker, lees dan de <a target="_blank" href="%s">richtlijnen</a> voordat u iets veranderen op deze pagina!
requite_db_desc=Gogs vereist MySQL, PostgreSQL, SQite3 of TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Database-instellingen
db_type=Database-type
host=Host
user=Gebruikersnaam
password=Wachtwoord
db_name=Database naam
db_name=Databasenaam
db_helper=Gebruik InnoDB engine met utf8_general_ci karakterset voor MySQL.
ssl_mode=SSL-modus
path=Pad
sqlite_helper=Het pad van de SQLite3- of TiDB-database.<br>Als u Gogs start als een service, geef dan een absoluut pad op.
err_empty_db_path=SQLite3 of TiDB databankpad mag niet leeg.
err_invalid_tidb_name=TiDB databank naam niet tekens kunnen "." en "-".
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Je kunt niet de registratie uit te schakelen zonder een beheerders account.
err_empty_admin_password=Beheerder wachtwoord kan niet leeg zijn.
@@ -75,6 +74,8 @@ domain=Domein
domain_helper=Dit heeft invloed op de SSH kloon URLs
ssh_port=SSH-poort
ssh_port_helper=Nummer van de poort die uw SSH-server gebruikt, laat dit leeg om de SSH functie uit te schakelen.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=HTTP-poort
http_port_helper=Poortnummer waar het programma naar luistert.
app_url=Applicatie URL
@@ -116,6 +117,7 @@ sqlite3_not_available=Uw versie biedt geen ondersteuning voor SQLite3, download
invalid_db_setting=Uw database instellingen zijn niet correct: %v
invalid_repo_path=Repositorie basis map is niet correct: %v
run_user_not_match=De uitvoerende gebruiker is niet de huidig gebruiker: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=Kan de configuratie niet opslaan: %v
invalid_admin_setting=Uw admin-instellingen zijn niet geldig: %v
install_success=Welkom! Wij zijn veheugd dat u voor Gogs heeft gekozen, veel plezier en tot ziens
@@ -126,7 +128,7 @@ uname_holder=Gebruikersnaam of e-mail
password_holder=Wachtwoord
switch_dashboard_context=Wissel voorpaginacontext
my_repos=Mijn repositories
show_more_repos=Show more repositories...
show_more_repos=Toon meer repositories...
collaborative_repos=Gedeelde repositories
my_orgs=Mijn organisaties
my_mirrors=Mijn mirrors
@@ -137,6 +139,7 @@ issues.in_your_repos=In uw repositories
[explore]
repos=Repositories
users=Gebruikers
organizations=Organisaties
search=Zoeken
[auth]
@@ -151,12 +154,11 @@ forget_password=Wachtwoord vergeten?
sign_up_now=Een account nodig? Meld u nu aan.
confirmation_mail_sent_prompt=Een bevestigingsemail is gestuurd naar <b>%s</b>, Bevestig u aanvraag binnen %d uren om uw registratie te voltooien.
active_your_account=Activeer uw account
prohibit_login=Login Prohibited
prohibit_login_desc=Your account is prohibited to login, please contact site admin.
prohibit_login=Inloggen niet toegestaan
prohibit_login_desc=U mag met dit account niet inloggen, neem contact op met de websitebeheerder.
resent_limit_prompt=Sorry, u heeft te snel na elkaar een aanvraag gedaan voor een activatie mail. Wacht drie minuten voor uw volgende aanvraag.
has_unconfirmed_mail=Beste %s, u heeft een onbevestigd e-mailadres (<b>%s</b>). Als u nog geen bevestiging heeft ontvangen, of u een nieuwe aanvraag wilt doen, klik dan op de onderstaande knop.
resend_mail=Klik hier om uw activatie mail nog een keer te verzenden
email_not_associate=Dit e-mailadres is niet gekoppeld aan een account.
send_reset_mail=Klik hier om uw wachtwoord reset mail (nogmaals) te versturen
reset_password=Reset uw wachtwoord
invalid_code=Sorry, uw bevestigingscode is verlopen of niet meer geldig.
@@ -189,6 +191,13 @@ TeamName=Team naam
AuthName=Autorisatienaam
AdminEmail=E-mail beheerder
NewBranchName=Nieuwe branch naam
CommitSummary=Commit samenvatting
CommitMessage=Commit bericht
CommitChoice=Commit choice
TreeName=Bestandspad
Content=Inhoud
require_error=kan niet leeg zijn.
alpha_dash_error=moet een valide alfanumeriek of dash(-_) karakter zijn.
alpha_dash_dot_error=moet een valide alfanumeriek, dash(-_) of (.) punt karakter zijn.
@@ -225,7 +234,7 @@ org_still_own_repo=De organisatie heeft nog eigendomen op repositories. U moet d
target_branch_not_exist=Doel branch bestaat niet
[user]
change_avatar=Change your avatar
change_avatar=Wijzig je profielfoto
join_on=Aangemeld op
repositories=repositories
activity=Openbare activiteit
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Het gebruikersnaam patroon '%s' is niet toegestaan
[settings]
profile=Profiel
password=Wachtwoord
avatar=Avatar
avatar=Profielfoto
ssh_keys=SSH-sleutels
social=Sociale netwerk-accounts
applications=Toepassingen
@@ -262,7 +271,7 @@ change_username_prompt=Deze verandering zal de weg links hebben betrekking op uw
continue=Doorgaan
cancel=Annuleren
lookup_avatar_by_mail=Lookup Avatar by mail
lookup_avatar_by_mail=Zoek profielfoto per email
federated_avatar_lookup=Federated Avatar Lookup
enable_custom_avatar=Aangepaste avatar inschakelen
choose_new_avatar=Kies een nieuwe avatar
@@ -330,6 +339,10 @@ access_token_deletion=Persoonlijke toegang token verwijderen
access_token_deletion_desc=Verwijderen van deze persoonlijke toegang token zal alle verwante toegang verwijderen. Wilt u doorgaan?
delete_token_success=Persoonlijke toegangstoken is met succes verwijderd! Vergeet niet uw toepassingen ook bij te werken.
orgs.none=U bent geen lid van een organisatie.
orgs.leave_title=Een organisatie verlaten
orgs.leave_desc=U verliest toegang tot alle repositories en teams nadat u de organisatie verlaten hebt. Wilt u doorgaan?
delete_account=Verwijder uw account
delete_prompt=Deze handeling zal uw account definitief verwijderen, u kunt dit <strong> NIET </strong> terug draaien!
confirm_delete_account=Bevestig verwijdering
@@ -350,7 +363,7 @@ fork_from=Afsplitsing van
fork_visiblity_helper=U kunt de zichtbaarheid van een geforkte repository niet aanpassen.
repo_desc=Omschrijving
repo_lang=Taal
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Selecteer .gitignore sjablonen
license=Licentie
license_helper=Selecteer een licentie bestand
readme=Leesmij-bestand
@@ -358,11 +371,12 @@ readme_helper=Selecteer een sjabloon voor het Leesmij-bestand
auto_init=Initialiseer deze repositorie met de geselecteerde bestanden en sjabloon
create_repo=Nieuwe repository
default_branch=Standaard branch
mirror_prune=Prune
mirror_prune=Opschonen
mirror_prune_desc=Remove any remote-tracking references that no longer exist on the remote
mirror_interval=Mirror interval(uur)
mirror_address=Kopie-adres
mirror_address_desc=Gelieve noodzakelijke gebruikersgegevens in de adresbalk.
mirror_last_synced=Laatste synchronisatie
watchers=Volgers
stargazers=Stargazers
forks=Forks
@@ -376,14 +390,14 @@ migrate_type=Migratie type
migrate_type_helper=Deze repositorie zal een <span class="text blue">mirror</span> zijn
migrate_repo=Migreer repositorie
migrate.clone_address=Clone adres
migrate.clone_address_desc=Dit kan een HTTP/HTTPS/GIT URL zijn of een lokaal pad.
migrate.clone_address_desc=Dit kan een HTTP/HTTPS/GIT URL zijn.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=U bent niet toegestaan om deze lokale repositories te importeren.
migrate.invalid_local_path=Ongeldig lokaal pad, het pad bestaat niet of het is geen map.
migrate.failed=Migratie is mislukt: %v
mirror_from=spiegel van
forked_from=geforked van
fork_from_self=U kunt geen repository forken die u al beheert!
copy_link=Kopieer
copy_link_success=Gekopieerd!
copy_link_error=Druk op ⌘-C of Ctrl-C om te kopiëren
@@ -401,7 +415,7 @@ create_new_repo_command=Maak een nieuwe repositorie aan vanaf de console
push_exist_repo=Push een bestaande repositorie vanaf de console
repo_is_empty=Deze repositories is leeg is, probeer het later opnieuw!
code=Code
files=Bestanden
branch=Aftakking
tree=Boom
filter_branch_and_tag=Filter branch of tag
@@ -417,8 +431,49 @@ file_raw=Ruwe
file_history=Geschiedenis
file_view_raw=Weergave ruwe
file_permalink=Permalink
file_too_large=This file is too large to be shown
file_too_large=Dit bestand is te groot om te worden getoond
video_not_supported_in_browser=Uw browser ondersteunt geen HTML5 video label.
editor.new_file=Nieuw bestand
editor.upload_file=Bestand uploaden
editor.edit_file=Bewerk bestand
editor.preview_changes=Wijzigingen nagaan
editor.cannot_edit_non_text_files=Kan niet-tekstbestanden niet bewerken
editor.edit_this_file=Bestand aanpassen
editor.must_be_on_a_branch=Je moet in een branch zijn om aanpassingen te maken of voor te stellen
editor.fork_before_edit=Je moet deze repository eerst vorken om dit bestand aan te kunnen passen
editor.delete_this_file=Verwijder dit bestand
editor.must_have_write_access=You must have write access to make or propose changes to this file
editor.file_delete_success=Bestand '%s' is succesvol verwijderd!
editor.name_your_file=Bestandsnaam...
editor.filename_help=To add directory, just type it and press /. To remove a directory, go to the beginning of the field and press backspace.
editor.or=of
editor.cancel_lower=annuleren
editor.commit_changes=Commit Changes
editor.add_tmpl='%s/<filename>' toevoegen
editor.add='%s' toevoegen
editor.update='%s' updaten
editor.delete='%s' verwijderen
editor.commit_message_desc=Add an optional extended description...
editor.commit_directly_to_this_branch=Commit directly to the <strong class="branch-name">%s</strong> branch.
editor.create_new_branch=Create a <strong>new branch</strong> for this commit and start a pull request.
editor.new_branch_name_desc=Naam nieuwe aftakking...
editor.cancel=Annuleren
editor.filename_cannot_be_empty=Bestandsnaam mag niet leeg zijn.
editor.branch_already_exists=Aftakking '%s' bestaat al in deze repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.file_is_a_symlink=The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=Er zijn geen wijzigingen om weer te geven.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
editor.add_subdir=Submap toevoegen...
editor.unable_to_upload_files=Failed to upload files to '%s' with error: %v
editor.upload_files_to_dir=Bestanden uploaden naar '%s'
commits.commit_history=Commit History
commits.commits=Commits
commits.search=Zoeken
commits.find=zoek
@@ -444,6 +499,11 @@ issues.create=Maak probleem
issues.new_label=Nieuw Label
issues.new_label_placeholder=Tekst label...
issues.create_label=Maak label
issues.label_templates.title=Load a predefined set of labels
issues.label_templates.info=Er zijn nog geen labels. U kunt op de 'Nieuw label'-knop drukken om een nieuwe toe te voegen of een voorgedefinieerde set hieronder gebruiken.
issues.label_templates.helper=Selecteer een labelset
issues.label_templates.use=Deze labelset gebruiken
issues.label_templates.fail_to_load_file=Failed to load label template file '%s': %v
issues.open_tab=%d Open
issues.close_tab=%d gesloten
issues.filter_label=Label
@@ -471,8 +531,8 @@ issues.next=Volgende
issues.open_title=Open
issues.closed_title=Gesloten
issues.num_comments=%d opmerkingen
issues.commented_at=`commented <a href="#%s">%s</a>`
issues.delete_comment_confirm=Are you sure you want to delete this comment?
issues.commented_at=`reageerde <a href="#%s">%s</a>`
issues.delete_comment_confirm=Weet u zeker dat u deze reactie wilt verwijderen?
issues.no_content=Er is nog geen inhoud.
issues.close_issue=Sluit
issues.close_comment_issue=Sluit en geef commentaar
@@ -485,8 +545,7 @@ issues.commit_ref_at=`verwees naar dit probleem vanuit een commit <a id="%[1]s"
issues.poster=Poster
issues.collaborator=Medewerker
issues.owner=Eigenaar
issues.sign_up_for_free=Gratis aanmelden
issues.sign_in_require_desc=om deel te nemen in deze conversatie. Heeft u al een account? <a href="%s">Meld u aan om te reageren</a>
issues.sign_in_require_desc=<a href="%s">Sign in</a> to join this conversation.
issues.edit=Bewerken
issues.cancel=Annuleren
issues.save=Opslaan
@@ -501,6 +560,8 @@ issues.label_deletion=Verwijder label
issues.label_deletion_desc=Het verwijderen van dit label zal alle informatie in de gerelateerde problemen verwijderen. Wilt u doorgaan?
issues.label_deletion_success=Label werd met succes verwijderd!
issues.num_participants=%d deelnemers
issues.attachment.open_tab=`Klik om "%s" in een nieuw tabblad te bekijken`
issues.attachment.download=`Klik om te downloaden "%s"`
pulls.new=Nieuwe Pull aanvraag
pulls.compare_changes=Vergelijk veranderingen
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Dit pull-request kan niet worden gemerged omdat er
pulls.cannot_auto_merge_helper=Gelieve beide versies manueel samen te voegen om de conflicten op te lossen.
pulls.merge_pull_request=Samenvoegen van pull verzoek
pulls.open_unmerged_pull_exists=U kan de bewerking 'heropenen' niet uitvoeren omdat er al een pull-aanvraag (#%d) is van dezelfde repository met dezelfde informatie. Voeg deze eerst samen.
pulls.delete_branch=Aftakking verwijderen
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=Nieuwe mijlpaal
milestones.open_tab=%d geopend
@@ -573,32 +636,59 @@ wiki.last_updated=Laatst bijgewerkt: %s
settings=Instellingen
settings.options=Opties
settings.collaboration=Samenwerking
settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.collaboration.admin=Beheer
settings.collaboration.write=Schrijven
settings.collaboration.read=Lezen
settings.collaboration.undefined=Niet gedefinieerd
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webhooks
settings.githooks=Git-hooks
settings.basic_settings=Basis instellingen
settings.mirror_settings=Mirror Settings
settings.sync_mirror=Nu synchroniseren
settings.mirror_sync_in_progress=Mirror syncing is in progress, please refresh page in about a minute.
settings.site=Officiële site
settings.update_settings=Instellingen bewerken
settings.change_reponame_prompt=Deze verandering zal gevolgen hebben voor hoe links zich verhouden tot de repository.
settings.advanced_settings=Geavanceerde opties
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Wiki-systeem inschakelen
settings.use_internal_wiki=Ingebouwde wiki gebruiken
settings.use_external_wiki=Externe wiki gebruiken
settings.external_wiki_url=Externe wiki-URL
settings.external_wiki_url_desc=Bezoekers worden doorgestuurd naar de URL als ze op het tabblad klikken.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Kwestietracker inschakelen
settings.use_internal_issue_tracker=Gebruik ingebouwde eenvoudige kwestietracker
settings.use_external_issue_tracker=Externe issuetracker gebruiken
settings.external_tracker_url=URL externe kwestietracker
settings.external_tracker_url_desc=Bezoekers worden doorgestuurd naar de URL als ze op het tabblad klikken.
settings.tracker_url_format=URL-formaat externe issuetracker
settings.tracker_issue_style=External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric=Numeric
settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_issue_style=Naamgevingstijl externe kwestietracker:
settings.tracker_issue_style.numeric=Nummeriek
settings.tracker_issue_style.alphanumeric=Alfanummeriek
settings.tracker_url_format_desc=U kan de aanduidingen <code>{user} {repo} {index}</code> gebruiken voor de gebruikersnaam, de naam van de repository en de lijst van open tickets.
settings.pulls_desc=Schakel 'pull request' in om publieke bijdragen te mogelijk te maken
settings.danger_zone=Gevaren zone
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=De nieuwe eigenaar heeft al een repositorie met deze naam
settings.convert=Converteren naar gewone repository
settings.convert_desc=U kunt deze mirror converteren naar een gewone repository. Dit kan niet ongedaan worden gemaakt.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Deze gebruiker zal niet langer toegang hebbe
settings.remove_collaborator_success=medewerker is verwijderd.
settings.search_user_placeholder=Zoek gebruiker...
settings.org_not_allowed_to_be_collaborator=De organisatie kan niet toegevoegd worden als medewerker.
settings.user_is_org_member=Gebruiker is lid van de organisatie die als een medewerker kan niet worden toegevoegd.
settings.add_webhook=Webhook toevoegen
settings.hooks_desc=Webhooks dat de externe diensten om kennisgevingen te ontvangen wanneer bepaalde gebeurtenissen op Gogs plaatsvinden. Wanneer de opgegeven gebeurtenissen plaatsvinden, sturen we een POST-aanvraag naar elk van de URL's die u opgeeft. Meer informatie vindt u in onze <a target="_blank" href="%s"> Webhooks gids</a>.
settings.webhook_deletion=Webhook verwijderen
@@ -656,6 +745,7 @@ settings.add_webhook_desc=We sturen een <code>POST</code>-aanvraag naar de onder
settings.payload_url=Nettolading URL
settings.content_type=Content type
settings.secret=Geheim
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Gebruikersnaam
settings.slack_icon_url=Icoon URL
settings.slack_color=Kleur
@@ -665,6 +755,8 @@ settings.event_send_everything=Ik moet <strong>alles</strong> hebben.
settings.event_choose=Laat me kiezen wat ik nodig heb.
settings.event_create=Creëer
settings.event_create_desc=Branch, of tag aangemaakt
settings.event_pull_request=Pull request
settings.event_pull_request_desc=Pull request geopend, gesloten, opnieuw geopend, bewerkt, toegewezen, niet-toegewezen, label bijgewerkt, label gewist of gesynchroniseerd.
settings.event_push=Push
settings.event_push_desc=Git push naar een repository
settings.active=Actief
@@ -676,10 +768,12 @@ settings.delete_webhook=Webhook verwijderen
settings.recent_deliveries=Recente bezorgingen
settings.hook_type=Type hook
settings.add_slack_hook_desc=<a href="%s"> toegestane vertraging</a> integratie toevoegen aan uw repository.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Slack token
settings.slack_domain=Slack domein
settings.slack_channel=Slack kanaal
settings.deploy_keys=Installeer sleutels
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Toevoegen deploy sleutel
settings.deploy_key_desc=Sleutels voor uitrol hebben enkel leesrechten. Ze zijn niet dezelfde als de SSH sleutels van persoonlijke accounts.
settings.no_deploy_keys=U hebt nog geen deploy sleutels toegevoegd.
@@ -734,7 +828,7 @@ release.deletion=Release verwijderen
release.deletion_desc=Als deze release verwijdert, worden de bijbehorende Git tag ook gewist. Wilt u doorgaan?
release.deletion_success=Release is verwijderd!
release.tag_name_already_exist=Versie met deze naam bestaat al.
release.tag_name_invalid=Tag name is not valid.
release.tag_name_invalid=Labelnaam is niet geldig.
release.downloads=Downloads
[org]
@@ -758,6 +852,7 @@ team_permission_desc=Welke privileges zou dit team moeten hebben?
form.name_reserved=Organisatienaam '%s' is gereserveerd.
form.name_pattern_not_allowed=Organisatie naampatroon '%s' is niet toegestaan.
form.team_name_reserved=Team name '%s' is reserved.
settings=Instellingen
settings.options=Opties
@@ -790,7 +885,7 @@ members.invite_desc=Voeg nieuw lid toe aan %s:
members.invite_now=Nu uitnodigen
teams.join=Lid worden
teams.leave=Vertlaat
teams.leave=Verlaat
teams.read_access=Leestoegang
teams.read_access_helper=Dit team is in staat om zijn repositories te bekijken en te klonen.
teams.write_access=Schrijf toegang
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Garbage collectie uitvoeren
dashboard.git_gc_repos_success=Garbage collectie met succes uitgevoerd.
dashboard.resync_all_sshkeys=Herschrijf '.ssh/authorized_keys' (Let op: alle sleutels die niet van Gogs zijn zullen verloren gaan!)
dashboard.resync_all_sshkeys_success=Alle publieke sleutels zijn herschreven.
dashboard.resync_all_update_hooks=Herschrijf alle repositorie-hooks (nodig als de configuratie bestandslocatie is gewijzigd)
dashboard.resync_all_update_hooks_success=Alle repositorie-hooks zijn herschreven.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Alle repositories zonder Git files opnieuw initialiseren
dashboard.reinit_missing_repos_success=Alle repositories zonder Git files zijn succesvol opnieuw geinitializeerd.
@@ -902,7 +997,7 @@ users.edit_account=Bewerk account
users.max_repo_creation=Maximum-limiet voor aanmaken van repositories
users.max_repo_creation_desc=(Zet op -1 om de globale limiet te gebruiken)
users.is_activated=Dit account is geactiveerd
users.prohibit_login=This account is prohibited to login
users.prohibit_login=Dit account is verboden om in te loggen
users.is_admin=Dit account heeft beheerdersrechten
users.allow_git_hook=Deze account beschikt over machtigingen voor het maken van Git haken
users.allow_import_local=Dit account mag lokale repositories importeren
@@ -933,7 +1028,7 @@ auths.enabled=Ingeschakeld
auths.updated=Bijgewerkt
auths.auth_type=Authenticatietype
auths.auth_name=Authenticatienaam
auths.security_protocol=Security Protocol
auths.security_protocol=Beveiligingsprotocol
auths.domain=Domein
auths.host=Host
auths.port=Poort
@@ -970,7 +1065,8 @@ auths.delete=Deze authenticatiewijze verwijderen
auths.delete_auth_title=Authenticatie verwijderd
auths.delete_auth_desc=Deze authenticatie zal verwijderd worden, wil je verdergaan?
auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
auths.deletion_success=Authentication has been deleted successfully!
auths.deletion_success=Authenticatie is met succes verwijderd!
auths.login_source_exist=Login source '%s' already exists.
config.server_config=Serverconfiguratie
config.app_name=Applicatienaam
@@ -981,10 +1077,9 @@ config.offline_mode=Offline-modus
config.disable_router_log=Router-log uitschakelen
config.run_user=Uitvoerende gebruiker
config.run_mode=Uitvoer modus
config.repo_root_path=Repositorie basis pad
config.git_version=Gitversie
config.static_file_root_path=Statische bestanden basis pad
config.log_file_root_path=Log bestand basis pad
config.script_type=Script type
config.reverse_auth_user=Omgekeerde verificatie gebruiker
config.ssh_config=SSH-configuratie
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Pad van keygen ('ssh-keygen')
config.ssh_minimum_key_size_check=Controleer minimale key-lengte
config.ssh_minimum_key_sizes=Minimale key-lengtes
config.repo_config=Repository Configuration
config.repo_root_path=Repositorie basis pad
config.script_type=Script type
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Databaseconfiguratie
config.db_type=Type
config.db_host=Host
@@ -1056,9 +1161,9 @@ config.cookie_life_time=Cookie duur leeftijd
config.picture_config=Foto configuratie
config.picture_service=Foto service
config.disable_gravatar=Gravatar uitschakelen
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Federated Avatars toestaan
config.git_config=Git Configuration
config.git_config=Gitconfiguratie
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
@@ -1100,16 +1205,16 @@ notices.delete_success=System notices have been deleted successfully.
[action]
create_repo=repositorie aangemaakt in <a href="%s">%s</a>
rename_repo=renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
rename_repo=hernoemde repository van <code>%[1]s</code> naar <a href="%[2]s">%[3]s</a>
commit_repo=push update naar <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a>
create_issue=`opende issue in <a href="%s/issues/%s">%s#%[2]s</a>`
close_issue=`closed issue <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue=`reopened issue <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
close_pull_request=`closed pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
reopen_pull_request=`reopened pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
close_issue=`sloot kwestie <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue=`heropende kwestie <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`maakte pull request <a href="%s/issues/%s">%s#%[2]s</a>`
close_pull_request=`sloot pull request <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_pull_request=`heropende pull request <a href="%s/issues/%s">%s#%[2]s</a>`
comment_issue=`reactie op issue <a href="%s/issues/%s">%s#%[2]s</a>`
merge_pull_request=`merged pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
merge_pull_request=`voegde pull request samen <a href="%s/issues/%s">%s#%[2]s</a>`
transfer_repo=repositorie verplaatst naar <code>%s</code> naar <a href="%s">%s</a>
push_tag=geduwd label <a href="%s/src/%s"> %[2]s</a> naar <a href="%[1]s"> %[3]s</a>
compare_commits=Toon vergelijking voor deze %d commits

View File

@@ -48,7 +48,7 @@ cancel=Anuluj
install=Instalacja
title=Kroki instalacyjne dla pierwszego uruchomienia
docker_helper=Jeśli używasz Gogs wewnątrz Dockera, proszę przeczytaj <a target="_blank" href="%s">wytyczne</a>, zanim zmienisz coś na tej stronie!
requite_db_desc=Gogs wymaga MySQL, PostgreSQL, SQLite3 lub TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Ustawienia bazy danych
db_type=Typ bazy danych
host=Host
@@ -58,9 +58,8 @@ db_name=Nazwa bazy danych
db_helper=Proszę użyć silnika INNODB z kodowaniem utf8_general_ci dla MySQL.
ssl_mode=Tryb SSL
path=Ścieżka
sqlite_helper=Ścieżka do pliku bazy danych SQLite3 lub TiDB. <br>Proszę użyć ścieżki bezwzględnej podczas uruchamiania usługi.
err_empty_db_path=Ścieżka do bazy danych SQLite3 lub TiDB nie może być pusta.
err_invalid_tidb_name=Nazwa bazy danych TiDB nie może zawierać znaków "." i "-".
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Rejestracji nie można wyłączyć bez tworzenia konta admina.
err_empty_admin_password=Hasło admina nie może być puste.
@@ -75,6 +74,8 @@ domain=Domena
domain_helper=To wpłynie na URLe do klonowania poprzez SSH.
ssh_port=Port SSH
ssh_port_helper=Numer portu, z którego korzysta z serwer SSH; pozostaw puste, aby wyłączyć funkcję SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=Port HTTP
http_port_helper=Numer portu na którym aplikacja jest dostępna.
app_url=Adres URL aplikacji
@@ -86,7 +87,7 @@ optional_title=Ustawienia opcjonalne
email_title=Ustawienia serwera e-mail
smtp_host=Serwer SMTP
smtp_from=Od
smtp_from_helper=Adres w polu "Od", zgodnie z RFC 5322. Może być to po prostu adres email, bądź adres w formacie "Nazwa" <email@example.com>.
smtp_from_helper=Adres w polu Od, zgodnie z RFC 5322. Może być to po prostu adres email, bądź adres w formacie Nazwa <email@example.com>.
mailer_user=E-mail nadawcy
mailer_password=Hasło nadawcy
register_confirm=Włącz potwierdzenia rejestracji
@@ -111,11 +112,12 @@ admin_password=Hasło
confirm_password=Potwierdź hasło
admin_email=E-mail administratora
install_gogs=Zainstaluj Gogs
test_git_failed=Nie udało się przetestować polecenia "git": %v
test_git_failed=Nie udało się przetestować polecenia git: %v
sqlite3_not_available=Twoje wydanie nie obsługuje SQLite3, proszę pobrać oficjalne wydanie z %s, a NIE wersję z gobuild.
invalid_db_setting=Ustawienia bazy danych nie są poprawne: %v
invalid_repo_path=Ścieżka repozytoriów nie jest poprawna: %v
run_user_not_match=Użytkownik aplikacji nie jest aktualnym użytkownikiem: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=Nie udało się zapisać konfiguracji: %v
invalid_admin_setting=Nieprawidłowe ustawienia konta admina: %v
install_success=Cześć! Cieszymy się, że wybierałeś Gogs, baw się dobrze.
@@ -137,6 +139,7 @@ issues.in_your_repos=W Twoich repozytoriach
[explore]
repos=Repozytoria
users=Użytkownicy
organizations=Organizations
search=Wyszukiwanie
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Nie możesz się zalogować na to konto, skontaktuj się z
resent_limit_prompt=Niestety, zbyt często wysyłasz e-mail aktywacyjny. Proszę odczekać 3 minuty.
has_unconfirmed_mail=Witaj, %s, masz niepotwierdzony adres e-mail (<b>%s</b>). Jeśli nie otrzymałeś wiadomości e-mail z potwierdzeniem lub potrzebujesz wysłać nową, kliknij na poniższy przycisk.
resend_mail=Kliknij tutaj, aby wysłać e-mail aktywacyjny
email_not_associate=Ten adres e-mail nie jest skojarzony z żadnym kontem.
send_reset_mail=Kliknij tutaj, aby (ponownie) wysłać e-mail z instrukcjami resetowania hasła
reset_password=Resetowanie hasła
invalid_code=Niestety, Twój kod potwierdzający wygasł lub jest nieprawidłowy.
@@ -189,6 +191,13 @@ TeamName=Nazwa zespołu
AuthName=Nazwa autoryzacji
AdminEmail=E-mail administratora
NewBranchName=Nazwa nowej gałęzi
CommitSummary=Podsumowanie commitu
CommitMessage=Wiadomość commitu
CommitChoice=Wybór commitu
TreeName=Ścieżka pliku
Content=Treść
require_error=` nie może być puste.`
alpha_dash_error=` musi się składać z prawidłowych znaków alfanumerycznych, myślników oraz podkreśleń.`
alpha_dash_dot_error=` musi się składać z prawidłowych znaków alfanumerycznych, myślników, podkreśleń oraz kropek.`
@@ -235,13 +244,13 @@ following=Obserwowani
follow=Obserwuj
unfollow=Przestań obserwować
form.name_reserved=Nazwa użytkownika "%s" jest zarezerwowana.
form.name_pattern_not_allowed=Wzorzec nazwy użytkownika "%s" jest niedozwolony.
form.name_reserved=Nazwa użytkownika %s jest zarezerwowana.
form.name_pattern_not_allowed=Wzorzec nazwy użytkownika %s jest niedozwolony.
[settings]
profile=Profil
password=Hasło
avatar=Avatar
avatar=Awatar
ssh_keys=Klucze SSH
social=Konta społecznościowe
applications=Aplikacje
@@ -262,7 +271,7 @@ change_username_prompt=Ta zmiana wpłynie na sposób w jaki łącza odnoszą si
continue=Kontynuuj
cancel=Anuluj
lookup_avatar_by_mail=Lookup Avatar by mail
lookup_avatar_by_mail=Wyszukaj Avatar po mailu
federated_avatar_lookup=Federated Avatar Lookup
enable_custom_avatar=Włącz niestandardowe awatary
choose_new_avatar=Wybierz nowy avatar
@@ -330,6 +339,10 @@ access_token_deletion=Usuwanie osobistego tokena dostępu
access_token_deletion_desc=Usunięcie tego tokena osobistego dostęp spowoduje usunięcie wszystkich powiązanych dostępów do aplikacji. Czy chcesz kontynuować?
delete_token_success=Osobisty token dostępu został usunięty pomyślnie! Nie zapomnij również zaktualizować swoich aplikacji.
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account=Usuń swoje konto
delete_prompt=Ta operacja trwale usunie Twoje konto i <strong>NIE MOŻE</strong> zostać cofnięta!
confirm_delete_account=Potwierdź usunięcie
@@ -350,7 +363,7 @@ fork_from=Forkuj z
fork_visiblity_helper=Fork nie może zmieniać swojej widoczności
repo_desc=Opis
repo_lang=Język
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Wybierz szablony pliku .gitignore
license=Licencja
license_helper=Wybierz plik licencji
readme=Readme
@@ -363,27 +376,28 @@ mirror_prune_desc=Usuń wszystkie śledzone odwołania które nie istnieją w zd
mirror_interval=Częstotliwość kopiowania (godziny)
mirror_address=Adres kopii lustrzanej
mirror_address_desc=Proszę podać wymagane poświadczenia użytkownika w adresie.
mirror_last_synced=Ostatnia synchronizacja
watchers=Obserwujący
stargazers=Polubienia
forks=Forki
form.reach_limit_of_creation=Właściciel osiągnął limit maksymalnej ilości repozytoriów %d.
form.name_reserved=Nazwa repozytorium "%s" jest zarezerwowana.
form.name_pattern_not_allowed=Wzorzec nazwy repozytorium "%s" jest niedozwolony.
form.name_reserved=Nazwa repozytorium %s jest zarezerwowana.
form.name_pattern_not_allowed=Wzorzec nazwy repozytorium %s jest niedozwolony.
need_auth=Wymaga autoryzacji
migrate_type=Typ migracji
migrate_type_helper=To repozytorium będzie <span class="text blue">kopią lustrzaną</span>
migrate_repo=Przenieś repozytorium
migrate.clone_address=Sklonuj adres
migrate.clone_address_desc=To może być adres HTTP/HTTPS/GIT lub ścieżka lokalna serwera.
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=Nie możesz importować lokalnych repozytoriów.
migrate.invalid_local_path=Ścieżka jest niepoprawna. Nie istnieje lub nie jest katalogiem.
migrate.failed=Migracja nie powiodła się: %v
mirror_from=kopia lustrzana
forked_from=sklonowany z
fork_from_self=Nie możesz forkować swojego własnego repozytorium!
copy_link=Kopiuj
copy_link_success=Skopiowane!
copy_link_error=Naciśnij klawisze ⌘-C i Ctrl-C, aby skopiować
@@ -401,7 +415,7 @@ create_new_repo_command=Utwórz nowe repozytorium z wiersza poleceń
push_exist_repo=Prześlij istniejące repozytorium z wiersza poleceń
repo_is_empty=To repozytorium jest puste, proszę wrócić później!
code=Kod
files=Files
branch=Gałąź
tree=Drzewo
filter_branch_and_tag=Filtruj gałąź lub tag
@@ -418,7 +432,48 @@ file_history=Historia
file_view_raw=Zobacz czysty
file_permalink=Bezpośredni odnośnik
file_too_large=Ten plik jest zbyt duży, aby go wyświetlić
video_not_supported_in_browser=Your browser doesn't support HTML5 video tag.
editor.new_file=Nowy plik
editor.upload_file=Załaduj plik
editor.edit_file=Edytuj plik
editor.preview_changes=Podgląd zmian
editor.cannot_edit_non_text_files=Nie można edytować plików nietekstowych
editor.edit_this_file=Edytuj ten plik
editor.must_be_on_a_branch=Musisz być na gałęzi aby zgłosić lub zaproponować zmiany do tego pliku
editor.fork_before_edit=Musisz sforkować to repozytorium przed edycją tego pliku
editor.delete_this_file=Usuń ten plik
editor.must_have_write_access=Musisz mieć uprawnienia do zapisu aby zgłosić lub zaproponować zmiany do tego pliku
editor.file_delete_success=Plik '%s' został usunięty pomyślnie!
editor.name_your_file=Nazwij plik...
editor.filename_help=Aby dodać katalog, wpisz nazwę i naciśnij przycisk /. Aby usunąć katalog, przejdź do początku pola i naciśnij klawisz backspace.
editor.or=lub
editor.cancel_lower=anuluj
editor.commit_changes=Zatwierdź zmiany
editor.add_tmpl=Dodaj '%s/<filename>'
editor.add=Dodaj '%s'
editor.update=Zaktualizuj '%s'
editor.delete=Usuń '%s'
editor.commit_message_desc=Dodaj dodatkowy rozszerzony opis...
editor.commit_directly_to_this_branch=Commituj bezpośrednio do gałęzi <strong class="branch-name">%s</strong>.
editor.create_new_branch=Stwórz <strong>nową gałąź</strong> dla tego commita i rozpocznij pull request.
editor.new_branch_name_desc=Nazwa nowej gałęzi...
editor.cancel=Anuluj
editor.filename_cannot_be_empty=Nazwa pliku nie może być pusta.
editor.branch_already_exists=Gałąź '%s' już istnieje w tym repozytorium.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.file_is_a_symlink=The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory=Nazwa '%s' jest istniejącym katalogiem w tym repozytorium.
editor.file_editing_no_longer_exists=Plik '%s' który edytujesz nie istnieje już w tym repozytorium.
editor.file_changed_while_editing=Zawartość pliku została zmieniona od rozpoczęcia edycji. <a target="_blank" href="%s">Kliknij tutaj</a> aby zobaczyć, co zostało zmienione lub <strong>naciśnij commit ponownie</strong> aby nadpisać te zmiany.
editor.file_already_exists=Nazwa pliku '%s' już istnieje w tym repozytorium.
editor.no_changes_to_show=Brak zmian do pokazania.
editor.fail_to_update_file=Tworzenie/aktualizacja pliku '%s' nie powiodła się z błędem: %v
editor.add_subdir=Dodaj podkatalog...
editor.unable_to_upload_files=Wysyłanie plików do '%s' nie powiodło się z błędem: %v
editor.upload_files_to_dir=Prześlij pliki do '%s'
commits.commit_history=Commit History
commits.commits=Commity
commits.search=Przeszukaj commity
commits.find=Szukaj
@@ -444,6 +499,11 @@ issues.create=Utwórz problem
issues.new_label=Nowa etykieta
issues.new_label_placeholder=Etykieta...
issues.create_label=Utwórz etykietę
issues.label_templates.title=Załaduj wstępnie przygotowany zestaw etykiet
issues.label_templates.info=Nie ma jeszcze żadnych etykiet. Kliknij na przycisk „Nowa etykieta” powyżej, aby utworzyć lub użyć poniższego zestawu wstępnie zdefiniowanego.
issues.label_templates.helper=Wybierz zestaw etykiet
issues.label_templates.use=Użyj ten zestaw etykiet
issues.label_templates.fail_to_load_file=Ładowanie pliku szablonu etykiety '%s' nie powiodło się: %v
issues.open_tab=Otwarte %d
issues.close_tab=Zamknięte %d
issues.filter_label=Etykieta
@@ -485,8 +545,7 @@ issues.commit_ref_at=`wspomina ten problem w commicie <a id="%[1]s" href="#%[1]s
issues.poster=Autor
issues.collaborator=Współpracownik
issues.owner=Właściciel
issues.sign_up_for_free=Zarejestruj się za darmo
issues.sign_in_require_desc=do przyłączenia się do tej rozmowy. Masz już konto? <a href="%s">Zaloguj się by komentować</a>
issues.sign_in_require_desc=<a href="%s"> Zaloguj się</a>, aby dołączyć do tej rozmowy.
issues.edit=Edytuj
issues.cancel=Anuluj
issues.save=Zapisz
@@ -501,6 +560,8 @@ issues.label_deletion=Usunięcie etykiety
issues.label_deletion_desc=Usunięcie tej etykiety spowoduje usuniecie jej ze wszystkich powiązanych problemów. Czy na pewno chcesz kontynuować?
issues.label_deletion_success=Etykieta została usunięta pomyślnie!
issues.num_participants=%d uczestników
issues.attachment.open_tab=`Kliknij, aby zobaczyć „%s” w nowej karcie`
issues.attachment.download=`Kliknij, aby pobrać „%s”`
pulls.new=Nowy pull request
pulls.compare_changes=Porównaj zmiany
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Pull request nie może być automatycznie scalony z
pulls.cannot_auto_merge_helper=Proszę scalić ręcznie, aby rozwiązać konflikty.
pulls.merge_pull_request=Scal Pull Request
pulls.open_unmerged_pull_exists=`Nie można otworzyć ponownie ponieważ już istnieje gotowy do scalenia pull request (#%d) z tego samego repozytorium z tymi samymi informacjami.`
pulls.delete_branch=Delete Branch
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=Nowy kamień milowy
milestones.open_tab=Otwarte %d
@@ -542,7 +605,7 @@ milestones.desc=Opis
milestones.due_date=Termin realizacji (opcjonalnie)
milestones.clear=Wyczyść
milestones.invalid_due_date_format=Format daty realizacji jest nieprawidłowy, musi być "rrrr-mm-dd".
milestones.create_success=Kamień milowy "%s" został utworzony pomyślnie!
milestones.create_success=Kamień milowy %s został utworzony pomyślnie!
milestones.edit=Edytuj kamień milowy
milestones.edit_subheader=Użyj lepszego opisu, tak aby nie wprowadzać w błąd użytkowników.
milestones.cancel=Anuluj
@@ -565,7 +628,7 @@ wiki.last_commit_info=%s edytuje tę stronę %s
wiki.edit_page_button=Edytuj
wiki.new_page_button=Nowa strona
wiki.delete_page_button=Usuń stronę
wiki.delete_page_notice_1=Strona zostanie usunięta <code>"%s"</code>. Bądź ostrożny.
wiki.delete_page_notice_1=Strona zostanie usunięta <code>%s</code>. Bądź ostrożny.
wiki.page_already_exists=Strona Wiki o tej samej nazwie już istnieje.
wiki.pages=Strony
wiki.last_updated=Ostatnia aktualizacja %s
@@ -577,21 +640,47 @@ settings.collaboration.admin=Administrator
settings.collaboration.write=Zapis
settings.collaboration.read=Odczyt
settings.collaboration.undefined=Niezdefiniowany
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webhooki
settings.githooks=Hooki Git
settings.basic_settings=Ustawienia podstawowe
settings.mirror_settings=Kopia lustrzana ustawień
settings.sync_mirror=Synchronizuj teraz
settings.mirror_sync_in_progress=Synchronizacja kopii lustrzanej jest w toku, odśwież stronę w ciągu minuty.
settings.site=Oficjalna Strona
settings.update_settings=Aktualizuj ustawienia
settings.change_reponame_prompt=Zmiana nazwy repozytorium wpłynie na linki do niego.
settings.advanced_settings=Ustawienia zaawansowane
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Włącz system wiki
settings.use_internal_wiki=Użyj wbudowanego wiki
settings.use_external_wiki=Użyj zewnętrznego Wiki
settings.external_wiki_url=Adres URL zewnętrznego Wiki
settings.external_wiki_url_desc=Odwiedzający zostaną przekierowani do adresu URL po kliknięciu zakładki.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Włącz system zgłaszania problemów
settings.use_internal_issue_tracker=Użyj wbudowany lekki system zgłaszania problemów
settings.use_external_issue_tracker=Użyj zewnętrznego systemu zgłaszania problemów
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=Format dla adresu URL zewnętrznego systemu
settings.tracker_issue_style=Styl nazw zewnętrznego systemu zgłaszania problemów:
settings.tracker_issue_style.numeric=Numeryczny
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumeryczne
settings.tracker_url_format_desc=Symbole zastępcze <code>{user} {repo} {index}</code> mogą być użyte dla nazwy użytkownika, nazwy repozytorium i numeru problemu.
settings.pulls_desc=Włącz obsługę pull request, aby akceptować publiczny wkład
settings.danger_zone=Strefa niebezpieczeństwa
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Nowy właściciel już posiada repozytorium o tej samej nazwie.
settings.convert=Konwersja na repozytorium regularne
settings.convert_desc=Możesz przekonwertować ten mirror na repozytorium regularne. Ta czynność nie może być odwrócona.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Ten użytkownik nie będzie miał dostępu w
settings.remove_collaborator_success=Współpracownik został usunięty.
settings.search_user_placeholder=Szukaj użytkownika...
settings.org_not_allowed_to_be_collaborator=Organizacji nie można dodać jako współpracownika.
settings.user_is_org_member=Użytkownik jest członkiem organizacji, który nie może być dodany jako współpracownik.
settings.add_webhook=Dodaj webhooka
settings.hooks_desc=Webooki działają tak jak proste wywołania HTTP POST. Jeśli cokolwiek zdarzy się w Gogs, wyślemy powiadomienie do wybranego hosta. Więcej informacji można znaleźć w <a target="_blank" href="%s">przewodniku webhooków</a>.
settings.webhook_deletion=Usuń webhooka
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Wyślemy żądanie <code>POST</code> pod poniższy adr
settings.payload_url=URL do wywołania
settings.content_type=Typ zawartości
settings.secret=Sekret
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Użytkownik
settings.slack_icon_url=Adres URL ikony
settings.slack_color=Kolor
@@ -665,6 +755,8 @@ settings.event_send_everything=Potrzebuję <strong>wszystkiego</strong>.
settings.event_choose=Pozwól mi wybrać, czego potrzebuję.
settings.event_create=Utwórz
settings.event_create_desc=Utworzono gałąź lub tag
settings.event_pull_request=Pull Request
settings.event_pull_request_desc=Otworzono żądanie pull, zamknięto, otwarto ponownie, zaktualizowano, przypisano, nieprzypisano, zaktualizowano etykietę, wyczyszczono etykietę lub zsynchronizowano.
settings.event_push=Wypchnięcie
settings.event_push_desc=Wypchnięcie (push) do repozytorium Git
settings.active=Aktywny
@@ -676,10 +768,12 @@ settings.delete_webhook=Usuń webhook
settings.recent_deliveries=Ostatnie wywołania
settings.hook_type=Typ hooka
settings.add_slack_hook_desc=Dodaj integrację ze <a href="%s">Slackiem</a> do Twojego repozytorium.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Token
settings.slack_domain=Domena
settings.slack_channel=Kanał
settings.deploy_keys=Klucze wdrożeniowe
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Dodaj klucz wdrożenia
settings.deploy_key_desc=Klucze wdrożenia pozwalają na dostęp tylko do odczytu. To nie to samo co klucze SSH dla konta osobistego.
settings.no_deploy_keys=Nie dodałeś żadnego klucza wdrożenia.
@@ -756,8 +850,9 @@ team_name_helper=Będziesz używał tej nazwy do wywoływania tego zespołu w dy
team_desc_helper=Czym zajmuje się ten zespół?
team_permission_desc=Jaki poziom uprawnień powinien mieć ten zespół?
form.name_reserved=Nazwa organizacji "%s" jest zarezerwowana.
form.name_pattern_not_allowed=Wzorzec nazwy organizacji "%s" jest niedozwolony.
form.name_reserved=Nazwa organizacji %s jest zarezerwowana.
form.name_pattern_not_allowed=Wzorzec nazwy organizacji %s jest niedozwolony.
form.team_name_reserved=Team name '%s' is reserved.
settings=Ustawienia
settings.options=Opcje
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Usuń śmieci z repozytoriów
dashboard.git_gc_repos_success=Wszystkie repozytoria zakończyły odśmiecanie pomyślnie.
dashboard.resync_all_sshkeys=Przeładuj klucze publiczne w pliku '.ssh/authorized_keys' (uwaga: klucze poza Gogs zostaną usunięte)
dashboard.resync_all_sshkeys_success=Przeładowanie kluczy publicznych zakończyło się sukcesem.
dashboard.resync_all_update_hooks=Przepisz pliki update hook repozytoriów (wymagane przy zmianie ścieżki do pliku konfiguracji)
dashboard.resync_all_update_hooks_success=Wszystkie pliki update hook repozytoriów zostały pomyślnie przepisane.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Ponownie inicjalizuj wszystkie repozytoria, które straciły pliki Git
dashboard.reinit_missing_repos_success=Wszystkie repozytoria, które straciły pliki Git, zostały ponownie zainicjować pomyślnie.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Usunięcie uwierzytelnienia
auths.delete_auth_desc=To uwierzytelnienie zostanie usunięte, czy chcesz kontynuować?
auths.still_in_used=Ten rodzaj autentykacji jest wciąż wykorzystywany przez niektórych użytkowników. Usuń lub przekonwertuj użytkowników, aby wykorzystywali inny typ logowania.
auths.deletion_success=Uwierzytelnienie zostało usunięte pomyślnie!
auths.login_source_exist=Login source '%s' already exists.
config.server_config=Konfiguracja serwera
config.app_name=Nazwa aplikacji
@@ -981,10 +1077,9 @@ config.offline_mode=Tryb offline
config.disable_router_log=Wyłącz dziennik routera
config.run_user=Użytkownik uruchomieniowy
config.run_mode=Tryb uruchamienia
config.repo_root_path=Ścieżka repozytoriów
config.git_version=Git Version
config.static_file_root_path=Ścieżka plików statycznych
config.log_file_root_path=Ścieżka plików dziennika
config.script_type=Typ skryptu
config.reverse_auth_user=Użytkownik dostarczony przez odwrotne proxy
config.ssh_config=Konfiguracja SSH
@@ -999,15 +1094,25 @@ config.ssh_keygen_path=Ścieżka generatora ('ssh-keygen')
config.ssh_minimum_key_size_check=Sprawdzanie minimalnej długości klucza
config.ssh_minimum_key_sizes=Minimalne rozmiary kluczy
config.repo_config=Repository Configuration
config.repo_root_path=Ścieżka repozytoriów
config.script_type=Typ skryptu
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Konfiguracja bazy danych
config.db_type=Typ
config.db_host=Host
config.db_name=Nazwa
config.db_user=Użytkownik
config.db_ssl_mode=Tryb SSL
config.db_ssl_mode_helper=(tylko dla "postgres")
config.db_ssl_mode_helper=(tylko dla postgres)
config.db_path=Ścieżka
config.db_path_helper=(dla "sqlite3" i "tidb")
config.db_path_helper=(dla sqlite3 i tidb)
config.service_config=Konfiguracja usługi
config.register_email_confirm=Wymagaj potwierdzenia e-mail
@@ -1058,17 +1163,17 @@ config.picture_service=Serwis obrazów
config.disable_gravatar=Wyłącz Gravatara
config.enable_federated_avatar=Enable Federated Avatars
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Konfiguracja Git
config.git_disable_diff_highlight=Wyłączyć wyróżnianie składni diff
config.git_max_diff_lines=Maksymalna ilość linii diff (dla pojedynczego pliku)
config.git_max_diff_line_characters=Maksymalna ilość znaków diff (dla pojedynczego pliku)
config.git_max_diff_files=Maksymalna ilość plików diff (które zostaną wyświetlone)
config.git_gc_args=Argumenty GC
config.git_migrate_timeout=Limit czasu migracji
config.git_mirror_timeout=Limit czasu aktualizacji kopii lustrzanej
config.git_clone_timeout=Limit czasu operacji klonowania
config.git_pull_timeout=Limit czasu dla operacji pull
config.git_gc_timeout=Limit czasu odśmiecania pamięci
config.log_config=Konfiguracja dziennika
config.log_mode=Tryb dziennika

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ home=Главная
dashboard=Панель управления
explore=Обзор
help=Помощь
sign_in=Войти
sign_in=Вход
sign_out=Выход
sign_up=Регистрация
register=Регистрация
@@ -27,7 +27,7 @@ repository=Репозиторий
organization=Организация
mirror=Зеркало
new_repo=Новый репозиторий
new_migrate=Новая Миграция
new_migrate=Новая миграция
new_mirror=Новое зеркало
new_fork=Новое ответвление репозитория
new_org=Новая организация
@@ -48,7 +48,7 @@ cancel=Отмена
install=Установка
title=Установочные шаги для первого запуска
docker_helper=Если вы запускаете Gogs внутри Docker, пожалуйста прочтите <a target="_blank" href="%s">эти советы</a> внимательно перед тем как что-либо изменить на этой странице!
requite_db_desc=Gogs требует MySQL, PostgreSQL, SQLite3 или TiDB.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Настройки базы данных
db_type=Тип базы данных
host=Хост
@@ -58,9 +58,8 @@ db_name=Имя базы данных
db_helper=Для MySQL используйте тип таблиц InnoDB с кодировкой utf8_general_ci.
ssl_mode=Режим SSL
path=Путь
sqlite_helper=Путь к файлу базы данных SQLite3 или TiDB. <br>Укажите абсолютный путь при запуске в качестве службы.
err_empty_db_path=Путь к базе данных SQLite3 или TiDB не может быть пустым.
err_invalid_tidb_name=Имя базы данных TiDB не может содержать символы "." и "-".
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Вы не можете отключить регистрацию до создания учетной записи администратора.
err_empty_admin_password=Пароль администратора не может быть пустым.
@@ -75,6 +74,8 @@ domain=Домен
domain_helper=Влияет на URL-адреса для клонирования по SSH.
ssh_port=SSH порт
ssh_port_helper=Номер порта, который использует SSH сервер. Оставьте пустым, чтобы отключить SSH.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=Порт HTTP
http_port_helper=Номер порта, который приложение будет слушать.
app_url=URL приложения
@@ -96,8 +97,8 @@ offline_mode=Включение офлайн режима
offline_mode_popup=Отключить CDN даже в производственном режиме, все файлы ресурсов будут раздаваться локально.
disable_gravatar=Отключить службу Gravatar
disable_gravatar_popup=Отключить Gravatar и пользовательские источники, все аватары по-умолчанию загружаются пользователями.
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=Включить поиск внешних Аватаров
federated_avatar_lookup_popup=Включите Поиск федеративного аватара для использования федеративной службы с открытым исходным кодом на основе libravatar.
disable_registration=Отключить самостоятельную регистрацию
disable_registration_popup=Запретить пользователям самостоятельную регистрацию, только администратор может создавать аккаунты.
enable_captcha=Включить капчу
@@ -116,6 +117,7 @@ sqlite3_not_available=Ваша версия не поддерживает SQLite
invalid_db_setting=Настройки базы данных не правильные: %v
invalid_repo_path=Недопустимый путь к корню репозитория: %v
run_user_not_match=Текущий пользователь не является пользователем для запуска: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=Не удалось сохранить конфигурацию: %v
invalid_admin_setting=Указан недопустимый параметр учетной записи администратора: %v
install_success=Добро пожаловать! Мы рады, что вы выбрали Gogs. Веселитесь и берегите себя.
@@ -126,7 +128,7 @@ uname_holder=Имя пользователь или E-mail
password_holder=Пароль
switch_dashboard_context=Переключить контекст панели управления
my_repos=Мои репозитории
show_more_repos=Show more repositories...
show_more_repos=Показать больше репозиториев...
collaborative_repos=Совместные репозитории
my_orgs=Мои организации
my_mirrors=Мои зеркала
@@ -137,6 +139,7 @@ issues.in_your_repos=В ваших репозиториях
[explore]
repos=Репозитории
users=Пользователи
organizations=Организации
search=Поиск
[auth]
@@ -151,12 +154,11 @@ forget_password=Забыли пароль?
sign_up_now=Нужен аккаунт? Зарегистрируйтесь.
confirmation_mail_sent_prompt=Новое письмо для подтверждения было направлено на <b>%s</b>, пожалуйста, проверьте ваш почтовый ящик в течение %d часов для завершения регистрации.
active_your_account=Активируйте свой аккаунт
prohibit_login=Login Prohibited
prohibit_login_desc=Your account is prohibited to login, please contact site admin.
prohibit_login=Вход запрещен
prohibit_login_desc=Вход для вашей учетной записи был запрещен, пожалуйста, свяжитесь с администратором сайта.
resent_limit_prompt=Извините, вы уже запросили активацию по электронной почте недавно. Пожалуйста, подождите 3 минуты, а затем повторите попытку.
has_unconfirmed_mail=Здравствуйте, %s! У вас есть неподтвержденный адрес электронной почты (<b>%s</b>). Если вам не приходило письмо с подтверждением или нужно выслать новое письмо, нажмите на кнопку ниже.
resend_mail=Нажмите здесь, чтобы переотправить активационное письмо
email_not_associate=Этот адрес электронной почты не связан ни с одной учетной записью.
send_reset_mail=Нажмите сюда, чтобы отправить письмо для сброса пароля
reset_password=Сброс пароля
invalid_code=Извините, ваш код подтверждения истек или не является допустимым.
@@ -189,6 +191,13 @@ TeamName=Название команды
AuthName=Имя авторизации
AdminEmail=Электронная почта администратора
NewBranchName=Новая ветка
CommitSummary=Резюме коммита
CommitMessage=Зафиксировать сообщение
CommitChoice=Выбор коммита
TreeName=Путь к файлу
Content=Содержимое
require_error=` не может быть пустым.`
alpha_dash_error=«должен быть допустимым символьным, числовым или dash(-_) значением.»
alpha_dash_dot_error=«должен быть допустимым символьным, числовым или dash(-_) символами, включая точку.»
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=Имя пользователя «%s» не доп
[settings]
profile=Профиль
password=Пароль
avatar=Avatar
avatar=Аватар
ssh_keys=SSH ключи
social=Учетные записи в соцсетях
applications=Приложения
@@ -262,8 +271,8 @@ change_username_prompt=Это изменение может повлечь за
continue=Далее
cancel=Отмена
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=Найти Аватар по адресу эл. почты
federated_avatar_lookup=Найти внешний Аватар
enable_custom_avatar=Включить собственный аватар
choose_new_avatar=Выбрать новый аватар
update_avatar=Обновить настройку аватара
@@ -330,6 +339,10 @@ access_token_deletion=Удаление личного токена доступ
access_token_deletion_desc=Удаление этого персонального токена доступа приведет к удалению всех связанных прав доступа к приложению. Вы хотите продолжить?
delete_token_success=Персональный токен доступа успешно удален! Не забудьте изменить настройки вашего приложения.
orgs.none=Вы не состоите ни в одной организации.
orgs.leave_title=Покинуть организацию
orgs.leave_desc=Вы потеряете доступ ко всем репозиториям и командам, как только покинете организацию. Вы хотите продолжить?
delete_account=Удалить свой аккаунт
delete_prompt=Этим действием вы удалите свою учетную запись навсегда и <strong>НЕ СМОЖЕТЕ</strong> ее вернуть!
confirm_delete_account=Подтвердите удаление
@@ -350,7 +363,7 @@ fork_from=Ответвление от
fork_visiblity_helper=Ответвленному репозиторию нельзя поменять уровень видимости
repo_desc=Описание
repo_lang=Язык
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=Выберите шаблоны .gitignore
license=Лицензия
license_helper=Выберите файл лицензии
readme=Readme
@@ -359,10 +372,11 @@ auto_init=Инициализировать этот репозиторий вы
create_repo=Создать репозиторий
default_branch=Ветка по умолчанию
mirror_prune=Очистить
mirror_prune_desc=Remove any remote-tracking references that no longer exist on the remote
mirror_prune_desc=Удалите ссылки на удаленно отслеживаемые объекты, которых больше нет на удаленном сервере
mirror_interval=Интервал зеркалирования (час)
mirror_address=Адрес зеркала
mirror_address_desc=Укажите необходимые учетные данные в адрес.
mirror_last_synced=Последняя синхронизация
watchers=Наблюдатели
stargazers=Звездочеты
forks=Ответвления
@@ -376,14 +390,14 @@ migrate_type=Тип миграции
migrate_type_helper=Этот репозиторий будет <span class="text blue">зеркалом</span>
migrate_repo=Перенос репозитория
migrate.clone_address=Скопировать адрес
migrate.clone_address_desc=Это может быть HTTP/HTTPS/GIT адрес или локальный путь на сервере.
migrate.clone_address_desc=Это может быть HTTP/HTTPS/GIT URL-адрес.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=У вас нет прав на импорт локальных репозиториев.
migrate.invalid_local_path=Недопустимый локальный путь. Возможно он не существует или является не папкой.
migrate.failed=Миграция не удалась: %v
mirror_from=зеркало из
forked_from=ответвлено от
fork_from_self=Вы не можете ответвить репозиторий, так как Вы уже его владелец!
copy_link=Скопировать
copy_link_success=Скопировано!
copy_link_error=Нажмите ⌘-C или Ctrl-C для копирования
@@ -401,7 +415,7 @@ create_new_repo_command=Создать новый репозиторий из к
push_exist_repo=Отправить существующий репозиторий из командной строки
repo_is_empty=Этот репозиторий пуст, пожалуйста, возвращайтесь позже!
code=Код
files=Файлы
branch=Ветка
tree=Дерево
filter_branch_and_tag=Фильтр по ветке или тегу
@@ -417,8 +431,49 @@ file_raw=Исходник
file_history=История
file_view_raw=Посмотреть исходник
file_permalink=Постоянная ссылка
file_too_large=This file is too large to be shown
file_too_large=Этот файл слишком большой, поэтому он не может быть отображен
video_not_supported_in_browser=Ваш браузер не поддерживает HTML5 видео тэг.
editor.new_file=Новый файл
editor.upload_file=Загрузить файл
editor.edit_file=Редактировать файл
editor.preview_changes=Просмотр изменений
editor.cannot_edit_non_text_files=Возможно редактировать только текстовые файлы
editor.edit_this_file=Отредактируйте этот файл
editor.must_be_on_a_branch=Чтобы сделать или предложить изменения вы должны выбрать ветку
editor.fork_before_edit=Создайте ветку репозитория перед редактированием файла
editor.delete_this_file=Удалить файл
editor.must_have_write_access=Вам необходимо иметь доступ на запись, чтобы вносить или предлагать правки этого файла
editor.file_delete_success=Файл «%s» был успешно удален!
editor.name_your_file=Назовите свой файл...
editor.filename_help=Чтобы добавить каталог, просто наберите название и нажмите /. Чтобы удалить каталог, перейдите к началу поля и нажмите клавишу backspace.
editor.or=или
editor.cancel_lower=отмена
editor.commit_changes=Фиксация изменений
editor.add_tmpl=Добавить '%s/<filename>'
editor.add=Добавить '%s'
editor.update=Обновить '%s'
editor.delete=Удалить '%s'
editor.commit_message_desc=Добавьте необязательное расширенное описание...
editor.commit_directly_to_this_branch=Сделайте коммит прямо в ветку <strong class="branch-name">%s</strong>.
editor.create_new_branch=Создайте <strong>новую ветвь</strong> для этого коммита, и сделайте пул запрос.
editor.new_branch_name_desc=Новое название ветки...
editor.cancel=Отмена
editor.filename_cannot_be_empty=Имя файла не может быть пустым.
editor.branch_already_exists=Ветка «%s» уже существует в этом репозитории.
editor.directory_is_a_file=Запись «%s» в пути на верх является файлом, а не каталогом этого репозитория.
editor.file_is_a_symlink=Файл '%s' является символической ссылкой, которая не может быть изменена через веб-редактор.
editor.filename_is_a_directory=Файл «%s» является каталогом в этом репозитории.
editor.file_editing_no_longer_exists=Редактируемый вами файл «%s» больше не существует в репозитории.
editor.file_changed_while_editing=Содержимое файла изменилось со времени начала редактирования. <a target="_blank" href="%s"> нажмите здесь,</a> чтобы увидеть, что было изменено, или <strong>нажмите кнопку commit снова</strong>, чтобы перезаписать эти изменения.
editor.file_already_exists=Файл с именем «%s» уже существует в этом репозитории.
editor.no_changes_to_show=Нет изменений.
editor.fail_to_update_file=Не удалось обновить/создать файл «%s» из-за ошибки: %v
editor.add_subdir=Добавьте подкаталог...
editor.unable_to_upload_files=Не удалось загрузить файлы в «%s» из-за ошибки: %v
editor.upload_files_to_dir=Загрузить файлы '%s'
commits.commit_history=Commit History
commits.commits=Коммиты
commits.search=Поиск коммитов
commits.find=Найти
@@ -444,6 +499,11 @@ issues.create=Добавить задачу
issues.new_label=Новая метка
issues.new_label_placeholder=Имя метки...
issues.create_label=Добавить метку
issues.label_templates.title=Загрузить набор предопределённых меток
issues.label_templates.info=Меток пока нет. Вы можете нажать на кнопку «Создать метку», чтобы создать новую или использовать одну из готового набора ниже.
issues.label_templates.helper=Выберите метку
issues.label_templates.use=Использовать ярлык
issues.label_templates.fail_to_load_file=Не удалось загрузить файл шаблона метки «%s»: %v
issues.open_tab=%d открыто(ы)
issues.close_tab=%d закрыто(ы)
issues.filter_label=Метка
@@ -471,8 +531,8 @@ issues.next=Следующая страница
issues.open_title=Открыто
issues.closed_title=Закрыто
issues.num_comments=комментариев: %d
issues.commented_at=`commented <a href="#%s">%s</a>`
issues.delete_comment_confirm=Are you sure you want to delete this comment?
issues.commented_at=«прокомментировал <a href="#%s"> %s</a>»
issues.delete_comment_confirm=Вы уверены, что хотите удалить этот комментарий?
issues.no_content=Пока нет содержимого.
issues.close_issue=Закрыть
issues.close_comment_issue=Прокомментировать и закрыть
@@ -485,8 +545,7 @@ issues.commit_ref_at=`упомянул эту задачу в коммите <a
issues.poster=Автор
issues.collaborator=Соавтор
issues.owner=Владелец
issues.sign_up_for_free=Зарегистрируйтесь бесплатно
issues.sign_in_require_desc=чтобы присоединиться к обсуждению. Уже есть аккаунт? <a href="%s">Войдите чтобы прокомментировать</a>
issues.sign_in_require_desc=<a href="%s">Войдите</a>, чтобы присоединиться к обсуждению.
issues.edit=Изменить
issues.cancel=Отмена
issues.save=Сохранить
@@ -501,6 +560,8 @@ issues.label_deletion=Удаление метки
issues.label_deletion_desc=Удаление ярлыка затронет все связанные задачи. Продолжить?
issues.label_deletion_success=Метка была удалена успешно!
issues.num_participants=%d участников
issues.attachment.open_tab=`Нажмите, чтобы увидеть "%s" в новой вкладке`
issues.attachment.download=`Нажмите, чтобы скачать "%s"`
pulls.new=Новый запрос на слияние
pulls.compare_changes=Сравнить изменения
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Этот запрос на слияние не мо
pulls.cannot_auto_merge_helper=Пожалуйста, совершите слияние вручную для урегулирования конфликтов.
pulls.merge_pull_request=Слить пулл-реквест
pulls.open_unmerged_pull_exists=`Вы не можете снова открыть, поскольку уже существует запрос на слияние (#%d) из того же репозитория с той же информацией о слиянии и ожидающий слияния. `
pulls.delete_branch=Удалить ветку
pulls.delete_branch_has_new_commits=Нельзя удалить ветку, так как она имеет новые коммиты после слияния.
milestones.new=Новая контрольная точка
milestones.open_tab=%d открыты
@@ -577,28 +640,55 @@ settings.collaboration.admin=Администратор
settings.collaboration.write=Запись
settings.collaboration.read=Просмотр
settings.collaboration.undefined=Не определено
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Автоматическое обновление
settings.githooks=Git хуки
settings.basic_settings=Основные параметры
settings.mirror_settings=Настройки Зеркала
settings.sync_mirror=Синхронизировать
settings.mirror_sync_in_progress=Выполняется синхронизация Зеркала, пожалуйста, обновите эту страницу через минуту.
settings.site=Официальный сайт
settings.update_settings=Обновить настройки
settings.change_reponame_prompt=Это изменение повлияет на отношения ссылок к этому репозиторию.
settings.advanced_settings=Расширенные настройки
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=Включить систему Wiki
settings.use_internal_wiki=Использовать встроенную wiki
settings.use_external_wiki=Использовать внешнюю Wiki
settings.external_wiki_url=URL-адрес внешней Вики
settings.external_wiki_url_desc=Посетители будут перенаправлены на URL-адрес, когда они кликнут по вкладке.
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=Включить систему отслеживания ошибок
settings.use_internal_issue_tracker=Использовать встроенную легковесную систему отслеживания ошибок
settings.use_external_issue_tracker=Использовать внешнюю систему отслеживания ошибок
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=Внешний формат ссылки системы отслеживания ошибок.
settings.tracker_issue_style=Стиль Именования Внешней Системы Учета Задач:
settings.tracker_issue_style.numeric=Numeric
settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_issue_style.numeric=Цифровой
settings.tracker_issue_style.alphanumeric=Буквенноцифровой
settings.tracker_url_format_desc=Вы можете использовать шаблон <code>{user} {repo} {index}</code> для имени пользователя, репозитория и номера задачи.
settings.pulls_desc=Включить публичные запросы на слияние
settings.danger_zone=Опасная зона
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=У нового владельца уже есть хранилище с таким названием.
settings.convert=Преобразовать в обычный репозиторий
settings.convert_desc=Это зеркало можно преобразовать в обычный репозиторий. Это не может быть отменено.
@@ -620,7 +710,7 @@ settings.delete_notices_1=- Эта операция <strong>НЕ МОЖЕТ</str
settings.delete_notices_2=- Эта операция навсегда удалит всё из этого репозитория, включая данные Git, связанные с ним задачи, комментарии и права доступа для сотрудников.
settings.delete_notices_fork_1=- Все отвлетвления станут независимыми после удаления.
settings.deletion_success=Репозиторий был успешно удалён!
settings.update_settings_success=Настройка репозитория обновлена успешно.
settings.update_settings_success=Настройки репозитория обновлены успешно.
settings.transfer_owner=Новый владелец
settings.make_transfer=Выполнить передачу
settings.transfer_succeed=Владение репозиторием было успешно передано.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Этот пользователь больш
settings.remove_collaborator_success=Соавтор был удален.
settings.search_user_placeholder=Поиск пользователя...
settings.org_not_allowed_to_be_collaborator=Организации не могут быть добавлены как соавторы.
settings.user_is_org_member=Пользователь является членом организации, члены которой не могут быть добавлены в качестве соавтора.
settings.add_webhook=Добавить Webhook
settings.hooks_desc=Webhooks позволяют внешним службам получать уведомления при возникновении определенных событий на Gogs. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" href="%s">Руководстве по Webhooks</a>.
settings.webhook_deletion=Удалить веб-хук
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Мы отправим запрос <code>POST</code>
settings.payload_url=URL обработчика
settings.content_type=Тип содержимого
settings.secret=Secret
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Имя пользователя
settings.slack_icon_url=URL иконки
settings.slack_color=Цвет
@@ -665,6 +755,8 @@ settings.event_send_everything=Мне нужно <strong>все</strong>.
settings.event_choose=Позвольте мне выбрать то, что нужно.
settings.event_create=Создать
settings.event_create_desc=Ветка или тэг созданы
settings.event_pull_request=Запросы на слияние
settings.event_pull_request_desc=Запрос слияния открыт, закрыт, переоткрыт, изменён, назначен, снят, метка обновлена, метка убрана, или синхронизирован.
settings.event_push=Push
settings.event_push_desc=Push в репозиторий
settings.active=Активен
@@ -676,10 +768,12 @@ settings.delete_webhook=Удалить автоматическое обновл
settings.recent_deliveries=Недавние рассылки
settings.hook_type=Тип перехватчика
settings.add_slack_hook_desc=Добавить интеграцию с <a href="%s">Slack</a> в ваш репозиторий.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Token
settings.slack_domain=Домен
settings.slack_channel=Канал
settings.deploy_keys=Ключи развертывания
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Добавить ключ развертывания
settings.deploy_key_desc=Ключи развёртывания доступны только для чтения. Это не то же самое что и SSH-ключи аккаунта.
settings.no_deploy_keys=Вы не добавляли ключи развертывания.
@@ -702,8 +796,8 @@ diff.show_unified_view=Единый вид
diff.stats_desc=<strong> %d измененных файлов</strong> с <strong>%d добавлено</strong> и <strong>%d удалено</strong>
diff.bin=BIN
diff.view_file=Просмотреть файл
diff.file_suppressed=File diff suppressed because it is too large
diff.too_many_files=Некоторые файлы не были показать из-за большого количества измененных файлов
diff.file_suppressed=Разница между файлами не показана из-за своего большого размера
diff.too_many_files=Некоторые файлы не были показаны из-за большого количества измененных файлов
release.releases=Релизы
release.new_release=Новый релиз
@@ -734,7 +828,7 @@ release.deletion=Удаление релиза
release.deletion_desc=Удаление этого релиза удалит соответствующую Git метку. Вы хотите продолжить?
release.deletion_success=Релиз был успешно удален!
release.tag_name_already_exist=Релиз с этим именем метки уже существует.
release.tag_name_invalid=Tag name is not valid.
release.tag_name_invalid=Имя тега является не допустимым.
release.downloads=Загрузки
[org]
@@ -758,6 +852,7 @@ team_permission_desc=Какой уровень разрешений должен
form.name_reserved=Наименование организации '%s' зарезервированно.
form.name_pattern_not_allowed=Шаблон организации '%s' не допускается.
form.team_name_reserved=Team name '%s' is reserved.
settings=Настройки
settings.options=Опции
@@ -819,7 +914,7 @@ teams.add_nonexistent_repo=Вы добавляете в отсутствующи
[admin]
dashboard=Панель управления
users=Пользователи
organizations=Организации
organizations=Группы
repositories=Репозитории
authentication=Авторизация
config=Настройки
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Выполнить сборку мусора на реп
dashboard.git_gc_repos_success=Сборка мусора на всех репозиториях успешно выполнена.
dashboard.resync_all_sshkeys=Переписать файл «.ssh/authorized_keys» (осторожно: не Gogs ключи будут утеряны)
dashboard.resync_all_sshkeys_success=Были успешно переписаны все открытые ключи.
dashboard.resync_all_update_hooks=Перезаписать все апдейт-хуки этого репозитория (необходимо, когда изменен путь до папки конфигураций)
dashboard.resync_all_update_hooks_success=Апдейт-хуки всех репозиториев успешно перезаписаны.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Реинициализировать все репозитории с утерянными Git файлами
dashboard.reinit_missing_repos_success=Все репозитории с утерянными Git файлами успешно реинициализированы.
@@ -902,7 +997,7 @@ users.edit_account=Изменение учетной записи
users.max_repo_creation=Ограничение максимального количества создаваемых репозиториев
users.max_repo_creation_desc=(Установить -1 для использования стандартного глобального значения предела)
users.is_activated=Эта учетная запись активирована
users.prohibit_login=This account is prohibited to login
users.prohibit_login=Вход с данной учетной записи запрещен
users.is_admin=У этой учетной записи есть права администратора
users.allow_git_hook=Пользователь имеет право создать Git перехватчик
users.allow_import_local=Пользователь имеет право импортировать локальные репозитории
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Удаление канала аутентификаци
auths.delete_auth_desc=Этот канал аутентификации будет удален. Вы уверены что хотите продолжить?
auths.still_in_used=Эта проверка подлинности до сих пор используется некоторыми пользователями, удалите или преобразуйте этих пользователей в другой тип входа в систему.
auths.deletion_success=Канал аутентификации успешно удален!
auths.login_source_exist=Источник входа '%s' уже существует.
config.server_config=Конфигурация сервера
config.app_name=Имя приложения
@@ -981,10 +1077,9 @@ config.offline_mode=Автономный режим
config.disable_router_log=Отключение журнала маршрутизатора
config.run_user=Запуск пользователем
config.run_mode=Режим выполнения
config.repo_root_path=Путь до корня репозитория
config.git_version=Git Version
config.static_file_root_path=Статичный путь до файла
config.log_file_root_path=Путь до папки с логами
config.script_type=Тип сценария
config.reverse_auth_user=Заголовок с именем пользователя для авторизации на reverse proxy
config.ssh_config=Конфигурация SSH
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Путь к генератору ключей ('ssh-keyge
config.ssh_minimum_key_size_check=Минимальный размер ключа проверки
config.ssh_minimum_key_sizes=Минимальные размеры ключа
config.repo_config=Repository Configuration
config.repo_root_path=Путь до корня репозитория
config.script_type=Тип сценария
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Конфигурация базы данных
config.db_type=Тип
config.db_host=Хост
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Время жизни файла cookie
config.picture_config=Настройка изображения
config.picture_service=Сервис изображений
config.disable_gravatar=Отключить Gravatar
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=Включить внешние Аватары
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Конфигурация GIT
config.git_disable_diff_highlight=Отключить подсветку синтаксиса Diff
config.git_max_diff_lines=Максимальное количество строк Diff (на файл)
config.git_max_diff_line_characters=Максимальное количество символов Diff (в строке)
config.git_max_diff_files=Максимальное количество Diff-файлов (при показе)
config.git_gc_args=Аргументы GC
config.git_migrate_timeout=Тайм-аут миграции
config.git_mirror_timeout=Время Ожидания Обновления Зеркала
config.git_clone_timeout=Время Ожидания Операции Клонирования
config.git_pull_timeout=Время Ожидания Операции Извлечения
config.git_gc_timeout=Время Ожидания Операции Сборки Мусора
config.log_config=Конфигурация журнала
config.log_mode=Режим журналирования

1248
conf/locale/locale_sr-SP.ini Normal file

File diff suppressed because it is too large Load Diff

1248
conf/locale/locale_sv-SE.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -48,7 +48,7 @@ cancel=İptal
install=Kurulum
title=İlk Kez Çalıştırma İçin Kurulum Adımları
docker_helper=Gogs'u Docker içinde kullanıyorsanız bu sayfada herhangi bir değişiklik yapmadan önce lütfen <a target="_blank" href="%s">kılavuzu</a> dikkatlice okuyunuz!
requite_db_desc=Gogs MySQL, PostgreSQL, SQLite3 veya TiDB gerektirir.
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=Veritabanı Ayarları
db_type=Veritabanı Türü
host=Sunucu
@@ -58,9 +58,8 @@ db_name=Veritabanı Adı
db_helper=Lütfen MySQL için INNODB motorunu utf8_general_ci karakter setiyle kullanın.
ssl_mode=SSL Biçimi
path=Yol
sqlite_helper=SQLite3 veya TiDB veritabanının dosya yolu. <br>Lütfen servis olarak başlatırken mutlak yolu kullanın.
err_empty_db_path=SQLite3 veya TiDB veritabanı yolu boş olamaz.
err_invalid_tidb_name=TiDB veritabanı adında "." ve "-" karakterlerine izin verilmez.
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=Bir yönetici hesabı oluşturmadan kullanıcı kaydını devre dışı bırakamazsınız.
err_empty_admin_password=Yönetici parolası boş olamaz.
@@ -75,6 +74,8 @@ domain=Alan Adı
domain_helper=Bu, SSH klon bağlantılarını etkiler.
ssh_port=SSH Portu
ssh_port_helper=SSH sunucunuzun portu kullanılıyor, boş bırakın ya da SSH özelliğini devre dışı bırakın.
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=HTTP Portu
http_port_helper=Uygulamanın dinleyeceği port.
app_url=Uygulama Bağlantısı
@@ -116,6 +117,7 @@ sqlite3_not_available=Yayın sürümünüz SQLite3'ü desteklemiyor, lütfen %s'
invalid_db_setting=Veritabanı ayarları geçersiz: %v
invalid_repo_path=Depo kök dizini geçersiz: %v
run_user_not_match=Çalıştırma kullanıcısı geçerli kullanıcı değil: %s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=Yapılandırma kaydedilemedi: %v
invalid_admin_setting=Yönetici hesap ayarları geçersiz: %v
install_success=Merhaba! Gogs'u tercih ettiğiniz için çok mutluyuz, keyfini çıkarın!
@@ -137,6 +139,7 @@ issues.in_your_repos=Depolarınızda
[explore]
repos=Depolar
users=Kullanıcılar
organizations=Organizations
search=Ara
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Hesabınızla oturum açmanız yasaklanmış, lütfen site y
resent_limit_prompt=Üzgünüz, zaten bir doğrulama e-postası talep ettiniz. Lütfen 3 dakika bekleyip tekrar deneyin.
has_unconfirmed_mail=Merhaba %s, doğrulanmamış bir e-posta adresin var (<b>%s</b>). Bir doğrulama e-postası almadıysanız ya da yenisine ihtiyacınız varsa lütfen aşağıdaki düğmeye tıklayın.
resend_mail=Doğrulama e-postasını tekrar almak için buraya tıklayın
email_not_associate=Bu e-posta adresi hiçbir hesaba bağlı değil.
send_reset_mail=Parola sıfırlama e-postasını (yeniden) göndermek için buraya tıklayın
reset_password=Parolanızı Sıfırlayın
invalid_code=Üzgünüz, doğrulama kodunuz geçersiz veya süresi dolmuş.
@@ -189,6 +191,13 @@ TeamName=Takım ismi
AuthName=Yetkilendirme adı
AdminEmail=Yönetici e-postası
NewBranchName=New branch name
CommitSummary=Commit summary
CommitMessage=Commit message
CommitChoice=Commit choice
TreeName=Dosya yolu
Content=Content
require_error=` boş olamaz.`
alpha_dash_error=` sadece karakter, rakam veya çizgi(-_) içermelidir.`
alpha_dash_dot_error=` sadece karakter, rakam, çizgi(-_) veya nokta içermelidir.`
@@ -330,6 +339,10 @@ access_token_deletion=Kişisel Erişim Anahtarını Silme
access_token_deletion_desc=Bu kişisel erişim anahtarını silerseniz uygulamanıza ilişkin tüm erişimler de kaldırılacaktır. Devam etmek istiyor musunuz?
delete_token_success=Kişisel erişim anahtarı başarıyla kaldırıldı! Uygulamanızı güncellemeyi de unutmayın!
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account=Hesabınızı Silin
delete_prompt=Bu işlem hesabınızı kalıcı olarak silecektir ve <strong>GERİ ALINAMAZ</strong>!
confirm_delete_account=Silmeyi Onayla
@@ -363,6 +376,7 @@ mirror_prune_desc=Uzakta olmayan bütün uzaktan-izleme referanslarını sil
mirror_interval=Yansı Aralığı (saat)
mirror_address=Yansı Adresi
mirror_address_desc=Lütfen gerekli kimlik bilgilerini adreste bulundurun.
mirror_last_synced=Last Synced
watchers=İzleyenler
stargazers=Yıldızlayanlar
forks=Çatallamalar
@@ -376,14 +390,14 @@ migrate_type=Göç Türü
migrate_type_helper=Bu depo bir <span class="text blue">yansı</span> olacaktır
migrate_repo=Depoyu Göç Ettir
migrate.clone_address=Klon Adresi
migrate.clone_address_desc=Bu bağlantı HTTP/HTTPS/GIT veya yerel bir sunucu yolu olabilir.
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=Yerel depoları içeri aktarma izniniz yok.
migrate.invalid_local_path=Geçersiz yerel dizin! Böyle bir yol yok ya da bir dizin değil.
migrate.failed=Göç başarısız: %v
mirror_from=şunun yansıması
forked_from=şundan çatallanmış
fork_from_self=Sahibi olduğunuz bir depoyu çatallayamazsınız!
copy_link=Kopyala
copy_link_success=Kopyalandı!
copy_link_error=Kopyalamak için ⌘-C veya Ctrl-C tuşlarına basın
@@ -401,7 +415,7 @@ create_new_repo_command=Komut satırında yeni bir depo oluştur
push_exist_repo=Var olan bir depoyu komut satırında gönder
repo_is_empty=Bu depo boş. Lütfen daha sonra tekrar gelin!
code=Kod
files=Files
branch=Dal
tree=Ağaç
filter_branch_and_tag=Dal veya biçim imini filtrele
@@ -418,7 +432,48 @@ file_history=Geçmiş
file_view_raw=Ham Görünüm
file_permalink=Kalıcı Bağlantı
file_too_large=Bu dosya sergilenmek için çok büyük
video_not_supported_in_browser=Your browser doesn't support HTML5 video tag.
editor.new_file=New file
editor.upload_file=Upload file
editor.edit_file=Dosya düzenle
editor.preview_changes=Preview Changes
editor.cannot_edit_non_text_files=Metin dışı dosyalar düzenlenemez
editor.edit_this_file=Edit this file
editor.must_be_on_a_branch=You must be on a branch to make or propose changes to this file
editor.fork_before_edit=You must fork this repository before editing the file
editor.delete_this_file=Delete this file
editor.must_have_write_access=You must have write access to make or propose changes to this file
editor.file_delete_success=File '%s' has been deleted successfully!
editor.name_your_file=Name your file...
editor.filename_help=To add directory, just type it and press /. To remove a directory, go to the beginning of the field and press backspace.
editor.or=or
editor.cancel_lower=iptal
editor.commit_changes=Commit Changes
editor.add_tmpl=Add '%s/<filename>'
editor.add=Add '%s'
editor.update=Update '%s'
editor.delete=Delete '%s'
editor.commit_message_desc=Add an optional extended description...
editor.commit_directly_to_this_branch=Commit directly to the <strong class="branch-name">%s</strong> branch.
editor.create_new_branch=Create a <strong>new branch</strong> for this commit and start a pull request.
editor.new_branch_name_desc=New branch name...
editor.cancel=İptal
editor.filename_cannot_be_empty=Filename cannot be empty.
editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.file_is_a_symlink=The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
editor.add_subdir=Add subdirectory...
editor.unable_to_upload_files=Failed to upload files to '%s' with error: %v
editor.upload_files_to_dir=Upload files to '%s'
commits.commit_history=Commit History
commits.commits=İşlemeler
commits.search=İşleme Arama
commits.find=Bul
@@ -444,6 +499,11 @@ issues.create=Sorun Oluştur
issues.new_label=Yeni Etiket
issues.new_label_placeholder=Etiket adı...
issues.create_label=Etiket Oluştur
issues.label_templates.title=Load a predefined set of labels
issues.label_templates.info=There aren't any labels yet. You can click on the "New Label" button above to create one or use a predefined set below.
issues.label_templates.helper=Select a label set
issues.label_templates.use=Use this label set
issues.label_templates.fail_to_load_file=Failed to load label template file '%s': %v
issues.open_tab=%d açık
issues.close_tab=%d kapanmış
issues.filter_label=Etiket
@@ -485,8 +545,7 @@ issues.commit_ref_at=`<a id="%[1]s" href="#%[1]s">%[2]s</a> işlemesinde bu soru
issues.poster=Poster
issues.collaborator=Katkıcı
issues.owner=Sahibi
issues.sign_up_for_free=Ücretsiz Kaydolun
issues.sign_in_require_desc=bu konuşmaya katılmak için. Zaten bir hesabınız var mı? <a href="%s">Yorum yapmak için giriş yapın</a>
issues.sign_in_require_desc=<a href="%s">Sign in</a> to join this conversation.
issues.edit=Düzenle
issues.cancel=İptal
issues.save=Kaydet
@@ -501,6 +560,8 @@ issues.label_deletion=Etiket Silme
issues.label_deletion_desc=Bu etiketi silerseniz, bu etikete iliştirilmiş sorunlardaki tüm bilgiler de silinecektir. Devam etmek istiyor musunuz?
issues.label_deletion_success=Etiket başarıyla silindi!
issues.num_participants=%d Katılımcı
issues.attachment.open_tab=`Click to see "%s" in a new tab`
issues.attachment.download=`Click to download "%s"`
pulls.new=Yeni Değişiklik İsteği
pulls.compare_changes=Değişiklikleri Karşılaştır
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=Çakışmalardan dolayı bu değişiklik isteği ot
pulls.cannot_auto_merge_helper=Çakışmaları çözmek için lütfen elle birleştirin.
pulls.merge_pull_request=Değişiklik İsteğini Birleştir
pulls.open_unmerged_pull_exists=`Yeniden açma işlemini gerçekleştiremezsiniz. Çünkü zaten aynı depodan, aynı birleştirme bilgisiyle açık olan bir değişiklik isteği var (#%d) ve birleştirme bekliyor.`
pulls.delete_branch=Delete Branch
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=Yeni Kilometre Taşı
milestones.open_tab=%d Açık
@@ -577,14 +640,38 @@ settings.collaboration.admin=Yönetici
settings.collaboration.write=Yaz
settings.collaboration.read=Oku
settings.collaboration.undefined=Belirsiz
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Web İstekleri
settings.githooks=Git İstekleri
settings.basic_settings=Temel Ayarlar
settings.mirror_settings=Mirror Settings
settings.sync_mirror=Sync Now
settings.mirror_sync_in_progress=Mirror syncing is in progress, please refresh page in about a minute.
settings.site=Resmi Web Sitesi
settings.update_settings=Ayarları Güncelle
settings.change_reponame_prompt=Bu değişiklik, bağlantıların depoyla olan ilişkisini etkileyecektir.
settings.advanced_settings=Gelişmiş Ayarlar
settings.wiki_desc=Enable wiki system
settings.wiki_desc=Viki sıstemini etkinleştir
settings.use_internal_wiki=Use builtin wiki
settings.use_external_wiki=Harici Wiki kullan
settings.external_wiki_url=Harici Wiki bağlantısı
@@ -592,6 +679,8 @@ settings.external_wiki_url_desc=Ziyaretçiler, sekmeye tıkladıklarında bağla
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.use_external_issue_tracker=Harici sorun takipçisi kullan
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=Harici Sorun Takipçisi Bağlantı Formatı
settings.tracker_issue_style=Harici Hata İzleyicisi Adlandırma Stili:
settings.tracker_issue_style.numeric=Sayısal
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alfanumerik
settings.tracker_url_format_desc=Kullanıcı adı, depo ismi ve hata indeksi için <code>{kullanıcı} {depo} {indeks}</code> tutucusunu kullanabilirsiniz.
settings.pulls_desc=Herkese açık katkıları kabul etmek için değişiklik isteklerini etkinleştirin
settings.danger_zone=Tehlike Alanı
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=Yeni sahibin aynı isimde başka bir deposu var. Lütfen farklı bir isim seçin.
settings.convert=Düzenli Depoya Dönüştür
settings.convert_desc=Bu yansıyı düzenli bir depoya dönüştürebilirsiniz. Bu işlem geri alınamaz.
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=Kullanıcı, silme işleminden sonra bu depo
settings.remove_collaborator_success=Katkıcı silindi.
settings.search_user_placeholder=Kullanıcı ara...
settings.org_not_allowed_to_be_collaborator=Organizasyon, bir katkıcı olarak eklenemez.
settings.user_is_org_member=Kullanıcı organizasyon üyesi olduğu için katkıcı olarak eklenemez.
settings.add_webhook=Web İsteği Ekle
settings.hooks_desc=Web istekleri, HTTP POST olay tetikleyicileri gibidirler. Gogs'ta ne zaman bir şey olsa, hedef belirttiğiniz sunuculara bildirim yapabilecek duruma geliriz. Daha fazla bilgiyi <a target="_blank" href="%s">Web İstekleri Kılavuzu</a>'nda bulabilirsiniz.
settings.webhook_deletion=Web İsteğini Sil
@@ -656,6 +745,7 @@ settings.add_webhook_desc=Gogs, meydana gelen olay ile birlikte belirttiğiniz b
settings.payload_url=Yük Bağlantısı
settings.content_type=İçerik Türü
settings.secret=Gizli
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=Kullanıcı Adı
settings.slack_icon_url=Simge Bağlantısı
settings.slack_color=Renk
@@ -665,6 +755,8 @@ settings.event_send_everything=<strong>Her şeye</strong> ihtiyacım var.
settings.event_choose=Neye ihtiyacım olduğunu seçtir.
settings.event_create=Oluştur
settings.event_create_desc=Dal veya biçim imi oluşturuldu
settings.event_pull_request=Pull Request
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, or synchronized.
settings.event_push=Push
settings.event_push_desc=Bir depoya git push
settings.active=Aktif
@@ -676,10 +768,12 @@ settings.delete_webhook=Web İsteğini Sil
settings.recent_deliveries=Son Dağıtımlar
settings.hook_type=İstek Türü
settings.add_slack_hook_desc=Deponuza <a href="%s">Slack</a> entegrasyonunu ekleyin.
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=Erişim Anahtarı
settings.slack_domain=Alan Adı
settings.slack_channel=Kanal
settings.deploy_keys=Dağıtım Anahtarları
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=Dağıtım Anahtarı Ekle
settings.deploy_key_desc=Dağıtım anahtarlarının yalnızca okuma izni vardır. Kişisel hesapların SSH anahtarlarıyla aynı değillerdir.
settings.no_deploy_keys=Herhangi bir dağıtım anahtarı eklemediniz.
@@ -758,6 +852,7 @@ team_permission_desc=Bu takım, ne gibi bir izin seviyesine sahiptir?
form.name_reserved=Organizasyon adı '%s' başka birisine ayrılmış.
form.name_pattern_not_allowed=Organizasyon adı modeli '%s' geçersiz.
form.team_name_reserved=Team name '%s' is reserved.
settings=Ayarlar
settings.options=Seçenekler
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=Depolarda çöp toplama işlemini gerçekleştir
dashboard.git_gc_repos_success=Tüm depolarda çöp toplama işlemi başarıyla gerçekleştirildi.
dashboard.resync_all_sshkeys='.ssh/authorized_keys' dosyasını yeniden yaz (dikkat: Gogs'un olmayan anahtarlar silinecektir)
dashboard.resync_all_sshkeys_success=Tüm genel anahtarlar başarıyla yeniden yazıldı.
dashboard.resync_all_update_hooks=Tüm depoların güncel web isteklerini yeniden yaz (özel yapılandırma yolu değiştiğinde gerekir)
dashboard.resync_all_update_hooks_success=Tüm depoların güncel web istekleri başarıyla yeniden yazıldı.
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Git dosyalarını kaybetmiş tüm depoları yeniden oluştur
dashboard.reinit_missing_repos_success=Git dosyalarını kaybetmiş tüm depolar başarıyla yeniden oluşturuldu.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=Yetkilendirme Silme
auths.delete_auth_desc=Bu yetkilendirme silinecek. Devam etmek istiyor musunuz?
auths.still_in_used=Bu yetkilendirme hala bazı kullanıcılar tarafından kullanılıyor. Lütfen öncelikle bunları silin ya da başka oturum açma türlerine çevirin.
auths.deletion_success=Yetkilendirme başarıyla silindi!
auths.login_source_exist=Login source '%s' already exists.
config.server_config=Sunucu Yapılandırması
config.app_name=Uygulama Adı
@@ -981,10 +1077,9 @@ config.offline_mode=Çevrim Dışı Modu
config.disable_router_log=Yönlendirici Log'larını Devre Dışı Bırak
config.run_user=Çalıştırma Kullanıcısı
config.run_mode=Çalıştırma Modu
config.repo_root_path=Depo Kök Yolu
config.git_version=Git Version
config.static_file_root_path=Sabit Dosya Kök Yolu
config.log_file_root_path=Log Dosyası Kök Yolu
config.script_type=Betik Türü
config.reverse_auth_user=Tersine Yetkilendirme Kullanıcısı
config.ssh_config=SSH Yapılandırması
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=Keygen ('ssh-keygen') Yolu
config.ssh_minimum_key_size_check=Minimum Anahtar Uzunluğu Kontrolü
config.ssh_minimum_key_sizes=Minimum Anahtar Uzunlukları
config.repo_config=Repository Configuration
config.repo_root_path=Depo Kök Yolu
config.script_type=Betik Türü
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=Veritabanı Yapılandırması
config.db_type=Türü
config.db_host=Sunucu

1248
conf/locale/locale_uk-UA.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -48,7 +48,7 @@ cancel=取消
install=安装页面
title=首次运行安装程序
docker_helper=如果您正在使用 Docker 容器运行 Gogs请务必先仔细阅读 <a target="_blank" href="%s">官方文档</a> 后再对本页面进行填写。
requite_db_desc=Gogs 要求安装 MySQL、PostgreSQL、SQLite3 或 TiDB。
requite_db_desc=Gogs 要求安装 MySQL、PostgreSQL、SQLite3、MSSQL 或 TiDB。
db_title=数据库设置
db_type=数据库类型
host=数据库主机
@@ -58,9 +58,8 @@ db_name=数据库名称
db_helper=如果您使用 MySQL请使用 INNODB 引擎以及 utf8_general_ci 字符集。
ssl_mode=SSL 模式
path=数据库文件路径
sqlite_helper=SQLite3 或 TiDB 数据库文件路径。<br>作为服务启动时,请使用绝对路径。
err_empty_db_path=SQLite3 或 TiDB 的数据库路径不能为空。
err_invalid_tidb_name=TiDB 数据库名称不允许包含字符 "." 或 "-" 。
sqlite_helper=SQLite3 数据库文件路径。<br>作为服务启动时,请使用绝对路径。
err_empty_db_path=SQLite 数据库文件路径不能为空。
no_admin_and_disable_registration=您不能够在未创建管理员用户的情况下禁止注册。
err_empty_admin_password=管理员密码不能为空。
@@ -75,6 +74,8 @@ domain=域名
domain_helper=该设置影响 SSH 克隆地址。
ssh_port=SSH 端口号
ssh_port_helper=SSH 服务器的监听端口号,留空表示禁用 SSH 功能。
use_builtin_ssh_server=使用内置 SSH 服务器
use_builtin_ssh_server_popup=启动内置 SSH 服务器专门用于 Git 操作可以和系统 SSH 守护程序进行隔离。
http_port=HTTP 端口号
http_port_helper=应用监听的端口号
app_url=应用 URL
@@ -116,6 +117,7 @@ sqlite3_not_available=您所使用的发行版不支持 SQLite3请从 %s 下
invalid_db_setting=数据库设置不正确:%v
invalid_repo_path=仓库根目录设置不正确:%v
run_user_not_match=运行系统用户非当前用户:%s -> %s
invalid_smtp_from=SMTP From 字段不合法:%v
save_config_failed=应用配置保存失败:%v
invalid_admin_setting=管理员帐户设置不正确:%v
install_success=您好!我们很高兴您选择使用 Gogs祝您使用愉快代码从此无 BUG
@@ -137,6 +139,7 @@ issues.in_your_repos=属于该用户仓库的
[explore]
repos=仓库
users=用户
organizations=组织
search=搜索
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=您的帐户被禁止登录,请联系网站管理员。
resent_limit_prompt=对不起,您请求发送激活邮件过于频繁,请等待 3 分钟后再试!
has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 <b>%s</b> 但未被确认的邮件。如果您未收到激活邮件,或需要重新发送,请单击下方的按钮。
resend_mail=单击此处重新发送确认邮件
email_not_associate=您输入的邮箱地址未被关联到任何帐号!
send_reset_mail=单击此处(重新)发送您的密码重置邮件
reset_password=重置密码
invalid_code=对不起,您的确认代码已过期或已失效。
@@ -189,6 +191,13 @@ TeamName=团队名称
AuthName=认证名称
AdminEmail=管理员邮箱
NewBranchName=新的分支名称
CommitSummary=提交小结
CommitMessage=提交消息
CommitChoice=提交选择
TreeName=文件路径
Content=内容
require_error=不能为空。
alpha_dash_error=必须为英文字母、阿拉伯数字或横线(-_
alpha_dash_dot_error=必须为英文字母、阿拉伯数字、横线(-_或点。
@@ -330,6 +339,10 @@ access_token_deletion=删除个人操作令牌操作
access_token_deletion_desc=删除该个人操作令牌将删除所有相关的应用程序的访问权限。是否继续?
delete_token_success=个人操作令牌删除成功!请更新与该令牌有关的所有应用。
orgs.none=您现在还不是任何组织的成员。
orgs.leave_title=离开组织
orgs.leave_desc=离开组织后,组织相关的所有仓库和团队权限将被收回。是否继续?
delete_account=删除当前帐户
delete_prompt=删除操作会永久清除您的帐户信息,并且 <strong>不可恢复</strong>
confirm_delete_account=确认删除帐户
@@ -363,6 +376,7 @@ mirror_prune_desc=当远程追踪的引用被删除时本地也同步删除
mirror_interval=镜像同步周期(小时)
mirror_address=镜像地址
mirror_address_desc=请在镜像地址中写入必要的用户凭据信息。
mirror_last_synced=上次同步时间:
watchers=关注者
stargazers=称赞者
forks=派生仓库
@@ -376,14 +390,14 @@ migrate_type=迁移类型
migrate_type_helper=该仓库将是一个 <span class="text blue">镜像</span>
migrate_repo=迁移仓库
migrate.clone_address=克隆地址
migrate.clone_address_desc=该地址可以是 HTTP/HTTPS/GIT URL 或本地服务器路径
migrate.clone_address_desc=该地址可以是 HTTP/HTTPS/GIT 类型的 URL
migrate.clone_address_desc_import_local=您被允许使用服务器本地路径作为仓库的远程地址进行迁移。
migrate.permission_denied=您没有获得导入本地仓库的权限。
migrate.invalid_local_path=无效的本地路径,不存在或不是一个目录!
migrate.failed=迁移失败:%v
mirror_from=镜像自地址
forked_from=派生自
fork_from_self=无法派生已经拥有的仓库!
copy_link=复制链接
copy_link_success=复制成功!
copy_link_error=请按下 ⌘-C 或 Ctrl-C 复制
@@ -401,7 +415,7 @@ create_new_repo_command=从命令行创建一个新的仓库
push_exist_repo=从命令行推送已经创建的仓库
repo_is_empty=该仓库不包含任何内容,请稍后再进行访问!
code=代码
files=文件
branch=分支
tree=目录树
filter_branch_and_tag=过滤分支或标签
@@ -418,7 +432,48 @@ file_history=文件历史
file_view_raw=查看原始文件
file_permalink=永久链接
file_too_large=文件过大导致无法显示
video_not_supported_in_browser=您的浏览器不支持使用 HTML5 播放视频。
editor.new_file=新的文件
editor.upload_file=上传文件
editor.edit_file=编辑文件
editor.preview_changes=预览变更
editor.cannot_edit_non_text_files=无法编辑非文本文件
editor.edit_this_file=编辑此文件
editor.must_be_on_a_branch=您必须在某个分支上才能对此文件进行修改操作
editor.fork_before_edit=您必须派生此仓库才能对此文件进行修改操作
editor.delete_this_file=删除此文件
editor.must_have_write_access=您必须具有可写权限才能对此文件进行修改操作
editor.file_delete_success=文件 '%s' 删除成功!
editor.name_your_file=命名文件...
editor.filename_help=输入名称后按下 / 键即可添加目录,或将光标移至输入框最左侧按下退格键移除目录。
editor.or=
editor.cancel_lower=取消
editor.commit_changes=提交变更
editor.add_tmpl=添加 '%s/<文件名>'
editor.add=添加 '%s'
editor.update=更新 '%s'
editor.delete=删除 '%s'
editor.commit_message_desc=添加一个可选的扩展描述...
editor.commit_directly_to_this_branch=直接提交至 <strong class="branch-name">%s</strong> 分支。
editor.create_new_branch=为此提交创建一个 <strong>新的分支</strong> 并发起合并请求。
editor.new_branch_name_desc=新的分支名称...
editor.cancel=取消
editor.filename_cannot_be_empty=文件名不能为空。
editor.branch_already_exists=此仓库已存在名为 '%s' 的分支。
editor.directory_is_a_file=路径 '%s' 的父路径中包含此仓库已存在的文件名。
editor.file_is_a_symlink=文件 '%s' 为一个符号链接,无法通过 Web 编辑器编辑内容。
editor.filename_is_a_directory=文件名 '%s' 是此仓库中已存在的目录名。
editor.file_editing_no_longer_exists=您编辑的文件 '%s' 已经不存在于此仓库中。
editor.file_changed_while_editing=文件内容在您进行编辑时已经发生变动。<a target="_blank" href="%s">单击此处</a> 查看变动的具体内容,或者 <strong>再次提交</strong> 覆盖已发生的变动。
editor.file_already_exists=此仓库已经存在名为 '%s' 的文件。
editor.no_changes_to_show=没有可以显示的变更。
editor.fail_to_update_file=更新/创建文件 '%s' 时发生错误:%v
editor.add_subdir=添加子目录...
editor.unable_to_upload_files=上传文件至 '%s' 时发生错误:%v
editor.upload_files_to_dir=上传文件至 '%s'
commits.commit_history=提交历史
commits.commits=次代码提交
commits.search=搜索提交历史
commits.find=查找
@@ -444,6 +499,11 @@ issues.create=创建工单
issues.new_label=创建标签
issues.new_label_placeholder=标签名称...
issues.create_label=创建标签
issues.label_templates.title=加载预定义的标签模板
issues.label_templates.info=此仓库还未创建任何标签,您可以通过上方的 "创建标签" 创建一个新的标签或加载一组预定义的标签。
issues.label_templates.helper=选择标签模板
issues.label_templates.use=加载标签模板
issues.label_templates.fail_to_load_file=加载标签模板文件 '%s' 时发生错误:%v
issues.open_tab=%d 个开启中
issues.close_tab=%d 个已关闭
issues.filter_label=标签筛选
@@ -485,8 +545,7 @@ issues.commit_ref_at=`在代码提交 <a id="%[1]s" href="#%[1]s">%[2]s</a> 中
issues.poster=发布者
issues.collaborator=协作者
issues.owner=所有者
issues.sign_up_for_free=免费注册
issues.sign_in_require_desc=并加入到对话中来。如果您已经注册,可以直接 <a href="%s">登录并评论</a>
issues.sign_in_require_desc=<a href="%s">登陆</a> 并参与到对话中。
issues.edit=编辑
issues.cancel=取消
issues.save=保存
@@ -501,6 +560,8 @@ issues.label_deletion=删除标签操作
issues.label_deletion_desc=删除该标签将会移除所有工单中相关的信息。是否继续?
issues.label_deletion_success=标签删除成功!
issues.num_participants=%d 名参与者
issues.attachment.open_tab=`在新的标签页中查看 '%s'`
issues.attachment.download=`点击下载 '%s'`
pulls.new=创建合并请求
pulls.compare_changes=对比文件变化
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=该合并请求存在冲突,无法进行自动合
pulls.cannot_auto_merge_helper=请手动拉取代码变更以解决冲突。
pulls.merge_pull_request=合并请求
pulls.open_unmerged_pull_exists=`由于已经存在来自相同仓库和合并信息的未合并请求(#%d您无法执行重新开启操作。`
pulls.delete_branch=删除分支
pulls.delete_branch_has_new_commits=该分支在完成合并后又推送了新的提交,无法进行删除操作。
milestones.new=新的里程碑
milestones.open_tab=%d 开启中
@@ -577,11 +640,35 @@ settings.collaboration.admin=管理权限
settings.collaboration.write=可写权限
settings.collaboration.read=可读权限
settings.collaboration.undefined=未定义
settings.branches=管理分支
settings.default_branch=默认分支
settings.default_branch_desc=默认分支是被用于代码提交、合并请求和在线编辑的基准分支。
settings.update=更新
settings.update_default_branch_success=仓库默认分支更新成功!
settings.protected_branches=保护分支
settings.protected_branches_desc=保护分支不被强制推送、意外删除和限制代码提交白名单。
settings.choose_a_branch=选择一个分支...
settings.branch_protection=分支保护
settings.branch_protection_desc=请选择应用于 <b>%s</b> 分支的保护选项。
settings.protect_this_branch=启用分支保护
settings.protect_this_branch_desc=禁止强制推送和删除分支。
settings.protect_require_pull_request=要求通过合并请求提交代码
settings.protect_require_pull_request_desc=启用该选项后代码将不能直接被推送到此分支,所有的代码提交都必须通过另一个非保护分支发起合并请求进行合并。
settings.protect_whitelist_committers=限制可以推送代码的成员
settings.protect_whitelist_committers_desc=添加用户或团队到可直接推送代码的白名单。
settings.protect_whitelist_users=允许推送到此分支的用户
settings.protect_whitelist_search_users=搜索用户
settings.protect_whitelist_teams=允许其成员推送到此分支的团队
settings.protect_whitelist_search_teams=搜索团队
settings.update_protect_branch_success=此分支的保护选项更新成功!
settings.hooks=管理 Web 钩子
settings.githooks=管理 Git 钩子
settings.basic_settings=基本设置
settings.mirror_settings=镜像设置
settings.sync_mirror=立即同步
settings.mirror_sync_in_progress=镜像同步请求已经生效,请稍后刷新页面。
settings.site=官方网站
settings.update_settings=更新仓库设置
settings.update_settings=更新设置
settings.change_reponame_prompt=该操作将会影响到所有与该仓库有关的链接
settings.advanced_settings=高级设置
settings.wiki_desc=启用 Wiki 系统
@@ -592,6 +679,8 @@ settings.external_wiki_url_desc=当访问者单击分页标签时,将会被重
settings.issues_desc=启用工单管理系统
settings.use_internal_issue_tracker=使用内置的轻量级工单管理系统
settings.use_external_issue_tracker=使用外部的工单管理系统
settings.external_tracker_url=外部工单管理系统 URL
settings.external_tracker_url_desc=当访问者单击分页标签时,将会被重定向到该链接。
settings.tracker_url_format=外部工单管理系统的 URL 格式
settings.tracker_issue_style=外部工单管理系统命名风格:
settings.tracker_issue_style.numeric=纯数字形式
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=英文字母数字组合形式
settings.tracker_url_format_desc=您可以使用 <code>{user} {repo} {index}</code> 分别作为用户名、仓库名和工单索引的占位符。
settings.pulls_desc=启用合并请求以接受社区贡献
settings.danger_zone=危险操作区
settings.cannot_fork_to_same_owner=您不能派生仓库到其当前的所有者。
settings.new_owner_has_same_repo=新的仓库拥有者已经存在同名仓库!
settings.convert=转换为普通仓库
settings.convert_desc=您可以将该镜像仓库转换为普通仓库,且此操作不可逆。
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=此用户被删除后将不再拥有相关
settings.remove_collaborator_success=被操作的协作者已经被收回权限!
settings.search_user_placeholder=搜索用户...
settings.org_not_allowed_to_be_collaborator=组织不允许被添加为仓库协作者!
settings.user_is_org_member=被操作的用户是组织成员,因此无法添加为协作者!
settings.add_webhook=添加 Web 钩子
settings.hooks_desc=Web 钩子允许您设定在 Gogs 上发生指定事件时对指定 URL 发送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文档</a> 获取更多信息。
settings.webhook_deletion=删除 Web 钩子
@@ -656,6 +745,7 @@ settings.add_webhook_desc=我们会通过 <code>POST</code> 请求将订阅事
settings.payload_url=推送地址
settings.content_type=数据格式
settings.secret=密钥文本
settings.secret_desc=密钥文本将被用于计算推送内容的 SHA256 HMAC 哈希值,并设置为 <code>X-Gogs-Signature</code> 请求头的值。
settings.slack_username=服务名称
settings.slack_icon_url=图标 URL
settings.slack_color=颜色代码
@@ -665,6 +755,8 @@ settings.event_send_everything=请把 <strong>一切</strong> 都给我
settings.event_choose=我的命运自己主宰
settings.event_create=创建
settings.event_create_desc=创建分支或标签
settings.event_pull_request=合并请求
settings.event_pull_request_desc=开启、关闭、重新开启、编辑、指派、取消指派、更新标签、清除标签或同步合并请求
settings.event_push=推送
settings.event_push_desc=Git 仓库推送
settings.active=是否激活
@@ -676,10 +768,12 @@ settings.delete_webhook=删除 Web 钩子
settings.recent_deliveries=最近推送记录
settings.hook_type=钩子类型
settings.add_slack_hook_desc=为您的仓库增加 <a href="%s">Slack</a> 集成。
settings.add_discord_hook_desc=为您的仓库增加 <a href="%s">Discord</a> 集成。
settings.slack_token=令牌
settings.slack_domain=域名
settings.slack_channel=频道
settings.deploy_keys=管理部署密钥
settings.deploy_keys_helper=<b>常识错误!</b>如果您想要添加的是个人公钥,请将它们添加到您的 <a href="%s%s"> 用户设置</a>。
settings.add_deploy_key=添加部署密钥
settings.deploy_key_desc=部署密钥仅具有只读权限,它在功能上和个人用户的公开密钥有本质区别。
settings.no_deploy_keys=您还没有添加任何部署密钥。
@@ -758,6 +852,7 @@ team_permission_desc=请选择该团队所具有的权限等级:
form.name_reserved=组织名称 '%s' 是被保留的。
form.name_pattern_not_allowed=组织名称不允许 '%s' 的格式。
form.team_name_reserved=团队名称 '%s' 是被保留的。
settings=组织设置
settings.options=基本设置
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=对仓库进行垃圾回收
dashboard.git_gc_repos_success=所有仓库垃圾回收成功!
dashboard.resync_all_sshkeys=重新生成 '.ssh/authorized_keys' 文件(警告:不是 Gogs 的密钥也会被删除)
dashboard.resync_all_sshkeys_success=所有公钥重新生成成功!
dashboard.resync_all_update_hooks=重新生成所有仓库的 Update 钩子(用于自定义配置文件被修改)
dashboard.resync_all_update_hooks_success=所有仓库的 Update 钩子重新生成成功!
dashboard.resync_all_hooks=重新同步所有仓库的 pre-receive、update 和 post-receive 钩子
dashboard.resync_all_hooks_success=所有仓库的 pre-receive、update 和 post-receive 钩子重新同步成功!
dashboard.reinit_missing_repos=重新初始化所有丢失 Git 文件的仓库
dashboard.reinit_missing_repos_success=所有丢失 Git 文件的仓库重新初始化成功!
@@ -971,6 +1066,7 @@ auths.delete_auth_title=删除认证操作
auths.delete_auth_desc=该认证将被删除。是否继续?
auths.still_in_used=此认证仍旧与一些用户有关联,请先删除或者将这些用户转换为其它登录类型。
auths.deletion_success=授权源删除成功!
auths.login_source_exist=登录源 '%s' 已存在。
config.server_config=服务器配置
config.app_name=应用名称
@@ -981,10 +1077,9 @@ config.offline_mode=离线模式
config.disable_router_log=关闭路由日志
config.run_user=运行用户
config.run_mode=运行模式
config.repo_root_path=仓库根目录
config.git_version=Git 版本
config.static_file_root_path=静态文件根目录
config.log_file_root_path=日志文件根目录
config.script_type=脚本类型
config.reverse_auth_user=反向代理认证
config.ssh_config=SSH 配置
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=密钥生成器('ssh-keygen')路径
config.ssh_minimum_key_size_check=密钥最小长度检查
config.ssh_minimum_key_sizes=密钥最小长度限制
config.repo_config=仓库配置
config.repo_root_path=仓库根目录
config.script_type=脚本类型
config.repo_force_private=强制设为私有
config.max_creation_limit=可创建数量限制
config.preferred_licenses=推荐许可证
config.disable_http_git=禁用 HTTP Git 操作
config.enable_local_path_migration=启用本地路径迁移
config.commits_fetch_concurrency=代码提交拉取并发量
config.db_config=数据库配置
config.db_type=数据库类型
config.db_host=主机地址

View File

@@ -48,7 +48,7 @@ cancel=取消
install=安裝頁面
title=首次安裝步驟
docker_helper=如果您正在使用 Docker 容器運行 Gogs請務必先仔細閱讀 <a target="_blank" href="%s">官方文檔</a> 後再對本頁面進行填寫。
requite_db_desc=Gogs 要求安裝 MySQLPostgreSQLSQLite3 TiDB
requite_db_desc=Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
db_title=數據庫設置
db_type=資料庫類型
host=主機
@@ -58,9 +58,8 @@ db_name=資料庫名稱
db_helper=如果您使用 MySQL請使用 INNODB 引擎以及 utf8_general_ci 字符集。
ssl_mode=SSL 模式
path=數據庫文件路徑
sqlite_helper=SQLite3 或 TiDB 資料庫檔案路徑。<br>作為以服務執行時,請使用絕對路徑。
err_empty_db_path=SQLite3 或 TiDB 的數據庫路徑不能為空。
err_invalid_tidb_name=TiDB 數據庫名稱不允許包含字符 "." 或 "-" 。
sqlite_helper=The file path of SQLite3 database. <br>Please use absolute path when you start as service.
err_empty_db_path=SQLite3 database path cannot be empty.
no_admin_and_disable_registration=您不能夠在未創建管理員用戶的情況下禁止註冊。
err_empty_admin_password=管理員密碼不能為空。
@@ -75,6 +74,8 @@ domain=域名
domain_helper=該設置影響 SSH 複製地址。
ssh_port=SSH 埠
ssh_port_helper=您的 SSH 服務正在使用此埠號若要禁用SSH 功能請保持欄位空白。
use_builtin_ssh_server=Use Builtin SSH Server
use_builtin_ssh_server_popup=Start builtin SSH server for Git operations to distinguish from system SSH daemon.
http_port=HTTP 端口號
http_port_helper=應用監聽的端口號
app_url=應用程式網址
@@ -116,6 +117,7 @@ sqlite3_not_available=您所使用的發行版本不支持 SQLite3請從 %s
invalid_db_setting=數據庫設置不正確:%v
invalid_repo_path=倉庫根目錄設置不正確:%v
run_user_not_match=執行系統用戶非當前用戶:%s -> %s
invalid_smtp_from=SMTP From field is not valid: %v
save_config_failed=應用配置保存失敗:%v
invalid_admin_setting=管理員帳戶設置不正確:%v
install_success=您好!我們很高興您選擇使用 Gogs祝您使用愉快代碼從此無 BUG
@@ -137,6 +139,7 @@ issues.in_your_repos=屬於該用戶倉庫的
[explore]
repos=探索倉庫
users=用戶
organizations=Organizations
search=搜索
[auth]
@@ -156,7 +159,6 @@ prohibit_login_desc=Your account is prohibited to login, please contact site adm
resent_limit_prompt=對不起,您請求發送激活郵件過於頻繁,請等待 3 分鐘後再試!
has_unconfirmed_mail=%s 您好,您有一封發送至( <b>%s</b>) 但未被確認的郵件。如果您未收到激活郵件,或需要重新發送,請單擊下方的按鈕。
resend_mail=單擊此處重新發送確認郵件
email_not_associate=您輸入的郵箱地址未被關聯到任何帳號!
send_reset_mail=單擊此處(重新)發送您的密碼重置郵件
reset_password=重置密碼
invalid_code=對不起,您的確認代碼已過期或已失效。
@@ -189,6 +191,13 @@ TeamName=團隊名稱
AuthName=認證名稱
AdminEmail=管理員郵箱
NewBranchName=New branch name
CommitSummary=Commit summary
CommitMessage=Commit message
CommitChoice=Commit choice
TreeName=File path
Content=Content
require_error=不能為空。
alpha_dash_error=必須為英文字母、阿拉伯數字或橫線(-_
alpha_dash_dot_error=必須為英文字母、阿拉伯數字、橫線(-_或點。
@@ -330,6 +339,10 @@ access_token_deletion=刪除個人的連接token
access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式的連結。您想要繼續嗎?
delete_token_success=您的連接token已成功刪除。請記得更新您的應用程式。
orgs.none=You are not a member of any organizations.
orgs.leave_title=Leave an organization
orgs.leave_desc=You will lose access to all repositories and teams after you left the organization. Do you want to continue?
delete_account=刪除當前帳戶
delete_prompt=刪除操作會永久清除您的帳戶信息,並且 <strong>不可恢復</strong>
confirm_delete_account=確認刪除帳戶
@@ -363,6 +376,7 @@ mirror_prune_desc=Remove any remote-tracking references that no longer exist on
mirror_interval=鏡像同步周期(小時)
mirror_address=鏡像地址
mirror_address_desc=請在位址中包括必要的使用者憑據。
mirror_last_synced=Last Synced
watchers=關注者
stargazers=稱讚者
forks=派生倉庫
@@ -376,14 +390,14 @@ migrate_type=遷移類型
migrate_type_helper=該倉庫將是一個 <span class="text blue">鏡像</span>
migrate_repo=遷移倉庫
migrate.clone_address=複製地址
migrate.clone_address_desc=該地址可以是 HTTP/HTTPS/GIT URL 或本地服務器路徑。
migrate.clone_address_desc=This can be a HTTP/HTTPS/GIT URL.
migrate.clone_address_desc_import_local=You're also allowed to migrate a repository by local server path.
migrate.permission_denied=您並沒有導入本地倉庫的權限。
migrate.invalid_local_path=無效的本地路徑,該路徑不存在或不是一個目錄!
migrate.failed=遷移失敗:%v
mirror_from=镜像来自
forked_from=派生自
fork_from_self=無法派生已經擁有的倉庫!
copy_link=複製連結
copy_link_success=複製成功!
copy_link_error=請按下 ⌘-C 或 Ctrl-C 複製
@@ -401,7 +415,7 @@ create_new_repo_command=從命令行創建一個新的倉庫
push_exist_repo=從命令行推送已經創建的倉庫
repo_is_empty=這倉庫不包含任何內容,請稍後再訪問!
code=代碼
files=Files
branch=分支
tree=目錄樹
filter_branch_and_tag=過濾分支或標籤
@@ -418,7 +432,48 @@ file_history=文件歷史
file_view_raw=查看原始文件
file_permalink=永久連結
file_too_large=This file is too large to be shown
video_not_supported_in_browser=Your browser doesn't support HTML5 video tag.
editor.new_file=New file
editor.upload_file=Upload file
editor.edit_file=Edit file
editor.preview_changes=Preview Changes
editor.cannot_edit_non_text_files=Cannot edit non-text files
editor.edit_this_file=Edit this file
editor.must_be_on_a_branch=You must be on a branch to make or propose changes to this file
editor.fork_before_edit=You must fork this repository before editing the file
editor.delete_this_file=Delete this file
editor.must_have_write_access=You must have write access to make or propose changes to this file
editor.file_delete_success=File '%s' has been deleted successfully!
editor.name_your_file=Name your file...
editor.filename_help=To add directory, just type it and press /. To remove a directory, go to the beginning of the field and press backspace.
editor.or=or
editor.cancel_lower=cancel
editor.commit_changes=Commit Changes
editor.add_tmpl=Add '%s/<filename>'
editor.add=Add '%s'
editor.update=Update '%s'
editor.delete=Delete '%s'
editor.commit_message_desc=Add an optional extended description...
editor.commit_directly_to_this_branch=Commit directly to the <strong class="branch-name">%s</strong> branch.
editor.create_new_branch=Create a <strong>new branch</strong> for this commit and start a pull request.
editor.new_branch_name_desc=New branch name...
editor.cancel=Cancel
editor.filename_cannot_be_empty=Filename cannot be empty.
editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.file_is_a_symlink=The file '%s' is a symlink that cannot be modified from the web editor.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
editor.add_subdir=Add subdirectory...
editor.unable_to_upload_files=Failed to upload files to '%s' with error: %v
editor.upload_files_to_dir=Upload files to '%s'
commits.commit_history=Commit History
commits.commits=次代碼提交
commits.search=搜索提交歷史
commits.find=查找
@@ -444,6 +499,11 @@ issues.create=創建問題
issues.new_label=創建標籤
issues.new_label_placeholder=標籤名稱...
issues.create_label=創建標籤
issues.label_templates.title=Load a predefined set of labels
issues.label_templates.info=There aren't any labels yet. You can click on the "New Label" button above to create one or use a predefined set below.
issues.label_templates.helper=Select a label set
issues.label_templates.use=Use this label set
issues.label_templates.fail_to_load_file=Failed to load label template file '%s': %v
issues.open_tab=%d 個開啓中
issues.close_tab=%d 個已關閉
issues.filter_label=標籤篩選
@@ -485,8 +545,7 @@ issues.commit_ref_at=`在代碼提交 <a id="%[1]s" href="#%[1]s">%[2]s</a> 中
issues.poster=發佈者
issues.collaborator=協同者
issues.owner=所有者
issues.sign_up_for_free=免費註冊
issues.sign_in_require_desc=及加入到對話當中。如果您已經註冊,可以直接 <a href="%s">登錄及評論</a>
issues.sign_in_require_desc=<a href="%s">Sign in</a> to join this conversation.
issues.edit=編輯
issues.cancel=取消
issues.save=保存
@@ -501,6 +560,8 @@ issues.label_deletion=刪除標籤
issues.label_deletion_desc=刪除該標籤將會移除所有問題中相關的訊息。是否繼續?
issues.label_deletion_success=標籤刪除成功!
issues.num_participants=%d 參與者
issues.attachment.open_tab=`Click to see "%s" in a new tab`
issues.attachment.download=`Click to download "%s"`
pulls.new=創建合併請求
pulls.compare_changes=對比文件變化
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=由於存在衝突,不能自動合併這推送請
pulls.cannot_auto_merge_helper=請手動合併來解決衝突。
pulls.merge_pull_request=合併請求
pulls.open_unmerged_pull_exists=`由於已經存在來自相同倉庫和合併信息的未合併請求(#%d您無法執行重新開啟操作。`
pulls.delete_branch=Delete Branch
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=新的里程碑
milestones.open_tab=%d 開啟中
@@ -577,9 +640,33 @@ settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.default_branch=Default Branch
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Update
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Protected Branches
settings.protected_branches_desc=Protect branches from force pushing, accidental deletion and whitelist code committers.
settings.choose_a_branch=Choose a branch...
settings.branch_protection=Branch Protection
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch_desc=Disable force pushes and prevent from deletion.
settings.protect_require_pull_request=Require pull request instead direct pushing
settings.protect_require_pull_request_desc=Enable this option to disable direct pushing to this branch. Commits have to be pushed to another non-protected branch and merged to this branch through pull request.
settings.protect_whitelist_committers=Whitelist who can push to this branch
settings.protect_whitelist_committers_desc=Add people or teams to whitelist of direct push to this branch.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=管理 Web 鉤子
settings.githooks=管理 Git 鉤子
settings.basic_settings=基本設置
settings.mirror_settings=Mirror Settings
settings.sync_mirror=Sync Now
settings.mirror_sync_in_progress=Mirror syncing is in progress, please refresh page in about a minute.
settings.site=官方網站
settings.update_settings=更新倉庫設置
settings.change_reponame_prompt=該操作將會影響到所有與該倉庫有關的鏈接
@@ -592,6 +679,8 @@ settings.external_wiki_url_desc=當分頁上按一下,訪客將會重新導到
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.use_external_issue_tracker=使用外部的問題管理系統
settings.external_tracker_url=External Issue Tracker URL
settings.external_tracker_url_desc=Visitors will be redirected to URL when they click on the tab.
settings.tracker_url_format=外部問題管理系統的 URL 格式
settings.tracker_issue_style=External Issue Tracker Naming Style:
settings.tracker_issue_style.numeric=Numeric
@@ -599,6 +688,7 @@ settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_url_format_desc=您可以使用 <code>{user} {repo} {index}</code> 分別作為用戶名、倉庫名和問題索引的占位符。
settings.pulls_desc=啟用合併請求以接受社區貢獻
settings.danger_zone=危險操作區
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=新的倉庫擁有者已經存在同名倉庫!
settings.convert=轉換為正規倉庫
settings.convert_desc=您可以將此鏡像轉成正規倉庫。此動做不可逆。
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=This user will no longer have collaboration
settings.remove_collaborator_success=被操作的協作者已經被收回權限!
settings.search_user_placeholder=搜索用戶...
settings.org_not_allowed_to_be_collaborator=Organization is not allowed to be added as a collaborator.
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
settings.add_webhook=添加 Web 鉤子
settings.hooks_desc=Web 鉤子允許您設定在 Gogs 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
settings.webhook_deletion=刪除 Web 鉤子
@@ -656,6 +745,7 @@ settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事
settings.payload_url=推送地址
settings.content_type=數據格式
settings.secret=密鑰文本
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=服務名稱
settings.slack_icon_url=圖標 URL
settings.slack_color=顏色代碼
@@ -665,6 +755,8 @@ settings.event_send_everything=推送 <strong>所有</strong> 事件
settings.event_choose=讓我選擇我的需要
settings.event_create=創建
settings.event_create_desc=創建分支或標籤
settings.event_pull_request=Pull Request
settings.event_pull_request_desc=Pull request opened, closed, reopened, edited, assigned, unassigned, label updated, label cleared, or synchronized.
settings.event_push=推送
settings.event_push_desc=Git 倉庫推送
settings.active=是否激活
@@ -676,10 +768,12 @@ settings.delete_webhook=刪除 Web 鉤子
settings.recent_deliveries=最近推送記錄
settings.hook_type=鉤子類型
settings.add_slack_hook_desc=為您的倉庫增加 <a href="%s">Slack</a> 集成。
settings.add_discord_hook_desc=Add <a href="%s">Discord</a> integration to your repository.
settings.slack_token=令牌
settings.slack_domain=域名
settings.slack_channel=頻道
settings.deploy_keys=管理部署密鑰
settings.deploy_keys_helper=<b>Common Gotcha!</b> If you're looking for adding personal public keys, please add them in your <a href="%s%s">account settings</a>.
settings.add_deploy_key=添加部署密鑰
settings.deploy_key_desc=部署密鑰僅具有隻讀權限,它在功能上和個人用戶的公開密鑰有本質區別。
settings.no_deploy_keys=您還沒有添加任何部署密鑰。
@@ -758,6 +852,7 @@ team_permission_desc=請選擇該團隊所具有的權限等級:
form.name_reserved=組織名稱 '%s' 是被保留的。
form.name_pattern_not_allowed=組織名稱不允許 '%s' 的格式。
form.team_name_reserved=Team name '%s' is reserved.
settings=組織設置
settings.options=基本設置
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=對倉庫進行垃圾回收
dashboard.git_gc_repos_success=所有倉庫的垃圾回收已成功完成!
dashboard.resync_all_sshkeys=重新生成 '.ssh/authorized_keys' 文件(警告:不是 Gogs 的密鑰也會被刪除)
dashboard.resync_all_sshkeys_success=所有公鑰重新生成成功!
dashboard.resync_all_update_hooks=重新生成所有倉庫的 Update 鈎子(用於被修改的自定義配置文件)
dashboard.resync_all_update_hooks_success=已成功重新生成所有倉庫的 Update 鈎子!
dashboard.resync_all_hooks=Resync pre-receive, update and post-receive hooks of all repositories
dashboard.resync_all_hooks_success=All repositories' pre-receive, update and post-receive hooks have been resynced successfully.
dashboard.reinit_missing_repos=Reinitialize all repository records that lost Git files
dashboard.reinit_missing_repos_success=All repository records that lost Git files have been reinitialized successfully.
@@ -971,6 +1066,7 @@ auths.delete_auth_title=刪除認證操作
auths.delete_auth_desc=該認證將被刪除。是否繼續?
auths.still_in_used=This authentication is still used by some users, please delete or convert these users to another login type first.
auths.deletion_success=認證源刪除成功!
auths.login_source_exist=Login source '%s' already exists.
config.server_config=服務器配置
config.app_name=應用名稱
@@ -981,10 +1077,9 @@ config.offline_mode=離線模式
config.disable_router_log=關閉路由日志
config.run_user=執行用戶
config.run_mode=執行模式
config.repo_root_path=倉庫根目錄
config.git_version=Git Version
config.static_file_root_path=靜態文件根目錄
config.log_file_root_path=日志文件根目錄
config.script_type=腳本類型
config.reverse_auth_user=反向代理認證
config.ssh_config=SSH 配置
@@ -999,6 +1094,16 @@ config.ssh_keygen_path=金鑰產生 (' ssh-keygen ') 路徑
config.ssh_minimum_key_size_check=金鑰最小大小檢查
config.ssh_minimum_key_sizes=金鑰最小大小
config.repo_config=Repository Configuration
config.repo_root_path=倉庫根目錄
config.script_type=腳本類型
config.repo_force_private=Force Private
config.max_creation_limit=Max Creation Limit
config.preferred_licenses=Preferred Licenses
config.disable_http_git=Disable HTTP Git
config.enable_local_path_migration=Enable Local Path Migration
config.commits_fetch_concurrency=Commits Fetch Concurrency
config.db_config=數據庫配置
config.db_type=數據庫類型
config.db_host=主機地址

View File

@@ -48,8 +48,8 @@ cancel=取消
install=安裝頁面
title=首次安裝步驟
docker_helper=如果您正在使用 Docker 容器運行 Gogs請務必先仔細閱讀 <a target="_blank" href="%s">官方文檔</a> 後再對本頁面進行填寫。
requite_db_desc=Gogs 要安裝 MySQL、PostgreSQL、SQLite3 或 TiDB。
db_title=數據庫設
requite_db_desc=Gogs 要安裝 MySQL、PostgreSQL、SQLite3、MSSQL 或 TiDB 其中一項
db_title=資料庫設
db_type=資料庫類型
host=主機
user=帳號
@@ -57,10 +57,9 @@ password=密碼
db_name=資料庫名稱
db_helper=如果您使用 MySQL請使用 INNODB 引擎以及 utf8_general_ci 字符集。
ssl_mode=SSL 模式
path=數據庫文件路徑
sqlite_helper=SQLite3 或 TiDB 資料庫檔案路徑。<br>作為以服務執行時,請使用絕對路徑。
err_empty_db_path=SQLite3 或 TiDB 的數據庫路徑不為空。
err_invalid_tidb_name=TiDB 數據庫名稱不允許包含字符 "." 或 "-" 。
path=路徑
sqlite_helper=SQLite3 資料庫檔案路徑。<br>請務必在啟動服務時使用絕對路徑。
err_empty_db_path=SQLite3 資料庫路徑不可以為空。
no_admin_and_disable_registration=您不能夠在未創建管理員用戶的情況下禁止註冊。
err_empty_admin_password=管理員密碼不能為空。
@@ -75,6 +74,8 @@ domain=域名
domain_helper=該設置影響 SSH 複製地址。
ssh_port=SSH 埠
ssh_port_helper=您的 SSH 服務正在使用此埠號若要禁用SSH 功能請保持欄位空白。
use_builtin_ssh_server=使用內建的 SSH 伺服器
use_builtin_ssh_server_popup=啟用內建的 SSH 伺服器作為 Git 操作,使其與系統的 SSH 守護行程隔離 。
http_port=HTTP 端口號
http_port_helper=應用監聽的端口號
app_url=應用程式網址
@@ -96,10 +97,10 @@ offline_mode=啓用離線模式
offline_mode_popup=在部署模式下也禁用從 CDN 獲取文件,所有的資源將從本地伺服器獲取。
disable_gravatar=禁用 Gravatar 服務
disable_gravatar_popup=禁用 Gravatar 和自定義源,僅使用由用戶上傳或默認的頭像。
federated_avatar_lookup=Enable Federated Avatars Lookup
federated_avatar_lookup_popup=Enable federated avatars lookup to use federated open source service based on libravatar.
federated_avatar_lookup=開啟聯合頭像查詢
federated_avatar_lookup_popup=開啟聯合頭像查詢並使用基於開放源碼的 libravatar 服務
disable_registration=禁止用戶自主註冊
disable_registration_popup=禁止用戶自主註冊功能,只有管理員可以添加帳號。
disable_registration_popup=禁止用戶註冊功能,只有管理員可以添加帳號。
enable_captcha=啟用驗證碼服務
enable_captcha_popup=要求在用戶註冊時輸入驗證碼
require_sign_in_view=啓用登錄訪問限制
@@ -113,10 +114,11 @@ admin_email=管理員郵箱
install_gogs=立即安裝
test_git_failed=無法識別 'git' 命令:%v
sqlite3_not_available=您所使用的發行版本不支持 SQLite3請從 %s 下載官方構建版,而不是 gobuild 版本。
invalid_db_setting=數據庫設不正確%v
invalid_db_setting=資料庫設不正確: %v
invalid_repo_path=倉庫根目錄設置不正確:%v
run_user_not_match=執行系統用戶非當前用戶:%s -> %s
save_config_failed=應用配置保存失敗:%v
invalid_smtp_from=SMTP 寄件者欄位無效﹔%v
save_config_failed=設定儲存失敗:%v
invalid_admin_setting=管理員帳戶設置不正確:%v
install_success=您好!我們很高興您選擇使用 Gogs祝您使用愉快代碼從此無 BUG
invalid_log_root_path=日誌根目錄無效: %v
@@ -126,7 +128,7 @@ uname_holder=用戶名或郵箱
password_holder=密碼
switch_dashboard_context=切換控制面版用戶
my_repos=我的倉庫
show_more_repos=Show more repositories...
show_more_repos=顯示更多倉庫...
collaborative_repos=參與協作的倉庫
my_orgs=我的組織
my_mirrors=我的鏡像
@@ -137,6 +139,7 @@ issues.in_your_repos=屬於該用戶倉庫的
[explore]
repos=探索倉庫
users=用戶
organizations=組織
search=搜索
[auth]
@@ -151,12 +154,11 @@ forget_password=忘記密碼?
sign_up_now=還沒帳戶?馬上註冊。
confirmation_mail_sent_prompt=一封新的確認郵件已經被發送至 <b>%s</b>,請檢查您的收件箱並在 %d 小時內完成確認註冊操作。
active_your_account=激活您的帳戶
prohibit_login=Login Prohibited
prohibit_login_desc=Your account is prohibited to login, please contact site admin.
prohibit_login=禁止登錄
prohibit_login_desc=您的帳戶被停用,請聯繫網站管理員。
resent_limit_prompt=對不起,您請求發送激活郵件過於頻繁,請等待 3 分鐘後再試!
has_unconfirmed_mail=%s 您好,您有一封發送至( <b>%s</b>) 但未被確認的郵件。如果您未收到激活郵件,或需要重新發送,請單擊下方的按鈕。
resend_mail=單擊此處重新發送確認郵件
email_not_associate=您輸入的郵箱地址未被關聯到任何帳號!
send_reset_mail=單擊此處(重新)發送您的密碼重置郵件
reset_password=重置密碼
invalid_code=對不起,您的確認代碼已過期或已失效。
@@ -189,6 +191,13 @@ TeamName=團隊名稱
AuthName=認證名稱
AdminEmail=管理員郵箱
NewBranchName=新的分支名稱
CommitSummary=提交摘要
CommitMessage=提交訊息
CommitChoice=提交選擇
TreeName=檔案路徑
Content=內容
require_error=不能為空。
alpha_dash_error=必須為英文字母、阿拉伯數字或橫線(-_
alpha_dash_dot_error=必須為英文字母、阿拉伯數字、橫線(-_或點。
@@ -241,7 +250,7 @@ form.name_pattern_not_allowed=用戶名不允許 '%s' 的格式。
[settings]
profile=個人信息
password=修改密碼
avatar=Avatar
avatar=頭像
ssh_keys=管理 SSH 密鑰
social=社交帳號綁定
applications=管理授權應用
@@ -262,8 +271,8 @@ change_username_prompt=該操作將會影響到所有與您帳戶有關的鏈接
continue=繼續操作
cancel=取消操作
lookup_avatar_by_mail=Lookup Avatar by mail
federated_avatar_lookup=Federated Avatar Lookup
lookup_avatar_by_mail=通過信箱查找頭像
federated_avatar_lookup=Federated Avatar 查詢
enable_custom_avatar=啟動自定義頭像
choose_new_avatar=選擇新的頭像
update_avatar=更新頭像設置
@@ -330,6 +339,10 @@ access_token_deletion=刪除個人的連接token
access_token_deletion_desc=刪除此連接token將會刪除與相關應用程式的連結。您想要繼續嗎?
delete_token_success=您的連接token已成功刪除。請記得更新您的應用程式。
orgs.none=您現在還不是任何組織的成員。
orgs.leave_title=離開組織
orgs.leave_desc=離開組織後,所有與組織相關的倉庫和團隊權限將被取消。是否繼續?
delete_account=刪除當前帳戶
delete_prompt=刪除操作會永久清除您的帳戶信息,並且 <strong>不可恢復</strong>
confirm_delete_account=確認刪除帳戶
@@ -350,7 +363,7 @@ fork_from=派生自
fork_visiblity_helper=派生倉庫無法修改可見性。
repo_desc=倉庫描述
repo_lang=倉庫語言
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_helper=選擇 .gitignore 主題
license=授權許可
license_helper=請選擇授權許可文件
readme=Readme
@@ -363,6 +376,7 @@ mirror_prune_desc=當遠程追蹤的引用被刪除時本地也會同步刪除
mirror_interval=鏡像同步周期(小時)
mirror_address=鏡像地址
mirror_address_desc=請在位址中包括必要的使用者憑據。
mirror_last_synced=上次同步
watchers=關注者
stargazers=稱讚者
forks=派生倉庫
@@ -376,14 +390,14 @@ migrate_type=遷移類型
migrate_type_helper=該倉庫將是一個 <span class="text blue">鏡像</span>
migrate_repo=遷移倉庫
migrate.clone_address=複製地址
migrate.clone_address_desc=該地址可以是 HTTP/HTTPS/GIT URL 或本地服務器路徑
migrate.clone_address_desc=該地址可以是 HTTP/HTTPS/GIT 類型的 URL
migrate.clone_address_desc_import_local=您還可以用本地服務器路徑來遷移倉庫。
migrate.permission_denied=您並沒有導入本地倉庫的權限。
migrate.invalid_local_path=無效的本地路徑,該路徑不存在或不是一個目錄!
migrate.failed=遷移失敗:%v
mirror_from=镜像来自
forked_from=派生自
fork_from_self=無法派生已經擁有的倉庫!
copy_link=複製連結
copy_link_success=複製成功!
copy_link_error=請按下 ⌘-C 或 Ctrl-C 複製
@@ -401,7 +415,7 @@ create_new_repo_command=從命令行創建一個新的倉庫
push_exist_repo=從命令行推送已經創建的倉庫
repo_is_empty=這倉庫不包含任何內容,請稍後再訪問!
code=代碼
files=檔案
branch=分支
tree=目錄樹
filter_branch_and_tag=過濾分支或標籤
@@ -417,8 +431,49 @@ file_raw=原始文件
file_history=文件歷史
file_view_raw=查看原始文件
file_permalink=永久連結
file_too_large=This file is too large to be shown
file_too_large=檔案太大,無法顯示
video_not_supported_in_browser=您的瀏覽器不支援 HTML5 影片播放標籤。
editor.new_file=開新檔案
editor.upload_file=上傳檔案
editor.edit_file=編輯文件
editor.preview_changes=預覽更改
editor.cannot_edit_non_text_files=不能編輯非文字檔
editor.edit_this_file=編輯此文件
editor.must_be_on_a_branch=你必須在一個分支或提出對此檔的更改
editor.fork_before_edit=你必須在編輯檔案之前備份此檔案
editor.delete_this_file=刪除此文件
editor.must_have_write_access=您必須具有寫存取權限,或提出對此檔案的更改
editor.file_delete_success=已成功刪除 '%s'
editor.name_your_file=命名您的檔...
editor.filename_help=輸入名稱後按下 / 鍵即可新增資料夾或將滑鼠移至輸入格最左側按下Backspace移除資料夾。
editor.or=
editor.cancel_lower=取消
editor.commit_changes=提交更改嗎?
editor.add_tmpl=添加%s/<filename>'
editor.add=新增 '%s'
editor.update=更新 '%s'
editor.delete=刪除 '%s'
editor.commit_message_desc=添加一個可選的擴展描述...
editor.commit_directly_to_this_branch=直接提交到 <strong class="branch-name">%s</strong> 分支。
editor.create_new_branch=創建 <strong>新的分支</strong> 為此提交和開始合併請求。
editor.new_branch_name_desc=新的分支名稱...
editor.cancel=取消
editor.filename_cannot_be_empty=檔案名不能為空。
editor.branch_already_exists='%s' 已存在於此存儲庫。
editor.directory_is_a_file='%s' 在此倉庫中的路徑是檔案而不是目錄。
editor.file_is_a_symlink=檔案 '%s' 是一個符號連結,不能從 web 編輯器修改。
editor.filename_is_a_directory=檔案名 '%s' 是此資料庫中的現有目錄。
editor.file_editing_no_longer_exists=檔 '%s' 您正在編輯不再存在於資料庫。
editor.file_changed_while_editing=從您開始編輯已更改檔的內容。<a target="_blank"href="%s"> 按一下此處</a> 以查看什麼發生了更改或 <strong>按提交再</strong> 覆蓋這些更改。
editor.file_already_exists=帶有名稱 '%s' 的檔已經存在在這個資料庫中。
editor.no_changes_to_show=沒有可以顯示的變更。
editor.fail_to_update_file=上傳/創建檔案 '%s' 失敗, 錯誤訊息: %v
editor.add_subdir=新增子目錄...
editor.unable_to_upload_files=上傳檔案失敗到 '%s', 錯誤訊息: %v
editor.upload_files_to_dir=上傳檔案到 '%s'
commits.commit_history=提交歷史
commits.commits=次代碼提交
commits.search=搜索提交歷史
commits.find=查找
@@ -444,6 +499,11 @@ issues.create=創建問題
issues.new_label=創建標籤
issues.new_label_placeholder=標籤名稱...
issues.create_label=創建標籤
issues.label_templates.title=載入一組預定義的標籤
issues.label_templates.info=沒有任何標籤。你可以點選上面創建一個或按下面"新建標籤"按鈕來使用一組預定義。
issues.label_templates.helper=選擇一個標籤集
issues.label_templates.use=使用此標籤集
issues.label_templates.fail_to_load_file=載入標籤範本檔案 '%s' 失敗: %v
issues.open_tab=%d 個開啓中
issues.close_tab=%d 個已關閉
issues.filter_label=標籤篩選
@@ -471,8 +531,8 @@ issues.next=下一頁
issues.open_title=開啟中
issues.closed_title=已關閉
issues.num_comments=%d 條評論
issues.commented_at=`commented <a href="#%s">%s</a>`
issues.delete_comment_confirm=Are you sure you want to delete this comment?
issues.commented_at=` 評論 <a href="#%s"> %s'</a>`
issues.delete_comment_confirm=您確定要刪除該條評論嗎?
issues.no_content=尚未有任何內容
issues.close_issue=關閉
issues.close_comment_issue=關閉及評論
@@ -485,8 +545,7 @@ issues.commit_ref_at=`在代碼提交 <a id="%[1]s" href="#%[1]s">%[2]s</a> 中
issues.poster=發佈者
issues.collaborator=協同者
issues.owner=所有者
issues.sign_up_for_free=免費註冊
issues.sign_in_require_desc=及加入到對話當中。如果您已經註冊,可以直接 <a href="%s">登錄及評論</a>
issues.sign_in_require_desc=<a href="%s"> 登入</a> 才能加入這對話。
issues.edit=編輯
issues.cancel=取消
issues.save=保存
@@ -501,6 +560,8 @@ issues.label_deletion=刪除標籤
issues.label_deletion_desc=刪除該標籤將會移除所有問題中相關的訊息。是否繼續?
issues.label_deletion_success=標籤刪除成功!
issues.num_participants=%d 參與者
issues.attachment.open_tab=`在新的標籤頁中查看 '%s'`
issues.attachment.download=`點擊下載 '%s'`
pulls.new=創建合併請求
pulls.compare_changes=對比文件變化
@@ -527,6 +588,8 @@ pulls.cannot_auto_merge_desc=由於存在衝突,不能自動合併這推送請
pulls.cannot_auto_merge_helper=請手動合併來解決衝突。
pulls.merge_pull_request=合併請求
pulls.open_unmerged_pull_exists=`由於已經存在來自相同倉庫和合併信息的未合併請求(#%d您無法執行重新開啟操作。`
pulls.delete_branch=刪除分支
pulls.delete_branch_has_new_commits=該分支在合併完成後又推送了新的提交,無法執行刪除。
milestones.new=新的里程碑
milestones.open_tab=%d 開啟中
@@ -577,28 +640,55 @@ settings.collaboration.admin=管理權限
settings.collaboration.write=可寫權限
settings.collaboration.read=可讀權限
settings.collaboration.undefined=未定義
settings.branches=分支列表
settings.default_branch=預設分支
settings.default_branch_desc=預設分支是程式碼 commit、pull requests 及線上編輯的基準分支。
settings.update=更新
settings.update_default_branch_success=這個 repository 的預設分支更新成功!
settings.protected_branches=保護分支
settings.protected_branches_desc=保護分支不被強制 Push、意外刪除以及限制 Commit 者白名單
settings.choose_a_branch=選擇一個分支
settings.branch_protection=分支保護
settings.branch_protection_desc=請選擇分支 <b>%s</b> 的保護選項。
settings.protect_this_branch=保護這個分支
settings.protect_this_branch_desc=停用強制Push及分支刪除。
settings.protect_require_pull_request=請使用 pull request 來更新(合併)程式碼。
settings.protect_require_pull_request_desc=啟用這個選項之後,程式碼將無法直接 Push 到這個分支,所有 Commit 必須先 Push 到另一個非保護的分支,再透過 Pull Request 來要求合併。
settings.protect_whitelist_committers=限制誰可以 Push 到這個分支
settings.protect_whitelist_committers_desc=新增用戶或團隊到可以直接push到這個分支的白名單。
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.update_protect_branch_success=此分支設置保護已更新成功!
settings.hooks=管理 Web 鉤子
settings.githooks=管理 Git 鉤子
settings.basic_settings=基本設置
settings.mirror_settings=鏡像設定
settings.sync_mirror=立即同步
settings.mirror_sync_in_progress=鏡像同步正在進行中,請大約一分鐘後刷新頁面。
settings.site=官方網站
settings.update_settings=更新倉庫設置
settings.change_reponame_prompt=該操作將會影響到所有與該倉庫有關的鏈接
settings.advanced_settings=高級設置
settings.wiki_desc=Enable wiki system
settings.use_internal_wiki=Use builtin wiki
settings.wiki_desc=啓用 Wiki 系統
settings.use_internal_wiki=使用內建 wiki
settings.use_external_wiki=使用外部 wiki
settings.external_wiki_url=外部 Wiki 連結
settings.external_wiki_url_desc=當分頁上按一下,訪客將會重新導到 URL。
settings.issues_desc=Enable issue tracker
settings.use_internal_issue_tracker=Use builtin lightweight issue tracker
settings.issues_desc=啟用問題追蹤
settings.use_internal_issue_tracker=使用內建輕量級問題追蹤
settings.use_external_issue_tracker=使用外部的問題管理系統
settings.external_tracker_url=外部Issue Tracker網址
settings.external_tracker_url_desc=當訪客在分頁上按一下,他們將會重新導向到 URL。
settings.tracker_url_format=外部問題管理系統的 URL 格式
settings.tracker_issue_style=外部公單管理系統命名風格:
settings.tracker_issue_style.numeric=Numeric
settings.tracker_issue_style.alphanumeric=Alphanumeric
settings.tracker_issue_style.numeric=數字
settings.tracker_issue_style.alphanumeric=字母及數字
settings.tracker_url_format_desc=您可以使用 <code>{user} {repo} {index}</code> 分別作為用戶名、倉庫名和問題索引的占位符。
settings.pulls_desc=啟用合併請求以接受社區貢獻
settings.danger_zone=危險操作區
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.new_owner_has_same_repo=新的倉庫擁有者已經存在同名倉庫!
settings.convert=轉換為正規倉庫
settings.convert_desc=您可以將此鏡像轉成正規倉庫。此動做不可逆。
@@ -633,7 +723,6 @@ settings.collaborator_deletion_desc=刪除後此使用者將不再有協同者
settings.remove_collaborator_success=被操作的協作者已經被收回權限!
settings.search_user_placeholder=搜索用戶...
settings.org_not_allowed_to_be_collaborator=組織不允許被加為協同者。
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
settings.add_webhook=添加 Web 鉤子
settings.hooks_desc=Web 鉤子允許您設定在 Gogs 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
settings.webhook_deletion=刪除 Web 鉤子
@@ -656,6 +745,7 @@ settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事
settings.payload_url=推送地址
settings.content_type=數據格式
settings.secret=密鑰文本
settings.secret_desc=Secret will be sent as SHA256 HMAC hex digest of payload via <code>X-Gogs-Signature</code> header.
settings.slack_username=服務名稱
settings.slack_icon_url=圖標 URL
settings.slack_color=顏色代碼
@@ -665,6 +755,8 @@ settings.event_send_everything=推送 <strong>所有</strong> 事件
settings.event_choose=讓我選擇我的需要
settings.event_create=創建
settings.event_create_desc=創建分支或標籤
settings.event_pull_request=合併請求
settings.event_pull_request_desc=請求打開,關閉,重新打開,編輯,分配,未分配,標籤更新,標籤清除,或同步。
settings.event_push=推送
settings.event_push_desc=Git 倉庫推送
settings.active=是否激活
@@ -676,10 +768,12 @@ settings.delete_webhook=刪除 Web 鉤子
settings.recent_deliveries=最近推送記錄
settings.hook_type=鉤子類型
settings.add_slack_hook_desc=為您的倉庫增加 <a href="%s">Slack</a> 集成。
settings.add_discord_hook_desc=Hook <a href="%s">Discord</a> 到你的 repository。
settings.slack_token=令牌
settings.slack_domain=域名
settings.slack_channel=頻道
settings.deploy_keys=管理部署密鑰
settings.deploy_keys_helper=<b>噢不!</b> 如果要新增個人的公開金要,請到 <a href="%s%s">用戶設定</a> 新增。
settings.add_deploy_key=添加部署密鑰
settings.deploy_key_desc=部署密鑰僅具有隻讀權限,它在功能上和個人用戶的公開密鑰有本質區別。
settings.no_deploy_keys=您還沒有添加任何部署密鑰。
@@ -702,7 +796,7 @@ diff.show_unified_view=統一視圖
diff.stats_desc=共有 <strong> %d 個文件被更改</strong>,包括 <strong>%d 次插入</strong> 和 <strong>%d 次删除</strong>
diff.bin=二進制
diff.view_file=查看文件
diff.file_suppressed=File diff suppressed because it is too large
diff.file_suppressed=文件差異過大導致無法顯示
diff.too_many_files=部分文件因文件數量過多而無法顯示
release.releases=版本發佈
@@ -734,7 +828,7 @@ release.deletion=刪除版本發布操作
release.deletion_desc=刪除該版本發布將會移除相應的 Git 標籤。是否繼續?
release.deletion_success=版本發布刪除成功!
release.tag_name_already_exist=已經存在使用相同標籤的發佈版本。
release.tag_name_invalid=Tag name is not valid.
release.tag_name_invalid=標記名稱不是有效的。
release.downloads=下載附件
[org]
@@ -758,6 +852,7 @@ team_permission_desc=請選擇該團隊所具有的權限等級:
form.name_reserved=組織名稱 '%s' 是被保留的。
form.name_pattern_not_allowed=組織名稱不允許 '%s' 的格式。
form.team_name_reserved=團隊名稱 '%s' 已被保留。
settings=組織設置
settings.options=基本設置
@@ -832,7 +927,7 @@ total=總計:%d
dashboard.statistic=應用統計數據
dashboard.operations=管理員操作
dashboard.system_status=系統監視狀態
dashboard.statistic_info=Gogs 數據庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關註,<b>%d</b> 個贊,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關註,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
dashboard.statistic_info=Gogs 資料庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關註,<b>%d</b> 個贊,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關註,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
dashboard.operation_name=操作名稱
dashboard.operation_switch=開關
dashboard.operation_run=執行
@@ -848,8 +943,8 @@ dashboard.git_gc_repos=對倉庫進行垃圾回收
dashboard.git_gc_repos_success=所有倉庫的垃圾回收已成功完成!
dashboard.resync_all_sshkeys=重新生成 '.ssh/authorized_keys' 文件(警告:不是 Gogs 的密鑰也會被刪除)
dashboard.resync_all_sshkeys_success=所有公鑰重新生成成功!
dashboard.resync_all_update_hooks=重新生成所有倉庫的 Update 鈎子(用於被修改的自定義配置文件)
dashboard.resync_all_update_hooks_success=已成功重新生成所有倉庫的 Update 鈎子!
dashboard.resync_all_hooks=重新同步所有 repository 的 pre-receive、update、post-receive hooks。
dashboard.resync_all_hooks_success=所有 repository 的 pre-receive、update、post-receive hooks 皆已重新同步成功。
dashboard.reinit_missing_repos=重新初始化所有遺失 Git 檔案的儲存庫記錄
dashboard.reinit_missing_repos_success=所有遺失 Git 檔案的儲存庫已成功重新初始化。
@@ -902,7 +997,7 @@ users.edit_account=編輯用戶信息
users.max_repo_creation=最大儲存庫新增限制
users.max_repo_creation_desc=(設定 -1 使用全域預設限制)
users.is_activated=該用戶已被激活
users.prohibit_login=This account is prohibited to login
users.prohibit_login=此帳戶禁止登錄
users.is_admin=該用戶具有管理員權限
users.allow_git_hook=該帳戶具有創建 Git 鉤子的權限
users.allow_import_local=該用戶具有導入本地倉庫的權限
@@ -971,6 +1066,7 @@ auths.delete_auth_title=刪除認證操作
auths.delete_auth_desc=該認證將被刪除。是否繼續?
auths.still_in_used=一些使用者仍然使用此驗證方式,請先刪除或轉換這些使用者到其它登入類型。
auths.deletion_success=認證源刪除成功!
auths.login_source_exist=登錄源 '%s' 已存在。
config.server_config=服務器配置
config.app_name=應用名稱
@@ -981,10 +1077,9 @@ config.offline_mode=離線模式
config.disable_router_log=關閉路由日志
config.run_user=執行用戶
config.run_mode=執行模式
config.repo_root_path=倉庫根目錄
config.git_version=Git 版本
config.static_file_root_path=靜態文件根目錄
config.log_file_root_path=日志文件根目錄
config.script_type=腳本類型
config.reverse_auth_user=反向代理認證
config.ssh_config=SSH 配置
@@ -999,7 +1094,17 @@ config.ssh_keygen_path=金鑰產生 (' ssh-keygen ') 路徑
config.ssh_minimum_key_size_check=金鑰最小大小檢查
config.ssh_minimum_key_sizes=金鑰最小大小
config.db_config=數據庫配置
config.repo_config=Repository 設定
config.repo_root_path=倉庫根目錄
config.script_type=腳本類型
config.repo_force_private=強制設為私有
config.max_creation_limit=最大建立限制
config.preferred_licenses=推薦授權
config.disable_http_git=停用 HTTP Git
config.enable_local_path_migration=啟用本地路徑遷移
config.commits_fetch_concurrency=同時Fetch Commit數量
config.db_config=資料庫設定
config.db_type=數據庫類型
config.db_host=主機地址
config.db_name=數據庫名稱
@@ -1056,19 +1161,19 @@ config.cookie_life_time=Cookie 生命周期
config.picture_config=圖片配置
config.picture_service=圖片服務
config.disable_gravatar=禁用 Gravatar 頭像
config.enable_federated_avatar=Enable Federated Avatars
config.enable_federated_avatar=開啟聯合頭像
config.git_config=Git Configuration
config.git_disable_diff_highlight=Disable Diff Syntax Highlight
config.git_max_diff_lines=Max Diff Lines (for a single file)
config.git_max_diff_line_characters=Max Diff Characters (for a single line)
config.git_max_diff_files=Max Diff Files (to be shown)
config.git_gc_args=GC Arguments
config.git_migrate_timeout=Migration Timeout
config.git_mirror_timeout=Mirror Update Timeout
config.git_clone_timeout=Clone Operation Timeout
config.git_pull_timeout=Pull Operation Timeout
config.git_gc_timeout=GC Operation Timeout
config.git_config=Git 配置
config.git_disable_diff_highlight=禁用比較語法高亮
config.git_max_diff_lines=Max Diff 線 (對於單個檔)
config.git_max_diff_line_characters=最大比較的字元 (單行)
config.git_max_diff_files=Max Diff 檔 (顯示)
config.git_gc_args=GC 參數
config.git_migrate_timeout=移動超時
config.git_mirror_timeout=鏡像更新超時
config.git_clone_timeout=複製操作超時
config.git_pull_timeout=操作超時
config.git_gc_timeout=GC 操作超時
config.log_config=日誌配置
config.log_mode=日誌模式

View File

@@ -1,12 +1,12 @@
# Docker for Gogs
Visit [Docker Hub](https://hub.docker.com/r/gogs/) see all available images and tags.
Visit [Docker Hub](https://hub.docker.com/r/gogs/) / [Docker Store](https://store.docker.com/community/images/gogs/gogs) see all available images and tags.
## Usage
To keep your data out of Docker container, we do a volume (`/var/gogs` -> `/data`) here, and you can change it based on your situation.
```
```sh
# Pull image from Docker Hub.
$ docker pull gogs/gogs
@@ -36,11 +36,11 @@ Directory `/var/gogs` keeps Git repositories and Gogs data:
|-- data
|-- log
### Volume with data container
### Volume With Data Container
If you're more comfortable with mounting data to a data container, the commands you execute at the first time will look like as follows:
```
```sh
# Create data container
docker run --name=gogs-data --entrypoint /bin/true gogs/gogs
@@ -48,9 +48,9 @@ docker run --name=gogs-data --entrypoint /bin/true gogs/gogs
docker run --name=gogs --volumes-from gogs-data -p 10022:22 -p 10080:3000 gogs/gogs
```
#### Using Docker 1.9 Volume command
#### Using Docker 1.9 Volume Command
```
```sh
# Create docker volume.
$ docker volume create --name gogs-data
@@ -67,13 +67,13 @@ Most of settings are obvious and easy to understand, but there are some settings
- **Repository Root Path**: keep it as default value `/home/git/gogs-repositories` because `start.sh` already made a symbolic link for you.
- **Run User**: keep it as default value `git` because `start.sh` already setup a user with name `git`.
- **Domain**: fill in with Docker container IP (e.g. `192.168.99.100`). But if you want to access your Gogs instance from a different physical machine, please fill in with the hostname or IP address of the Docker host machine.
- **SSH Port**: Use the exposed port from Docker container. For example, your SSH server listens on `22` inside Docker, but you expose it by `10022:22`, then use `10022` for this value. **Builtin SSH server is not recommended inside Docker Container**
- **HTTP Port**: Use port you want Gogs to listen on inside Docker container. For example, your Gogs listens on `3000` inside Docker, and you expose it by `10080:3000`, but you still use `3000` for this value.
- **SSH Port**: Use the exposed port from Docker container. For example, your SSH server listens on `22` inside Docker, **but** you expose it by `10022:22`, then use `10022` for this value. **Builtin SSH server is not recommended inside Docker Container**
- **HTTP Port**: Use port you want Gogs to listen on inside Docker container. For example, your Gogs listens on `3000` inside Docker, **and** you expose it by `10080:3000`, but you still use `3000` for this value.
- **Application URL**: Use combination of **Domain** and **exposed HTTP Port** values (e.g. `http://192.168.99.100:10080/`).
Full documentation of application settings can be found [here](https://gogs.io/docs/advanced/configuration_cheat_sheet.html).
### Container options
### Container Options
This container have some options available via environment variables, these options are opt-in features that can help the administration of this container:
@@ -109,3 +109,7 @@ Steps to upgrade Gogs with Docker:
## Known Issues
- The docker container can not currently be build on Raspberry 1 (armv6l) as our base image `alpine` does not have a `go` package available for this platform.
## Useful Links
- [Share port 22 between Gogs inside Docker & the local system](http://www.ateijelo.com/blog/2016/07/09/share-port-22-between-docker-gogs-ssh-and-local-system)

32
docker/build-go.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
# Build GO version as specified in Dockerfile
set -x
set -e
# Components versions
export GOLANG_VERSION="1.8"
export GOLANG_SRC_URL="https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"
export GOLANG_SRC_SHA256="406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596"
# Install build tools
apk add --no-cache --no-progress --virtual build-deps-go gcc musl-dev openssl go
export GOROOT_BOOTSTRAP="$(go env GOROOT)"
# Download Go
wget -q "$GOLANG_SRC_URL" -O golang.tar.gz
echo "$GOLANG_SRC_SHA256 golang.tar.gz" | sha256sum -c -
tar -C /usr/local -xzf golang.tar.gz
rm golang.tar.gz
# Build
cd /usr/local/go/src
# see https://golang.org/issue/14851
patch -p2 -i /app/gogs/build/docker/no-pic.patch
./make.bash
# Clean
rm /app/gogs/build/docker/*.patch
apk del build-deps-go

View File

@@ -4,29 +4,23 @@ set -e
# Set temp environment vars
export GOPATH=/tmp/go
export PATH=${PATH}:${GOPATH}/bin
export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin
export GO15VENDOREXPERIMENT=1
# Install build deps
apk --no-cache --no-progress add --virtual build-deps build-base linux-pam-dev go
# Install glide
git clone -b 0.10.2 https://github.com/Masterminds/glide ${GOPATH}/src/github.com/Masterminds/glide
cd ${GOPATH}/src/github.com/Masterminds/glide
make build
go install
apk --no-cache --no-progress add --virtual build-deps build-base linux-pam-dev
# Build Gogs
mkdir -p ${GOPATH}/src/github.com/gogits/
ln -s /app/gogs/ ${GOPATH}/src/github.com/gogits/gogs
ln -s /app/gogs/build ${GOPATH}/src/github.com/gogits/gogs
cd ${GOPATH}/src/github.com/gogits/gogs
glide install
# Needed since git 2.9.3 or 2.9.4
git config --global http.https://gopkg.in.followRedirects true
go get -v -tags "sqlite cert pam" ./...
make build TAGS="sqlite cert pam"
# Cleanup GOPATH & vendoring dir
rm -r $GOPATH /app/gogs/vendor
# Cleanup GOPATH
rm -r $GOPATH
# Remove build deps
apk --no-progress del build-deps

22
docker/finalize.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
# Finalize the build
set -x
set -e
# Move to final place
mv /app/gogs/build/gogs /app/gogs/
mv /app/gogs/build/templates /app/gogs/
mv /app/gogs/build/public /app/gogs/
mv /app/gogs/build/docker /app/gogs/
# Final cleaning
rm -rf /app/gogs/build
rm /app/gogs/docker/build.sh
rm /app/gogs/docker/build-go.sh
rm /app/gogs/docker/finalize.sh
rm /app/gogs/docker/nsswitch.conf
rm /app/gogs/docker/README.md
rm -rf /tmp/go
rm -rf /usr/local/go

16
docker/no-pic.patch Normal file
View File

@@ -0,0 +1,16 @@
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index 14f4fa9..5599307 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1272,6 +1272,11 @@ func hostlink() {
argv = append(argv, peimporteddlls()...)
}
+ // The Go linker does not currently support building PIE
+ // executables when using the external linker. See:
+ // https://github.com/golang/go/issues/6940
+ argv = append(argv, "-fno-PIC")
+
if l.Debugvlog != 0 {
l.Logf("%5.2f host link:", obj.Cputime())
for _, v := range argv {

150
glide.lock generated
View File

@@ -1,150 +0,0 @@
hash: 1d5fcf2a90f7621ecbc0b1abed548e11d13bda3fea49b4326c829a523268e5cf
updated: 2016-06-12T17:35:14.27036884+08:00
imports:
- name: github.com/bradfitz/gomemcache
version: fb1f79c6b65acda83063cbc69f6bba1522558bfc
subpackages:
- memcache
- name: github.com/codegangsta/cli
version: 1efa31f08b9333f1bd4882d61f9d668a70cd902e
- name: github.com/go-macaron/binding
version: 9440f336b443056c90d7d448a0a55ad8c7599880
- name: github.com/go-macaron/cache
version: 56173531277692bc2925924d51fda1cd0a6b8178
subpackages:
- memcache
- redis
- name: github.com/go-macaron/captcha
version: 8aa5919789ab301e865595eb4b1114d6b9847deb
- name: github.com/go-macaron/csrf
version: 6a9a7df172cc1fcd81e4585f44b09200b6087cc0
- name: github.com/go-macaron/gzip
version: cad1c6580a07c56f5f6bc52d66002a05985c5854
- name: github.com/go-macaron/i18n
version: ef57533c3b0fc2d8581deda14937e52f11a203ab
- name: github.com/go-macaron/inject
version: c5ab7bf3a307593cd44cb272d1a5beea473dd072
- name: github.com/go-macaron/session
version: 66031fcb37a0fff002a1f028eb0b3a815c78306b
subpackages:
- redis
- name: github.com/go-macaron/toolbox
version: 82b511550b0aefc36b3a28062ad3a52e812bee38
- name: github.com/go-sql-driver/mysql
version: 0b58b37b664c21f3010e836f1b931e1d0b0b0685
- name: github.com/go-xorm/core
version: 5bf745d7d163f4380e6c2bba8c4afa60534dd087
- name: github.com/go-xorm/xorm
version: c6c705684057842d9854e8299dd51abb06ae29f5
- name: github.com/gogits/chardet
version: 2404f777256163ea3eadb273dada5dcb037993c0
- name: github.com/gogits/cron
version: 7f3990acf1833faa5ebd0e86f0a4c72a4b5eba3c
- name: github.com/gogits/git-module
version: 18dd87dc5eac9ee7076133c8363803f2192d5713
- name: github.com/gogits/go-gogs-client
version: d1020b4da5474f7533f5b11084dcfd5536cf2e71
- name: github.com/issue9/identicon
version: d36b54562f4cf70c83653e13dc95c220c79ef521
- name: github.com/jaytaylor/html2text
version: 52d9b785554a1918cb09909b89a1509a98b853fd
- name: github.com/kardianos/minwinsvc
version: cad6b2b879b0970e4245a20ebf1a81a756e2bb70
- name: github.com/klauspost/compress
version: 14eb9c4951195779ecfbec34431a976de7335b0a
subpackages:
- gzip
- flate
- name: github.com/klauspost/cpuid
version: 09cded8978dc9e80714c4d85b0322337b0a1e5e0
- name: github.com/klauspost/crc32
version: 19b0b332c9e4516a6370a0456e6182c3b5036720
- name: github.com/lib/pq
version: 80f8150043c80fb52dee6bc863a709cdac7ec8f8
subpackages:
- oid
- name: github.com/mattn/go-sqlite3
version: e118d4451349065b8e7ce0f0af32e033995363f8
- name: github.com/mcuadros/go-version
version: d52711f8d6bea8dc01efafdb68ad95a4e2606630
- name: github.com/microcosm-cc/bluemonday
version: 9dc199233bf72cc1aad9b61f73daf2f0075b9ee4
- name: github.com/msteinert/pam
version: 02ccfbfaf0cc627aa3aec8ef7ed5cfeec5b43f63
- name: github.com/nfnt/resize
version: 891127d8d1b52734debe1b3c3d7e747502b6c366
- name: github.com/russross/blackfriday
version: 93622da34e54fb6529bfb7c57e710f37a8d9cbd8
- name: github.com/satori/go.uuid
version: 0aa62d5ddceb50dbcb909d790b5345affd3669b6
- name: github.com/sergi/go-diff
version: ec7fdbb58eb3e300c8595ad5ac74a5aa50019cc7
subpackages:
- diffmatchpatch
- name: github.com/strk/go-libravatar
version: 5eed7bff870ae19ef51c5773dbc8f3e9fcbd0982
- name: github.com/shurcooL/sanitized_anchor_name
version: 10ef21a441db47d8b13ebcc5fd2310f636973c77
- name: github.com/Unknwon/cae
version: 7f5e046bc8a6c3cde743c233b96ee4fd84ee6ecd
subpackages:
- zip
- name: github.com/Unknwon/com
version: 28b053d5a2923b87ce8c5a08f3af779894a72758
- name: github.com/Unknwon/i18n
version: 39d6f2727e0698b1021ceb6a77c1801aa92e7d5d
- name: github.com/Unknwon/paginater
version: 7748a72e01415173a27d79866b984328e7b0c12b
- name: golang.org/x/crypto
version: bc89c496413265e715159bdc8478ee9a92fdc265
subpackages:
- ssh
- curve25519
- ed25519
- ed25519/internal/edwards25519
- name: golang.org/x/net
version: 57bfaa875b96fb91b4766077f34470528d4b03e9
subpackages:
- html
- html/charset
- html/atom
- name: golang.org/x/sys
version: a646d33e2ee3172a661fc09bca23bb4889a41bc8
subpackages:
- windows/svc
- windows
- name: golang.org/x/text
version: 2910a502d2bf9e43193af9d68ca516529614eed3
subpackages:
- transform
- language
- encoding
- encoding/charmap
- encoding/htmlindex
- internal/tag
- encoding/internal/identifier
- encoding/internal
- encoding/japanese
- encoding/korean
- encoding/simplifiedchinese
- encoding/traditionalchinese
- encoding/unicode
- internal/utf8internal
- runes
- name: gopkg.in/alexcesaro/quotedprintable.v3
version: 2caba252f4dc53eaf6b553000885530023f54623
- name: gopkg.in/asn1-ber.v1
version: 4e86f4367175e39f69d9358a5f17b4dda270378d
- name: gopkg.in/bufio.v1
version: 567b2bfa514e796916c4747494d6ff5132a1dfce
- name: gopkg.in/gomail.v2
version: 81ebce5c23dfd25c6c67194b37d3dd3f338c98b1
- name: gopkg.in/ini.v1
version: cf53f9204df4fbdd7ec4164b57fa6184ba168292
- name: gopkg.in/ldap.v2
version: d0a5ced67b4dc310b9158d63a2c6f9c5ec13f105
- name: gopkg.in/macaron.v1
version: 7564489a79f3f96b7ac8034652b35eeebb468eb4
- name: gopkg.in/redis.v2
version: e6179049628164864e6e84e973cfb56335748dea
devImports: []

View File

@@ -1,58 +0,0 @@
package: github.com/gogits/gogs
import:
- package: github.com/Unknwon/cae
subpackages:
- zip
- package: github.com/Unknwon/com
- package: github.com/Unknwon/i18n
- package: github.com/Unknwon/paginater
- package: github.com/codegangsta/cli
- package: github.com/go-macaron/binding
- package: github.com/go-macaron/cache
subpackages:
- memcache
- redis
- package: github.com/go-macaron/captcha
- package: github.com/go-macaron/csrf
- package: github.com/go-macaron/gzip
- package: github.com/go-macaron/i18n
- package: github.com/go-macaron/session
subpackages:
- redis
- package: github.com/go-macaron/toolbox
- package: github.com/go-sql-driver/mysql
- package: github.com/go-xorm/core
- package: github.com/go-xorm/xorm
- package: github.com/gogits/chardet
- package: github.com/gogits/cron
- package: github.com/gogits/git-module
- package: github.com/gogits/go-gogs-client
- package: github.com/issue9/identicon
- package: github.com/kardianos/minwinsvc
- package: github.com/lib/pq
- package: github.com/mattn/go-sqlite3
- package: github.com/mcuadros/go-version
- package: github.com/microcosm-cc/bluemonday
- package: github.com/msteinert/pam
- package: github.com/nfnt/resize
- package: github.com/russross/blackfriday
- package: github.com/satori/go.uuid
- package: github.com/sergi/go-diff
subpackages:
- diffmatchpatch
- package: github.com/strk/go-libravatar
- package: golang.org/x/crypto
subpackages:
- ssh
- package: golang.org/x/net
subpackages:
- html
- html/charset
- package: golang.org/x/text
subpackages:
- transform
- language
- package: gopkg.in/gomail.v2
- package: gopkg.in/ini.v1
- package: gopkg.in/ldap.v2
- package: gopkg.in/macaron.v1

18
gogs.go
View File

@@ -1,40 +1,40 @@
// +build go1.4
// +build go1.5
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Gogs (Go Git Service) is a painless self-hosted Git Service.
// Gogs is a painless self-hosted Git Service.
package main
import (
"os"
"runtime"
"github.com/codegangsta/cli"
"github.com/urfave/cli"
"github.com/gogits/gogs/cmd"
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.9.71.0809"
const APP_VER = "0.10.0.0227"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
setting.AppVer = APP_VER
}
func main() {
app := cli.NewApp()
app.Name = "Gogs"
app.Usage = "Go Git Service"
app.Usage = "A painless self-hosted Git service"
app.Version = APP_VER
app.Commands = []cli.Command{
cmd.CmdWeb,
cmd.CmdServ,
cmd.CmdUpdate,
cmd.Serv,
cmd.CmdHook,
cmd.CmdDump,
cmd.CmdCert,
cmd.CmdAdmin,
cmd.CmdImport,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
app.Run(os.Args)

View File

@@ -7,7 +7,7 @@ package models
import (
"fmt"
"github.com/gogits/gogs/modules/log"
log "gopkg.in/clog.v1"
)
type AccessMode int
@@ -57,41 +57,45 @@ type Access struct {
Mode AccessMode
}
func accessLevel(e Engine, u *User, repo *Repository) (AccessMode, error) {
func accessLevel(e Engine, userID int64, repo *Repository) (AccessMode, error) {
mode := ACCESS_MODE_NONE
// Everyone has read access to public repository
if !repo.IsPrivate {
mode = ACCESS_MODE_READ
}
if u == nil {
if userID <= 0 {
return mode, nil
}
if u.ID == repo.OwnerID {
if userID == repo.OwnerID {
return ACCESS_MODE_OWNER, nil
}
a := &Access{UserID: u.ID, RepoID: repo.ID}
if has, err := e.Get(a); !has || err != nil {
access := &Access{
UserID: userID,
RepoID: repo.ID,
}
if has, err := e.Get(access); !has || err != nil {
return mode, err
}
return a.Mode, nil
return access.Mode, nil
}
// AccessLevel returns the Access a user has to a repository. Will return NoneAccess if the
// user does not have access. User can be nil!
func AccessLevel(u *User, repo *Repository) (AccessMode, error) {
return accessLevel(x, u, repo)
// user does not have access.
func AccessLevel(userID int64, repo *Repository) (AccessMode, error) {
return accessLevel(x, userID, repo)
}
func hasAccess(e Engine, u *User, repo *Repository, testMode AccessMode) (bool, error) {
mode, err := accessLevel(e, u, repo)
return testMode <= mode, err
func hasAccess(e Engine, userID int64, repo *Repository, testMode AccessMode) (bool, error) {
mode, err := accessLevel(e, userID, repo)
return mode >= testMode, err
}
// HasAccess returns true if someone has the request access level. User can be nil!
func HasAccess(u *User, repo *Repository, testMode AccessMode) (bool, error) {
return hasAccess(x, u, repo, testMode)
func HasAccess(userID int64, repo *Repository, testMode AccessMode) (bool, error) {
return hasAccess(x, userID, repo, testMode)
}
// GetRepositoryAccesses finds all repositories with their access mode where a user has access but does not own.
@@ -146,16 +150,8 @@ func maxAccessMode(modes ...AccessMode) AccessMode {
// FIXME: do corss-comparison so reduce deletions and additions to the minimum?
func (repo *Repository) refreshAccesses(e Engine, accessMap map[int64]AccessMode) (err error) {
minMode := ACCESS_MODE_READ
if !repo.IsPrivate {
minMode = ACCESS_MODE_WRITE
}
newAccesses := make([]Access, 0, len(accessMap))
for userID, mode := range accessMap {
if mode < minMode {
continue
}
newAccesses = append(newAccesses, Access{
UserID: userID,
RepoID: repo.ID,
@@ -233,7 +229,7 @@ func (repo *Repository) recalculateAccesses(e Engine) error {
return repo.recalculateTeamAccesses(e, 0)
}
accessMap := make(map[int64]AccessMode, 20)
accessMap := make(map[int64]AccessMode, 10)
if err := repo.refreshCollaboratorAccesses(e, accessMap); err != nil {
return fmt.Errorf("refreshCollaboratorAccesses: %v", err)
}

View File

@@ -6,7 +6,6 @@ package models
import (
"encoding/json"
"errors"
"fmt"
"path"
"regexp"
@@ -16,12 +15,12 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
)
@@ -45,10 +44,6 @@ const (
ACTION_REOPEN_PULL_REQUEST // 15
)
var (
ErrNotImplemented = errors.New("Not implemented yet")
)
var (
// Same as Github. See https://help.github.com/articles/closing-issues-via-commit-messages
IssueCloseKeywords = []string{"close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"}
@@ -68,7 +63,7 @@ func init() {
IssueReferenceKeywordsPat = regexp.MustCompile(`(?i)(?:)(^| )\S+`)
}
// Action represents user operation type and other information to repository.,
// Action represents user operation type and other information to repository,
// it implemented interface base.Actioner so that can be used in template render.
type Action struct {
ID int64 `xorm:"pk autoincr"`
@@ -76,7 +71,6 @@ type Action struct {
OpType ActionType
ActUserID int64 // Action user id.
ActUserName string // Action user name.
ActEmail string
ActAvatar string `xorm:"-"`
RepoID int64
RepoUserName string
@@ -111,10 +105,6 @@ func (a *Action) ShortActUserName() string {
return base.EllipsisString(a.ActUserName, 20)
}
func (a *Action) GetActEmail() string {
return a.ActEmail
}
func (a *Action) GetRepoUserName() string {
return a.RepoUserName
}
@@ -169,7 +159,7 @@ func (a *Action) GetIssueTitle() string {
log.Error(4, "GetIssueByIndex: %v", err)
return "500 when get issue"
}
return issue.Name
return issue.Title
}
func (a *Action) GetIssueContent() string {
@@ -186,7 +176,6 @@ func newRepoAction(e Engine, u *User, repo *Repository) (err error) {
if err = notifyWatchers(e, &Action{
ActUserID: u.ID,
ActUserName: u.Name,
ActEmail: u.Email,
OpType: ACTION_CREATE_REPO,
RepoID: repo.ID,
RepoUserName: repo.Owner.Name,
@@ -209,7 +198,6 @@ func renameRepoAction(e Engine, actUser *User, oldRepoName string, repo *Reposit
if err = notifyWatchers(e, &Action{
ActUserID: actUser.ID,
ActUserName: actUser.Name,
ActEmail: actUser.Email,
OpType: ACTION_RENAME_REPO,
RepoID: repo.ID,
RepoUserName: repo.Owner.Name,
@@ -246,7 +234,7 @@ type PushCommit struct {
type PushCommits struct {
Len int
Commits []*PushCommit
CompareUrl string
CompareURL string
avatars map[string]string
}
@@ -275,12 +263,12 @@ func (pc *PushCommits) ToApiPayloadCommits(repoLink string) []*api.PayloadCommit
ID: commit.Sha1,
Message: commit.Message,
URL: fmt.Sprintf("%s/commit/%s", repoLink, commit.Sha1),
Author: &api.PayloadAuthor{
Author: &api.PayloadUser{
Name: commit.AuthorName,
Email: commit.AuthorEmail,
UserName: authorUsername,
},
Committer: &api.PayloadCommitter{
Committer: &api.PayloadUser{
Name: commit.CommitterName,
Email: commit.CommitterEmail,
UserName: committerUsername,
@@ -310,8 +298,8 @@ func (push *PushCommits) AvatarLink(email string) string {
return push.avatars[email]
}
// updateIssuesCommit checks if issues are manipulated by commit message.
func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string, commits []*PushCommit) error {
// UpdateIssuesCommit checks if issues are manipulated by commit message.
func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) error {
// Commits are appended in the reverse order.
for i := len(commits) - 1; i >= 0; i-- {
c := commits[i]
@@ -327,7 +315,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
// Add repo name if missing
if ref[0] == '#' {
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
ref = fmt.Sprintf("%s%s", repo.FullName(), ref)
} else if !strings.Contains(ref, "/") {
// FIXME: We don't support User#ID syntax yet
// return ErrNotImplemented
@@ -347,9 +335,13 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
}
refMarked[issue.ID] = true
url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppSubUrl, repoUserName, repoName, c.Sha1)
message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message)
if err = CreateRefComment(u, repo, issue, message, c.Sha1); err != nil {
msgLines := strings.Split(c.Message, "\n")
shortMsg := msgLines[0]
if len(msgLines) > 2 {
shortMsg += "..."
}
message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, shortMsg)
if err = CreateRefComment(doer, repo, issue, message, c.Sha1); err != nil {
return err
}
}
@@ -366,7 +358,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
// Add repo name if missing
if ref[0] == '#' {
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
ref = fmt.Sprintf("%s%s", repo.FullName(), ref)
} else if !strings.Contains(ref, "/") {
// We don't support User#ID syntax yet
// return ErrNotImplemented
@@ -390,7 +382,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
continue
}
if err = issue.ChangeStatus(u, repo, true); err != nil {
if err = issue.ChangeStatus(doer, repo, true); err != nil {
return err
}
}
@@ -406,7 +398,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
// Add repo name if missing
if ref[0] == '#' {
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
ref = fmt.Sprintf("%s%s", repo.FullName(), ref)
} else if !strings.Contains(ref, "/") {
// We don't support User#ID syntax yet
// return ErrNotImplemented
@@ -430,7 +422,7 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
continue
}
if err = issue.ChangeStatus(u, repo, false); err != nil {
if err = issue.ChangeStatus(doer, repo, false); err != nil {
return err
}
}
@@ -438,26 +430,26 @@ func updateIssuesCommit(u *User, repo *Repository, repoUserName, repoName string
return nil
}
// CommitRepoAction adds new action for committing repository.
func CommitRepoAction(
userID, repoUserID int64,
userName, actEmail string,
repoID int64,
repoUserName, repoName string,
refFullName string,
commit *PushCommits,
oldCommitID string, newCommitID string) error {
type CommitRepoActionOptions struct {
PusherName string
RepoOwnerID int64
RepoName string
RefFullName string
OldCommitID string
NewCommitID string
Commits *PushCommits
}
u, err := GetUserByID(userID)
// CommitRepoAction adds new commit actio to the repository, and prepare corresponding webhooks.
func CommitRepoAction(opts CommitRepoActionOptions) error {
pusher, err := GetUserByName(opts.PusherName)
if err != nil {
return fmt.Errorf("GetUserByID: %v", err)
return fmt.Errorf("GetUserByName [%s]: %v", opts.PusherName, err)
}
repo, err := GetRepositoryByName(repoUserID, repoName)
repo, err := GetRepositoryByName(opts.RepoOwnerID, opts.RepoName)
if err != nil {
return fmt.Errorf("GetRepositoryByName: %v", err)
} else if err = repo.GetOwner(); err != nil {
return fmt.Errorf("GetOwner: %v", err)
return fmt.Errorf("GetRepositoryByName [owner_id: %d, name: %s]: %v", opts.RepoOwnerID, opts.RepoName, err)
}
// Change repository bare status and update last updated time.
@@ -469,41 +461,40 @@ func CommitRepoAction(
isNewBranch := false
opType := ACTION_COMMIT_REPO
// Check it's tag push or branch.
if strings.HasPrefix(refFullName, "refs/tags/") {
if strings.HasPrefix(opts.RefFullName, git.TAG_PREFIX) {
opType = ACTION_PUSH_TAG
commit = &PushCommits{}
opts.Commits = &PushCommits{}
} else {
// if not the first commit, set the compareUrl
if !strings.HasPrefix(oldCommitID, "0000000") {
commit.CompareUrl = repo.ComposeCompareURL(oldCommitID, newCommitID)
} else {
// TODO: detect branch deletion
// if not the first commit, set the compare URL.
if opts.OldCommitID == git.EMPTY_SHA {
isNewBranch = true
} else {
opts.Commits.CompareURL = repo.ComposeCompareURL(opts.OldCommitID, opts.NewCommitID)
}
if err = updateIssuesCommit(u, repo, repoUserName, repoName, commit.Commits); err != nil {
log.Error(4, "updateIssuesCommit: %v", err)
if err = UpdateIssuesCommit(pusher, repo, opts.Commits.Commits); err != nil {
log.Error(2, "UpdateIssuesCommit: %v", err)
}
}
if len(commit.Commits) > setting.UI.FeedMaxCommitNum {
commit.Commits = commit.Commits[:setting.UI.FeedMaxCommitNum]
if len(opts.Commits.Commits) > setting.UI.FeedMaxCommitNum {
opts.Commits.Commits = opts.Commits.Commits[:setting.UI.FeedMaxCommitNum]
}
bs, err := json.Marshal(commit)
data, err := json.Marshal(opts.Commits)
if err != nil {
return fmt.Errorf("Marshal: %v", err)
}
refName := git.RefEndName(refFullName)
refName := git.RefEndName(opts.RefFullName)
if err = NotifyWatchers(&Action{
ActUserID: u.ID,
ActUserName: userName,
ActEmail: actEmail,
ActUserID: pusher.ID,
ActUserName: pusher.Name,
OpType: opType,
Content: string(bs),
Content: string(data),
RepoID: repo.ID,
RepoUserName: repoUserName,
RepoUserName: repo.MustOwner().Name,
RepoName: repo.Name,
RefName: refName,
IsPrivate: repo.IsPrivate,
@@ -511,99 +502,88 @@ func CommitRepoAction(
return fmt.Errorf("NotifyWatchers: %v", err)
}
payloadRepo := repo.ComposePayload()
pusher_email, pusher_name := "", ""
pusher, err := GetUserByName(userName)
if err == nil {
pusher_email = pusher.Email
pusher_name = pusher.DisplayName()
}
payloadSender := &api.PayloadUser{
UserName: pusher.Name,
ID: pusher.ID,
AvatarUrl: pusher.AvatarLink(),
}
defer func() {
go HookQueue.Add(repo.ID)
}()
apiPusher := pusher.APIFormat()
apiRepo := repo.APIFormat(nil)
switch opType {
case ACTION_COMMIT_REPO: // Push
p := &api.PushPayload{
Ref: refFullName,
Before: oldCommitID,
After: newCommitID,
CompareUrl: setting.AppUrl + commit.CompareUrl,
Commits: commit.ToApiPayloadCommits(repo.FullLink()),
Repo: payloadRepo,
Pusher: &api.PayloadAuthor{
Name: pusher_name,
Email: pusher_email,
UserName: userName,
},
Sender: payloadSender,
}
if err = PrepareWebhooks(repo, HOOK_EVENT_PUSH, p); err != nil {
return fmt.Errorf("PrepareWebhooks: %v", err)
}
compareURL := setting.AppUrl + opts.Commits.CompareURL
if isNewBranch {
return PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
compareURL = ""
if err = PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
Ref: refName,
RefType: "branch",
Repo: payloadRepo,
Sender: payloadSender,
})
Repo: apiRepo,
Sender: apiPusher,
}); err != nil {
return fmt.Errorf("PrepareWebhooks (new branch): %v", err)
}
}
if err = PrepareWebhooks(repo, HOOK_EVENT_PUSH, &api.PushPayload{
Ref: opts.RefFullName,
Before: opts.OldCommitID,
After: opts.NewCommitID,
CompareURL: compareURL,
Commits: opts.Commits.ToApiPayloadCommits(repo.HTMLURL()),
Repo: apiRepo,
Pusher: apiPusher,
Sender: apiPusher,
}); err != nil {
return fmt.Errorf("PrepareWebhooks (new commit): %v", err)
}
case ACTION_PUSH_TAG: // Create
return PrepareWebhooks(repo, HOOK_EVENT_CREATE, &api.CreatePayload{
Ref: refName,
RefType: "tag",
Repo: payloadRepo,
Sender: payloadSender,
Repo: apiRepo,
Sender: apiPusher,
})
}
return nil
}
func transferRepoAction(e Engine, actUser, oldOwner, newOwner *User, repo *Repository) (err error) {
func transferRepoAction(e Engine, doer, oldOwner *User, repo *Repository) (err error) {
if err = notifyWatchers(e, &Action{
ActUserID: actUser.ID,
ActUserName: actUser.Name,
ActEmail: actUser.Email,
ActUserID: doer.ID,
ActUserName: doer.Name,
OpType: ACTION_TRANSFER_REPO,
RepoID: repo.ID,
RepoUserName: newOwner.Name,
RepoUserName: repo.Owner.Name,
RepoName: repo.Name,
IsPrivate: repo.IsPrivate,
Content: path.Join(oldOwner.Name, repo.Name),
}); err != nil {
return fmt.Errorf("notify watchers '%d/%d': %v", actUser.ID, repo.ID, err)
return fmt.Errorf("notifyWatchers: %v", err)
}
// Remove watch for organization.
if repo.Owner.IsOrganization() {
if err = watchRepo(e, repo.Owner.ID, repo.ID, false); err != nil {
return fmt.Errorf("watch repository: %v", err)
if oldOwner.IsOrganization() {
if err = watchRepo(e, oldOwner.ID, repo.ID, false); err != nil {
return fmt.Errorf("watchRepo [false]: %v", err)
}
}
log.Trace("action.transferRepoAction: %s/%s", actUser.Name, repo.Name)
return nil
}
// TransferRepoAction adds new action for transferring repository.
func TransferRepoAction(actUser, oldOwner, newOwner *User, repo *Repository) error {
return transferRepoAction(x, actUser, oldOwner, newOwner, repo)
// TransferRepoAction adds new action for transferring repository,
// the Owner field of repository is assumed to be new owner.
func TransferRepoAction(doer, oldOwner *User, repo *Repository) error {
return transferRepoAction(x, doer, oldOwner, repo)
}
func mergePullRequestAction(e Engine, actUser *User, repo *Repository, pull *Issue) error {
func mergePullRequestAction(e Engine, doer *User, repo *Repository, issue *Issue) error {
return notifyWatchers(e, &Action{
ActUserID: actUser.ID,
ActUserName: actUser.Name,
ActEmail: actUser.Email,
ActUserID: doer.ID,
ActUserName: doer.Name,
OpType: ACTION_MERGE_PULL_REQUEST,
Content: fmt.Sprintf("%d|%s", pull.Index, pull.Name),
Content: fmt.Sprintf("%d|%s", issue.Index, issue.Title),
RepoID: repo.ID,
RepoUserName: repo.Owner.Name,
RepoName: repo.Name,

View File

@@ -13,9 +13,9 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
)
@@ -74,10 +74,11 @@ func CreateRepositoryNotice(desc string) error {
// creates a system notice when error occurs.
func RemoveAllWithNotice(title, path string) {
var err error
// workaround for Go not being able to remove read-only files/folders: https://github.com/golang/go/issues/9606
// LEGACY [Go 1.7]: workaround for Go not being able to remove read-only files/folders: https://github.com/golang/go/issues/9606
// this bug should be fixed on Go 1.7, so the workaround should be removed when Gogs don't support Go 1.6 anymore:
// https://github.com/golang/go/commit/2ffb3e5d905b5622204d199128dec06cefd57790
if setting.IsWindows {
// Note: Windows complains when delete target does not exist, therefore we can skip deletion in such cases.
if setting.IsWindows && com.IsExist(path) {
// converting "/" to "\" in path on Windows
path = strings.Replace(path, "/", "\\", -1)
err = exec.Command("cmd", "/C", "rmdir", "/S", "/Q", path).Run()

175
models/attachment.go Normal file
View File

@@ -0,0 +1,175 @@
// Copyright 2017 The Gogs 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 models
import (
"fmt"
"io"
"mime/multipart"
"os"
"path"
"time"
"github.com/go-xorm/xorm"
gouuid "github.com/satori/go.uuid"
"github.com/gogits/gogs/modules/setting"
)
// Attachment represent a attachment of issue/comment/release.
type Attachment struct {
ID int64 `xorm:"pk autoincr"`
UUID string `xorm:"uuid UNIQUE"`
IssueID int64 `xorm:"INDEX"`
CommentID int64
ReleaseID int64 `xorm:"INDEX"`
Name string
Created time.Time `xorm:"-"`
CreatedUnix int64
}
func (a *Attachment) BeforeInsert() {
a.CreatedUnix = time.Now().Unix()
}
func (a *Attachment) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "created_unix":
a.Created = time.Unix(a.CreatedUnix, 0).Local()
}
}
// AttachmentLocalPath returns where attachment is stored in local file system based on given UUID.
func AttachmentLocalPath(uuid string) string {
return path.Join(setting.AttachmentPath, uuid[0:1], uuid[1:2], uuid)
}
// LocalPath returns where attachment is stored in local file system.
func (attach *Attachment) LocalPath() string {
return AttachmentLocalPath(attach.UUID)
}
// NewAttachment creates a new attachment object.
func NewAttachment(name string, buf []byte, file multipart.File) (_ *Attachment, err error) {
attach := &Attachment{
UUID: gouuid.NewV4().String(),
Name: name,
}
localPath := attach.LocalPath()
if err = os.MkdirAll(path.Dir(localPath), os.ModePerm); err != nil {
return nil, fmt.Errorf("MkdirAll: %v", err)
}
fw, err := os.Create(localPath)
if err != nil {
return nil, fmt.Errorf("Create: %v", err)
}
defer fw.Close()
if _, err = fw.Write(buf); err != nil {
return nil, fmt.Errorf("Write: %v", err)
} else if _, err = io.Copy(fw, file); err != nil {
return nil, fmt.Errorf("Copy: %v", err)
}
if _, err := x.Insert(attach); err != nil {
return nil, err
}
return attach, nil
}
func getAttachmentByUUID(e Engine, uuid string) (*Attachment, error) {
attach := &Attachment{UUID: uuid}
has, err := x.Get(attach)
if err != nil {
return nil, err
} else if !has {
return nil, ErrAttachmentNotExist{0, uuid}
}
return attach, nil
}
func getAttachmentsByUUIDs(e Engine, uuids []string) ([]*Attachment, error) {
if len(uuids) == 0 {
return []*Attachment{}, nil
}
// Silently drop invalid uuids.
attachments := make([]*Attachment, 0, len(uuids))
return attachments, e.In("uuid", uuids).Find(&attachments)
}
// GetAttachmentByUUID returns attachment by given UUID.
func GetAttachmentByUUID(uuid string) (*Attachment, error) {
return getAttachmentByUUID(x, uuid)
}
func getAttachmentsByIssueID(e Engine, issueID int64) ([]*Attachment, error) {
attachments := make([]*Attachment, 0, 10)
return attachments, e.Where("issue_id = ? AND comment_id = 0", issueID).Find(&attachments)
}
// GetAttachmentsByIssueID returns all attachments of an issue.
func GetAttachmentsByIssueID(issueID int64) ([]*Attachment, error) {
return getAttachmentsByIssueID(x, issueID)
}
func getAttachmentsByCommentID(e Engine, commentID int64) ([]*Attachment, error) {
attachments := make([]*Attachment, 0, 10)
return attachments, e.Where("comment_id=?", commentID).Find(&attachments)
}
// GetAttachmentsByCommentID returns all attachments if comment by given ID.
func GetAttachmentsByCommentID(commentID int64) ([]*Attachment, error) {
return getAttachmentsByCommentID(x, commentID)
}
// DeleteAttachment deletes the given attachment and optionally the associated file.
func DeleteAttachment(a *Attachment, remove bool) error {
_, err := DeleteAttachments([]*Attachment{a}, remove)
return err
}
// DeleteAttachments deletes the given attachments and optionally the associated files.
func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) {
for i, a := range attachments {
if remove {
if err := os.Remove(a.LocalPath()); err != nil {
return i, err
}
}
if _, err := x.Delete(a); err != nil {
return i, err
}
}
return len(attachments), nil
}
// DeleteAttachmentsByIssue deletes all attachments associated with the given issue.
func DeleteAttachmentsByIssue(issueId int64, remove bool) (int, error) {
attachments, err := GetAttachmentsByIssueID(issueId)
if err != nil {
return 0, err
}
return DeleteAttachments(attachments, remove)
}
// DeleteAttachmentsByComment deletes all attachments associated with the given comment.
func DeleteAttachmentsByComment(commentId int64, remove bool) (int, error) {
attachments, err := GetAttachmentsByCommentID(commentId)
if err != nil {
return 0, err
}
return DeleteAttachments(attachments, remove)
}

View File

@@ -11,8 +11,10 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/markdown"
)
@@ -49,8 +51,9 @@ type Comment struct {
ID int64 `xorm:"pk autoincr"`
Type CommentType
PosterID int64
Poster *User `xorm:"-"`
IssueID int64 `xorm:"INDEX"`
Poster *User `xorm:"-"`
IssueID int64 `xorm:"INDEX"`
Issue *Issue `xorm:"-"`
CommitID int64
Line int64
Content string `xorm:"TEXT"`
@@ -58,6 +61,8 @@ type Comment struct {
Created time.Time `xorm:"-"`
CreatedUnix int64
Updated time.Time `xorm:"-"`
UpdatedUnix int64
// Reference issue in commit message
CommitSHA string `xorm:"VARCHAR(40)"`
@@ -70,30 +75,54 @@ type Comment struct {
func (c *Comment) BeforeInsert() {
c.CreatedUnix = time.Now().Unix()
c.UpdatedUnix = c.CreatedUnix
}
func (c *Comment) BeforeUpdate() {
c.UpdatedUnix = time.Now().Unix()
}
func (c *Comment) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {
case "id":
c.Attachments, err = GetAttachmentsByCommentID(c.ID)
if err != nil {
log.Error(3, "GetAttachmentsByCommentID[%d]: %v", c.ID, err)
}
case "created_unix":
c.Created = time.Unix(c.CreatedUnix, 0).Local()
case "updated_unix":
c.Updated = time.Unix(c.UpdatedUnix, 0).Local()
}
}
case "poster_id":
func (c *Comment) loadAttributes(e Engine) (err error) {
if c.Poster == nil {
c.Poster, err = GetUserByID(c.PosterID)
if err != nil {
if IsErrUserNotExist(err) {
c.PosterID = -1
c.Poster = NewFakeUser()
c.Poster = NewGhostUser()
} else {
log.Error(3, "GetUserByID[%d]: %v", c.ID, err)
return fmt.Errorf("getUserByID.(Poster) [%d]: %v", c.PosterID, err)
}
}
case "created_unix":
c.Created = time.Unix(c.CreatedUnix, 0).Local()
}
if c.Issue == nil {
c.Issue, err = getRawIssueByID(e, c.IssueID)
if err != nil {
return fmt.Errorf("getIssueByID [%d]: %v", c.IssueID, err)
}
}
if c.Attachments == nil {
c.Attachments, err = getAttachmentsByCommentID(e, c.ID)
if err != nil {
return fmt.Errorf("getAttachmentsByCommentID [%d]: %v", c.ID, err)
}
}
return nil
}
func (c *Comment) LoadAttributes() error {
return c.loadAttributes(x)
}
func (c *Comment) AfterDelete() {
@@ -104,6 +133,23 @@ func (c *Comment) AfterDelete() {
}
}
func (c *Comment) HTMLURL() string {
return fmt.Sprintf("%s#issuecomment-%d", c.Issue.HTMLURL(), c.ID)
}
// This method assumes following fields have been assigned with valid values:
// Required - Poster, Issue
func (c *Comment) APIFormat() *api.Comment {
return &api.Comment{
ID: c.ID,
HTMLURL: c.HTMLURL(),
Poster: c.Poster.APIFormat(),
Body: c.Content,
Created: c.Created,
Updated: c.Updated,
}
}
// HashTag returns unique hash tag for comment.
func (c *Comment) HashTag() string {
return "issuecomment-" + com.ToStr(c.ID)
@@ -114,11 +160,11 @@ func (c *Comment) EventTag() string {
return "event-" + com.ToStr(c.ID)
}
// MailParticipants sends new comment emails to repository watchers
// mailParticipants sends new comment emails to repository watchers
// and mentioned people.
func (cmt *Comment) MailParticipants(opType ActionType, issue *Issue) (err error) {
func (cmt *Comment) mailParticipants(e Engine, opType ActionType, issue *Issue) (err error) {
mentions := markdown.FindAllMentions(cmt.Content)
if err = UpdateIssueMentions(cmt.IssueID, mentions); err != nil {
if err = updateIssueMentions(e, cmt.IssueID, mentions); err != nil {
return fmt.Errorf("UpdateIssueMentions [%d]: %v", cmt.IssueID, err)
}
@@ -157,7 +203,6 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
act := &Action{
ActUserID: opts.Doer.ID,
ActUserName: opts.Doer.Name,
ActEmail: opts.Doer.Email,
Content: fmt.Sprintf("%d|%s", opts.Issue.Index, strings.Split(opts.Content, "\n")[0]),
RepoID: opts.Repo.ID,
RepoUserName: opts.Repo.Owner.Name,
@@ -233,10 +278,12 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
if err = notifyWatchers(e, act); err != nil {
log.Error(4, "notifyWatchers: %v", err)
}
comment.MailParticipants(act.OpType, opts.Issue)
if err = comment.mailParticipants(e, act.OpType, opts.Issue); err != nil {
log.Error(4, "MailParticipants: %v", err)
}
}
return comment, nil
return comment, comment.loadAttributes(e)
}
func createStatusComment(e *xorm.Session, doer *User, repo *Repository, issue *Issue) (*Comment, error) {
@@ -329,15 +376,64 @@ func GetCommentByID(id int64) (*Comment, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrCommentNotExist{id}
return nil, ErrCommentNotExist{id, 0}
}
return c, nil
return c, c.LoadAttributes()
}
// GetCommentsByIssueID returns all comments of issue by given ID.
func GetCommentsByIssueID(issueID int64) ([]*Comment, error) {
// FIXME: use CommentList to improve performance.
func loadCommentsAttributes(e Engine, comments []*Comment) (err error) {
for i := range comments {
if err = comments[i].loadAttributes(e); err != nil {
return fmt.Errorf("loadAttributes [%d]: %v", comments[i].ID, err)
}
}
return nil
}
func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
return comments, x.Where("issue_id=?", issueID).Asc("created_unix").Find(&comments)
sess := e.Where("issue_id = ?", issueID).Asc("created_unix")
if since > 0 {
sess.And("updated_unix >= ?", since)
}
if err := sess.Find(&comments); err != nil {
return nil, err
}
return comments, loadCommentsAttributes(e, comments)
}
func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
comments := make([]*Comment, 0, 10)
sess := e.Where("issue.repo_id = ?", repoID).Join("INNER", "issue", "issue.id = comment.issue_id", repoID).Asc("created_unix")
if since > 0 {
sess.And("updated_unix >= ?", since)
}
if err := sess.Find(&comments); err != nil {
return nil, err
}
return comments, loadCommentsAttributes(e, comments)
}
func getCommentsByIssueID(e Engine, issueID int64) ([]*Comment, error) {
return getCommentsByIssueIDSince(e, issueID, -1)
}
// GetCommentsByIssueID returns all comments of an issue.
func GetCommentsByIssueID(issueID int64) ([]*Comment, error) {
return getCommentsByIssueID(x, issueID)
}
// GetCommentsByIssueIDSince returns a list of comments of an issue since a given time point.
func GetCommentsByIssueIDSince(issueID, since int64) ([]*Comment, error) {
return getCommentsByIssueIDSince(x, issueID, since)
}
// GetCommentsByRepoIDSince returns a list of comments for all issues in a repo since a given time point.
func GetCommentsByRepoIDSince(repoID, since int64) ([]*Comment, error) {
return getCommentsByRepoIDSince(x, repoID, since)
}
// UpdateComment updates information of comment.
@@ -346,10 +442,13 @@ func UpdateComment(c *Comment) error {
return err
}
// DeleteCommentByID deletes a comment by given ID.
// DeleteCommentByID deletes the comment by given ID.
func DeleteCommentByID(id int64) error {
comment, err := GetCommentByID(id)
if err != nil {
if IsErrCommentNotExist(err) {
return nil
}
return err
}

View File

@@ -417,6 +417,19 @@ func (err ErrInvalidTagName) Error() string {
return fmt.Sprintf("release tag name is not valid [tag_name: %s]", err.TagName)
}
type ErrRepoFileAlreadyExist struct {
FileName string
}
func IsErrRepoFileAlreadyExist(err error) bool {
_, ok := err.(ErrRepoFileAlreadyExist)
return ok
}
func (err ErrRepoFileAlreadyExist) Error() string {
return fmt.Sprintf("repository file already exists [file_name: %s]", err.FileName)
}
// __________ .__
// \______ \____________ ____ ____ | |__
// | | _/\_ __ \__ \ / \_/ ___\| | \
@@ -513,7 +526,8 @@ func (err ErrPullRequestNotExist) Error() string {
// \/ \/ \/ \/ \/
type ErrCommentNotExist struct {
ID int64
ID int64
IssueID int64
}
func IsErrCommentNotExist(err error) bool {
@@ -522,7 +536,7 @@ func IsErrCommentNotExist(err error) bool {
}
func (err ErrCommentNotExist) Error() string {
return fmt.Sprintf("comment does not exist [id: %d]", err.ID)
return fmt.Sprintf("comment does not exist [id: %d, issue_id: %d]", err.ID, err.IssueID)
}
// .____ ___. .__
@@ -588,24 +602,50 @@ func (err ErrAttachmentNotExist) Error() string {
return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
}
// _____ __ .__ __ .__ __ .__
// / _ \ __ ___/ |_| |__ ____ _____/ |_|__| ____ _____ _/ |_|__| ____ ____
// / /_\ \| | \ __\ | \_/ __ \ / \ __\ |/ ___\\__ \\ __\ |/ _ \ / \
// / | \ | /| | | Y \ ___/| | \ | | \ \___ / __ \| | | ( <_> ) | \
// \____|__ /____/ |__| |___| /\___ >___| /__| |__|\___ >____ /__| |__|\____/|___| /
// \/ \/ \/ \/ \/ \/ \/
// .____ .__ _________
// | | ____ ____ |__| ____ / _____/ ____ __ _________ ____ ____
// | | / _ \ / ___\| |/ \ \_____ \ / _ \| | \_ __ \_/ ___\/ __ \
// | |__( <_> ) /_/ > | | \ / ( <_> ) | /| | \/\ \__\ ___/
// |_______ \____/\___ /|__|___| / /_______ /\____/|____/ |__| \___ >___ >
// \/ /_____/ \/ \/ \/ \/
type ErrAuthenticationNotExist struct {
type ErrLoginSourceNotExist struct {
ID int64
}
func IsErrAuthenticationNotExist(err error) bool {
_, ok := err.(ErrAuthenticationNotExist)
func IsErrLoginSourceNotExist(err error) bool {
_, ok := err.(ErrLoginSourceNotExist)
return ok
}
func (err ErrAuthenticationNotExist) Error() string {
return fmt.Sprintf("authentication does not exist [id: %d]", err.ID)
func (err ErrLoginSourceNotExist) Error() string {
return fmt.Sprintf("login source does not exist [id: %d]", err.ID)
}
type ErrLoginSourceAlreadyExist struct {
Name string
}
func IsErrLoginSourceAlreadyExist(err error) bool {
_, ok := err.(ErrLoginSourceAlreadyExist)
return ok
}
func (err ErrLoginSourceAlreadyExist) Error() string {
return fmt.Sprintf("login source already exists [name: %s]", err.Name)
}
type ErrLoginSourceInUse struct {
ID int64
}
func IsErrLoginSourceInUse(err error) bool {
_, ok := err.(ErrLoginSourceInUse)
return ok
}
func (err ErrLoginSourceInUse) Error() string {
return fmt.Sprintf("login source is still used by some users [id: %d]", err.ID)
}
// ___________
@@ -628,3 +668,25 @@ func IsErrTeamAlreadyExist(err error) bool {
func (err ErrTeamAlreadyExist) Error() string {
return fmt.Sprintf("team already exists [org_id: %d, name: %s]", err.OrgID, err.Name)
}
// ____ ___ .__ .___
// | | \______ | | _________ __| _/
// | | /\____ \| | / _ \__ \ / __ |
// | | / | |_> > |_( <_> ) __ \_/ /_/ |
// |______/ | __/|____/\____(____ /\____ |
// |__| \/ \/
//
type ErrUploadNotExist struct {
ID int64
UUID string
}
func IsErrUploadNotExist(err error) bool {
_, ok := err.(ErrAttachmentNotExist)
return ok
}
func (err ErrUploadNotExist) Error() string {
return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
}

View File

@@ -20,11 +20,11 @@ import (
"github.com/sergi/go-diff/diffmatchpatch"
"golang.org/x/net/html/charset"
"golang.org/x/text/transform"
log "gopkg.in/clog.v1"
"github.com/gogits/git-module"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/template/highlight"
@@ -72,6 +72,15 @@ var (
func diffToHTML(diffs []diffmatchpatch.Diff, lineType DiffLineType) template.HTML {
buf := bytes.NewBuffer(nil)
// Reproduce signs which are cutted for inline diff before.
switch lineType {
case DIFF_LINE_ADD:
buf.WriteByte('+')
case DIFF_LINE_DEL:
buf.WriteByte('-')
}
for i := range diffs {
switch {
case diffs[i].Type == diffmatchpatch.DiffInsert && lineType == DIFF_LINE_ADD:
@@ -155,19 +164,19 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) tem
case DIFF_LINE_ADD:
compareDiffLine = diffSection.GetLine(DIFF_LINE_DEL, diffLine.RightIdx)
if compareDiffLine == nil {
return template.HTML(html.EscapeString(diffLine.Content[1:]))
return template.HTML(html.EscapeString(diffLine.Content))
}
diff1 = compareDiffLine.Content
diff2 = diffLine.Content
case DIFF_LINE_DEL:
compareDiffLine = diffSection.GetLine(DIFF_LINE_ADD, diffLine.LeftIdx)
if compareDiffLine == nil {
return template.HTML(html.EscapeString(diffLine.Content[1:]))
return template.HTML(html.EscapeString(diffLine.Content))
}
diff1 = diffLine.Content
diff2 = compareDiffLine.Content
default:
return template.HTML(html.EscapeString(diffLine.Content[1:]))
return template.HTML(html.EscapeString(diffLine.Content))
}
diffRecord := diffMatchPatch.DiffMain(diff1[1:], diff2[1:], true)
@@ -179,7 +188,7 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) tem
type DiffFile struct {
Name string
OldName string
Index int
Index string // 40-byte SHA, Changed/New: new SHA; Deleted: old SHA
Addition, Deletion int
Type DiffFileType
IsCreated bool
@@ -322,7 +331,6 @@ func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*
curFile = &DiffFile{
Name: a,
Index: len(diff.Files) + 1,
Type: DIFF_FILE_CHANGE,
Sections: make([]*DiffSection, 0, 10),
}
@@ -334,7 +342,8 @@ func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*
}
curFileLinesCount = 0
// Check file diff type and is submodule.
// Check file diff type and submodule.
CHECK_TYPE:
for {
line, err := input.ReadString('\n')
if err != nil {
@@ -349,22 +358,27 @@ func ParsePatch(maxLines, maxLineCharacteres, maxFiles int, reader io.Reader) (*
case strings.HasPrefix(line, "new file"):
curFile.Type = DIFF_FILE_ADD
curFile.IsCreated = true
curFile.IsSubmodule = strings.HasSuffix(line, " 160000\n")
case strings.HasPrefix(line, "deleted"):
curFile.Type = DIFF_FILE_DEL
curFile.IsDeleted = true
curFile.IsSubmodule = strings.HasSuffix(line, " 160000\n")
case strings.HasPrefix(line, "index"):
curFile.Type = DIFF_FILE_CHANGE
if curFile.IsDeleted {
curFile.Index = line[6:46]
} else if len(line) >= 88 {
curFile.Index = line[49:88]
} else {
curFile.Index = curFile.Name
}
break CHECK_TYPE
case strings.HasPrefix(line, "similarity index 100%"):
curFile.Type = DIFF_FILE_RENAME
curFile.IsRenamed = true
curFile.OldName = curFile.Name
curFile.Name = b
}
if curFile.Type > 0 {
if strings.HasSuffix(line, " 160000\n") {
curFile.IsSubmodule = true
}
break
curFile.Index = b
break CHECK_TYPE
}
}
}
@@ -414,13 +428,13 @@ func GetDiffRange(repoPath, beforeCommitID, afterCommitID string, maxLines, maxL
if len(beforeCommitID) == 0 {
// First commit of repository.
if commit.ParentCount() == 0 {
cmd = exec.Command("git", "show", afterCommitID)
cmd = exec.Command("git", "show", "--full-index", afterCommitID)
} else {
c, _ := commit.Parent(0)
cmd = exec.Command("git", "diff", "-M", c.ID.String(), afterCommitID)
cmd = exec.Command("git", "diff", "--full-index", "-M", c.ID.String(), afterCommitID)
}
} else {
cmd = exec.Command("git", "diff", "-M", beforeCommitID, afterCommitID)
cmd = exec.Command("git", "diff", "--full-index", "-M", beforeCommitID, afterCommitID)
}
cmd.Dir = repoPath
cmd.Stderr = os.Stderr
@@ -434,7 +448,7 @@ func GetDiffRange(repoPath, beforeCommitID, afterCommitID string, maxLines, maxL
return nil, fmt.Errorf("Start: %v", err)
}
pid := process.Add(fmt.Sprintf("GetDiffRange (%s)", repoPath), cmd)
pid := process.Add(fmt.Sprintf("GetDiffRange [repo_path: %s]", repoPath), cmd)
defer process.Remove(pid)
diff, err := ParsePatch(maxLines, maxLineCharacteres, maxFiles, stdout)

View File

@@ -19,14 +19,14 @@ func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) {
}
func TestDiffToHTML(t *testing.T) {
assertEqual(t, "foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
assertEqual(t, "+foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffInsert, "bar"},
dmp.Diff{dmp.DiffDelete, " baz"},
dmp.Diff{dmp.DiffEqual, " biz"},
}, DIFF_LINE_ADD))
assertEqual(t, "foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffDelete, "bar"},
dmp.Diff{dmp.DiffInsert, " baz"},

File diff suppressed because it is too large Load Diff

View File

@@ -7,14 +7,51 @@ package models
import (
"fmt"
"html/template"
"regexp"
"strconv"
"strings"
"github.com/go-xorm/xorm"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/base"
)
var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
// GetLabelTemplateFile loads the label template file by given name,
// then parses and returns a list of name-color pairs.
func GetLabelTemplateFile(name string) ([][2]string, error) {
data, err := getRepoInitFile("label", name)
if err != nil {
return nil, fmt.Errorf("getRepoInitFile: %v", err)
}
lines := strings.Split(string(data), "\n")
list := make([][2]string, 0, len(lines))
for i := 0; i < len(lines); i++ {
line := strings.TrimSpace(lines[i])
if len(line) == 0 {
continue
}
fields := strings.SplitN(line, " ", 2)
if len(fields) != 2 {
return nil, fmt.Errorf("line is malformed: %s", line)
}
if !labelColorPattern.MatchString(fields[0]) {
return nil, fmt.Errorf("bad HTML color code in line: %s", line)
}
fields[1] = strings.TrimSpace(fields[1])
list = append(list, [2]string{fields[1], fields[0]})
}
return list, nil
}
// Label represents a label of repository for issues.
type Label struct {
ID int64 `xorm:"pk autoincr"`
@@ -27,9 +64,17 @@ type Label struct {
IsChecked bool `xorm:"-"`
}
func (label *Label) APIFormat() *api.Label {
return &api.Label{
ID: label.ID,
Name: label.Name,
Color: label.Color,
}
}
// CalOpenIssues calculates the open issues of label.
func (m *Label) CalOpenIssues() {
m.NumOpenIssues = m.NumIssues - m.NumClosedIssues
func (label *Label) CalOpenIssues() {
label.NumOpenIssues = label.NumIssues - label.NumClosedIssues
}
// ForegroundColor calculates the text color for labels based
@@ -42,7 +87,7 @@ func (l *Label) ForegroundColor() template.CSS {
b := float32(0xFF & color)
luminance := (0.2126*r + 0.7152*g + 0.0722*b) / 255
if luminance < 0.5 {
if luminance < 0.66 {
return template.CSS("#fff")
}
}
@@ -52,16 +97,16 @@ func (l *Label) ForegroundColor() template.CSS {
return template.CSS("#000")
}
// NewLabel creates new label of repository.
func NewLabel(l *Label) error {
_, err := x.Insert(l)
// NewLabels creates new label(s) for a repository.
func NewLabels(labels ...*Label) error {
_, err := x.Insert(labels)
return err
}
// getLabelInRepoByID returns a label by ID in given repository.
// getLabelOfRepoByID returns a label by ID in given repository.
// If pass repoID as 0, then ORM will ignore limitation of repository
// and can return arbitrary label with any valid ID.
func getLabelInRepoByID(e Engine, repoID, labelID int64) (*Label, error) {
func getLabelOfRepoByID(e Engine, repoID, labelID int64) (*Label, error) {
if labelID <= 0 {
return nil, ErrLabelNotExist{labelID, repoID}
}
@@ -81,25 +126,25 @@ func getLabelInRepoByID(e Engine, repoID, labelID int64) (*Label, error) {
// GetLabelByID returns a label by given ID.
func GetLabelByID(id int64) (*Label, error) {
return getLabelInRepoByID(x, 0, id)
return getLabelOfRepoByID(x, 0, id)
}
// GetLabelInRepoByID returns a label by ID in given repository.
func GetLabelInRepoByID(repoID, labelID int64) (*Label, error) {
return getLabelInRepoByID(x, repoID, labelID)
// GetLabelOfRepoByID returns a label by ID in given repository.
func GetLabelOfRepoByID(repoID, labelID int64) (*Label, error) {
return getLabelOfRepoByID(x, repoID, labelID)
}
// GetLabelsInRepoByIDs returns a list of labels by IDs in given repository,
// it silently ignores label IDs that are not belong to the repository.
func GetLabelsInRepoByIDs(repoID int64, labelIDs []int64) ([]*Label, error) {
labels := make([]*Label, 0, len(labelIDs))
return labels, x.Where("repo_id = ?", repoID).In("id", base.Int64sToStrings(labelIDs)).Find(&labels)
return labels, x.Where("repo_id = ?", repoID).In("id", base.Int64sToStrings(labelIDs)).Asc("name").Find(&labels)
}
// GetLabelsByRepoID returns all labels that belong to given repository by ID.
func GetLabelsByRepoID(repoID int64) ([]*Label, error) {
labels := make([]*Label, 0, 10)
return labels, x.Where("repo_id = ?", repoID).Find(&labels)
return labels, x.Where("repo_id = ?", repoID).Asc("name").Find(&labels)
}
func getLabelsByIssueID(e Engine, issueID int64) ([]*Label, error) {
@@ -116,7 +161,7 @@ func getLabelsByIssueID(e Engine, issueID int64) ([]*Label, error) {
}
labels := make([]*Label, 0, len(labelIDs))
return labels, e.Where("id > 0").In("id", base.Int64sToStrings(labelIDs)).Find(&labels)
return labels, e.Where("id > 0").In("id", base.Int64sToStrings(labelIDs)).Asc("name").Find(&labels)
}
// GetLabelsByIssueID returns all labels that belong to given issue by ID.
@@ -136,7 +181,7 @@ func UpdateLabel(l *Label) error {
// DeleteLabel delete a label of given repository.
func DeleteLabel(repoID, labelID int64) error {
_, err := GetLabelInRepoByID(repoID, labelID)
_, err := GetLabelOfRepoByID(repoID, labelID)
if err != nil {
if IsErrLabelNotExist(err) {
return nil

View File

@@ -8,14 +8,86 @@ import (
"fmt"
"github.com/Unknwon/com"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/mailer"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/setting"
)
func (issue *Issue) MailSubject() string {
return fmt.Sprintf("[%s] %s (#%d)", issue.Repo.Name, issue.Name, issue.Index)
return fmt.Sprintf("[%s] %s (#%d)", issue.Repo.Name, issue.Title, issue.Index)
}
// mailerUser is a wrapper for satisfying mailer.User interface.
type mailerUser struct {
user *User
}
func (this mailerUser) ID() int64 {
return this.user.ID
}
func (this mailerUser) DisplayName() string {
return this.user.DisplayName()
}
func (this mailerUser) Email() string {
return this.user.Email
}
func (this mailerUser) GenerateActivateCode() string {
return this.user.GenerateActivateCode()
}
func (this mailerUser) GenerateEmailActivateCode(email string) string {
return this.user.GenerateEmailActivateCode(email)
}
func NewMailerUser(u *User) mailer.User {
return mailerUser{u}
}
// mailerRepo is a wrapper for satisfying mailer.Repository interface.
type mailerRepo struct {
repo *Repository
}
func (this mailerRepo) FullName() string {
return this.repo.FullName()
}
func (this mailerRepo) HTMLURL() string {
return this.repo.HTMLURL()
}
func (this mailerRepo) ComposeMetas() map[string]string {
return this.repo.ComposeMetas()
}
func NewMailerRepo(repo *Repository) mailer.Repository {
return mailerRepo{repo}
}
// mailerIssue is a wrapper for satisfying mailer.Issue interface.
type mailerIssue struct {
issue *Issue
}
func (this mailerIssue) MailSubject() string {
return this.issue.MailSubject()
}
func (this mailerIssue) Content() string {
return this.issue.Content
}
func (this mailerIssue) HTMLURL() string {
return this.issue.HTMLURL()
}
func NewMailerIssue(issue *Issue) mailer.Issue {
return mailerIssue{issue}
}
// mailIssueCommentToParticipants can be used for both new issue creation and comment.
@@ -48,7 +120,7 @@ func mailIssueCommentToParticipants(issue *Issue, doer *User, mentions []string)
tos = append(tos, to.Email)
names = append(names, to.Name)
}
SendIssueCommentMail(issue, doer, tos)
mailer.SendIssueCommentMail(NewMailerIssue(issue), NewMailerRepo(issue.Repo), NewMailerUser(doer), tos)
// Mail mentioned people and exclude watchers.
names = append(names, doer.Name)
@@ -60,7 +132,7 @@ func mailIssueCommentToParticipants(issue *Issue, doer *User, mentions []string)
tos = append(tos, mentions[i])
}
SendIssueMentionMail(issue, doer, GetUserEmailsByNames(tos))
mailer.SendIssueMentionMail(NewMailerIssue(issue), NewMailerRepo(issue.Repo), NewMailerUser(doer), GetUserEmailsByNames(tos))
return nil
}
@@ -69,7 +141,7 @@ func mailIssueCommentToParticipants(issue *Issue, doer *User, mentions []string)
// and mentioned people.
func (issue *Issue) MailParticipants() (err error) {
mentions := markdown.FindAllMentions(issue.Content)
if err = UpdateIssueMentions(issue.ID, mentions); err != nil {
if err = updateIssueMentions(x, issue.ID, mentions); err != nil {
return fmt.Errorf("UpdateIssueMentions [%d]: %v", issue.ID, err)
}

View File

@@ -18,20 +18,15 @@ import (
"github.com/go-macaron/binding"
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/auth/ldap"
"github.com/gogits/gogs/modules/auth/pam"
"github.com/gogits/gogs/modules/log"
)
var (
ErrAuthenticationAlreadyExist = errors.New("Authentication already exist")
ErrAuthenticationUserUsed = errors.New("Authentication has been used by some users")
)
type LoginType int
// Note: new type must be added at the end of list to maintain compatibility.
// Note: new type must append to the end of list to maintain compatibility.
const (
LOGIN_NOTYPE LoginType = iota
LOGIN_PLAIN // 1
@@ -106,6 +101,7 @@ func (cfg *PAMConfig) ToDB() ([]byte, error) {
return json.Marshal(cfg)
}
// LoginSource represents an external way for authorizing users.
type LoginSource struct {
ID int64 `xorm:"pk autoincr"`
Type LoginType
@@ -223,15 +219,15 @@ func (source *LoginSource) SMTP() *SMTPConfig {
func (source *LoginSource) PAM() *PAMConfig {
return source.Cfg.(*PAMConfig)
}
func CreateLoginSource(source *LoginSource) error {
has, err := x.Get(&LoginSource{Name: source.Name})
if err != nil {
return err
} else if has {
return ErrLoginSourceAlreadyExist{source.Name}
}
// CountLoginSources returns number of login sources.
func CountLoginSources() int64 {
count, _ := x.Count(new(LoginSource))
return count
}
func CreateSource(source *LoginSource) error {
_, err := x.Insert(source)
_, err = x.Insert(source)
return err
}
@@ -247,7 +243,7 @@ func GetLoginSourceByID(id int64) (*LoginSource, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrAuthenticationNotExist{id}
return nil, ErrLoginSourceNotExist{id}
}
return source, nil
}
@@ -262,12 +258,18 @@ func DeleteSource(source *LoginSource) error {
if err != nil {
return err
} else if count > 0 {
return ErrAuthenticationUserUsed
return ErrLoginSourceInUse{source.ID}
}
_, err = x.Id(source.ID).Delete(new(LoginSource))
return err
}
// CountLoginSources returns number of login sources.
func CountLoginSources() int64 {
count, _ := x.Count(new(LoginSource))
return count
}
// .____ ________ _____ __________
// | | \______ \ / _ \\______ \
// | | | | \ / /_\ \| ___/
@@ -275,49 +277,6 @@ func DeleteSource(source *LoginSource) error {
// |_______ \/_______ /\____|__ /____|
// \/ \/ \/
// LoginUserLDAPSource queries if loginName/passwd can login against the LDAP directory pool,
// and create a local user if success when enabled.
// It returns the same LoginUserPlain semantic.
func LoginUserLDAPSource(u *User, loginName, passwd string, source *LoginSource, autoRegister bool) (*User, error) {
cfg := source.Cfg.(*LDAPConfig)
directBind := (source.Type == LOGIN_DLDAP)
username, fn, sn, mail, isAdmin, logged := cfg.SearchEntry(loginName, passwd, directBind)
if !logged {
// User not in LDAP, do nothing
return nil, ErrUserNotExist{0, loginName}
}
if !autoRegister {
return u, nil
}
// Fallback.
if len(username) == 0 {
username = loginName
}
// Validate username make sure it satisfies requirement.
if binding.AlphaDashDotPattern.MatchString(username) {
return nil, fmt.Errorf("Invalid pattern for attribute 'username' [%s]: must be valid alpha or numeric or dash(-_) or dot characters", username)
}
if len(mail) == 0 {
mail = fmt.Sprintf("%s@localhost", username)
}
u = &User{
LowerName: strings.ToLower(username),
Name: username,
FullName: composeFullName(fn, sn, username),
LoginType: source.Type,
LoginSource: source.ID,
LoginName: loginName,
Email: mail,
IsAdmin: isAdmin,
IsActive: true,
}
return u, CreateUser(u)
}
func composeFullName(firstname, surname, username string) string {
switch {
case len(firstname) == 0 && len(surname) == 0:
@@ -331,6 +290,46 @@ func composeFullName(firstname, surname, username string) string {
}
}
// LoginViaLDAP queries if login/password is valid against the LDAP directory pool,
// and create a local user if success when enabled.
func LoginViaLDAP(user *User, login, password string, source *LoginSource, autoRegister bool) (*User, error) {
username, fn, sn, mail, isAdmin, succeed := source.Cfg.(*LDAPConfig).SearchEntry(login, password, source.Type == LOGIN_DLDAP)
if !succeed {
// User not in LDAP, do nothing
return nil, ErrUserNotExist{0, login}
}
if !autoRegister {
return user, nil
}
// Fallback.
if len(username) == 0 {
username = login
}
// Validate username make sure it satisfies requirement.
if binding.AlphaDashDotPattern.MatchString(username) {
return nil, fmt.Errorf("Invalid pattern for attribute 'username' [%s]: must be valid alpha or numeric or dash(-_) or dot characters", username)
}
if len(mail) == 0 {
mail = fmt.Sprintf("%s@localhost", username)
}
user = &User{
LowerName: strings.ToLower(username),
Name: username,
FullName: composeFullName(fn, sn, username),
Email: mail,
LoginType: source.Type,
LoginSource: source.ID,
LoginName: login,
IsActive: true,
IsAdmin: isAdmin,
}
return user, CreateUser(user)
}
// _________ __________________________
// / _____/ / \__ ___/\______ \
// \_____ \ / \ / \| | | ___/
@@ -338,25 +337,21 @@ func composeFullName(firstname, surname, username string) string {
// /_______ /\____|__ /____| |____|
// \/ \/
type loginAuth struct {
type smtpLoginAuth struct {
username, password string
}
func LoginAuth(username, password string) smtp.Auth {
return &loginAuth{username, password}
func (auth *smtpLoginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
return "LOGIN", []byte(auth.username), nil
}
func (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
return "LOGIN", []byte(a.username), nil
}
func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {
func (auth *smtpLoginAuth) Next(fromServer []byte, more bool) ([]byte, error) {
if more {
switch string(fromServer) {
case "Username:":
return []byte(a.username), nil
return []byte(auth.username), nil
case "Password:":
return []byte(a.password), nil
return []byte(auth.password), nil
}
}
return nil, nil
@@ -402,25 +397,24 @@ func SMTPAuth(a smtp.Auth, cfg *SMTPConfig) error {
return ErrUnsupportedLoginType
}
// Query if name/passwd can login against the LDAP directory pool
// Create a local user if success
// Return the same LoginUserPlain semantic
func LoginUserSMTPSource(u *User, name, passwd string, sourceID int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
// LoginViaSMTP queries if login/password is valid against the SMTP,
// and create a local user if success when enabled.
func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
// Verify allowed domains.
if len(cfg.AllowedDomains) > 0 {
idx := strings.Index(name, "@")
idx := strings.Index(login, "@")
if idx == -1 {
return nil, ErrUserNotExist{0, name}
} else if !com.IsSliceContainsStr(strings.Split(cfg.AllowedDomains, ","), name[idx+1:]) {
return nil, ErrUserNotExist{0, name}
return nil, ErrUserNotExist{0, login}
} else if !com.IsSliceContainsStr(strings.Split(cfg.AllowedDomains, ","), login[idx+1:]) {
return nil, ErrUserNotExist{0, login}
}
}
var auth smtp.Auth
if cfg.Auth == SMTP_PLAIN {
auth = smtp.PlainAuth("", name, passwd, cfg.Host)
auth = smtp.PlainAuth("", login, password, cfg.Host)
} else if cfg.Auth == SMTP_LOGIN {
auth = LoginAuth(name, passwd)
auth = &smtpLoginAuth{login, password}
} else {
return nil, errors.New("Unsupported SMTP auth type")
}
@@ -431,33 +425,32 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceID int64, cfg *SMTP
tperr, ok := err.(*textproto.Error)
if (ok && tperr.Code == 535) ||
strings.Contains(err.Error(), "Username and Password not accepted") {
return nil, ErrUserNotExist{0, name}
return nil, ErrUserNotExist{0, login}
}
return nil, err
}
if !autoRegister {
return u, nil
return user, nil
}
var loginName = name
idx := strings.Index(name, "@")
username := login
idx := strings.Index(login, "@")
if idx > -1 {
loginName = name[:idx]
username = login[:idx]
}
// fake a local user creation
u = &User{
LowerName: strings.ToLower(loginName),
Name: strings.ToLower(loginName),
user = &User{
LowerName: strings.ToLower(username),
Name: strings.ToLower(username),
Email: login,
Passwd: password,
LoginType: LOGIN_SMTP,
LoginSource: sourceID,
LoginName: name,
LoginName: login,
IsActive: true,
Passwd: passwd,
Email: name,
}
err := CreateUser(u)
return u, err
return user, CreateUser(user)
}
// __________ _____ _____
@@ -467,101 +460,99 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceID int64, cfg *SMTP
// |____| \____|__ /\____|__ /
// \/ \/
// Query if name/passwd can login against PAM
// Create a local user if success
// Return the same LoginUserPlain semantic
func LoginUserPAMSource(u *User, name, passwd string, sourceID int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil {
// LoginViaPAM queries if login/password is valid against the PAM,
// and create a local user if success when enabled.
func LoginViaPAM(user *User, login, password string, sourceID int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, login, password); err != nil {
if strings.Contains(err.Error(), "Authentication failure") {
return nil, ErrUserNotExist{0, name}
return nil, ErrUserNotExist{0, login}
}
return nil, err
}
if !autoRegister {
return u, nil
return user, nil
}
// fake a local user creation
u = &User{
LowerName: strings.ToLower(name),
Name: name,
user = &User{
LowerName: strings.ToLower(login),
Name: login,
Email: login,
Passwd: password,
LoginType: LOGIN_PAM,
LoginSource: sourceID,
LoginName: name,
LoginName: login,
IsActive: true,
Passwd: passwd,
Email: name,
}
return u, CreateUser(u)
return user, CreateUser(user)
}
func ExternalUserLogin(u *User, name, passwd string, source *LoginSource, autoRegister bool) (*User, error) {
func ExternalUserLogin(user *User, login, password string, source *LoginSource, autoRegister bool) (*User, error) {
if !source.IsActived {
return nil, ErrLoginSourceNotActived
}
switch source.Type {
case LOGIN_LDAP, LOGIN_DLDAP:
return LoginUserLDAPSource(u, name, passwd, source, autoRegister)
return LoginViaLDAP(user, login, password, source, autoRegister)
case LOGIN_SMTP:
return LoginUserSMTPSource(u, name, passwd, source.ID, source.Cfg.(*SMTPConfig), autoRegister)
return LoginViaSMTP(user, login, password, source.ID, source.Cfg.(*SMTPConfig), autoRegister)
case LOGIN_PAM:
return LoginUserPAMSource(u, name, passwd, source.ID, source.Cfg.(*PAMConfig), autoRegister)
return LoginViaPAM(user, login, password, source.ID, source.Cfg.(*PAMConfig), autoRegister)
}
return nil, ErrUnsupportedLoginType
}
// UserSignIn validates user name and password.
func UserSignIn(uname, passwd string) (*User, error) {
var u *User
if strings.Contains(uname, "@") {
u = &User{Email: strings.ToLower(uname)}
func UserSignIn(username, password string) (*User, error) {
var user *User
if strings.Contains(username, "@") {
user = &User{Email: strings.ToLower(username)}
} else {
u = &User{LowerName: strings.ToLower(uname)}
user = &User{LowerName: strings.ToLower(username)}
}
userExists, err := x.Get(u)
hasUser, err := x.Get(user)
if err != nil {
return nil, err
}
if userExists {
switch u.LoginType {
if hasUser {
switch user.LoginType {
case LOGIN_NOTYPE, LOGIN_PLAIN:
if u.ValidatePassword(passwd) {
return u, nil
if user.ValidatePassword(password) {
return user, nil
}
return nil, ErrUserNotExist{u.ID, u.Name}
return nil, ErrUserNotExist{user.ID, user.Name}
default:
var source LoginSource
hasSource, err := x.Id(u.LoginSource).Get(&source)
hasSource, err := x.Id(user.LoginSource).Get(&source)
if err != nil {
return nil, err
} else if !hasSource {
return nil, ErrLoginSourceNotExist
return nil, ErrLoginSourceNotExist{user.LoginSource}
}
return ExternalUserLogin(u, u.LoginName, passwd, &source, false)
return ExternalUserLogin(user, user.LoginName, password, &source, false)
}
}
var sources []LoginSource
sources := make([]*LoginSource, 0, 3)
if err = x.UseBool().Find(&sources, &LoginSource{IsActived: true}); err != nil {
return nil, err
}
for _, source := range sources {
u, err := ExternalUserLogin(nil, uname, passwd, &source, true)
authUser, err := ExternalUserLogin(nil, username, password, source, true)
if err == nil {
return u, nil
return authUser, nil
}
log.Warn("Failed to login '%s' via '%s': %v", uname, source.Name, err)
log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err)
}
return nil, ErrUserNotExist{u.ID, u.Name}
return nil, ErrUserNotExist{user.ID, user.Name}
}

View File

@@ -5,27 +5,18 @@
package migrations
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"time"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
gouuid "github.com/satori/go.uuid"
"gopkg.in/ini.v1"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
)
const _MIN_DB_VER = 4
const _MIN_DB_VER = 10
type Migration interface {
Description() string
@@ -59,15 +50,16 @@ type Version struct {
// If you want to "retire" a migration, remove it from the top of the list and
// update _MIN_VER_DB accordingly
var migrations = []Migration{
NewMigration("fix locale file load panic", fixLocaleFileLoadPanic), // V4 -> V5:v0.6.0
NewMigration("trim action compare URL prefix", trimCommitActionAppUrlPrefix), // V5 -> V6:v0.6.3
NewMigration("generate issue-label from issue", issueToIssueLabel), // V6 -> V7:v0.6.4
NewMigration("refactor attachment table", attachmentRefactor), // V7 -> V8:v0.6.4
NewMigration("rename pull request fields", renamePullRequestFields), // V8 -> V9:v0.6.16
NewMigration("clean up migrate repo info", cleanUpMigrateRepoInfo), // V9 -> V10:v0.6.20
// v0 -> v4 : before 0.6.0 -> last support 0.7.33
// v4 -> v10: before 0.7.0 -> last support 0.9.141
NewMigration("generate rands and salt for organizations", generateOrgRandsAndSalt), // V10 -> V11:v0.8.5
NewMigration("convert date to unix timestamp", convertDateToUnix), // V11 -> V12:v0.9.2
NewMigration("convert LDAP UseSSL option to SecurityProtocol", ldapUseSSLToSecurityProtocol), // V12 -> V13:v0.9.37
// v13 -> v14:v0.9.87
NewMigration("set comment updated with created", setCommentUpdatedWithCreated),
// v14 -> v15:v0.9.147
NewMigration("generate and migrate Git hooks", generateAndMigrateGitHooks),
}
// Migrate database to current version
@@ -83,6 +75,7 @@ func Migrate(x *xorm.Engine) error {
} else if !has {
// If the version record does not exist we think
// it is a fresh installation and we can skip all migrations.
currentVersion.ID = 0
currentVersion.Version = int64(_MIN_DB_VER + len(migrations))
if _, err = x.InsertOne(currentVersion); err != nil {
@@ -92,8 +85,28 @@ func Migrate(x *xorm.Engine) error {
v := currentVersion.Version
if _MIN_DB_VER > v {
log.Fatal(4, `Gogs no longer supports auto-migration from your previously installed version.
Please try to upgrade to a lower version (>= v0.6.0) first, then upgrade to current version.`)
log.Fatal(0, `
Hi there, thank you for using Gogs for so long!
However, Gogs has stopped supporting auto-migration from your previously installed version.
But the good news is, it's very easy to fix this problem!
You can migrate your older database using a previous release, then you can upgrade to the newest version.
Please save following instructions to somewhere and start working:
- If you were using below 0.6.0 (e.g. 0.5.x), download last supported archive from following link:
https://github.com/gogits/gogs/releases/tag/v0.7.33
- If you were using below 0.7.0 (e.g. 0.6.x), download last supported archive from following link:
https://github.com/gogits/gogs/releases/tag/v0.9.141
Once finished downloading,
1. Extract the archive and to upgrade steps as usual.
2. Run it once. To verify, you should see some migration traces.
3. Once it starts web server successfully, stop it.
4. Now it's time to put back the release archive you originally intent to upgrade.
5. Enjoy!
In case you're stilling getting this notice, go through instructions again until it disappears.`)
return nil
}
@@ -123,311 +136,6 @@ func sessionRelease(sess *xorm.Session) {
sess.Close()
}
func fixLocaleFileLoadPanic(_ *xorm.Engine) error {
cfg, err := ini.Load(setting.CustomConf)
if err != nil {
return fmt.Errorf("load custom config: %v", err)
}
cfg.DeleteSection("i18n")
if err = cfg.SaveTo(setting.CustomConf); err != nil {
return fmt.Errorf("save custom config: %v", err)
}
setting.Langs = strings.Split(strings.Replace(strings.Join(setting.Langs, ","), "fr-CA", "fr-FR", 1), ",")
return nil
}
func trimCommitActionAppUrlPrefix(x *xorm.Engine) error {
type PushCommit struct {
Sha1 string
Message string
AuthorEmail string
AuthorName string
}
type PushCommits struct {
Len int
Commits []*PushCommit
CompareUrl string
}
type Action struct {
ID int64 `xorm:"pk autoincr"`
Content string `xorm:"TEXT"`
}
results, err := x.Query("SELECT `id`,`content` FROM `action` WHERE `op_type`=?", 5)
if err != nil {
return fmt.Errorf("select commit actions: %v", err)
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
var pushCommits *PushCommits
for _, action := range results {
actID := com.StrTo(string(action["id"])).MustInt64()
if actID == 0 {
continue
}
pushCommits = new(PushCommits)
if err = json.Unmarshal(action["content"], pushCommits); err != nil {
return fmt.Errorf("unmarshal action content[%d]: %v", actID, err)
}
infos := strings.Split(pushCommits.CompareUrl, "/")
if len(infos) <= 4 {
continue
}
pushCommits.CompareUrl = strings.Join(infos[len(infos)-4:], "/")
p, err := json.Marshal(pushCommits)
if err != nil {
return fmt.Errorf("marshal action content[%d]: %v", actID, err)
}
if _, err = sess.Id(actID).Update(&Action{
Content: string(p),
}); err != nil {
return fmt.Errorf("update action[%d]: %v", actID, err)
}
}
return sess.Commit()
}
func issueToIssueLabel(x *xorm.Engine) error {
type IssueLabel struct {
ID int64 `xorm:"pk autoincr"`
IssueID int64 `xorm:"UNIQUE(s)"`
LabelID int64 `xorm:"UNIQUE(s)"`
}
issueLabels := make([]*IssueLabel, 0, 50)
results, err := x.Query("SELECT `id`,`label_ids` FROM `issue`")
if err != nil {
if strings.Contains(err.Error(), "no such column") ||
strings.Contains(err.Error(), "Unknown column") {
return nil
}
return fmt.Errorf("select issues: %v", err)
}
for _, issue := range results {
issueID := com.StrTo(issue["id"]).MustInt64()
// Just in case legacy code can have duplicated IDs for same label.
mark := make(map[int64]bool)
for _, idStr := range strings.Split(string(issue["label_ids"]), "|") {
labelID := com.StrTo(strings.TrimPrefix(idStr, "$")).MustInt64()
if labelID == 0 || mark[labelID] {
continue
}
mark[labelID] = true
issueLabels = append(issueLabels, &IssueLabel{
IssueID: issueID,
LabelID: labelID,
})
}
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if err = sess.Sync2(new(IssueLabel)); err != nil {
return fmt.Errorf("sync2: %v", err)
} else if _, err = sess.Insert(issueLabels); err != nil {
return fmt.Errorf("insert issue-labels: %v", err)
}
return sess.Commit()
}
func attachmentRefactor(x *xorm.Engine) error {
type Attachment struct {
ID int64 `xorm:"pk autoincr"`
UUID string `xorm:"uuid INDEX"`
// For rename purpose.
Path string `xorm:"-"`
NewPath string `xorm:"-"`
}
results, err := x.Query("SELECT * FROM `attachment`")
if err != nil {
return fmt.Errorf("select attachments: %v", err)
}
attachments := make([]*Attachment, 0, len(results))
for _, attach := range results {
if !com.IsExist(string(attach["path"])) {
// If the attachment is already missing, there is no point to update it.
continue
}
attachments = append(attachments, &Attachment{
ID: com.StrTo(attach["id"]).MustInt64(),
UUID: gouuid.NewV4().String(),
Path: string(attach["path"]),
})
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if err = sess.Sync2(new(Attachment)); err != nil {
return fmt.Errorf("Sync2: %v", err)
}
// Note: Roll back for rename can be a dead loop,
// so produces a backup file.
var buf bytes.Buffer
buf.WriteString("# old path -> new path\n")
// Update database first because this is where error happens the most often.
for _, attach := range attachments {
if _, err = sess.Id(attach.ID).Update(attach); err != nil {
return err
}
attach.NewPath = path.Join(setting.AttachmentPath, attach.UUID[0:1], attach.UUID[1:2], attach.UUID)
buf.WriteString(attach.Path)
buf.WriteString("\t")
buf.WriteString(attach.NewPath)
buf.WriteString("\n")
}
// Then rename attachments.
isSucceed := true
defer func() {
if isSucceed {
return
}
dumpPath := path.Join(setting.LogRootPath, "attachment_path.dump")
ioutil.WriteFile(dumpPath, buf.Bytes(), 0666)
fmt.Println("Fail to rename some attachments, old and new paths are saved into:", dumpPath)
}()
for _, attach := range attachments {
if err = os.MkdirAll(path.Dir(attach.NewPath), os.ModePerm); err != nil {
isSucceed = false
return err
}
if err = os.Rename(attach.Path, attach.NewPath); err != nil {
isSucceed = false
return err
}
}
return sess.Commit()
}
func renamePullRequestFields(x *xorm.Engine) (err error) {
type PullRequest struct {
ID int64 `xorm:"pk autoincr"`
PullID int64 `xorm:"INDEX"`
PullIndex int64
HeadBarcnh string
IssueID int64 `xorm:"INDEX"`
Index int64
HeadBranch string
}
if err = x.Sync(new(PullRequest)); err != nil {
return fmt.Errorf("sync: %v", err)
}
results, err := x.Query("SELECT `id`,`pull_id`,`pull_index`,`head_barcnh` FROM `pull_request`")
if err != nil {
if strings.Contains(err.Error(), "no such column") {
return nil
}
return fmt.Errorf("select pull requests: %v", err)
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
var pull *PullRequest
for _, pr := range results {
pull = &PullRequest{
ID: com.StrTo(pr["id"]).MustInt64(),
IssueID: com.StrTo(pr["pull_id"]).MustInt64(),
Index: com.StrTo(pr["pull_index"]).MustInt64(),
HeadBranch: string(pr["head_barcnh"]),
}
if pull.Index == 0 {
continue
}
if _, err = sess.Id(pull.ID).Update(pull); err != nil {
return err
}
}
return sess.Commit()
}
func cleanUpMigrateRepoInfo(x *xorm.Engine) (err error) {
type (
User struct {
ID int64 `xorm:"pk autoincr"`
LowerName string
}
Repository struct {
ID int64 `xorm:"pk autoincr"`
OwnerID int64
LowerName string
}
)
repos := make([]*Repository, 0, 25)
if err = x.Where("is_mirror=?", false).Find(&repos); err != nil {
return fmt.Errorf("select all non-mirror repositories: %v", err)
}
var user *User
for _, repo := range repos {
user = &User{ID: repo.OwnerID}
has, err := x.Get(user)
if err != nil {
return fmt.Errorf("get owner of repository[%d - %d]: %v", repo.ID, repo.OwnerID, err)
} else if !has {
continue
}
configPath := filepath.Join(setting.RepoRootPath, user.LowerName, repo.LowerName+".git/config")
// In case repository file is somehow missing.
if !com.IsFile(configPath) {
continue
}
cfg, err := ini.Load(configPath)
if err != nil {
return fmt.Errorf("open config file: %v", err)
}
cfg.DeleteSection("remote \"origin\"")
if err = cfg.SaveToIndent(configPath, "\t"); err != nil {
return fmt.Errorf("save config file: %v", err)
}
}
return nil
}
func generateOrgRandsAndSalt(x *xorm.Engine) (err error) {
type User struct {
ID int64 `xorm:"pk autoincr"`
@@ -447,8 +155,12 @@ func generateOrgRandsAndSalt(x *xorm.Engine) (err error) {
}
for _, org := range orgs {
org.Rands = base.GetRandomString(10)
org.Salt = base.GetRandomString(10)
if org.Rands, err = base.GetRandomString(10); err != nil {
return err
}
if org.Salt, err = base.GetRandomString(10); err != nil {
return err
}
if _, err = sess.Id(org.ID).Update(org); err != nil {
return err
}

24
models/migrations/v14.go Normal file
View File

@@ -0,0 +1,24 @@
// Copyright 2016 The Gogs 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 migrations
import (
"fmt"
"github.com/go-xorm/xorm"
)
func setCommentUpdatedWithCreated(x *xorm.Engine) (err error) {
type Comment struct {
UpdatedUnix int64
}
if err = x.Sync2(new(Comment)); err != nil {
return fmt.Errorf("Sync2: %v", err)
} else if _, err = x.Exec("UPDATE comment SET updated_unix = created_unix"); err != nil {
return fmt.Errorf("set update_unix: %v", err)
}
return nil
}

102
models/migrations/v15.go Normal file
View File

@@ -0,0 +1,102 @@
// Copyright 2017 The Gogs 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 migrations
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/setting"
)
func generateAndMigrateGitHooks(x *xorm.Engine) (err error) {
type Repository struct {
ID int64
OwnerID int64
Name string
}
type User struct {
ID int64
Name string
}
var (
hookNames = []string{"pre-receive", "update", "post-receive"}
hookTpls = []string{
fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' pre-receive\n", setting.ScriptType, setting.AppPath, setting.CustomConf),
fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' update $1 $2 $3\n", setting.ScriptType, setting.AppPath, setting.CustomConf),
fmt.Sprintf("#!/usr/bin/env %s\n\"%s\" hook --config='%s' post-receive\n", setting.ScriptType, setting.AppPath, setting.CustomConf),
}
)
// Cleanup old update.log and http.log files.
filepath.Walk(setting.LogRootPath, func(path string, info os.FileInfo, err error) error {
if !info.IsDir() &&
(strings.HasPrefix(filepath.Base(path), "update.log") ||
strings.HasPrefix(filepath.Base(path), "http.log")) {
os.Remove(path)
}
return nil
})
return x.Where("id > 0").Iterate(new(Repository),
func(idx int, bean interface{}) error {
repo := bean.(*Repository)
if repo.Name == "." || repo.Name == ".." {
return nil
}
user := new(User)
has, err := x.Where("id = ?", repo.OwnerID).Get(user)
if err != nil {
return fmt.Errorf("query owner of repository [repo_id: %d, owner_id: %d]: %v", repo.ID, repo.OwnerID, err)
} else if !has {
return nil
}
repoBase := filepath.Join(setting.RepoRootPath, strings.ToLower(user.Name), strings.ToLower(repo.Name))
repoPath := repoBase + ".git"
wikiPath := repoBase + ".wiki.git"
log.Trace("[%04d]: %s", idx, repoPath)
hookDir := filepath.Join(repoPath, "hooks")
customHookDir := filepath.Join(repoPath, "custom_hooks")
wikiHookDir := filepath.Join(wikiPath, "hooks")
for i, hookName := range hookNames {
oldHookPath := filepath.Join(hookDir, hookName)
newHookPath := filepath.Join(customHookDir, hookName)
// Gogs didn't allow user to set custom update hook thus no migration for it.
// In case user runs this migration multiple times, and custom hook exists,
// we assume it's been migrated already.
if hookName != "update" && com.IsFile(oldHookPath) && !com.IsExist(customHookDir) {
os.MkdirAll(customHookDir, os.ModePerm)
if err = os.Rename(oldHookPath, newHookPath); err != nil {
return fmt.Errorf("move hook file to custom directory '%s' -> '%s': %v", oldHookPath, newHookPath, err)
}
}
if err = ioutil.WriteFile(oldHookPath, []byte(hookTpls[i]), os.ModePerm); err != nil {
return fmt.Errorf("write hook file '%s': %v", oldHookPath, err)
}
if com.IsDir(wikiPath) {
os.MkdirAll(wikiHookDir, os.ModePerm)
wikiHookPath := filepath.Join(wikiHookDir, hookName)
if err = ioutil.WriteFile(wikiHookPath, []byte(hookTpls[i]), os.ModePerm); err != nil {
return fmt.Errorf("write wiki hook file '%s': %v", wikiHookPath, err)
}
}
}
return nil
})
}

349
models/milestone.go Normal file
View File

@@ -0,0 +1,349 @@
// Copyright 2017 The Gogs 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 models
import (
"time"
"github.com/go-xorm/xorm"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/setting"
)
// Milestone represents a milestone of repository.
type Milestone struct {
ID int64 `xorm:"pk autoincr"`
RepoID int64 `xorm:"INDEX"`
Name string
Content string `xorm:"TEXT"`
RenderedContent string `xorm:"-"`
IsClosed bool
NumIssues int
NumClosedIssues int
NumOpenIssues int `xorm:"-"`
Completeness int // Percentage(1-100).
IsOverDue bool `xorm:"-"`
DeadlineString string `xorm:"-"`
Deadline time.Time `xorm:"-"`
DeadlineUnix int64
ClosedDate time.Time `xorm:"-"`
ClosedDateUnix int64
}
func (m *Milestone) BeforeInsert() {
m.DeadlineUnix = m.Deadline.Unix()
}
func (m *Milestone) BeforeUpdate() {
if m.NumIssues > 0 {
m.Completeness = m.NumClosedIssues * 100 / m.NumIssues
} else {
m.Completeness = 0
}
m.DeadlineUnix = m.Deadline.Unix()
m.ClosedDateUnix = m.ClosedDate.Unix()
}
func (m *Milestone) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "num_closed_issues":
m.NumOpenIssues = m.NumIssues - m.NumClosedIssues
case "deadline_unix":
m.Deadline = time.Unix(m.DeadlineUnix, 0).Local()
if m.Deadline.Year() == 9999 {
return
}
m.DeadlineString = m.Deadline.Format("2006-01-02")
if time.Now().Local().After(m.Deadline) {
m.IsOverDue = true
}
case "closed_date_unix":
m.ClosedDate = time.Unix(m.ClosedDateUnix, 0).Local()
}
}
// State returns string representation of milestone status.
func (m *Milestone) State() api.StateType {
if m.IsClosed {
return api.STATE_CLOSED
}
return api.STATE_OPEN
}
func (m *Milestone) ChangeStatus(isClosed bool) error {
return ChangeMilestoneStatus(m, isClosed)
}
func (m *Milestone) APIFormat() *api.Milestone {
apiMilestone := &api.Milestone{
ID: m.ID,
State: m.State(),
Title: m.Name,
Description: m.Content,
OpenIssues: m.NumOpenIssues,
ClosedIssues: m.NumClosedIssues,
}
if m.IsClosed {
apiMilestone.Closed = &m.ClosedDate
}
if m.Deadline.Year() < 9999 {
apiMilestone.Deadline = &m.Deadline
}
return apiMilestone
}
// NewMilestone creates new milestone of repository.
func NewMilestone(m *Milestone) (err error) {
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if _, err = sess.Insert(m); err != nil {
return err
}
if _, err = sess.Exec("UPDATE `repository` SET num_milestones = num_milestones + 1 WHERE id = ?", m.RepoID); err != nil {
return err
}
return sess.Commit()
}
func getMilestoneByRepoID(e Engine, repoID, id int64) (*Milestone, error) {
m := &Milestone{
ID: id,
RepoID: repoID,
}
has, err := e.Get(m)
if err != nil {
return nil, err
} else if !has {
return nil, ErrMilestoneNotExist{id, repoID}
}
return m, nil
}
// GetWebhookByRepoID returns the milestone in a repository.
func GetMilestoneByRepoID(repoID, id int64) (*Milestone, error) {
return getMilestoneByRepoID(x, repoID, id)
}
// GetMilestonesByRepoID returns all milestones of a repository.
func GetMilestonesByRepoID(repoID int64) ([]*Milestone, error) {
miles := make([]*Milestone, 0, 10)
return miles, x.Where("repo_id = ?", repoID).Find(&miles)
}
// GetMilestones returns a list of milestones of given repository and status.
func GetMilestones(repoID int64, page int, isClosed bool) ([]*Milestone, error) {
miles := make([]*Milestone, 0, setting.UI.IssuePagingNum)
sess := x.Where("repo_id = ? AND is_closed = ?", repoID, isClosed)
if page > 0 {
sess = sess.Limit(setting.UI.IssuePagingNum, (page-1)*setting.UI.IssuePagingNum)
}
return miles, sess.Find(&miles)
}
func updateMilestone(e Engine, m *Milestone) error {
_, err := e.Id(m.ID).AllCols().Update(m)
return err
}
// UpdateMilestone updates information of given milestone.
func UpdateMilestone(m *Milestone) error {
return updateMilestone(x, m)
}
func countRepoMilestones(e Engine, repoID int64) int64 {
count, _ := e.Where("repo_id=?", repoID).Count(new(Milestone))
return count
}
// CountRepoMilestones returns number of milestones in given repository.
func CountRepoMilestones(repoID int64) int64 {
return countRepoMilestones(x, repoID)
}
func countRepoClosedMilestones(e Engine, repoID int64) int64 {
closed, _ := e.Where("repo_id=? AND is_closed=?", repoID, true).Count(new(Milestone))
return closed
}
// CountRepoClosedMilestones returns number of closed milestones in given repository.
func CountRepoClosedMilestones(repoID int64) int64 {
return countRepoClosedMilestones(x, repoID)
}
// MilestoneStats returns number of open and closed milestones of given repository.
func MilestoneStats(repoID int64) (open int64, closed int64) {
open, _ = x.Where("repo_id=? AND is_closed=?", repoID, false).Count(new(Milestone))
return open, CountRepoClosedMilestones(repoID)
}
// ChangeMilestoneStatus changes the milestone open/closed status.
// If milestone passes with changed values, those values will be
// updated to database as well.
func ChangeMilestoneStatus(m *Milestone, isClosed bool) (err error) {
repo, err := GetRepositoryByID(m.RepoID)
if err != nil {
return err
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
m.IsClosed = isClosed
if err = updateMilestone(sess, m); err != nil {
return err
}
repo.NumMilestones = int(countRepoMilestones(sess, repo.ID))
repo.NumClosedMilestones = int(countRepoClosedMilestones(sess, repo.ID))
if _, err = sess.Id(repo.ID).AllCols().Update(repo); err != nil {
return err
}
return sess.Commit()
}
func changeMilestoneIssueStats(e *xorm.Session, issue *Issue) error {
if issue.MilestoneID == 0 {
return nil
}
m, err := getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID)
if err != nil {
return err
}
if issue.IsClosed {
m.NumOpenIssues--
m.NumClosedIssues++
} else {
m.NumOpenIssues++
m.NumClosedIssues--
}
return updateMilestone(e, m)
}
// ChangeMilestoneIssueStats updates the open/closed issues counter and progress
// for the milestone associated with the given issue.
func ChangeMilestoneIssueStats(issue *Issue) (err error) {
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if err = changeMilestoneIssueStats(sess, issue); err != nil {
return err
}
return sess.Commit()
}
func changeMilestoneAssign(e *xorm.Session, issue *Issue, oldMilestoneID int64) error {
if oldMilestoneID > 0 {
m, err := getMilestoneByRepoID(e, issue.RepoID, oldMilestoneID)
if err != nil {
return err
}
m.NumIssues--
if issue.IsClosed {
m.NumClosedIssues--
}
if err = updateMilestone(e, m); err != nil {
return err
} else if _, err = e.Exec("UPDATE `issue_user` SET milestone_id = 0 WHERE issue_id = ?", issue.ID); err != nil {
return err
}
}
if issue.MilestoneID > 0 {
m, err := getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID)
if err != nil {
return err
}
m.NumIssues++
if issue.IsClosed {
m.NumClosedIssues++
}
if err = updateMilestone(e, m); err != nil {
return err
} else if _, err = e.Exec("UPDATE `issue_user` SET milestone_id = ? WHERE issue_id = ?", m.ID, issue.ID); err != nil {
return err
}
}
return updateIssue(e, issue)
}
// ChangeMilestoneAssign changes assignment of milestone for issue.
func ChangeMilestoneAssign(issue *Issue, oldMilestoneID int64) (err error) {
sess := x.NewSession()
defer sess.Close()
if err = sess.Begin(); err != nil {
return err
}
if err = changeMilestoneAssign(sess, issue, oldMilestoneID); err != nil {
return err
}
return sess.Commit()
}
// DeleteMilestoneOfRepoByID deletes a milestone from a repository.
func DeleteMilestoneOfRepoByID(repoID, id int64) error {
m, err := GetMilestoneByRepoID(repoID, id)
if err != nil {
if IsErrMilestoneNotExist(err) {
return nil
}
return err
}
repo, err := GetRepositoryByID(m.RepoID)
if err != nil {
return err
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if _, err = sess.Id(m.ID).Delete(new(Milestone)); err != nil {
return err
}
repo.NumMilestones = int(countRepoMilestones(sess, repo.ID))
repo.NumClosedMilestones = int(countRepoClosedMilestones(sess, repo.ID))
if _, err = sess.Id(repo.ID).AllCols().Update(repo); err != nil {
return err
}
if _, err = sess.Exec("UPDATE `issue` SET milestone_id = 0 WHERE milestone_id = ?", m.ID); err != nil {
return err
} else if _, err = sess.Exec("UPDATE `issue_user` SET milestone_id = 0 WHERE milestone_id = ?", m.ID); err != nil {
return err
}
return sess.Commit()
}

264
models/mirror.go Normal file
View File

@@ -0,0 +1,264 @@
// Copyright 2016 The Gogs 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 models
import (
"fmt"
"strings"
"time"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"gopkg.in/ini.v1"
"github.com/gogits/git-module"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
)
var MirrorQueue = sync.NewUniqueQueue(setting.Repository.MirrorQueueLength)
// Mirror represents mirror information of a repository.
type Mirror struct {
ID int64 `xorm:"pk autoincr"`
RepoID int64
Repo *Repository `xorm:"-"`
Interval int // Hour.
EnablePrune bool `xorm:"NOT NULL DEFAULT true"`
Updated time.Time `xorm:"-"`
UpdatedUnix int64
NextUpdate time.Time `xorm:"-"`
NextUpdateUnix int64
address string `xorm:"-"`
}
func (m *Mirror) BeforeInsert() {
m.UpdatedUnix = time.Now().Unix()
m.NextUpdateUnix = m.NextUpdate.Unix()
}
func (m *Mirror) BeforeUpdate() {
m.UpdatedUnix = time.Now().Unix()
m.NextUpdateUnix = m.NextUpdate.Unix()
}
func (m *Mirror) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {
case "repo_id":
m.Repo, err = GetRepositoryByID(m.RepoID)
if err != nil {
log.Error(3, "GetRepositoryByID[%d]: %v", m.ID, err)
}
case "updated_unix":
m.Updated = time.Unix(m.UpdatedUnix, 0).Local()
case "next_updated_unix":
m.NextUpdate = time.Unix(m.NextUpdateUnix, 0).Local()
}
}
// ScheduleNextUpdate calculates and sets next update time.
func (m *Mirror) ScheduleNextUpdate() {
m.NextUpdate = time.Now().Add(time.Duration(m.Interval) * time.Hour)
}
func (m *Mirror) readAddress() {
if len(m.address) > 0 {
return
}
cfg, err := ini.Load(m.Repo.GitConfigPath())
if err != nil {
log.Error(4, "Load: %v", err)
return
}
m.address = cfg.Section("remote \"origin\"").Key("url").Value()
}
// HandleCloneUserCredentials replaces user credentials from HTTP/HTTPS URL
// with placeholder <credentials>.
// It will fail for any other forms of clone addresses.
func HandleCloneUserCredentials(url string, mosaics bool) string {
i := strings.Index(url, "@")
if i == -1 {
return url
}
start := strings.Index(url, "://")
if start == -1 {
return url
}
if mosaics {
return url[:start+3] + "<credentials>" + url[i:]
}
return url[:start+3] + url[i+1:]
}
// Address returns mirror address from Git repository config without credentials.
func (m *Mirror) Address() string {
m.readAddress()
return HandleCloneUserCredentials(m.address, false)
}
// MosaicsAddress returns mirror address from Git repository config with credentials under mosaics.
func (m *Mirror) MosaicsAddress() string {
m.readAddress()
return HandleCloneUserCredentials(m.address, true)
}
// FullAddress returns mirror address from Git repository config.
func (m *Mirror) FullAddress() string {
m.readAddress()
return m.address
}
// SaveAddress writes new address to Git repository config.
func (m *Mirror) SaveAddress(addr string) error {
configPath := m.Repo.GitConfigPath()
cfg, err := ini.Load(configPath)
if err != nil {
return fmt.Errorf("Load: %v", err)
}
cfg.Section("remote \"origin\"").Key("url").SetValue(addr)
return cfg.SaveToIndent(configPath, "\t")
}
// runSync returns true if sync finished without error.
func (m *Mirror) runSync() bool {
repoPath := m.Repo.RepoPath()
wikiPath := m.Repo.WikiPath()
timeout := time.Duration(setting.Git.Timeout.Mirror) * time.Second
// Do a fast-fail testing against on repository URL to ensure it is accessible under
// good condition to prevent long blocking on URL resolution without syncing anything.
if !git.IsRepoURLAccessible(git.NetworkOptions{
URL: m.FullAddress(),
Timeout: 10 * time.Second,
}) {
desc := fmt.Sprintf("Mirror repository URL is not accessible: %s", m.MosaicsAddress())
if err := CreateRepositoryNotice(desc); err != nil {
log.Error(4, "CreateRepositoryNotice: %v", err)
}
return false
}
gitArgs := []string{"remote", "update"}
if m.EnablePrune {
gitArgs = append(gitArgs, "--prune")
}
if _, stderr, err := process.ExecDir(
timeout, repoPath, fmt.Sprintf("Mirror.runSync: %s", repoPath),
"git", gitArgs...); err != nil {
desc := fmt.Sprintf("Fail to update mirror repository '%s': %s", repoPath, stderr)
log.Error(4, desc)
if err = CreateRepositoryNotice(desc); err != nil {
log.Error(4, "CreateRepositoryNotice: %v", err)
}
return false
}
if m.Repo.HasWiki() {
if _, stderr, err := process.ExecDir(
timeout, wikiPath, fmt.Sprintf("Mirror.runSync: %s", wikiPath),
"git", "remote", "update", "--prune"); err != nil {
desc := fmt.Sprintf("Fail to update mirror wiki repository '%s': %s", wikiPath, stderr)
log.Error(4, desc)
if err = CreateRepositoryNotice(desc); err != nil {
log.Error(4, "CreateRepositoryNotice: %v", err)
}
return false
}
}
return true
}
func getMirrorByRepoID(e Engine, repoID int64) (*Mirror, error) {
m := &Mirror{RepoID: repoID}
has, err := e.Get(m)
if err != nil {
return nil, err
} else if !has {
return nil, ErrMirrorNotExist
}
return m, nil
}
// GetMirrorByRepoID returns mirror information of a repository.
func GetMirrorByRepoID(repoID int64) (*Mirror, error) {
return getMirrorByRepoID(x, repoID)
}
func updateMirror(e Engine, m *Mirror) error {
_, err := e.Id(m.ID).AllCols().Update(m)
return err
}
func UpdateMirror(m *Mirror) error {
return updateMirror(x, m)
}
func DeleteMirrorByRepoID(repoID int64) error {
_, err := x.Delete(&Mirror{RepoID: repoID})
return err
}
// MirrorUpdate checks and updates mirror repositories.
func MirrorUpdate() {
if taskStatusTable.IsRunning(_MIRROR_UPDATE) {
return
}
taskStatusTable.Start(_MIRROR_UPDATE)
defer taskStatusTable.Stop(_MIRROR_UPDATE)
log.Trace("Doing: MirrorUpdate")
if err := x.Where("next_update_unix<=?", time.Now().Unix()).Iterate(new(Mirror), func(idx int, bean interface{}) error {
m := bean.(*Mirror)
if m.Repo == nil {
log.Error(4, "Disconnected mirror repository found: %d", m.ID)
return nil
}
MirrorQueue.Add(m.RepoID)
return nil
}); err != nil {
log.Error(4, "MirrorUpdate: %v", err)
}
}
// SyncMirrors checks and syncs mirrors.
// TODO: sync more mirrors at same time.
func SyncMirrors() {
// Start listening on new sync requests.
for repoID := range MirrorQueue.Queue() {
log.Trace("SyncMirrors [repo_id: %v]", repoID)
MirrorQueue.Remove(repoID)
m, err := GetMirrorByRepoID(com.StrTo(repoID).MustInt64())
if err != nil {
log.Error(4, "GetMirrorByRepoID [%s]: %v", repoID, err)
continue
}
if !m.runSync() {
continue
}
m.ScheduleNextUpdate()
if err = UpdateMirror(m); err != nil {
log.Error(4, "UpdateMirror [%s]: %v", repoID, err)
continue
}
}
}
func InitSyncMirrors() {
go SyncMirrors()
}

View File

@@ -6,12 +6,14 @@ package models
import (
"database/sql"
"errors"
"fmt"
"net/url"
"os"
"path"
"strings"
_ "github.com/denisenkom/go-mssqldb"
_ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
@@ -28,11 +30,13 @@ type Engine interface {
Find(interface{}, ...interface{}) error
Get(interface{}) (bool, error)
Id(interface{}) *xorm.Session
In(string, ...interface{}) *xorm.Session
Insert(...interface{}) (int64, error)
InsertOne(interface{}) (int64, error)
Iterate(interface{}, xorm.IterFunc) error
Sql(string, ...interface{}) *xorm.Session
Where(string, ...interface{}) *xorm.Session
Table(interface{}) *xorm.Session
Where(interface{}, ...interface{}) *xorm.Session
}
func sessionRelease(sess *xorm.Session) {
@@ -52,18 +56,17 @@ var (
}
EnableSQLite3 bool
EnableTidb bool
)
func init() {
tables = append(tables,
new(User), new(PublicKey), new(AccessToken),
new(Repository), new(DeployKey), new(Collaboration), new(Access),
new(Repository), new(DeployKey), new(Collaboration), new(Access), new(Upload),
new(Watch), new(Star), new(Follow), new(Action),
new(Issue), new(PullRequest), new(Comment), new(Attachment), new(IssueUser),
new(Label), new(IssueLabel), new(Milestone),
new(Mirror), new(Release), new(LoginSource), new(Webhook),
new(UpdateTask), new(HookTask),
new(Mirror), new(Release), new(LoginSource), new(Webhook), new(HookTask),
new(ProtectBranch), new(ProtectBranchWhitelist),
new(Team), new(OrgUser), new(TeamUser), new(TeamRepo),
new(Notice), new(EmailAddress))
@@ -83,8 +86,8 @@ func LoadConfigs() {
setting.UseMySQL = true
case "postgres":
setting.UsePostgreSQL = true
case "tidb":
setting.UseTiDB = true
case "mssql":
setting.UseMSSQL = true
}
DbCfg.Host = sec.Key("HOST").String()
DbCfg.Name = sec.Key("NAME").String()
@@ -96,8 +99,37 @@ func LoadConfigs() {
DbCfg.Path = sec.Key("PATH").MustString("data/gogs.db")
}
// parsePostgreSQLHostPort parses given input in various forms defined in
// https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
// and returns proper host and port number.
func parsePostgreSQLHostPort(info string) (string, string) {
host, port := "127.0.0.1", "5432"
if strings.Contains(info, ":") && !strings.HasSuffix(info, "]") {
idx := strings.LastIndex(info, ":")
host = info[:idx]
port = info[idx+1:]
} else if len(info) > 0 {
host = info
}
return host, port
}
func parseMSSQLHostPort(info string) (string, string) {
host, port := "127.0.0.1", "1433"
if strings.Contains(info, ":") {
host = strings.Split(info, ":")[0]
port = strings.Split(info, ":")[1]
} else if strings.Contains(info, ",") {
host = strings.Split(info, ",")[0]
port = strings.TrimSpace(strings.Split(info, ",")[1])
} else if len(info) > 0 {
host = info
}
return host, port
}
func getEngine() (*xorm.Engine, error) {
cnnstr := ""
connStr := ""
var Param string = "?"
if strings.Contains(DbCfg.Name, Param) {
Param = "&"
@@ -105,43 +137,36 @@ func getEngine() (*xorm.Engine, error) {
switch DbCfg.Type {
case "mysql":
if DbCfg.Host[0] == '/' { // looks like a unix socket
cnnstr = fmt.Sprintf("%s:%s@unix(%s)/%s%scharset=utf8&parseTime=true",
connStr = fmt.Sprintf("%s:%s@unix(%s)/%s%scharset=utf8&parseTime=true",
DbCfg.User, DbCfg.Passwd, DbCfg.Host, DbCfg.Name, Param)
} else {
cnnstr = fmt.Sprintf("%s:%s@tcp(%s)/%s%scharset=utf8&parseTime=true",
connStr = fmt.Sprintf("%s:%s@tcp(%s)/%s%scharset=utf8&parseTime=true",
DbCfg.User, DbCfg.Passwd, DbCfg.Host, DbCfg.Name, Param)
}
case "postgres":
var host, port = "127.0.0.1", "5432"
fields := strings.Split(DbCfg.Host, ":")
if len(fields) > 0 && len(strings.TrimSpace(fields[0])) > 0 {
host = fields[0]
host, port := parsePostgreSQLHostPort(DbCfg.Host)
if host[0] == '/' { // looks like a unix socket
connStr = fmt.Sprintf("postgres://%s:%s@:%s/%s%ssslmode=%s&host=%s",
url.QueryEscape(DbCfg.User), url.QueryEscape(DbCfg.Passwd), port, DbCfg.Name, Param, DbCfg.SSLMode, host)
} else {
connStr = fmt.Sprintf("postgres://%s:%s@%s:%s/%s%ssslmode=%s",
url.QueryEscape(DbCfg.User), url.QueryEscape(DbCfg.Passwd), host, port, DbCfg.Name, Param, DbCfg.SSLMode)
}
if len(fields) > 1 && len(strings.TrimSpace(fields[1])) > 0 {
port = fields[1]
}
cnnstr = fmt.Sprintf("postgres://%s:%s@%s:%s/%s%ssslmode=%s",
url.QueryEscape(DbCfg.User), url.QueryEscape(DbCfg.Passwd), host, port, DbCfg.Name, Param, DbCfg.SSLMode)
case "mssql":
host, port := parseMSSQLHostPort(DbCfg.Host)
connStr = fmt.Sprintf("server=%s; port=%s; database=%s; user id=%s; password=%s;", host, port, DbCfg.Name, DbCfg.User, DbCfg.Passwd)
case "sqlite3":
if !EnableSQLite3 {
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
return nil, errors.New("This binary version does not build support for SQLite3.")
}
if err := os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm); err != nil {
return nil, fmt.Errorf("Fail to create directories: %v", err)
}
cnnstr = "file:" + DbCfg.Path + "?cache=shared&mode=rwc"
case "tidb":
if !EnableTidb {
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
}
if err := os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm); err != nil {
return nil, fmt.Errorf("Fail to create directories: %v", err)
}
cnnstr = "goleveldb://" + DbCfg.Path
connStr = "file:" + DbCfg.Path + "?cache=shared&mode=rwc"
default:
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
}
return xorm.NewEngine(DbCfg.Type, cnnstr)
return xorm.NewEngine(DbCfg.Type, connStr)
}
func NewTestEngine(x *xorm.Engine) (err error) {
@@ -171,7 +196,12 @@ func SetEngine() (err error) {
if err != nil {
return fmt.Errorf("Fail to create xorm.log: %v", err)
}
x.SetLogger(xorm.NewSimpleLogger(f))
if setting.ProdMode {
x.SetLogger(xorm.NewSimpleLogger3(f, xorm.DEFAULT_LOG_PREFIX, xorm.DEFAULT_LOG_FLAG, core.LOG_WARNING))
} else {
x.SetLogger(xorm.NewSimpleLogger(f))
}
x.ShowSQL(true)
return nil
}
@@ -224,7 +254,6 @@ func GetStatistic() (stats Statistic) {
stats.Counter.Label, _ = x.Count(new(Label))
stats.Counter.HookTask, _ = x.Count(new(HookTask))
stats.Counter.Team, _ = x.Count(new(Team))
stats.Counter.UpdateTask, _ = x.Count(new(UpdateTask))
stats.Counter.Attachment, _ = x.Count(new(Attachment))
return
}

33
models/models_test.go Normal file
View File

@@ -0,0 +1,33 @@
// Copyright 2016 The Gogs 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 models
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func Test_parsePostgreSQLHostPort(t *testing.T) {
testSuites := []struct {
input string
host, port string
}{
{"127.0.0.1:1234", "127.0.0.1", "1234"},
{"127.0.0.1", "127.0.0.1", "5432"},
{"[::1]:1234", "[::1]", "1234"},
{"[::1]", "[::1]", "5432"},
{"/tmp/pg.sock:1234", "/tmp/pg.sock", "1234"},
{"/tmp/pg.sock", "/tmp/pg.sock", "5432"},
}
Convey("Parse PostgreSQL host and port", t, func() {
for _, suite := range testSuites {
host, port := parsePostgreSQLHostPort(suite.input)
So(host, ShouldEqual, suite.host)
So(port, ShouldEqual, suite.port)
}
})
}

View File

@@ -1,18 +0,0 @@
// +build tidb go1.4.2
// Copyright 2015 The Gogs 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 models
import (
_ "github.com/go-xorm/tidb"
"github.com/ngaut/log"
_ "github.com/pingcap/tidb"
)
func init() {
EnableTidb = true
log.SetLevelByString("error")
}

View File

@@ -10,10 +10,8 @@ import (
"os"
"strings"
"github.com/go-xorm/builder"
"github.com/go-xorm/xorm"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
)
var (
@@ -32,10 +30,10 @@ func (org *User) IsOrgMember(uid int64) bool {
}
func (org *User) getTeam(e Engine, name string) (*Team, error) {
return getTeam(e, org.ID, name)
return getTeamOfOrgByName(e, org.ID, name)
}
// GetTeam returns named team of organization.
// GetTeamOfOrgByName returns named team of organization.
func (org *User) GetTeam(name string) (*Team, error) {
return org.getTeam(x, name)
}
@@ -49,8 +47,9 @@ func (org *User) GetOwnerTeam() (*Team, error) {
return org.getOwnerTeam(x)
}
func (org *User) getTeams(e Engine) error {
return e.Where("org_id=?", org.ID).Find(&org.Teams)
func (org *User) getTeams(e Engine) (err error) {
org.Teams, err = getTeamsByOrgID(e, org.ID)
return err
}
// GetTeams returns all teams that belong to organization.
@@ -58,6 +57,11 @@ func (org *User) GetTeams() error {
return org.getTeams(x)
}
// TeamsHaveAccessToRepo returns all teamsthat have given access level to the repository.
func (org *User) TeamsHaveAccessToRepo(repoID int64, mode AccessMode) ([]*Team, error) {
return GetTeamsHaveAccessToRepo(org.ID, repoID, mode)
}
// GetMembers returns all members of organization.
func (org *User) GetMembers() error {
ous, err := GetOrgUsersByOrgID(org.ID)
@@ -108,8 +112,12 @@ func CreateOrganization(org, owner *User) (err error) {
}
org.LowerName = strings.ToLower(org.Name)
org.Rands = GetUserSalt()
org.Salt = GetUserSalt()
if org.Rands, err = GetUserSalt(); err != nil {
return err
}
if org.Salt, err = GetUserSalt(); err != nil {
return err
}
org.UseCustomAvatar = true
org.MaxRepoCreation = -1
org.NumTeams = 1
@@ -149,7 +157,7 @@ func CreateOrganization(org, owner *User) (err error) {
}
if _, err = sess.Insert(&TeamUser{
Uid: owner.ID,
UID: owner.ID,
OrgID: org.ID,
TeamID: t.ID,
}); err != nil {
@@ -307,11 +315,14 @@ func GetOrgUsersByUserID(uid int64, all bool) ([]*OrgUser, error) {
return ous, err
}
func getOrgUsersByOrgID(e Engine, orgID int64) ([]*OrgUser, error) {
orgUsers := make([]*OrgUser, 0, 10)
return orgUsers, e.Where("org_id=?", orgID).Find(&orgUsers)
}
// GetOrgUsersByOrgID returns all organization-user relations by organization ID.
func GetOrgUsersByOrgID(orgID int64) ([]*OrgUser, error) {
ous := make([]*OrgUser, 0, 10)
err := x.Where("org_id=?", orgID).Find(&ous)
return ous, err
return getOrgUsersByOrgID(x, orgID)
}
// ChangeOrgUserStatus changes public or private membership status.
@@ -476,8 +487,7 @@ func (org *User) GetUserTeams(userID int64) ([]*Team, error) {
return org.getUserTeams(x, userID)
}
// GetUserRepositories returns a range of repositories in organization
// that the user with the given userID has access to,
// GetUserRepositories returns a range of repositories in organization which the user has access to,
// and total number of records based on given condition.
func (org *User) GetUserRepositories(userID int64, page, pageSize int) ([]*Repository, int64, error) {
teamIDs, err := org.GetUserTeamIDs(userID)
@@ -486,43 +496,43 @@ func (org *User) GetUserRepositories(userID int64, page, pageSize int) ([]*Repos
}
if len(teamIDs) == 0 {
// user has no team but "IN ()" is invalid SQL
teamIDs = []int64{-1} // there is no repo with id=-1
teamIDs = []int64{-1} // there is no team with id=-1
}
var teamRepoIDs []int64
if err = x.Table("team_repo").In("team_id", teamIDs).Distinct("repo_id").Find(&teamRepoIDs); err != nil {
return nil, 0, fmt.Errorf("get team repository IDs: %v", err)
}
if len(teamRepoIDs) == 0 {
// team has no repo but "IN ()" is invalid SQL
teamRepoIDs = []int64{-1} // there is no repo with id=-1
}
if page <= 0 {
page = 1
}
repos := make([]*Repository, 0, pageSize)
// FIXME: use XORM chain operations instead of raw SQL.
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository
INNER JOIN team_repo
ON team_repo.repo_id = repository.id
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
GROUP BY repository.id
ORDER BY updated_unix DESC
LIMIT %d OFFSET %d`,
strings.Join(base.Int64sToStrings(teamIDs), ","), pageSize, (page-1)*pageSize),
org.ID, false).Find(&repos); err != nil {
return nil, 0, fmt.Errorf("get repositories: %v", err)
if err = x.Where("owner_id = ?", org.ID).
And("is_private = ?", false).
Or(builder.In("id", teamRepoIDs)).
Desc("updated_unix").
Limit(pageSize, (page-1)*pageSize).
Find(&repos); err != nil {
return nil, 0, fmt.Errorf("get user repositories: %v", err)
}
results, err := x.Query(fmt.Sprintf(`SELECT repository.id FROM repository
INNER JOIN team_repo
ON team_repo.repo_id = repository.id
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
GROUP BY repository.id
ORDER BY updated_unix DESC`,
strings.Join(base.Int64sToStrings(teamIDs), ",")),
org.ID, false)
repoCount, err := x.Where("owner_id = ?", org.ID).
And("is_private = ?", false).
Or(builder.In("id", teamRepoIDs)).
Count(new(Repository))
if err != nil {
log.Error(4, "count user repositories in organization: %v", err)
return nil, 0, fmt.Errorf("count user repositories: %v", err)
}
return repos, int64(len(results)), nil
return repos, repoCount, nil
}
// GetUserRepositories returns mirror repositories of the organization
// that the user with the given userID has access to.
// GetUserMirrorRepositories returns mirror repositories of the organization which the user has access to.
func (org *User) GetUserMirrorRepositories(userID int64) ([]*Repository, error) {
teamIDs, err := org.GetUserTeamIDs(userID)
if err != nil {
@@ -532,16 +542,24 @@ func (org *User) GetUserMirrorRepositories(userID int64) ([]*Repository, error)
teamIDs = []int64{-1}
}
var teamRepoIDs []int64
err = x.Table("team_repo").In("team_id", teamIDs).Distinct("repo_id").Find(&teamRepoIDs)
if err != nil {
return nil, fmt.Errorf("get team repository ids: %v", err)
}
if len(teamRepoIDs) == 0 {
// team has no repo but "IN ()" is invalid SQL
teamRepoIDs = []int64{-1} // there is no repo with id=-1
}
repos := make([]*Repository, 0, 10)
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository
INNER JOIN team_repo
ON team_repo.repo_id = repository.id AND repository.is_mirror = ?
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
GROUP BY repository.id
ORDER BY updated_unix DESC`,
strings.Join(base.Int64sToStrings(teamIDs), ",")),
true, org.ID, false).Find(&repos); err != nil {
return nil, fmt.Errorf("get repositories: %v", err)
if err = x.Where("owner_id = ?", org.ID).
And("is_private = ?", false).
Or(builder.In("id", teamRepoIDs)).
And("is_mirror = ?", true). // Don't move up because it's an independent condition
Desc("updated_unix").
Find(&repos); err != nil {
return nil, fmt.Errorf("get user repositories: %v", err)
}
return repos, nil
}

View File

@@ -8,6 +8,8 @@ import (
"errors"
"fmt"
"strings"
"github.com/go-xorm/xorm"
)
const OWNER_TEAM = "Owners"
@@ -26,14 +28,29 @@ type Team struct {
NumMembers int
}
func (t *Team) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "num_repos":
// LEGACY [0.11]: this is backward compatibility bug fix for https://github.com/gogits/gogs/issues/3671
if t.NumRepos < 0 {
t.NumRepos = 0
}
}
}
// IsOwnerTeam returns true if team is owner team.
func (t *Team) IsOwnerTeam() bool {
return t.Name == OWNER_TEAM
}
// HasWriteAccess returns true if team has at least write level access mode.
func (t *Team) HasWriteAccess() bool {
return t.Authorize >= ACCESS_MODE_WRITE
}
// IsTeamMember returns true if given user is a member of team.
func (t *Team) IsMember(uid int64) bool {
return IsTeamMember(t.OrgID, t.ID, uid)
func (t *Team) IsMember(userID int64) bool {
return IsTeamMember(t.OrgID, t.ID, userID)
}
func (t *Team) getRepositories(e Engine) (err error) {
@@ -154,15 +171,15 @@ func (t *Team) removeRepository(e Engine, repo *Repository, recalculate bool) (e
if err = t.getMembers(e); err != nil {
return fmt.Errorf("get team members: %v", err)
}
for _, u := range t.Members {
has, err := hasAccess(e, u, repo, ACCESS_MODE_READ)
for _, member := range t.Members {
has, err := hasAccess(e, member.ID, repo, ACCESS_MODE_READ)
if err != nil {
return err
} else if has {
continue
}
if err = watchRepo(e, u.ID, repo.ID, false); err != nil {
if err = watchRepo(e, member.ID, repo.ID, false); err != nil {
return err
}
}
@@ -194,11 +211,24 @@ func (t *Team) RemoveRepository(repoID int64) error {
return sess.Commit()
}
var reservedTeamNames = []string{"new"}
// IsUsableTeamName return an error if given name is a reserved name or pattern.
func IsUsableTeamName(name string) error {
return isUsableName(reservedTeamNames, nil, name)
}
// NewTeam creates a record of new team.
// It's caller's responsibility to assign organization ID.
func NewTeam(t *Team) error {
if len(t.Name) == 0 {
return errors.New("empty team name")
} else if t.OrgID == 0 {
return errors.New("OrgID is not assigned")
}
if err := IsUsableTeamName(t.Name); err != nil {
return err
}
has, err := x.Id(t.OrgID).Get(new(User))
@@ -235,9 +265,9 @@ func NewTeam(t *Team) error {
return sess.Commit()
}
func getTeam(e Engine, orgId int64, name string) (*Team, error) {
func getTeamOfOrgByName(e Engine, orgID int64, name string) (*Team, error) {
t := &Team{
OrgID: orgId,
OrgID: orgID,
LowerName: strings.ToLower(name),
}
has, err := e.Get(t)
@@ -249,14 +279,14 @@ func getTeam(e Engine, orgId int64, name string) (*Team, error) {
return t, nil
}
// GetTeam returns team by given team name and organization.
func GetTeam(orgId int64, name string) (*Team, error) {
return getTeam(x, orgId, name)
// GetTeamOfOrgByName returns team by given team name and organization.
func GetTeamOfOrgByName(orgID int64, name string) (*Team, error) {
return getTeamOfOrgByName(x, orgID, name)
}
func getTeamByID(e Engine, teamId int64) (*Team, error) {
func getTeamByID(e Engine, teamID int64) (*Team, error) {
t := new(Team)
has, err := e.Id(teamId).Get(t)
has, err := e.Id(teamID).Get(t)
if err != nil {
return nil, err
} else if !has {
@@ -266,8 +296,18 @@ func getTeamByID(e Engine, teamId int64) (*Team, error) {
}
// GetTeamByID returns team by given ID.
func GetTeamByID(teamId int64) (*Team, error) {
return getTeamByID(x, teamId)
func GetTeamByID(teamID int64) (*Team, error) {
return getTeamByID(x, teamID)
}
func getTeamsByOrgID(e Engine, orgID int64) ([]*Team, error) {
teams := make([]*Team, 0, 3)
return teams, e.Where("org_id = ?", orgID).Find(&teams)
}
// GetTeamsByOrgID returns all teams belong to given organization.
func GetTeamsByOrgID(orgID int64) ([]*Team, error) {
return getTeamsByOrgID(x, orgID)
}
// UpdateTeam updates information of team.
@@ -369,7 +409,7 @@ type TeamUser struct {
ID int64 `xorm:"pk autoincr"`
OrgID int64 `xorm:"INDEX"`
TeamID int64 `xorm:"UNIQUE(s)"`
Uid int64 `xorm:"UNIQUE(s)"`
UID int64 `xorm:"UNIQUE(s)"`
}
func isTeamMember(e Engine, orgID, teamID, uid int64) bool {
@@ -384,14 +424,15 @@ func IsTeamMember(orgID, teamID, uid int64) bool {
func getTeamMembers(e Engine, teamID int64) (_ []*User, err error) {
teamUsers := make([]*TeamUser, 0, 10)
if err = e.Where("team_id=?", teamID).Find(&teamUsers); err != nil {
if err = e.Sql("SELECT `id`, `org_id`, `team_id`, `uid` FROM `team_user` WHERE team_id=?", teamID).
Find(&teamUsers); err != nil {
return nil, fmt.Errorf("get team-users: %v", err)
}
members := make([]*User, 0, len(teamUsers))
for i := range teamUsers {
member := new(User)
if _, err = e.Id(teamUsers[i].Uid).Get(member); err != nil {
return nil, fmt.Errorf("get user '%d': %v", teamUsers[i].Uid, err)
if _, err = e.Id(teamUsers[i].UID).Get(member); err != nil {
return nil, fmt.Errorf("get user '%d': %v", teamUsers[i].UID, err)
}
members = append(members, member)
}
@@ -403,39 +444,34 @@ func GetTeamMembers(teamID int64) ([]*User, error) {
return getTeamMembers(x, teamID)
}
func getUserTeams(e Engine, orgId, uid int64) ([]*Team, error) {
tus := make([]*TeamUser, 0, 5)
if err := e.Where("uid=?", uid).And("org_id=?", orgId).Find(&tus); err != nil {
func getUserTeams(e Engine, orgID, userID int64) ([]*Team, error) {
teamUsers := make([]*TeamUser, 0, 5)
if err := e.Where("uid = ?", userID).And("org_id = ?", orgID).Find(&teamUsers); err != nil {
return nil, err
}
ts := make([]*Team, len(tus))
for i, tu := range tus {
t := new(Team)
has, err := e.Id(tu.TeamID).Get(t)
if err != nil {
return nil, err
} else if !has {
return nil, ErrTeamNotExist
}
ts[i] = t
teamIDs := make([]int64, len(teamUsers))
for i := range teamUsers {
teamIDs[i] = teamUsers[i].TeamID
}
return ts, nil
teams := make([]*Team, 0, len(teamIDs))
return teams, e.Where("org_id = ?", orgID).In("id", teamIDs).Find(&teams)
}
// GetUserTeams returns all teams that user belongs to in given organization.
func GetUserTeams(orgId, uid int64) ([]*Team, error) {
return getUserTeams(x, orgId, uid)
func GetUserTeams(orgID, userID int64) ([]*Team, error) {
return getUserTeams(x, orgID, userID)
}
// AddTeamMember adds new membership of given team to given organization,
// the user will have membership to given organization automatically when needed.
func AddTeamMember(orgID, teamID, uid int64) error {
if IsTeamMember(orgID, teamID, uid) {
func AddTeamMember(orgID, teamID, userID int64) error {
if IsTeamMember(orgID, teamID, userID) {
return nil
}
if err := AddOrgUser(orgID, uid); err != nil {
if err := AddOrgUser(orgID, userID); err != nil {
return err
}
@@ -457,7 +493,7 @@ func AddTeamMember(orgID, teamID, uid int64) error {
}
tu := &TeamUser{
Uid: uid,
UID: userID,
OrgID: orgID,
TeamID: teamID,
}
@@ -476,7 +512,7 @@ func AddTeamMember(orgID, teamID, uid int64) error {
// We make sure it exists before.
ou := new(OrgUser)
if _, err = sess.Where("uid = ?", uid).And("org_id = ?", orgID).Get(ou); err != nil {
if _, err = sess.Where("uid = ?", userID).And("org_id = ?", orgID).Get(ou); err != nil {
return err
}
ou.NumTeams++
@@ -519,7 +555,7 @@ func removeTeamMember(e Engine, orgID, teamID, uid int64) error {
}
tu := &TeamUser{
Uid: uid,
UID: uid,
OrgID: orgID,
TeamID: teamID,
}
@@ -574,18 +610,18 @@ func RemoveTeamMember(orgID, teamID, uid int64) error {
// TeamRepo represents an team-repository relation.
type TeamRepo struct {
ID int64 `xorm:"pk autoincr"`
ID int64
OrgID int64 `xorm:"INDEX"`
TeamID int64 `xorm:"UNIQUE(s)"`
RepoID int64 `xorm:"UNIQUE(s)"`
}
func hasTeamRepo(e Engine, orgID, teamID, repoID int64) bool {
has, _ := e.Where("org_id=?", orgID).And("team_id=?", teamID).And("repo_id=?", repoID).Get(new(TeamRepo))
has, _ := e.Where("org_id = ?", orgID).And("team_id = ?", teamID).And("repo_id = ?", repoID).Get(new(TeamRepo))
return has
}
// HasTeamRepo returns true if given repository belongs to team.
// HasTeamRepo returns true if given team has access to the repository of the organization.
func HasTeamRepo(orgID, teamID, repoID int64) bool {
return hasTeamRepo(x, orgID, teamID, repoID)
}
@@ -616,3 +652,13 @@ func removeTeamRepo(e Engine, teamID, repoID int64) error {
func RemoveTeamRepo(teamID, repoID int64) error {
return removeTeamRepo(x, teamID, repoID)
}
// GetTeamsHaveAccessToRepo returns all teams in an organization that have given access level to the repository.
func GetTeamsHaveAccessToRepo(orgID, repoID int64, mode AccessMode) ([]*Team, error) {
teams := make([]*Team, 0, 5)
return teams, x.Where("team.authorize >= ?", mode).
Join("INNER", "team_repo", "team_repo.team_id = team.id").
And("team_repo.org_id = ?", orgID).
And("team_repo.repo_id = ?", repoID).
Find(&teams)
}

View File

@@ -13,15 +13,18 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
)
var PullRequestQueue = sync.NewUniqueQueue(setting.Repository.PullRequestQueueLength)
type PullRequestType int
const (
@@ -68,7 +71,7 @@ func (pr *PullRequest) BeforeUpdate() {
pr.MergedUnix = pr.Merged.Unix()
}
// Note: don't try to get Pull because will end up recursive querying.
// Note: don't try to get Issue because will end up recursive querying.
func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "merged_unix":
@@ -80,43 +83,93 @@ func (pr *PullRequest) AfterSet(colName string, _ xorm.Cell) {
}
}
func (pr *PullRequest) getHeadRepo(e Engine) (err error) {
pr.HeadRepo, err = getRepositoryByID(e, pr.HeadRepoID)
if err != nil && !IsErrRepoNotExist(err) {
return fmt.Errorf("getRepositoryByID(head): %v", err)
// Note: don't try to get Issue because will end up recursive querying.
func (pr *PullRequest) loadAttributes(e Engine) (err error) {
if pr.HeadRepo == nil {
pr.HeadRepo, err = getRepositoryByID(e, pr.HeadRepoID)
if err != nil && !IsErrRepoNotExist(err) {
return fmt.Errorf("getRepositoryByID.(HeadRepo) [%d]: %v", pr.HeadRepoID, err)
}
}
if pr.BaseRepo == nil {
pr.BaseRepo, err = getRepositoryByID(e, pr.BaseRepoID)
if err != nil {
return fmt.Errorf("getRepositoryByID.(BaseRepo) [%d]: %v", pr.BaseRepoID, err)
}
}
if pr.HasMerged && pr.Merger == nil {
pr.Merger, err = getUserByID(e, pr.MergerID)
if IsErrUserNotExist(err) {
pr.MergerID = -1
pr.Merger = NewGhostUser()
} else if err != nil {
return fmt.Errorf("getUserByID [%d]: %v", pr.MergerID, err)
}
}
return nil
}
func (pr *PullRequest) GetHeadRepo() (err error) {
return pr.getHeadRepo(x)
func (pr *PullRequest) LoadAttributes() error {
return pr.loadAttributes(x)
}
func (pr *PullRequest) GetBaseRepo() (err error) {
if pr.BaseRepo != nil {
func (pr *PullRequest) LoadIssue() (err error) {
if pr.Issue != nil {
return nil
}
pr.BaseRepo, err = GetRepositoryByID(pr.BaseRepoID)
if err != nil {
return fmt.Errorf("GetRepositoryByID(base): %v", err)
}
return nil
pr.Issue, err = GetIssueByID(pr.IssueID)
return err
}
func (pr *PullRequest) GetMerger() (err error) {
if !pr.HasMerged || pr.Merger != nil {
return nil
// This method assumes following fields have been assigned with valid values:
// Required - Issue, BaseRepo
// Optional - HeadRepo, Merger
func (pr *PullRequest) APIFormat() *api.PullRequest {
// In case of head repo has been deleted.
var apiHeadRepo *api.Repository
if pr.HeadRepo == nil {
apiHeadRepo = &api.Repository{
Name: "deleted",
}
} else {
apiHeadRepo = pr.HeadRepo.APIFormat(nil)
}
pr.Merger, err = GetUserByID(pr.MergerID)
if IsErrUserNotExist(err) {
pr.MergerID = -1
pr.Merger = NewFakeUser()
} else if err != nil {
return fmt.Errorf("GetUserByID: %v", err)
apiIssue := pr.Issue.APIFormat()
apiPullRequest := &api.PullRequest{
ID: pr.ID,
Index: pr.Index,
Poster: apiIssue.Poster,
Title: apiIssue.Title,
Body: apiIssue.Body,
Labels: apiIssue.Labels,
Milestone: apiIssue.Milestone,
Assignee: apiIssue.Assignee,
State: apiIssue.State,
Comments: apiIssue.Comments,
HeadBranch: pr.HeadBranch,
HeadRepo: apiHeadRepo,
BaseBranch: pr.BaseBranch,
BaseRepo: pr.BaseRepo.APIFormat(nil),
HTMLURL: pr.Issue.HTMLURL(),
HasMerged: pr.HasMerged,
}
return nil
if pr.Status != PULL_REQUEST_STATUS_CHECKING {
mergeable := pr.Status != PULL_REQUEST_STATUS_CONFLICT
apiPullRequest.Mergeable = &mergeable
}
if pr.HasMerged {
apiPullRequest.Merged = &pr.Merged
apiPullRequest.MergedCommitID = &pr.MergedCommitID
apiPullRequest.MergedBy = pr.Merger.APIFormat()
}
return apiPullRequest
}
// IsChecking returns true if this pull request is still checking conflict.
@@ -130,12 +183,12 @@ func (pr *PullRequest) CanAutoMerge() bool {
}
// Merge merges pull request to base repository.
// FIXME: add repoWorkingPull make sure two merges does not happen at same time.
func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error) {
if err = pr.GetHeadRepo(); err != nil {
return fmt.Errorf("GetHeadRepo: %v", err)
} else if err = pr.GetBaseRepo(); err != nil {
return fmt.Errorf("GetBaseRepo: %v", err)
}
defer func() {
go HookQueue.Add(pr.BaseRepo.ID)
go AddTestPullRequestTask(doer, pr.BaseRepo.ID, pr.BaseBranch, false)
}()
sess := x.NewSession()
defer sessionRelease(sess)
@@ -152,21 +205,6 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
if err != nil {
return fmt.Errorf("OpenRepository: %v", err)
}
pr.MergedCommitID, err = headGitRepo.GetBranchCommitID(pr.HeadBranch)
if err != nil {
return fmt.Errorf("GetBranchCommitID: %v", err)
}
if err = mergePullRequestAction(sess, doer, pr.Issue.Repo, pr.Issue); err != nil {
return fmt.Errorf("mergePullRequestAction: %v", err)
}
pr.HasMerged = true
pr.Merged = time.Now()
pr.MergerID = doer.ID
if _, err = sess.Id(pr.ID).AllCols().Update(pr); err != nil {
return fmt.Errorf("update pull request: %v", err)
}
// Clone base repo.
tmpBasePath := path.Join(setting.AppDataPath, "tmp/repos", com.ToStr(time.Now().Nanosecond())+".git")
@@ -222,38 +260,72 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
return fmt.Errorf("git push: %s", stderr)
}
pr.MergedCommitID, err = headGitRepo.GetBranchCommitID(pr.HeadBranch)
if err != nil {
return fmt.Errorf("GetBranchCommit: %v", err)
}
pr.HasMerged = true
pr.Merged = time.Now()
pr.MergerID = doer.ID
if _, err = sess.Id(pr.ID).AllCols().Update(pr); err != nil {
return fmt.Errorf("update pull request: %v", err)
}
if err = sess.Commit(); err != nil {
return fmt.Errorf("Commit: %v", err)
}
// Compose commit repository action
if err = MergePullRequestAction(doer, pr.Issue.Repo, pr.Issue); err != nil {
log.Error(4, "MergePullRequestAction [%d]: %v", pr.ID, err)
}
// Reload pull request information.
if err = pr.LoadAttributes(); err != nil {
log.Error(4, "LoadAttributes: %v", err)
return nil
}
if err = PrepareWebhooks(pr.Issue.Repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{
Action: api.HOOK_ISSUE_CLOSED,
Index: pr.Index,
PullRequest: pr.APIFormat(),
Repository: pr.Issue.Repo.APIFormat(nil),
Sender: doer.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks: %v", err)
return nil
}
l, err := headGitRepo.CommitsBetweenIDs(pr.MergedCommitID, pr.MergeBase)
if err != nil {
return fmt.Errorf("CommitsBetween: %v", err)
log.Error(4, "CommitsBetweenIDs: %v", err)
return nil
}
// TODO: when squash commits, no need to append merge commit.
// It is possible that head branch is not fully sync with base branch for merge commits,
// so we need to get latest head commit and append merge commit manully
// to avoid strange diff commits produced.
mergeCommit, err := baseGitRepo.GetBranchCommit(pr.BaseBranch)
if err != nil {
log.Error(4, "GetBranchCommit: %v", err)
return nil
}
l.PushFront(mergeCommit)
p := &api.PushPayload{
Ref: "refs/heads/" + pr.BaseBranch,
Ref: git.BRANCH_PREFIX + pr.BaseBranch,
Before: pr.MergeBase,
After: pr.MergedCommitID,
CompareUrl: setting.AppUrl + pr.BaseRepo.ComposeCompareURL(pr.MergeBase, pr.MergedCommitID),
Commits: ListToPushCommits(l).ToApiPayloadCommits(pr.BaseRepo.FullLink()),
Repo: pr.BaseRepo.ComposePayload(),
Pusher: &api.PayloadAuthor{
Name: pr.HeadRepo.MustOwner().DisplayName(),
Email: pr.HeadRepo.MustOwner().Email,
UserName: pr.HeadRepo.MustOwner().Name,
},
Sender: &api.PayloadUser{
UserName: doer.Name,
ID: doer.ID,
AvatarUrl: doer.AvatarLink(),
},
CompareURL: setting.AppUrl + pr.BaseRepo.ComposeCompareURL(pr.MergeBase, pr.MergedCommitID),
Commits: ListToPushCommits(l).ToApiPayloadCommits(pr.BaseRepo.HTMLURL()),
Repo: pr.BaseRepo.APIFormat(nil),
Pusher: pr.HeadRepo.MustOwner().APIFormat(),
Sender: doer.APIFormat(),
}
if err = PrepareWebhooks(pr.BaseRepo, HOOK_EVENT_PUSH, p); err != nil {
return fmt.Errorf("PrepareWebhooks: %v", err)
}
go HookQueue.Add(pr.BaseRepo.ID)
go AddTestPullRequestTask(pr.BaseRepo.ID, pr.BaseBranch)
return nil
}
@@ -286,22 +358,17 @@ func (pr *PullRequest) testPatch() (err error) {
return nil
}
repoWorkingPool.CheckIn(com.ToStr(pr.BaseRepoID))
defer repoWorkingPool.CheckOut(com.ToStr(pr.BaseRepoID))
log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath)
if err := pr.BaseRepo.UpdateLocalCopy(); err != nil {
return fmt.Errorf("UpdateLocalCopy: %v", err)
}
// Checkout base branch.
_, stderr, err := process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(),
fmt.Sprintf("PullRequest.Merge (git checkout): %v", pr.BaseRepo.ID),
"git", "checkout", pr.BaseBranch)
if err != nil {
return fmt.Errorf("git checkout: %s", stderr)
if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil {
return fmt.Errorf("UpdateLocalCopy [%d]: %v", pr.BaseRepoID, err)
}
pr.Status = PULL_REQUEST_STATUS_CHECKING
_, stderr, err = process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(),
_, stderr, err := process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(),
fmt.Sprintf("testPatch (git apply --check): %d", pr.BaseRepo.ID),
"git", "apply", "--check", patchPath)
if err != nil {
@@ -327,23 +394,16 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
return err
}
if err = newIssue(sess, repo, pull, labelIDs, uuids, true); err != nil {
if err = newIssue(sess, NewIssueOptions{
Repo: repo,
Issue: pull,
LableIDs: labelIDs,
Attachments: uuids,
IsPull: true,
}); err != nil {
return fmt.Errorf("newIssue: %v", err)
}
// Notify watchers.
act := &Action{
ActUserID: pull.Poster.ID,
ActUserName: pull.Poster.Name,
ActEmail: pull.Poster.Email,
OpType: ACTION_CREATE_PULL_REQUEST,
Content: fmt.Sprintf("%d|%s", pull.Index, pull.Name),
RepoID: repo.ID,
RepoUserName: repo.Owner.Name,
RepoName: repo.Name,
IsPrivate: repo.IsPrivate,
}
pr.Index = pull.Index
if err = repo.SavePatch(pr.Index, patch); err != nil {
return fmt.Errorf("SavePatch: %v", err)
@@ -353,6 +413,7 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
if err = pr.testPatch(); err != nil {
return fmt.Errorf("testPatch: %v", err)
}
// No conflict appears after test means mergeable.
if pr.Status == PULL_REQUEST_STATUS_CHECKING {
pr.Status = PULL_REQUEST_STATUS_MERGEABLE
}
@@ -366,12 +427,34 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
return fmt.Errorf("Commit: %v", err)
}
if err = NotifyWatchers(act); err != nil {
if err = NotifyWatchers(&Action{
ActUserID: pull.Poster.ID,
ActUserName: pull.Poster.Name,
OpType: ACTION_CREATE_PULL_REQUEST,
Content: fmt.Sprintf("%d|%s", pull.Index, pull.Title),
RepoID: repo.ID,
RepoUserName: repo.Owner.Name,
RepoName: repo.Name,
IsPrivate: repo.IsPrivate,
}); err != nil {
log.Error(4, "NotifyWatchers: %v", err)
} else if err = pull.MailParticipants(); err != nil {
log.Error(4, "MailParticipants: %v", err)
}
pr.Issue = pull
pull.PullRequest = pr
if err = PrepareWebhooks(repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{
Action: api.HOOK_ISSUE_OPENED,
Index: pull.Index,
PullRequest: pr.APIFormat(),
Repository: repo.APIFormat(nil),
Sender: pull.Poster.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks: %v", err)
}
go HookQueue.Add(repo.ID)
return nil
}
@@ -395,9 +478,9 @@ func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch
// by given head information (repo and branch).
func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequest, error) {
prs := make([]*PullRequest, 0, 2)
return prs, x.Where("head_repo_id=? AND head_branch=? AND has_merged=? AND issue.is_closed=?",
return prs, x.Where("head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ?",
repoID, branch, false, false).
Join("INNER", "issue", "issue.id=pull_request.issue_id").Find(&prs)
Join("INNER", "issue", "issue.id = pull_request.issue_id").Find(&prs)
}
// GetUnmergedPullRequestsByBaseInfo returnss all pull requests that are open and has not been merged
@@ -409,30 +492,38 @@ func GetUnmergedPullRequestsByBaseInfo(repoID int64, branch string) ([]*PullRequ
Join("INNER", "issue", "issue.id=pull_request.issue_id").Find(&prs)
}
// GetPullRequestByID returns a pull request by given ID.
func GetPullRequestByID(id int64) (*PullRequest, error) {
func getPullRequestByID(e Engine, id int64) (*PullRequest, error) {
pr := new(PullRequest)
has, err := x.Id(id).Get(pr)
has, err := e.Id(id).Get(pr)
if err != nil {
return nil, err
} else if !has {
return nil, ErrPullRequestNotExist{id, 0, 0, 0, "", ""}
}
return pr, nil
return pr, pr.loadAttributes(e)
}
// GetPullRequestByIssueID returns pull request by given issue ID.
func GetPullRequestByIssueID(issueID int64) (*PullRequest, error) {
// GetPullRequestByID returns a pull request by given ID.
func GetPullRequestByID(id int64) (*PullRequest, error) {
return getPullRequestByID(x, id)
}
func getPullRequestByIssueID(e Engine, issueID int64) (*PullRequest, error) {
pr := &PullRequest{
IssueID: issueID,
}
has, err := x.Get(pr)
has, err := e.Get(pr)
if err != nil {
return nil, err
} else if !has {
return nil, ErrPullRequestNotExist{0, issueID, 0, 0, "", ""}
}
return pr, nil
return pr, pr.loadAttributes(e)
}
// GetPullRequestByIssueID returns pull request by given issue ID.
func GetPullRequestByIssueID(issueID int64) (*PullRequest, error) {
return getPullRequestByIssueID(x, issueID)
}
// Update updates all fields of pull request.
@@ -447,21 +538,13 @@ func (pr *PullRequest) UpdateCols(cols ...string) error {
return err
}
var PullRequestQueue = NewUniqueQueue(setting.Repository.PullRequestQueueLength)
// UpdatePatch generates and saves a new patch.
func (pr *PullRequest) UpdatePatch() (err error) {
if err = pr.GetHeadRepo(); err != nil {
return fmt.Errorf("GetHeadRepo: %v", err)
} else if pr.HeadRepo == nil {
if pr.HeadRepo == nil {
log.Trace("PullRequest[%d].UpdatePatch: ignored cruppted data", pr.ID)
return nil
}
if err = pr.GetBaseRepo(); err != nil {
return fmt.Errorf("GetBaseRepo: %v", err)
}
headGitRepo, err := git.OpenRepository(pr.HeadRepo.RepoPath())
if err != nil {
return fmt.Errorf("OpenRepository: %v", err)
@@ -536,6 +619,45 @@ func (pr *PullRequest) AddToTaskQueue() {
})
}
type PullRequestList []*PullRequest
func (prs PullRequestList) loadAttributes(e Engine) (err error) {
if len(prs) == 0 {
return nil
}
// Load issues
issueIDs := make([]int64, 0, len(prs))
for i := range prs {
issueIDs = append(issueIDs, prs[i].IssueID)
}
issues := make([]*Issue, 0, len(issueIDs))
if err = e.Where("id > 0").In("id", issueIDs).Find(&issues); err != nil {
return fmt.Errorf("find issues: %v", err)
}
set := make(map[int64]*Issue)
for i := range issues {
set[issues[i].ID] = issues[i]
}
for i := range prs {
prs[i].Issue = set[prs[i].IssueID]
}
// Load attributes
for i := range prs {
if err = prs[i].loadAttributes(e); err != nil {
return fmt.Errorf("loadAttributes [%d]: %v", prs[i].ID, err)
}
}
return nil
}
func (prs PullRequestList) LoadAttributes() error {
return prs.loadAttributes(x)
}
func addHeadRepoTasks(prs []*PullRequest) {
for _, pr := range prs {
log.Trace("addHeadRepoTasks[%d]: composing new test task", pr.ID)
@@ -553,19 +675,47 @@ func addHeadRepoTasks(prs []*PullRequest) {
// AddTestPullRequestTask adds new test tasks by given head/base repository and head/base branch,
// and generate new patch for testing as needed.
func AddTestPullRequestTask(repoID int64, branch string) {
log.Trace("AddTestPullRequestTask[head_repo_id: %d, head_branch: %s]: finding pull requests", repoID, branch)
func AddTestPullRequestTask(doer *User, repoID int64, branch string, isSync bool) {
log.Trace("AddTestPullRequestTask [head_repo_id: %d, head_branch: %s]: finding pull requests", repoID, branch)
prs, err := GetUnmergedPullRequestsByHeadInfo(repoID, branch)
if err != nil {
log.Error(4, "Find pull requests[head_repo_id: %d, head_branch: %s]: %v", repoID, branch, err)
log.Error(4, "Find pull requests [head_repo_id: %d, head_branch: %s]: %v", repoID, branch, err)
return
}
if isSync {
if err = PullRequestList(prs).LoadAttributes(); err != nil {
log.Error(4, "PullRequestList.LoadAttributes: %v", err)
}
if err == nil {
for _, pr := range prs {
pr.Issue.PullRequest = pr
if err = pr.Issue.LoadAttributes(); err != nil {
log.Error(4, "LoadAttributes: %v", err)
continue
}
if err = PrepareWebhooks(pr.Issue.Repo, HOOK_EVENT_PULL_REQUEST, &api.PullRequestPayload{
Action: api.HOOK_ISSUE_SYNCHRONIZED,
Index: pr.Issue.Index,
PullRequest: pr.Issue.PullRequest.APIFormat(),
Repository: pr.Issue.Repo.APIFormat(nil),
Sender: doer.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks [pull_id: %v]: %v", pr.ID, err)
continue
}
go HookQueue.Add(pr.Issue.Repo.ID)
}
}
}
addHeadRepoTasks(prs)
log.Trace("AddTestPullRequestTask[base_repo_id: %d, base_branch: %s]: finding pull requests", repoID, branch)
log.Trace("AddTestPullRequestTask [base_repo_id: %d, base_branch: %s]: finding pull requests", repoID, branch)
prs, err = GetUnmergedPullRequestsByBaseInfo(repoID, branch)
if err != nil {
log.Error(4, "Find pull requests[base_repo_id: %d, base_branch: %s]: %v", repoID, branch, err)
log.Error(4, "Find pull requests [base_repo_id: %d, base_branch: %s]: %v", repoID, branch, err)
return
}
for _, pr := range prs {
@@ -607,8 +757,8 @@ func TestPullRequests() {
func(idx int, bean interface{}) error {
pr := bean.(*PullRequest)
if err := pr.GetBaseRepo(); err != nil {
log.Error(3, "GetBaseRepo: %v", err)
if err := pr.LoadAttributes(); err != nil {
log.Error(3, "LoadAttributes: %v", err)
return nil
}
@@ -632,7 +782,7 @@ func TestPullRequests() {
pr, err := GetPullRequestByID(com.StrTo(prID).MustInt64())
if err != nil {
log.Error(4, "GetPullRequestByID[%d]: %v", prID, err)
log.Error(4, "GetPullRequestByID[%s]: %v", prID, err)
continue
} else if err = pr.testPatch(); err != nil {
log.Error(4, "testPatch[%d]: %v", pr.ID, err)

View File

@@ -178,13 +178,18 @@ func UpdateRelease(gitRepo *git.Repository, rel *Release) (err error) {
return err
}
// DeleteReleaseByID deletes a release and corresponding Git tag by given ID.
func DeleteReleaseByID(id int64) error {
// DeleteReleaseOfRepoByID deletes a release and corresponding Git tag by given ID.
func DeleteReleaseOfRepoByID(repoID, id int64) error {
rel, err := GetReleaseByID(id)
if err != nil {
return fmt.Errorf("GetReleaseByID: %v", err)
}
// Mark sure the delete operation againsts same repository.
if repoID != rel.RepoID {
return nil
}
repo, err := GetRepositoryByID(rel.RepoID)
if err != nil {
return fmt.Errorf("GetRepositoryByID: %v", err)

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,13 @@
package models
import (
"fmt"
"strings"
"github.com/Unknwon/com"
"github.com/gogits/git-module"
"github.com/gogits/gogs/modules/base"
)
type Branch struct {
@@ -36,7 +42,7 @@ func GetBranchesByPath(path string) ([]*Branch, error) {
func (repo *Repository) GetBranch(br string) (*Branch, error) {
if !git.IsBranchExist(repo.RepoPath(), br) {
return nil, &ErrBranchNotExist{br}
return nil, ErrBranchNotExist{br}
}
return &Branch{
Path: repo.RepoPath(),
@@ -55,3 +61,193 @@ func (br *Branch) GetCommit() (*git.Commit, error) {
}
return gitRepo.GetBranchCommit(br.Name)
}
type ProtectBranchWhitelist struct {
ID int64
ProtectBranchID int64
RepoID int64 `xorm:"UNIQUE(protect_branch_whitelist)"`
Name string `xorm:"UNIQUE(protect_branch_whitelist)"`
UserID int64 `xorm:"UNIQUE(protect_branch_whitelist)"`
}
// IsUserInProtectBranchWhitelist returns true if given user is in the whitelist of a branch in a repository.
func IsUserInProtectBranchWhitelist(repoID, userID int64, branch string) bool {
has, err := x.Where("repo_id = ?", repoID).And("user_id = ?", userID).And("name = ?", branch).Get(new(ProtectBranchWhitelist))
return has && err == nil
}
// ProtectBranch contains options of a protected branch.
type ProtectBranch struct {
ID int64
RepoID int64 `xorm:"UNIQUE(protect_branch)"`
Name string `xorm:"UNIQUE(protect_branch)"`
Protected bool
RequirePullRequest bool
EnableWhitelist bool
WhitelistUserIDs string `xorm:"TEXT"`
WhitelistTeamIDs string `xorm:"TEXT"`
}
// GetProtectBranchOfRepoByName returns *ProtectBranch by branch name in given repostiory.
func GetProtectBranchOfRepoByName(repoID int64, name string) (*ProtectBranch, error) {
protectBranch := &ProtectBranch{
RepoID: repoID,
Name: name,
}
has, err := x.Get(protectBranch)
if err != nil {
return nil, err
} else if !has {
return nil, ErrBranchNotExist{name}
}
return protectBranch, nil
}
// IsBranchOfRepoRequirePullRequest returns true if branch requires pull request in given repository.
func IsBranchOfRepoRequirePullRequest(repoID int64, name string) bool {
protectBranch, err := GetProtectBranchOfRepoByName(repoID, name)
if err != nil {
return false
}
return protectBranch.Protected && protectBranch.RequirePullRequest
}
// UpdateProtectBranch saves branch protection options.
// If ID is 0, it creates a new record. Otherwise, updates existing record.
func UpdateProtectBranch(protectBranch *ProtectBranch) (err error) {
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if protectBranch.ID == 0 {
if _, err = sess.Insert(protectBranch); err != nil {
return fmt.Errorf("Insert: %v", err)
}
return
}
if _, err = sess.Id(protectBranch.ID).AllCols().Update(protectBranch); err != nil {
return fmt.Errorf("Update: %v", err)
}
return sess.Commit()
}
// UpdateOrgProtectBranch saves branch protection options of organizational repository.
// If ID is 0, it creates a new record. Otherwise, updates existing record.
// This function also performs check if whitelist user and team's IDs have been changed
// to avoid unnecessary whitelist delete and regenerate.
func UpdateOrgProtectBranch(repo *Repository, protectBranch *ProtectBranch, whitelistUserIDs, whitelistTeamIDs string) (err error) {
if err = repo.GetOwner(); err != nil {
return fmt.Errorf("GetOwner: %v", err)
} else if !repo.Owner.IsOrganization() {
return fmt.Errorf("expect repository owner to be an organization")
}
hasUsersChanged := false
validUserIDs := base.StringsToInt64s(strings.Split(protectBranch.WhitelistUserIDs, ","))
if protectBranch.WhitelistUserIDs != whitelistUserIDs {
hasUsersChanged = true
userIDs := base.StringsToInt64s(strings.Split(whitelistUserIDs, ","))
validUserIDs = make([]int64, 0, len(userIDs))
for _, userID := range userIDs {
has, err := HasAccess(userID, repo, ACCESS_MODE_WRITE)
if err != nil {
return fmt.Errorf("HasAccess [user_id: %d, repo_id: %d]: %v", userID, protectBranch.RepoID, err)
} else if !has {
continue // Drop invalid user ID
}
validUserIDs = append(validUserIDs, userID)
}
protectBranch.WhitelistUserIDs = strings.Join(base.Int64sToStrings(validUserIDs), ",")
}
hasTeamsChanged := false
validTeamIDs := base.StringsToInt64s(strings.Split(protectBranch.WhitelistTeamIDs, ","))
if protectBranch.WhitelistTeamIDs != whitelistTeamIDs {
hasTeamsChanged = true
teamIDs := base.StringsToInt64s(strings.Split(whitelistTeamIDs, ","))
teams, err := GetTeamsHaveAccessToRepo(repo.OwnerID, repo.ID, ACCESS_MODE_WRITE)
if err != nil {
return fmt.Errorf("GetTeamsHaveAccessToRepo [org_id: %d, repo_id: %d]: %v", repo.OwnerID, repo.ID, err)
}
validTeamIDs = make([]int64, 0, len(teams))
for i := range teams {
if teams[i].HasWriteAccess() && com.IsSliceContainsInt64(teamIDs, teams[i].ID) {
validTeamIDs = append(validTeamIDs, teams[i].ID)
}
}
protectBranch.WhitelistTeamIDs = strings.Join(base.Int64sToStrings(validTeamIDs), ",")
}
// Merge users and members of teams
var whitelists []*ProtectBranchWhitelist
if hasUsersChanged || hasTeamsChanged {
mergedUserIDs := make(map[int64]bool)
for _, userID := range validUserIDs {
// Empty whitelist users can cause an ID with 0
if userID != 0 {
mergedUserIDs[userID] = true
}
}
for _, teamID := range validTeamIDs {
members, err := GetTeamMembers(teamID)
if err != nil {
return fmt.Errorf("GetTeamMembers [team_id: %d]: %v", teamID, err)
}
for i := range members {
mergedUserIDs[members[i].ID] = true
}
}
whitelists = make([]*ProtectBranchWhitelist, 0, len(mergedUserIDs))
for userID := range mergedUserIDs {
whitelists = append(whitelists, &ProtectBranchWhitelist{
ProtectBranchID: protectBranch.ID,
RepoID: repo.ID,
Name: protectBranch.Name,
UserID: userID,
})
}
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
if protectBranch.ID == 0 {
if _, err = sess.Insert(protectBranch); err != nil {
return fmt.Errorf("Insert: %v", err)
}
}
if _, err = sess.Id(protectBranch.ID).AllCols().Update(protectBranch); err != nil {
return fmt.Errorf("Update: %v", err)
}
// Refresh whitelists
if hasUsersChanged || hasTeamsChanged {
if _, err = sess.Delete(&ProtectBranchWhitelist{ProtectBranchID: protectBranch.ID}); err != nil {
return fmt.Errorf("delete old protect branch whitelists: %v", err)
} else if _, err = sess.Insert(whitelists); err != nil {
return fmt.Errorf("insert new protect branch whitelists: %v", err)
}
}
return sess.Commit()
}
// GetProtectBranchesByRepoID returns a list of *ProtectBranch in given repostiory.
func GetProtectBranchesByRepoID(repoID int64) ([]*ProtectBranch, error) {
protectBranches := make([]*ProtectBranch, 0, 2)
return protectBranches, x.Where("repo_id = ?", repoID).Asc("name").Find(&protectBranches)
}

View File

@@ -6,6 +6,8 @@ package models
import (
"fmt"
api "github.com/gogits/go-gogs-client"
)
// Collaboration represent the relation between an individual and a repository.
@@ -29,7 +31,17 @@ func (c *Collaboration) ModeI18nKey() string {
}
}
// AddCollaborator adds new collaboration relation between an individual and a repository.
//IsCollaborator returns true if the user is a collaborator
func (repo *Repository) IsCollaborator(uid int64) (bool, error) {
collaboration := &Collaboration{
RepoID: repo.ID,
UserID: uid,
}
return x.Get(collaboration)
}
// AddCollaborator adds new collaboration to a repository with default access mode.
func (repo *Repository) AddCollaborator(u *User) error {
collaboration := &Collaboration{
RepoID: repo.ID,
@@ -50,17 +62,10 @@ func (repo *Repository) AddCollaborator(u *User) error {
return err
}
if _, err = sess.InsertOne(collaboration); err != nil {
if _, err = sess.Insert(collaboration); err != nil {
return err
}
if repo.Owner.IsOrganization() {
err = repo.recalculateTeamAccesses(sess, 0)
} else {
err = repo.recalculateAccesses(sess)
}
if err != nil {
return fmt.Errorf("recalculateAccesses 'team=%v': %v", repo.Owner.IsOrganization(), err)
} else if err = repo.recalculateAccesses(sess); err != nil {
return fmt.Errorf("recalculateAccesses [repo_id: %v]: %v", repo.ID, err)
}
return sess.Commit()
@@ -77,6 +82,17 @@ type Collaborator struct {
Collaboration *Collaboration
}
func (c *Collaborator) APIFormat() *api.Collaborator {
return &api.Collaborator{
User: c.User.APIFormat(),
Permissions: api.Permission{
Admin: c.Collaboration.Mode >= ACCESS_MODE_ADMIN,
Push: c.Collaboration.Mode >= ACCESS_MODE_WRITE,
Pull: c.Collaboration.Mode >= ACCESS_MODE_READ,
},
}
}
func (repo *Repository) getCollaborators(e Engine) ([]*Collaborator, error) {
collaborations, err := repo.getCollaborations(e)
if err != nil {
@@ -103,7 +119,7 @@ func (repo *Repository) GetCollaborators() ([]*Collaborator, error) {
}
// ChangeCollaborationAccessMode sets new access mode for the collaboration.
func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode) error {
func (repo *Repository) ChangeCollaborationAccessMode(userID int64, mode AccessMode) error {
// Discard invalid input
if mode <= ACCESS_MODE_NONE || mode > ACCESS_MODE_OWNER {
return nil
@@ -111,7 +127,7 @@ func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode
collaboration := &Collaboration{
RepoID: repo.ID,
UserID: uid,
UserID: userID,
}
has, err := x.Get(collaboration)
if err != nil {
@@ -120,8 +136,24 @@ func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode
return nil
}
if collaboration.Mode == mode {
return nil
}
collaboration.Mode = mode
// If it's an organizational repository, merge with team access level for highest permission
if repo.Owner.IsOrganization() {
teams, err := GetUserTeams(repo.OwnerID, userID)
if err != nil {
return fmt.Errorf("GetUserTeams: [org_id: %d, user_id: %d]: %v", repo.OwnerID, userID, err)
}
for i := range teams {
if mode < teams[i].Authorize {
mode = teams[i].Authorize
}
}
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
@@ -130,8 +162,24 @@ func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode
if _, err = sess.Id(collaboration.ID).AllCols().Update(collaboration); err != nil {
return fmt.Errorf("update collaboration: %v", err)
} else if _, err = sess.Exec("UPDATE access SET mode = ? WHERE user_id = ? AND repo_id = ?", mode, uid, repo.ID); err != nil {
return fmt.Errorf("update access table: %v", err)
}
access := Access{
UserID: userID,
RepoID: repo.ID,
}
has, err = sess.Get(access)
if err != nil {
return fmt.Errorf("get access record: %v", err)
}
if has {
_, err = sess.Exec("UPDATE access SET mode = ? WHERE user_id = ? AND repo_id = ?", mode, userID, repo.ID)
} else {
access.Mode = mode
_, err = sess.Insert(access)
}
if err != nil {
return fmt.Errorf("update/insert access table: %v", err)
}
return sess.Commit()

520
models/repo_editor.go Normal file
View File

@@ -0,0 +1,520 @@
// Copyright 2016 The Gogs 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 models
import (
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"os"
"os/exec"
"path"
"path/filepath"
"time"
"github.com/Unknwon/com"
gouuid "github.com/satori/go.uuid"
log "gopkg.in/clog.v1"
git "github.com/gogits/git-module"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
)
// ___________ .___.__ __ ___________.__.__
// \_ _____/ __| _/|__|/ |_ \_ _____/|__| | ____
// | __)_ / __ | | \ __\ | __) | | | _/ __ \
// | \/ /_/ | | || | | \ | | |_\ ___/
// /_______ /\____ | |__||__| \___ / |__|____/\___ >
// \/ \/ \/ \/
// discardLocalRepoBranchChanges discards local commits/changes of
// given branch to make sure it is even to remote branch.
func discardLocalRepoBranchChanges(localPath, branch string) error {
if !com.IsExist(localPath) {
return nil
}
// No need to check if nothing in the repository.
if !git.IsBranchExist(localPath, branch) {
return nil
}
refName := "origin/" + branch
if err := git.ResetHEAD(localPath, true, refName); err != nil {
return fmt.Errorf("git reset --hard %s: %v", refName, err)
}
return nil
}
func (repo *Repository) DiscardLocalRepoBranchChanges(branch string) error {
return discardLocalRepoBranchChanges(repo.LocalCopyPath(), branch)
}
// checkoutNewBranch checks out to a new branch from the a branch name.
func checkoutNewBranch(repoPath, localPath, oldBranch, newBranch string) error {
if err := git.Checkout(localPath, git.CheckoutOptions{
Timeout: time.Duration(setting.Git.Timeout.Pull) * time.Second,
Branch: newBranch,
OldBranch: oldBranch,
}); err != nil {
return fmt.Errorf("git checkout -b %s %s: %v", newBranch, oldBranch, err)
}
return nil
}
func (repo *Repository) CheckoutNewBranch(oldBranch, newBranch string) error {
return checkoutNewBranch(repo.RepoPath(), repo.LocalCopyPath(), oldBranch, newBranch)
}
type UpdateRepoFileOptions struct {
LastCommitID string
OldBranch string
NewBranch string
OldTreeName string
NewTreeName string
Message string
Content string
IsNewFile bool
}
// UpdateRepoFile adds or updates a file in repository.
func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (err error) {
repoWorkingPool.CheckIn(com.ToStr(repo.ID))
defer repoWorkingPool.CheckOut(com.ToStr(repo.ID))
if err = repo.DiscardLocalRepoBranchChanges(opts.OldBranch); err != nil {
return fmt.Errorf("DiscardLocalRepoBranchChanges [branch: %s]: %v", opts.OldBranch, err)
} else if err = repo.UpdateLocalCopyBranch(opts.OldBranch); err != nil {
return fmt.Errorf("UpdateLocalCopyBranch [branch: %s]: %v", opts.OldBranch, err)
}
if opts.OldBranch != opts.NewBranch {
if err := repo.CheckoutNewBranch(opts.OldBranch, opts.NewBranch); err != nil {
return fmt.Errorf("CheckoutNewBranch [old_branch: %s, new_branch: %s]: %v", opts.OldBranch, opts.NewBranch, err)
}
}
localPath := repo.LocalCopyPath()
oldFilePath := path.Join(localPath, opts.OldTreeName)
filePath := path.Join(localPath, opts.NewTreeName)
os.MkdirAll(path.Dir(filePath), os.ModePerm)
// If it's meant to be a new file, make sure it doesn't exist.
if opts.IsNewFile {
if com.IsExist(filePath) {
return ErrRepoFileAlreadyExist{filePath}
}
}
// Ignore move step if it's a new file under a directory.
// Otherwise, move the file when name changed.
if com.IsFile(oldFilePath) && opts.OldTreeName != opts.NewTreeName {
if err = git.MoveFile(localPath, opts.OldTreeName, opts.NewTreeName); err != nil {
return fmt.Errorf("git mv %s %s: %v", opts.OldTreeName, opts.NewTreeName, err)
}
}
if err = ioutil.WriteFile(filePath, []byte(opts.Content), 0666); err != nil {
return fmt.Errorf("WriteFile: %v", err)
}
if err = git.AddChanges(localPath, true); err != nil {
return fmt.Errorf("git add --all: %v", err)
} else if err = git.CommitChanges(localPath, git.CommitChangesOptions{
Committer: doer.NewGitSig(),
Message: opts.Message,
}); err != nil {
return fmt.Errorf("CommitChanges: %v", err)
} else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil {
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
}
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
log.Error(4, "OpenRepository: %v", err)
return nil
}
commit, err := gitRepo.GetBranchCommit(opts.NewBranch)
if err != nil {
log.Error(4, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
return nil
}
// Simulate push event.
pushCommits := &PushCommits{
Len: 1,
Commits: []*PushCommit{CommitToPushCommit(commit)},
}
oldCommitID := opts.LastCommitID
if opts.NewBranch != opts.OldBranch {
oldCommitID = git.EMPTY_SHA
}
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: doer.Name,
RepoOwnerID: repo.MustOwner().ID,
RepoName: repo.Name,
RefFullName: git.BRANCH_PREFIX + opts.NewBranch,
OldCommitID: oldCommitID,
NewCommitID: commit.ID.String(),
Commits: pushCommits,
}); err != nil {
log.Error(4, "CommitRepoAction: %v", err)
return nil
}
return nil
}
// GetDiffPreview produces and returns diff result of a file which is not yet committed.
func (repo *Repository) GetDiffPreview(branch, treePath, content string) (diff *Diff, err error) {
repoWorkingPool.CheckIn(com.ToStr(repo.ID))
defer repoWorkingPool.CheckOut(com.ToStr(repo.ID))
if err = repo.DiscardLocalRepoBranchChanges(branch); err != nil {
return nil, fmt.Errorf("DiscardLocalRepoBranchChanges [branch: %s]: %v", branch, err)
} else if err = repo.UpdateLocalCopyBranch(branch); err != nil {
return nil, fmt.Errorf("UpdateLocalCopyBranch [branch: %s]: %v", branch, err)
}
localPath := repo.LocalCopyPath()
filePath := path.Join(localPath, treePath)
os.MkdirAll(filepath.Dir(filePath), os.ModePerm)
if err = ioutil.WriteFile(filePath, []byte(content), 0666); err != nil {
return nil, fmt.Errorf("WriteFile: %v", err)
}
cmd := exec.Command("git", "diff", treePath)
cmd.Dir = localPath
cmd.Stderr = os.Stderr
stdout, err := cmd.StdoutPipe()
if err != nil {
return nil, fmt.Errorf("StdoutPipe: %v", err)
}
if err = cmd.Start(); err != nil {
return nil, fmt.Errorf("Start: %v", err)
}
pid := process.Add(fmt.Sprintf("GetDiffPreview [repo_path: %s]", repo.RepoPath()), cmd)
defer process.Remove(pid)
diff, err = ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, stdout)
if err != nil {
return nil, fmt.Errorf("ParsePatch: %v", err)
}
if err = cmd.Wait(); err != nil {
return nil, fmt.Errorf("Wait: %v", err)
}
return diff, nil
}
// ________ .__ __ ___________.__.__
// \______ \ ____ | | _____/ |_ ____ \_ _____/|__| | ____
// | | \_/ __ \| | _/ __ \ __\/ __ \ | __) | | | _/ __ \
// | ` \ ___/| |_\ ___/| | \ ___/ | \ | | |_\ ___/
// /_______ /\___ >____/\___ >__| \___ > \___ / |__|____/\___ >
// \/ \/ \/ \/ \/ \/
//
type DeleteRepoFileOptions struct {
LastCommitID string
OldBranch string
NewBranch string
TreePath string
Message string
}
func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (err error) {
repoWorkingPool.CheckIn(com.ToStr(repo.ID))
defer repoWorkingPool.CheckOut(com.ToStr(repo.ID))
if err = repo.DiscardLocalRepoBranchChanges(opts.OldBranch); err != nil {
return fmt.Errorf("DiscardLocalRepoBranchChanges [branch: %s]: %v", opts.OldBranch, err)
} else if err = repo.UpdateLocalCopyBranch(opts.OldBranch); err != nil {
return fmt.Errorf("UpdateLocalCopyBranch [branch: %s]: %v", opts.OldBranch, err)
}
if opts.OldBranch != opts.NewBranch {
if err := repo.CheckoutNewBranch(opts.OldBranch, opts.NewBranch); err != nil {
return fmt.Errorf("CheckoutNewBranch [old_branch: %s, new_branch: %s]: %v", opts.OldBranch, opts.NewBranch, err)
}
}
localPath := repo.LocalCopyPath()
if err = os.Remove(path.Join(localPath, opts.TreePath)); err != nil {
return fmt.Errorf("Remove: %v", err)
}
if err = git.AddChanges(localPath, true); err != nil {
return fmt.Errorf("git add --all: %v", err)
} else if err = git.CommitChanges(localPath, git.CommitChangesOptions{
Committer: doer.NewGitSig(),
Message: opts.Message,
}); err != nil {
return fmt.Errorf("CommitChanges: %v", err)
} else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil {
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
}
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
log.Error(4, "OpenRepository: %v", err)
return nil
}
commit, err := gitRepo.GetBranchCommit(opts.NewBranch)
if err != nil {
log.Error(4, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
return nil
}
// Simulate push event.
pushCommits := &PushCommits{
Len: 1,
Commits: []*PushCommit{CommitToPushCommit(commit)},
}
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: doer.Name,
RepoOwnerID: repo.MustOwner().ID,
RepoName: repo.Name,
RefFullName: git.BRANCH_PREFIX + opts.NewBranch,
OldCommitID: opts.LastCommitID,
NewCommitID: commit.ID.String(),
Commits: pushCommits,
}); err != nil {
log.Error(4, "CommitRepoAction: %v", err)
return nil
}
return nil
}
// ____ ___ .__ .___ ___________.___.__
// | | \______ | | _________ __| _/ \_ _____/| | | ____ ______
// | | /\____ \| | / _ \__ \ / __ | | __) | | | _/ __ \ / ___/
// | | / | |_> > |_( <_> ) __ \_/ /_/ | | \ | | |_\ ___/ \___ \
// |______/ | __/|____/\____(____ /\____ | \___ / |___|____/\___ >____ >
// |__| \/ \/ \/ \/ \/
//
// Upload represent a uploaded file to a repo to be deleted when moved
type Upload struct {
ID int64 `xorm:"pk autoincr"`
UUID string `xorm:"uuid UNIQUE"`
Name string
}
// UploadLocalPath returns where uploads is stored in local file system based on given UUID.
func UploadLocalPath(uuid string) string {
return path.Join(setting.Repository.Upload.TempPath, uuid[0:1], uuid[1:2], uuid)
}
// LocalPath returns where uploads are temporarily stored in local file system.
func (upload *Upload) LocalPath() string {
return UploadLocalPath(upload.UUID)
}
// NewUpload creates a new upload object.
func NewUpload(name string, buf []byte, file multipart.File) (_ *Upload, err error) {
upload := &Upload{
UUID: gouuid.NewV4().String(),
Name: name,
}
localPath := upload.LocalPath()
if err = os.MkdirAll(path.Dir(localPath), os.ModePerm); err != nil {
return nil, fmt.Errorf("MkdirAll: %v", err)
}
fw, err := os.Create(localPath)
if err != nil {
return nil, fmt.Errorf("Create: %v", err)
}
defer fw.Close()
if _, err = fw.Write(buf); err != nil {
return nil, fmt.Errorf("Write: %v", err)
} else if _, err = io.Copy(fw, file); err != nil {
return nil, fmt.Errorf("Copy: %v", err)
}
if _, err := x.Insert(upload); err != nil {
return nil, err
}
return upload, nil
}
func GetUploadByUUID(uuid string) (*Upload, error) {
upload := &Upload{UUID: uuid}
has, err := x.Get(upload)
if err != nil {
return nil, err
} else if !has {
return nil, ErrUploadNotExist{0, uuid}
}
return upload, nil
}
func GetUploadsByUUIDs(uuids []string) ([]*Upload, error) {
if len(uuids) == 0 {
return []*Upload{}, nil
}
// Silently drop invalid uuids.
uploads := make([]*Upload, 0, len(uuids))
return uploads, x.In("uuid", uuids).Find(&uploads)
}
func DeleteUploads(uploads ...*Upload) (err error) {
if len(uploads) == 0 {
return nil
}
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return err
}
ids := make([]int64, len(uploads))
for i := 0; i < len(uploads); i++ {
ids[i] = uploads[i].ID
}
if _, err = sess.In("id", ids).Delete(new(Upload)); err != nil {
return fmt.Errorf("delete uploads: %v", err)
}
for _, upload := range uploads {
localPath := upload.LocalPath()
if !com.IsFile(localPath) {
continue
}
if err := os.Remove(localPath); err != nil {
return fmt.Errorf("remove upload: %v", err)
}
}
return sess.Commit()
}
func DeleteUpload(u *Upload) error {
return DeleteUploads(u)
}
func DeleteUploadByUUID(uuid string) error {
upload, err := GetUploadByUUID(uuid)
if err != nil {
if IsErrUploadNotExist(err) {
return nil
}
return fmt.Errorf("GetUploadByUUID: %v", err)
}
if err := DeleteUpload(upload); err != nil {
return fmt.Errorf("DeleteUpload: %v", err)
}
return nil
}
type UploadRepoFileOptions struct {
LastCommitID string
OldBranch string
NewBranch string
TreePath string
Message string
Files []string // In UUID format.
}
func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions) (err error) {
if len(opts.Files) == 0 {
return nil
}
uploads, err := GetUploadsByUUIDs(opts.Files)
if err != nil {
return fmt.Errorf("GetUploadsByUUIDs [uuids: %v]: %v", opts.Files, err)
}
repoWorkingPool.CheckIn(com.ToStr(repo.ID))
defer repoWorkingPool.CheckOut(com.ToStr(repo.ID))
if err = repo.DiscardLocalRepoBranchChanges(opts.OldBranch); err != nil {
return fmt.Errorf("DiscardLocalRepoBranchChanges [branch: %s]: %v", opts.OldBranch, err)
} else if err = repo.UpdateLocalCopyBranch(opts.OldBranch); err != nil {
return fmt.Errorf("UpdateLocalCopyBranch [branch: %s]: %v", opts.OldBranch, err)
}
if opts.OldBranch != opts.NewBranch {
if err = repo.CheckoutNewBranch(opts.OldBranch, opts.NewBranch); err != nil {
return fmt.Errorf("CheckoutNewBranch [old_branch: %s, new_branch: %s]: %v", opts.OldBranch, opts.NewBranch, err)
}
}
localPath := repo.LocalCopyPath()
dirPath := path.Join(localPath, opts.TreePath)
os.MkdirAll(dirPath, os.ModePerm)
// Copy uploaded files into repository.
for _, upload := range uploads {
tmpPath := upload.LocalPath()
targetPath := path.Join(dirPath, upload.Name)
if !com.IsFile(tmpPath) {
continue
}
if err = com.Copy(tmpPath, targetPath); err != nil {
return fmt.Errorf("Copy: %v", err)
}
}
if err = git.AddChanges(localPath, true); err != nil {
return fmt.Errorf("git add --all: %v", err)
} else if err = git.CommitChanges(localPath, git.CommitChangesOptions{
Committer: doer.NewGitSig(),
Message: opts.Message,
}); err != nil {
return fmt.Errorf("CommitChanges: %v", err)
} else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil {
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
}
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
log.Error(4, "OpenRepository: %v", err)
return nil
}
commit, err := gitRepo.GetBranchCommit(opts.NewBranch)
if err != nil {
log.Error(4, "GetBranchCommit [branch: %s]: %v", opts.NewBranch, err)
return nil
}
// Simulate push event.
pushCommits := &PushCommits{
Len: 1,
Commits: []*PushCommit{CommitToPushCommit(commit)},
}
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: doer.Name,
RepoOwnerID: repo.MustOwner().ID,
RepoName: repo.Name,
RefFullName: git.BRANCH_PREFIX + opts.NewBranch,
OldCommitID: opts.LastCommitID,
NewCommitID: commit.ID.String(),
Commits: pushCommits,
}); err != nil {
log.Error(4, "CommitRepoAction: %v", err)
return nil
}
return DeleteUploads(uploads...)
}

View File

@@ -21,9 +21,9 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
"golang.org/x/crypto/ssh"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/process"
"github.com/gogits/gogs/modules/setting"
)
@@ -84,8 +84,13 @@ func (k *PublicKey) OmitEmail() string {
}
// AuthorizedString returns formatted public key string for authorized_keys file.
func (key *PublicKey) AuthorizedString() string {
return fmt.Sprintf(_TPL_PUBLICK_KEY, setting.AppPath, key.ID, setting.CustomConf, key.Content)
func (k *PublicKey) AuthorizedString() string {
return fmt.Sprintf(_TPL_PUBLICK_KEY, setting.AppPath, k.ID, setting.CustomConf, k.Content)
}
// IsDeployKey returns true if the public key is used as deploy key.
func (k *PublicKey) IsDeployKey() bool {
return k.Type == KEY_TYPE_DEPLOY
}
func extractTypeFromBase64Key(key string) (string, error) {
@@ -104,8 +109,18 @@ func extractTypeFromBase64Key(key string) (string, error) {
// parseKeyString parses any key string in OpenSSH or SSH2 format to clean OpenSSH string (RFC4253).
func parseKeyString(content string) (string, error) {
// Transform all legal line endings to a single "\n".
content = strings.NewReplacer("\r\n", "\n", "\r", "\n").Replace(content)
// Transform all legal line endings to a single "\n"
// Replace all windows full new lines ("\r\n")
content = strings.Replace(content, "\r\n", "\n", -1)
// Replace all windows half new lines ("\r"), if it happen not to match replace above
content = strings.Replace(content, "\r", "\n", -1)
// Replace ending new line as its may cause unwanted behaviour (extra line means not a single line key | OpenSSH key)
content = strings.TrimRight(content, "\n")
// split lines
lines := strings.Split(content, "\n")
var keyType, keyContent, keyComment string
@@ -370,9 +385,10 @@ func addKey(e Engine, key *PublicKey) (err error) {
if err = ioutil.WriteFile(tmpPath, []byte(key.Content), 0644); err != nil {
return err
}
stdout, stderr, err := process.Exec("AddPublicKey", "ssh-keygen", "-lf", tmpPath)
stdout, stderr, err := process.Exec("AddPublicKey", setting.SSH.KeygenPath, "-lf", tmpPath)
if err != nil {
return fmt.Errorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr)
return fmt.Errorf("fail to parse public key: %s - %s", err, stderr)
} else if len(stdout) < 2 {
return errors.New("not enough output for calculating fingerprint: " + stdout)
}
@@ -720,7 +736,7 @@ func DeleteDeployKey(doer *User, id int64) error {
if err != nil {
return fmt.Errorf("GetRepositoryByID: %v", err)
}
yes, err := HasAccess(doer, repo, ACCESS_MODE_ADMIN)
yes, err := HasAccess(doer.ID, repo, ACCESS_MODE_ADMIN)
if err != nil {
return fmt.Errorf("HasAccess: %v", err)
} else if !yes {

View File

@@ -1,7 +1,12 @@
// Copyright 2016 The Gogs 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 models
import (
"fmt"
"strings"
"testing"
. "github.com/smartystreets/goconvey/convey"
@@ -24,7 +29,7 @@ func Test_SSHParsePublicKey(t *testing.T) {
"rsa-2048": {"rsa", 2048, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"},
"ecdsa-256": {"ecdsa", 256, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"},
"ecdsa-384": {"ecdsa", 384, "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"},
"ecdsa-521": {"ecdsa", 521, "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBACGt3UG3EzRwNOI17QR84l6PgiAcvCE7v6aXPj/SC6UWKg4EL8vW9ZBcdYL9wzs4FZXh4MOV8jAzu3KRWNTwb4k2wFNUpGOt7l28MztFFEtH5BDDrtAJSPENPy8pvPLMfnPg5NhvWycqIBzNcHipem5wSJFN5PdpNOC2xMrPWKNqj+ZjQ== nocomment"},
// "ecdsa-521": {"ecdsa", 521, "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBACGt3UG3EzRwNOI17QR84l6PgiAcvCE7v6aXPj/SC6UWKg4EL8vW9ZBcdYL9wzs4FZXh4MOV8jAzu3KRWNTwb4k2wFNUpGOt7l28MztFFEtH5BDDrtAJSPENPy8pvPLMfnPg5NhvWycqIBzNcHipem5wSJFN5PdpNOC2xMrPWKNqj+ZjQ== nocomment"},
}
Convey("Parse public keys in both native and ssh-keygen", t, func() {
@@ -37,7 +42,13 @@ func Test_SSHParsePublicKey(t *testing.T) {
So(lengthN, ShouldEqual, key.length)
keyTypeK, lengthK, errK := SSHKeyGenParsePublicKey(key.content)
So(errK, ShouldBeNil)
if errK != nil {
// Some server just does not support ecdsa format.
if strings.Contains(errK.Error(), "line 1 too long:") {
continue
}
So(errK, ShouldBeNil)
}
So(keyTypeK, ShouldEqual, key.typeName)
So(lengthK, ShouldEqual, key.length)
}

View File

@@ -81,8 +81,11 @@ func UpdateAccessToken(t *AccessToken) error {
return err
}
// DeleteAccessTokenByID deletes access token by given ID.
func DeleteAccessTokenByID(id int64) error {
_, err := x.Id(id).Delete(new(AccessToken))
// DeleteAccessTokenOfUserByID deletes access token by given ID.
func DeleteAccessTokenOfUserByID(userID, id int64) error {
_, err := x.Delete(&AccessToken{
ID: id,
UID: userID,
})
return err
}

View File

@@ -10,41 +10,22 @@ import (
"os/exec"
"strings"
git "github.com/gogits/git-module"
log "gopkg.in/clog.v1"
"github.com/gogits/gogs/modules/log"
git "github.com/gogits/git-module"
)
type UpdateTask struct {
ID int64 `xorm:"pk autoincr"`
UUID string `xorm:"index"`
RefName string
OldCommitID string
NewCommitID string
}
func AddUpdateTask(task *UpdateTask) error {
_, err := x.Insert(task)
return err
}
// GetUpdateTaskByUUID returns update task by given UUID.
func GetUpdateTaskByUUID(uuid string) (*UpdateTask, error) {
task := &UpdateTask{
UUID: uuid,
// CommitToPushCommit transforms a git.Commit to PushCommit type.
func CommitToPushCommit(commit *git.Commit) *PushCommit {
return &PushCommit{
Sha1: commit.ID.String(),
Message: commit.Message(),
AuthorEmail: commit.Author.Email,
AuthorName: commit.Author.Name,
CommitterEmail: commit.Committer.Email,
CommitterName: commit.Committer.Name,
Timestamp: commit.Committer.When,
}
has, err := x.Get(task)
if err != nil {
return nil, err
} else if !has {
return nil, ErrUpdateTaskNotExist{uuid}
}
return task, nil
}
func DeleteUpdateTaskByUUID(uuid string) error {
_, err := x.Delete(&UpdateTask{UUID: uuid})
return err
}
func ListToPushCommits(l *list.List) *PushCommits {
@@ -55,24 +36,15 @@ func ListToPushCommits(l *list.List) *PushCommits {
if actEmail == "" {
actEmail = commit.Committer.Email
}
commits = append(commits,
&PushCommit{
Sha1: commit.ID.String(),
Message: commit.Message(),
AuthorEmail: commit.Author.Email,
AuthorName: commit.Author.Name,
CommitterEmail: commit.Committer.Email,
CommitterName: commit.Committer.Name,
Timestamp: commit.Author.When,
})
commits = append(commits, CommitToPushCommit(commit))
}
return &PushCommits{l.Len(), commits, "", nil}
}
type PushUpdateOptions struct {
RefName string
OldCommitID string
NewCommitID string
RefFullName string
PusherID int64
PusherName string
RepoUserName string
@@ -82,10 +54,10 @@ type PushUpdateOptions struct {
// PushUpdate must be called for any push actions in order to
// generates necessary push action history feeds.
func PushUpdate(opts PushUpdateOptions) (err error) {
isNewRef := strings.HasPrefix(opts.OldCommitID, "0000000")
isDelRef := strings.HasPrefix(opts.NewCommitID, "0000000")
isNewRef := opts.OldCommitID == git.EMPTY_SHA
isDelRef := opts.NewCommitID == git.EMPTY_SHA
if isNewRef && isDelRef {
return fmt.Errorf("Old and new revisions both start with 000000")
return fmt.Errorf("Old and new revisions are both %s", git.EMPTY_SHA)
}
repoPath := RepoPath(opts.RepoUserName, opts.RepoName)
@@ -97,8 +69,8 @@ func PushUpdate(opts PushUpdateOptions) (err error) {
}
if isDelRef {
log.GitLogger.Info("Reference '%s' has been deleted from '%s/%s' by %d",
opts.RefName, opts.RepoUserName, opts.RepoName, opts.PusherName)
log.Trace("Reference '%s' has been deleted from '%s/%s' by %s",
opts.RefFullName, opts.RepoUserName, opts.RepoName, opts.PusherName)
return nil
}
@@ -107,41 +79,30 @@ func PushUpdate(opts PushUpdateOptions) (err error) {
return fmt.Errorf("OpenRepository: %v", err)
}
repoUser, err := GetUserByName(opts.RepoUserName)
owner, err := GetUserByName(opts.RepoUserName)
if err != nil {
return fmt.Errorf("GetUserByName: %v", err)
}
repo, err := GetRepositoryByName(repoUser.ID, opts.RepoName)
repo, err := GetRepositoryByName(owner.ID, opts.RepoName)
if err != nil {
return fmt.Errorf("GetRepositoryByName: %v", err)
}
// Push tags.
if strings.HasPrefix(opts.RefName, "refs/tags/") {
tag, err := gitRepo.GetTag(git.RefEndName(opts.RefName))
if err != nil {
return fmt.Errorf("gitRepo.GetTag: %v", err)
}
// When tagger isn't available, fall back to get committer email.
var actEmail string
if tag.Tagger != nil {
actEmail = tag.Tagger.Email
} else {
cmt, err := tag.Commit()
if err != nil {
return fmt.Errorf("tag.Commit: %v", err)
}
actEmail = cmt.Committer.Email
}
commit := &PushCommits{}
if err = CommitRepoAction(opts.PusherID, repoUser.ID, opts.PusherName, actEmail,
repo.ID, opts.RepoUserName, opts.RepoName, opts.RefName, commit, opts.OldCommitID, opts.NewCommitID); err != nil {
if strings.HasPrefix(opts.RefFullName, git.TAG_PREFIX) {
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: opts.PusherName,
RepoOwnerID: owner.ID,
RepoName: repo.Name,
RefFullName: opts.RefFullName,
OldCommitID: opts.OldCommitID,
NewCommitID: opts.NewCommitID,
Commits: &PushCommits{},
}); err != nil {
return fmt.Errorf("CommitRepoAction (tag): %v", err)
}
return err
return nil
}
newCommit, err := gitRepo.GetCommit(opts.NewCommitID)
@@ -163,9 +124,15 @@ func PushUpdate(opts PushUpdateOptions) (err error) {
}
}
if err = CommitRepoAction(opts.PusherID, repoUser.ID, opts.PusherName, repoUser.Email,
repo.ID, opts.RepoUserName, opts.RepoName, opts.RefName, ListToPushCommits(l),
opts.OldCommitID, opts.NewCommitID); err != nil {
if err := CommitRepoAction(CommitRepoActionOptions{
PusherName: opts.PusherName,
RepoOwnerID: owner.ID,
RepoName: repo.Name,
RefFullName: opts.RefFullName,
OldCommitID: opts.OldCommitID,
NewCommitID: opts.NewCommitID,
Commits: ListToPushCommits(l),
}); err != nil {
return fmt.Errorf("CommitRepoAction (branch): %v", err)
}
return nil

View File

@@ -8,6 +8,7 @@ import (
"bytes"
"container/list"
"crypto/sha256"
"crypto/subtle"
"encoding/hex"
"errors"
"fmt"
@@ -23,12 +24,14 @@ import (
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
"github.com/nfnt/resize"
"golang.org/x/crypto/pbkdf2"
log "gopkg.in/clog.v1"
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/avatar"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/setting"
)
@@ -45,7 +48,6 @@ var (
ErrEmailNotExist = errors.New("E-mail does not exist")
ErrEmailNotActivated = errors.New("E-mail address has not been activated")
ErrUserNameIllegal = errors.New("User name contains illegal characters")
ErrLoginSourceNotExist = errors.New("Login source does not exist")
ErrLoginSourceNotActived = errors.New("Login source is not actived")
ErrUnsupportedLoginType = errors.New("Login source is unknown")
)
@@ -130,6 +132,16 @@ func (u *User) AfterSet(colName string, _ xorm.Cell) {
}
}
func (u *User) APIFormat() *api.User {
return &api.User{
ID: u.ID,
UserName: u.Name,
FullName: u.FullName,
Email: u.Email,
AvatarUrl: u.AvatarLink(),
}
}
// returns true if user login type is LOGIN_PLAIN.
func (u *User) IsLocal() bool {
return u.LoginType <= LOGIN_PLAIN
@@ -158,6 +170,10 @@ func (u *User) CanCreateRepo() bool {
return u.NumRepos < u.MaxRepoCreation
}
func (u *User) CanCreateOrganization() bool {
return !setting.Admin.DisableRegularOrgCreation || u.IsAdmin
}
// CanEditGitHook returns true if user can edit Git hooks.
func (u *User) CanEditGitHook() bool {
return u.IsAdmin || u.AllowGitHook
@@ -165,7 +181,7 @@ func (u *User) CanEditGitHook() bool {
// CanImportLocal returns true if user can migrate repository by local path.
func (u *User) CanImportLocal() bool {
return u.IsAdmin || u.AllowImportLocal
return setting.Repository.EnableLocalPathMigration && (u.IsAdmin || u.AllowImportLocal)
}
// DashboardLink returns the user dashboard page link.
@@ -181,6 +197,10 @@ func (u *User) HomeLink() string {
return setting.AppSubUrl + "/" + u.Name
}
func (u *User) HTMLURL() string {
return setting.AppUrl + u.Name
}
// GenerateEmailActivateCode generates an activate code based on user information and given e-mail.
func (u *User) GenerateEmailActivateCode(email string) string {
code := base.CreateTimeLimitCode(
@@ -261,7 +281,7 @@ func (u *User) RelAvatarLink() string {
func (u *User) AvatarLink() string {
link := u.RelAvatarLink()
if link[0] == '/' && link[1] != '/' {
return setting.AppUrl + link[1:]
return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:]
}
return link
}
@@ -297,7 +317,7 @@ func (u *User) GetFollowing(page int) ([]*User, error) {
// NewGitSig generates and returns the signature of given user.
func (u *User) NewGitSig() *git.Signature {
return &git.Signature{
Name: u.Name,
Name: u.DisplayName(),
Email: u.Email,
When: time.Now(),
}
@@ -305,7 +325,7 @@ func (u *User) NewGitSig() *git.Signature {
// EncodePasswd encodes password to safe format.
func (u *User) EncodePasswd() {
newPasswd := base.PBKDF2([]byte(u.Passwd), []byte(u.Salt), 10000, 50, sha256.New)
newPasswd := pbkdf2.Key([]byte(u.Passwd), []byte(u.Salt), 10000, 50, sha256.New)
u.Passwd = fmt.Sprintf("%x", newPasswd)
}
@@ -313,7 +333,7 @@ func (u *User) EncodePasswd() {
func (u *User) ValidatePassword(passwd string) bool {
newUser := &User{Passwd: passwd, Salt: u.Salt}
newUser.EncodePasswd()
return u.Passwd == newUser.Passwd
return subtle.ConstantTimeCompare([]byte(u.Passwd), []byte(newUser.Passwd)) == 1
}
// UploadAvatar saves custom avatar for user.
@@ -353,7 +373,7 @@ func (u *User) UploadAvatar(data []byte) error {
// DeleteAvatar deletes the user's custom avatar.
func (u *User) DeleteAvatar() error {
log.Trace("DeleteAvatar[%d]: %s", u.ID, u.CustomAvatarPath())
log.Trace("DeleteAvatar [%d]: %s", u.ID, u.CustomAvatarPath())
os.Remove(u.CustomAvatarPath())
u.UseCustomAvatar = false
@@ -365,18 +385,18 @@ func (u *User) DeleteAvatar() error {
// IsAdminOfRepo returns true if user has admin or higher access of repository.
func (u *User) IsAdminOfRepo(repo *Repository) bool {
has, err := HasAccess(u, repo, ACCESS_MODE_ADMIN)
has, err := HasAccess(u.ID, repo, ACCESS_MODE_ADMIN)
if err != nil {
log.Error(3, "HasAccess: %v", err)
log.Error(2, "HasAccess: %v", err)
}
return has
}
// IsWriterOfRepo returns true if user has write access to given repository.
func (u *User) IsWriterOfRepo(repo *Repository) bool {
has, err := HasAccess(u, repo, ACCESS_MODE_WRITE)
has, err := HasAccess(u.ID, repo, ACCESS_MODE_WRITE)
if err != nil {
log.Error(3, "HasAccess: %v", err)
log.Error(2, "HasAccess: %v", err)
}
return has
}
@@ -407,7 +427,12 @@ func (u *User) GetOrganizationCount() (int64, error) {
// GetRepositories returns repositories that user owns, including private repositories.
func (u *User) GetRepositories(page, pageSize int) (err error) {
u.Repos, err = GetUserRepositories(u.ID, true, page, pageSize)
u.Repos, err = GetUserRepositories(&UserRepoOptions{
UserID: u.ID,
Private: true,
Page: page,
PageSize: pageSize,
})
return err
}
@@ -452,6 +477,12 @@ func (u *User) ShortName(length int) string {
return base.EllipsisString(u.Name, length)
}
// IsMailable checks if a user is elegible
// to receive emails.
func (u *User) IsMailable() bool {
return u.IsActive
}
// IsUserExist checks if given user name exist,
// the user name should be noncased unique.
// If uid is presented, then check will rule out that one,
@@ -464,26 +495,26 @@ func IsUserExist(uid int64, name string) (bool, error) {
}
// GetUserSalt returns a ramdom user salt token.
func GetUserSalt() string {
func GetUserSalt() (string, error) {
return base.GetRandomString(10)
}
// NewFakeUser creates and returns a fake user for someone has deleted his/her account.
func NewFakeUser() *User {
// NewGhostUser creates and returns a fake user for someone has deleted his/her account.
func NewGhostUser() *User {
return &User{
ID: -1,
Name: "Someone",
LowerName: "someone",
Name: "Ghost",
LowerName: "ghost",
}
}
var (
reversedUsernames = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."}
reversedUserPatterns = []string{"*.keys"}
reservedUsernames = []string{"assets", "css", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."}
reservedUserPatterns = []string{"*.keys"}
)
// isUsableName checks if name is reserved or pattern of name is not allowed
// based on given reversed names and patterns.
// based on given reserved names and patterns.
// Names are exact match, patterns can be prefix or suffix match with placeholder '*'.
func isUsableName(names, patterns []string, name string) error {
name = strings.TrimSpace(strings.ToLower(name))
@@ -508,7 +539,7 @@ func isUsableName(names, patterns []string, name string) error {
}
func IsUsableUsername(name string) error {
return isUsableName(reversedUsernames, reversedUserPatterns, name)
return isUsableName(reservedUsernames, reservedUserPatterns, name)
}
// CreateUser creates record of a new user.
@@ -535,8 +566,12 @@ func CreateUser(u *User) (err error) {
u.LowerName = strings.ToLower(u.Name)
u.AvatarEmail = u.Email
u.Avatar = base.HashEmail(u.AvatarEmail)
u.Rands = GetUserSalt()
u.Salt = GetUserSalt()
if u.Rands, err = GetUserSalt(); err != nil {
return err
}
if u.Salt, err = GetUserSalt(); err != nil {
return err
}
u.EncodePasswd()
u.MaxRepoCreation = -1
@@ -876,7 +911,7 @@ func GetUserByID(id int64) (*User, error) {
// GetAssigneeByID returns the user with write access of repository by given ID.
func GetAssigneeByID(repo *Repository, userID int64) (*User, error) {
has, err := HasAccess(&User{ID: userID}, repo, ACCESS_MODE_WRITE)
has, err := HasAccess(userID, repo, ACCESS_MODE_READ)
if err != nil {
return nil, err
} else if !has {
@@ -908,7 +943,9 @@ func GetUserEmailsByNames(names []string) []string {
if err != nil {
continue
}
mails = append(mails, u.Email)
if u.IsMailable() {
mails = append(mails, u.Email)
}
}
return mails
}

View File

@@ -58,7 +58,15 @@ func isEmailUsed(e Engine, email string) (bool, error) {
return true, nil
}
return e.Get(&EmailAddress{Email: email})
has, err := e.Get(&EmailAddress{Email: email})
if err != nil {
return false, err
} else if has {
return true, nil
}
// We need to check primary email of users as well.
return e.Where("type=?", USER_TYPE_INDIVIDUAL).And("email=?", email).Get(new(User))
}
// IsEmailUsed returns true if the email has been used.
@@ -111,7 +119,9 @@ func (email *EmailAddress) Activate() error {
if err != nil {
return err
}
user.Rands = GetUserSalt()
if user.Rands, err = GetUserSalt(); err != nil {
return err
}
sess := x.NewSession()
defer sessionRelease(sess)

View File

@@ -5,25 +5,29 @@
package models
import (
"crypto/hmac"
"crypto/sha256"
"crypto/tls"
"encoding/hex"
"encoding/json"
"fmt"
"io/ioutil"
"strings"
"sync"
"time"
"github.com/Unknwon/com"
"github.com/go-xorm/xorm"
gouuid "github.com/satori/go.uuid"
log "gopkg.in/clog.v1"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/httplib"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
)
var HookQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength)
type HookContentType int
const (
@@ -58,8 +62,9 @@ func IsValidHookContentType(name string) bool {
}
type HookEvents struct {
Create bool `json:"create"`
Push bool `json:"push"`
Create bool `json:"create"`
Push bool `json:"push"`
PullRequest bool `json:"pull_request"`
}
// HookEvent represents events that will delivery hook.
@@ -116,7 +121,7 @@ func (w *Webhook) AfterSet(colName string, _ xorm.Cell) {
case "events":
w.HookEvent = &HookEvent{}
if err = json.Unmarshal([]byte(w.Events), w.HookEvent); err != nil {
log.Error(3, "Unmarshal[%d]: %v", w.ID, err)
log.Error(3, "Unmarshal [%d]: %v", w.ID, err)
}
case "created_unix":
w.Created = time.Unix(w.CreatedUnix, 0).Local()
@@ -128,7 +133,7 @@ func (w *Webhook) AfterSet(colName string, _ xorm.Cell) {
func (w *Webhook) GetSlackHook() *SlackMeta {
s := &SlackMeta{}
if err := json.Unmarshal([]byte(w.Meta), s); err != nil {
log.Error(4, "webhook.GetSlackHook(%d): %v", w.ID, err)
log.Error(2, "GetSlackHook [%d]: %v", w.ID, err)
}
return s
}
@@ -157,14 +162,23 @@ func (w *Webhook) HasPushEvent() bool {
(w.ChooseEvents && w.HookEvents.Push)
}
// HasPullRequestEvent returns true if hook enabled pull request event.
func (w *Webhook) HasPullRequestEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.PullRequest)
}
func (w *Webhook) EventsArray() []string {
events := make([]string, 0, 2)
events := make([]string, 0, 3)
if w.HasCreateEvent() {
events = append(events, "create")
}
if w.HasPushEvent() {
events = append(events, "push")
}
if w.HasPullRequestEvent() {
events = append(events, "pull_request")
}
return events
}
@@ -186,8 +200,17 @@ func getWebhook(bean *Webhook) (*Webhook, error) {
return bean, nil
}
// GetWebhookByRepoID returns webhook of repository by given ID.
func GetWebhookByRepoID(repoID, id int64) (*Webhook, error) {
// GetWebhookByID returns webhook by given ID.
// Use this function with caution of accessing unauthorized webhook,
// which means should only be used in non-user interactive functions.
func GetWebhookByID(id int64) (*Webhook, error) {
return getWebhook(&Webhook{
ID: id,
})
}
// GetWebhookOfRepoByID returns webhook of repository by given ID.
func GetWebhookOfRepoByID(repoID, id int64) (*Webhook, error) {
return getWebhook(&Webhook{
ID: id,
RepoID: repoID,
@@ -203,15 +226,15 @@ func GetWebhookByOrgID(orgID, id int64) (*Webhook, error) {
}
// GetActiveWebhooksByRepoID returns all active webhooks of repository.
func GetActiveWebhooksByRepoID(repoID int64) (ws []*Webhook, err error) {
err = x.Where("repo_id=?", repoID).And("is_active=?", true).Find(&ws)
return ws, err
func GetActiveWebhooksByRepoID(repoID int64) ([]*Webhook, error) {
webhooks := make([]*Webhook, 0, 5)
return webhooks, x.Where("repo_id = ?", repoID).And("is_active = ?", true).Find(&webhooks)
}
// GetWebhooksByRepoID returns all webhooks of repository.
func GetWebhooksByRepoID(repoID int64) (ws []*Webhook, err error) {
err = x.Find(&ws, &Webhook{RepoID: repoID})
return ws, err
// GetWebhooksByRepoID returns all webhooks of a repository.
func GetWebhooksByRepoID(repoID int64) ([]*Webhook, error) {
webhooks := make([]*Webhook, 0, 5)
return webhooks, x.Find(&webhooks, &Webhook{RepoID: repoID})
}
// UpdateWebhook updates information of webhook.
@@ -238,16 +261,16 @@ func deleteWebhook(bean *Webhook) (err error) {
return sess.Commit()
}
// DeleteWebhookByRepoID deletes webhook of repository by given ID.
func DeleteWebhookByRepoID(repoID, id int64) error {
// DeleteWebhookOfRepoByID deletes webhook of repository by given ID.
func DeleteWebhookOfRepoByID(repoID, id int64) error {
return deleteWebhook(&Webhook{
ID: id,
RepoID: repoID,
})
}
// DeleteWebhookByOrgID deletes webhook of organization by given ID.
func DeleteWebhookByOrgID(orgID, id int64) error {
// DeleteWebhookOfOrgByID deletes webhook of organization by given ID.
func DeleteWebhookOfOrgByID(orgID, id int64) error {
return deleteWebhook(&Webhook{
ID: id,
OrgID: orgID,
@@ -278,11 +301,13 @@ type HookTaskType int
const (
GOGS HookTaskType = iota + 1
SLACK
DISCORD
)
var hookTaskTypes = map[string]HookTaskType{
"gogs": GOGS,
"slack": SLACK,
"gogs": GOGS,
"slack": SLACK,
"discord": DISCORD,
}
// ToHookTaskType returns HookTaskType by given name.
@@ -296,6 +321,8 @@ func (t HookTaskType) Name() string {
return "gogs"
case SLACK:
return "slack"
case DISCORD:
return "discord"
}
return ""
}
@@ -309,8 +336,9 @@ func IsValidHookTaskType(name string) bool {
type HookEventType string
const (
HOOK_EVENT_CREATE HookEventType = "create"
HOOK_EVENT_PUSH HookEventType = "push"
HOOK_EVENT_CREATE HookEventType = "create"
HOOK_EVENT_PUSH HookEventType = "push"
HOOK_EVENT_PULL_REQUEST HookEventType = "pull_request"
)
// HookRequest represents hook task request information.
@@ -333,6 +361,7 @@ type HookTask struct {
UUID string
Type HookTaskType
URL string `xorm:"TEXT"`
Signature string `xorm:"TEXT"`
api.Payloader `xorm:"-"`
PayloadContent string `xorm:"TEXT"`
ContentType HookContentType
@@ -420,33 +449,14 @@ func UpdateHookTask(t *HookTask) error {
return err
}
// PrepareWebhooks adds new webhooks to task queue for given payload.
func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) error {
if err := repo.GetOwner(); err != nil {
return fmt.Errorf("GetOwner: %v", err)
}
ws, err := GetActiveWebhooksByRepoID(repo.ID)
if err != nil {
return fmt.Errorf("GetActiveWebhooksByRepoID: %v", err)
}
// check if repo belongs to org and append additional webhooks
if repo.Owner.IsOrganization() {
// get hooks for org
orgws, err := GetActiveWebhooksByOrgID(repo.OwnerID)
if err != nil {
return fmt.Errorf("GetActiveWebhooksByOrgID: %v", err)
}
ws = append(ws, orgws...)
}
if len(ws) == 0 {
// prepareWebhooks adds list of webhooks to task queue.
func prepareWebhooks(repo *Repository, event HookEventType, p api.Payloader, webhooks []*Webhook) (err error) {
if len(webhooks) == 0 {
return nil
}
var payloader api.Payloader
for _, w := range ws {
for _, w := range webhooks {
switch event {
case HOOK_EVENT_CREATE:
if !w.HasCreateEvent() {
@@ -456,6 +466,10 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
if !w.HasPushEvent() {
continue
}
case HOOK_EVENT_PULL_REQUEST:
if !w.HasPullRequestEvent() {
continue
}
}
// Use separate objects so modifcations won't be made on payload on non-Gogs type hooks.
@@ -465,19 +479,35 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
if err != nil {
return fmt.Errorf("GetSlackPayload: %v", err)
}
case DISCORD:
payloader, err = GetDiscordPayload(p, event, w.Meta)
if err != nil {
return fmt.Errorf("GetDiscordPayload: %v", err)
}
default:
p.SetSecret(w.Secret)
payloader = p
}
var signature string
if len(w.Secret) > 0 {
data, err := payloader.JSONPayload()
if err != nil {
log.Error(2, "prepareWebhooks.JSONPayload: %v", err)
}
sig := hmac.New(sha256.New, []byte(w.Secret))
sig.Write(data)
signature = hex.EncodeToString(sig.Sum(nil))
}
if err = CreateHookTask(&HookTask{
RepoID: repo.ID,
HookID: w.ID,
Type: w.HookTaskType,
URL: w.URL,
Signature: signature,
Payloader: payloader,
ContentType: w.ContentType,
EventType: HOOK_EVENT_PUSH,
EventType: event,
IsSSL: w.IsSSL,
}); err != nil {
return fmt.Errorf("CreateHookTask: %v", err)
@@ -486,70 +516,41 @@ func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) err
return nil
}
// UniqueQueue represents a queue that guarantees only one instance of same ID is in the line.
type UniqueQueue struct {
lock sync.Mutex
ids map[string]bool
queue chan string
}
func (q *UniqueQueue) Queue() <-chan string {
return q.queue
}
func NewUniqueQueue(queueLength int) *UniqueQueue {
if queueLength <= 0 {
queueLength = 100
// PrepareWebhooks adds all active webhooks to task queue.
func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) error {
webhooks, err := GetActiveWebhooksByRepoID(repo.ID)
if err != nil {
return fmt.Errorf("GetActiveWebhooksByRepoID [%d]: %v", repo.ID, err)
}
return &UniqueQueue{
ids: make(map[string]bool),
queue: make(chan string, queueLength),
// check if repo belongs to org and append additional webhooks
if repo.MustOwner().IsOrganization() {
// get hooks for org
orgws, err := GetActiveWebhooksByOrgID(repo.OwnerID)
if err != nil {
return fmt.Errorf("GetActiveWebhooksByOrgID [%d]: %v", repo.OwnerID, err)
}
webhooks = append(webhooks, orgws...)
}
return prepareWebhooks(repo, event, p, webhooks)
}
func (q *UniqueQueue) Remove(id interface{}) {
q.lock.Lock()
defer q.lock.Unlock()
delete(q.ids, com.ToStr(id))
}
func (q *UniqueQueue) AddFunc(id interface{}, fn func()) {
newid := com.ToStr(id)
if q.Exist(id) {
return
// TestWebhook adds the test webhook matches the ID to task queue.
func TestWebhook(repo *Repository, event HookEventType, p api.Payloader, webhookID int64) error {
webhook, err := GetWebhookOfRepoByID(repo.ID, webhookID)
if err != nil {
return fmt.Errorf("GetWebhookOfRepoByID [repo_id: %d, id: %d]: %v", repo.ID, webhookID, err)
}
q.lock.Lock()
q.ids[newid] = true
if fn != nil {
fn()
}
q.lock.Unlock()
q.queue <- newid
return prepareWebhooks(repo, event, p, []*Webhook{webhook})
}
func (q *UniqueQueue) Add(id interface{}) {
q.AddFunc(id, nil)
}
func (q *UniqueQueue) Exist(id interface{}) bool {
q.lock.Lock()
defer q.lock.Unlock()
return q.ids[com.ToStr(id)]
}
var HookQueue = NewUniqueQueue(setting.Webhook.QueueLength)
func (t *HookTask) deliver() {
t.IsDelivered = true
timeout := time.Duration(setting.Webhook.DeliverTimeout) * time.Second
req := httplib.Post(t.URL).SetTimeout(timeout, timeout).
Header("X-Gogs-Delivery", t.UUID).
Header("X-Gogs-Signature", t.Signature).
Header("X-Gogs-Event", string(t.EventType)).
SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify})
@@ -581,9 +582,9 @@ func (t *HookTask) deliver() {
}
// Update webhook last delivery status.
w, err := GetWebhookByRepoID(t.RepoID, t.HookID)
w, err := GetWebhookByID(t.HookID)
if err != nil {
log.Error(5, "GetWebhookByID: %v", err)
log.Error(3, "GetWebhookByID: %v", err)
return
}
if t.IsSucceed {
@@ -592,7 +593,7 @@ func (t *HookTask) deliver() {
w.LastStatus = HOOK_STATUS_FAILED
}
if err = UpdateWebhook(w); err != nil {
log.Error(5, "UpdateWebhook: %v", err)
log.Error(3, "UpdateWebhook: %v", err)
return
}
}()
@@ -640,12 +641,12 @@ func DeliverHooks() {
// Start listening on new hook requests.
for repoID := range HookQueue.Queue() {
log.Trace("DeliverHooks [%v]: processing delivery hooks", repoID)
log.Trace("DeliverHooks [repo_id: %v]", repoID)
HookQueue.Remove(repoID)
tasks = make([]*HookTask, 0, 5)
if err := x.Where("repo_id=? AND is_delivered=?", repoID, false).Find(&tasks); err != nil {
log.Error(4, "Get repository [%d] hook tasks: %v", repoID, err)
log.Error(4, "Get repository [%s] hook tasks: %v", repoID, err)
continue
}
for _, t := range tasks {

227
models/webhook_discord.go Normal file
View File

@@ -0,0 +1,227 @@
// Copyright 2017 The Gogs 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 models
import (
"encoding/json"
"fmt"
"strconv"
"strings"
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/setting"
)
type DiscordEmbedFooterObject struct {
Text string `json:"text"`
}
type DiscordEmbedAuthorObject struct {
Name string `json:"name"`
URL string `json:"url"`
IconURL string `json:"icon_url"`
}
type DiscordEmbedFieldObject struct {
Name string `json:"name"`
Value string `json:"value"`
}
type DiscordEmbedObject struct {
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Color int `json:"color"`
Footer *DiscordEmbedFooterObject `json:"footer"`
Author *DiscordEmbedAuthorObject `json:"author"`
Fields []*DiscordEmbedFieldObject `json:"fields"`
}
type DiscordPayload struct {
Content string `json:"content"`
Username string `json:"username"`
AvatarURL string `json:"avatar_url"`
Embeds []*DiscordEmbedObject `json:"embeds"`
}
func (p *DiscordPayload) JSONPayload() ([]byte, error) {
data, err := json.MarshalIndent(p, "", " ")
if err != nil {
return []byte{}, err
}
return data, nil
}
func DiscordTextFormatter(s string) string {
return strings.Split(s, "\n")[0]
}
func DiscordLinkFormatter(url string, text string) string {
return fmt.Sprintf("[%s](%s)", text, url)
}
func DiscordSHALinkFormatter(url string, text string) string {
return fmt.Sprintf("[`%s`](%s)", text, url)
}
func getDiscordCreatePayload(p *api.CreatePayload, slack *SlackMeta) (*DiscordPayload, error) {
// Created tag/branch
refName := git.RefEndName(p.Ref)
repoLink := DiscordLinkFormatter(p.Repo.HTMLURL, p.Repo.Name)
refLink := DiscordLinkFormatter(p.Repo.HTMLURL+"/src/"+refName, refName)
content := fmt.Sprintf("Created new %s: %s/%s", p.RefType, repoLink, refLink)
color, _ := strconv.ParseInt(strings.TrimLeft(slack.Color, "#"), 16, 32)
return &DiscordPayload{
Username: slack.Username,
AvatarURL: slack.IconURL,
Embeds: []*DiscordEmbedObject{{
Description: content,
URL: setting.AppUrl + p.Sender.UserName,
Color: int(color),
Author: &DiscordEmbedAuthorObject{
Name: p.Sender.UserName,
IconURL: p.Sender.AvatarUrl,
},
}},
}, nil
}
func getDiscordPushPayload(p *api.PushPayload, slack *SlackMeta) (*DiscordPayload, error) {
// n new commits
var (
branchName = git.RefEndName(p.Ref)
commitDesc string
commitString string
)
if len(p.Commits) == 1 {
commitDesc = "1 new commit"
} else {
commitDesc = fmt.Sprintf("%d new commits", len(p.Commits))
}
if len(p.CompareURL) > 0 {
commitString = DiscordLinkFormatter(p.CompareURL, commitDesc)
} else {
commitString = commitDesc
}
repoLink := DiscordLinkFormatter(p.Repo.HTMLURL, p.Repo.Name)
branchLink := DiscordLinkFormatter(p.Repo.HTMLURL+"/src/"+branchName, branchName)
content := fmt.Sprintf("Pushed %s to %s/%s\n", commitString, repoLink, branchLink)
// for each commit, generate attachment text
for i, commit := range p.Commits {
content += fmt.Sprintf("%s %s - %s", DiscordSHALinkFormatter(commit.URL, commit.ID[:7]), DiscordTextFormatter(commit.Message), commit.Author.Name)
// add linebreak to each commit but the last
if i < len(p.Commits)-1 {
content += "\n"
}
}
color, _ := strconv.ParseInt(strings.TrimLeft(slack.Color, "#"), 16, 32)
return &DiscordPayload{
Username: slack.Username,
AvatarURL: slack.IconURL,
Embeds: []*DiscordEmbedObject{{
Description: content,
URL: setting.AppUrl + p.Sender.UserName,
Color: int(color),
Author: &DiscordEmbedAuthorObject{
Name: p.Sender.UserName,
IconURL: p.Sender.AvatarUrl,
},
}},
}, nil
}
func getDiscordPullRequestPayload(p *api.PullRequestPayload, slack *SlackMeta) (*DiscordPayload, error) {
title := fmt.Sprintf("#%d %s", p.Index, p.PullRequest.Title)
url := fmt.Sprintf("%s/pulls/%d", p.Repository.HTMLURL, p.Index)
content := ""
fields := make([]*DiscordEmbedFieldObject, 0, 1)
switch p.Action {
case api.HOOK_ISSUE_OPENED:
title = "New pull request: " + title
content = p.PullRequest.Body
case api.HOOK_ISSUE_CLOSED:
if p.PullRequest.HasMerged {
title = "Pull request merged: " + title
} else {
title = "Pull request closed: " + title
}
case api.HOOK_ISSUE_REOPENED:
title = "Pull request re-opened: " + title
case api.HOOK_ISSUE_EDITED:
title = "Pull request edited: " + title
content = p.PullRequest.Body
case api.HOOK_ISSUE_ASSIGNED:
title = "Pull request assigned: " + title
fields = []*DiscordEmbedFieldObject{{
Name: "New Assignee",
Value: p.PullRequest.Assignee.UserName,
}}
case api.HOOK_ISSUE_UNASSIGNED:
title = "Pull request unassigned: " + title
case api.HOOK_ISSUE_LABEL_UPDATED:
title = "Pull request labels updated: " + title
labels := make([]string, len(p.PullRequest.Labels))
for i := range p.PullRequest.Labels {
labels[i] = p.PullRequest.Labels[i].Name
}
fields = []*DiscordEmbedFieldObject{{
Name: "Labels",
Value: strings.Join(labels, ", "),
}}
case api.HOOK_ISSUE_LABEL_CLEARED:
title = "Pull request labels cleared: " + title
case api.HOOK_ISSUE_SYNCHRONIZED:
title = "Pull request synchronized: " + title
}
color, _ := strconv.ParseInt(strings.TrimLeft(slack.Color, "#"), 16, 32)
return &DiscordPayload{
Username: slack.Username,
AvatarURL: slack.IconURL,
Embeds: []*DiscordEmbedObject{{
Title: title,
Description: content,
URL: url,
Color: int(color),
Footer: &DiscordEmbedFooterObject{
Text: p.Repository.FullName,
},
Author: &DiscordEmbedAuthorObject{
Name: p.Sender.UserName,
IconURL: p.Sender.AvatarUrl,
},
Fields: fields,
}},
}, nil
}
func GetDiscordPayload(p api.Payloader, event HookEventType, meta string) (*DiscordPayload, error) {
d := new(DiscordPayload)
slack := &SlackMeta{}
if err := json.Unmarshal([]byte(meta), &slack); err != nil {
return d, fmt.Errorf("GetDiscordPayload meta json: %v", err)
}
switch event {
case HOOK_EVENT_CREATE:
return getDiscordCreatePayload(p.(*api.CreatePayload), slack)
case HOOK_EVENT_PUSH:
return getDiscordPushPayload(p.(*api.PushPayload), slack)
case HOOK_EVENT_PULL_REQUEST:
return getDiscordPullRequestPayload(p.(*api.PullRequestPayload), slack)
}
return d, nil
}

View File

@@ -6,12 +6,13 @@ package models
import (
"encoding/json"
"errors"
"fmt"
"strings"
"github.com/gogits/git-module"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/modules/setting"
)
type SlackMeta struct {
@@ -21,23 +22,22 @@ type SlackMeta struct {
Color string `json:"color"`
}
type SlackPayload struct {
Channel string `json:"channel"`
Text string `json:"text"`
Username string `json:"username"`
IconURL string `json:"icon_url"`
UnfurlLinks int `json:"unfurl_links"`
LinkNames int `json:"link_names"`
Attachments []SlackAttachment `json:"attachments"`
}
type SlackAttachment struct {
Fallback string `json:"fallback"`
Color string `json:"color"`
Title string `json:"title"`
Text string `json:"text"`
}
func (p *SlackPayload) SetSecret(_ string) {}
type SlackPayload struct {
Channel string `json:"channel"`
Text string `json:"text"`
Username string `json:"username"`
IconURL string `json:"icon_url"`
UnfurlLinks int `json:"unfurl_links"`
LinkNames int `json:"link_names"`
Attachments []*SlackAttachment `json:"attachments"`
}
func (p *SlackPayload) JSONPayload() ([]byte, error) {
data, err := json.MarshalIndent(p, "", " ")
@@ -49,13 +49,20 @@ func (p *SlackPayload) JSONPayload() ([]byte, error) {
// see: https://api.slack.com/docs/formatting
func SlackTextFormatter(s string) string {
// take only first line of commit
first := strings.Split(s, "\n")[0]
// replace & < >
first = strings.Replace(first, "&", "&amp;", -1)
first = strings.Replace(first, "<", "&lt;", -1)
first = strings.Replace(first, ">", "&gt;", -1)
return first
s = strings.Replace(s, "&", "&amp;", -1)
s = strings.Replace(s, "<", "&lt;", -1)
s = strings.Replace(s, ">", "&gt;", -1)
return s
}
func SlackShortTextFormatter(s string) string {
s = strings.Split(s, "\n")[0]
// replace & < >
s = strings.Replace(s, "&", "&amp;", -1)
s = strings.Replace(s, "<", "&lt;", -1)
s = strings.Replace(s, ">", "&gt;", -1)
return s
}
func SlackLinkFormatter(url string, text string) string {
@@ -63,11 +70,11 @@ func SlackLinkFormatter(url string, text string) string {
}
func getSlackCreatePayload(p *api.CreatePayload, slack *SlackMeta) (*SlackPayload, error) {
// created tag/branch
// Created tag/branch
refName := git.RefEndName(p.Ref)
repoLink := SlackLinkFormatter(p.Repo.URL, p.Repo.Name)
refLink := SlackLinkFormatter(p.Repo.URL+"/src/"+refName, refName)
repoLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.Name)
refLink := SlackLinkFormatter(p.Repo.HTMLURL+"/src/"+refName, refName)
text := fmt.Sprintf("[%s:%s] %s created by %s", repoLink, refLink, p.RefType, p.Sender.UserName)
return &SlackPayload{
@@ -91,37 +98,83 @@ func getSlackPushPayload(p *api.PushPayload, slack *SlackMeta) (*SlackPayload, e
} else {
commitDesc = fmt.Sprintf("%d new commits", len(p.Commits))
}
if len(p.CompareUrl) > 0 {
commitString = SlackLinkFormatter(p.CompareUrl, commitDesc)
if len(p.CompareURL) > 0 {
commitString = SlackLinkFormatter(p.CompareURL, commitDesc)
} else {
commitString = commitDesc
}
repoLink := SlackLinkFormatter(p.Repo.URL, p.Repo.Name)
branchLink := SlackLinkFormatter(p.Repo.URL+"/src/"+branchName, branchName)
text := fmt.Sprintf("[%s:%s] %s pushed by %s", repoLink, branchLink, commitString, p.Pusher.Name)
repoLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.Name)
branchLink := SlackLinkFormatter(p.Repo.HTMLURL+"/src/"+branchName, branchName)
text := fmt.Sprintf("[%s:%s] %s pushed by %s", repoLink, branchLink, commitString, p.Pusher.UserName)
var attachmentText string
// for each commit, generate attachment text
for i, commit := range p.Commits {
attachmentText += fmt.Sprintf("%s: %s - %s", SlackLinkFormatter(commit.URL, commit.ID[:7]), SlackTextFormatter(commit.Message), SlackTextFormatter(commit.Author.Name))
attachmentText += fmt.Sprintf("%s: %s - %s", SlackLinkFormatter(commit.URL, commit.ID[:7]), SlackShortTextFormatter(commit.Message), SlackTextFormatter(commit.Author.Name))
// add linebreak to each commit but the last
if i < len(p.Commits)-1 {
attachmentText += "\n"
}
}
slackAttachments := []SlackAttachment{{
Color: slack.Color,
Text: attachmentText,
}}
return &SlackPayload{
Channel: slack.Channel,
Text: text,
Username: slack.Username,
IconURL: slack.IconURL,
Attachments: []*SlackAttachment{{
Color: slack.Color,
Text: attachmentText,
}},
}, nil
}
func getSlackPullRequestPayload(p *api.PullRequestPayload, slack *SlackMeta) (*SlackPayload, error) {
senderLink := SlackLinkFormatter(setting.AppUrl+p.Sender.UserName, p.Sender.UserName)
titleLink := SlackLinkFormatter(fmt.Sprintf("%s/pulls/%d", p.Repository.HTMLURL, p.Index),
fmt.Sprintf("#%d %s", p.Index, p.PullRequest.Title))
var text, title, attachmentText string
switch p.Action {
case api.HOOK_ISSUE_OPENED:
text = fmt.Sprintf("[%s] Pull request submitted by %s", p.Repository.FullName, senderLink)
title = titleLink
attachmentText = SlackTextFormatter(p.PullRequest.Body)
case api.HOOK_ISSUE_CLOSED:
if p.PullRequest.HasMerged {
text = fmt.Sprintf("[%s] Pull request merged: %s by %s", p.Repository.FullName, titleLink, senderLink)
} else {
text = fmt.Sprintf("[%s] Pull request closed: %s by %s", p.Repository.FullName, titleLink, senderLink)
}
case api.HOOK_ISSUE_REOPENED:
text = fmt.Sprintf("[%s] Pull request re-opened: %s by %s", p.Repository.FullName, titleLink, senderLink)
case api.HOOK_ISSUE_EDITED:
text = fmt.Sprintf("[%s] Pull request edited: %s by %s", p.Repository.FullName, titleLink, senderLink)
attachmentText = SlackTextFormatter(p.PullRequest.Body)
case api.HOOK_ISSUE_ASSIGNED:
text = fmt.Sprintf("[%s] Pull request assigned to %s: %s by %s", p.Repository.FullName,
SlackLinkFormatter(setting.AppUrl+p.PullRequest.Assignee.UserName, p.PullRequest.Assignee.UserName),
titleLink, senderLink)
case api.HOOK_ISSUE_UNASSIGNED:
text = fmt.Sprintf("[%s] Pull request unassigned: %s by %s", p.Repository.FullName, titleLink, senderLink)
case api.HOOK_ISSUE_LABEL_UPDATED:
text = fmt.Sprintf("[%s] Pull request labels updated: %s by %s", p.Repository.FullName, titleLink, senderLink)
case api.HOOK_ISSUE_LABEL_CLEARED:
text = fmt.Sprintf("[%s] Pull request labels cleared: %s by %s", p.Repository.FullName, titleLink, senderLink)
case api.HOOK_ISSUE_SYNCHRONIZED:
text = fmt.Sprintf("[%s] Pull request synchronized: %s by %s", p.Repository.FullName, titleLink, senderLink)
}
return &SlackPayload{
Channel: slack.Channel,
Text: text,
Username: slack.Username,
IconURL: slack.IconURL,
Attachments: slackAttachments,
Channel: slack.Channel,
Text: text,
Username: slack.Username,
IconURL: slack.IconURL,
Attachments: []*SlackAttachment{{
Color: slack.Color,
Title: title,
Text: attachmentText,
}},
}, nil
}
@@ -130,7 +183,7 @@ func GetSlackPayload(p api.Payloader, event HookEventType, meta string) (*SlackP
slack := &SlackMeta{}
if err := json.Unmarshal([]byte(meta), &slack); err != nil {
return s, errors.New("GetSlackPayload meta json:" + err.Error())
return s, fmt.Errorf("GetSlackPayload meta json: %v", err)
}
switch event {
@@ -138,6 +191,8 @@ func GetSlackPayload(p api.Payloader, event HookEventType, meta string) (*SlackP
return getSlackCreatePayload(p.(*api.CreatePayload), slack)
case HOOK_EVENT_PUSH:
return getSlackPushPayload(p.(*api.PushPayload), slack)
case HOOK_EVENT_PULL_REQUEST:
return getSlackPullRequestPayload(p.(*api.PullRequestPayload), slack)
}
return s, nil

View File

@@ -12,68 +12,27 @@ import (
"path"
"path/filepath"
"strings"
"sync"
"github.com/Unknwon/com"
"github.com/gogits/git-module"
"github.com/gogits/gogs/modules/setting"
"github.com/gogits/gogs/modules/sync"
)
// workingPool represents a pool of working status which makes sure
// that only one instance of same task is performing at a time.
// However, different type of tasks can performing at the same time.
type workingPool struct {
lock sync.Mutex
pool map[string]*sync.Mutex
count map[string]int
}
// CheckIn checks in a task and waits if others are running.
func (p *workingPool) CheckIn(name string) {
p.lock.Lock()
lock, has := p.pool[name]
if !has {
lock = &sync.Mutex{}
p.pool[name] = lock
}
p.count[name]++
p.lock.Unlock()
lock.Lock()
}
// CheckOut checks out a task to let other tasks run.
func (p *workingPool) CheckOut(name string) {
p.lock.Lock()
defer p.lock.Unlock()
p.pool[name].Unlock()
if p.count[name] == 1 {
delete(p.pool, name)
delete(p.count, name)
} else {
p.count[name]--
}
}
var wikiWorkingPool = &workingPool{
pool: make(map[string]*sync.Mutex),
count: make(map[string]int),
}
var wikiWorkingPool = sync.NewExclusivePool()
// ToWikiPageURL formats a string to corresponding wiki URL name.
func ToWikiPageURL(name string) string {
return url.QueryEscape(strings.Replace(name, " ", "-", -1))
return url.QueryEscape(name)
}
// ToWikiPageName formats a URL back to corresponding wiki page name,
// and removes leading characters './' to prevent changing files
// that are not belong to wiki repository.
func ToWikiPageName(urlString string) string {
name, _ := url.QueryUnescape(strings.Replace(urlString, "-", " ", -1))
name, _ := url.QueryUnescape(urlString)
return strings.Replace(strings.TrimLeft(name, "./"), "/", " ", -1)
}
@@ -105,6 +64,8 @@ func (repo *Repository) InitWiki() error {
if err := git.InitRepository(repo.WikiPath(), true); err != nil {
return fmt.Errorf("InitRepository: %v", err)
} else if err = createDelegateHooks(repo.WikiPath()); err != nil {
return fmt.Errorf("createDelegateHooks: %v", err)
}
return nil
}
@@ -115,24 +76,11 @@ func (repo *Repository) LocalWikiPath() string {
// UpdateLocalWiki makes sure the local copy of repository wiki is up-to-date.
func (repo *Repository) UpdateLocalWiki() error {
return updateLocalCopy(repo.WikiPath(), repo.LocalWikiPath())
return UpdateLocalCopyBranch(repo.WikiPath(), repo.LocalWikiPath(), "master", true)
}
// discardLocalWikiChanges discards local commits make sure
// it is even to remote branch when local copy exists.
func discardLocalWikiChanges(localPath string) error {
if !com.IsExist(localPath) {
return nil
}
// No need to check if nothing in the repository.
if !git.IsBranchExist(localPath, "master") {
return nil
}
if err := git.ResetHEAD(localPath, true, "origin/master"); err != nil {
return fmt.Errorf("ResetHEAD: %v", err)
}
return nil
return discardLocalRepoBranchChanges(localPath, "master")
}
// updateWikiPage adds new page to repository wiki.
@@ -179,7 +127,10 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes
}
if err = git.AddChanges(localPath, true); err != nil {
return fmt.Errorf("AddChanges: %v", err)
} else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil {
} else if err = git.CommitChanges(localPath, git.CommitChangesOptions{
Committer: doer.NewGitSig(),
Message: message,
}); err != nil {
return fmt.Errorf("CommitChanges: %v", err)
} else if err = git.Push(localPath, "origin", "master"); err != nil {
return fmt.Errorf("Push: %v", err)
@@ -215,7 +166,10 @@ func (repo *Repository) DeleteWikiPage(doer *User, title string) (err error) {
if err = git.AddChanges(localPath, true); err != nil {
return fmt.Errorf("AddChanges: %v", err)
} else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil {
} else if err = git.CommitChanges(localPath, git.CommitChangesOptions{
Committer: doer.NewGitSig(),
Message: message,
}); err != nil {
return fmt.Errorf("CommitChanges: %v", err)
} else if err = git.Push(localPath, "origin", "master"); err != nil {
return fmt.Errorf("Push: %v", err)

Some files were not shown because too many files have changed in this diff Show More