Compare commits

...

54 Commits

Author SHA1 Message Date
Unknwon
f43d21d0af locale: sync from Crowdin 2018-12-11 22:17:09 -05:00
Unknwon
8e2c3b315b models: remove legacy support 2018-12-11 22:00:01 -05:00
Nikita
9079fb6a0d pkg/markup: support data URL of base64 encoded images (#5391) 2018-12-10 23:53:08 -05:00
Unknwon
db3f0048d8 templates: rename template function Str2html -> Str2HTML 2018-12-10 22:23:56 -05:00
Unknwon
d3d8284985 templates: sanitize special links in commit message (#5545)
Reported by @cezar97.
2018-12-10 22:21:42 -05:00
Unknwon
f545faa06d templates: make state changing routes to POST method (#5541)
- pkg/context: add ParamsUser to unify the injection process
2018-12-06 22:58:02 -05:00
Unknwon
458aadbb10 vendor: update github.com/go-macaron/session 2018-12-04 19:36:05 -05:00
Unknwon
f2ec0d80a8 user/auth: flush and destroy session at logout (#5540)
Reported by @cezar97.
2018-12-04 19:35:44 -05:00
Unknwon
be6bb5314e ci: update appveyor.yml 2018-12-03 20:00:28 -05:00
Unknwon
98114944fc vendor: update github.com/gogs/go-gogs-client
Bring fixes for #5538
2018-12-03 14:45:19 -05:00
Unknwon
6690023555 pkg/context: use host address and apply insecure flag for go-get=1 when needed (#5305) 2018-12-03 13:36:11 -05:00
Unknwon
a7e8187a0d pkg/context: expose port in import path for 'go-get=1' (#5305) 2018-12-03 13:24:31 -05:00
Unknwon
0c1b72616a locale: sync from Crowdin 2018-12-02 20:02:09 -05:00
Unknwon
945a378e55 public/css: adjust width of label color in dropdown
models/issue: unify Issue receiver name to 'issue'
2018-12-02 17:54:55 -05:00
Unknwon
29c5be47ed models/issue: fix panic when clear labels (#5445) 2018-12-02 17:51:24 -05:00
无闻
e0f18b2255 github: update issue templates (#5537) 2018-12-02 15:25:06 -05:00
Unknwon
e755aafe29 vendor: update github.com/gogs/go-gogs-client 2018-12-02 12:55:16 -05:00
Unknwon
e1b3a25008 api/repo: support edit repository issue tracker (gogs/go-gogs-client#94) 2018-12-02 12:55:05 -05:00
Unknwon
69c1cd3f38 routes/api: change status handle to new style
Also fixed one bug that did not catch team not found error.
2018-12-01 21:41:30 -05:00
Unknwon
ce13fbb98a routes/api: allow get repository without login (#5475) 2018-12-01 21:40:19 -05:00
Samuel Cochran
084d9e0009 templates/user/dashboard: include 'org' query parameter in new mirror URL (#5534) 2018-11-29 07:21:16 -05:00
Unknwon
3db9b06a6e api: fix critical CSRF vulnerabilities on API routes (#5355)
By explicitly requires token authentication.
2018-11-28 21:05:58 -05:00
Unknwon
e9be8016e6 README: add new sponsor 2018-11-27 10:46:46 -05:00
Unknwon
1f9e21ebd5 templates/wiki: fix emoji rendering (#4869) 2018-11-26 07:02:21 -05:00
Unknwon
a91d9054ad conf: fix unexpected behavior of config inheritance (#5007) 2018-11-26 06:44:06 -05:00
Charles Kenney
6c90d12a0c routes/repo/issue: implement issue pre-filling (#5521)
Signed-off-by: Charles Kenney <charlesc.kenney@gmail.com>
2018-11-20 13:16:42 -05:00
Unknwon
38e8ccac92 conf: add go-bindata install command in README
[ci skip]
2018-11-20 02:37:16 -05:00
Unknwon
1d19a58424 locale: sync from Crowdin 2018-11-19 18:58:00 -05:00
Danilo Riecken P. de Morais
f47f9ceade mirror: trigger additional push webhook on new branch (#5508)
This commit fixes issue #5473 and makes a new branch behave like a
      push event and trigger the appropriate webhook.
2018-11-14 23:03:03 -05:00
Federico Culloca
81effe674d templates/user/profile: added rel="me" to website link on user profile (#5485)
* Added rel="me" to website link on user profile

See issue #5008

* Added `nofollow` as per feedback
2018-11-12 20:49:30 -05:00
Unknwon
831251bcaa ci: remove Go master for the moment 2018-11-08 18:03:16 -05:00
A.J. Ruckman
f4630f9044 public/css: add 'overflow-wrap: break-word' to dashboard news feeds (#5507) 2018-11-08 17:51:56 -05:00
William Hilton
dae311ea9d repo/http: update CORS headers to allow custom user-agent (#5498)
At some point after #4970 was merged, isomorphic-git started sending a custom User-Agent in its HTTP requests to deal with some services (\*cough\* gists \*cough\*) which filtered git traffic by User-Agent. Sadly, this broke cloning from Gogs using isomorphic-git in the browser (https://github.com/isomorphic-git/isomorphic-git/issues/555). This PR fixes it by telling browsers it is OK for CORS requests to send a custom User-Agent header.
2018-11-07 18:14:15 -05:00
Unknwon
4677b46904 vendor: update github.com/go-macaron/session (#5469)
Fix security flaw reported by c957861129d62331c5704d2f04d11e41.
2018-11-06 22:22:02 -05:00
Unknwon
a4dd2b1916 Merge branch 'master' of github.com:gogs/gogs into develop 2018-11-05 16:48:31 -05:00
Masen Furer
3d117b8964 Dockerfile.aarch64hub: install shadow package (#5481)
the shadow package contains the usermod(8) utility which is used by
start.sh and finalize.sh to configure the git user
2018-11-05 16:46:53 -05:00
hopegolden
6a083e9561 ldap: grammar fix (#5493) 2018-11-05 16:44:28 -05:00
hopegolden
044d359a7e docker: grammar fix (#5492) 2018-11-05 16:44:01 -05:00
Unknwon
f35d4164d6 pkg/bindata: update content 2018-11-04 18:37:01 -05:00
Unknwon
3058f8fd69 conf: change default session cookie name
[CI SKIP]
2018-10-24 10:05:35 -04:00
Unknwon
5129ed215e vendor: update github.com/go-macaron/session (#5469)
Fix security flaw reported by c957861129d62331c5704d2f04d11e41.
2018-10-24 09:59:07 -04:00
Unknwon
b93079f1c1 vendor: update github.com/go-macaron/session (#5469)
Fix security flaw reported by c957861129d62331c5704d2f04d11e41.
2018-10-24 09:43:59 -04:00
Unknwon
a1098384c0 vendor: update github.com/gogs/git-module 2018-10-23 07:02:13 -04:00
aboron
43bca4df40 ldap: fix group membership search handling when the group members are listed by 'dn' (#4684) (#4688)
Also, fixed typo in group member list return size check.
2018-10-23 04:16:39 -04:00
Unknwon
82269e4b8c locale: sync from Crowdin 2018-10-16 16:58:18 -04:00
Unknwon
14e49614e6 gogs: rise Go requirement to 1.7 2018-10-03 20:49:49 -04:00
Unknwon
a221b2807f routes/repo/issue: fix redirect with unexpected escape (#5443) 2018-09-30 13:55:40 -04:00
Unknwon
0d66b1cc1c pkg/context: apply EscapePound at context level
Always escape template variable {{.Link}} variable and  redirect calls.

Relates to #5442
2018-09-28 23:56:45 -04:00
Unknwon
1843354d88 templates/repo/setting: fix missing EscapePound (#5442) 2018-09-28 23:32:00 -04:00
Unknwon
bd7d1e2f16 routes: fix open redirect vulnerability (#5355)
Reported by @cezar97.
2018-09-28 23:19:29 -04:00
Unknwon
aff0bbcc32 pkg/ssh: print actual error in panic (#5435) 2018-09-28 15:37:34 -04:00
Unknwon
33e009bedb README: add FOSSA badge
[ci skip]
2018-09-26 19:04:41 -04:00
Unknwon
f94dc67a43 librejs: add jQuery
[ci skip]
2018-09-19 13:24:49 -04:00
Unknwon
091f63fd4e Makefile: only read GOPATH from env var
[ci skip]
2018-09-18 12:33:14 -04:00
121 changed files with 1072 additions and 714 deletions

51
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve
---
First of all, read https://www.chiark.greenend.org.uk/~sgtatham/bugs.html.
If you don't want to read, it's up to you. But don't waste your time continue reporting.
The issue will be closed without any explanation if it does not satisfy any of following requirements:
1. Please speak English, we have forum in [中文](https://discuss.gogs.io/c/getting-help/getting-help-chinese).
2. Please post questions or config/deploy problems on our forum: https://discuss.gogs.io, here are bugs and feature requests only.
3. Please do not end your title with a question mark or period.
3. Please take a moment to search that an issue doesn't already exist.
4. Please give all relevant information below for bug reports; incomplete details considered invalid report.
**You MUST delete above content including this line before posting; too lazy to take this action considered invalid report.**
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
- Gogs version (or commit ref):
- Git version:
- Operating system:
- Database (replace `[ ]` with `[x]`):
- [ ] PostgreSQL
- [ ] MySQL
- [ ] MSSQL
- [ ] SQLite
- Can you reproduce the bug at https://try.gogs.io:
- [ ] Yes (provide example URL)
- [ ] No
- [ ] Not relevant
- Log gist (usually found in `log/gogs.log`):

View File

@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
---
The issue will be closed without any explanation if it does not satisfy any of following requirements:
1. Please speak English, we have forum in [中文](https://discuss.gogs.io/c/getting-help/getting-help-chinese).
2. Please post questions or config/deploy problems on our forum: https://discuss.gogs.io, here are bugs and feature requests only.
3. Please do not end your title with a question mark or period.
4. Please take a moment to search that an issue doesn't already exist.
**You MUST delete above content including this line before posting; too lazy to take this action considered invalid report.**
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -5,7 +5,6 @@ go:
- 1.9.x
- 1.10.x
- 1.11.x
- master
before_install:
- sudo apt-get update -qq

View File

@@ -19,7 +19,7 @@ RUN [ "cross-build-start" ]
# Install system utils & Gogs runtime dependencies
ADD https://github.com/tianon/gosu/releases/download/1.10/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 go=1.10.1-r0
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh shadow socat tzdata go=1.10.1-r0

View File

@@ -14,7 +14,6 @@ RELEASE_ROOT = "release"
RELEASE_GOGS = "release/gogs"
NOW = $(shell date -u '+%Y%m%d%I%M%S')
GOVET = go tool vet -composites=false -methods=false -structtags=false
GOPATH = $(shell echo $${PWD%%src*})
.PHONY: build pack release bindata clean

View File

@@ -125,7 +125,7 @@ There are 5 ways to install Gogs:
- Thanks [Egon Elbre](https://twitter.com/egonelbre) for designing logo.
- Thanks [Crowdin](https://crowdin.com/project/gogs) for sponsoring open source translation plan.
- Thanks [DigitalOcean](https://www.digitalocean.com) for sponsoring VPS service.
- Thanks [DigitalOcean](https://www.digitalocean.com) and [VPSServer](https://www.vpsserver.com/) for sponsoring VPS service.
- Thanks [KeyCDN](https://www.keycdn.com/) for sponsoring CDN service.
## Contributors
@@ -136,3 +136,5 @@ There are 5 ways to install Gogs:
## License
This project is under the MIT License. See the [LICENSE](https://github.com/gogs/gogs/blob/master/LICENSE) file for the full license text.
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fgogs%2Fgogs.svg?type=small)](https://app.fossa.io/projects/git%2Bgithub.com%2Fgogs%2Fgogs?ref=badge_small)

View File

@@ -94,7 +94,7 @@ Gogs 是一款极易搭建的自助 Git 服务。
- 感谢 [Egon Elbre](https://twitter.com/egonelbre) 设计的 Logo。
- 感谢 [Crowdin](https://crowdin.com/project/gogs) 提供免费的开源项目本地化支持。
- 感谢 [DigitalOcean](https://www.digitalocean.com) 提供主站和体验站点的服务器赞助。
- 感谢 [DigitalOcean](https://www.digitalocean.com) 和 [VPSServer](https://www.vpsserver.com/) 提供服务器赞助。
- 感谢 [KeyCDN](https://www.keycdn.com/) 提供 CDN 服务赞助。
## 贡献成员

View File

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

View File

@@ -257,7 +257,7 @@ func runWeb(c *cli.Context) error {
m.Get("/email2user", user.Email2User)
m.Get("/forget_password", user.ForgotPasswd)
m.Post("/forget_password", user.ForgotPasswdPost)
m.Get("/logout", user.SignOut)
m.Post("/logout", user.SignOut)
})
// ***** END: User *****
@@ -308,7 +308,7 @@ func runWeb(c *cli.Context) error {
m.Get("/followers", user.Followers)
m.Get("/following", user.Following)
m.Get("/stars", user.Stars)
})
}, context.InjectParamsUser())
m.Get("/attachments/:uuid", func(c *context.Context) {
attach, err := models.GetAttachmentByUUID(c.Params(":uuid"))
@@ -340,8 +340,8 @@ func runWeb(c *cli.Context) error {
}, ignSignIn)
m.Group("/:username", func() {
m.Get("/action/:action", user.Action)
}, reqSignIn)
m.Post("/action/:action", user.Action)
}, reqSignIn, context.InjectParamsUser())
if macaron.Env == macaron.DEV {
m.Get("/template/*", dev.TemplatePreview)
@@ -484,7 +484,7 @@ func runWeb(c *cli.Context) error {
})
}, reqSignIn, context.RepoAssignment(), reqRepoAdmin, context.RepoRef())
m.Get("/:username/:reponame/action/:action", reqSignIn, context.RepoAssignment(), repo.Action)
m.Post("/:username/:reponame/action/:action", reqSignIn, context.RepoAssignment(), repo.Action)
m.Group("/:username/:reponame", func() {
m.Get("/issues", repo.RetrieveLabels, repo.Issues)
m.Get("/issues/:index", repo.ViewIssue)

View File

@@ -1,3 +1,6 @@
Execute following command in ROOT directory when anything is changed:
$ make bindata
```
$ go get -u github.com/go-bindata/go-bindata/...
$ make bindata
```

View File

@@ -96,7 +96,7 @@ 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
; or under, Gogs will automatically detect the number of CPUs your system have
COMMITS_FETCH_CONCURRENCY = 0
; Enable render mode for raw file
ENABLE_RAW_FILE_RENDER_MODE = false
@@ -271,7 +271,7 @@ PROVIDER = memory
; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
PROVIDER_CONFIG = data/sessions
; Session cookie name
COOKIE_NAME = i_like_gogits
COOKIE_NAME = i_like_gogs
; If you use session in https only, default is false
COOKIE_SECURE = false
; Enable set cookie, default is true
@@ -330,13 +330,13 @@ LEVEL = Trace
; For "console" mode only
[log.console]
; leave empty to inherit
LEVEL =
; Comment out to inherit
; LEVEL =
; For "file" mode only
[log.file]
; leave empty to inherit
LEVEL =
; Comment out to inherit
; LEVEL =
; This enables automated log rotate (switch of following options)
LOG_ROTATE = true
; Segment log daily
@@ -350,14 +350,14 @@ MAX_DAYS = 7
; For "slack" mode only
[log.slack]
; leave empty to inherit
LEVEL =
; Comment out to inherit
; LEVEL =
; Webhook URL
URL =
[log.discord]
; leave empty to inherit
LEVEL =
; Comment out to inherit
; LEVEL =
; Webhook URL
URL =
; Username displayed in webhook

View File

@@ -23,10 +23,10 @@ password=Heslo
re_type=Znovu zadat
captcha=CAPTCHA
repository=Repositář
repository=Repozitář
organization=Organizace
mirror=Zrcadlo
new_repo=Nový repositář
new_repo=Nový repozitář
new_migrate=Nové přenesení
new_mirror=Nové zrcadlo
new_fork=Nový repositář rozštěpení
@@ -251,7 +251,7 @@ target_branch_not_exist=Cílová větev neexistuje.
[user]
change_avatar=Změnit vaši uživatelskou ikonu
join_on=Zaregistroval se dne
repositories=Repositáře
repositories=Repozitáře
activity=Veřejná aktivita
followers=Sledující
starred=Oblíbené repositáře
@@ -421,8 +421,8 @@ mirror_last_synced=Naposledy synchronizováno
watchers=Sledující
stargazers=Sledující
forks=Rozštěpení
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Popis repozitáře. Maximální délka 512 znaků.
repo_description_length=Dostupné znaky
form.reach_limit_of_creation=Vlastník dosáhl maximálního počtu %d vytvořených repositořů.
form.name_reserved=Název repositáře '%s' je rezervován.
@@ -641,7 +641,7 @@ pulls.cannot_auto_merge_desc=Tento požadavek na natažení nemůže být automa
pulls.cannot_auto_merge_helper=Prosím proveďte sloučení ručně, aby byly vyřešeny rozpory.
pulls.create_merge_commit=Vytvořit slučovací commit
pulls.rebase_before_merging=Rebase before merging
pulls.commit_description=Commit Description
pulls.commit_description=Popis Commitu
pulls.merge_pull_request=Sloučit požadavek na natažení
pulls.open_unmerged_pull_exists=`Nemůžete znovuotevřít požadavek na natažení, neboť požadavek na natažení ze stejného repositáře se stejnými informacemi pro sloučení již existuje (#%d) a čeká na sloučení.`
pulls.delete_branch=Smazat větev
@@ -861,7 +861,7 @@ settings.deploy_key_deletion=Smazat klíč pro nasazení
settings.deploy_key_deletion_desc=Smazání toho klíče pro nasazení smaže také veškerý k němu svázaný přístup do tohoto repositáře. Chcete pokračovat?
settings.deploy_key_deletion_success=Klíč pro nasazení byl smazán!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_length=Dostupné znaky
diff.browse_source=Procházet zdrojové kódy
diff.parent=rodič
@@ -917,7 +917,7 @@ people=Lidé
invite_someone=Přizvěte někoho
teams=Týmy
lower_members=členové
lower_repositories=repositáře
lower_repositories=repozitáře
create_new_team=Vytvořit nový tým
org_desc=Popis
team_name=Název týmu
@@ -981,9 +981,9 @@ teams.delete_team_success=Daný tým byl smazán.
teams.read_permission_desc=Členství v tom týmu poskytuje právo <strong>čtení</strong>: členové mohou číst z a vytvářet klony repositářů týmu.
teams.write_permission_desc=Členství v tom týmu poskytuje právo <strong>zápisu</strong>: členové mohou číst z a odesílat do repositářů týmu.
teams.admin_permission_desc=Členství v tom týmu poskytuje právo <strong>správce</strong>: členové mohou číst z, odesílat do a přidávat spolupracovníky do repositářů týmu.
teams.repositories=Repositáře týmu
teams.repositories=Repozitáře týmu
teams.search_repo_placeholder=Hledat repositář...
teams.add_team_repository=Přidat repositář týmu
teams.add_team_repository=Přidat repozitář týmu
teams.remove_repo=Odstranit
teams.add_nonexistent_repo=Repositář, který se snažíte přidat, neexistuje. Nejdříve jej vytvořte, prosím.
@@ -991,7 +991,7 @@ teams.add_nonexistent_repo=Repositář, který se snažíte přidat, neexistuje.
dashboard=Přehled
users=Uživatelé
organizations=Organizace
repositories=Repositáře
repositories=Repozitáře
authentication=Způsoby ověření
config=Nastavení
notices=Systémová oznámení
@@ -1102,7 +1102,7 @@ auths.new=Přidat nový zdroj
auths.name=Název
auths.type=Typ
auths.enabled=Povolený
auths.default=Default
auths.default=Výchozí
auths.updated=Změněné
auths.auth_type=Typ ověření
auths.auth_name=Název ověření

View File

@@ -421,8 +421,8 @@ mirror_last_synced=Zuletzt synchronisiert
watchers=Beobachter
stargazers=In Favoriten von
forks=Forks
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Beschreibung des Repository. Maximal 512 Zeichen.
repo_description_length=Verfügbare Zeichen
form.reach_limit_of_creation=Der Besitzer hat die maximale Anzahl von %d erstellbaren Repositories erreicht.
form.name_reserved=Repository-Name '%s' ist reserviert.
@@ -520,7 +520,7 @@ editor.file_changed_while_editing=Seit dem Start der Bearbeitung hat sich die Da
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.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=Fehler beim Löschen 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'
@@ -641,7 +641,7 @@ 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.create_merge_commit=Erstelle einen Merge-Commit
pulls.rebase_before_merging=Rebase vor dem Zusammenführen
pulls.commit_description=Commit Description
pulls.commit_description=Commit Beschreibung
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
@@ -746,7 +746,7 @@ settings.tracker_issue_style=Namenskonvention des externen Issue-Trackers:
settings.tracker_issue_style.numeric=Numerisch
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=Enable pull requests to accept contributions between repositories and branches
settings.pulls_desc=Erlaube Pull-Requests zur Zusammenarbeit von Repositories und Branches
settings.pulls.ignore_whitespace=Ignoriere whitespace Änderungen
settings.pulls.allow_rebase_merge=Die Verwendung von Rebase erlauben, um Commits zu mergen
settings.danger_zone=Gefahrenzone
@@ -860,8 +860,8 @@ settings.add_key_success=Der Deploy-Schlüssel '%s' wurde erfolgreich hinzugefü
settings.deploy_key_deletion=Deploy-Schlüssel löschen
settings.deploy_key_deletion_desc=Nach dem Löschen dieses Deploy-Schlüssels werden entsprechende Zugriffe auf dieses Repository nicht mehr möglich sein. Möchten Sie wirklich fortfahren?
settings.deploy_key_deletion_success=Deploy-Schlüssel wurde erfolgreich gelöscht!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Beschreibung des Repository. Maximal 512 Zeichen.
settings.description_length=Verfügbare Zeichen
diff.browse_source=Quellcode durchsuchen
diff.parent=Ursprung
@@ -1102,7 +1102,7 @@ auths.new=Neue Quelle hinzufügen
auths.name=Name
auths.type=Typ
auths.enabled=Aktiviert
auths.default=Default
auths.default=Standard
auths.updated=Aktualisiert
auths.auth_type=Authentifizierungstyp
auths.auth_name=Authentifizierungsname
@@ -1141,7 +1141,7 @@ auths.pam_service_name=PAM Dienstname
auths.enable_auto_register=Automatische Registrierung aktivieren
auths.edit=Authentifizierungseinstellungen bearbeiten
auths.activated=Diese Authentifizierung ist aktiv
auths.default_auth=This authentication is default login source
auths.default_auth=Diese Authentifizierungsmethode ist die Vorgabe
auths.new_success=Neue Authentifizierung '%s' wurde erfolgreich hinzugefügt.
auths.update_success=Die Authentifizierungseinstellungen wurden erfolgreich aktualisiert.
auths.update=Authentifizierungseinstellungen aktualisieren

View File

@@ -152,7 +152,7 @@ social_register_hepler_msg=¿Ya tienes una cuenta? ¡Enlázala!
disable_register_prompt=Lo sentimos, el registro está deshabilitado. Por favor, contacta con el administrador del sitio.
disable_register_mail=Lo sentimos. Los correos de Confirmación de Registro están deshabilitados.
auth_source=Authentication Source
local=Idioma
local=Local
remember_me=Recuérdame
forgot_password=He olvidado mi contraseña
forget_password=¿Has olvidado tu contraseña?
@@ -345,22 +345,22 @@ two_factor_enable=Activar
two_factor_disable=Desactivar
two_factor_view_recovery_codes=Guarda <a href="%s%s"> tus códigos de recuperación</a> en un lugar seguro. Podrás usarlos como código de acceso si pierdes el acceso a tu aplicación de autenticación.
two_factor_http=Para las operaciones sobre HTTP/HTTPS, no puedes usar un usuario y contraseña. Por favor, cree y utilice <a href="%[1]s%[2]s"> un token de acceso personal</a> como su credencial de acceso, por ejemplo, <code>%[3]s</code>.
two_factor_enable_title=Habilitar autenticaciñon en dos pasos
two_factor_enable_title=Habilitar autenticación en dos pasos
two_factor_scan_qr=Por favor, use su aplicación de autenticación para escanear la imagen:
two_factor_or_enter_secret=Or enter the secret:
two_factor_or_enter_secret=O introduzca el secreto:
two_factor_then_enter_passcode=Introduce el Pin:
two_factor_verify=Verificar
two_factor_invalid_passcode=¡El Pin que has introducido no es válido, por favor, inténtalo de nuevo!
two_factor_reused_passcode=The passcode you entered has already been used, please try another one!
two_factor_enable_error=Enable Two-factor authentication failed: %v
two_factor_enable_success=Two-factor authentication has enabled for your account successfully!
two_factor_recovery_codes_title=Two-factor Authentication Recovery Codes
two_factor_recovery_codes_desc=Recovery codes are used when you temporarily lose access to your authentication application. Each recovery code can only be used once, <b>please keep these codes in a safe place</b>.
two_factor_regenerate_recovery_codes=Regenerate Recovery Codes
two_factor_regenerate_recovery_codes_error=Regenerate recovery codes failed: %v
two_factor_regenerate_recovery_codes_success=New recovery codes has been generated successfully!
two_factor_reused_passcode=¡El pin de autenticación que has introducido ya ha sido usado, por favor intenta con otro!
two_factor_enable_error=Ha fallado la activación de la autenticación en dos pasos: %v
two_factor_enable_success=¡La autenticación en dos pasos se ha activado en tu cuenta correctamente!
two_factor_recovery_codes_title=Códigos de recuperación para la autenticación en dos pasos
two_factor_recovery_codes_desc=Los códigos de recuperación se usan cuando pierdes temporalmente el acceso a tu aplicación de autenticación. Cada código de recuperación solo puede utilizarse en una ocasión, <b>por favor, mantén estos códigos en lugar seguro</b>.
two_factor_regenerate_recovery_codes=Regenerar códigos de recuperación
two_factor_regenerate_recovery_codes_error=Ha fallado la regeneración de códigos de recuperación: %v
two_factor_regenerate_recovery_codes_success=¡Nuevos códigos de recuperación han sido generados con éxito!
two_factor_disable_title=Deshabilitar autenticación en dos pasos
two_factor_disable_desc=Your account security level will decrease after disabled two-factor authentication. Do you want to continue?
two_factor_disable_desc=El nivel de seguridad de tu cuenta se verá reducido después de desactivar la autenticación en dos pasos. ¿Deseas continuar?
two_factor_disable_success=¡La autenticación en dos pasos ha sido deshabilitada satisfactoriamente!
manage_access_token=Gestionar los Tokens de Acceso personales
@@ -421,8 +421,8 @@ mirror_last_synced=Última sincronización
watchers=Seguidores
stargazers=Fans
forks=Forks
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Descripción del repositorio. Longitud máxima de 512 caracteres.
repo_description_length=Caracteres disponibles
form.reach_limit_of_creation=El propietario ha alcanzado el límite máximo de %d repositorios creados.
form.name_reserved=El nombre del repositorio '%s' está reservado.
@@ -520,7 +520,7 @@ editor.file_changed_while_editing=El contenido del archivo ha sido modificado de
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.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=Error al borrar el fichero '%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'
@@ -623,7 +623,7 @@ pulls.compare_compare=comparar con
pulls.filter_branch=Filtrar rama
pulls.no_results=Sin resultados.
pulls.nothing_to_compare=Nada que comparar. Las dos ramas coinciden.
pulls.nothing_merge_base=There is nothing to compare because two branches have completely different history.
pulls.nothing_merge_base=No hay nada que comparar porque las dos ramas tienen una historia completamente distinta.
pulls.has_pull_request=`Ya existe un pull request entre estas dos ramas: <a href="%[1]s/pulls/%[3]d">%[2]s#%[3]d</a>`
pulls.create=Crear Pull Request
pulls.title_desc=desea fusionar %[1]d commits de <code>%[2]s</code> en <code>%[3]s</code>
@@ -639,9 +639,9 @@ pulls.is_checking=Se está procediendo a la búsqueda de conflictos, por favor a
pulls.can_auto_merge_desc=Este Pull Request puede ser fusionado automáticamente.
pulls.cannot_auto_merge_desc=Este Pull Request no puede ser fusionado automáticamente porque hay conflictos.
pulls.cannot_auto_merge_helper=Por favor, fusiona manualmente para resolver los conflictos.
pulls.create_merge_commit=Create a merge commit
pulls.rebase_before_merging=Rebase before merging
pulls.commit_description=Commit Description
pulls.create_merge_commit=Crear un commit del fusionado
pulls.rebase_before_merging=Hacer rebase antes de fusionar
pulls.commit_description=Descripción del commit
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
@@ -701,7 +701,7 @@ settings.branches_bare=No puedes gestionar ramas en un repositorio vacío. Por f
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_unsupported=Change default branch is not supported by the Git version on server.
settings.update_default_branch_unsupported=El cambio de rama por defecto no esta soportado por la versión de Git en el servidor.
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.
@@ -718,7 +718,7 @@ settings.protect_whitelist_users=Usuarios que pueden hacer push a esta rama
settings.protect_whitelist_search_users=Buscar usuarios
settings.protect_whitelist_teams=Equipos cuyos miembros pueden hacer push a esta rama
settings.protect_whitelist_search_teams=Buscar equipos
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.update_protect_branch_success=¡Las opciones de protección para esta rama se han actualizado con éxito!
settings.hooks=Webhooks
settings.githooks=Git Hooks
settings.basic_settings=Configuración Básica
@@ -731,7 +731,7 @@ settings.change_reponame_prompt=Este cambio afectará a los enlaces al repositor
settings.advanced_settings=Ajustes avanzados
settings.wiki_desc=Activar sistema de wiki
settings.use_internal_wiki=Usar wiki integrada
settings.allow_public_wiki_desc=Allow public access to wiki when repository is private
settings.allow_public_wiki_desc=Permitir acceso público a la wiki cuando el repositorio es privado
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.
@@ -746,11 +746,11 @@ settings.tracker_issue_style=Estilo de etiquetado del tracker externo de inciden
settings.tracker_issue_style.numeric=Numérico
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=Enable pull requests to accept contributions between repositories and branches
settings.pulls.ignore_whitespace=Ignore changes in whitespace
settings.pulls.allow_rebase_merge=Allow use rebase to merge commits
settings.pulls_desc=Permitir pull requests para aceptar contribuciones entre repositorios y ramas
settings.pulls.ignore_whitespace=Ignorar los cambios en el espacio en blanco
settings.pulls.allow_rebase_merge=Permite usar rebase para fusionar los commits
settings.danger_zone=Zona de Peligro
settings.cannot_fork_to_same_owner=You cannot fork a repository to its original owner.
settings.cannot_fork_to_same_owner=No puedes hacer fork del repositorio a su propietario original.
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.
@@ -769,7 +769,7 @@ settings.wiki_deletion_success=Los datos de la wiki del repositorio han sido bor
settings.delete=Eliminar este repositorio
settings.delete_desc=Una vez has eliminado un repositorio, no hay vuelta atrás. Por favor, asegúrate de que es lo que quieres.
settings.delete_notices_1=- Esta operación <strong>NO PUEDE</strong> revertirse.
settings.delete_notices_2=- This operation will permanently delete everything in this repository, including Git data, issues, comments and collaborator access.
settings.delete_notices_2=- Esta operación eliminará de manera permanente todo el contenido de este repositorio, incluyendo los datos de Git, las incidencias, los comentarios y los permisos de acceso de los colaboradores.
settings.delete_notices_fork_1=- Todos los forks se convertirán en independientes tras el borrado.
settings.deletion_success=¡El respositorio ha sido eliminado satisfactoriamente!
settings.update_settings_success=Las opciones del repositorio se han actualizado correctamente.
@@ -794,7 +794,7 @@ settings.webhook.test_delivery=Test de entrega
settings.webhook.test_delivery_desc=Enviar un falso evento Push de entrega para probar tus ajustes de webhook
settings.webhook.test_delivery_success=Probar que los webhook han sido añadidos a la cola de entrega. Esto puede tomar algunos segundos antes de aparecer en el historial de entregas.
settings.webhook.redelivery=Reenviar
settings.webhook.redelivery_success=Hook task '%s' has been readded to delivery queue. It may take few seconds to update delivery status in history.
settings.webhook.redelivery_success=La tarea del Hook '%s' ha sido reañadida en la cola de entrega. Puede tardar unos segundos en actualizarse el historial de estado de la cola.
settings.webhook.request=Petición
settings.webhook.response=Respuesta
settings.webhook.headers=Encabezado
@@ -809,7 +809,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.secret_desc=El secreto será enviado como un payload SHA256 HMAC hex digest vía cabecera <code>X-Gogs-Signature</code>.
settings.slack_username=Nombre de usuario
settings.slack_icon_url=URL de icono
settings.slack_color=Color
@@ -843,7 +843,7 @@ 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.add_dingtalk_hook_desc=Add <a href="%s">Dingtalk</a> integration to your repository.
settings.add_dingtalk_hook_desc=Añade integración con <a href="%s">Dingtalk</a> a tu repositorio.
settings.slack_token=Token
settings.slack_domain=Dominio
settings.slack_channel=Canal
@@ -860,8 +860,8 @@ settings.add_key_success=¡La nueva clave de desplieque '%s' ha sido creada con
settings.deploy_key_deletion=Eliminar Clave de Despliegue
settings.deploy_key_deletion_desc=Al eliminar esta clave de despliegue se perderán el permiso de acceso a este repositorio con dicha clave. ¿Deseas continuar?
settings.deploy_key_deletion_success=¡Clave de despliegue eliminada con éxito!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Descripción del repositorio. Longitud máxima de 512 caracteres.
settings.description_length=Caracteres disponibles
diff.browse_source=Explorar el Código
diff.parent=padre
@@ -1019,8 +1019,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_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.resync_all_hooks=Resincroniza los "hooks" de pre-recepción, actualización y post-recepción en todos los repositorios
dashboard.resync_all_hooks_success=Se han vuelto a sincronizar todos los "hooks" de pre-recepción, actualización y post-recepción de los repositorios con éxito.
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.
@@ -1097,12 +1097,12 @@ repos.stars=Estrellas
repos.issues=Incidencias
repos.size=Tamaño
auths.auth_sources=Authentication Sources
auths.auth_sources=Fuentes de autentificación
auths.new=Añadir nuevo origen
auths.name=Nombre
auths.type=Tipo
auths.enabled=Activo
auths.default=Default
auths.default=Por defecto
auths.updated=Actualizado
auths.auth_type=Tipo de autenticación
auths.auth_name=Nombre de autenticación
@@ -1111,7 +1111,7 @@ auths.domain=Dominio
auths.host=Host
auths.port=Puerto
auths.bind_dn=Bind DN
auths.bind_dn_helper=You can use '%s' as placeholder for username, e.g. DOM\%s
auths.bind_dn_helper=Puedes usar '%s' como marcador de posición para el nombre de usuario, ej. DOM\%s
auths.bind_password=Contraseña Bind
auths.bind_password_helper=Advertencia: La contraseña se almacena como texto plano. No utilice una cuenta con privilegios elevados.
auths.user_base=Base de búsqueda de usuarios
@@ -1122,10 +1122,10 @@ auths.attribute_name=Atributo nombre
auths.attribute_surname=Atributo apellido
auths.attribute_mail=Atributo correo electrónico
auths.verify_group_membership=Verificar pertenencia a grupo
auths.group_search_base_dn=Group Search Base DN
auths.group_search_base_dn=Base DN para la búsqueda de grupos
auths.group_filter=Filtro de grupo
auths.group_attribute_contain_user_list=Group Attribute Containing List of Users
auths.user_attribute_listed_in_group=User Attribute Listed in Group
auths.group_attribute_contain_user_list=Atributo de grupo que contiene la lista de usuarios
auths.user_attribute_listed_in_group=Atributo de usuario listado en grupo
auths.attributes_in_bind=Buscar atributos en el contexto del Bind DN
auths.filter=Filtro de usuario
auths.admin_filter=Filtro de aministrador
@@ -1141,7 +1141,7 @@ auths.pam_service_name=Nombre del Servicio PAM
auths.enable_auto_register=Hablilitar Auto-Registro
auths.edit=Editar la Configuración de Autenticación
auths.activated=Esta autenticación ha sido activada
auths.default_auth=This authentication is default login source
auths.default_auth=Esta autenticación es la fuente de inicio de sesión predeterminada
auths.new_success=¡La autenticación '%s' ha sido añadida con éxito!
auths.update_success=La configuración de autenticación ha sido actualizada con éxito.
auths.update=Actualizar la configuración de autenticación
@@ -1152,7 +1152,7 @@ auths.still_in_used=Este método de autentificación aún es utilizado por algun
auths.deletion_success=¡La autenticación ha sido eliminada con éxito!
auths.login_source_exist=El origen de autenticación '%s' ya existe.
config.not_set=(not set)
config.not_set=(sin definir)
config.server_config=Configuración del servidor
config.app_name=Nombre de la Aplicación
config.app_ver=Versión de la Aplicación
@@ -1174,7 +1174,7 @@ config.ssh_domain=Dominio
config.ssh_port=Puerto
config.ssh_listen_port=Puerto de escucha
config.ssh_root_path=Ruta raíz
config.ssh_rewrite_authorized_keys_at_start=Rewrite authorized_keys At Start
config.ssh_rewrite_authorized_keys_at_start=Reescribir authorized_keys en el arranque
config.ssh_key_test_path=Ruta de la clave de prueba
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
@@ -1188,9 +1188,9 @@ config.max_creation_limit=Limite máximo de creación
config.preferred_licenses=Licencias Preferidas
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.commits_fetch_concurrency=Concurrencia de la búsqueda de commits
config.http_config=HTTP Configuration
config.http_config=Configuración HTTP
config.http_access_control_allow_origin=Access Control Allow Origin
config.db_config=Configuración de la Base de Datos
@@ -1222,7 +1222,7 @@ config.skip_tls_verify=Omitir la Verificación TLS
config.mailer_config=Configuración del servidor de correo
config.mailer_enabled=Activado
config.mailer_disable_helo=Desactivar HELO
config.mailer_subject_prefix=Subject Prefix
config.mailer_subject_prefix=Prefijo del asunto
config.mailer_host=Host
config.mailer_user=Usuario
config.send_test_mail=Enviar email de prueba
@@ -1312,9 +1312,9 @@ delete_branch=borrada rama <code>%[2]s</code> at <a href="%[1]s">%[3]s</a>
push_tag=hizo push del tag <a href="%s/src/%s">%[2]s</a> a <a href="%[1]s">%[3]s</a>
delete_tag=borrada etiqueta <code>%[2]s</code> en <a href="%[1]s">%[3]s</a>
fork_repo=ha hecho un Fork en <a href="%s">%s</a>
mirror_sync_push=synced commits to <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a> from mirror
mirror_sync_create=synced new reference <a href="%s/src/%s">%[2]s</a> to <a href="%[1]s">%[3]s</a> from mirror
mirror_sync_delete=synced and deleted reference <code>%[2]s</code> at <a href="%[1]s">%[3]s</a> from mirror
mirror_sync_push=sincronizados commits a <a href="%[1]s/src/%[2]s">%[3]s</a> en <a href="%[1]s">%[4]s</a> desde la réplica
mirror_sync_create=sincronizada nueva referencia <a href="%s/src/%s">%[2]s</a> a <a href="%[1]s">%[3]s</a> desde la réplica
mirror_sync_delete=sincronizada y eliminada referencia <code>%[2]s</code> en <a href="%[1]s">%[3]s</a> desde la réplica
[tool]
ago=hace

View File

@@ -151,8 +151,8 @@ register_hepler_msg=قبلا ثبت نام کردید؟ از اینجا وارد
social_register_hepler_msg=تا به حال حسابی داشته اید؟ به ما بپیوندید!
disable_register_prompt=با عرض پوزش، ثبت نام غیرفعال شده است. لطفا با مدیر سایت تماس بگیرید.
disable_register_mail=با عرض پوزش، تایید ایمیل ثبت نام غیر فعال شده است.
auth_source=Authentication Source
local=Local
auth_source=محل احراز هویت
local=محلی
remember_me=مرا به خاطر بسپار
forgot_password=فراموشی رمز عبور
forget_password=رمز عبور خود را فراموش کرده‌اید؟
@@ -231,7 +231,7 @@ org_name_been_taken=نام سازمان قبلا استفاده شده است.
team_name_been_taken=نام تیم گرفته شده است.
email_been_used=آدرس ایمیل قبلا استفاده شده است.
username_password_incorrect=نام کاربری یا رمز عبور صحیح نیست.
auth_source_mismatch=The authentication source selected is not associated with the user.
auth_source_mismatch=محل احراز هویت انتخاب شده با کاربر در ارتباط نمی‌باشد.
enterred_invalid_repo_name=لطفا مطمئن شوید که نام مخزن وارد شده صحیح است.
enterred_invalid_owner_name=لطفا مطمئن شوید که نام مالک وارد شده صحیح است.
enterred_invalid_password=لطفا مطمئن شوید که رمز عبور وارد شده صحیح است.
@@ -353,7 +353,7 @@ two_factor_or_enter_secret=و یا رمز را پارد کنید:
two_factor_then_enter_passcode=سپس رمز عبور را وارد کنید:
two_factor_verify=تایید‌کنید
two_factor_invalid_passcode=رمز عبور وارد شده معتبر نیست, لطفا دوباره سعی کنید!
two_factor_reused_passcode=The passcode you entered has already been used, please try another one!
two_factor_reused_passcode=رمز وارد شده قبلا استفاده شده، لطفا یک عبارت دیگر را امتحان کنید!
two_factor_enable_error=فعال کردن احراز هویت دوگانه ناموفق بود: %v
two_factor_enable_success=احراز هویت دوگانه با موفقیت برای حساب شما فعال شد!
two_factor_recovery_codes_title=کدهای بازیابی احراز هویت دوگانه
@@ -423,8 +423,8 @@ mirror_last_synced=آخرین همگام سازی
watchers=دنبال‌کنندگان
stargazers=ستاره شناسان
forks=انشعاب ها
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=توضیحات مخرن. حداکثر طول ۵۱۲ کاراکتر.
repo_description_length=کاراکترهای موجود
form.reach_limit_of_creation=مخزن های دارنده حساب به حداکثر تعداد مجاز %d رسیده است.
form.name_reserved=یک مخزن با نام '%s' از قبل وجود دارد.
@@ -522,7 +522,7 @@ editor.file_changed_while_editing=محتوای فایل از زمانی که ش
editor.file_already_exists=فایلی با نام %s از قبل در مخزن موجود است.
editor.no_changes_to_show=تغییری برای نمایش وجود ندارد.
editor.fail_to_update_file=خطا در ساخت/به روزرسانی فایل %. خطای رخ داده : %v
editor.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=خطا در حذف فایل '%s' رخ داده است. خطای رخ داده %v
editor.add_subdir=افزودن زیرپوشه...
editor.unable_to_upload_files=عدم موفقیت در آپلود فایل به '%s' با خطا: %v
editor.upload_files_to_dir=آپلود فایل به '%s'
@@ -643,7 +643,7 @@ pulls.cannot_auto_merge_desc=این pull request به علت تداخل نمی
pulls.cannot_auto_merge_helper=لطفا عملیات ادغام را به صورت دستی انجام دهید تا این تداخل برطرف شود.
pulls.create_merge_commit=ایجاد یک کامیت برای ادغام سازی
pulls.rebase_before_merging=Rebase قبل از ادغام
pulls.commit_description=Commit Description
pulls.commit_description=توضیحات کامیت
pulls.merge_pull_request=ایجاد درخواست ادغام
pulls.open_unmerged_pull_exists=`به علت باز بودن pull request (#%d) از مخزنی مشابه و به همراه اطلاعات ادغام مشابه که در انتظار ادغام می باشد، بازگشایی مجدد مقدور نیست`
pulls.delete_branch=حذف شاخه
@@ -1099,12 +1099,12 @@ repos.stars=ستاره ها
repos.issues=مسائل
repos.size=اندازه
auths.auth_sources=Authentication Sources
auths.auth_sources=منابع احراز هویت
auths.new=اضافه کردن منبع جدید
auths.name=نام
auths.type=نوع
auths.enabled=فعال شده
auths.default=Default
auths.default=پیش فرض
auths.updated=به روز رسانی شده
auths.auth_type=نوع تأیید اعتبار
auths.auth_name=نام مجوز احراز هویت
@@ -1143,7 +1143,7 @@ auths.pam_service_name=نام سرویس PAM
auths.enable_auto_register=فعال سازی ثبت نام خودکار
auths.edit=ویرایش تنظیمات تأیید اعتبار
auths.activated=متد احراز هویت فعال شده است
auths.default_auth=This authentication is default login source
auths.default_auth=این احراز هویت پیش فرض منبع ورود می باشد
auths.new_success=متد احرازهویت %s با موفقیت افزوده شد.
auths.update_success=تنظیمات سیستم احرازهویت با موفقیت به روز شد.
auths.update=به روزرسانی تنظیمات سیستم احراز هویت
@@ -1224,7 +1224,7 @@ config.skip_tls_verify=صرف نظر از اعتبار سنجی TLS
config.mailer_config=پیکربندی سیستم ایمیلی
config.mailer_enabled=فعال شده
config.mailer_disable_helo=غیر فعال کردن HELO
config.mailer_subject_prefix=Subject Prefix
config.mailer_subject_prefix=پيشوند موضوع
config.mailer_host=میزبان
config.mailer_user=کاربر
config.send_test_mail=ارسال ایمیل تست

View File

@@ -421,8 +421,8 @@ mirror_last_synced=Dernière synchronisation
watchers=Observateurs
stargazers=Stargazers
forks=Forks
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Description du dépôt. 512 caractères maximum.
repo_description_length=Caractères disponibles
form.reach_limit_of_creation=Le propriétaire a atteint le nombre maximal de %d dépôts créés.
form.name_reserved=Le nom de dépôt '%s' est réservé.
@@ -520,7 +520,7 @@ editor.file_changed_while_editing=Le contenu du fichier à changé depuis que vo
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 l'erreur : %v
editor.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=Impossible de supprimer le 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 l'erreur : %v
editor.upload_files_to_dir=Transférer les fichiers vers '%s'
@@ -641,7 +641,7 @@ 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.create_merge_commit=Créer un commit de fusion
pulls.rebase_before_merging=Rebaser avant la fusion
pulls.commit_description=Commit Description
pulls.commit_description=Description du commit
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
@@ -746,7 +746,7 @@ settings.tracker_issue_style=Style de nommage des bugs du tracker externe :
settings.tracker_issue_style.numeric=Numérique
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=Enable pull requests to accept contributions between repositories and branches
settings.pulls_desc=Activer les pull requests pour accepter les contributions depuis des dépôts et des branches
settings.pulls.ignore_whitespace=Ignorer les changements quand ce sont des espaces
settings.pulls.allow_rebase_merge=Autoriser l'utilisation de rebase pour fusionner les validations
settings.danger_zone=Zone de danger
@@ -860,8 +860,8 @@ settings.add_key_success=La nouvelle clé de déploiement '%s' a été ajoutée
settings.deploy_key_deletion=Supprimer la Clé de Déploiement
settings.deploy_key_deletion_desc=Supprimer cette clé de déploiement effacera tous les accès relatifs pour ce référentiel. Voulez-vous continuer ?
settings.deploy_key_deletion_success=La clé de déploiement a été supprimée avec succès !
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Description du dépôt. 512 caractères maximum.
settings.description_length=Caractères disponibles
diff.browse_source=Parcourir la source
diff.parent=Parent
@@ -1102,7 +1102,7 @@ auths.new=Ajouter une nouvelle source d'authentification
auths.name=Nom
auths.type=Type
auths.enabled=Activé
auths.default=Default
auths.default=Par défaut
auths.updated=Mis à jour
auths.auth_type=Type d'authentification
auths.auth_name=Nom de l'authentification
@@ -1141,7 +1141,7 @@ auths.pam_service_name=Nom du Service PAM
auths.enable_auto_register=Connexion Automatique
auths.edit=Modifier les paramètres d'authentification
auths.activated=Authentification activée
auths.default_auth=This authentication is default login source
auths.default_auth=Cette authentification est la source de connexion par défaut
auths.new_success=Nouvelle authentification «%s » a été ajoutée avec succès.
auths.update_success=Les paramètre d'authentification a été mis à jour avec succès.
auths.update=Mettre à jour les paramètres d'authentifications
@@ -1285,7 +1285,7 @@ notices.actions=Actions
notices.select_all=Tout Sélectionner
notices.deselect_all=Tous déselectionner
notices.inverse_selection=Inverser la sélection
notices.delete_selected=Supprimé les éléments sélectionnés
notices.delete_selected=Supprimer les éléments sélectionnés
notices.delete_all=Supprimer toutes les notifications
notices.type=Type
notices.type_1=Dépôt
@@ -1313,7 +1313,7 @@ push_tag=a soumis le tag <a href="%s/src/%s">%[2]s</a> sur <a href="%[1]s">%[3]s
delete_tag=étiquette supprimée <code>%[2]s</code> sur <a href="%[1]s">%[3]s</a>
fork_repo=a créé sa branche du dépôt vers <a href="%s">%s</a>
mirror_sync_push=a commité dans <a href="%[1]s/src/%[2]s">%[3]s</a> sur <a href="%[1]s">%[4]s</a>
mirror_sync_create=synced new reference <a href="%s/src/%s">%[2]s</a> to <a href="%[1]s">%[3]s</a> from mirror
mirror_sync_create=a synchronisé la nouvelle référence <a href="%s/src/%s">%[2]s</a> vers <a href="%[1]s">%[3]s</a> depuis le miroir
mirror_sync_delete=Référence synchronisés et supprimé <code>%[2]s</code> sur <a href="%[1]s">%[3]s</a>
[tool]

View File

@@ -151,8 +151,8 @@ register_hepler_msg=Van már felhasználói fiókja? Jelentkezz be!
social_register_hepler_msg=Van már fiókod? Csatold most!
disable_register_prompt=Elnézést, a regisztrációt kikapcsolták. Kérlek szólj az oldal adminisztrátorának.
disable_register_mail=Elnézést, az email regisztráció megerősítését kikapcsolták.
auth_source=Authentication Source
local=Local
auth_source=Hitelesítési forrás
local=Helyi
remember_me=Emlékezz rám
forgot_password=Elfelejtett jelszó
forget_password=Elfelejtette a jelszavát?
@@ -231,7 +231,7 @@ org_name_been_taken=A szervezet neve már foglalt.
team_name_been_taken=Az a csapatnév már foglalt.
email_been_used=Ezt az email címet már felhasználták.
username_password_incorrect=Felhasználó név vagy jelszó hibás.
auth_source_mismatch=The authentication source selected is not associated with the user.
auth_source_mismatch=A kijelölt hitelesítési forráshoz nincs társítva a felhasználó.
enterred_invalid_repo_name=Kérjük, ellenőrizze, hogy a tároló neve helyes.
enterred_invalid_owner_name=Kérjük, ellenőrizze, hogy a tulajdonos neve helyes.
enterred_invalid_password=Kérlek ellenőrizd, hogy a beírt jelszó helyes.
@@ -351,7 +351,7 @@ two_factor_or_enter_secret=Vagy adja meg a titkos kódot:
two_factor_then_enter_passcode=Ezután írja be ezt a jelkódot:
two_factor_verify=Ellenőrzés
two_factor_invalid_passcode=Érvénytelen a megadott jelkód, próbálja meg újra!
two_factor_reused_passcode=The passcode you entered has already been used, please try another one!
two_factor_reused_passcode=A megadott PIN-kód már használatban van. Kérem válasszon másikat!
two_factor_enable_error=Kétlépcsős hitelesítés engedélyezése sikertelen: %v
two_factor_enable_success=Kétlépcsős hitelesítés sikeresen engedélyezve a fiókjához!
two_factor_recovery_codes_title=Kettőlépcsős hitelesítés helyreállítási kódok
@@ -421,8 +421,8 @@ mirror_last_synced=Utoljára szinkr.
watchers=Figyelők
stargazers=Csillagvizsgálók
forks=Másolások
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Tároló leírása. Maximum 512 karakter hosszúságú.
repo_description_length=Rendelkezésre álló karakterek
form.reach_limit_of_creation=A tulajdonos túllépte a maximum létrehozható tárolók számát (%d).
form.name_reserved=Ez a tároló név ('%s') le van foglalva.
@@ -520,7 +520,7 @@ editor.file_changed_while_editing=A fájl tartalma megváltozott mióta elkezdte
editor.file_already_exists=A(z) '%s' nevű fájl már létezik a tárolóban.
editor.no_changes_to_show=Nincsen megjeleníthető változás.
editor.fail_to_update_file=Nem sikerült frissíteni/létrehozni a következő fájlt: '%s' A hiba oka: %v
editor.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=Nem sikerült törölni a következő fájlt: '%s' A hiba oka: %v
editor.add_subdir=Alkönyvtár hozzáadása...
editor.unable_to_upload_files=Nem sikerült feltölteni a fájlokat a "%s" hiba: %v
editor.upload_files_to_dir=Fájlok feltöltése '%s'
@@ -641,7 +641,7 @@ pulls.cannot_auto_merge_desc=Ez a beolvasztási kérés ütközések miatt nem e
pulls.cannot_auto_merge_helper=Kérlek, egyesítsd kézileg a konfliktusok megoldásához.
pulls.create_merge_commit=Eggyesítő commit létrehozása
pulls.rebase_before_merging=Rebase eggyesítés előtt
pulls.commit_description=Commit Description
pulls.commit_description=Commit leírása
pulls.merge_pull_request=Beolvasztási kérés egyesítése
pulls.open_unmerged_pull_exists=`Nem tudja újranyitni, mert már van egy nyitott egyesítési kérés (#%d) ugyanebben a tárolóban, ugyanezekket az egyesítési információkkal, és végrehajtásra vár.`
pulls.delete_branch=Ág törlése
@@ -746,7 +746,7 @@ settings.tracker_issue_style=Külső hibajegykezelő elnevezési stílus:
settings.tracker_issue_style.numeric=Numerikus
settings.tracker_issue_style.alphanumeric=Alfanumerikus
settings.tracker_url_format_desc=Az alábbiak helyettesítik a felhasználónevet, repository nevet és hibajegy számot: <code>{user} {repo} {index}</code>.
settings.pulls_desc=Enable pull requests to accept contributions between repositories and branches
settings.pulls_desc=Beolvasztási kérések engedélyezése tárolók és ágak közi hozzájárulásokhoz
settings.pulls.ignore_whitespace=Whitespacek figyelmen kívül hagyása
settings.pulls.allow_rebase_merge=Rebase engedélyezése eggyesítő commitokhoz
settings.danger_zone=Veszélyes terület
@@ -860,8 +860,8 @@ settings.add_key_success=Az új deploy kulcsot ('%s') sikeresen hozzáadtuk!
settings.deploy_key_deletion=Deploy Kulcs Törlése
settings.deploy_key_deletion_desc=A deploy kulcs törlése minden kapcsolódó hozzáférést töröl a repository-ból. Biztosan folytatod?
settings.deploy_key_deletion_success=A deploy kulcs sikeresen törölve!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Tároló leírása. Maximum 512 karakter hosszúságú.
settings.description_length=Rendelkezésre álló karakterek
diff.browse_source=Forráskód Böngészése
diff.parent=szülő
@@ -1097,12 +1097,12 @@ repos.stars=Csillagok
repos.issues=Problémák
repos.size=Méret
auths.auth_sources=Authentication Sources
auths.auth_sources=Hitelesítési források
auths.new=Új forrás hozzáadása
auths.name=Név
auths.type=Típus
auths.enabled=Engedélyezett
auths.default=Default
auths.default=Alapértelmezett
auths.updated=Frissítve
auths.auth_type=Hitelesítés típusa
auths.auth_name=Hitelesítési név

View File

@@ -119,7 +119,7 @@ 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
smtp_host_missing_port=SMTP Host is missing port in address.
smtp_host_missing_port=All'Host SMTP manca la porta nell'indirizzo.
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
@@ -152,7 +152,7 @@ social_register_hepler_msg=Hai già un account? Associalo ora!
disable_register_prompt=Siamo spiacenti, registrazione è stata disabilitata. Si prega di contattare l'amministratore del sito.
disable_register_mail=Siamo spiacenti, la conferma di registrazione via Mail è stata disattivata.
auth_source=Fonte di autenticazione
local=Local
local=Locale
remember_me=Ricordami
forgot_password=Password dimenticata
forget_password=Password dimenticata?
@@ -380,7 +380,7 @@ orgs.leave_title=Abbandona una organizzazione
orgs.leave_desc=Abbandonando l'organizzazione perderai l'accesso a tutti i repository e i gruppi. Confermi?
repos.leave=Abbandona
repos.leave_title=Leave repository
repos.leave_title=Lascia il repository
repos.leave_desc=You will lose access to the repository after you left. Do you want to continue?
repos.leave_success=You have left repository '%s' successfully!
@@ -422,7 +422,7 @@ watchers=Osservatori
stargazers=Fan
forks=Fork
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_length=Caratteri disponibili
form.reach_limit_of_creation=Il proprietario ha raggiunto il limite massimo di %d repository creati.
form.name_reserved=Il nome repository %s è riservato.
@@ -641,10 +641,10 @@ 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.create_merge_commit=Create a merge commit
pulls.rebase_before_merging=Effettua un Rebase prima del Merge
pulls.commit_description=Commit Description
pulls.commit_description=Descrizione del Commit
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=Elimina Ramo
pulls.delete_branch_has_new_commits=Branch cannot be deleted because it has new commits after mergence.
milestones.new=Nuova Milestone
@@ -692,32 +692,32 @@ wiki.last_updated=Ultimo aggiornamento: %s
settings=Impostazioni
settings.options=Opzioni
settings.collaboration=Collaborazione
settings.collaboration.admin=Admin
settings.collaboration.write=Write
settings.collaboration.read=Read
settings.collaboration.undefined=Undefined
settings.branches=Branches
settings.collaboration.admin=Amministratore
settings.collaboration.write=Scrivi
settings.collaboration.read=Leggi
settings.collaboration.undefined=Indefinito
settings.branches=Divisioni
settings.branches_bare=You cannot manage branches for bare repository. Please push some content first.
settings.default_branch=Default Branch
settings.default_branch=Ramo di default
settings.default_branch_desc=The default branch is considered the "base" branch for code commits, pull requests and online editing.
settings.update=Aggiorna
settings.update_default_branch_unsupported=Change default branch is not supported by the Git version on server.
settings.update_default_branch_success=Default branch of this repository has been updated successfully!
settings.protected_branches=Branch protetti
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.choose_a_branch=Scegli un ramo...
settings.branch_protection=Protezione Ramo
settings.branch_protection_desc=Please choose protect options for branch <b>%s</b>.
settings.protect_this_branch=Protect this branch
settings.protect_this_branch=Proteggere questo ramo
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. Users in whitelist will bypass require pull request check.
settings.protect_whitelist_users=Users who can push to this branch
settings.protect_whitelist_search_users=Search users
settings.protect_whitelist_search_users=Cerca utenti
settings.protect_whitelist_teams=Teams for which members of them can push to this branch
settings.protect_whitelist_search_teams=Search teams
settings.protect_whitelist_search_teams=Cerca Teams
settings.update_protect_branch_success=Protect options for this branch has been updated successfully!
settings.hooks=Webhooks
settings.githooks=Git Hooks
@@ -899,7 +899,7 @@ release.cancel=Annulla
release.publish=Pubblica Rilascio
release.save_draft=Salva Bozza
release.edit_release=Modifica Rilascio
release.delete_release=Cancela questa Release
release.delete_release=Cancella questa Release
release.deletion=Eliminazione Release
release.deletion_desc=Eliminando questa release cancellarai anche i tag Git corrispondenti. Vuoi continuare?
release.deletion_success=La release è stata eliminata con successo!

View File

@@ -151,8 +151,8 @@ register_hepler_msg=既にアカウントをお持ちですか?今すぐログ
social_register_hepler_msg=既にアカウントをお持ちですか?連携しましょう!
disable_register_prompt=申し訳ありませんが、現在登録は受け付けておりません。サイトの管理者にお問い合わせください。
disable_register_mail=申し訳ありませんが、登録メールの確認機能が無効になっています。
auth_source=Authentication Source
local=Local
auth_source=認証ソース
local=ローカル
remember_me=ログインしたままにする
forgot_password=パスワードを忘れた
forget_password=パスワードを忘れましたか?
@@ -231,7 +231,7 @@ org_name_been_taken=組織名は既に使用されています。
team_name_been_taken=チーム名は既に使用されています。
email_been_used=電子メール アドレスは既に使用されています。
username_password_incorrect=ユーザー名またはパスワードが正しくありません。
auth_source_mismatch=The authentication source selected is not associated with the user.
auth_source_mismatch=選択されている認証ソースは、ユーザーに関連付けられていません。
enterred_invalid_repo_name=入力したリポジトリの名前が正しいかどうかを確認してください。
enterred_invalid_owner_name=入力された所有者名が正しいかどうかを確認してください。
enterred_invalid_password=入力したパスワードが正しいか確認してください。

View File

@@ -40,7 +40,7 @@ your_settings=Uw instellingen
activities=Activiteiten
pull_requests=Pull requests
issues=Kwesties
issues=Issues
cancel=Annuleren
@@ -119,7 +119,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
smtp_host_missing_port=SMTP Host is missing port in address.
smtp_host_missing_port=SMTP-Host mist een poort in het adres.
invalid_smtp_from=SMTP-van-veld is niet geldig: %v
save_config_failed=Kan de configuratie niet opslaan: %v
invalid_admin_setting=Uw admin-instellingen zijn niet geldig: %v
@@ -152,7 +152,7 @@ social_register_hepler_msg=Heeft u al een account? Koppel nu!
disable_register_prompt=Sorry, registratie is uitgeschakeld. Neem contact op met de beheerder van deze site.
disable_register_mail=Sorry, bevestiging van registratie per e-mail is uitgeschakeld.
auth_source=Authentication Source
local=Local
local=Lokaal
remember_me=Onthoud mij
forgot_password=Wachtwoord vergeten
forget_password=Wachtwoord vergeten?
@@ -173,10 +173,10 @@ non_local_account=Niet lokale accounts mogen hun wachtwoord niet veranderen via
login_two_factor=Twee-traps authenticatie
login_two_factor_passcode=Authenticatie wachtwoord
login_two_factor_enter_recovery_code=Enter a two-factor recovery code
login_two_factor_recovery=Two-factor Recovery
login_two_factor_recovery_code=Recovery Code
login_two_factor_enter_passcode=Enter a two-factor passcode
login_two_factor_enter_recovery_code=Voer de two-factor herstelcode in
login_two_factor_recovery=Two-factor herstel
login_two_factor_recovery_code=Herstel code
login_two_factor_enter_passcode=Voer een two-factor wachtwoord in
login_two_factor_invalid_recovery_code=Recovery code has been used or does not valid.
[mail]
@@ -456,7 +456,7 @@ quick_guide=Snelstart gids
clone_this_repo=Kloon deze repositorie
create_new_repo_command=Maak een nieuwe repositorie aan vanaf de console
push_exist_repo=Push een bestaande repositorie vanaf de console
bare_message=This repository does not have any content yet.
bare_message=Deze repository bevat nog geen inhoud.
files=Bestanden
branch=Aftakking
@@ -464,7 +464,7 @@ tree=Boom
filter_branch_and_tag=Filter branch of tag
branches=Aftakkingen
tags=Labels
issues=Kwesties
issues=Issues
pulls=Pull-aanvragen
labels=Labels
milestones=Mijlpalen
@@ -565,7 +565,7 @@ issues.filter_milestone_no_select=Geen geselecteerde mijlpaal
issues.filter_assignee=Aangewezene
issues.filter_assginee_no_select=Geen geselecteerde verantwoordelijke
issues.filter_type=Type
issues.filter_type.all_issues=Alle kwesties
issues.filter_type.all_issues=Alle issues
issues.filter_type.assigned_to_you=Aan jou toegewezen
issues.filter_type.created_by_you=Aangemaakt door jou
issues.filter_type.mentioning_you=Vermelden jou
@@ -735,14 +735,14 @@ settings.allow_public_wiki_desc=Allow public access to wiki when repository is p
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=Kwestietracker inschakelen
settings.use_internal_issue_tracker=Gebruik ingebouwde eenvoudige kwestietracker
settings.issues_desc=Issuetracker inschakelen
settings.use_internal_issue_tracker=Gebruik ingebouwde eenvoudige issuetracker
settings.allow_public_issues_desc=Allow public access to issues when repository is private
settings.use_external_issue_tracker=Externe issuetracker gebruiken
settings.external_tracker_url=URL externe kwestietracker
settings.external_tracker_url=URL externe issuetracker
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=Naamgevingstijl externe kwestietracker:
settings.tracker_issue_style=Naamgevingstijl externe issuetracker:
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.
@@ -1094,7 +1094,7 @@ repos.name=Naam
repos.private=Prive
repos.watches=Volgers
repos.stars=Sterren
repos.issues=Kwesties
repos.issues=Issues
repos.size=Size
auths.auth_sources=Authentication Sources
@@ -1300,8 +1300,8 @@ commit_repo=push update naar <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1
compare_commits=Toon vergelijking voor deze %d commits
transfer_repo=repositorie verplaatst naar <code>%s</code> naar <a href="%s">%s</a>
create_issue=`opende issue in <a href="%s/issues/%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>`
close_issue=`gesloten issue <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue=`heropende issue <a href="%s/issues/%s">%s#%[2]s</a>`
comment_issue=`reactie op issue <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>`

View File

@@ -421,8 +421,8 @@ mirror_last_synced=Ostatnia synchronizacja
watchers=Obserwujący
stargazers=Polubienia
forks=Forki
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Opis repozytorium. Maksymalnie 512 znaków.
repo_description_length=Dostępne znaki
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.
@@ -520,7 +520,7 @@ editor.file_changed_while_editing=Zawartość pliku została zmieniona od rozpoc
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.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=Nie można usunąć pliku '%s' z powodu błędu: %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'
@@ -860,8 +860,8 @@ settings.add_key_success=Nowy klucz wdrożenia '%s' został pomyślnie dodany!
settings.deploy_key_deletion=Utwórz klucz wdrożenia
settings.deploy_key_deletion_desc=Usunięcie tego klucza wdrożenia spowoduje usunięcie powiązanego dostępu do tego repozytorium. Czy chcesz kontynuować?
settings.deploy_key_deletion_success=Klucz wdrożenia został pomyślnie usunięty!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Opis repozytorium. Maksymalnie 512 znaków.
settings.description_length=Dostępne znaki
diff.browse_source=Przeglądaj źródła
diff.parent=rodzic
@@ -1102,7 +1102,7 @@ auths.new=Dodaj nowe źródło
auths.name=Nazwa
auths.type=Typ
auths.enabled=Włączono
auths.default=Default
auths.default=Domyślne
auths.updated=Zaktualizowano
auths.auth_type=Typ uwierzytelniania
auths.auth_name=Nazwa uwierzytelniania
@@ -1141,7 +1141,7 @@ auths.pam_service_name=Nazwa usługi PAM
auths.enable_auto_register=Włącz automatyczną rejestrację
auths.edit=Edytuj ustawienia uwierzytelniania
auths.activated=To uwierzytelnienie zostało aktywowane
auths.default_auth=This authentication is default login source
auths.default_auth=To uwierzytelnianie jest domyślnym źródłem logowania
auths.new_success=Pomyślnie dodano nowe uwierzytelnianie '%s'.
auths.update_success=Ustawienia uwierzytelnienia zostały zaktualizowane pomyślnie.
auths.update=Aktualizuj ustawienia uwierzytelniania

View File

@@ -421,8 +421,8 @@ mirror_last_synced=Последняя синхронизация
watchers=Наблюдатели
stargazers=Звездочеты
forks=Ответвления
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Описание репозитория. Максимальная длина 512 символов.
repo_description_length=Доступные символы
form.reach_limit_of_creation=У владельца достигнут максимальный предел в %d создаваемых репозиториев.
form.name_reserved=Имя репозитория '%s' зарезервировано.
@@ -641,7 +641,7 @@ pulls.cannot_auto_merge_desc=Этот запрос на слияние не мо
pulls.cannot_auto_merge_helper=Пожалуйста, совершите слияние вручную для урегулирования конфликтов.
pulls.create_merge_commit=Создать коммит на слияние
pulls.rebase_before_merging=Выполнить rebase перед слиянием
pulls.commit_description=Commit Description
pulls.commit_description=Описание коммита
pulls.merge_pull_request=Слить пулл-реквест
pulls.open_unmerged_pull_exists=`Вы не можете снова открыть, поскольку уже существует запрос на слияние (#%d) из того же репозитория с той же информацией о слиянии и ожидающий слияния. `
pulls.delete_branch=Удалить ветку
@@ -860,8 +860,8 @@ settings.add_key_success=Новый ключ развертывания '%s' у
settings.deploy_key_deletion=Удалить ключ развертывания
settings.deploy_key_deletion_desc=Удаление ключа развертывания приведет к удалению всех связанных прав доступа к репозиторию. Вы хотите продолжить?
settings.deploy_key_deletion_success=Ключ развертывания успешно удален!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Описание репозитория. Максимальная длина 512 символов.
settings.description_length=Доступные символы
diff.browse_source=Просмотр исходного кода
diff.parent=Родитель
@@ -1102,7 +1102,7 @@ auths.new=Добавить новый источник
auths.name=Имя
auths.type=Тип
auths.enabled=Включено
auths.default=Default
auths.default=По умолчанию
auths.updated=Обновлено
auths.auth_type=Тип аутентификации
auths.auth_name=Имя аутентификации

View File

@@ -151,8 +151,8 @@ register_hepler_msg=Máte už účet? Prihláste sa teraz!
social_register_hepler_msg=Máte už účet? Bindovať teraz!
disable_register_prompt=Ospravedlňujeme sa, ale registrácia bola vypnutá. Obráťte sa na administrátora stránky.
disable_register_mail=Ospravedlňujeme sa, potvrdenie registračného e-mailu bolo vypnuté.
auth_source=Authentication Source
local=Local
auth_source=Zdroj overovania
local=Lokálny
remember_me=Zapamätať prihlásenie
forgot_password=Zabudnuté heslo
forget_password=Zabudli ste heslo?
@@ -231,7 +231,7 @@ org_name_been_taken=Názov organizácie už bol použitý.
team_name_been_taken=Názov tímu už bol použitý.
email_been_used=E-mailová adresa už bola použitá.
username_password_incorrect=Používateľské meno alebo heslo nie je správne.
auth_source_mismatch=The authentication source selected is not associated with the user.
auth_source_mismatch=Vybraný zdroj overenia nieje prepojený s užívateľom.
enterred_invalid_repo_name=Uistite sa prosím, že názov repozitára, ktorý ste zadali je správny.
enterred_invalid_owner_name=Uistite sa prosím, že meno vlastníka, ktoré ste zadali je správne.
enterred_invalid_password=Uistite sa prosím, že heslo ktoré ste zadali je správne.
@@ -1097,12 +1097,12 @@ repos.stars=Hviezdy
repos.issues=Issues
repos.size=Veľkosť
auths.auth_sources=Authentication Sources
auths.auth_sources=Zdroje overenia
auths.new=Pridať nový zdroj
auths.name=Názov
auths.type=Typ
auths.enabled=Povolené
auths.default=Default
auths.default=Predvolený
auths.updated=Aktualizované
auths.auth_type=Typ overenia
auths.auth_name=Názov overenia

View File

@@ -421,8 +421,8 @@ mirror_last_synced=Востаннє синхронізовано
watchers=Спостерігачі
stargazers=Шанувальники
forks=Відгалуження
repo_description_helper=Description of repository. Maximum 512 characters length.
repo_description_length=Available characters
repo_description_helper=Опис репозиторію. До 512-ти символів довжиною.
repo_description_length=Доступні символи
form.reach_limit_of_creation=Власник досягнув максимальної кількості у %d створених репозиторіїв.
form.name_reserved=Назва репозиторія '%s' зарезервовано.
@@ -520,7 +520,7 @@ editor.file_changed_while_editing=Вміст файлу було змінено
editor.file_already_exists=Файл на ім'я '%s' вже присутній у репозиторії.
editor.no_changes_to_show=Нема змін для показу.
editor.fail_to_update_file=Не вдалося оновити/створити файл '%s' через помилку: %v
editor.fail_to_delete_file=Failed to delete file '%s' with error: %v
editor.fail_to_delete_file=Не вдалося видалити файл '%s' через помилку: %v
editor.add_subdir=Додати підкаталогу...
editor.unable_to_upload_files=Не вдалося завантажити файли до '%s' через помилку: %v
editor.upload_files_to_dir=Завантажувати файли до '%s'
@@ -641,7 +641,7 @@ pulls.cannot_auto_merge_desc=Цей запрос не може бути влит
pulls.cannot_auto_merge_helper=Будь ласка влийте вручну щоб врегулювати конфлікти.
pulls.create_merge_commit=Створити коміт на злиття
pulls.rebase_before_merging=Перебазувати перед об'єднанням
pulls.commit_description=Commit Description
pulls.commit_description=Опис коміту
pulls.merge_pull_request=Влити запрос на злиття
pulls.open_unmerged_pull_exists=`Ви не можете перевідкрити, бо вже існує запрос на злиття (#%d) з того самого репозиторію, з тією самою інформацією про злиття, та він очікує на влиття.`
pulls.delete_branch=Видалити гілку
@@ -746,7 +746,7 @@ settings.tracker_issue_style=Стиль найменування задач в
settings.tracker_issue_style.numeric=Цифровий
settings.tracker_issue_style.alphanumeric=Буквено-цифровий
settings.tracker_url_format_desc=Ви можете використовувати заповнювач <code>{user} {repo} {index}</code> для ім'я користувача, назви репозиторію на номеру проблеми.
settings.pulls_desc=Enable pull requests to accept contributions between repositories and branches
settings.pulls_desc=Увімкнути запити на злиття щоб дозволити внески між репозиторіями й гілками
settings.pulls.ignore_whitespace=Ігнорувати зміни у пробільних символах
settings.pulls.allow_rebase_merge=Дозволити перебазування для merge-комітів
settings.danger_zone=Небезпечна зона
@@ -860,8 +860,8 @@ settings.add_key_success=Новий ключ розгортування '%s' у
settings.deploy_key_deletion=Видалити ключ для розгортування
settings.deploy_key_deletion_desc=Видалення цього ключа для розгортування призведе о видалення усіх пов'язаних прав до цього репозиторію. Ви справді бажаєте продовжити?
settings.deploy_key_deletion_success=Ключі для розгортування було успішно видалено!
settings.description_desc=Description of repository. Maximum 512 characters length.
settings.description_length=Available characters
settings.description_desc=Опис репозиторію. До 512-ти символів довжиною.
settings.description_length=Доступні символи
diff.browse_source=Переглянути джерело
diff.parent=батько
@@ -1102,7 +1102,7 @@ auths.new=Додати нове джерело
auths.name=Назва
auths.type=Тип
auths.enabled=Увімкнено
auths.default=Default
auths.default=За замовчанням
auths.updated=Оновлено
auths.auth_type=Тип автентифікації
auths.auth_name=Назва автентифікації
@@ -1141,7 +1141,7 @@ auths.pam_service_name=Ім'я служби PAM
auths.enable_auto_register=Увімкнути автоматичну реєстрацію
auths.edit=Редагувати налаштування автентифікації
auths.activated=Цю автентифікацію активовано
auths.default_auth=This authentication is default login source
auths.default_auth=Це метод автентифікації за замовчанням
auths.new_success=Нову автентифікацію '%s' було успішно додано.
auths.update_success=Налаштування автентифікації було успішно оновлено.
auths.update=Оновити налаштування автентифікації

View File

@@ -108,11 +108,11 @@ Steps to upgrade Gogs with Docker:
- `docker pull gogs/gogs`
- `docker stop gogs`
- `docker rm gogs`
- Finally, create container as the first time and don't forget to do same volume and port mapping.
- Finally, create a container for the first time and don't forget to do the same for the volume and port mapping.
## 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.
- The docker container cannot currently be built on Raspberry 1 (armv6l) as our base image `alpine` does not have a `go` package available for this platform.
## Useful Links

View File

@@ -1,4 +1,4 @@
// +build go1.6
// +build go1.7
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
@@ -16,7 +16,7 @@ import (
"github.com/gogs/gogs/pkg/setting"
)
const APP_VER = "0.11.66.0916"
const APP_VER = "0.11.79.1211"
func init() {
setting.AppVer = APP_VER

View File

@@ -7,7 +7,6 @@ package models
import (
"fmt"
"os"
"os/exec"
"strings"
"time"
@@ -15,7 +14,6 @@ import (
"github.com/go-xorm/xorm"
log "gopkg.in/clog.v1"
"github.com/gogs/gogs/pkg/setting"
"github.com/gogs/gogs/pkg/tool"
)
@@ -52,9 +50,9 @@ func (n *Notice) TrStr() string {
// CreateNotice creates new system notice.
func CreateNotice(tp NoticeType, desc string) error {
// prevent panic if database connection is not available at this point
// Prevent panic if database connection is not available at this point
if x == nil {
return fmt.Errorf("Could not save notice due database connection not being available: %d %s", tp, desc)
return fmt.Errorf("could not save notice due database connection not being available: %d %s", tp, desc)
}
n := &Notice{
@@ -73,24 +71,11 @@ func CreateRepositoryNotice(desc string) error {
// RemoveAllWithNotice removes all directories in given path and
// creates a system notice when error occurs.
func RemoveAllWithNotice(title, path string) {
var err error
// LEGACY [Go 1.7, 0.12]: 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
// 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()
} else {
err = os.RemoveAll(path)
}
if err != nil {
if err := os.RemoveAll(path); err != nil {
desc := fmt.Sprintf("%s [%s]: %v", title, path, err)
log.Warn(desc)
if err = CreateRepositoryNotice(desc); err != nil {
log.Error(4, "CreateRepositoryNotice: %v", err)
log.Error(2, "CreateRepositoryNotice: %v", err)
}
}
}

21
models/errors/org.go Normal file
View File

@@ -0,0 +1,21 @@
// Copyright 2018 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 errors
import "fmt"
type TeamNotExist struct {
TeamID int64
Name string
}
func IsTeamNotExist(err error) bool {
_, ok := err.(TeamNotExist)
return ok
}
func (err TeamNotExist) Error() string {
return fmt.Sprintf("team does not exist [team_id: %d, name: %s]", err.TeamID, err.Name)
}

View File

@@ -160,8 +160,8 @@ func (issue *Issue) HTMLURL() string {
}
// State returns string representation of issue status.
func (i *Issue) State() api.StateType {
if i.IsClosed {
func (issue *Issue) State() api.StateType {
if issue.IsClosed {
return api.STATE_CLOSED
}
return api.STATE_OPEN
@@ -208,22 +208,22 @@ func (issue *Issue) APIFormat() *api.Issue {
}
// HashTag returns unique hash tag for issue.
func (i *Issue) HashTag() string {
return "issue-" + com.ToStr(i.ID)
func (issue *Issue) HashTag() string {
return "issue-" + com.ToStr(issue.ID)
}
// IsPoster returns true if given user by ID is the poster.
func (i *Issue) IsPoster(uid int64) bool {
return i.PosterID == uid
func (issue *Issue) IsPoster(uid int64) bool {
return issue.PosterID == uid
}
func (i *Issue) hasLabel(e Engine, labelID int64) bool {
return hasIssueLabel(e, i.ID, labelID)
func (issue *Issue) hasLabel(e Engine, labelID int64) bool {
return hasIssueLabel(e, issue.ID, labelID)
}
// HasLabel returns true if issue has been labeled by given ID.
func (i *Issue) HasLabel(labelID int64) bool {
return i.hasLabel(x, labelID)
func (issue *Issue) HasLabel(labelID int64) bool {
return issue.hasLabel(x, labelID)
}
func (issue *Issue) sendLabelUpdatedWebhook(doer *User) {
@@ -255,8 +255,8 @@ func (issue *Issue) sendLabelUpdatedWebhook(doer *User) {
}
}
func (i *Issue) addLabel(e *xorm.Session, label *Label) error {
return newIssueLabel(e, i, label)
func (issue *Issue) addLabel(e *xorm.Session, label *Label) error {
return newIssueLabel(e, issue, label)
}
// AddLabel adds a new label to the issue.
@@ -314,8 +314,13 @@ func (issue *Issue) clearLabels(e *xorm.Session) (err error) {
return fmt.Errorf("getLabels: %v", err)
}
// NOTE: issue.removeLabel slices issue.Labels, so we need to create another slice to be unaffected.
labels := make([]*Label, len(issue.Labels))
for i := range issue.Labels {
if err = issue.removeLabel(e, issue.Labels[i]); err != nil {
labels[i] = issue.Labels[i]
}
for i := range labels {
if err = issue.removeLabel(e, labels[i]); err != nil {
return fmt.Errorf("removeLabel: %v", err)
}
}
@@ -384,12 +389,12 @@ func (issue *Issue) ReplaceLabels(labels []*Label) (err error) {
return sess.Commit()
}
func (i *Issue) GetAssignee() (err error) {
if i.AssigneeID == 0 || i.Assignee != nil {
func (issue *Issue) GetAssignee() (err error) {
if issue.AssigneeID == 0 || issue.Assignee != nil {
return nil
}
i.Assignee, err = GetUserByID(i.AssigneeID)
issue.Assignee, err = GetUserByID(issue.AssigneeID)
if errors.IsUserNotExist(err) {
return nil
}
@@ -397,8 +402,8 @@ func (i *Issue) GetAssignee() (err error) {
}
// ReadBy sets issue to be read by given user.
func (i *Issue) ReadBy(uid int64) error {
return UpdateIssueUserByRead(uid, i.ID)
func (issue *Issue) ReadBy(uid int64) error {
return UpdateIssueUserByRead(uid, issue.ID)
}
func updateIssueCols(e Engine, issue *Issue, cols ...string) error {
@@ -411,41 +416,41 @@ func UpdateIssueCols(issue *Issue, cols ...string) error {
return updateIssueCols(x, issue, cols...)
}
func (i *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository, isClosed bool) (err error) {
func (issue *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository, isClosed bool) (err error) {
// Nothing should be performed if current status is same as target status
if i.IsClosed == isClosed {
if issue.IsClosed == isClosed {
return nil
}
i.IsClosed = isClosed
issue.IsClosed = isClosed
if err = updateIssueCols(e, i, "is_closed"); err != nil {
if err = updateIssueCols(e, issue, "is_closed"); err != nil {
return err
} else if err = updateIssueUsersByStatus(e, i.ID, isClosed); err != nil {
} else if err = updateIssueUsersByStatus(e, issue.ID, isClosed); err != nil {
return err
}
// Update issue count of labels
if err = i.getLabels(e); err != nil {
if err = issue.getLabels(e); err != nil {
return err
}
for idx := range i.Labels {
if i.IsClosed {
i.Labels[idx].NumClosedIssues++
for idx := range issue.Labels {
if issue.IsClosed {
issue.Labels[idx].NumClosedIssues++
} else {
i.Labels[idx].NumClosedIssues--
issue.Labels[idx].NumClosedIssues--
}
if err = updateLabel(e, i.Labels[idx]); err != nil {
if err = updateLabel(e, issue.Labels[idx]); err != nil {
return err
}
}
// Update issue count of milestone
if err = changeMilestoneIssueStats(e, i); err != nil {
if err = changeMilestoneIssueStats(e, issue); err != nil {
return err
}
// New action comment
if _, err = createStatusComment(e, doer, repo, i); err != nil {
if _, err = createStatusComment(e, doer, repo, issue); err != nil {
return err
}

View File

@@ -5,6 +5,7 @@
package models
import (
"container/list"
"fmt"
"net/url"
"strings"
@@ -211,7 +212,6 @@ func parseRemoteUpdateOutput(output string) []*mirrorSyncResult {
}
refName := lines[i][idx+3:]
switch {
case strings.HasPrefix(lines[i], " * "): // New reference
results = append(results, &mirrorSyncResult{
@@ -403,14 +403,6 @@ func SyncMirrors() {
continue
}
// Create reference
if result.oldCommitID == GIT_SHORT_EMPTY_SHA {
if err = MirrorSyncCreateAction(m.Repo, result.refName); err != nil {
log.Error(2, "MirrorSyncCreateAction [repo_id: %d]: %v", m.RepoID, err)
}
continue
}
// Delete reference
if result.newCommitID == GIT_SHORT_EMPTY_SHA {
if err = MirrorSyncDeleteAction(m.Repo, result.refName); err != nil {
@@ -419,21 +411,54 @@ func SyncMirrors() {
continue
}
// New reference
isNewRef := false
if result.oldCommitID == GIT_SHORT_EMPTY_SHA {
if err = MirrorSyncCreateAction(m.Repo, result.refName); err != nil {
log.Error(2, "MirrorSyncCreateAction [repo_id: %d]: %v", m.RepoID, err)
continue
}
isNewRef = true
}
// Push commits
oldCommitID, err := git.GetFullCommitID(gitRepo.Path, result.oldCommitID)
if err != nil {
log.Error(2, "GetFullCommitID [%d]: %v", m.RepoID, err)
continue
}
newCommitID, err := git.GetFullCommitID(gitRepo.Path, result.newCommitID)
if err != nil {
log.Error(2, "GetFullCommitID [%d]: %v", m.RepoID, err)
continue
}
commits, err := gitRepo.CommitsBetweenIDs(newCommitID, oldCommitID)
if err != nil {
log.Error(2, "CommitsBetweenIDs [repo_id: %d, new_commit_id: %s, old_commit_id: %s]: %v", m.RepoID, newCommitID, oldCommitID, err)
continue
var commits *list.List
var oldCommitID string
var newCommitID string
if !isNewRef {
oldCommitID, err = git.GetFullCommitID(gitRepo.Path, result.oldCommitID)
if err != nil {
log.Error(2, "GetFullCommitID [%d]: %v", m.RepoID, err)
continue
}
newCommitID, err = git.GetFullCommitID(gitRepo.Path, result.newCommitID)
if err != nil {
log.Error(2, "GetFullCommitID [%d]: %v", m.RepoID, err)
continue
}
commits, err = gitRepo.CommitsBetweenIDs(newCommitID, oldCommitID)
if err != nil {
log.Error(2, "CommitsBetweenIDs [repo_id: %d, new_commit_id: %s, old_commit_id: %s]: %v", m.RepoID, newCommitID, oldCommitID, err)
continue
}
} else {
refNewCommitID, err := gitRepo.GetBranchCommitID(result.refName)
if err != nil {
log.Error(2, "GetFullCommitID [%d]: %v", m.RepoID, err)
continue
}
if newCommit, err := gitRepo.GetCommit(refNewCommitID); err != nil {
log.Error(2, "GetCommit [repo_id: %d, commit_id: %s]: %v", m.RepoID, refNewCommitID, err)
continue
} else {
// TODO: Get the commits for the new ref until the closest ancestor branch like Github does
commits, err = newCommit.CommitsBeforeLimit(10)
if err != nil {
log.Error(2, "CommitsBeforeLimit [repo_id: %d, commit_id: %s]: %v", m.RepoID, refNewCommitID, err)
}
oldCommitID = git.EMPTY_SHA
newCommitID = refNewCommitID
}
}
if err = MirrorSyncPushAction(m.Repo, MirrorSyncPushActionOptions{
RefName: result.refName,

View File

@@ -15,8 +15,7 @@ import (
)
var (
ErrOrgNotExist = errors.New("Organization does not exist")
ErrTeamNotExist = errors.New("Team does not exist")
ErrOrgNotExist = errors.New("Organization does not exist")
)
// IsOwnedBy returns true if given user is in the owner team.

View File

@@ -5,11 +5,12 @@
package models
import (
"errors"
"fmt"
"strings"
"github.com/go-xorm/xorm"
"github.com/gogs/gogs/models/errors"
)
const OWNER_TEAM = "Owners"
@@ -274,7 +275,7 @@ func getTeamOfOrgByName(e Engine, orgID int64, name string) (*Team, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrTeamNotExist
return nil, errors.TeamNotExist{0, name}
}
return t, nil
}
@@ -290,7 +291,7 @@ func getTeamByID(e Engine, teamID int64) (*Team, error) {
if err != nil {
return nil, err
} else if !has {
return nil, ErrTeamNotExist
return nil, errors.TeamNotExist{teamID, ""}
}
return t, nil
}

View File

@@ -132,6 +132,7 @@ func (u *User) APIFormat() *api.User {
return &api.User{
ID: u.ID,
UserName: u.Name,
Login: u.Name,
FullName: u.FullName,
Email: u.Email,
AvatarUrl: u.AvatarLink(),

View File

@@ -23,10 +23,11 @@ func IsAPIPath(url string) bool {
return strings.HasPrefix(url, "/api/")
}
// SignedInID returns the id of signed in user.
func SignedInID(c *macaron.Context, sess session.Store) int64 {
// SignedInID returns the id of signed in user, along with one bool value which indicates whether user uses token
// authentication.
func SignedInID(c *macaron.Context, sess session.Store) (_ int64, isTokenAuth bool) {
if !models.HasEngine {
return 0
return 0, false
}
// Check access token.
@@ -53,40 +54,40 @@ func SignedInID(c *macaron.Context, sess session.Store) int64 {
if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) {
log.Error(2, "GetAccessTokenBySHA: %v", err)
}
return 0
return 0, false
}
t.Updated = time.Now()
if err = models.UpdateAccessToken(t); err != nil {
log.Error(2, "UpdateAccessToken: %v", err)
}
return t.UID
return t.UID, true
}
}
uid := sess.Get("uid")
if uid == nil {
return 0
return 0, false
}
if id, ok := uid.(int64); ok {
if _, err := models.GetUserByID(id); err != nil {
if !errors.IsUserNotExist(err) {
log.Error(2, "GetUserByID: %v", err)
}
return 0
return 0, false
}
return id
return id, false
}
return 0
return 0, false
}
// SignedInUser returns the user object of signed user.
// It returns a bool value to indicate whether user uses basic auth or not.
func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool) {
// SignedInUser returns the user object of signed in user, along with two bool values,
// which indicate whether user uses HTTP Basic Authentication or token authentication respectively.
func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *models.User, isBasicAuth bool, isTokenAuth bool) {
if !models.HasEngine {
return nil, false
return nil, false, false
}
uid := SignedInID(ctx, sess)
uid, isTokenAuth := SignedInID(ctx, sess)
if uid <= 0 {
if setting.Service.EnableReverseProxyAuth {
@@ -95,8 +96,8 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
u, err := models.GetUserByName(webAuthUser)
if err != nil {
if !errors.IsUserNotExist(err) {
log.Error(4, "GetUserByName: %v", err)
return nil, false
log.Error(2, "GetUserByName: %v", err)
return nil, false, false
}
// Check if enabled auto-registration.
@@ -109,14 +110,14 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
}
if err = models.CreateUser(u); err != nil {
// FIXME: should I create a system notice?
log.Error(4, "CreateUser: %v", err)
return nil, false
log.Error(2, "CreateUser: %v", err)
return nil, false, false
} else {
return u, false
return u, false, false
}
}
}
return u, false
return u, false, false
}
}
@@ -130,21 +131,21 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
u, err := models.UserLogin(uname, passwd, -1)
if err != nil {
if !errors.IsUserNotExist(err) {
log.Error(4, "UserLogin: %v", err)
log.Error(2, "UserLogin: %v", err)
}
return nil, false
return nil, false, false
}
return u, true
return u, true, false
}
}
return nil, false
return nil, false, false
}
u, err := models.GetUserByID(uid)
if err != nil {
log.Error(4, "GetUserById: %v", err)
return nil, false
log.Error(2, "GetUserByID: %v", err)
return nil, false, false
}
return u, false
return u, false, isTokenAuth
}

View File

@@ -11,7 +11,7 @@ LDAP via BindDN functions like most LDAP authentication systems. First, it
queries the LDAP server using a Bind DN and searches for the user that is
attempting to sign in. If the user is found, the module attempts to bind to the
server using the user's supplied credentials. If this succeeds, the user has
been authenticated, and his account information is retrieved and passed to the
been authenticated, and their account information is retrieved and passed to the
Gogs login infrastructure.
LDAP simple authentication does not utilize a Bind DN. Instead, it binds
@@ -20,7 +20,7 @@ succeeds and no filter rules out the user, the user is authenticated.
LDAP via BindDN is recommended for most users. By using a Bind DN, the server
can perform authorization by restricting which entries the Bind DN account can
read. Further, using a Bind DN with reduced permissions can reduce security risk
read. Furthermore, using a Bind DN with reduced permissions can reduce security risk
in the face of application bugs.
## Usage

View File

@@ -268,16 +268,26 @@ func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, str
if err != nil {
log.Error(2, "LDAP: Group search failed: %v", err)
return "", "", "", "", false, false
} else if len(sr.Entries) < 1 {
} else if len(srg.Entries) < 1 {
log.Error(2, "LDAP: Group search failed: 0 entries")
return "", "", "", "", false, false
}
isMember := false
for _, group := range srg.Entries {
for _, member := range group.GetAttributeValues(ls.GroupMemberUID) {
if member == uid {
isMember = true
if ls.UserUID == "dn" {
for _, group := range srg.Entries {
for _, member := range group.GetAttributeValues(ls.GroupMemberUID) {
if member == sr.Entries[0].DN {
isMember = true
}
}
}
} else {
for _, group := range srg.Entries {
for _, member := range group.GetAttributeValues(ls.GroupMemberUID) {
if member == uid {
isMember = true
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -6,6 +6,7 @@ package context
import (
"fmt"
"net/http"
"strings"
"github.com/Unknwon/paginater"
@@ -33,7 +34,7 @@ func (c *APIContext) Error(status int, title string, obj interface{}) {
message = obj.(string)
}
if status == 500 {
if status == http.StatusInternalServerError {
log.Error(3, "%s: %s", title, message)
}
@@ -43,6 +44,32 @@ func (c *APIContext) Error(status int, title string, obj interface{}) {
})
}
// NoContent renders the 204 response.
func (c *APIContext) NoContent() {
c.Status(http.StatusNoContent)
}
// NotFound renders the 404 response.
func (c *APIContext) NotFound() {
c.Status(http.StatusNotFound)
}
// ServerError renders the 500 response.
func (c *APIContext) ServerError(title string, err error) {
c.Error(http.StatusInternalServerError, title, err)
}
// NotFoundOrServerError use error check function to determine if the error
// is about not found. It responses with 404 status code for not found error,
// or error context description for logging purpose of 500 server error.
func (c *APIContext) NotFoundOrServerError(title string, errck func(error) bool, err error) {
if errck(err) {
c.NotFound()
return
}
c.ServerError(title, err)
}
// SetLinkHeader sets pagination link header by given total number and page size.
func (c *APIContext) SetLinkHeader(total, pageSize int) {
page := paginater.New(total, pageSize, c.QueryInt("page"), 0)

View File

@@ -6,7 +6,6 @@ package context
import (
"fmt"
"html/template"
"io"
"net/http"
"path"
@@ -26,6 +25,7 @@ import (
"github.com/gogs/gogs/pkg/auth"
"github.com/gogs/gogs/pkg/form"
"github.com/gogs/gogs/pkg/setting"
"github.com/gogs/gogs/pkg/template"
)
// Context represents context of a request.
@@ -40,6 +40,7 @@ type Context struct {
User *models.User
IsLogged bool
IsBasicAuth bool
IsTokenAuth bool
Repo *Repository
Org *Organization
@@ -138,10 +139,21 @@ func (c *Context) JSONSuccess(data interface{}) {
c.JSON(http.StatusOK, data)
}
// RawRedirect simply calls underlying Redirect method with no escape.
func (c *Context) RawRedirect(location string, status ...int) {
c.Context.Redirect(location, status...)
}
// Redirect responses redirection wtih given location and status.
// It escapes special characters in the location string.
func (c *Context) Redirect(location string, status ...int) {
c.Context.Redirect(template.EscapePound(location), status...)
}
// SubURLRedirect responses redirection wtih given location and status.
// It prepends setting.AppSubURL to the location string.
func (c *Context) SubURLRedirect(location string, status ...int) {
c.Redirect(setting.AppSubURL + location)
c.Redirect(setting.AppSubURL+location, status...)
}
// RenderWithErr used for page has form validation but need to prompt error to users.
@@ -227,7 +239,7 @@ func Contexter() macaron.Handler {
},
Org: &Organization{},
}
c.Data["Link"] = c.Link
c.Data["Link"] = template.EscapePound(c.Link)
c.Data["PageStartTime"] = time.Now()
// Quick responses appropriate go-get meta with status 200
@@ -252,6 +264,10 @@ func Contexter() macaron.Handler {
}
prefix := setting.AppURL + path.Join(ownerName, repoName, "src", branchName)
insecureFlag := ""
if !strings.HasPrefix(setting.AppURL, "https://") {
insecureFlag = "--insecure "
}
c.PlainText(http.StatusOK, []byte(com.Expand(`<!doctype html>
<html>
<head>
@@ -259,14 +275,15 @@ func Contexter() macaron.Handler {
<meta name="go-source" content="{GoGetImport} _ {GoDocDirectory} {GoDocFile}">
</head>
<body>
go get {GoGetImport}
go get {InsecureFlag}{GoGetImport}
</body>
</html>
`, map[string]string{
"GoGetImport": path.Join(setting.Domain, setting.AppSubURL, repo.FullName()),
"GoGetImport": path.Join(setting.HostAddress, setting.AppSubURL, repo.FullName()),
"CloneLink": models.ComposeHTTPSCloneURL(ownerName, repoName),
"GoDocDirectory": prefix + "{/dir}",
"GoDocFile": prefix + "{/dir}/{file}#L{line}",
"InsecureFlag": insecureFlag,
})))
return
}
@@ -278,8 +295,8 @@ func Contexter() macaron.Handler {
c.Header().Set("Access-Control-Allow-Headers", "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With")
}
// Get user from session if logined.
c.User, c.IsBasicAuth = auth.SignedInUser(c.Context, c.Session)
// Get user from session or header when possible
c.User, c.IsBasicAuth, c.IsTokenAuth = auth.SignedInUser(c.Context, c.Session)
if c.User != nil {
c.IsLogged = true
@@ -296,13 +313,13 @@ func Contexter() macaron.Handler {
// If request sends files, parse them here otherwise the Query() can't be parsed and the CsrfToken will be invalid.
if c.Req.Method == "POST" && strings.Contains(c.Req.Header.Get("Content-Type"), "multipart/form-data") {
if err := c.Req.ParseMultipartForm(setting.AttachmentMaxSize << 20); err != nil && !strings.Contains(err.Error(), "EOF") { // 32MB max size
c.Handle(500, "ParseMultipartForm", err)
c.ServerError("ParseMultipartForm", err)
return
}
}
c.Data["CSRFToken"] = x.GetToken()
c.Data["CSRFTokenHTML"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
c.Data["CSRFTokenHTML"] = template.Safe(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
log.Trace("Session ID: %s", sess.ID())
log.Trace("CSRF Token: %v", c.Data["CSRFToken"])

30
pkg/context/user.go Normal file
View File

@@ -0,0 +1,30 @@
// Copyright 2018 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 context
import (
"gopkg.in/macaron.v1"
"github.com/gogs/gogs/models"
"github.com/gogs/gogs/models/errors"
)
// ParamsUser is the wrapper type of the target user defined by URL parameter, namely ':username'.
type ParamsUser struct {
*models.User
}
// InjectParamsUser returns a handler that retrieves target user based on URL parameter ':username',
// and injects it as *ParamsUser.
func InjectParamsUser() macaron.Handler {
return func(c *Context) {
user, err := models.GetUserByName(c.Params(":username"))
if err != nil {
c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
return
}
c.Map(&ParamsUser{user})
}
}

View File

@@ -190,6 +190,12 @@ func wrapImgWithLink(urlPrefix string, buf *bytes.Buffer, token html.Token) {
return
}
// Skip in case the "src" is data url
if strings.HasPrefix(src, "data:") {
buf.WriteString(token.String())
return
}
// Prepend repository base URL for internal links
needPrepend := !isLink([]byte(src))
if needPrepend {

View File

@@ -36,6 +36,9 @@ func NewSanitizer() {
sanitizer.policy.AllowAttrs("type").Matching(regexp.MustCompile(`^checkbox$`)).OnElements("input")
sanitizer.policy.AllowAttrs("checked", "disabled").OnElements("input")
// Data URLs
sanitizer.policy.AllowURLSchemes("data")
// Custom URL-Schemes
sanitizer.policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...)
})

View File

@@ -61,6 +61,7 @@ var (
AppSubURLDepth int // Number of slashes
AppPath string
AppDataPath string
HostAddress string // AppURL without protocol and slashes
// Server settings
Protocol Scheme
@@ -463,6 +464,7 @@ func NewContext() {
// This value is empty if site does not have sub-url.
AppSubURL = strings.TrimSuffix(url.Path, "/")
AppSubURLDepth = strings.Count(AppSubURL, "/")
HostAddress = url.Host
Protocol = SCHEME_HTTP
if sec.Key("PROTOCOL").String() == "https" {

View File

@@ -175,11 +175,11 @@ func Listen(host string, port int, ciphers []string) {
privateBytes, err := ioutil.ReadFile(keyPath)
if err != nil {
panic("SSH: Fail to load private key")
panic("SSH: Fail to load private key: " + err.Error())
}
private, err := ssh.ParsePrivateKey(privateBytes)
if err != nil {
panic("SSH: Fail to parse private key")
panic("SSH: Fail to parse private key: " + err.Error())
}
config.AddHostKey(private)

View File

@@ -64,7 +64,7 @@ func NewFuncMap() []template.FuncMap {
"AppendAvatarSize": tool.AppendAvatarSize,
"Safe": Safe,
"Sanitize": bluemonday.UGCPolicy().Sanitize,
"Str2html": Str2html,
"Str2HTML": Str2HTML,
"NewLine2br": NewLine2br,
"TimeSince": tool.TimeSince,
"RawTimeSince": tool.RawTimeSince,
@@ -127,7 +127,7 @@ func Safe(raw string) template.HTML {
return template.HTML(raw)
}
func Str2html(raw string) template.HTML {
func Str2HTML(raw string) template.HTML {
return template.HTML(markup.Sanitize(raw))
}
@@ -176,12 +176,14 @@ func ToUTF8WithErr(content []byte) (error, string) {
return err, result
}
// FIXME: Unused function
func ToUTF8(content string) string {
_, res := ToUTF8WithErr([]byte(content))
return res
}
// Replaces all prefixes 'old' in 's' with 'new'.
// FIXME: Unused function
func ReplaceLeft(s, old, new string) string {
old_len, new_len, i, n := len(old), len(new), 0, 0
for ; i < len(s) && strings.HasPrefix(s[i:], old); n += 1 {
@@ -206,16 +208,16 @@ func ReplaceLeft(s, old, new string) string {
return string(replacement)
}
// RenderCommitMessage renders commit message with XSS-safe and special links.
func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) template.HTML {
// RenderCommitMessage renders commit message with special links.
func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]string) string {
cleanMsg := template.HTMLEscapeString(msg)
fullMessage := string(markup.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas))
msgLines := strings.Split(strings.TrimSpace(fullMessage), "\n")
numLines := len(msgLines)
if numLines == 0 {
return template.HTML("")
return ""
} else if !full {
return template.HTML(msgLines[0])
return msgLines[0]
} else if numLines == 1 || (numLines >= 2 && len(msgLines[1]) == 0) {
// First line is a header, standalone or followed by empty line
header := fmt.Sprintf("<h3>%s</h3>", msgLines[0])
@@ -228,7 +230,7 @@ func RenderCommitMessage(full bool, msg, urlPrefix string, metas map[string]stri
// Non-standard git message, there is no header line
fullMessage = fmt.Sprintf("<h4>%s</h4>", strings.Join(msgLines, "<br>"))
}
return template.HTML(fullMessage)
return fullMessage
}
type Actioner interface {

12
pkg/tool/path.go Normal file
View File

@@ -0,0 +1,12 @@
// Copyright 2018 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 tool
// IsSameSiteURLPath returns true if the URL path belongs to the same site, false otherwise.
// False: //url, http://url, /\url
// True: /url
func IsSameSiteURLPath(url string) bool {
return len(url) >= 2 && url[0] == '/' && url[1] != '/' && url[1] != '\\'
}

32
pkg/tool/path_test.go Normal file
View File

@@ -0,0 +1,32 @@
// Copyright 2018 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 tool
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func Test_IsSameSiteURLPath(t *testing.T) {
Convey("Check if a path belongs to the same site", t, func() {
testCases := []struct {
url string
expect bool
}{
{"//github.com", false},
{"http://github.com", false},
{"https://github.com", false},
{"/\\github.com", false},
{"/admin", true},
{"/user/repo", true},
}
for _, tc := range testCases {
So(IsSameSiteURLPath(tc.url), ShouldEqual, tc.expect)
}
})
}

View File

@@ -6,6 +6,11 @@
</head>
<body>
<table id="jslicense-labels1">
<tr>
<td><a href="/js/jquery-1.11.3.min.js">jquery-1.11.3.min.js</a></td>
<td><a href="http://www.freebsd.org/copyright/freebsd-license.html">Expat</a></td>
<td><a href="https://code.jquery.com/jquery-1.11.3.js">jquery-1.11.3.js</a></td>
</tr>
<tr>
<td><a href="/js/libs/jquery.are-you-sure.js">jquery.are-you-sure.js</a></td>
<td>

View File

@@ -1,6 +1,6 @@
{
"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
"creatorBuild": "19115",
"creatorBuild": "19127",
"files": {
"\/css\/github.min.css": {
"fileType": 16,

View File

@@ -347,6 +347,9 @@ footer .ui.language .menu {
.hide {
display: none;
}
.display.inline {
display: inline;
}
.center {
text-align: center;
}
@@ -1211,7 +1214,7 @@ footer .ui.language .menu {
.repository .filter.menu .label.color {
border-radius: 3px;
margin-left: 15px;
padding: 0 8px;
padding: 0 10px;
}
.repository .filter.menu .octicon {
float: left;
@@ -2934,6 +2937,9 @@ footer .ui.language .menu {
margin-top: 5px;
margin-right: 8px;
}
.user.profile .ui.card .profile-avatar {
height: 287px;
}
.user.profile .ui.card .header {
word-break: break-all;
}
@@ -3034,6 +3040,7 @@ footer .ui.language .menu {
}
.feeds .news p {
line-height: 1em;
overflow-wrap: break-word;
}
.feeds .news .time-since {
font-size: 13px;

View File

@@ -9,11 +9,11 @@ function initCommentPreviewTab($form) {
$tabMenu.find('.item[data-tab="' + $tabMenu.data('preview') + '"]').click(function () {
var $this = $(this);
$.post($this.data('url'), {
"_csrf": csrf,
"mode": "gfm",
"context": $this.data('context'),
"text": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val()
},
"_csrf": csrf,
"mode": "gfm",
"context": $this.data('context'),
"text": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val()
},
function (data) {
var $previewPanel = $form.find('.tab.segment[data-tab="' + $tabMenu.data('preview') + '"]');
$previewPanel.html(data);
@@ -39,11 +39,11 @@ function initEditPreviewTab($form) {
$previewTab.click(function () {
var $this = $(this);
$.post($this.data('url'), {
"_csrf": csrf,
"mode": "gfm",
"context": $this.data('context'),
"text": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val()
},
"_csrf": csrf,
"mode": "gfm",
"context": $this.data('context'),
"text": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val()
},
function (data) {
var $previewPanel = $form.find('.tab.segment[data-tab="' + $tabMenu.data('preview') + '"]');
$previewPanel.html(data);
@@ -63,9 +63,9 @@ function initEditDiffTab($form) {
$tabMenu.find('.item[data-tab="' + $tabMenu.data('diff') + '"]').click(function () {
var $this = $(this);
$.post($this.data('url'), {
"_csrf": csrf,
"content": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val()
},
"_csrf": csrf,
"content": $form.find('.tab.segment[data-tab="' + $tabMenu.data('write') + '"] textarea').val()
},
function (data) {
var $diffPreviewPanel = $form.find('.tab.segment[data-tab="' + $tabMenu.data('diff') + '"]');
$diffPreviewPanel.html(data);
@@ -221,7 +221,7 @@ function initRepository() {
window.location.href = $choice.data('url');
console.log($choice.data('url'))
},
message: {noResults: $dropdown.data('no-results')}
message: { noResults: $dropdown.data('no-results') }
});
}
@@ -346,9 +346,9 @@ function initRepository() {
}
$.post($(this).data('update-url'), {
"_csrf": csrf,
"title": $editInput.val()
},
"_csrf": csrf,
"title": $editInput.val()
},
function (data) {
$editInput.val(data.title);
$issueTitle.text(data.title);
@@ -390,10 +390,10 @@ function initRepository() {
$editContentZone.hide();
$.post($editContentZone.data('update-url'), {
"_csrf": csrf,
"content": $textarea.val(),
"context": $editContentZone.data('context')
},
"_csrf": csrf,
"content": $textarea.val(),
"context": $editContentZone.data('context')
},
function (data) {
if (data.length == 0) {
$renderContent.html($('#no-content').html());
@@ -500,14 +500,14 @@ function initRepository() {
initFilterSearchDropdown('.choose.branch .dropdown');
}
if ($('.repository.view.pull').length > 0) {
$('.comment.merge.box input[name=merge_style]').change(function () {
if ($(this).val() === 'create_merge_commit') {
$('.commit.description.field').show();
} else {
$('.commit.description.field').hide();
}
})
}
$('.comment.merge.box input[name=merge_style]').change(function () {
if ($(this).val() === 'create_merge_commit') {
$('.commit.description.field').show();
} else {
$('.commit.description.field').hide();
}
})
}
}
function initWikiForm() {
@@ -521,11 +521,11 @@ function initWikiForm() {
setTimeout(function () {
// FIXME: still send render request when return back to edit mode
$.post($editArea.data('url'), {
"_csrf": csrf,
"mode": "gfm",
"context": $editArea.data('context'),
"text": plainText
},
"_csrf": csrf,
"mode": "gfm",
"context": $editArea.data('context'),
"text": plainText
},
function (data) {
preview.innerHTML = '<div class="markdown">' + data + '</div>';
emojify.run($('.editor-preview')[0]);
@@ -603,11 +603,11 @@ function setSimpleMDE($editArea) {
setTimeout(function () {
// FIXME: still send render request when return back to edit mode
$.post($editArea.data('url'), {
"_csrf": csrf,
"mode": "gfm",
"context": $editArea.data('context'),
"text": plainText
},
"_csrf": csrf,
"mode": "gfm",
"context": $editArea.data('context'),
"text": plainText
},
function (data) {
preview.innerHTML = '<div class="markdown">' + data + '</div>';
emojify.run($('.editor-preview')[0]);
@@ -652,10 +652,10 @@ function initEditor() {
$('.js-quick-pull-choice-option').change(function () {
if ($(this).val() == 'commit-to-new-branch') {
$('.quick-pull-branch-name').show();
$('.quick-pull-branch-name input').prop('required',true);
$('.quick-pull-branch-name input').prop('required', true);
} else {
$('.quick-pull-branch-name').hide();
$('.quick-pull-branch-name input').prop('required',false);
$('.quick-pull-branch-name input').prop('required', false);
}
});
@@ -705,7 +705,7 @@ function initEditor() {
var tree_path = parts.join('/');
$('#tree_path').val(tree_path);
$('#preview-tab').data('context', $('#preview-tab').data('root-context') + tree_path.substring(0, tree_path.lastIndexOf("/")+1));
$('#preview-tab').data('context', $('#preview-tab').data('root-context') + tree_path.substring(0, tree_path.lastIndexOf("/") + 1));
}).trigger('keyup');
var $editArea = $('.repository.editor textarea#edit_area');
@@ -775,7 +775,7 @@ function initEditor() {
value = value.split('/');
value = value[value.length - 1];
$.getJSON($editFilename.data('ec-url-prefix')+value, function(editorconfig) {
$.getJSON($editFilename.data('ec-url-prefix') + value, function (editorconfig) {
if (editorconfig.indent_style === 'tab') {
codeMirrorEditor.setOption("indentWithTabs", true);
codeMirrorEditor.setOption('extraKeys', {});
@@ -785,7 +785,7 @@ function initEditor() {
// - https://github.com/codemirror/CodeMirror/issues/988
// - https://codemirror.net/doc/manual.html#keymaps
codeMirrorEditor.setOption('extraKeys', {
Tab: function(cm) {
Tab: function (cm) {
var spaces = Array(parseInt(cm.getOption("indentUnit")) + 1).join(" ");
cm.replaceSelection(spaces);
}
@@ -1131,7 +1131,7 @@ function initWebhookSettings() {
$($(this).data('target') + ' .nohighlight').each(function () {
var $this = $(this);
$this.removeClass('nohighlight');
setTimeout(function(){ hljs.highlightBlock($this[0]) }, 500);
setTimeout(function () { hljs.highlightBlock($this[0]) }, 500);
})
})
@@ -1213,7 +1213,7 @@ $(document).ready(function () {
var filenameDict = {};
$dropzone.dropzone({
url: $dropzone.data('upload-url'),
headers: {"X-Csrf-Token": csrf},
headers: { "X-Csrf-Token": csrf },
maxFiles: $dropzone.data('max-file'),
maxFilesize: $dropzone.data('max-size'),
acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),
@@ -1336,6 +1336,10 @@ $(document).ready(function () {
window.location.href = $this.data('done-url');
});
});
// To make arbitrary form element to behave like a submit button
$('.submit-button').click(function () {
$($(this).data('form')).submit();
});
// Check or select on option to enable/disable target region
$('.enable-system').change(function () {
@@ -1459,7 +1463,7 @@ $(function () {
$('form').areYouSure();
});
// getByteLen counts bytes in a string's UTF-8 representation.
// getByteLen counts bytes in a string's UTF-8 representation.
function getByteLen(normalVal) {
// Force string type
normalVal = String(normalVal);
@@ -1467,19 +1471,19 @@ function getByteLen(normalVal) {
var byteLen = 0;
for (var i = 0; i < normalVal.length; i++) {
var c = normalVal.charCodeAt(i);
byteLen += c < (1 << 7) ? 1 :
c < (1 << 11) ? 2 :
c < (1 << 16) ? 3 :
c < (1 << 21) ? 4 :
c < (1 << 26) ? 5 :
c < (1 << 31) ? 6 : Number.NaN;
byteLen += c < (1 << 7) ? 1 :
c < (1 << 11) ? 2 :
c < (1 << 16) ? 3 :
c < (1 << 21) ? 4 :
c < (1 << 26) ? 5 :
c < (1 << 31) ? 6 : Number.NaN;
}
return byteLen;
}
function showMessageMaxLength(maxLen, textElemId, counterId) {
var $msg = $('#'+textElemId);
$('#'+counterId).html(maxLen - getByteLen($msg.val()));
var $msg = $('#' + textElemId);
$('#' + counterId).html(maxLen - getByteLen($msg.val()));
var onMessageKey = function (e) {
var $msg = $(this);
@@ -1492,7 +1496,7 @@ function showMessageMaxLength(maxLen, textElemId, counterId) {
remainder = 0;
}
$('#'+counterId).html(remainder);
$('#' + counterId).html(remainder);
};
$msg.keyup(onMessageKey).keydown(onMessageKey);

View File

@@ -384,6 +384,11 @@ footer {
.hide {
display: none;
}
.display {
&.inline {
display: inline;
}
}
.center {
text-align: center;
}

View File

@@ -61,6 +61,7 @@
}
p {
line-height: 1em;
overflow-wrap: break-word;
}
.time-since {
font-size: 13px;

View File

@@ -91,7 +91,7 @@
.label.color {
border-radius: 3px;
margin-left: 15px;
padding: 0 8px;
padding: 0 10px;
}
.octicon {
float: left;

View File

@@ -60,6 +60,9 @@
&.profile {
.ui.card {
.profile-avatar {
height: 287px;
}
.header {
word-break: break-all;
}

View File

@@ -5,6 +5,7 @@
package v1
import (
"net/http"
"strings"
"github.com/go-macaron/binding"
@@ -39,43 +40,34 @@ func repoAssignment() macaron.Handler {
} else {
owner, err = models.GetUserByName(userName)
if err != nil {
if errors.IsUserNotExist(err) {
c.Status(404)
} else {
c.Error(500, "GetUserByName", err)
}
c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
return
}
}
c.Repo.Owner = owner
// Get repository.
repo, err := models.GetRepositoryByName(owner.ID, repoName)
if err != nil {
if errors.IsRepoNotExist(err) {
c.Status(404)
} else {
c.Error(500, "GetRepositoryByName", err)
}
c.NotFoundOrServerError("GetRepositoryByName", errors.IsRepoNotExist, err)
return
} else if err = repo.GetOwner(); err != nil {
c.Error(500, "GetOwner", err)
c.ServerError("GetOwner", err)
return
}
if c.IsLogged && c.User.IsAdmin {
if c.IsTokenAuth && c.User.IsAdmin {
c.Repo.AccessMode = models.ACCESS_MODE_OWNER
} else {
mode, err := models.AccessLevel(c.User.ID, repo)
mode, err := models.AccessLevel(c.UserID(), repo)
if err != nil {
c.Error(500, "AccessLevel", err)
c.ServerError("AccessLevel", err)
return
}
c.Repo.AccessMode = mode
}
if !c.Repo.HasAccess() {
c.Status(404)
c.NotFound()
return
}
@@ -86,8 +78,8 @@ func repoAssignment() macaron.Handler {
// Contexter middleware already checks token for user sign in process.
func reqToken() macaron.Handler {
return func(c *context.Context) {
if !c.IsLogged {
c.Error(401)
if !c.IsTokenAuth {
c.Error(http.StatusUnauthorized)
return
}
}
@@ -96,7 +88,7 @@ func reqToken() macaron.Handler {
func reqBasicAuth() macaron.Handler {
return func(c *context.Context) {
if !c.IsBasicAuth {
c.Error(401)
c.Error(http.StatusUnauthorized)
return
}
}
@@ -105,7 +97,7 @@ func reqBasicAuth() macaron.Handler {
func reqAdmin() macaron.Handler {
return func(c *context.Context) {
if !c.IsLogged || !c.User.IsAdmin {
c.Error(403)
c.Error(http.StatusForbidden)
return
}
}
@@ -114,7 +106,7 @@ func reqAdmin() macaron.Handler {
func reqRepoWriter() macaron.Handler {
return func(c *context.Context) {
if !c.Repo.IsWriter() {
c.Error(403)
c.Error(http.StatusForbidden)
return
}
}
@@ -138,11 +130,7 @@ func orgAssignment(args ...bool) macaron.Handler {
if assignOrg {
c.Org.Organization, err = models.GetUserByName(c.Params(":orgname"))
if err != nil {
if errors.IsUserNotExist(err) {
c.Status(404)
} else {
c.Error(500, "GetUserByName", err)
}
c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
return
}
}
@@ -150,11 +138,7 @@ func orgAssignment(args ...bool) macaron.Handler {
if assignTeam {
c.Org.Team, err = models.GetTeamByID(c.ParamsInt64(":teamid"))
if err != nil {
if errors.IsUserNotExist(err) {
c.Status(404)
} else {
c.Error(500, "GetTeamById", err)
}
c.NotFoundOrServerError("GetTeamByID", errors.IsTeamNotExist, err)
return
}
}
@@ -163,7 +147,7 @@ func orgAssignment(args ...bool) macaron.Handler {
func mustEnableIssues(c *context.APIContext) {
if !c.Repo.Repository.EnableIssues || c.Repo.Repository.EnableExternalTracker {
c.Status(404)
c.NotFound()
return
}
}
@@ -238,12 +222,13 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/repos", func() {
m.Get("/search", repo.Search)
m.Get("/:username/:reponame", repoAssignment(), repo.Get)
})
m.Group("/repos", func() {
m.Post("/migrate", bind(form.MigrateRepo{}), repo.Migrate)
m.Combo("/:username/:reponame", repoAssignment()).Get(repo.Get).
Delete(repo.Delete)
m.Delete("/:username/:reponame", repoAssignment(), repo.Delete)
m.Group("/:username/:reponame", func() {
m.Group("/hooks", func() {
@@ -308,6 +293,8 @@ func RegisterRoutes(m *macaron.Macaron) {
Patch(reqRepoWriter(), bind(api.EditMilestoneOption{}), repo.EditMilestone).
Delete(reqRepoWriter(), repo.DeleteMilestone)
})
m.Patch("/issue-tracker", bind(api.EditIssueTrackerOption{}), repo.IssueTracker)
m.Post("/mirror-sync", repo.MirrorSync)
m.Get("/editorconfig/:filename", context.RepoRef(), repo.GetEditorconfig)
}, repoAssignment())
@@ -325,7 +312,7 @@ func RegisterRoutes(m *macaron.Macaron) {
}, orgAssignment(true))
m.Any("/*", func(c *context.Context) {
c.Error(404)
c.NotFound()
})
m.Group("/admin", func() {

View File

@@ -15,11 +15,7 @@ import (
func ListCollaborators(c *context.APIContext) {
collaborators, err := c.Repo.Repository.GetCollaborators()
if err != nil {
if errors.IsUserNotExist(err) {
c.Error(422, "", err)
} else {
c.Error(500, "GetCollaborators", err)
}
c.ServerError("GetCollaborators", err)
return
}
@@ -27,7 +23,7 @@ func ListCollaborators(c *context.APIContext) {
for i := range collaborators {
apiCollaborators[i] = collaborators[i].APIFormat()
}
c.JSON(200, &apiCollaborators)
c.JSONSuccess(&apiCollaborators)
}
func AddCollaborator(c *context.APIContext, form api.AddCollaboratorOption) {

View File

@@ -291,6 +291,7 @@ func Migrate(c *context.APIContext, f form.MigrateRepo) {
c.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
}
// FIXME: Inject to *context.APIContext
func parseOwnerAndRepo(c *context.APIContext) (*models.User, *models.Repository) {
owner, err := models.GetUserByName(c.Params(":username"))
if err != nil {
@@ -373,6 +374,36 @@ func ListForks(c *context.APIContext) {
c.JSON(200, &apiForks)
}
func IssueTracker(c *context.APIContext, form api.EditIssueTrackerOption) {
_, repo := parseOwnerAndRepo(c)
if c.Written() {
return
}
if form.EnableIssues != nil {
repo.EnableIssues = *form.EnableIssues
}
if form.EnableExternalTracker != nil {
repo.EnableExternalTracker = *form.EnableExternalTracker
}
if form.ExternalTrackerURL != nil {
repo.ExternalTrackerURL = *form.ExternalTrackerURL
}
if form.TrackerURLFormat != nil {
repo.ExternalTrackerFormat = *form.TrackerURLFormat
}
if form.TrackerIssueStyle != nil {
repo.ExternalTrackerStyle = *form.TrackerIssueStyle
}
if err := models.UpdateRepository(repo, false); err != nil {
c.ServerError("UpdateRepository", err)
return
}
c.NoContent()
}
func MirrorSync(c *context.APIContext) {
_, repo := parseOwnerAndRepo(c)
if c.Written() {

View File

@@ -14,6 +14,7 @@ import (
"github.com/gogs/gogs/models"
"github.com/gogs/gogs/pkg/context"
"github.com/gogs/gogs/pkg/tool"
)
const (
@@ -112,7 +113,7 @@ func DeleteBranchPost(c *context.Context) {
defer func() {
redirectTo := c.Query("redirect_to")
if len(redirectTo) == 0 {
if !tool.IsSameSiteURLPath(redirectTo) {
redirectTo = c.Repo.RepoLink
}
c.Redirect(redirectTo)

View File

@@ -286,7 +286,7 @@ func editFilePost(c *context.Context, f form.EditRepoFile, isNewFile bool) {
if f.IsNewBrnach() && c.Repo.PullRequest.Allowed {
c.Redirect(c.Repo.PullRequestURL(oldBranchName, f.NewBranchName))
} else {
c.Redirect(c.Repo.RepoLink + "/src/" + branchName + "/" + template.EscapePound(f.TreePath))
c.Redirect(c.Repo.RepoLink + "/src/" + branchName + "/" + f.TreePath)
}
}

View File

@@ -47,7 +47,7 @@ func HTTPContexter() macaron.Handler {
if len(setting.HTTP.AccessControlAllowOrigin) > 0 {
// Set CORS headers for browser-based git clients
c.Resp.Header().Set("Access-Control-Allow-Origin", setting.HTTP.AccessControlAllowOrigin)
c.Resp.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
c.Resp.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization, User-Agent")
// Handle preflight OPTIONS request
if c.Req.Method == "OPTIONS" {

View File

@@ -345,6 +345,8 @@ func NewIssue(c *context.Context) {
c.Data["PageIsIssueList"] = true
c.Data["RequireHighlightJS"] = true
c.Data["RequireSimpleMDE"] = true
c.Data["title"] = c.Query("title")
c.Data["content"] = c.Query("content")
setTemplateIfExists(c, ISSUE_TEMPLATE_KEY, IssueTemplateCandidates)
renderAttachmentSettings(c)
@@ -901,7 +903,7 @@ func NewComment(c *context.Context, f form.CreateComment) {
typeName = "pulls"
}
if comment != nil {
c.Redirect(fmt.Sprintf("%s/%s/%d#%s", c.Repo.RepoLink, typeName, issue.Index, comment.HashTag()))
c.RawRedirect(fmt.Sprintf("%s/%s/%d#%s", c.Repo.RepoLink, typeName, issue.Index, comment.HashTag()))
} else {
c.Redirect(fmt.Sprintf("%s/%s/%d", c.Repo.RepoLink, typeName, issue.Index))
}

View File

@@ -242,7 +242,7 @@ func Action(c *context.Context) {
err = models.StarRepo(c.User.ID, c.Repo.Repository.ID, false)
case "desc": // FIXME: this is not used
if !c.Repo.IsOwner() {
c.Error(404)
c.NotFound()
return
}
@@ -252,12 +252,12 @@ func Action(c *context.Context) {
}
if err != nil {
c.Handle(500, fmt.Sprintf("Action (%s)", c.Params(":action")), err)
c.ServerError(fmt.Sprintf("Action (%s)", c.Params(":action")), err)
return
}
redirectTo := c.Query("redirect_to")
if len(redirectTo) == 0 {
if !tool.IsSameSiteURLPath(redirectTo) {
redirectTo = c.Repo.RepoLink
}
c.Redirect(redirectTo)

View File

@@ -17,6 +17,7 @@ import (
"github.com/gogs/gogs/pkg/form"
"github.com/gogs/gogs/pkg/mailer"
"github.com/gogs/gogs/pkg/setting"
"github.com/gogs/gogs/pkg/tool"
)
const (
@@ -72,13 +73,6 @@ func AutoLogin(c *context.Context) (bool, error) {
return true, nil
}
// isValidRedirect returns false if the URL does not redirect to same site.
// False: //url, http://url, /\url
// True: /url
func isValidRedirect(url string) bool {
return len(url) >= 2 && url[0] == '/' && url[1] != '/' && url[1] != '\\'
}
func Login(c *context.Context) {
c.Title("sign_in")
@@ -97,7 +91,7 @@ func Login(c *context.Context) {
}
if isSucceed {
if isValidRedirect(redirectTo) {
if tool.IsSameSiteURLPath(redirectTo) {
c.Redirect(redirectTo)
} else {
c.SubURLRedirect("/")
@@ -143,7 +137,7 @@ func afterLogin(c *context.Context, u *models.User, remember bool) {
redirectTo, _ := url.QueryUnescape(c.GetCookie("redirect_to"))
c.SetCookie("redirect_to", "", -1, setting.AppSubURL)
if isValidRedirect(redirectTo) {
if tool.IsSameSiteURLPath(redirectTo) {
c.Redirect(redirectTo)
return
}
@@ -287,8 +281,8 @@ func LoginTwoFactorRecoveryCodePost(c *context.Context) {
}
func SignOut(c *context.Context) {
c.Session.Delete("uid")
c.Session.Delete("uname")
c.Session.Flush()
c.Session.Destory(c.Context)
c.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL)
c.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL)
c.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL)

View File

@@ -6,15 +6,14 @@ package user
import (
"fmt"
"path"
"strings"
"github.com/Unknwon/paginater"
"github.com/gogs/gogs/models"
"github.com/gogs/gogs/models/errors"
"github.com/gogs/gogs/pkg/context"
"github.com/gogs/gogs/pkg/setting"
"github.com/gogs/gogs/pkg/tool"
"github.com/gogs/gogs/routes/repo"
)
@@ -23,59 +22,30 @@ const (
STARS = "user/meta/stars"
)
func GetUserByName(c *context.Context, name string) *models.User {
user, err := models.GetUserByName(name)
if err != nil {
c.NotFoundOrServerError("GetUserByName", errors.IsUserNotExist, err)
return nil
}
return user
}
// GetUserByParams returns user whose name is presented in URL paramenter.
func GetUserByParams(c *context.Context) *models.User {
return GetUserByName(c, c.Params(":username"))
}
func Profile(c *context.Context) {
uname := c.Params(":username")
// Special handle for FireFox requests favicon.ico.
if uname == "favicon.ico" {
c.ServeFile(path.Join(setting.StaticRootPath, "public/img/favicon.png"))
return
} else if strings.HasSuffix(uname, ".png") {
c.Error(404)
return
}
func Profile(c *context.Context, puser *context.ParamsUser) {
isShowKeys := false
if strings.HasSuffix(uname, ".keys") {
if strings.HasSuffix(c.Params(":username"), ".keys") {
isShowKeys = true
}
ctxUser := GetUserByName(c, strings.TrimSuffix(uname, ".keys"))
if c.Written() {
return
}
// Show SSH keys.
if isShowKeys {
ShowSSHKeys(c, ctxUser.ID)
ShowSSHKeys(c, puser.ID)
return
}
if ctxUser.IsOrganization() {
if puser.IsOrganization() {
showOrgProfile(c)
return
}
c.Data["Title"] = ctxUser.DisplayName()
c.Data["PageIsUserProfile"] = true
c.Data["Owner"] = ctxUser
c.Title(puser.DisplayName())
c.PageIs("UserProfile")
c.Data["Owner"] = puser
orgs, err := models.GetOrgsByUserID(ctxUser.ID, c.IsLogged && (c.User.IsAdmin || c.User.ID == ctxUser.ID))
orgs, err := models.GetOrgsByUserID(puser.ID, c.IsLogged && (c.User.IsAdmin || c.User.ID == puser.ID))
if err != nil {
c.Handle(500, "GetOrgsByUserIDDesc", err)
c.ServerError("GetOrgsByUserIDDesc", err)
return
}
@@ -85,7 +55,7 @@ func Profile(c *context.Context) {
c.Data["TabName"] = tab
switch tab {
case "activity":
retrieveFeeds(c, ctxUser, -1, true)
retrieveFeeds(c, puser.User, -1, true)
if c.Written() {
return
}
@@ -95,75 +65,62 @@ func Profile(c *context.Context) {
page = 1
}
showPrivate := c.IsLogged && (ctxUser.ID == c.User.ID || c.User.IsAdmin)
showPrivate := c.IsLogged && (puser.ID == c.User.ID || c.User.IsAdmin)
c.Data["Repos"], err = models.GetUserRepositories(&models.UserRepoOptions{
UserID: ctxUser.ID,
UserID: puser.ID,
Private: showPrivate,
Page: page,
PageSize: setting.UI.User.RepoPagingNum,
})
if err != nil {
c.Handle(500, "GetRepositories", err)
c.ServerError("GetRepositories", err)
return
}
count := models.CountUserRepositories(ctxUser.ID, showPrivate)
count := models.CountUserRepositories(puser.ID, showPrivate)
c.Data["Page"] = paginater.New(int(count), setting.UI.User.RepoPagingNum, page, 5)
}
c.HTML(200, PROFILE)
c.Success(PROFILE)
}
func Followers(c *context.Context) {
u := GetUserByParams(c)
if c.Written() {
return
}
c.Data["Title"] = u.DisplayName()
func Followers(c *context.Context, puser *context.ParamsUser) {
c.Title(puser.DisplayName())
c.PageIs("Followers")
c.Data["CardsTitle"] = c.Tr("user.followers")
c.Data["PageIsFollowers"] = true
c.Data["Owner"] = u
repo.RenderUserCards(c, u.NumFollowers, u.GetFollowers, FOLLOWERS)
c.Data["Owner"] = puser
repo.RenderUserCards(c, puser.NumFollowers, puser.GetFollowers, FOLLOWERS)
}
func Following(c *context.Context) {
u := GetUserByParams(c)
if c.Written() {
return
}
c.Data["Title"] = u.DisplayName()
func Following(c *context.Context, puser *context.ParamsUser) {
c.Title(puser.DisplayName())
c.PageIs("Following")
c.Data["CardsTitle"] = c.Tr("user.following")
c.Data["PageIsFollowing"] = true
c.Data["Owner"] = u
repo.RenderUserCards(c, u.NumFollowing, u.GetFollowing, FOLLOWERS)
c.Data["Owner"] = puser
repo.RenderUserCards(c, puser.NumFollowing, puser.GetFollowing, FOLLOWERS)
}
func Stars(c *context.Context) {
}
func Action(c *context.Context) {
u := GetUserByParams(c)
if c.Written() {
return
}
func Action(c *context.Context, puser *context.ParamsUser) {
var err error
switch c.Params(":action") {
case "follow":
err = models.FollowUser(c.User.ID, u.ID)
err = models.FollowUser(c.UserID(), puser.ID)
case "unfollow":
err = models.UnfollowUser(c.User.ID, u.ID)
err = models.UnfollowUser(c.UserID(), puser.ID)
}
if err != nil {
c.Handle(500, fmt.Sprintf("Action (%s)", c.Params(":action")), err)
c.ServerError(fmt.Sprintf("Action (%s)", c.Params(":action")), err)
return
}
redirectTo := c.Query("redirect_to")
if len(redirectTo) == 0 {
redirectTo = u.HomeLink()
if !tool.IsSameSiteURLPath(redirectTo) {
redirectTo = puser.HomeLink()
}
c.Redirect(redirectTo)
}

View File

@@ -1 +1 @@
0.11.66.0916
0.11.79.1211

View File

@@ -10,7 +10,7 @@
</h4>
<div class="ui attached segment">
<p>
{{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
{{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2HTML}}
</p>
</div>
<h4 class="ui top attached header">

View File

@@ -1,20 +1,20 @@
{{if .Flash.ErrorMsg}}
<div class="ui negative message">
<p>{{.Flash.ErrorMsg | Str2html}}</p>
<p>{{.Flash.ErrorMsg | Str2HTML}}</p>
</div>
{{end}}
{{if .Flash.WarningMsg}}
<div class="ui warning message">
<p>{{.Flash.WarningMsg | Str2html}}</p>
<p>{{.Flash.WarningMsg | Str2HTML}}</p>
</div>
{{end}}
{{if .Flash.SuccessMsg}}
<div class="ui positive message">
<p>{{.Flash.SuccessMsg | Str2html}}</p>
<p>{{.Flash.SuccessMsg | Str2HTML}}</p>
</div>
{{end}}
{{if .Flash.InfoMsg}}
<div class="ui info message">
<p>{{.Flash.InfoMsg | Str2html}}</p>
<p>{{.Flash.InfoMsg | Str2HTML}}</p>
</div>
{{end}}

View File

@@ -160,9 +160,13 @@
{{end}}
<div class="divider"></div>
<a class="item" href="{{AppSubURL}}/user/logout">
<i class="octicon octicon-sign-out"></i> {{.i18n.Tr "sign_out"}}
</a>
<form id="logout-form" class="item" action="{{AppSubURL}}/user/logout" method="POST">
{{.CSRFTokenHTML}}
<div class="submit-button" data-form="#logout-form">
<i class="octicon octicon-sign-out"></i> {{.i18n.Tr "sign_out"}}
</div>
</form>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu -->

View File

@@ -21,7 +21,7 @@
<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
</div>
</div>
{{if .Description}}<p class="has-emoji">{{.Description | Str2html}}</p>{{end}}
{{if .Description}}<p class="has-emoji">{{.Description | Str2HTML}}</p>{{end}}
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
</div>
</div>

View File

@@ -6,7 +6,7 @@
</head>
<body>
<p>{{.Body | Str2html}}</p>
<p>{{.Body | Str2HTML}}</p>
<p>
---
<br>

View File

@@ -7,7 +7,7 @@
<body>
<p>@{{.Doer.DisplayName}} mentioned you:</p>
<p>{{.Body | Str2html}}</p>
<p>{{.Body | Str2HTML}}</p>
<p>
---
<br>

View File

@@ -11,7 +11,7 @@
</h4>
<div class="ui attached warning segment">
<div class="ui red message">
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2HTML}}</p>
</div>
<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
{{.CSRFTokenHTML}}

View File

@@ -23,13 +23,13 @@
</div>
<div class="item">
{{if eq .Team.LowerName "owners"}}
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2HTML}}
{{else if (eq .Team.Authorize 1)}}
{{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
{{.i18n.Tr "org.teams.read_permission_desc" | Str2HTML}}
{{else if (eq .Team.Authorize 2)}}
{{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
{{.i18n.Tr "org.teams.write_permission_desc" | Str2HTML}}
{{else if (eq .Team.Authorize 3)}}
{{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
{{.i18n.Tr "org.teams.admin_permission_desc" | Str2HTML}}
{{end}}
</div>
</div>

View File

@@ -11,7 +11,7 @@
</h4>
<div class="ui attached guide table segment">
<div class="item">
<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2HTML}}</small></h3>
<div class="ui action small input">
{{if not $.DisableHTTP}}
<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">

View File

@@ -47,7 +47,7 @@
{{else}}
<a rel="nofollow" class="ui sha label" href="{{AppSubURL}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSHA1 .ID.String}}</a>
{{end}}
<span class="{{if gt .ParentCount 1}}grey text {{end}} has-emoji">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}</span>
<span class="{{if gt .ParentCount 1}}grey text {{end}} has-emoji">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas | Str2HTML}}</span>
</td>
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
</tr>

View File

@@ -4,7 +4,7 @@
<div class="diff-detail-box diff-box">
<div>
<i class="fa fa-retweet"></i>
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2HTML}}
<div class="ui right">
<a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a>
<a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>

View File

@@ -9,7 +9,7 @@
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
{{.i18n.Tr "repo.diff.browse_source"}}
</a>
{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas | Str2HTML}}
</div>
<div class="ui attached info segment">
{{if .Author}}

View File

@@ -14,7 +14,7 @@
<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" {{if eq .commit_choice "direct"}}checked{{end}}>
<label>
<i class="octicon octicon-git-commit" height="16" width="14"></i>
{{$branchName := .BranchName | Str2html}}
{{$branchName := .BranchName | Str2HTML}}
{{.i18n.Tr "repo.editor.commit_directly_to_this_branch" $branchName | Safe}}
</label>
</div>

View File

@@ -20,22 +20,28 @@
{{if not $.IsGuest}}
<div class="ui right">
<div class="ui labeled button" tabindex="0">
<a class="ui basic button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
<i class="eye{{if not $.IsWatchingRepo}} slash outline{{end}} icon"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
</a>
<a class="ui basic label" href="{{.Link}}/watchers">
{{.NumWatches}}
</a>
</div>
<div class="ui labeled button" tabindex="0">
<a class="ui basic button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
<i class="star{{if not $.IsStaringRepo}} outline{{end}} icon"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
</a>
<a class="ui basic label" href="{{.Link}}/stars">
{{.NumStars}}
</a>
</div>
<form class="display inline" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}" method="POST">
{{$.CSRFTokenHTML}}
<div class="ui labeled button" tabindex="0">
<button class="ui basic button">
<i class="eye{{if not $.IsWatchingRepo}} slash outline{{end}} icon"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
</button>
<a class="ui basic label" href="{{.Link}}/watchers">
{{.NumWatches}}
</a>
</div>
</form>
<form class="display inline" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}" method="POST">
{{$.CSRFTokenHTML}}
<div class="ui labeled button" tabindex="0">
<button class="ui basic button">
<i class="star{{if not $.IsStaringRepo}} outline{{end}} icon"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
</button>
<a class="ui basic label" href="{{.Link}}/stars">
{{.NumStars}}
</a>
</div>
</form>
{{if .CanBeForked}}
<div class="ui labeled button" tabindex="0">
<a class="ui basic button {{if eq .OwnerID $.LoggedUserID}}poping up{{end}}" href="{{AppSubURL}}/repo/fork/{{.ID}}">

View File

@@ -5,7 +5,7 @@
{{template "base/alert" .}}
{{if .PageIsRepoHome}}
<p id="repo-desc">
{{if .Repository.Description}}<span class="description has-emoji">{{.Repository.Description | NewLine2br | Str2html}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
{{if .Repository.Description}}<span class="description has-emoji">{{.Repository.Description | NewLine2br | Str2HTML}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
</p>
<div class="ui segment" id="git-stats">

View File

@@ -35,7 +35,7 @@
<div class="meta">
{{ $closedDate:= TimeSince .ClosedDate $.Lang }}
{{if .IsClosed}}
<span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
<span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2HTML}}
{{else}}
<span class="octicon octicon-calendar"></span>
{{if .DeadlineString}}
@@ -62,7 +62,7 @@
{{end}}
{{if .Content}}
<div class="content">
{{.RenderedContent|Str2html}}
{{.RenderedContent|Str2HTML}}
</div>
{{end}}
</li>

View File

@@ -1,4 +1,4 @@
<form class="ui comment form grid" action="{{EscapePound .Link}}" method="post">
<form class="ui comment form grid" action="{{.Link}}" method="post">
{{.CSRFTokenHTML}}
{{if .Flash}}
<div class="sixteen wide column">

View File

@@ -29,7 +29,7 @@
<div class="ui attached segment">
<div class="render-content markdown has-emoji">
{{if .Issue.RenderedContent}}
{{.Issue.RenderedContent|Str2html}}
{{.Issue.RenderedContent|Str2HTML}}
{{else}}
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
{{end}}
@@ -90,7 +90,7 @@
<div class="ui attached segment">
<div class="render-content markdown has-emoji">
{{if .RenderedContent}}
{{.RenderedContent | Str2html}}
{{.RenderedContent | Str2HTML}}
{{else}}
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
{{end}}
@@ -140,7 +140,7 @@
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.DisplayName}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
<div class="detail">
<span class="octicon octicon-git-commit"></span>
<span class="text grey">{{.Content | Str2html}}</span>
<span class="text grey">{{.Content | Str2HTML}}</span>
</div>
</div>
{{end}}

View File

@@ -28,10 +28,10 @@
{{if .Issue.PullRequest.HasMerged}}
{{ $mergedStr:= TimeSince .Issue.PullRequest.Merged $.Lang }}
<a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.Name}}</a>
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}}</span>
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2HTML}}</span>
{{else}}
<a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2HTML}}</span>
{{end}}
{{else}}
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}

View File

@@ -43,10 +43,10 @@
<a href="{{AppSubURL}}/{{.Publisher.Name}}">{{.Publisher.DisplayName}}</a>
</span>
{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2HTML}}</span>
</p>
<div class="markdown desc">
{{Str2html .Note}}
{{Str2HTML .Note}}
</div>
<div class="download">
<h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>

View File

@@ -12,7 +12,7 @@
<div class="ui attached table segment">
<div class="ui hook list">
<div class="item">
{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
{{.i18n.Tr "repo.settings.githooks_desc" | Str2HTML}}
</div>
{{range .Hooks}}
<div class="item">

View File

@@ -184,7 +184,7 @@
<div class="field">
<label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2HTML}}</p>
</div>
<div class="inline fields">
<label for="issue_style">{{.i18n.Tr "repo.settings.tracker_issue_style"}}</label>

View File

@@ -10,7 +10,7 @@
{{.i18n.Tr "repo.settings.branch_protection"}}
</h4>
<div class="ui attached segment branch-protection">
<p>{{.i18n.Tr "repo.settings.branch_protection_desc" .Branch.Name | Str2html}}</p>
<p>{{.i18n.Tr "repo.settings.branch_protection_desc" .Branch.Name | Str2HTML}}</p>
<form class="ui form" action="{{.Link}}" method="post">
{{.CSRFTokenHTML}}
<div class="inline field">
@@ -83,4 +83,4 @@
</div>
</div>
</div>
{{template "base/footer" .}}
{{template "base/footer" .}}

View File

@@ -1,5 +1,5 @@
{{if eq .HookType "dingtalk"}}
<p>{{.i18n.Tr "repo.settings.add_dingtalk_hook_desc" "https://open-doc.dingtalk.com/" | Str2html}}</p>
<p>{{.i18n.Tr "repo.settings.add_dingtalk_hook_desc" "https://open-doc.dingtalk.com/" | Str2HTML}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/dingtalk/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}">

View File

@@ -1,5 +1,5 @@
{{if eq .HookType "discord"}}
<p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com/" | Str2html}}</p>
<p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com/" | Str2HTML}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/discord/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}">

View File

@@ -1,5 +1,5 @@
{{if eq .HookType "gogs"}}
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://gogs.io/docs/features/webhook.html" | Str2html}}</p>
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://gogs.io/docs/features/webhook.html" | Str2HTML}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}">

View File

@@ -34,7 +34,7 @@
<div class="ui attached table segment">
<div class="ui hook list">
<div class="item">
{{.Description | Str2html}}
{{.Description | Str2HTML}}
</div>
{{range .Webhooks}}
<div class="item">

View File

@@ -4,19 +4,19 @@
<div class="field">
<div class="ui radio non-events checkbox">
<input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2HTML}}</label>
</div>
</div>
<div class="field">
<div class="ui radio non-events checkbox">
<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2HTML}}</label>
</div>
</div>
<div class="field">
<div class="ui radio events checkbox">
<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
<label>{{.i18n.Tr "repo.settings.event_choose" | Str2HTML}}</label>
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
{{if eq .HookType "slack"}}
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "https://slack.com" | Str2html}}</p>
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "https://slack.com" | Str2HTML}}</p>
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
{{.CSRFTokenHTML}}
<div class="required field {{if .Err_PayloadURL}}error{{end}}">

View File

@@ -38,7 +38,7 @@
<div class="ui unstackable attached table segment">
<div id="{{if .IsIPythonNotebook}}ipython-notebook{{end}}" class="file-view {{if .IsMarkdown}}markdown{{else if .IsIPythonNotebook}}ipython-notebook{{else if .ReadmeInList}}plain-text{{else if and .IsTextFile}}code-view{{end}} has-emoji">
{{if .IsMarkdown}}
{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
{{if .FileContent}}{{.FileContent | Str2HTML}}{{end}}
{{else if .IsIPythonNotebook}}
<script>
var rendered = null;
@@ -64,7 +64,7 @@
});
</script>
{{else if .ReadmeInList}}
{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
{{if .FileContent}}{{.FileContent | Str2HTML}}{{end}}
{{else if not .IsTextFile}}
<div class="view-raw ui center">
{{if .IsImageFile}}

View File

@@ -10,7 +10,7 @@
<strong>{{.LatestCommit.Author.Name}}</strong>
{{end}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}" rel="nofollow">{{ShortSHA1 .LatestCommit.ID.String}}</a>
<span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}</span>
<span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas | Str2HTML}}</span>
</th>
<th class="nine wide">
</th>
@@ -49,7 +49,7 @@
{{end}}
<td class="message collapsing has-emoji">
<a rel="nofollow" class="ui sha label" href="{{$.RepoLink}}/commit/{{$commit.ID}}">{{ShortSHA1 $commit.ID.String}}</a>
{{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}}
{{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas | Str2HTML}}
</td>
<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
</tr>

View File

@@ -11,7 +11,7 @@
</div>
{{end}}
</div>
<form class="ui form" action="{{EscapePound .Link}}" method="post">
<form class="ui form" action="{{.Link}}" method="post">
{{.CSRFTokenHTML}}
<input type="hidden" name="old_title" value="{{.old_title}}">
<div class="field {{if .Err_Title}}error{{end}}">

View File

@@ -48,7 +48,7 @@
</div>
</div>
<div class="ui dividing header">
{{$title}}
<span class="has-emoji">{{$title}}</span>
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
<div class="ui right">
<a class="ui small button" href="{{.RepoLink}}/wiki/{{EscapePound .PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
@@ -61,8 +61,8 @@
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
</div>
</div>
<div class="markdown">
{{.content | Str2html}}
<div class="markdown has-emoji">
{{.content | Str2HTML}}
</div>
</div>
</div>

View File

@@ -15,15 +15,15 @@
{{else if .ResendLimited}}
<p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p>
{{else}}
<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .LoggedUser.Email .Hours | Str2html}}</p>
<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .LoggedUser.Email .Hours | Str2HTML}}</p>
{{end}}
{{else}}
{{if .IsSendRegisterMail}}
<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p>
<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2HTML}}</p>
{{else if .IsActivateFailed}}
<p>{{.i18n.Tr "auth.invalid_code"}}</p>
{{else}}
<p>{{.i18n.Tr "auth.has_unconfirmed_mail" .LoggedUser.Name .LoggedUser.Email | Str2html}}</p>
<p>{{.i18n.Tr "auth.has_unconfirmed_mail" .LoggedUser.Name .LoggedUser.Email | Str2HTML}}</p>
<div class="ui divider"></div>
<div class="text right">
<button class="ui blue button">{{.i18n.Tr "auth.resend_mail"}}</button>

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